/* ═══════════════════════════════════════════════════════
   SMSVerify — CSS 
═══════════════════════════════════════════════════════ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/6.6.6/css/flag-icons.min.css');

/* ══════════════════════════════════════════
   COLOR TOKENS — exact 5sim values
══════════════════════════════════════════ */
:root {
  /* Light theme (default) */
  --color-primary:    #395372;
  --color-secondary:  #1565c0;
  --color-base-100:   #ffffff;
  --color-base-200:   #f5f6f8;
  --color-base-300:   #e2f1fd;
  --color-header:     #395372;
  --color-divider:    #c5d9ea;
  --color-hover:      #e2f1fd;
  --color-hover-dark: #2a3e52;
  --color-accent:     #42a5f5;
  --color-green:      #00c036;
  --color-info:       #03a9f4;
  --color-orange:     #f38e3c;
  --text-primary:     #395372;
  --text-white:       #e2f1fd;
  --bg-card:          #ffffff;
  --bg-card-dark:     #1e3044;
  --bg-item-hover:    #e2f1fd;

  /* legacy aliases so dashboard/admin pages still work */
  --accent:           #42a5f5;
  --accent-hover:     #1565c0;
  --accent-dim:       rgba(66,165,245,0.12);
  --accent-border:    rgba(66,165,245,0.3);
  --green:            #00c036;
  --green-dim:        rgba(0,192,54,0.12);
  --red:              #e53935;
  --red-dim:          rgba(229,57,53,0.12);
  --yellow:           #f38e3c;
  --yellow-dim:       rgba(243,142,60,0.12);
  --bg-primary:       #f5f6f8;
  --bg-secondary:     #ffffff;
  --bg-tertiary:      #e2f1fd;
  --bg-card:          #ffffff;
  --bg-hover:         #e2f1fd;
  --border:           #c5d9ea;
  --border-light:     #dde8f0;
  --text-secondary:   #6b8cad;
  --text-muted:       #8fadc8;

  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  20px;
  --transition: 0.15s ease;
}

html[data-theme="dark"] {
  --color-base-100:   #152536;
  --color-base-200:   #1e3044;
  --color-header:     #0e1e2e;
  --color-divider:    #2a3e52;
  --color-hover:      #2a3e52;
  --text-primary:     #e2f1fd;
  --bg-card:          #1e3044;
  --bg-item-hover:    #2a3e52;

  /* legacy */
  --bg-primary:       #152536;
  --bg-secondary:     #1e3044;
  --bg-tertiary:      #2a3e52;
  --bg-card:          #1e3044;
  --bg-hover:         #2a3e52;
  --border:           #2a3e52;
  --border-light:     #344a66;
  --text-secondary:   #8fadc8;
  --text-muted:       #6b8cad;
}

/* ══════════════════════════════════════════
   RESET
══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; display: flex; flex-direction: column; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--color-base-200);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }
input  { font-family: inherit; }

/* ══════════════════════════════════════════
   MAIN 2-COLUMN GRID LAYOUT
══════════════════════════════════════════ */
.grow { flex-grow: 1; }
.bg-base-100 { background: var(--color-base-100); }

.main-grid {
  margin: 0 auto;
  max-width: 1536px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
@media (min-width: 1280px) {
  .main-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    grid-template-rows: auto auto 1fr;
    margin-bottom: 2rem;
  }
}

/* ══════════════════════════════════════════
   MOBILE HEADER
══════════════════════════════════════════ */
.mobile-header {
  display: flex;
  height: 56px;
  align-items: center;
  justify-content: space-between;
  background: var(--color-header);
  padding: 0 4px;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.3);
  position: sticky;
  top: 0;
  z-index: 30;
}
@media (min-width: 1280px) { .mobile-header { display: none; } }

.hamburger-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: transparent;
  border: none;
  gap: 4px;
  border-radius: 12px;
}
.hamburger-btn:hover { background: rgba(0,0,0,.05); }
.hamburger-line {
  width: 18px; height: 2px;
  background: white;
  border-radius: 1px;
  transition: all .3s;
}

.mobile-actions {
  display: flex;
  align-items: center;
  z-index: 20;
}

