/* ============================================================
   GSM.CX — Main Stylesheet
   Bootstrap 5.3 base, custom components on top
   ============================================================ */

/* ---------- Theme tokens ----------
   Light is the default. `prefers-color-scheme: dark` auto-switches when
   the user hasn't picked anything. Explicit [data-theme] attributes on
   <html> (set by theme-toggle.js) override the system preference.
   Brand-dark surfaces (topbar, sidebar, footer, hero, CTA, auth-page
   gradient) intentionally stay dark in both themes — they're a design
   choice, not a surface that flips. */
:root {
  --bg:          #f8fafc;
  --surface:     #ffffff;
  --surface-alt: #f1f5f9;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --border:      #e2e8f0;
  --primary:     #6366f1;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0a0e1a;
    --surface:     #151b2e;
    --surface-alt: #1e2538;
    --text:        #f1f5f9;
    --text-muted:  #94a3b8;
    --border:      #2d3548;
    /* Bootstrap var remap — makes modals, dropdowns, forms, borders
       inherit our dark palette without per-component overrides. */
    --bs-body-bg:                  var(--bg);
    --bs-body-color:               var(--text);
    --bs-body-color-rgb:           241, 245, 249;
    --bs-secondary-color:          var(--text-muted);
    --bs-secondary-color-rgb:      148, 163, 184;
    --bs-tertiary-color:           var(--text-muted);
    --bs-border-color:             var(--border);
    --bs-border-color-translucent: var(--border);
    --bs-secondary-bg:             var(--surface-alt);
    --bs-tertiary-bg:              var(--surface-alt);
    --bs-modal-bg:                 var(--surface);
    --bs-modal-color:              var(--text);
    --bs-modal-border-color:       var(--border);
    --bs-dropdown-bg:              var(--surface);
    --bs-dropdown-color:           var(--text);
    --bs-dropdown-border-color:    var(--border);
    --bs-dropdown-link-color:      var(--text);
    --bs-dropdown-link-hover-bg:   var(--surface-alt);
    --bs-dropdown-link-hover-color:var(--text);
    --bs-emphasis-color:           var(--text);
    --bs-emphasis-color-rgb:       241, 245, 249;
    --bs-table-color:              var(--text);
    --bs-table-bg:                 transparent;
    --bs-table-border-color:       var(--border);
    --bs-table-striped-color:      var(--text);
    --bs-table-striped-bg:         var(--surface-alt);
    --bs-table-hover-color:        var(--text);
    --bs-table-hover-bg:           var(--surface-alt);
  }
}
[data-theme="light"] {
  --bg:          #f8fafc;
  --surface:     #ffffff;
  --surface-alt: #f1f5f9;
  --text:        #1e293b;
  --text-muted:  #64748b;
  --border:      #e2e8f0;
}
[data-theme="dark"] {
  --bg:          #0a0e1a;
  --surface:     #151b2e;
  --surface-alt: #1e2538;
  --text:        #f1f5f9;
  --text-muted:  #94a3b8;
  --border:      #2d3548;
  --bs-body-bg:                  var(--bg);
  --bs-body-color:               var(--text);
  --bs-body-color-rgb:           241, 245, 249;
  --bs-secondary-color:          var(--text-muted);
  --bs-secondary-color-rgb:      148, 163, 184;
  --bs-tertiary-color:           var(--text-muted);
  --bs-border-color:             var(--border);
  --bs-border-color-translucent: var(--border);
  --bs-secondary-bg:             var(--surface-alt);
  --bs-tertiary-bg:              var(--surface-alt);
  --bs-modal-bg:                 var(--surface);
  --bs-modal-color:              var(--text);
  --bs-modal-border-color:       var(--border);
  --bs-dropdown-bg:              var(--surface);
  --bs-dropdown-color:           var(--text);
  --bs-dropdown-border-color:    var(--border);
  --bs-dropdown-link-color:      var(--text);
  --bs-dropdown-link-hover-bg:   var(--surface-alt);
  --bs-dropdown-link-hover-color:var(--text);
  --bs-emphasis-color:           var(--text);
  --bs-emphasis-color-rgb:       241, 245, 249;
  --bs-table-color:              var(--text);
  --bs-table-bg:                 transparent;
  --bs-table-border-color:       var(--border);
  --bs-table-striped-color:      var(--text);
  --bs-table-striped-bg:         var(--surface-alt);
  --bs-table-hover-color:        var(--text);
  --bs-table-hover-bg:           var(--surface-alt);
}

/* ---------- Bootstrap utility overrides for dark theme ----------
   Pages use `.bg-light`, `.bg-white`, `.text-dark` (mostly on badges and
   info boxes) — these hardcode near-white/near-black and ignore the theme.
   Remap them to theme vars so every table badge and panel stays legible. */
[data-theme="dark"] .bg-light,
[data-theme="dark"] .bg-white { background-color: var(--surface-alt) !important; color: var(--text) !important; }
[data-theme="dark"] .text-dark { color: var(--text) !important; }
/* Bootstrap `.table-light` thead keeps a hard-coded light fill — remap to
   the theme's surface so table headers don't glow in dark mode. */
[data-theme="dark"] .table-light,
[data-theme="dark"] .table-light > th,
[data-theme="dark"] .table-light > td,
[data-theme="dark"] thead.table-light th {
  background-color: var(--surface-alt) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}
[data-theme="dark"] .navbar.bg-white { background-color: var(--surface) !important; border-bottom: 1px solid var(--border); }
[data-theme="dark"] .navbar-light .navbar-brand,
[data-theme="dark"] .navbar-light .nav-link { color: var(--text); }
[data-theme="dark"] .navbar-light .nav-link:hover { color: var(--primary); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .bg-light,
  :root:not([data-theme="light"]) .bg-white { background-color: var(--surface-alt) !important; color: var(--text) !important; }
  :root:not([data-theme="light"]) .text-dark { color: var(--text) !important; }
  :root:not([data-theme="light"]) .navbar.bg-white { background-color: var(--surface) !important; border-bottom: 1px solid var(--border); }
  :root:not([data-theme="light"]) .navbar-light .navbar-brand,
  :root:not([data-theme="light"]) .navbar-light .nav-link { color: var(--text); }
  :root:not([data-theme="light"]) .navbar-light .nav-link:hover { color: var(--primary); }
}

