*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  background: #f5f7fa;
  color: #1f2937;
  transition: background 0.25s ease, color 0.25s ease;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

body.dark {
  background: #0f172a;
  color: #e5e7eb;
}

body.dark .navbar,
body.dark .footer,
body.dark .nav-menu,
body.dark .profile-menu,
body.dark .info-card,
body.dark .deal-card,
body.dark .step-card,
body.dark .stat-card,
body.dark .page-hero-content,
body.dark .sell-form-card,
body.dark .sell-side-card,
body.dark .dashboard-stat,
body.dark .empty-state,
body.dark .legal-card,
body.dark .faq-item,
body.dark .not-found-card,
body.dark .admin-section-card,
body.dark .support-message-card,
body.dark .modal-card,
body.dark .user-admin-card,
body.dark .profile-summary-card,
body.dark .profile-section-card,
body.dark .profile-side-card,
body.dark .profile-stat-card,
body.dark .profile-public-preview {
  background: #111827;
  border-color: #1f2937;
  color: #e5e7eb;
}

body.dark .light-section {
  background: #0b1220;
}

body.dark .nav-auth-link,
body.dark .nav-btn,
body.dark .nav-menu a,
body.dark .profile-menu a,
body.dark .profile-menu button,
body.dark .footer a,
body.dark .section-head p,
body.dark .deal-card p,
body.dark .info-card p,
body.dark .step-card p,
body.dark .page-hero-content p,
body.dark .deal-info-list li,
body.dark .tips-list,
body.dark .legal-card p,
body.dark .faq-answer p,
body.dark .dashboard-stat p,
body.dark .empty-state p,
body.dark .seller-note,
body.dark .loading-text,
body.dark .support-meta,
body.dark .support-footer,
body.dark .support-body,
body.dark .profile-hero-left p,
body.dark .profile-side-card > p,
body.dark .profile-summary-meta .mini-text,
body.dark .profile-stat-card p,
body.dark .phone-link-box .mini-text,
body.dark .profile-public-text,
body.dark #profilePublicUsername {
  color: #d1d5db;
}

body.dark .filter-bar input,
body.dark .filter-bar select,
body.dark .sell-form input,
body.dark .sell-form select,
body.dark .sell-form textarea,
body.dark .form-field input,
body.dark .form-field select,
body.dark .form-field textarea,
body.dark .profile-section-card input {
  background: #0f172a;
  border-color: #334155;
  color: #fff;
}

body.dark .nav-auth-link:hover,
body.dark .nav-menu a:hover,
body.dark .profile-menu a:hover,
body.dark .profile-menu button:hover {
  background: #1f2937;
}

body.dark .small-btn,
body.dark .secondary-btn,
body.dark .secondary-small-btn {
  border-color: #334155;
  color: #fff;
}

body.dark .coupon-box,
body.dark .mini-cta-box {
  background: #0f172a;
  border-color: #1f2937;
  color: #e5e7eb;
}

body.dark .message-chip {
  background: #0f172a;
  color: #93c5fd;
}

body.dark .badge-neutral {
  background: #1f2937;
  color: #e5e7eb;
}

body.dark .seller-link {
  color: #93c5fd;
}

body.dark .form-message.error {
  background: rgba(127, 29, 29, 0.25);
  color: #fecaca;
  border-color: rgba(252, 165, 165, 0.25);
}

body.dark .form-message.success {
  background: rgba(6, 78, 59, 0.25);
  color: #a7f3d0;
  border-color: rgba(110, 231, 183, 0.25);
}

body.dark .icon-close-btn {
  background: #111827;
  border-color: #334155;
  color: #e5e7eb;
}

body.dark .profile-chip {
  background: #172554;
  color: #bfdbfe;
}

body.dark .profile-chip.light {
  background: #1f2937;
  color: #cbd5e1;
}

body.dark #profileNameNav {
  color: #e5e7eb;
}

body.dark .profile-btn {
  background: rgba(17, 24, 39, 0.95);
  border-color: #334155;
}