/* ══════════════════════════════════════════
   DESKTOP NAV (inside aside on left)
══════════════════════════════════════════ */
.desktop-nav {
  display: none;
}
@media (min-width: 1280px) {
  .desktop-nav {
    display: flex;
    align-items: center;
    height: 56px;
    background: var(--color-header);
    padding: 0 8px;
    gap: 2px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.25);
  }
}

/* Secondary nav bar (below header, desktop only) */
.desktop-subnav {
  display: none;
}
@media (min-width: 1280px) {
  .desktop-subnav {
    display: flex;
    align-items: center;
    background: #f5f6f8;
    padding: 0 24px;
    height: 56px;
    border-bottom: 1px solid var(--color-divider);
  }
  html[data-theme="dark"] .desktop-subnav {
    background: #303e4d;
  }
}
.desktop-subnav a {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 16px;
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: background .15s;
}
.desktop-subnav a:hover { background: rgba(21,37,54,.07); }
html[data-theme="dark"] .desktop-subnav a:hover { background: rgba(255,255,255,.08); }

/* ══════════════════════════════════════════
   LEFT ASIDE — selector panel
══════════════════════════════════════════ */
.selector-aside {
  background: var(--color-base-200);
  display: flex;
  flex-direction: column;
}
@media (min-width: 1280px) {
  .selector-aside {
    grid-column: 1;
    grid-row: 1 / 4;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid var(--color-divider);
    background: var(--color-base-200);
  }
}

/* Aside header (blue banner) */
.aside-header {
  display: flex;
  align-items: center;
  height: 88px;
  background: #1976d2;
  border-radius: 0 0 16px 16px;
  padding: 0 16px;
  cursor: pointer;
  user-select: none;
  color: white;
}
@media (min-width: 1280px) {
  .aside-header { border-radius: 0; }
}
.aside-header-logo {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.25;
}
.aside-header-logo span { display: block; font-size: 15px; font-weight: 500; }

/* Prices/Statistics tabs */
.px-section { padding: 0 24px; }
.prices-tab-area {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 4px;
}

/* Carousel tab (SMS Deliveries) */
.carousel-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  height: 48px;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.125rem;
  color: var(--text-primary);
  position: relative;
  white-space: nowrap;
}
.carousel-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0; left: 5%; width: 90%; height: 3px;
  background: #f38e3c;
  border-radius: 3px 3px 0 0;
}