/* ---------- Reset / Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  transition: background-color .2s, color .2s;
}
a { text-decoration: none; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.font-mono { font-family: 'Courier New', monospace; }

/* ---------- Topbar ---------- */
.topbar {
  background: #0f172a;
  color: #94a3b8;
  font-size: .78rem;
  padding: .4rem 0;
  position: relative;
  z-index: 1030; /* above .navbar.sticky-top (1020) so currency/lang dropdowns render over it */
}
.topbar a, .topbar-link {
  color: #94a3b8;
  transition: color .2s;
}
.topbar a:hover, .topbar-link:hover { color: #fff; }
.topbar .dropdown-menu { font-size: .82rem; min-width: 100px; z-index: 1031; }

/* ---------- Navbar ---------- */
.navbar-brand .brand-text {
  font-size: 1.35rem;
  font-weight: 800;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.navbar { border-bottom: 1px solid var(--border); transition: background-color .2s, border-color .2s; }
.navbar-light.bg-white { background: var(--surface) !important; }
.nav-link { font-weight: 500; color: var(--text-muted) !important; font-size: .9rem; }
.nav-link:hover, .nav-link.active { color: var(--primary) !important; }

/* ---------- Hero Section ---------- */
.hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  padding: 90px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(99,102,241,.25) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(139,92,246,.2) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(99,102,241,.15);
  border: 1px solid rgba(99,102,241,.4);
  color: #a5b4fc;
  font-size: .78rem; font-weight: 600; letter-spacing: .05em;
  padding: 4px 12px; border-radius: 20px;
  margin-bottom: 1.2rem;
}
/* Hero is a brand-dark zone (purple gradient, both themes) — force light text. */
.hero, .hero * { color: #f8fafc; }
.hero h1,
.hero .hero-title { color: #ffffff; font-weight: 800; line-height: 1.15; }
.hero h1 span,
.hero .hero-accent { background: linear-gradient(135deg,#818cf8,#c084fc); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; color: transparent; }
.hero .lead,
.hero .hero-subtitle { color: #cbd5e1; font-size: 1.1rem; }
.hero-stats { display: flex; gap: 2.5rem; margin-top: 2.5rem; }
.hero-stat-num,
.hero .stat-num { font-size: 1.6rem; font-weight: 800; color: #ffffff; line-height: 1.1; display: block; }
.hero-stat-label,
.hero .stat-label { font-size: .78rem; color: #94a3b8; display: block; }
.hero-illustration { font-size: 10rem; color: rgba(255,255,255,.15); }

/* Hero buttons — always on dark background */
.btn-hero-primary { background: #ffffff; color: #1e1b4b; border: 1px solid #ffffff; font-weight: 600; }
.btn-hero-primary:hover, .btn-hero-primary:focus { background: #e0e7ff; color: #1e1b4b; border-color: #e0e7ff; }
.btn-hero-outline { background: transparent; color: #ffffff; border: 1px solid rgba(255,255,255,.5); font-weight: 600; }
.btn-hero-outline:hover, .btn-hero-outline:focus { background: rgba(255,255,255,.1); color: #ffffff; border-color: #ffffff; }
.hero-card {
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px; padding: 2rem;
}
.hero-card h5 { color: #e2e8f0; font-weight: 600; }
.hero-card .table { color: #cbd5e1; font-size: .88rem; }
.hero-card .table thead th { color: #94a3b8; border-color: rgba(255,255,255,.08); }
.hero-card .table td { border-color: rgba(255,255,255,.06); }

/* ---------- Section ---------- */
.section-title { font-size: 1.75rem; font-weight: 800; color: var(--text); }
.section-subtitle { color: var(--text-muted); font-size: 1rem; }

/* ---------- Feature Cards ---------- */
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.75rem;
  height: 100%;
  transition: transform .25s, box-shadow .25s, border-color .25s, background-color .2s;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(99,102,241,.1);
  border-color: #a5b4fc;
}
.feature-icon {
  width: 52px; height: 52px;
  background: linear-gradient(135deg,#ede9fe,#e0e7ff);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; color: #6366f1;
  margin-bottom: 1rem;
}
.feature-card h6 { font-weight: 700; font-size: .95rem; color: var(--text); }
.feature-card p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; margin: 0; }

/* ---------- CTA ---------- */
.cta-section {
  background: linear-gradient(135deg,#6366f1,#8b5cf6);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  color: #fff;
}
.cta-section h2 { font-weight: 800; }
.cta-section p { opacity: .85; }

/* ---------- Footer ---------- */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 3.5rem 0 1.5rem;
  margin-top: 0;
}
.footer-brand { font-size: 1.2rem; font-weight: 800; color: #fff; margin-bottom: .5rem; }
.footer h6 { color: #e2e8f0; font-weight: 600; font-size: .85rem; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 1rem; }
.footer a { color: #64748b; font-size: .87rem; display: block; margin-bottom: .4rem; transition: color .2s; }
.footer a:hover { color: #a5b4fc; }
.footer-divider { border-color: #1e293b; margin: 2rem 0 1rem; }
.footer-bottom { font-size: .82rem; color: #475569; }
.social-links { display: flex; gap: .75rem; margin-top: 1rem; }
.social-link {
  width: 34px; height: 34px;
  background: #1e293b; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #64748b; font-size: .85rem;
  transition: background .2s, color .2s;
}
.social-link:hover { background: #6366f1; color: #fff !important; }

/* ---------- Auth Pages (1.0.426: glass + gradient mesh) ---------- */
.auth-page {
  min-height: 100vh;
  position: relative;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
  background: #0a0e1a;
  overflow: hidden;
  isolation: isolate;
}
.auth-page::before,
.auth-page::after {
  content: "";
  position: absolute;
  inset: -10%;
  z-index: -2;
  pointer-events: none;
}
.auth-page::before {
  background:
    radial-gradient(50% 45% at 20% 20%, rgba(99, 102, 241, 0.30), transparent 70%),
    radial-gradient(45% 40% at 80% 30%, rgba(168, 85, 247, 0.22), transparent 70%),
    radial-gradient(60% 50% at 50% 100%, rgba(129, 140, 248, 0.20), transparent 70%);
  filter: blur(2px);
  animation: tu-mesh-drift-auth 28s ease-in-out infinite alternate;
}
.auth-page::after {
  background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.04) 1px, transparent 1.5px);
  background-size: 36px 36px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, black 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, black 30%, transparent 75%);
  opacity: 0.5;
}
@keyframes tu-mesh-drift-auth {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-2%, 1%) scale(1.04); }
  100% { transform: translate(2%, -1%) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  .auth-page::before { animation: none !important; }
}

/* 1.0.427: light-theme override — same mesh language but lighter base
   so the dark-blue background doesn't fight the rest of the light UI. */
[data-theme="light"] .auth-page {
  background: #fafbff;
}
[data-theme="light"] .auth-page::before {
  background:
    radial-gradient(50% 45% at 20% 20%, rgba(99, 102, 241, 0.18), transparent 70%),
    radial-gradient(45% 40% at 80% 30%, rgba(168, 85, 247, 0.14), transparent 70%),
    radial-gradient(60% 50% at 50% 100%, rgba(129, 140, 248, 0.12), transparent 70%);
}
[data-theme="light"] .auth-page::after {
  background-image: radial-gradient(circle at center, rgba(15, 23, 42, 0.06) 1px, transparent 1.5px);
  opacity: 0.6;
}

.auth-card {
  position: relative;
  background: var(--surface);
  color: var(--text);
  border-radius: 22px;
  padding: 2.5rem;
  width: 100%;
  max-width: 450px;
  border: 1px solid rgba(99, 102, 241, .14);
  box-shadow: 0 30px 80px -12px rgba(0, 0, 0, .55),
              0 0 0 1px rgba(99, 102, 241, .06);
  isolation: isolate;
  overflow: hidden;
  transition: background-color .2s, color .2s;
}
.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1 0%, #818cf8 50%, #a78bfa 100%);
  z-index: 1;
}
.auth-card-wide { max-width: 720px; }

.auth-logo {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -.02em;
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-logo span {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 35%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -.025em;
  text-align: center;
  margin-bottom: .35rem;
  color: var(--text);
}
.auth-sub {
  text-align: center;
  color: var(--text-muted);
  font-size: .92rem;
  margin-bottom: 1.85rem;
  line-height: 1.5;
}

/* Form controls inside auth-card — same pill+focus treatment as cabinet */
.auth-card .form-control,
.auth-card .form-select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .65rem .9rem;
  background: var(--surface);
  color: var(--text);
  font-size: .95rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-card .form-control:focus,
.auth-card .form-select:focus {
  border-color: rgba(99, 102, 241, .50);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
  outline: none;
}
.auth-card .form-control::placeholder {
  color: var(--text-subtle, #94a3b8);
}
.auth-card .form-label {
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .35rem;
}
.auth-card .input-group-text {
  background: var(--surface-alt, rgba(99, 102, 241, .04));
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 10px 0 0 10px;
}

/* Buttons inside auth-card */
.auth-card .btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border-color: transparent;
  font-weight: 700;
  letter-spacing: .01em;
  padding: .7rem 1.3rem;
  box-shadow: 0 8px 22px rgba(99, 102, 241, .32),
              inset 0 1px 0 rgba(255, 255, 255, .15);
  transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .18s ease;
}
.auth-card .btn-primary:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  box-shadow: 0 14px 32px rgba(99, 102, 241, .42),
              inset 0 1px 0 rgba(255, 255, 255, .15);
}
.auth-card .btn-outline-secondary {
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
}
.auth-card .btn-outline-secondary:hover {
  background: rgba(99, 102, 241, .08);
  border-color: rgba(99, 102, 241, .35);
  color: #4338ca;
}

/* Stepper indicator polish (markup: .step-item[.active|.done] > .step-num + .step-label, .step-line between) */
.auth-card .step-indicators {
  gap: 0;
  margin-bottom: 1.85rem;
}
.auth-card .step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
}
.auth-card .step-num {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  font-weight: 800;
  background: rgba(99, 102, 241, .10);
  color: var(--text-muted);
  border: 2px solid transparent;
  transition: all .25s ease;
}
.auth-card .step-item.active .step-num {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(99, 102, 241, .40);
}
.auth-card .step-item.done .step-num {
  background: rgba(16, 185, 129, .16);
  color: #059669;
}
.auth-card .step-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
}
.auth-card .step-item.active .step-label { color: var(--primary, #4338ca); }
.auth-card .step-item.done .step-label   { color: #059669; }
.auth-card .step-line {
  flex: 1 1 auto;
  height: 2px;
  background: var(--border);
  margin: 17px .5rem 0;
  border-radius: 2px;
  transition: background .25s ease;
}
.auth-card .step-item.done + .step-line { background: linear-gradient(90deg, #6366f1, #818cf8); }
[data-theme="dark"] .auth-card .step-num { background: rgba(129, 140, 248, .14); color: #94a3b8; }
[data-theme="dark"] .auth-card .step-item.active .step-label { color: #c7d2fe; }
[data-theme="dark"] .auth-card .step-item.done   .step-label { color: #34d399; }

/* Auth alerts */
.auth-card .alert {
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 500;
}
.auth-card .alert-danger {
  background: rgba(220, 38, 38, .10);
  border-color: rgba(220, 38, 38, .20);
  color: #b91c1c;
}
.auth-card .alert-success {
  background: rgba(16, 185, 129, .10);
  border-color: rgba(16, 185, 129, .20);
  color: #047857;
}
.auth-card .alert-info {
  background: rgba(14, 165, 233, .10);
  border-color: rgba(14, 165, 233, .20);
  color: #0369a1;
}

/* Auth links (e.g. "Already have an account? Sign in") */
.auth-card a {
  color: var(--primary, #4338ca);
  font-weight: 600;
  text-decoration: none;
  transition: color .15s ease;
}
.auth-card a:hover {
  color: #4338ca;
  text-decoration: underline;
}

/* Light theme adjustments */
[data-theme="light"] .auth-card {
  background: #ffffff;
  border-color: rgba(99, 102, 241, .14);
}

/* Dark theme adjustments */
[data-theme="dark"] .auth-card {
  background: #151b2e;
  border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 30px 80px -12px rgba(0, 0, 0, .70),
              0 0 0 1px rgba(129, 140, 248, .12);
}
[data-theme="dark"] .auth-card .alert-danger  { color: #fca5a5; }
[data-theme="dark"] .auth-card .alert-success { color: #6ee7b7; }
[data-theme="dark"] .auth-card .alert-info    { color: #7dd3fc; }
[data-theme="dark"] .auth-card a              { color: #c7d2fe; }

/* Step indicators */
.step-indicators { display: flex; justify-content: center; gap: 0; margin-bottom: 2rem; }
.step-ind {
  display: flex; align-items: center;
}
.step-ind-dot {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid #e2e8f0;
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; color: #94a3b8;
  background: #fff;
  transition: all .3s;
  position: relative; z-index: 1;
}
.step-ind-dot.active { border-color: #6366f1; color: #6366f1; background: #ede9fe; }
.step-ind-dot.done { border-color: #6366f1; background: #6366f1; color: #fff; }
.step-ind-line { width: 50px; height: 2px; background: #e2e8f0; }
.step-ind-line.done { background: #6366f1; }
.step-label { font-size: .7rem; color: #94a3b8; text-align: center; margin-top: .25rem; }
.step-label.active { color: #6366f1; font-weight: 600; }

.step-pane { display: none; }
.step-pane.active { display: block; }

/* ---------- Panel Layout ---------- */
.panel-body { background: var(--surface-alt); overflow-x: hidden; transition: background-color .2s; }
.panel-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 240px;
  min-width: 240px;
  background: #0f172a;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform .3s;
  z-index: 100;
}
.sidebar-brand {
  padding: 1.25rem 1rem 1rem;
  border-bottom: 1px solid #1e293b;
  text-align: center;
  /* Subtle indigo→transparent overlay anchors the brand area visually
     so the logo doesn't float in unmotivated dark padding. */
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.10), transparent 80%);
}
/* Sidebar is always brand-dark in both themes. Force muted-on-dark colors
   so .text-muted / .small labels inside don't inherit Bootstrap's light-theme
   near-black (which would be invisible against the dark sidebar bg). */
.sidebar .text-muted,
.sidebar small,
.sidebar .small { color: #94a3b8 !important; }
.sidebar i { color: inherit; }
/* Brand area redesign (1.0.298+). Logo grows to ~56px tall + an uppercase
   gradient app-name caption sits below — fills the previously-empty
   horizontal space without crowding. Text-only fallback keeps the old
   look (large gradient app-name, no caption). */
.sidebar-brand .brand-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  text-decoration: none;
  transition: opacity .2s ease, transform .2s ease;
}
.sidebar-brand .brand-link:hover { opacity: .85; }
.sidebar-brand .brand-link:hover .brand-logo { transform: scale(1.03); }
.sidebar-brand .brand-logo {
  max-height: 56px;
  max-width: 180px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform .2s ease;
}
.sidebar-brand .brand-icon {
  font-size: 1.75rem;
  color: #818cf8;
}
.sidebar-brand .brand-name {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: linear-gradient(135deg, #818cf8, #c084fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
/* Text-only fallback (no logo uploaded): make the app name visually
   weighty so it owns the brand area on its own. */
.sidebar-brand .brand-link-text-only .brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: none;
}
/* Admin "Admin Panel" subtitle, sits under the brand name. */
.sidebar-brand .brand-subtitle {
  display: block;
  margin-top: .4rem;
  font-size: .65rem;
  color: #64748b !important;
  text-transform: uppercase;
  letter-spacing: .2em;
  font-weight: 600;
}
/* 1.0.408: Sidebar redesign — pill-style links with gradient on active,
   matching the marketplace top-nav aesthetic from 1.0.401. The actual
   layout structure is unchanged (same .sidebar-link class), this is a
   pure visual upgrade. */
.sidebar-user {
  display: flex; align-items: center; gap: .75rem;
  margin: .85rem .85rem .35rem;
  padding: .75rem .85rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(99,102,241,.10), rgba(168,85,247,.06));
  border: 1px solid rgba(255,255,255,.05);
}
.sidebar-avatar {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(135deg,#6366f1,#8b5cf6);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: .9rem;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(99,102,241,.35);
}
.sidebar-username { font-size: .88rem; font-weight: 700; color: #e2e8f0; line-height: 1.2; }
.sidebar-balance { font-size: .75rem; color: #4ade80; font-weight: 600; margin-top: 2px; }
.sidebar-nav { padding: .25rem .65rem .65rem; flex: 1; }
.sidebar-link {
  display: flex; align-items: center; gap: .75rem;
  margin: 1px 0;
  padding: .55rem .8rem;
  border-radius: 10px;
  color: #94a3b8;
  font-size: .87rem; font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
  position: relative;
}
.sidebar-link i {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .88rem;
  border-radius: 7px;
  background: rgba(255,255,255,.04);
  transition: background .15s ease, color .15s ease;
}
.sidebar-link:hover {
  background: rgba(99,102,241,.10);
  color: #e2e8f0;
}
.sidebar-link:hover i {
  background: rgba(99,102,241,.18);
  color: #c7d2fe;
}
/* Active: punchy gradient pill with shadow — same family as the market
   skin's active top-nav link, just rendered horizontally inside the
   sidebar column. */
.sidebar-link.active {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(99,102,241,.35);
}
.sidebar-link.active i {
  background: rgba(255,255,255,.20);
  color: #ffffff;
}
.sidebar-divider {
  border-color: rgba(255,255,255,.06);
  margin: .5rem .65rem;
}
.sidebar-section {
  padding: .85rem .85rem .25rem;
  font-size: .65rem; font-weight: 700; color: #64748b;
  letter-spacing: .12em; text-transform: uppercase;
}

/* Sidebar collapsibles (Services / Orders submenu in admin layout) */
button.sidebar-link.has-submenu {
  background: transparent; border: 0;
  width: 100%; text-align: left; cursor: pointer;
}
.sidebar-link.has-submenu .submenu-arrow {
  margin-left: auto; transition: transform .2s;
}
.sidebar-link.has-submenu[aria-expanded="true"] .submenu-arrow { transform: rotate(180deg); }
/* Submenu = row of compact pills, wraps onto a second line if the sidebar
   gets narrow. Pills inherit the link colour scheme so "active" still reads. */
.sidebar-submenu {
  display: flex; flex-wrap: wrap;
  gap: .3rem;
  padding: .15rem 1rem .6rem 3rem;
}
.sidebar-submenu a {
  padding: .2rem .6rem;
  color: #94a3b8; font-size: .75rem; font-weight: 500;
  text-decoration: none; border-radius: 999px;
  background: rgba(255,255,255,.04);
}
.sidebar-submenu a:hover  { background: rgba(255, 255, 255, .1); color: #e2e8f0; }
.sidebar-submenu a.active {
  background: #818cf8;
  color: #1e1b4b !important;
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(129, 140, 248, .3);
}

/* Panel main */
.panel-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.panel-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: .875rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background-color .2s, border-color .2s;
}
.panel-header-title { font-weight: 700; font-size: 1rem; flex: 1; color: var(--text); }
.panel-header-right { display: flex; align-items: center; gap: .75rem; }
.panel-content { padding: 1.5rem; flex: 1; }
.sidebar-toggle { background: none; border: none; font-size: 1.1rem; color: var(--text-muted); cursor: pointer; }

/* ---------- Dashboard Stat Cards ---------- */
/* 1.0.424: Dashboard stat-card chrome refresh — same family as the
   landing's bento cards. Gradient halo on hover, icon tile gets a soft
   accent wash, value gets a tighter letter-spacing for typographic
   weight. Modifier classes (.stat-card-primary/info/success/warning/
   danger) repaint the icon-tile + accent strip on top.
   Uses CSS-only overrides — markup in dashboard.php unchanged. */
.stat-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.2rem 1.35rem;
  display: flex; align-items: center; gap: 1rem;
  transition: box-shadow .25s, transform .25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color .25s;
  isolation: isolate;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, transparent 30%, rgba(99,102,241,0.20) 60%, transparent 80%);
  opacity: 0;
  z-index: -1;
  transition: opacity .25s ease;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .08), 0 0 0 1px rgba(99,102,241,.10);
  border-color: rgba(99,102,241,.20);
}
.stat-card:hover::before { opacity: 1; }

.stat-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  background: rgba(99,102,241,.10);
  color: var(--primary, #6366f1);
}
.stat-card-body { flex: 1 1 auto; min-width: 0; }
.stat-card-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.025em;
  color: var(--text);
  line-height: 1.1;
}
.stat-card-label {
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}
.stat-card-sub { margin-top: 4px; }
.stat-card-link {
  position: absolute;
  bottom: .65rem; right: 1rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--primary, #4338ca);
  text-decoration: none;
  letter-spacing: .03em;
  display: inline-flex; align-items: center; gap: .25rem;
  opacity: .85;
  transition: gap .15s ease, opacity .15s ease;
}
.stat-card-link:hover { gap: .5rem; opacity: 1; color: var(--primary); }
[data-theme="dark"] .stat-card-link { color: #a5b4fc; }

/* Modifier accents — primary/info/success/warning/danger */
.stat-card-primary .stat-card-icon { background: rgba(99,102,241,.10);  color: #4338ca; }
.stat-card-info    .stat-card-icon { background: rgba(14,165,233,.10);  color: #0284c7; }
.stat-card-success .stat-card-icon { background: rgba(16,185,129,.10);  color: #059669; }
.stat-card-warning .stat-card-icon { background: rgba(245,158,11,.10);  color: #d97706; }
.stat-card-danger  .stat-card-icon { background: rgba(220,38,38,.10);   color: #dc2626; }

[data-theme="dark"] .stat-card-primary .stat-card-icon { color: #a5b4fc; background: rgba(99,102,241,.18); }
[data-theme="dark"] .stat-card-info    .stat-card-icon { color: #38bdf8; background: rgba(14,165,233,.16); }
[data-theme="dark"] .stat-card-success .stat-card-icon { color: #34d399; background: rgba(16,185,129,.16); }
[data-theme="dark"] .stat-card-warning .stat-card-icon { color: #fbbf24; background: rgba(245,158,11,.16); }
[data-theme="dark"] .stat-card-danger  .stat-card-icon { color: #fca5a5; background: rgba(220,38,38,.16); }
.stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-icon.blue   { background: #dbeafe; color: #2563eb; }
.stat-icon.green  { background: #dcfce7; color: #16a34a; }
.stat-icon.orange { background: #ffedd5; color: #ea580c; }
.stat-icon.red    { background: #fee2e2; color: #dc2626; }
.stat-icon.cyan   { background: #cffafe; color: #0891b2; }
.stat-label { font-size: .8rem; color: var(--text-muted); margin-bottom: .2rem; }
.stat-value { font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.stat-change { font-size: .75rem; color: #16a34a; margin-top: .15rem; }
.stat-change.neg { color: #dc2626; }

/* ---------- Cards ---------- */
.card { border-radius: 12px !important; background-color: var(--surface); border-color: var(--border); color: var(--text); transition: background-color .2s, border-color .2s, color .2s; }
.card-header { background: var(--surface) !important; border-bottom: 1px solid var(--border) !important; padding: .875rem 1.25rem !important; color: var(--text); }

/* ---------- Tables ---------- */
.table { --bs-table-bg: transparent; color: var(--text); }
.table th { font-size: .78rem; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); border-bottom-color: var(--border); }
.table td { font-size: .875rem; vertical-align: middle; border-bottom-color: var(--border); }
.table tbody tr { border-bottom: 1px solid var(--border); transition: background-color .15s ease; }
.table tbody tr:hover,
.table-hover tbody tr:hover { background: var(--surface-alt); color: var(--text); }

/* ---------- Badges ---------- */
.badge { font-weight: 600; font-size: .72rem; }
.bg-indigo-soft { background: #ede9fe !important; }
.text-indigo { color: #6366f1 !important; }
.btn-xs { font-size: .72rem; padding: .2rem .5rem; }

/* ---------- Payment Method Cards ---------- */
.payment-method-card {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  text-align: center;
  position: relative;
}
.payment-method-card:hover { border-color: var(--primary); background: var(--surface-alt); }
.payment-method-card.selected { border-color: var(--primary); background: #ede9fe; }
.payment-method-card .check {
  position: absolute; top: -8px; right: -8px;
  width: 22px; height: 22px; border-radius: 50%;
  background: #6366f1; color: #fff;
  display: none; align-items: center; justify-content: center;
  font-size: .65rem;
}
.payment-method-card.selected .check { display: flex; }
.payment-icon { font-size: 1.75rem; margin-bottom: .5rem; }
.payment-name { font-size: .85rem; font-weight: 600; color: var(--text); }

/* ---------- User avatar (dashboard list rows) ---------- */
.user-avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface-alt);
  color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .82rem;
  flex: 0 0 32px;
}
.quick-amount {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .4rem .9rem;
  cursor: pointer;
  font-size: .85rem; font-weight: 600;
  transition: all .2s;
  background: var(--surface);
  color: var(--text);
}
.quick-amount:hover { border-color: var(--primary); color: var(--primary); background: var(--surface-alt); }

/* ---------- Tickets ---------- */
.ticket-item {
  padding: .875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 1rem;
  transition: background .15s;
}
.ticket-item:hover { background: var(--surface-alt); }
.ticket-item:last-child { border-bottom: none; }

/* ---------- Misc ---------- */
.cursor-pointer { cursor: pointer; }
.copy-btn { cursor: pointer; }
code { background: var(--surface-alt); padding: .15rem .4rem; border-radius: 4px; font-size: .85rem; color: var(--primary); }

/* ---------- Theme Toggle Button ---------- */
.theme-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: .25rem .55rem;
  border-radius: 8px;
  font-size: .85rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--surface-alt); color: var(--text); }
.theme-toggle i { pointer-events: none; }
/* Topbar variant — sits on brand-dark topbar, not on surface */
.topbar .theme-toggle { border-color: rgba(255,255,255,.15); color: #94a3b8; }
.topbar .theme-toggle:hover { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.25); }

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    transform: translateX(-100%);
  }
  /* 1.0.183: switched the overlay from a fake `box-shadow: 0 0 0 9999px` (not
     clickable, can't dismiss the sidebar) to a real `.sidebar-backdrop`
     element managed from app.js. */
  .sidebar.show { transform: translateX(0); }
  .panel-wrapper { flex-direction: column; }
  .hero { padding: 60px 0; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
}

.sidebar-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .5);
  z-index: 99;                 /* sidebar itself is z-index:100 */
  opacity: 0;
  transition: opacity .2s ease;
  display: none;
}
.sidebar-backdrop.show { display: block; opacity: 1; }
@media (min-width: 992px) {
  .sidebar-backdrop { display: none !important; }
}

/* 1.0.182: mobile-only tightening for public pages.
   - Topbar phone/email get hidden on <sm so the right-side controls fit.
   - Hero/Section/CTA shrink so they don't overflow 360–414px viewports.
   - Auth-card padding is reduced so input width stays usable on 360px.
   - Register stepper rows wrap and shrink instead of overflowing the card. */
@media (max-width: 575.98px) {
  .topbar { font-size: .72rem; }
  .topbar > .container-fluid > .d-flex { flex-wrap: wrap; gap: .35rem; }
  .topbar-left { display: none; }
  .topbar-right { width: 100%; justify-content: flex-end; }

  .hero { padding: 50px 0 40px; }
  .hero-title, .hero h1 { font-size: 2rem; line-height: 1.2; }
  .hero-subtitle, .hero .lead { font-size: 1rem; }
  .hero-stats { gap: 1.25rem; }
  .hero-stat-num, .hero .stat-num { font-size: 1.35rem; }

  .section-title { font-size: 1.35rem; }
  .section-subtitle { font-size: .9rem; }
  .py-6 { padding-top: 2.5rem; padding-bottom: 2.5rem; }

  .feature-card { padding: 1.25rem; }
  .feature-icon { width: 44px; height: 44px; font-size: 1.1rem; }

  .cta-section { padding: 1.75rem 1.25rem; border-radius: 14px; }
  .cta-card    { padding: 1.5rem 1.25rem; }
  .partnership-card { padding: 1.5rem 1.25rem; }

  .auth-page { padding: 1rem; }
  .auth-card { padding: 1.5rem 1.25rem; border-radius: 14px; }
  .auth-card-wide { padding: 1.5rem 1.25rem; }

  /* Register stepper — fits on narrow screens by wrapping and shrinking the
     dots/lines. Without this, 4 steps × 80px + 3 lines × 48px = 464px and
     the indicator overflows the auth-card on any phone. */
  .step-indicators { flex-wrap: wrap; gap: .35rem; row-gap: .5rem; }
  .step-item { min-width: auto; flex: 0 0 auto; padding: 0 .25rem; }
  .step-item .step-num { width: 26px; height: 26px; font-size: .72rem; }
  .step-item .step-label { font-size: .65rem; }
  .step-line { flex: 1 1 12px; min-width: 12px; margin-bottom: .9rem; }

  .page-banner { padding: 1.5rem 0; }
  .page-banner-title { font-size: 1.4rem; }
  .page-banner-sub { font-size: .9rem; }
}

/* ---------- Landing section spacing ---------- */
/* Bootstrap 5 ships utilities up to py-5 (3rem). The landing uses py-6 for
   taller hero-adjacent sections — define it here. */
.py-6 { padding-top: 4rem; padding-bottom: 4rem; }

/* ---------- Register stepper (matches markup + JS in register.php) ---------- */
.step-indicators { display: flex; justify-content: center; align-items: flex-start; gap: 0; margin-bottom: 2rem; }
.step-item {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 .5rem; min-width: 80px;
}
.step-item .step-num {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
  transition: all .2s;
}
.step-item.active .step-num { border-color: var(--primary); color: var(--primary); background: #ede9fe; }
.step-item.done   .step-num { border-color: var(--primary); background: var(--primary); color: #fff; }
.step-item.active .step-label { color: var(--primary); font-weight: 600; }
.step-item.done   .step-label { color: var(--primary); }
.step-line {
  flex: 0 0 48px; height: 2px; background: var(--border);
  align-self: center; margin: 0 .25rem; margin-bottom: 1.1rem;
  transition: background-color .2s;
}
.step-line.done { background: var(--primary); }

/* ---------- Role badge in top-bar ---------- */
.role-badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  vertical-align: middle;
}
.role-badge-user     { background: rgba(100,116,139,.15); color: #64748b; }
.role-badge-reseller { background: rgba(249,115,22,.15); color: #ea580c; }

/* ---------- Partnership tiers (home page bottom) ---------- */
.section-partnership { background: #f8fafc; }
.partnership-card {
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  height: 100%;
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.partnership-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.partnership-card.featured {
  border-color: var(--primary, #6366f1);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
  position: relative;
}
.partnership-card.featured::before {
  content: "★";
  position: absolute;
  top: -14px;
  right: 20px;
  background: var(--primary, #6366f1);
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}
.partnership-name {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary, #6366f1);
  margin-bottom: 0.25rem;
}
.partnership-for {
  font-style: italic;
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px dashed var(--border, #e2e8f0);
}
.partnership-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.partnership-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.75rem;
  color: #334155;
  line-height: 1.45;
  font-size: 0.94rem;
}
.partnership-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--primary, #6366f1);
  font-weight: 700;
}

/* ---------- Info rows (label/value pairs in cards) ----------
   Used by /client/profile Account Info card and any future "Key: Value"
   layout. 1.0.191: previously the class was referenced in the markup but
   never defined here, so the two <span>s collapsed against each other —
   "Member since20 Apr 2026", "RoleUser", etc. */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
}
.info-row:last-child { border-bottom: none; }
.info-row > span:first-child { color: var(--text-muted); }

/* ---------- imba.ink watermark (admin + client panels) ---------- */
.imba-watermark {
  position: fixed;
  bottom: 8px;
  right: 12px;
  font-size: 11px;
  z-index: 1;
  user-select: none;
  pointer-events: none;
}
.imba-watermark a {
  color: rgba(0, 0, 0, 0.15);
  text-decoration: none;
  pointer-events: auto;
  transition: color .15s;
}
.imba-watermark a:hover {
  color: rgba(0, 0, 0, 0.35);
}

/* ============================================================
   Light-theme overrides for landing surfaces (topbar / hero /
   footer / pricing thead). Defaults stay dark so existing dark-
   theme users see no change. When user toggles to [data-theme="light"]
   these blocks repaint to match the light palette.
   ============================================================ */

/* Topbar */
[data-theme="light"] .topbar {
  background: #f1f5f9;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}
[data-theme="light"] .topbar a,
[data-theme="light"] .topbar-link { color: #475569; }
[data-theme="light"] .topbar a:hover,
[data-theme="light"] .topbar-link:hover { color: #0f172a; }

/* Hero */
[data-theme="light"] .hero {
  background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #c7d2fe 100%);
}
[data-theme="light"] .hero::before {
  background: radial-gradient(circle, rgba(99,102,241,.18) 0%, transparent 70%);
}
[data-theme="light"] .hero::after {
  background: radial-gradient(circle, rgba(139,92,246,.12) 0%, transparent 70%);
}
[data-theme="light"] .hero,
[data-theme="light"] .hero * { color: #1e1b4b; }
[data-theme="light"] .hero h1,
[data-theme="light"] .hero .hero-title { color: #1e1b4b; }
/* hero-accent gradient already works on light bg, keep as-is */
[data-theme="light"] .hero .hero-subtitle,
[data-theme="light"] .hero .lead { color: #475569; }
[data-theme="light"] .hero-badge {
  background: rgba(99,102,241,.12);
  border-color: rgba(99,102,241,.35);
  color: #4338ca;
}
[data-theme="light"] .hero-stat-num,
[data-theme="light"] .hero .stat-num { color: #1e1b4b; }
[data-theme="light"] .hero-stat-label,
[data-theme="light"] .hero .stat-label { color: #6366f1; }
[data-theme="light"] .hero-illustration { color: rgba(99,102,241,.18); }
[data-theme="light"] .btn-hero-primary {
  background: #6366f1; color: #fff; border-color: #6366f1;
}
[data-theme="light"] .btn-hero-primary:hover,
[data-theme="light"] .btn-hero-primary:focus {
  background: #4f46e5; color: #fff; border-color: #4f46e5;
}
[data-theme="light"] .btn-hero-outline {
  color: #4338ca; border-color: rgba(99,102,241,.5); background: transparent;
}
[data-theme="light"] .btn-hero-outline:hover,
[data-theme="light"] .btn-hero-outline:focus {
  background: rgba(99,102,241,.1); color: #4338ca; border-color: #6366f1;
}
[data-theme="light"] .hero-card {
  background: rgba(255,255,255,.6);
  border-color: rgba(99,102,241,.2);
}
[data-theme="light"] .hero-card h5 { color: #1e1b4b; }
[data-theme="light"] .hero-card .table { color: #334155; }
[data-theme="light"] .hero-card .table thead th { color: #64748b; border-color: rgba(99,102,241,.15); }
[data-theme="light"] .hero-card .table td { border-color: rgba(99,102,241,.1); }

/* Footer */
[data-theme="light"] .footer {
  background: #f1f5f9;
  color: #475569;
  border-top: 1px solid #e2e8f0;
}
[data-theme="light"] .footer-brand,
[data-theme="light"] .footer h5 { color: #0f172a; }
[data-theme="light"] .footer h6 { color: #1e293b; }
[data-theme="light"] .footer a { color: #475569; }
[data-theme="light"] .footer a:hover { color: #4f46e5; }
[data-theme="light"] .text-footer-muted { color: #64748b !important; }
[data-theme="light"] .footer-divider { border-color: #e2e8f0; }
[data-theme="light"] .footer-bottom { color: #64748b; }
[data-theme="light"] .social-link { background: #e2e8f0; color: #475569; }
[data-theme="light"] .social-link:hover { background: #6366f1; color: #fff !important; }

/* Pricing / popular-services tables — Bootstrap's .table-dark thead reads
   "this is a dark-themed header" but on a light page it clashes. Repaint to
   a light header that matches body surface. */
[data-theme="light"] .table-dark,
[data-theme="light"] .table-dark > th,
[data-theme="light"] .table-dark > td,
[data-theme="light"] thead.table-dark th {
  --bs-table-bg: var(--surface-alt);
  --bs-table-color: var(--text);
  --bs-table-border-color: var(--border);
  background-color: var(--surface-alt) !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

/* Sidebar — light theme overrides (admin + client share .sidebar; admin
   layout also has .admin-sidebar but we don't need to differentiate). The
   defaults above keep the dark "brand" sidebar; on [data-theme="light"]
   we repaint surface, borders, link colors and submenu pills to match the
   light palette so admin/client cabinets look consistent. */
[data-theme="light"] .sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
}
[data-theme="light"] .sidebar-brand,
[data-theme="light"] .sidebar-user { border-bottom-color: var(--border); }
[data-theme="light"] .sidebar .text-muted,
[data-theme="light"] .sidebar small,
[data-theme="light"] .sidebar .small { color: var(--text-muted) !important; }
[data-theme="light"] .sidebar-username { color: var(--text); }
/* Keep .sidebar-balance green — it reads on both themes */
[data-theme="light"] .sidebar-user {
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(168,85,247,.04));
  border-color: rgba(99,102,241,.10);
}
[data-theme="light"] .sidebar-link {
  color: #475569;
}
[data-theme="light"] .sidebar-link i {
  background: rgba(99,102,241,.06);
  color: #6366f1;
}
[data-theme="light"] .sidebar-link:hover {
  background: rgba(99, 102, 241, .08);
  color: #4338ca;
}
[data-theme="light"] .sidebar-link:hover i {
  background: rgba(99,102,241,.14);
  color: #4338ca;
}
[data-theme="light"] .sidebar-link.active {
  background: linear-gradient(135deg, var(--primary), #818cf8);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(99, 102, 241, .35);
}
[data-theme="light"] .sidebar-link.active i {
  background: rgba(255,255,255,.25);
  color: #ffffff;
}
[data-theme="light"] .sidebar-divider { border-color: var(--border); }
[data-theme="light"] .sidebar-section { color: var(--text-muted); }
[data-theme="light"] .sidebar-submenu a {
  color: var(--text-muted);
  background: var(--surface-alt);
}
[data-theme="light"] .sidebar-submenu a:hover {
  background: #e2e8f0;
  color: var(--text);
}
[data-theme="light"] .sidebar-submenu a.active {
  background: var(--primary);
  color: #ffffff !important;
  font-weight: 600;
  box-shadow: 0 1px 6px rgba(99, 102, 241, .35);
}

/* ─── Sub-tab pills (1.0.296+) ──────────────────────────────────────────────
   Bootstrap defaults for `.nav-pills .nav-link.active` use --bs-primary
   (= --primary, indigo #6366f1) on the active pill background. On dark
   theme the indigo blends with #151b2e card surface; on light theme it
   reads fine but the inactive pills are too muted to look related. We
   override both states with a brighter dark-theme palette + softer
   inactive style so the active sub-tab always pops against either
   background. Scoped to [data-subtabs] (used in /admincp/settings).
   ────────────────────────────────────────────────────────────────────── */
[data-subtabs] {
  gap: .375rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  padding-bottom: .25rem;
  margin-bottom: 1rem !important;
}
/* All `color:` declarations here use !important because line 181 declares
   `.nav-link { color: var(--text-muted) !important }` and line 182 declares
   `.nav-link:hover, .nav-link.active { color: var(--primary) !important }`
   for the legacy in-page nav-link styling. Without !important on our sub-tab
   rules, the active pill rendered as indigo text on indigo background
   (invisible) and the inactive pills rendered as slate-500 (low contrast).
   Specificity alone can't beat !important — fight fire with fire. */
[data-subtabs] .nav-link {
  color: #475569 !important;
  background-color: transparent;
  border: 1px solid transparent;
  font-weight: 500;
  padding: .45rem .9rem;
  border-radius: .5rem;
  transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}
[data-subtabs] .nav-link:hover {
  color: #4338ca !important;
  background-color: rgba(99, 102, 241, 0.10);
}

/* Light theme — saturated indigo bg + WHITE text on white card. */
[data-subtabs] .nav-link.active,
[data-theme="light"] [data-subtabs] .nav-link.active {
  color: #fff !important;
  background-color: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* Dark theme — brighter indigo bg + dark text for contrast against #151b2e
   card. Inactive text returns to muted slate-400 since dark surfaces
   already provide enough contrast. */
@media (prefers-color-scheme: dark) {
  [data-subtabs] .nav-link {
    color: var(--text-muted) !important;
  }
  [data-subtabs] .nav-link.active {
    color: #1e1b4b !important;
    background-color: #a5b4fc; /* indigo-300 */
    border-color: #a5b4fc;
    box-shadow: 0 2px 12px rgba(165, 180, 252, 0.45);
  }
  [data-subtabs] .nav-link:hover {
    color: #c7d2fe !important;
    background-color: rgba(165, 180, 252, 0.14);
  }
}
/* Explicit [data-theme="light"] overrides — beat the @media (prefers-color-scheme: dark)
   rule above when the user's OS is dark but they've manually toggled the panel
   to light. Without these, system-dark + manual-light gave slate-500 on white
   (4.86:1, "barely visible"). Specificity 0,3,1 vs media's 0,2,1. */
[data-theme="light"] [data-subtabs] .nav-link {
  color: #475569 !important;
}
[data-theme="light"] [data-subtabs] .nav-link:hover {
  color: #4338ca !important;
  background-color: rgba(99, 102, 241, 0.10);
}
[data-theme="dark"] [data-subtabs] .nav-link {
  color: var(--text-muted) !important;
}
[data-theme="dark"] [data-subtabs] .nav-link.active {
  color: #1e1b4b !important;
  background-color: #a5b4fc;
  border-color: #a5b4fc;
  box-shadow: 0 2px 12px rgba(165, 180, 252, 0.45);
}
[data-theme="dark"] [data-subtabs] .nav-link:hover {
  color: #c7d2fe !important;
  background-color: rgba(165, 180, 252, 0.14);
}

/* ─── Favorites star button (1.0.303) ───────────────────────────────────────
   Used in /client/services tables and /client/dashboard favorites widget.
   `is-fav` toggles the gold filled state; default = outline grey. */
.btn-fav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  padding: 0 .25rem;
  cursor: pointer;
  font-size: 1rem;
  color: #94a3b8;
  transition: color .15s ease, transform .15s ease;
  line-height: 1;
}
.btn-fav:hover {
  color: #fbbf24;
  transform: scale(1.15);
}
.btn-fav.is-fav {
  color: #fbbf24; /* amber-400 — classic gold star */
  filter: drop-shadow(0 1px 4px rgba(251, 191, 36, .35));
}
.btn-fav.is-fav:hover {
  color: #d97706; /* amber-600 on hover when already favorited (signals "click to remove") */
  transform: scale(1.15);
}
.btn-fav[data-busy="1"] {
  opacity: .5;
  pointer-events: none;
}

/* Favorites widget on /client/dashboard */
.favorites-widget .favorite-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .5rem;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.favorites-widget .favorite-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 14px rgba(99, 102, 241, .15);
  transform: translateY(-1px);
}
.favorites-widget .favorite-name {
  font-weight: 600;
  font-size: .9rem;
  line-height: 1.3;
  margin-bottom: .35rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.favorites-widget .favorite-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: .55rem;
}
.favorites-widget .favorite-actions {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-top: auto;
}
.favorites-widget .favorite-actions .btn-fav-move {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: .35rem;
  padding: .2rem .4rem;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .75rem;
  transition: all .15s ease;
}
.favorites-widget .favorite-actions .btn-fav-move:hover {
  background: var(--primary);
  color: #fff !important;
  border-color: var(--primary);
}
.favorites-widget .favorite-actions .btn-fav-move:disabled {
  opacity: .35;
  cursor: not-allowed;
}
.favorites-widget .favorite-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border);
  border-radius: .5rem;
}

/* ─── Language segmented switcher (1.0.305) ─────────────────────────────────
   Replaces the old dropdown in topbar (public_top.php) and navbar
   (client_top.php). All available languages shown side-by-side as pill
   buttons; active language highlighted in indigo. Theme-aware: dark/light
   surface backgrounds adapt for hover/inactive states. */
.lang-switcher {
  display: inline-flex;
  gap: 2px;
  background: rgba(0, 0, 0, 0.06);
  border-radius: .4rem;
  padding: 2px;
  vertical-align: middle;
}
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .25rem .55rem;
  border-radius: .3rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--text-muted);
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
  line-height: 1;
}
.lang-btn:hover {
  color: var(--primary);
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-1px);
}
.lang-btn.active {
  background: var(--primary);
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(99, 102, 241, 0.4);
}
.lang-btn.active:hover { transform: none; } /* don't lift the active one */
.lang-flag {
  font-size: .9rem;
  line-height: 1;
  filter: grayscale(.2);
}
.lang-btn.active .lang-flag,
.lang-btn:hover .lang-flag { filter: none; }

/* Topbar context (always dark navy) — invert hover/inactive contrast. */
.topbar .lang-switcher {
  background: rgba(255, 255, 255, 0.06);
}
.topbar .lang-btn { color: #94a3b8; }
.topbar .lang-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.10);
}
.topbar .lang-btn.active {
  background: var(--primary);
  color: #ffffff !important;
}

/* Dark theme (full-page) — same dark-bg behaviour as topbar. */
@media (prefers-color-scheme: dark) {
  .lang-switcher {
    background: rgba(255, 255, 255, 0.05);
  }
  .lang-btn:hover {
    color: #c7d2fe;
    background: rgba(255, 255, 255, 0.08);
  }
}
[data-theme="dark"] .lang-switcher {
  background: rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .lang-btn:hover {
  color: #c7d2fe;
  background: rgba(255, 255, 255, 0.08);
}

/* ─── Mobile defensive fixes (1.0.309) ─────────────────────────────────────
   Operator reported "/client/funds doesn't fit on mobile". Targeted
   defenses: (a) tighter padding on the content area at ≤sm so 360px
   phones get more usable width, (b) overflow guard on panel-content so
   nothing inside can push the page wider than the viewport, (c) word-
   break on long code blocks (Binance Pay IDs / order references) so
   they wrap instead of overflowing, (d) form-control min-width safety
   so input-groups don't blow past the column on narrow widths. */
@media (max-width: 575.98px) {
  .panel-content { padding: 1rem .85rem; }
  .panel-content .card-body { padding: 1rem; }
  /* Long balance strings on funds.php (e.g. "1 250 000 so'm") shouldn't
     overflow — wrap to next line if needed. */
  .balance-display .h3 { font-size: 1.6rem; word-break: break-word; }
  /* Big payment-method-card padding eats too much width on narrow
     phones — tighten to keep label + descriptor readable. */
  .payment-method-card { padding: .85rem .6rem; }
  .payment-method-card .fa-2x { font-size: 1.5rem; }
  .payment-method-card small { font-size: .7rem; }
  /* Funds page transaction history table — max-width on ref column was
     100px which was already sane; keep it but ensure date col stays one
     line so the table doesn't reflow weirdly. */
  .table > :not(caption) > * > td .badge { white-space: nowrap; }
}

/* Universal: panel-content should NEVER cause horizontal scroll. Anything
   inside that wants to overflow gets clipped to viewport, not pushed
   beyond it. Cards / forms / tables individually handle their own
   horizontal scroll via .table-responsive + similar wrappers. */
.panel-content { min-width: 0; }
.panel-content .col, .panel-content [class*="col-"] { min-width: 0; }
.panel-content > .row { margin-left: 0; margin-right: 0; }

/* Long inline codes (Binance Pay IDs, order refs, hashes) should always
   wrap on narrow widths instead of pushing the parent flex item wide.
   .text-break (Bootstrap) on the element gives word-wrap explicitly,
   but defaulting on every <code> inside cards is safer. */
.card code, .alert code { word-break: break-word; }

/* Input groups containing long placeholders / values shouldn't overflow
   on mobile. Bootstrap already handles this via flex shrink, but
   browsers occasionally bump min-content widths from the inner input. */
.input-group .form-control { min-width: 0; }

/* ─── Language switcher: collapsible disclosure mode (1.0.310) ───────────────
   `.is-collapsible` opt-in. Default state shows only the active pill + a
   chevron caret; clicking the active pill toggles `.is-expanded` (handled
   by app.js).
   1.0.405: inactive options now live in a `.lang-popup` wrapper that opens
   as a VERTICAL dropdown anchored under the active pill (was inline-flex
   horizontal). Keeps the topbar height stable on expand and reads as a
   normal dropdown. */
.lang-switcher.is-collapsible {
  position: relative;
}
.lang-switcher.is-collapsible .lang-btn.active {
  cursor: pointer;
}
.lang-caret {
  display: inline-block;
  margin-left: .35rem;
  font-size: .6rem;
  opacity: .75;
  transition: transform .2s ease;
  vertical-align: middle;
}
.lang-switcher.is-collapsible.is-expanded .lang-caret { transform: rotate(180deg); }

.lang-popup {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 100%;
  flex-direction: column;
  gap: 2px;
  padding: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: .4rem;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
  z-index: 1100;
}
.lang-switcher.is-collapsible.is-expanded .lang-popup {
  display: flex;
  animation: lang-popup-in .15s ease both;
}
.lang-popup .lang-btn {
  justify-content: flex-start;
  width: 100%;
  white-space: nowrap;
}
@keyframes lang-popup-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: none; }
}

/* On dark surfaces (topbar / dark theme) the popup picks up a dark surface
   so it doesn't flash white over the navy chrome. */
.topbar .lang-popup,
[data-theme="dark"] .lang-popup {
  background: #1e2538;
  border-color: rgba(255, 255, 255, 0.08);
}
.topbar .lang-popup .lang-btn { color: #cbd5e1; }
.topbar .lang-popup .lang-btn:hover { color: #fff; background: rgba(255,255,255,.10); }

/* ============================================================ */
/* 1.0.401 — Client UI skin: "market" (Marketplace Grid)        */
/* ============================================================ */
/* All rules scoped under [data-skin="market"] so the default   */
/* skin is untouched. Toggle is in the client top-bar; cookie   */
/* tezunlock_skin = default | market.                            */

/* Hide sidebar, sidebar-toggle button, and the default panel-  */
/* header title — market gets a horizontal nav inside the       */
/* header instead. Default skin keeps everything as before.     */
[data-skin="market"] .sidebar,
[data-skin="market"] .panel-header > .sidebar-toggle,
[data-skin="market"] .panel-header > .panel-header-title { display: none !important; }

[data-skin="market"] .panel-main { margin-left: 0 !important; }

/* Default skin: hide market top-nav (always rendered for       */
/* simplicity; CSS toggles visibility per skin).                */
.market-topnav { display: none; }

[data-skin="market"] .market-topnav {
  display: flex;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
  flex: 1 1 auto;
  min-width: 0;
}

[data-skin="market"] .market-brand {
  display: inline-flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .01em;
  color: var(--text);
  text-decoration: none;
  margin-right: 1rem;
  padding: .35rem .25rem;
  white-space: nowrap;
}
[data-skin="market"] .market-brand img { max-height: 36px; max-width: 180px; }
[data-skin="market"] .market-brand span {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-skin="market"] .market-link {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .5rem .85rem;
  font-size: .9rem; font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all .15s ease;
  white-space: nowrap;
}
[data-skin="market"] .market-link:hover {
  background: rgba(99,102,241,.08);
  color: var(--text);
  border-color: rgba(99,102,241,.20);
}
[data-skin="market"] .market-link.active {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(99,102,241,.30);
}
[data-skin="market"] .market-link i {
  font-size: .92rem;
  width: 1.1em; text-align: center;
}

/* 1.0.407: Logout pill — danger-tinted, soft left divider so it visually
   separates from the regular nav links without leaving the same row. */
[data-skin="market"] .market-link-logout {
  margin-left: .35rem;
  color: #dc2626;
  border-left: 1px solid var(--border);
  border-radius: 0 999px 999px 0;
  padding-left: 1rem;
}
[data-skin="market"] .market-link-logout:hover {
  background: rgba(220, 38, 38, .10);
  color: #b91c1c;
  border-color: rgba(220, 38, 38, .25);
}
[data-theme="dark"][data-skin="market"] .market-link-logout {
  color: #f87171;
}
[data-theme="dark"][data-skin="market"] .market-link-logout:hover {
  background: rgba(248, 113, 113, .12);
  color: #fca5a5;
}

/* The panel-header is now a horizontal nav bar — give it more  */
/* breathing room and a soft shadow / border underneath.        */
[data-skin="market"] .panel-header {
  padding: .65rem 1.25rem;
  gap: 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
[data-skin="market"] .panel-header-right {
  flex-shrink: 0;
}

/* Panel content gets more horizontal padding and a wider max   */
/* (matches Apple Store / marketplace feel).                    */
[data-skin="market"] .panel-content {
  padding: 1.5rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Group header above each market grid row */
[data-skin="market"] .market-group-header {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin: 1.5rem 0 1rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  color: #fff;
  font-weight: 700;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(99,102,241,.20);
  position: relative;
}
[data-skin="market"] .market-group-header:first-child { margin-top: 0; }
[data-skin="market"] .market-group-icon {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.20);
  border-radius: 8px;
  font-size: 1.05rem;
}
[data-skin="market"] .market-group-name {
  flex: 1 1 auto;
  font-size: 1.1rem;
  text-shadow: 0 1px 0 rgba(0,0,0,.10);
  word-break: break-word;
}
[data-skin="market"] .market-group-count {
  font-size: .8rem;
  font-weight: 600;
  background: rgba(255,255,255,.22);
  color: #fff;
  padding: .3rem .7rem;
  border-radius: 999px;
  white-space: nowrap;
}
[data-theme="dark"][data-skin="market"] .market-group-header {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
}

/* The card grid */
[data-skin="market"] .market-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}
@media (max-width: 991.98px) {
  [data-skin="market"] .market-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 575.98px) {
  [data-skin="market"] .market-grid { grid-template-columns: 1fr; gap: 1rem; }
  [data-skin="market"] .panel-content { padding: 1rem; }
  [data-skin="market"] .market-group-header { padding: .8rem 1rem; }
  [data-skin="market"] .market-group-name { font-size: 1rem; }
}

/* The card itself */
[data-skin="market"] .market-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.1rem 1.15rem 1rem;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
[data-skin="market"] .market-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1 0%, #818cf8 50%, #a78bfa 100%);
  opacity: 0;
  transition: opacity .18s ease;
}
[data-skin="market"] .market-card:hover {
  transform: translateY(-3px);
  border-color: #818cf8;
  box-shadow: 0 14px 28px rgba(99,102,241,.16);
}
[data-skin="market"] .market-card:hover::before { opacity: 1; }

[data-skin="market"] .market-card-fav {
  position: absolute;
  top: .65rem; right: .65rem;
  z-index: 2;
}

[data-skin="market"] .market-card-type {
  margin-bottom: .55rem;
  font-size: .72rem;
}
[data-skin="market"] .market-card-name {
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 .4rem;
  color: var(--text);
  padding-right: 2rem; /* room for fav star */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
[data-skin="market"] .market-card-desc {
  font-size: .82rem;
  color: var(--text-muted);
  line-height: 1.45;
  margin: 0 0 .8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1 1 auto;
}
[data-skin="market"] .market-card-meta {
  display: flex; align-items: center; gap: .8rem;
  margin-bottom: .85rem;
  font-size: .8rem;
  color: var(--text-muted);
}
[data-skin="market"] .market-card-time i { margin-right: .3rem; opacity: .8; }
[data-skin="market"] .market-card-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: .75rem;
  padding-top: .65rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
[data-skin="market"] .market-card-price {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
[data-skin="market"] .market-card-order {
  white-space: nowrap;
  font-weight: 600;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  border: none;
  box-shadow: 0 4px 10px rgba(99,102,241,.20);
}
[data-skin="market"] .market-card-order:hover {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  box-shadow: 0 6px 14px rgba(99,102,241,.30);
}

/* Search-row + group-dropdown spacing in market skin — extra   */
/* breathing room above the first group header.                 */
[data-skin="market"] .panel-content > .card.border-0 + div,
[data-skin="market"] .panel-content > .card:first-child {
  margin-bottom: 1rem;
}

/* Tables on Orders/Funds/Profile pages also benefit from the   */
/* roomier padding under market skin, but keep their structure. */
[data-skin="market"] .panel-content > .card {
  border-radius: 14px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,.03);
}
[data-skin="market"] .panel-content > .card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,.05);
}

/* ============================================================ */
/* 1.0.410 — Public navbar redesign (glassmorphism + pill style) */
/* ============================================================ */
/* Applies to ALL public pages (/, /pricing, /contact, /login,  */
/* /register, /p/<slug>). Not scoped to .tu-landing.            */

.tu-public-topbar {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.tu-public-nav {
  position: sticky;
  top: 0;
  z-index: 1040;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.tu-public-nav.is-scrolled {
  background: rgba(255, 255, 255, 0.85);
  border-bottom-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
}
[data-theme="dark"] .tu-public-nav {
  background: rgba(12, 18, 32, 0.65);
}
[data-theme="dark"] .tu-public-nav.is-scrolled {
  background: rgba(12, 18, 32, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.40);
}

.tu-public-nav-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem 0;
  min-height: 72px;
}

.tu-public-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.tu-public-brand img {
  max-height: 44px;
  max-width: 220px;
  width: auto;
  height: auto;
}
.tu-public-brand-text {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.tu-public-nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex: 1 1 auto;
  margin-left: 1.5rem;
}
@media (max-width: 991.98px) {
  .tu-public-nav-links { display: none; }
}

.tu-pnav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 1rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  border-radius: 999px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tu-pnav-link:hover {
  background: rgba(99, 102, 241, 0.08);
  color: #4338ca;
}
.tu-pnav-link.is-active {
  background: rgba(99, 102, 241, 0.10);
  color: #4338ca;
}
[data-theme="dark"] .tu-pnav-link { color: #94a3b8; }
[data-theme="dark"] .tu-pnav-link:hover,
[data-theme="dark"] .tu-pnav-link.is-active {
  background: rgba(129, 140, 248, 0.14);
  color: #c7d2fe;
}

.tu-pnav-dropdown {
  position: relative;
}
.tu-pnav-menu {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
  padding: 0.4rem;
  margin-top: 0.5rem !important;
  min-width: 200px;
}
.tu-pnav-menu .dropdown-item {
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.55rem 0.85rem;
  color: var(--text);
}
.tu-pnav-menu .dropdown-item:hover,
.tu-pnav-menu .dropdown-item:focus {
  background: rgba(99, 102, 241, 0.08);
  color: #4338ca;
}
[data-theme="dark"] .tu-pnav-menu {
  background: #151b2e;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.50);
}
[data-theme="dark"] .tu-pnav-menu .dropdown-item:hover {
  background: rgba(129, 140, 248, 0.14);
  color: #c7d2fe;
}

.tu-public-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
@media (max-width: 991.98px) {
  .tu-public-nav-actions { display: none; }
}

.tu-pnav-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #475569;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: transparent;
  transition: all 0.15s ease;
}
.tu-pnav-ghost:hover {
  border-color: rgba(99, 102, 241, 0.30);
  color: #4338ca;
  background: rgba(99, 102, 241, 0.04);
}
[data-theme="dark"] .tu-pnav-ghost { color: #cbd5e1; border-color: rgba(255, 255, 255, 0.10); }
[data-theme="dark"] .tu-pnav-ghost:hover { color: #c7d2fe; border-color: rgba(129, 140, 248, 0.40); }

.tu-pnav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff !important;
  text-decoration: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.30),
              inset 0 1px 0 rgba(255, 255, 255, 0.20);
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.18s ease;
}
.tu-pnav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(99, 102, 241, 0.42),
              inset 0 1px 0 rgba(255, 255, 255, 0.20);
  color: #fff !important;
}
.tu-pnav-cta i { transition: transform 0.18s; }
.tu-pnav-cta:hover i { transform: translateX(2px); }

/* Mobile burger button */
.tu-pnav-burger {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(15, 23, 42, 0.10);
  background: transparent;
  border-radius: 10px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.tu-pnav-burger span {
  display: block;
  width: 18px;
  height: 2px;
  background: #475569;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
[data-theme="dark"] .tu-pnav-burger { border-color: rgba(255, 255, 255, 0.10); }
[data-theme="dark"] .tu-pnav-burger span { background: #cbd5e1; }
.tu-pnav-burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.tu-pnav-burger.is-open span:nth-child(2) { opacity: 0; }
.tu-pnav-burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
@media (max-width: 991.98px) { .tu-pnav-burger { display: inline-flex; } }

/* Mobile fullscreen overlay menu */
.tu-pnav-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding-top: 90px;
  animation: tu-overlay-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-theme="dark"] .tu-pnav-overlay { background: rgba(6, 8, 15, 0.96); }
@keyframes tu-overlay-in { from { opacity: 0; } to { opacity: 1; } }

.tu-pnav-overlay-inner {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: 100%;
  max-width: 380px;
  padding: 1.5rem 1rem 2rem;
}
.tu-pnav-overlay-link {
  display: block;
  padding: 1rem 1.2rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.tu-pnav-overlay-link:hover {
  background: rgba(99, 102, 241, 0.10);
  color: #4338ca;
}
[data-theme="dark"] .tu-pnav-overlay-link {
  background: rgba(129, 140, 248, 0.06);
  border-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .tu-pnav-overlay-link:hover { background: rgba(129, 140, 248, 0.16); color: #c7d2fe; }

.tu-pnav-overlay-section {
  margin-top: 0.85rem;
  padding: 0 1.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
}
.tu-pnav-overlay-sub {
  display: block;
  padding: 0.7rem 1.2rem 0.7rem 1.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: 10px;
}
.tu-pnav-overlay-sub:hover { background: rgba(99, 102, 241, 0.06); color: #4338ca; }

.tu-pnav-overlay-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 1.2rem;
  padding: 0 0.4rem;
}
.tu-pnav-overlay-actions .tu-pnav-cta,
.tu-pnav-overlay-actions .tu-pnav-ghost {
  width: 100%;
  justify-content: center;
  padding: 0.85rem 1.2rem;
  font-size: 1rem;
}

/* ============================================================ */
/* 1.0.411 — /client/funds — Stripe-style checkout              */
/* ============================================================ */
/* Single-screen layout: amount + payment radios + summary +   */
/* one big CTA. Theme-aware. Works on both default + market    */
/* skins. Server-side gates ensure UZS-mode never sees Binance */
/* and USD-mode never sees Payme/Click.                        */

.tu-funds-balance {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem .85rem;
  padding: .85rem 1rem;
  background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(168,85,247,.04));
  border: 1px solid rgba(99,102,241,.12);
  border-radius: 14px;
}
.tu-funds-balance-label {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.tu-funds-balance-value {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--primary);
}
.tu-funds-balance-value.is-debt { color: #dc2626; }
.tu-funds-balance-od {
  font-size: .8rem;
  color: var(--text-muted);
}
[data-theme="dark"] .tu-funds-balance {
  background: linear-gradient(135deg, rgba(99,102,241,.14), rgba(168,85,247,.06));
  border-color: rgba(99,102,241,.20);
}

.tu-checkout-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15,23,42,.04);
}
[data-theme="dark"] .tu-checkout-card {
  background: #151b2e;
  border-color: rgba(255,255,255,.06);
  box-shadow: 0 4px 14px rgba(0,0,0,.40);
}
.tu-checkout-section {
  padding: 1.25rem 1.4rem;
}
.tu-checkout-section + .tu-checkout-section {
  border-top: 1px solid var(--border);
}
[data-theme="dark"] .tu-checkout-section + .tu-checkout-section {
  border-top-color: rgba(255,255,255,.05);
}
.tu-checkout-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .85rem;
}

/* ─── Amount block ─────────────────────────────────────────── */
.tu-amount-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.tu-amount-input {
  display: inline-flex;
  align-items: baseline;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--text);
  line-height: 1;
}
.tu-amount-currency {
  font-size: 2.4rem;
  margin-right: .25rem;
  color: var(--text);
}
.tu-amount-field {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -.04em;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  width: 6ch;
  min-width: 4ch;
  padding: 0;
  font-family: inherit;
}
.tu-amount-field.is-invalid {
  color: #dc2626;
  animation: tu-shake .3s ease;
}
@keyframes tu-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}
.tu-amount-suffix {
  font-size: 1.6rem;
  color: var(--text-muted);
  margin-left: .15rem;
}
.tu-amount-approx {
  font-size: .92rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}
.tu-amount-approx::before {
  content: "";
  display: inline-block;
  margin-right: .25rem;
}

.tu-quick-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .9rem;
}
.tu-quick-pill {
  padding: .35rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.tu-quick-pill:hover {
  background: rgba(99,102,241,.08);
  border-color: rgba(99,102,241,.30);
  color: #4338ca;
}
[data-theme="dark"] .tu-quick-pill:hover { color: #c7d2fe; }

.tu-promo {
  margin-top: 1rem;
  font-size: .85rem;
}
.tu-promo summary {
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 500;
  list-style: none;
  user-select: none;
}
.tu-promo summary::-webkit-details-marker { display: none; }
.tu-promo summary:hover { color: var(--primary); }
.tu-promo[open] summary { color: var(--text); }

/* ─── Payment method radio cards ───────────────────────────── */
.tu-pmethods {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.tu-pmethod {
  position: relative;
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s, background .15s, box-shadow .15s;
  background: transparent;
}
.tu-pmethod:hover {
  border-color: rgba(99,102,241,.30);
  background: rgba(99,102,241,.03);
}
.tu-pmethod input[type=radio] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.tu-pmethod-radio {
  width: 18px; height: 18px;
  border: 2px solid var(--border-strong, #94a3b8);
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
  transition: border-color .15s, background .15s;
}
.tu-pmethod.is-active {
  border-color: var(--primary);
  background: rgba(99,102,241,.04);
  box-shadow: 0 0 0 4px rgba(99,102,241,.10);
}
.tu-pmethod.is-active .tu-pmethod-radio {
  border-color: var(--primary);
  background: var(--primary);
  border-width: 6px;
}
[data-theme="dark"] .tu-pmethod {
  border-color: rgba(255,255,255,.08);
}
[data-theme="dark"] .tu-pmethod:hover {
  background: rgba(99,102,241,.06);
  border-color: rgba(129,140,248,.30);
}
[data-theme="dark"] .tu-pmethod.is-active {
  background: rgba(99,102,241,.10);
  box-shadow: 0 0 0 4px rgba(99,102,241,.18);
}
[data-theme="dark"] .tu-pmethod-radio {
  border-color: rgba(255,255,255,.20);
}

.tu-pmethod-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.10);
}
.tu-pmethod-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.tu-pmethod-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.tu-pmethod-meta {
  font-size: .8rem;
  color: var(--text-muted);
}
.tu-pmethod-badge {
  font-size: .72rem;
  font-weight: 600;
  color: #059669;
  background: rgba(16,185,129,.10);
  padding: .25rem .6rem;
  border-radius: 999px;
  white-space: nowrap;
  align-self: center;
  flex-shrink: 0;
}
[data-theme="dark"] .tu-pmethod-badge {
  color: #34d399;
  background: rgba(52,211,153,.14);
}

/* ─── Summary block ───────────────────────────────────────── */
.tu-summary { padding-top: 1rem; padding-bottom: 1.1rem; }
.tu-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .25rem 0;
  font-size: .92rem;
  color: var(--text);
}
.tu-summary-row.tu-summary-muted { color: var(--text-muted); }
.tu-summary hr {
  margin: .55rem 0;
  border-color: var(--border);
  opacity: 1;
}
.tu-summary-total {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -.01em;
}

/* ─── Big CTA pay button ──────────────────────────────────── */
.tu-pay-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
  padding: 1rem 1.4rem;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  border: 1px solid var(--border);
  border-radius: 14px;
  cursor: pointer;
  transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .18s, background .18s;
  box-shadow: 0 4px 14px rgba(15,23,42,.06);
}
.tu-pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(15,23,42,.10);
  background: var(--surface-alt, var(--surface));
}
.tu-pay-btn i { transition: transform .18s; }
.tu-pay-btn:hover i { transform: translateX(3px); }
[data-theme="dark"] .tu-pay-btn {
  background: #ffffff;
  color: #0f172a;
  border-color: transparent;
}
[data-theme="dark"] .tu-pay-btn:hover { background: #f8fafc; }

/* ─── Mobile tweaks ───────────────────────────────────────── */
@media (max-width: 575.98px) {
  .tu-amount-currency { font-size: 1.85rem; }
  .tu-amount-field    { font-size: 2.2rem; width: 5ch; }
  .tu-amount-suffix   { font-size: 1.2rem; }
  .tu-checkout-section { padding: 1rem 1.1rem; }
  .tu-pmethod { padding: .7rem .8rem; gap: .65rem; }
  .tu-pmethod-icon { width: 30px; height: 30px; font-size: .85rem; }
  .tu-pmethod-name { font-size: .92rem; }
  .tu-pmethod-meta { font-size: .74rem; }
  .tu-pmethod-badge { font-size: .65rem; padding: .2rem .45rem; }
}

/* ============================================================ */
/* 1.0.414 — Public topbar glassmorphism polish                 */
/* ============================================================ */
/* The topbar with phone/email/theme/currency/lang now sits as  */
/* a single unit with the navbar below: same blur, same z-index */
/* layer, and its dropdowns (Currency + Lang popup) read in the */
/* new glass aesthetic instead of default Bootstrap white.      */

.tu-public-topbar {
  position: relative;
  z-index: 1041;        /* above sticky .tu-public-nav (1040) */
}
.tu-public-topbar a,
.tu-public-topbar .topbar-link {
  color: #cbd5e1;
  font-weight: 500;
  font-size: .82rem;
  text-decoration: none;
  transition: color .15s ease;
}
.tu-public-topbar a:hover,
.tu-public-topbar .topbar-link:hover { color: #ffffff; }

.tu-public-topbar .dropdown-menu {
  z-index: 1042;
  min-width: 140px;
  background: rgba(20, 26, 46, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 12px;
  padding: 0.35rem;
  margin-top: 0.5rem !important;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.50);
}
.tu-public-topbar .dropdown-menu .dropdown-item {
  color: #cbd5e1;
  font-size: .85rem;
  font-weight: 500;
  padding: 0.45rem 0.75rem;
  border-radius: 8px;
  transition: background .15s, color .15s;
}
.tu-public-topbar .dropdown-menu .dropdown-item:hover,
.tu-public-topbar .dropdown-menu .dropdown-item:focus {
  background: rgba(99, 102, 241, 0.18);
  color: #ffffff;
}
.tu-public-topbar .dropdown-toggle::after {
  border-top-color: #94a3b8;
}

/* Currency-toggle pill — match the topbar's right cluster */
.tu-public-topbar .topbar-link.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: .78rem;
  font-weight: 600;
}
.tu-public-topbar .topbar-link.dropdown-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

/* Theme toggle inside topbar — match the pill style */
.tu-public-topbar .theme-toggle {
  width: 32px; height: 32px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: .82rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tu-public-topbar .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
}

/* Lang switcher inside topbar — overrides legacy 1.0.310 base */
.tu-public-topbar .lang-switcher {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.tu-public-topbar .lang-popup {
  z-index: 1042;
}

/* Dark-theme override unnecessary — topbar is always dark navy */

/* Mobile: tighten left side (phone/email) so right cluster fits */
@media (max-width: 575.98px) {
  .tu-public-topbar .topbar-left a:nth-child(2) { display: none; }   /* drop email on tiny screens */
  .tu-public-topbar .topbar-link.dropdown-toggle { padding: .25rem .55rem; }
  .tu-public-topbar .theme-toggle { width: 28px; height: 28px; font-size: .75rem; }
}

/* ============================================================ */
/* 1.0.415 — Public footer redesign (glass + radial glow)       */
/* ============================================================ */
/* Same brand-purple aesthetic as the navbar / hero / cards.   */
/* Pure CSS overrides — no markup change beyond .tu-public-    */
/* footer wrapper class added in public_bot.php.                */

.tu-public-footer {
  position: relative;
  background: linear-gradient(180deg, #0c1220 0%, #06080f 100%);
  color: #cbd5e1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  isolation: isolate;
  overflow: hidden;
}
.tu-public-footer::before {
  /* Soft purple radial glow in the top-right corner — matches the
     hero's gradient mesh and lifts the footer from a flat dark bar. */
  content: "";
  position: absolute;
  width: 600px; height: 600px;
  right: -200px; top: -300px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.18), transparent 65%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
}
.tu-public-footer::after {
  /* Subtle dot lattice — same texture as the hero, fades out fast. */
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at center, rgba(255, 255, 255, 0.035) 1px, transparent 1.5px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at top, black 30%, transparent 75%);
          mask-image: radial-gradient(ellipse at top, black 30%, transparent 75%);
  z-index: -1;
  pointer-events: none;
}

.tu-public-footer .footer-top {
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
}
.tu-public-footer .footer-bottom {
  padding: 1.2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: .82rem;
  color: #64748b;
}
.tu-public-footer .footer-bottom span { letter-spacing: 0.01em; }

.tu-footer-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: 0.25rem;
}
.tu-footer-brand img {
  max-height: 44px;
  max-width: 200px;
}
.tu-footer-brand-text {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  background: linear-gradient(135deg, #818cf8 0%, #a78bfa 50%, #c084fc 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.tu-public-footer .text-footer-muted {
  color: #94a3b8;
  font-size: .92rem;
  line-height: 1.6;
  max-width: 360px;
}

.tu-public-footer h6 {
  color: #ffffff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 1.1rem;
}

.tu-public-footer .footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.tu-public-footer .footer-links a {
  color: #94a3b8;
  text-decoration: none;
  font-size: .92rem;
  font-weight: 500;
  display: inline-block;
  transition: color .15s ease, transform .15s ease;
}
.tu-public-footer .footer-links a:hover {
  color: #c7d2fe;
  transform: translateX(2px);
}

.tu-public-footer .footer-contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.tu-public-footer .footer-contact li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #94a3b8;
  font-size: .92rem;
}
.tu-public-footer .footer-contact i {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.14);
  color: #c7d2fe;
  border-radius: 8px;
  font-size: .82rem;
  flex-shrink: 0;
}
.tu-public-footer .footer-contact a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color .15s ease;
}
.tu-public-footer .footer-contact a:hover { color: #ffffff; }

.tu-public-footer .social-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tu-public-footer .social-links a {
  width: 38px; height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  font-size: .95rem;
  text-decoration: none;
  transition: all .15s ease;
}
.tu-public-footer .social-links a:hover {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  border-color: transparent;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(99, 102, 241, 0.30);
}

/* Light theme — flip palette, keep purple glow but soften */
[data-theme="light"] .tu-public-footer {
  background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #475569;
  border-top-color: rgba(15, 23, 42, 0.08);
}
[data-theme="light"] .tu-public-footer::before {
  background: radial-gradient(circle, rgba(99, 102, 241, 0.10), transparent 65%);
}
[data-theme="light"] .tu-public-footer::after {
  background-image: radial-gradient(circle at center, rgba(15, 23, 42, 0.05) 1px, transparent 1.5px);
}
[data-theme="light"] .tu-public-footer h6 { color: #0f172a; }
[data-theme="light"] .tu-public-footer .text-footer-muted { color: #64748b; }
[data-theme="light"] .tu-public-footer .footer-links a { color: #475569; }
[data-theme="light"] .tu-public-footer .footer-links a:hover { color: #4338ca; }
[data-theme="light"] .tu-public-footer .footer-contact li { color: #475569; }
[data-theme="light"] .tu-public-footer .footer-contact a { color: #1e293b; }
[data-theme="light"] .tu-public-footer .footer-contact a:hover { color: #4338ca; }
[data-theme="light"] .tu-public-footer .footer-contact i {
  background: rgba(99, 102, 241, 0.10);
  color: #4338ca;
}
[data-theme="light"] .tu-public-footer .social-links a {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.10);
  color: #475569;
}
[data-theme="light"] .tu-public-footer .footer-bottom {
  border-top-color: rgba(15, 23, 42, 0.08);
  color: #94a3b8;
}
[data-theme="light"] .tu-footer-brand-text {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #a78bfa 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ============================================================ */
/* 1.0.418 — /client/funds Binance manual-verify inline block   */
/* ============================================================ */
/* When the Binance radio is selected and the operator runs in  */
/* binance_mode='manual_verify', the amount/summary blocks hide */
/* and we show: big yellow Pay ID badge + Order ID input + a    */
/* Verify-styled CTA. JS toggles via [data-mode] attributes.    */

.tu-binance-payid {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.1rem 1.25rem;
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 100%);
  color: #422006;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.30),
              inset 0 1px 0 rgba(255, 255, 255, 0.40);
  margin-bottom: .85rem;
}
.tu-binance-payid-icon {
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(66, 32, 6, 0.10);
  border-radius: 12px;
  font-size: 1.4rem;
  color: #422006;
  flex-shrink: 0;
}
.tu-binance-payid-value {
  flex: 1 1 auto;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
  word-break: break-all;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  color: #422006;
}
.tu-binance-payid-copy {
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(66, 32, 6, 0.12);
  color: #422006;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.tu-binance-payid-copy:hover {
  background: rgba(66, 32, 6, 0.20);
  transform: translateY(-1px);
}

.tu-binance-help {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.tu-binance-order-input {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.tu-binance-order-input.is-invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.12);
}

/* Yellow Verify CTA — different shape from the standard "Pay $X" CTA */
.tu-pay-btn-binance {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #422006;
  border: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.36),
              inset 0 1px 0 rgba(255, 255, 255, 0.30);
}
.tu-pay-btn-binance:hover {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #422006;
  box-shadow: 0 12px 28px rgba(245, 158, 11, 0.46),
              inset 0 1px 0 rgba(255, 255, 255, 0.30);
}
[data-theme="dark"] .tu-pay-btn-binance {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: #422006;
}
[data-theme="dark"] .tu-pay-btn-binance:hover {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  color: #422006;
}

@media (max-width: 575.98px) {
  .tu-binance-payid { padding: .85rem 1rem; gap: .6rem; }
  .tu-binance-payid-icon { width: 36px; height: 36px; font-size: 1.1rem; }
  .tu-binance-payid-value { font-size: 1.2rem; }
  .tu-binance-payid-copy { width: 34px; height: 34px; font-size: .85rem; }
}

/* ============================================================ */
/* 1.0.421 — Order modal (used on /client/services in both skins) */
/* ============================================================ */
/* Stylistic upgrade: brand-purple top accent, larger radius,    */
/* softer header, glass-like backdrop. Bootstrap structure is    */
/* unchanged — only CSS overrides scoped to #orderModal.        */

#orderModal .modal-content,
#resultModal .modal-content {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 28px 80px -12px rgba(15, 23, 42, 0.30),
              0 0 0 1px rgba(99, 102, 241, 0.06);
  position: relative;
}
#orderModal .modal-content::before,
#resultModal .modal-content::before {
  /* Brand-purple top accent strip */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1 0%, #818cf8 50%, #a78bfa 100%);
  z-index: 1;
}
#orderModal .modal-header,
#resultModal .modal-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.04), transparent);
}
#orderModal .modal-title,
#resultModal .modal-title {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
#orderModal .modal-title::before,
#resultModal .modal-title::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #818cf8);
  margin-right: 0.15rem;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12);
}
#orderModal .modal-body,
#resultModal .modal-body {
  padding: 1.4rem 1.25rem 1.25rem;
}
#orderModal .btn-close,
#resultModal .btn-close {
  background-color: rgba(15, 23, 42, 0.04);
  border-radius: 8px;
  width: 32px; height: 32px;
  background-size: 12px;
  opacity: 0.7;
  transition: background-color .15s ease, opacity .15s ease;
  margin: 0;
}
#orderModal .btn-close:hover,
#resultModal .btn-close:hover {
  background-color: rgba(99, 102, 241, 0.14);
  opacity: 1;
}

/* Slightly stronger backdrop so the modal feels lifted above the page */
#orderModal + .modal-backdrop,
.modal-backdrop.show:has(+ #orderModal),
body.modal-open .modal-backdrop {
  --bs-backdrop-opacity: .65;
}

/* Dark theme — full surface inversion */
[data-theme="dark"] #orderModal .modal-content,
[data-theme="dark"] #resultModal .modal-content {
  background: #151b2e;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: 0 28px 80px -12px rgba(0, 0, 0, 0.65),
              0 0 0 1px rgba(129, 140, 248, 0.10);
  color: #e8ecf4;
}
[data-theme="dark"] #orderModal .modal-header,
[data-theme="dark"] #resultModal .modal-header {
  background: linear-gradient(180deg, rgba(129, 140, 248, 0.06), transparent);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] #orderModal .btn-close,
[data-theme="dark"] #resultModal .btn-close {
  filter: invert(1) brightness(2);
  background-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] #orderModal .btn-close:hover,
[data-theme="dark"] #resultModal .btn-close:hover {
  background-color: rgba(129, 140, 248, 0.18);
}

/* Mobile — tighter padding so the form fits without horizontal scroll */
@media (max-width: 575.98px) {
  #orderModal .modal-content,
  #resultModal .modal-content { border-radius: 18px; }
  #orderModal .modal-header,
  #resultModal .modal-header { padding: 0.75rem 1rem; }
  #orderModal .modal-body,
  #resultModal .modal-body { padding: 1rem; }
}

/* ============================================================ */
/* 1.0.423 — /client/services sticky filter bar (glass + brand)  */
/* ============================================================ */
/* The search input + group dropdown stick to the top of the    */
/* page as the customer scrolls through long catalogs. Glass    */
/* background so the cards/rows underneath stay legible.        */

/* 1.0.432: drop .panel-content's top padding ONLY on pages that contain
   the filter bar — kills the dark strip between panel-header and filter. */
.panel-content:has(> .tu-svc-filter-bar) { padding-top: 0; }

/* 1.0.495: fully transparent filter bar — operator wants search + group
   selector to float without any container chrome on any skin/theme. Strip
   all bg/blur/border/shadow, keep only layout (position/top/z/margin/pad). */
.tu-svc-filter-bar {
  position: sticky;
  top: 64px;
  z-index: 30;
  margin: 0 calc(-1 * var(--bs-gutter-x, 0.75rem)) 1rem;
  padding: .85rem var(--bs-gutter-x, 0.75rem);
}
.tu-svc-filter-bar.is-stuck { margin-bottom: 0; }
/* Market skin uses a horizontal top-nav instead of the sidebar+header
   stack (see 1.0.401), but the panel-header is still sticky there too,
   so the same offset applies. */
[data-skin="market"] .tu-svc-filter-bar {
  top: 64px;
}
/* Mobile: panel-header may collapse some elements but height stays ~60px */
@media (max-width: 575.98px) {
  .tu-svc-filter-bar { top: 56px; }
}

/* Search input — pill, soft indigo focus ring */
.tu-svc-filter-bar .input-group {
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  border-radius: 999px;
  overflow: hidden;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tu-svc-filter-bar .input-group:focus-within {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.10);
}
.tu-svc-filter-bar .input-group .input-group-text {
  background: transparent;
  border: 0;
  color: var(--text-muted, #64748b);
  padding-left: 1rem;
  padding-right: 0;
}
.tu-svc-filter-bar .input-group .form-control {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--text);
  padding: .55rem 1rem .55rem .65rem;
}
.tu-svc-filter-bar .input-group .form-control::placeholder {
  color: var(--text-subtle, #94a3b8);
}
.tu-svc-filter-bar .input-group .btn-outline-secondary {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  border-radius: 999px;
  width: 32px; height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 4px;
}
.tu-svc-filter-bar .input-group .btn-outline-secondary:hover {
  background: rgba(99, 102, 241, 0.10);
  color: var(--primary, #4338ca);
}

/* Group dropdown — pill trigger same shape as search */
.tu-svc-filter-bar .group-dropdown > .btn {
  background: var(--surface, #fff);
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  border-radius: 999px;
  padding: .58rem 1.1rem;
  font-weight: 600;
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.tu-svc-filter-bar .group-dropdown > .btn:hover,
.tu-svc-filter-bar .group-dropdown > .btn[aria-expanded="true"] {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.10);
  color: var(--text);
}
.tu-svc-filter-bar .group-dropdown > .btn::after {
  margin-left: auto;
  border-top-color: var(--text-muted);
}
.tu-svc-filter-bar .group-dropdown-menu {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
  padding: .5rem;
  margin-top: .4rem !important;
}
.tu-svc-filter-bar .group-dropdown-menu .group-dropdown-search {
  border: 1px solid var(--border, rgba(15, 23, 42, 0.08));
  border-radius: 999px;
  padding: .35rem .85rem;
  font-size: .85rem;
}
.tu-svc-filter-bar .group-dropdown-menu .group-dropdown-search:focus {
  border-color: rgba(99, 102, 241, 0.45);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.10);
  outline: none;
}
.tu-svc-filter-bar .group-dropdown-menu .dropdown-item {
  border-radius: 8px;
  font-size: .88rem;
  padding: .45rem .7rem;
  color: var(--text);
  transition: background .15s, color .15s;
}
.tu-svc-filter-bar .group-dropdown-menu .dropdown-item:hover,
.tu-svc-filter-bar .group-dropdown-menu .dropdown-item:focus {
  background: rgba(99, 102, 241, 0.08);
  color: #4338ca;
}
.tu-svc-filter-bar .group-dropdown-menu .dropdown-item.active {
  background: linear-gradient(135deg, #6366f1, #818cf8);
  color: #fff;
}
[data-theme="dark"] .tu-svc-filter-bar .input-group,
[data-theme="dark"] .tu-svc-filter-bar .group-dropdown > .btn {
  background: #151b2e;
  border-color: rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .tu-svc-filter-bar .group-dropdown-menu {
  background: #151b2e;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.50);
}
[data-theme="dark"] .tu-svc-filter-bar .group-dropdown-menu .dropdown-item:hover,
[data-theme="dark"] .tu-svc-filter-bar .group-dropdown-menu .dropdown-item:focus {
  background: rgba(129, 140, 248, 0.14);
  color: #c7d2fe;
}

/* Mobile — keep the sticky bar but tighten paddings */
@media (max-width: 575.98px) {
  .tu-svc-filter-bar {
    padding: .6rem var(--bs-gutter-x, 0.75rem);
    margin: 0 calc(-1 * var(--bs-gutter-x, 0.75rem)) 1rem;
  }
  .tu-svc-filter-bar.is-stuck { margin-bottom: 0; }
}

/* ============================================================ */
/* 1.0.424 — Cabinet card chrome refresh                        */
/* ============================================================ */
/* Pure CSS overrides — applies to every .card.border-0.shadow-sm */
/* inside the client cabinet (and admin), giving the existing    */
/* dashboard / orders / profile / tickets / contact pages the    */
/* same softer chrome as the new landing without touching their  */
/* markup. Theme-aware. */

.panel-content .card.border-0.shadow-sm,
.panel-content .card.border-0 {
  border-radius: 18px !important;
  border: 1px solid var(--border) !important;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(15, 23, 42, .04) !important;
  transition: box-shadow .25s ease, border-color .25s ease, transform .25s cubic-bezier(0.16, 1, 0.3, 1);
}
.panel-content .card.border-0.shadow-sm:hover,
.panel-content .card.border-0:hover {
  box-shadow: 0 12px 30px rgba(15, 23, 42, .08) !important;
  border-color: rgba(99, 102, 241, .14) !important;
}
.panel-content .card.border-0 .card-header {
  background: linear-gradient(180deg, rgba(99,102,241,.04), transparent) !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 1rem 1.25rem !important;
  font-weight: 700;
}
.panel-content .card.border-0 .card-header h6 {
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}
.panel-content .card.border-0 .card-header h6 i {
  color: var(--primary, #6366f1);
  margin-right: .5rem;
}
[data-theme="dark"] .panel-content .card.border-0 .card-header {
  background: linear-gradient(180deg, rgba(129,140,248,.06), transparent) !important;
}

/* Tables inside cabinet cards — softer headers, indigo hover row */
.panel-content .card .table thead th {
  background: var(--surface-alt, rgba(99,102,241,.04));
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding: .75rem 1rem;
}
.panel-content .card .table thead.table-dark th {
  background: linear-gradient(135deg, #1a1f3a, #0f1525);
  color: #cbd5e1;
  border-bottom-color: rgba(255, 255, 255, .08);
}
/* 1.0.480: light-theme override. The rule above uses `background:` shorthand
   with linear-gradient → sets background-image, which the global
   `[data-theme="light"] thead.table-dark th { background-color: !important }`
   cannot displace (different property). Override the full background here. */
[data-theme="light"] .panel-content .card .table thead.table-dark th {
  background: var(--surface-alt);
  color: var(--text);
  border-bottom-color: var(--border);
}
/* 1.0.481: cells render OK with the rule above, but sort-link <a> tags inside
   admin <th> use Bootstrap utilities (.text-white in services/suppliers/groups/
   tickets/suppliers_import; .text-body in users.php) which can stay white when
   the theme switches. Force every <a> inside any admin <thead> <th> to the
   muted-text color in light mode — beats `.text-white !important` via
   explicit !important here. */
[data-theme="light"] .panel-content .card .table thead th a,
[data-theme="light"] .panel-content .card .table thead th a.text-white,
[data-theme="light"] .panel-content .card .table thead th a.text-body {
  color: var(--text-muted) !important;
}
.panel-content .card .table tbody tr {
  transition: background-color .12s ease;
}
.panel-content .card .table tbody tr:hover {
  background: rgba(99,102,241,.05);
}

/* Buttons inside cabinet cards — primary becomes brand gradient */
.panel-content .btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
  border-color: transparent;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99,102,241,.25);
  transition: transform .18s cubic-bezier(0.16, 1, 0.3, 1), box-shadow .18s ease;
}
.panel-content .btn-primary:hover {
  background: linear-gradient(135deg, #4338ca 0%, #4f46e5 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(99,102,241,.35);
}
.panel-content .btn-outline-primary {
  border: 1px solid rgba(99,102,241,.40);
  color: var(--primary, #4338ca);
  font-weight: 600;
  background: transparent;
}
.panel-content .btn-outline-primary:hover {
  background: rgba(99,102,241,.08);
  border-color: var(--primary, #6366f1);
  color: var(--primary, #4338ca);
}

/* Flash alerts — softer, branded edges */
.panel-content > .alert,
.panel-main > .px-4.pt-3 > .alert {
  border: 1px solid transparent;
  border-radius: 14px;
  font-weight: 500;
  padding: .85rem 1.1rem;
}
.panel-content > .alert-success,
.panel-main > .px-4.pt-3 > .alert-success {
  background: rgba(16,185,129,.10);
  border-color: rgba(16,185,129,.20);
  color: #047857;
}
.panel-content > .alert-warning,
.panel-main > .px-4.pt-3 > .alert-warning {
  background: rgba(245,158,11,.10);
  border-color: rgba(245,158,11,.20);
  color: #b45309;
}
.panel-content > .alert-danger,
.panel-main > .px-4.pt-3 > .alert-danger {
  background: rgba(220,38,38,.10);
  border-color: rgba(220,38,38,.20);
  color: #b91c1c;
}
.panel-content > .alert-info,
.panel-main > .px-4.pt-3 > .alert-info {
  background: rgba(14,165,233,.10);
  border-color: rgba(14,165,233,.20);
  color: #0369a1;
}
[data-theme="dark"] .panel-content > .alert-success { color: #6ee7b7; }
[data-theme="dark"] .panel-content > .alert-warning { color: #fcd34d; }
[data-theme="dark"] .panel-content > .alert-danger  { color: #fca5a5; }
[data-theme="dark"] .panel-content > .alert-info    { color: #7dd3fc; }

/* 1.0.468: Updater install-result panel sits deeper than direct child of
   .panel-content, so the rules above don't tint it. Explicit dark-theme
   overrides for the install/check output box. */
#update-result .alert-success,
#update-result .alert-warning,
#update-result .alert-danger,
#update-result .alert-info { border: 1px solid rgba(0,0,0,.08); }
#update-result .alert-success { background: rgba(16,185,129,.10);  border-color: rgba(16,185,129,.20);  color: #047857; }
#update-result .alert-warning { background: rgba(245,158,11,.10);  border-color: rgba(245,158,11,.20);  color: #b45309; }
#update-result .alert-danger  { background: rgba(220,38,38,.10);   border-color: rgba(220,38,38,.20);   color: #b91c1c; }
#update-result .alert-info    { background: rgba(14,165,233,.10);  border-color: rgba(14,165,233,.20);  color: #0369a1; }
[data-theme="dark"] #update-result .alert-success { color: #6ee7b7; }
[data-theme="dark"] #update-result .alert-warning { color: #fcd34d; }
[data-theme="dark"] #update-result .alert-danger  { color: #fca5a5; }
[data-theme="dark"] #update-result .alert-info    { color: #7dd3fc; }
#update-result pre {
  background: var(--surface-alt, rgba(99,102,241,.06));
  color: var(--text, #1e293b);
  padding: .5rem .75rem;
  border-radius: 6px;
  border: 1px solid var(--border, rgba(0,0,0,.08));
}
[data-theme="dark"] #update-result pre {
  background: rgba(0,0,0,.25);
  color: var(--text);
  border-color: var(--border);
}

/* ============================================================ */
/* 1.0.425 — Cabinet form controls + secondary chrome polish    */
/* ============================================================ */
/* Forms across /client/orders, /client/order, /client/profile, */
/* /client/tickets get pill-style inputs, indigo focus rings,   */
/* and softer .badge / .pagination treatment. CSS-only — no     */
/* markup changes needed.                                       */

/* Form controls inside the cabinet — softer borders, brand focus */
.panel-content .form-control,
.panel-content .form-select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .55rem .85rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  font-size: .92rem;
}
.panel-content .form-control:focus,
.panel-content .form-select:focus {
  border-color: rgba(99, 102, 241, .50);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .10);
  outline: none;
}
.panel-content .form-control::placeholder {
  color: var(--text-subtle, #94a3b8);
}
.panel-content .form-label {
  font-size: .76rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .35rem;
}

/* Input-group variants — pill rounded caps */
.panel-content .input-group {
  border-radius: 10px;
  overflow: hidden;
}
.panel-content .input-group > .input-group-text {
  background: var(--surface-alt, rgba(99,102,241,.04));
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.panel-content .input-group > .form-control:focus,
.panel-content .input-group > .form-select:focus {
  z-index: 3;
}

/* Secondary buttons — outline style sharpened */
.panel-content .btn-outline-secondary {
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: transparent;
  font-weight: 600;
}
.panel-content .btn-outline-secondary:hover {
  background: rgba(99, 102, 241, .06);
  border-color: rgba(99, 102, 241, .30);
  color: var(--primary, #4338ca);
}

/* Soft badges with indigo accent inside cabinet */
.panel-content .badge {
  font-weight: 600;
  letter-spacing: .03em;
  padding: .35rem .6rem;
  border-radius: 999px;
  font-size: .72rem;
}
.panel-content .badge.bg-secondary {
  background: rgba(99, 102, 241, .12) !important;
  color: var(--primary, #4338ca);
}
[data-theme="dark"] .panel-content .badge.bg-secondary {
  color: #c7d2fe;
}

/* Pagination — pill, brand active */
.panel-content .pagination {
  gap: .25rem;
  flex-wrap: wrap;
}
.panel-content .pagination .page-link {
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-muted);
  font-weight: 600;
  padding: .45rem .75rem;
  font-size: .85rem;
  transition: background .15s, color .15s, border-color .15s;
}
.panel-content .pagination .page-link:hover {
  background: rgba(99, 102, 241, .08);
  border-color: rgba(99, 102, 241, .25);
  color: var(--primary, #4338ca);
}
.panel-content .pagination .page-item.active .page-link {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 4px 12px rgba(99,102,241,.30);
}
.panel-content .pagination .page-item.disabled .page-link {
  opacity: .5;
  background: transparent;
}

/* Form check (checkboxes/switches) — indigo accent */
.panel-content .form-check-input:checked {
  background-color: var(--primary, #6366f1);
  border-color: var(--primary, #6366f1);
}
.panel-content .form-check-input:focus {
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .12);
  border-color: rgba(99, 102, 241, .40);
}

/* Quill description container in cabinet — softer border */
.panel-content .ql-toolbar.ql-snow,
.panel-content .ql-container.ql-snow {
  border-color: var(--border) !important;
}
.panel-content .ql-toolbar.ql-snow {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  background: var(--surface-alt, rgba(99,102,241,.03));
}
.panel-content .ql-container.ql-snow {
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* Tickets thread bubbles polish (1.0.32 markup unchanged) */
.panel-content .ticket-msg {
  border-radius: 14px !important;
  padding: .85rem 1rem !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}
.panel-content .ticket-msg.is-mine,
.panel-content .ticket-msg.bg-primary {
  background: linear-gradient(135deg, #6366f1, #818cf8) !important;
  color: #fff !important;
  border: 0;
}

/* Profile API key block — code with branded background */
.panel-content code,
.panel-content pre {
  background: var(--surface-alt, rgba(99,102,241,.06));
  color: var(--primary, #4338ca);
  padding: .12rem .4rem;
  border-radius: 6px;
  font-size: .85em;
}
[data-theme="dark"] .panel-content code,
[data-theme="dark"] .panel-content pre {
  background: rgba(129,140,248,.12);
  color: #c7d2fe;
}