body.dark .profile-side-hero {
  background: linear-gradient(180deg, #111827 0%, #0f172a 100%);
}

body.dark .profile-public-avatar {
  background: linear-gradient(135deg, #1d4ed8, #4f46e5);
}

.navbar {
  width: 100%;
  min-height: 72px;
  padding: 0 20px;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.nav-left {
  display: flex;
  align-items: center;
}

.logo {
  font-size: 28px;
  font-weight: 800;
  color: #2563eb;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
}

.nav-auth-link {
  color: #111827;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 12px;
  transition: 0.2s ease;
}

.nav-auth-link:hover {
  background: #eff6ff;
  color: #2563eb;
}

.nav-btn {
  border: 1px solid #dbe2ea;
  background: #fff;
  color: #111827;
  height: 42px;
  min-width: 42px;
  padding: 0 14px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  transition: 0.2s ease;
}

.nav-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.profile {
  position: relative;
}

.profile-btn {
  height: 50px;
  min-width: 0;
  padding: 0 14px 0 8px;
  border-radius: 16px;
  border: 1px solid #dbe5f2;
  background: rgba(255,255,255,0.96);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

#profileAvatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1d4ed8, #4f7cff);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  flex: 0 0 34px;
}

#profileNameNav {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
  padding: 10px;
  display: none;
  z-index: 1200;
}

.profile-menu.show,
.profile-menu.open {
  display: block;
}

.profile-menu a,
.profile-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.profile-menu a:hover,
.profile-menu button:hover {
  background: #f4f8ff;
}

.nav-toggle {
  display: none;
  font-size: 20px;
  line-height: 1;
}

.nav-menu {
  display: none;
  position: absolute;
  top: 72px;
  right: 20px;
  width: 240px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
  padding: 10px;
}

.nav-menu.show {
  display: block;
}

.nav-menu a {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  color: #111827;
  font-weight: 600;
}

.nav-menu a:hover {
  background: #f3f4f6;
  color: #2563eb;
}

.page-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px 20px;
}

.page-hero-content {
  background: linear-gradient(135deg, #eaf2ff, #f5f8ff);
  border: 1px solid #e5e7eb;
  border-radius: 28px;
  padding: 40px 30px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.06);
}

.page-hero-content h1 {
  font-size: 42px;
  margin: 14px 0 12px;
}

.page-hero-content p {
  color: #6b7280;
  font-size: 16px;
  line-height: 1.7;
  max-width: 760px;
}

.section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 20px;
}

.light-section {
  background: #eef4ff;
  border-radius: 30px;
}

.section-head {
  text-align: center;
  margin-bottom: 36px;
}

.section-head h2 {
  font-size: 36px;
  margin-bottom: 10px;
}

.section-head p {
  color: #6b7280;
  font-size: 16px;
}

.left-head {
  text-align: left;
  margin-bottom: 24px;
}

.card-grid {
  display: grid;
  gap: 22px;
}

.three-grid {
  grid-template-columns: repeat(3, 1fr);
}

.two-grid {
  grid-template-columns: repeat(2, 1fr);
}

.dual-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}

.info-card,
.step-card,
.deal-card,
.legal-card,
.admin-section-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.icon-box {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, #2563eb, #4f46e5);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  margin-bottom: 16px;
}

.info-card h3,
.step-card h3,
.deal-card h3 {
  margin-bottom: 10px;
  font-size: 22px;
}

.info-card p,
.step-card p,
.deal-card p {
  color: #6b7280;
  line-height: 1.7;
}

.step-number {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #2563eb;
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.deal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.deal-brand {
  font-weight: 800;
  color: #111827;
}

.deal-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
}

.deal-bottom {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
  border: none;
  cursor: pointer;
}

.small-btn:hover {
  background: #1d4ed8;
}

.secondary-small-btn {
  background: #fff;
  color: #111827;
  border: 1px solid #dbe2ea;
}

.secondary-small-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.primary-btn {
  background: #2563eb;
  color: #fff;
}

.primary-btn:hover {
  background: #1d4ed8;
}