/* ══════════════════════════════════════════
   STEP HEADINGS (1. Select service, etc.)
══════════════════════════════════════════ */
.step-heading {
  font-size: 1.25rem;
  line-height: 2.5rem;
  font-weight: 600;
  padding-left: 1.25rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

/* ══════════════════════════════════════════
   SEARCH INPUT
══════════════════════════════════════════ */
.search-wrap {
  display: flex;
  align-items: center;
  border-radius: 1.5rem;
  border: 2px solid var(--color-accent);
  background: white;
  padding-left: 0.75rem;
  height: 48px;
  margin-bottom: 1rem;
  transition: border-color .15s;
}
html[data-theme="dark"] .search-wrap { background: #1e3044; }
.search-wrap:hover { border-color: var(--color-secondary); }
.search-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  background: var(--color-base-300);
  border-radius: 12px;
  color: var(--color-secondary);
  font-size: 20px;
  margin-right: 8px;
  flex-shrink: 0;
}
html[data-theme="dark"] .search-icon { background: #2a3e52; }
.search-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text-primary);
}
.search-wrap input::placeholder { color: #6b7280; }

/* ══════════════════════════════════════════
   VIRTUAL LIST (services / countries)
══════════════════════════════════════════ */
.vlist-wrap {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 8px;
}

.vlist-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  height: 56px;
  cursor: pointer;
  transition: background .15s;
}
html[data-theme="dark"] .vlist-item { background: #1e3044; }
.vlist-item:hover { background: var(--color-hover); }
html[data-theme="dark"] .vlist-item:hover { background: #2a3e52; }
.vlist-item.active { background: var(--color-hover); }
html[data-theme="dark"] .vlist-item.active { background: #2a3e52; }

.vlist-left {
  display: flex;
  align-items: center;
  margin-left: 12px;
  margin-right: 8px;
  min-width: 0;
  overflow: hidden;
}
.vlist-icon {
  width: 32px; height: 32px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 6px;
  color: var(--color-primary);
}
.vlist-flag {
  width: 24px; height: 24px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: 6px;
  margin-right: 10px;
}
.vlist-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vlist-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  margin-right: 16px;
  flex-shrink: 0;
}
.vlist-price-pill {
  display: inline-flex;
  align-items: center;
  padding: 0 4px 0 8px;
  height: 24px;
  border-radius: 12px;
  background: var(--color-base-200);
  font-size: .9rem;
  font-weight: 600;
}
html[data-theme="dark"] .vlist-price-pill { background: #2e425b; }
.vlist-from { font-size: .75rem; font-weight: 500; margin-right: 4px; }
.vlist-count {
  font-size: .75rem;
  font-weight: 500;
  color: var(--color-green);
  margin-top: 4px;
  white-space: nowrap;
}

.show-all-btn {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--color-secondary);
  font-size: .875rem;
  font-weight: 500;
  padding: 6px 0;
  margin-top: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 12px;
  transition: background .15s;
}
.show-all-btn:hover { background: rgba(0,0,0,.04); }
html[data-theme="dark"] .show-all-btn { color: var(--text-primary); }

/* ══════════════════════════════════════════
   OPERATOR SECTION (Step 3)
══════════════════════════════════════════ */
.op-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border: 2px solid var(--color-info);
  border-radius: 20px;
  color: var(--text-primary);
  font-size: .875rem;
  font-weight: 500;
}
.op-placeholder svg { color: var(--color-secondary); flex-shrink: 0; }

.operator-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color .15s, background .15s;
}
html[data-theme="dark"] .operator-card { background: #1e3044; }
.operator-card:hover { border-color: var(--color-accent); background: var(--color-hover); }
html[data-theme="dark"] .operator-card:hover { background: #2a3e52; }
.operator-card.active { border-color: var(--color-accent); }

.operator-name { font-weight: 600; font-size: .9375rem; }
.operator-avail { font-size: .75rem; color: var(--color-green); }
.operator-price { font-size: 1.125rem; font-weight: 700; color: var(--color-secondary); }

/* Buy button */
.buy-btn {
  width: 100%;
  height: 52px;
  background: #1976d2;
  color: white;
  border: none;
  border-radius: 16px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 16px;
  cursor: pointer;
  transition: background .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.buy-btn:hover { background: #1565c0; }
.buy-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ══════════════════════════════════════════
   CONTENT AREA (right column)
══════════════════════════════════════════ */
.content-area {
  flex: 1;
}
@media (min-width: 1280px) {
  .content-area {
    grid-column: 2;
    grid-row: 1 / 4;
  }
}

/* ══════════════════════════════════════════
   FEATURES GRID
══════════════════════════════════════════ */
.features-intro {
  padding: 48px 24px 24px;
}
@media (min-width: 640px) { .features-intro { padding: 64px 48px 32px; } }

.features-intro h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-item {
  background: var(--color-base-100);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--color-divider);
  transition: border-color .15s;
}
.feature-item:hover { border-color: var(--color-accent); }
.feature-img { font-size: 2rem; }
.feature-item h3 { font-weight: 600; font-size: .9375rem; }
.feature-item p { font-size: .8125rem; color: var(--text-secondary); line-height: 1.5; }

/* ══════════════════════════════════════════
   WHO SECTION (chips)
══════════════════════════════════════════ */
.who-section { padding: 32px 24px; }
@media (min-width: 640px) { .who-section { padding: 32px 48px; } }
.who-section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 16px; }
.who-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.who-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 18px;
  border-radius: 50px;
  background: var(--color-base-100);
  border: 1px solid var(--color-divider);
  font-size: .875rem;
  color: var(--text-primary);
  font-weight: 500;
  transition: border-color .15s, color .15s;
}
.who-chip:hover { border-color: var(--color-accent); color: var(--color-secondary); }

/* ══════════════════════════════════════════
   HOW-TO SECTION
══════════════════════════════════════════ */
.howto-section { padding: 0 24px 48px; }
@media (min-width: 640px) { .howto-section { padding: 0 48px 64px; } }
.howto-section h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 24px; }

.howto-steps-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) { .howto-steps-wrap { grid-template-columns: repeat(3, 1fr); } }

.howto-step {
  background: var(--color-base-100);
  border-radius: 16px;
  padding: 20px;
  border: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.howto-num {
  width: 36px; height: 36px;
  background: #1976d2;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: .9375rem;
}
.howto-step h3 { font-weight: 600; }
.howto-step p  { font-size: .8125rem; color: var(--text-secondary); line-height: 1.5; }

/* ══════════════════════════════════════════
   WAITING OVERLAY
══════════════════════════════════════════ */
.waiting-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  background: rgba(21,37,54,.94);
  color: white;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s;
  z-index: 30;
}
@media (min-width: 1280px) {
  .waiting-overlay {
    position: absolute;
    border-radius: 0 0 16px 16px;
  }
}
.waiting-overlay.active { opacity: 1; pointer-events: auto; }
.waiting-box {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  padding: 48px 24px;
}
.waiting-img { font-size: 5rem; align-self: center; opacity: .6; }
.waiting-progress {
  width: 100%;
  height: 8px;
  background: #1976d2;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.waiting-progress-bar {
  height: 100%;
  width: 0;
  background: #42a5f5;
  border-radius: 999px;
  transition: width .5s;
}
.received-panel { margin-top: 16px; }
.received-code {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: 4px;
  text-align: center;
}
.received-text { text-align: center; color: #c5d9ea; font-size: .875rem; margin-top: 8px; }

/* ══════════════════════════════════════════
   BUTTONS (5sim style)
══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
  font-family: inherit;
  font-size: .9375rem;
  line-height: 1.5;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-ghost {
  background: transparent;
  color: white;
  padding: 4px 12px;
  height: 40px;
}
.btn-ghost:hover { background: rgba(0,0,0,.05); }

.btn-nav {
  background: transparent;
  color: white;
  padding: 4px 12px;
  height: 40px;
  font-size: .9375rem;
}
.btn-nav:hover { background: rgba(0,0,0,.05); }

.btn-register {
  background: transparent;
  color: #B5F2FF;
  border: 1px solid #B5F2FF;
  padding: 4px 12px;
  height: 40px;
  font-size: .9375rem;
}
.btn-register:hover { background: rgba(0,0,0,.15); border-color: white; }

.btn-blue {
  background: #1976d2;
  color: white;
  height: 44px;
  padding: 0 1rem;
}
.btn-blue:hover { background: #1565c0; }

.btn-light {
  background: var(--color-base-300);
  color: var(--text-primary);
  border: 2px solid var(--color-accent);
  height: 44px;
  padding: 0 1rem;
  font-weight: 500;
  letter-spacing: .025em;
  font-size: 1rem;
}
html[data-theme="dark"] .btn-light { background: #1e3044; color: #e2f1fd; border-color: #42a5f5; }
.btn-light:hover { background: var(--color-hover); border-color: #1565c0; }

.btn-support {
  background: #B5F2FF;
  color: #344a66;
  height: 44px;
  width: 100%;
  max-width: 18rem;
  font-size: 1rem;
  font-weight: 600;
}
.btn-support:hover { background: #BADCFA; }

.btn-sm-icon {
  width: 32px; height: 32px;
  background: var(--color-base-300);
  color: var(--text-primary);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
html[data-theme="dark"] .btn-sm-icon { background: #2a3e52; color: #e2f1fd; }
.btn-sm-icon:hover { background: var(--color-hover-dark); color: var(--color-accent); }

.btn-social {
  width: 40px; height: 40px;
  background: #1976d2;
  color: white;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
html[data-theme="dark"] .btn-social { background: #1565c0; }
.btn-social:hover { background: #1565c0; }

.btn-primary {
  background: #1976d2;
  color: white;
  height: 40px;
  padding: 0 16px;
}
.btn-primary:hover { background: #1565c0; }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--color-primary);
  height: 40px;
  padding: 0 16px;
}
.btn-outline:hover { border-color: var(--color-secondary); }

.btn-sm { height: 32px !important; font-size: .875rem; padding: 0 12px; }
.btn-lg { height: 52px !important; font-size: 1rem; padding: 0 24px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 12px; }

/* ══════════════════════════════════════════
   LANGUAGE BUTTON
══════════════════════════════════════════ */
.lang-btn {
  background: transparent;
  color: white;
  height: 40px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: .9375rem;
  font-weight: 600;
  border-radius: 12px;
  border: none;
  cursor: pointer;
}
.lang-btn:hover { background: rgba(0,0,0,.05); }
.lang-btn img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }

/* ══════════════════════════════════════════
   THEME TOGGLE
══════════════════════════════════════════ */
.theme-toggle {
  width: 82px; height: 40px;
  background: #F5F6F8;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px;
  cursor: pointer;
  transition: background .15s;
}
html[data-theme="dark"] .theme-toggle { background: #344A66; }
.theme-toggle-thumb {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.theme-toggle-thumb.active { background: var(--color-primary); color: white; }
html[data-theme="dark"] .theme-toggle-thumb.active { background: var(--color-secondary); }
.theme-icon { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; }

/* ══════════════════════════════════════════
   MOBILE DRAWER
══════════════════════════════════════════ */
.mobile-drawer {
  position: fixed;
  top: 56px; left: 0; bottom: 0;
  width: 280px;
  background: var(--color-base-200);
  box-shadow: 4px 0 20px rgba(0,0,0,.2);
  z-index: 50;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform .3s;
}
.mobile-drawer.open { transform: translateX(0); }
.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  top: 56px;
  background: rgba(0,0,0,.4);
  z-index: 40;
}
.drawer-overlay.open { display: block; }

.drawer-menu { padding: 8px 0; }
.drawer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-primary);
  transition: background .15s;
}
.drawer-item:hover { background: var(--color-hover); }
.drawer-item.active { background: var(--color-hover); }
.drawer-divider { height: 2px; background: var(--color-divider); margin: 4px 0; }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
footer {
  background: var(--color-base-300);
}
html[data-theme="dark"] footer { background: #2a3e52; }

@media (min-width: 1280px) {
  footer {
    border-radius: 24px;
    margin: 0 24px 24px;
  }
}

/* Mobile accordion footer */
.footer-mobile { display: block; }
@media (min-width: 768px) { .footer-mobile { display: none; } }

.footer-divider { height: 2px; background: var(--color-divider); margin: 0 24px; }
.footer-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 24px;
  background: transparent;
  border: none;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
}
.footer-accordion-btn:hover { background: rgba(21,37,54,.07); }
.footer-accordion-content {
  overflow: hidden;
  height: 0;
  transition: height .2s;
}
.footer-accordion-content a {
  display: block;
  padding: 6px 24px;
  color: var(--text-primary);
  font-size: .9375rem;
  transition: color .15s;
}
.footer-accordion-content a:hover { color: var(--color-accent); }

/* Desktop footer */
.footer-desktop {
  display: none;
  padding: 48px 48px 0;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
}
@media (min-width: 768px) { .footer-desktop { display: grid; } }
.footer-col h4 { font-size: 1.125rem; font-weight: 600; margin-bottom: 8px; }
.footer-col a {
  display: block;
  padding: 6px 0;
  font-size: .9375rem;
  color: var(--text-primary);
  transition: color .15s;
}
.footer-col a:hover { color: var(--color-accent); }

.footer-divider-line {
  height: 2px;
  background: var(--color-divider);
  margin: 32px 48px 0;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 16px 24px 24px;
  gap: 12px;
  font-size: .875rem;
}
@media (min-width: 768px) { .footer-bottom { padding: 16px 48px 32px; } }

.social-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ══════════════════════════════════════════
   AUTH PAGES (5sim style)