.secondary-btn {
  border: 1px solid #dbe2ea;
  color: #111827;
  background: #fff;
}

.secondary-btn:hover {
  border-color: #2563eb;
  color: #2563eb;
}

.coupon-box {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  word-break: break-word;
}

.seller-note {
  margin-top: 12px;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.6;
}

.deal-info-list {
  list-style: none;
  margin-top: 14px;
}

.deal-info-list li {
  margin-bottom: 8px;
  color: #6b7280;
  font-size: 14px;
}

.seller-inline-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.seller-link {
  font-size: 14px;
  font-weight: 700;
  color: #2563eb;
}

.seller-link:hover {
  text-decoration: underline;
}

.deal-actions-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-name-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-bar {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 14px;
  margin-bottom: 36px;
}

.filter-bar input,
.filter-bar select,
.sell-form input,
.sell-form select,
.sell-form textarea,
.form-field input,
.form-field select,
.form-field textarea,
.auth-field input {
  width: 100%;
  border: 1px solid #dbe2ea;
  background: #fff;
  color: #111827;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 15px;
  outline: none;
}

.filter-bar input:focus,
.filter-bar select:focus,
.sell-form input:focus,
.sell-form select:focus,
.sell-form textarea:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus,
.auth-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.sell-layout,
.contact-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}

.sell-form-card,
.sell-side-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 24px;
  box-shadow: 0 14px 40px rgba(15, 23, 42, 0.06);
}

.sell-form {
  display: grid;
  gap: 18px;
}

.form-row-two,
.form-grid.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-field label,
.auth-field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  font-size: 14px;
}

.sell-form textarea {
  resize: vertical;
  min-height: 120px;
}

.full-btn {
  width: 100%;
}

.sell-side-card h3 {
  font-size: 24px;
  margin-bottom: 18px;
}

.tips-list {
  padding-left: 18px;
  color: #6b7280;
  line-height: 1.8;
  margin-bottom: 24px;
}

.mini-cta-box {
  background: #eff6ff;
  border-radius: 18px;
  padding: 18px;
}

.mini-cta-box h4 {
  margin-bottom: 8px;
}

.mini-cta-box p {
  color: #6b7280;
  line-height: 1.7;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 34px;
}

.dashboard-stat {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  padding: 24px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.05);
}

.dashboard-stat h3 {
  font-size: 32px;
  color: #2563eb;
  margin-bottom: 8px;
}

.dashboard-stat p {
  color: #6b7280;
  font-weight: 600;
}

.admin-stats-row {
  margin-top: -10px;
}

.footer {
  margin-top: 20px;
  background: #ffffff;
  border-top: 1px solid #e5e7eb;
  padding: 50px 20px 24px;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 30px;
}

.footer h3,
.footer h4 {
  margin-bottom: 12px;
}

.footer p,
.footer a {
  color: #6b7280;
  display: block;
  margin-bottom: 10px;
}

.footer a:hover {
  color: #2563eb;
}

.footer-copy {
  max-width: 1200px;
  margin: 20px auto 0;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  text-align: center;
}

.form-message {
  display: none;
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
}

.form-message.show {
  display: block;
}