══════════════════════════════════════════ */
.auth-wrap {
  background: white;
  padding: 64px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (min-width: 640px) { .auth-wrap { padding: 64px 48px; border-radius: 24px; margin: 24px; } }
html[data-theme="dark"] .auth-wrap { background: #1e2e3e; }

.auth-inner { width: 100%; max-width: 320px; }
.auth-title { font-size: 1.875rem; font-weight: 600; text-align: center; margin-bottom: 24px; }

.auth-google-btn {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-radius: 8px;
  border: none;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
  cursor: pointer;
  transition: box-shadow .15s;
  margin-bottom: 24px;
}
.auth-google-btn:hover { box-shadow: 0 2px 4px rgba(0,0,0,.08); }
.auth-google-btn span {
  flex: 1;
  text-align: center;
  color: #757575;
  font-weight: 500;
  font-size: 1.0938rem;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  font-weight: 500;
  font-size: .8125rem;
  color: var(--text-primary);
  margin-bottom: 24px;
}
.auth-or::before, .auth-or::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--color-divider);
}

/* Floating label input (5sim style) */
.field-wrap {
  position: relative;
  width: 100%;
  border-radius: 8px;
  background: white;
  margin-bottom: 16px;
}
html[data-theme="dark"] .field-wrap { background: #1e3044; }
.field-wrap:hover fieldset { border-color: var(--color-accent) !important; }
.field-label {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  font-size: 1rem;
  color: var(--text-primary);
  transition: all .15s;
}
.field-wrap.has-value .field-label,
.field-wrap:focus-within .field-label {
  top: 8px;
  transform: none;
  font-size: .75rem;
}
.field-input {
  width: 100%;
  padding: 20px 14px 8px;
  background: transparent;
  border: none;
  outline: none;
  font-size: 1rem;
  color: var(--text-primary);
  border-radius: 8px;
}
.field-input::placeholder { color: transparent; }
.field-wrap:focus-within .field-input::placeholder { color: #9ca3af; }
.field-fieldset {
  position: absolute;
  inset: -5px 0 0;
  border: 2px solid rgba(0,0,0,.23);
  border-radius: 8px;
  pointer-events: none;
  padding: 0 8px;
  transition: border-color .15s;
}
html[data-theme="dark"] .field-fieldset { border-color: rgba(255,255,255,.23); }
.field-wrap:focus-within .field-fieldset { border-color: var(--color-accent); }
.field-fieldset legend {
  height: 0;
  font-size: .75rem;
  line-height: 0;
  opacity: 0;
  transition: width .15s;
  white-space: nowrap;
  overflow: hidden;
  width: 0;
}
.field-wrap.has-value .field-fieldset legend,
.field-wrap:focus-within .field-fieldset legend {
  width: auto;
}
.field-fieldset legend span { padding: 0 5px; display: inline-block; }

.field-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(0,0,0,.5);
  font-size: 1.5rem;
  display: flex; align-items: center;
}
html[data-theme="dark"] .field-toggle { color: rgba(255,255,255,.5); }

.forgot-link {
  display: inline-flex;
  align-items: center;
  color: var(--color-secondary);
  font-size: .9375rem;
  margin: 16px 0;
  align-self: flex-end;
  transition: color .15s;
}
.forgot-link:hover { color: var(--color-primary); }
html[data-theme="dark"] .forgot-link { color: var(--text-primary); }

.auth-submit {
  width: 100%;
  height: 40px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: .9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  margin-top: 24px;
}
.auth-submit:hover { background: var(--color-secondary); }

.auth-link-line {
  text-align: center;
  margin-top: 24px;
  font-size: .9375rem;
}
.auth-link-line a {
  color: var(--color-secondary);
  font-size: .9375rem;
  padding: 0 2px;
  transition: color .15s;
}
.auth-link-line a:hover { color: var(--color-primary); }
html[data-theme="dark"] .auth-link-line a { color: var(--text-primary); }

/* ══════════════════════════════════════════
   ALERT
══════════════════════════════════════════ */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: .875rem;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.alert-error   { background: rgba(229,57,53,.1);  border: 1px solid rgba(229,57,53,.3);  color: #e53935; }
.alert-success { background: rgba(0,192,54,.1);   border: 1px solid rgba(0,192,54,.3);   color: #00c036; }
.alert-warning { background: rgba(243,142,60,.1); border: 1px solid rgba(243,142,60,.3); color: #f38e3c; }
.alert-info    { background: rgba(66,165,245,.1); border: 1px solid rgba(66,165,245,.3); color: #42a5f5; }

/* ══════════════════════════════════════════
   FORM CONTROLS (legacy — dashboard/admin)
══════════════════════════════════════════ */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: .8125rem; font-weight: 500; margin-bottom: 6px; color: var(--text-primary); }
.form-control {
  width: 100%;
  padding: 10px 14px;
  background: var(--color-base-100);
  border: 1px solid var(--color-divider);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: .875rem;
  outline: none;
  transition: border-color .15s;
}
.form-control:focus { border-color: var(--color-accent); box-shadow: 0 0 0 3px rgba(66,165,245,.15); }
.form-control::placeholder { color: #9ca3af; }
.form-control.is-invalid { border-color: var(--red); }
.form-error { color: var(--red); font-size: .75rem; margin-top: 4px; }

select.form-control {
  appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='%236b8cad'%3E%3Cpath d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* ══════════════════════════════════════════
   DASHBOARD LAYOUT
══════════════════════════════════════════ */
.dash-layout { display: flex; min-height: calc(100vh - 56px); }
.dash-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--color-base-200);
  border-right: 1px solid var(--color-divider);
  padding: 24px 0;
  position: sticky; top: 56px;
  height: calc(100vh - 56px);
  overflow-y: auto;
}
.dash-sidebar-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 20px;
  color: var(--text-secondary);
  font-size: .875rem; font-weight: 500;
  cursor: pointer;
  transition: color .15s, background .15s;
  border-left: 3px solid transparent;
}
.dash-sidebar-item:hover { background: var(--color-hover); color: var(--text-primary); }
.dash-sidebar-item.active { color: var(--color-secondary); background: var(--accent-dim); border-left-color: var(--color-secondary); }
.dash-sidebar-section { padding: 10px 20px 4px; font-size: .625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); }
.dash-main { flex: 1; padding: 28px; overflow: auto; }

/* ══════════════════════════════════════════
   STAT CARDS
══════════════════════════════════════════ */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--color-divider);
  border-radius: 14px; padding: 22px;
}
.stat-card-label { font-size: .75rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.stat-card-value { font-size: 1.625rem; font-weight: 800; margin-bottom: 4px; }
.stat-card-sub   { font-size: .75rem; color: var(--text-muted); }
.stat-card.accent { border-color: rgba(66,165,245,.3); background: rgba(66,165,245,.08); }
.stat-card.accent .stat-card-value { color: var(--color-accent); }
.stat-card.green  { border-color: rgba(0,192,54,.3); background: rgba(0,192,54,.08); }
.stat-card.green  .stat-card-value { color: var(--color-green); }

/* ══════════════════════════════════════════
   DATA TABLES
══════════════════════════════════════════ */
.table-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--color-divider);
  border-radius: 14px; overflow: hidden;
}
.table-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-divider);
  display: flex; justify-content: space-between; align-items: center;
}
.table-title { font-size: .9375rem; font-weight: 700; }
table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 12px 16px; text-align: left;
  font-size: .6875rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--text-secondary);
  background: var(--color-base-200);
  border-bottom: 1px solid var(--color-divider);
}
tbody td {
  padding: 13px 16px; font-size: .8125rem;
  border-bottom: 1px solid var(--color-divider);
  color: var(--text-primary);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--color-hover); }

/* ══════════════════════════════════════════
   BADGES
══════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 50px;
  font-size: .6875rem; font-weight: 700; text-transform: uppercase;
}
.badge::before { content: '●'; font-size: 8px; }
.badge-waiting   { background: rgba(243,142,60,.1); color: #f38e3c; }
.badge-received  { background: rgba(0,192,54,.1);   color: #00c036; }
.badge-cancelled { background: rgba(229,57,53,.1);  color: #e53935; }
.badge-refunded  { background: rgba(108,117,125,.12); color: #8c9ab5; }
.badge-pending   { background: rgba(66,165,245,.1); color: #42a5f5; }
.badge-active    { background: rgba(0,192,54,.1);   color: #00c036; }
.badge-banned    { background: rgba(229,57,53,.1);  color: #e53935; }

/* ══════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════ */
.pagination { display: flex; align-items: center; gap: 4px; padding: 16px 20px; border-top: 1px solid var(--color-divider); }
.page-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; border: 1px solid var(--color-divider);
  font-size: .8125rem; color: var(--text-secondary); cursor: pointer;
  transition: all .15s; background: transparent;
}
.page-btn:hover { border-color: var(--color-accent); color: var(--color-accent); }
.page-btn.active { background: var(--color-secondary); border-color: var(--color-secondary); color: white; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ══════════════════════════════════════════
   MODAL
══════════════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.6);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 24px; opacity: 0; pointer-events: none; transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal {
  background: var(--color-base-100);
  border-radius: 20px; width: 100%; max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
  transform: scale(.96) translateY(10px); transition: transform .2s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 20px 24px; border-bottom: 1px solid var(--color-divider);
  display: flex; justify-content: space-between; align-items: center;
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close {
  width: 30px; height: 30px; background: var(--color-hover);
  border: none; border-radius: 50%; cursor: pointer;
  font-size: 1rem; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: var(--red-dim); color: var(--red); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--color-divider); display: flex; justify-content: flex-end; gap: 10px; }