.form-message.error {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.form-message.success {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.loading-text {
  font-size: 16px;
  color: #6b7280;
}

.empty-state {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  padding: 28px;
  text-align: center;
}

.empty-state h3 {
  margin-bottom: 8px;
}

.empty-state p {
  color: #6b7280;
}

.faq-wrap {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  gap: 14px;
}

.faq-item {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  border: none;
  background: transparent;
  padding: 18px 20px;
  text-align: left;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.faq-icon {
  font-size: 24px;
  line-height: 1;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.faq-answer p {
  padding: 0 20px 18px;
  color: #6b7280;
  line-height: 1.8;
}

.legal-card {
  max-width: 1000px;
  margin: 0 auto;
}

.legal-card h2 {
  margin: 20px 0 10px;
  font-size: 24px;
}

.legal-card h2:first-child {
  margin-top: 0;
}

.legal-card p {
  color: #6b7280;
  line-height: 1.8;
}

.not-found-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, #eef4ff, #f7f9ff);
}

.not-found-card {
  width: min(680px, 100%);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 30px;
  padding: 42px 30px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.not-found-code {
  font-size: 82px;
  font-weight: 800;
  color: #2563eb;
  line-height: 1;
  margin-bottom: 16px;
}

.not-found-card h1 {
  font-size: 34px;
  margin-bottom: 10px;
}

.not-found-card p {
  color: #6b7280;
  line-height: 1.8;
}

.global-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #111827;
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  font-weight: 700;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
  transition: all 0.25s ease;
  z-index: 3000;
}

.global-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.global-toast.success {
  background: #047857;
}

.global-toast.error {
  background: #b91c1c;
}

.admin-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.approve-btn {
  background: #16a34a;
  color: #fff;
}

.approve-btn:hover {
  background: #15803d;
}

.reject-btn {
  background: #dc2626;
  color: #fff;
}

.reject-btn:hover {
  background: #b91c1c;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge-pending {
  background: #fff7ed;
  color: #c2410c;
}

.badge-active {
  background: #ecfdf5;
  color: #047857;
}

.badge-rejected {
  background: #fef2f2;
  color: #b91c1c;
}

.badge-sold {
  background: #eff6ff;
  color: #1d4ed8;
}

.badge-verified {
  background: #eef2ff;
  color: #4338ca;
}

.badge-neutral {
  background: #f3f4f6;
  color: #374151;
}

.admin-panel-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.admin-panel-stack {
  display: grid;
  gap: 24px;
}

.admin-message-list {
  display: grid;
  gap: 16px;
}

.support-message-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
}

.support-message-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.support-message-top h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.support-meta {
  color: #6b7280;
  font-size: 13px;
}

.message-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.support-body {
  color: #374151;
  line-height: 1.7;
  margin-bottom: 12px;
  white-space: pre-wrap;
}

.support-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  color: #6b7280;
  font-size: 12px;
  border-top: 1px solid #e5e7eb;
  padding-top: 10px;
}

.admin-user-grid {
  display: grid;
  gap: 16px;
}

.user-admin-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
}

.user-admin-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.user-badge-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 9999;
}