/* ══════════════════════════════════════════
   CODE / API DOCS
══════════════════════════════════════════ */
pre, .code-block {
  background: #0d1117; border: 1px solid var(--color-divider);
  border-radius: 10px; padding: 18px;
  font-family: 'Courier New', monospace; font-size: .8125rem;
  color: #79c0ff; overflow-x: auto; line-height: 1.6;
}

/* ══════════════════════════════════════════
   ADMIN
══════════════════════════════════════════ */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 250px; background: #0e1e2e;
  border-right: 1px solid var(--color-divider);
  flex-shrink: 0; position: sticky; top: 0;
  height: 100vh; overflow-y: auto;
}
.admin-sidebar-logo {
  padding: 18px 20px; border-bottom: 1px solid var(--color-divider);
  font-size: 1.125rem; font-weight: 800; color: white;
}
.admin-sidebar-logo small { display: block; font-size: .625rem; font-weight: 400; color: #8fadc8; }
.admin-nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 20px; color: #8fadc8;
  font-size: .8125rem; font-weight: 500; cursor: pointer;
  transition: all .15s; border-left: 3px solid transparent;
}
.admin-nav-item:hover { background: rgba(255,255,255,.04); color: #e2f1fd; }
.admin-nav-item.active { background: rgba(66,165,245,.1); color: #42a5f5; border-left-color: #42a5f5; }
.admin-nav-section { padding: 12px 20px 4px; font-size: .5625rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: #6b8cad; }
.admin-main { flex: 1; padding: 28px; background: var(--color-base-200); overflow: auto; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.admin-page-title { font-size: 1.375rem; font-weight: 800; }

/* ══════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════ */
.text-accent    { color: var(--color-accent); }
.text-green     { color: var(--color-green); }
.text-red       { color: var(--red); }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-bold      { font-weight: 700; }
.font-mono      { font-family: 'Courier New', monospace; }
.mt-1  { margin-top: 8px; }
.mt-2  { margin-top: 16px; }
.mt-3  { margin-top: 24px; }
.mb-1  { margin-bottom: 8px; }
.mb-2  { margin-bottom: 16px; }
.mb-3  { margin-bottom: 24px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.w-full { width: 100%; }
.text-center { text-align: center; }
.d-none { display: none !important; }
.hidden { display: none !important; }

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--color-divider);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.pulse-dot {
  width: 8px; height: 8px;
  background: var(--color-green);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%  { box-shadow: 0 0 0 0 rgba(0,192,54,.7); }
  70% { box-shadow: 0 0 0 8px rgba(0,192,54,0); }
  100%{ box-shadow: 0 0 0 0 rgba(0,192,54,0); }
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 768px) {
  .dash-layout { flex-direction: column; }
  .dash-sidebar {
    width: 100%; height: auto; position: static;
    display: flex; overflow-x: auto; padding: 12px;
    flex-direction: row;
  }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; }
}