.modal-card {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.icon-close-btn {
  width: 38px;
  height: 38px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.buy-head-grid {
  display: grid;
  grid-template-columns: 1.2fr .9fr;
  gap: 20px;
  align-items: start;
}

.stats-mini-wrap {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
}

.stats-mini-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(15,23,42,.06);
}

.stats-mini-card strong {
  display: block;
  font-size: 16px;
  margin-bottom: 6px;
  color: #0f172a;
}

.stats-mini-card span {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

.filter-shell {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 12px 32px rgba(15,23,42,.05);
  margin-bottom: 18px;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-field label {
  font-size: 14px;
  font-weight: 600;
  color: #334155;
}

.filter-field input,
.filter-field select {
  width: 100%;
  min-height: 50px;
  border: 1px solid #dbe3ef;
  border-radius: 14px;
  padding: 0 14px;
  font-size: 15px;
  background: #fff;
  outline: none;
}

.filter-actions {
  display: flex;
  align-items: end;
}

.market-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin: 18px 0 22px;
}

.market-toolbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.toolbar-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.toolbar-text {
  color: #64748b;
  font-size: 14px;
}

.rating-modal {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.rating-modal.show {
  display: flex;
}

.rating-modal-box {
  width: 100%;
  max-width: 680px;
  background: #ffffff;
  border-radius: 28px;
  padding: 28px;
  position: relative;
  box-shadow: 0 30px 80px rgba(15,23,42,.25);
}

.rating-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 48px;
  height: 48px;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  background: #fff;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.rating-modal-head {
  margin-bottom: 18px;
  padding-right: 56px;
}

.rating-modal-head h2 {
  font-size: 32px;
  line-height: 1.1;
  color: #0f172a;
  margin-bottom: 8px;
}

.rating-modal-head p {
  color: #64748b;
  line-height: 1.6;
}

.rating-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.rating-form-group label {
  font-size: 15px;
  font-weight: 700;
  color: #1e293b;
}

.rating-form-group select,
.rating-form-group textarea {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  outline: none;
  background: #fff;
}

.rating-form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.rating-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}
.profile-page-wrap {
  background:
    radial-gradient(circle at top left, rgba(59,130,246,0.06), transparent 26%),
    linear-gradient(180deg, #f8fbff 0%, #f2f6fc 100%);
  min-height: calc(100vh - 72px);
}

.compact-profile-hero {
  padding: 18px 20px 6px;
}

.profile-hero-inner {
  max-width: 1040px;
  margin: 0 auto;
}

.profile-hero-left h1 {
  margin: 8px 0 8px;
  font-size: clamp(34px, 4.2vw, 48px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: #08152f;
}

.profile-hero-left p {
  max-width: 680px;
  color: #5b6d87;
  font-size: 16px;
  line-height: 1.7;
}

.compact-profile-layout {
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 20px 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  gap: 18px;
  align-items: start;
}

.profile-main-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compact-summary-card,
.compact-section-card,
.compact-public-card,
.compact-side-card,
.profile-stat-card {
  background: #fff;
  border: 1px solid #e6edf7;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
}

.compact-summary-card {
  border-radius: 24px;
  padding: 20px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.profile-summary-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-big-avatar {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.22);
  position: relative;
}

.profile-big-avatar::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  z-index: -1;
  opacity: 0.22;
}

.profile-summary-meta h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #08152f;
}

.profile-summary-meta .mini-text {
  font-size: 14px;
  line-height: 1.45;
  color: #5c6c86;
}

.profile-summary-chips {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.profile-chip.light {
  background: #f3f6fb;
  color: #44536b;
}

.profile-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  align-self: center;
}

.profile-summary-actions .auth-main-btn,
#editProfileBtn,
#saveProfileBtn,
#cancelEditBtn {
  min-width: 136px;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
}

.compact-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
}

.profile-stat-card {
  min-height: 106px;
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: 0.22s ease;
}

.profile-stat-card p {
  margin: 0 0 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.profile-stat-card h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #1d4ed8;
}

.profile-stat-card.highlight {
  background: linear-gradient(135deg, #17337e 0%, #2563eb 100%);
  color: #fff;
}

.profile-stat-card.highlight p,
.profile-stat-card.highlight h3 {
  color: #fff;
}

.compact-section-card {
  border-radius: 22px;
  padding: 18px;
}

.profile-section-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.profile-section-head h3 {
  margin: 6px 0 0;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: #08152f;
}

.form-grid.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.auth-field label {
  display: block;
  margin-bottom: 7px;
  font-weight: 700;
  font-size: 14px;
}

.auth-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #dbe2ea;
  background: #fff;
  color: #111827;
  border-radius: 14px;
  padding: 12px 15px;
  font-size: 15px;
  outline: none;
}

.auth-field input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

#usernameStatus {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
}

#usernameStatus.success {
  color: #16a34a;
}

#usernameStatus.error {
  color: #dc2626;
}

#usernameStatus.checking {
  color: #2563eb;
}

.compact-profile-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.compact-public-card {
  border-radius: 22px;
  padding: 18px;
}

.profile-public-mini {
  display: grid;
  gap: 12px;
}

.profile-public-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #e6edf7;
  border-radius: 16px;
  background: linear-gradient(180deg, #fbfdff 0%, #f4f8ff 100%);
}

.profile-public-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  flex: 0 0 46px;
}

.profile-public-preview strong {
  display: block;
  font-size: 16px;
  color: #0f172a;
  margin-bottom: 4px;
}

#profilePublicUsername {
  color: #5f6f89;
  font-size: 13px;
}

.profile-public-text {
  color: #64748b;
  line-height: 1.6;
  font-size: 14px;
}

.profile-public-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.profile-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 14px;
}

.compact-phone-box .mini-text {
  margin-top: 4px;
  margin-bottom: 6px;
  color: #64748b;
}

.recaptcha-slot {
  margin: 10px 0 14px;
}

.compact-phone-box .form-grid.two-col {
  margin-bottom: 10px;
}

.compact-phone-box .auth-main-btn,
.compact-phone-box .secondary-btn,
.compact-phone-box .danger-btn,
.compact-profile-actions .auth-main-btn {
  min-height: 46px;
  border-radius: 14px;
}

.compact-profile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.compact-side-card {
  border-radius: 22px;
  padding: 18px;
}

.compact-side-card h2 {
  margin: 10px 0 8px;
  font-size: 18px;
  line-height: 1.18;
  letter-spacing: -0.02em;
  color: #08152f;
}

.compact-side-card > p {
  color: #5f6f89;
  line-height: 1.65;
  font-size: 14px;
}

.compact-side-points {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.compact-side-points .auth-side-point {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.compact-side-points .auth-side-point span {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: #eef4ff;
  flex: 0 0 34px;
}

.compact-side-points .auth-side-point strong {
  display: block;
  font-size: 14px;
  margin-bottom: 3px;
}

.compact-side-points .auth-side-point p {
  font-size: 13px;
  line-height: 1.45;
  color: #5f6f89;
}

.compact-side-hero {
  margin-top: 14px;
  border-radius: 18px;
  overflow: hidden;
  background: linear-gradient(180deg, #f7faff 0%, #edf4ff 100%);
  padding: 14px;
  min-height: 150px;
  display: grid;
  place-items: center;
}

.compact-side-hero img {
  width: 100%;
  max-height: 130px;
  display: block;
  object-fit: contain;
}

.profile-summary-card:hover,
.profile-section-card:hover,
.profile-stat-card:hover,
.profile-side-card:hover {
  transform: translateY(-2px);
  transition: 0.22s ease;
}

.mini-helper {
  font-size: 13px;
  line-height: 1.5;
}

.mini-helper.success {
  color: #16a34a;
}

.mini-helper.error {
  color: #dc2626;
}

.mini-helper.checking {
  color: #2563eb;
}

@media (max-width: 1100px) {
  .compact-profile-layout {
    grid-template-columns: 1fr;
  }

  .compact-profile-side {
    order: 3;
  }
}

@media (max-width: 1000px) {
  .three-grid,
  .footer-grid,
  .sell-layout {
    grid-template-columns: 1fr;
  }

  .stats-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .nav-auth-link,
  .profile {
    display: none !important;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .compact-summary-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-summary-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .compact-stats-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .form-grid.two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .section,
  .page-hero {
    padding-left: 16px;
    padding-right: 16px;
  }

  .page-hero-content h1,
  .section-head h2 {
    font-size: 28px;
  }

  .filter-bar,
  .form-row-two,
  .stats-row {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .deal-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .small-btn {
    width: 100%;
  }
}

@media (max-width: 560px) {
  .compact-profile-hero {
    padding: 18px 16px 6px;
  }

  .compact-profile-layout {
    padding: 8px 16px 28px;
    gap: 14px;
  }

  .compact-summary-card,
  .compact-section-card,
  .compact-public-card,
  .compact-side-card {
    padding: 16px;
    border-radius: 18px;
  }

  .profile-big-avatar {
    width: 66px;
    height: 66px;
    font-size: 26px;
  }

  .profile-summary-meta h2 {
    font-size: 22px;
  }

  .compact-stats-grid {
    grid-template-columns: 1fr;
  }

  .profile-stat-card {
    min-height: 98px;
  }

  .profile-summary-actions {
    flex-direction: column;
    width: 100%;
  }

  .profile-summary-actions .auth-main-btn,
  .profile-summary-actions button,
  .profile-link-btn,
  .compact-phone-box .auth-main-btn,
  .compact-phone-box .secondary-btn,
  .compact-phone-box .danger-btn,
  .compact-profile-actions .auth-main-btn {
    width: 100%;
  }

  .compact-side-card h2 {
    font-size: 17px;
  }
}