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

:root {
  --bg: #020617;
  --card: rgba(15, 23, 42, .6);
  --card-border: rgba(255, 255, 255, .1);
  --card-hover: rgba(255, 255, 255, .15);
  --input-bg: rgba(2, 6, 23, .5);
  --green-1: #4ade80;
  --green-2: #22c55e;
  --green-3: #059669;
  --teal: #2dd4bf;
  --text: #f1f5f9;
  --text-dim: rgba(255, 255, 255, .5);
  --text-faint: rgba(255, 255, 255, .3);
  --text-ghost: rgba(255, 255, 255, .12);
  --error: #f87171;
  --warn: #fbbf24;
  --sidebar-width: 220px;
}
body.sidebar-collapsed {
  --sidebar-width: 68px;
}

html, body {
  min-height: 100vh;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-text-size-adjust: 100%;
}

a, button, input { -webkit-tap-highlight-color: transparent; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--green-1);
  outline-offset: 3px;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Ambient Background */
.bg-glow { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.bg-glow::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 400px;
  background: linear-gradient(to bottom, rgba(20, 83, 45, .18), transparent);
}
.bg-glow .blob1 {
  position: absolute; top: -12%; right: -15%; width: 70%; height: 50%;
  background: rgba(16, 185, 129, .12); border-radius: 50%; filter: blur(80px);
  animation: drift 6s ease-in-out infinite;
}
.bg-glow .blob2 {
  position: absolute; bottom: -10%; left: -10%; width: 60%; height: 45%;
  background: rgba(20, 184, 166, .08); border-radius: 50%; filter: blur(80px);
  animation: drift 6s ease-in-out infinite 2s;
}
@keyframes drift {
  0%, 100% { opacity: 1; transform: translate(0, 0); }
  50% { opacity: .5; transform: translate(10px, -10px); }
}

.page { position: relative; z-index: 1; display: flex; flex-direction: column; min-height: 100vh; }

/* HEADER */
.header-wrap { padding: 16px; max-width: 1400px; width: 100%; margin: 0 auto; }
.header {
  background: var(--card); border: 1px solid var(--card-border); border-radius: 16px;
  padding: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.hamburger {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: 10px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
  color: var(--text); cursor: pointer; font-family: inherit; flex-shrink: 0;
  transition: background .2s ease, border-color .2s ease;
}
.hamburger:hover { background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .25); }
.hamburger svg { width: 18px; height: 18px; color: var(--green-1); }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.logo-box {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--green-1), var(--green-3));
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(34, 197, 94, .25); flex-shrink: 0;
}
.logo-box svg { width: 22px; height: 22px; color: #fff; }
.brand .wordmark-block { display: flex; flex-direction: column; gap: 2px; line-height: 1; }
.brand .wordmark { font-size: 16px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.brand .subtitle {
  font-size: 9px; font-weight: 600; color: var(--text-faint);
  letter-spacing: 2px; text-transform: uppercase;
}
.header .brand { margin-right: auto; }
.header .brand .wordmark-block { display: flex; }

.header-account {
  display: inline-flex; align-items: center; gap: 8px; font-family: inherit;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px; padding: 0 4px 0 12px; height: 40px;
  color: var(--text); text-decoration: none; cursor: pointer;
  transition: background .2s ease, border-color .2s ease;
}
.header-account:hover { background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .25); }
.header-account .phone {
  font-family: 'JetBrains Mono', monospace; font-size: 12px; font-weight: 500; color: var(--text);
}
.header-account .logout-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 999px; background: rgba(255, 255, 255, .04);
  transition: background .2s ease, color .2s ease;
}
.header-account:hover .logout-btn { background: rgba(248, 113, 113, .12); }
.header-account .logout-btn svg { width: 14px; height: 14px; color: var(--text-dim); transition: color .2s ease; }
.header-account:hover .logout-btn svg { color: var(--error); }

.header-help {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--text-dim);
  text-decoration: none; height: 40px; padding: 0 14px; border-radius: 999px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
  transition: color .2s ease, background .2s ease, border-color .2s ease;
}
.header-help:hover { color: var(--text); background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .25); }
.header-help svg { width: 14px; height: 14px; color: var(--green-1); }

/* BODY */
.body-wrap {
  flex: 1; max-width: 1400px; width: 100%; margin: 0 auto;
  padding: 0 16px 16px; display: flex; gap: 16px;
}

/* SIDEBAR */
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(2, 6, 23, .7);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease; z-index: 40;
}
.sidebar-backdrop.show { opacity: 1; visibility: visible; }

.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: 280px; max-width: 85vw;
  background: rgba(8, 13, 26, .92); border-right: 1px solid var(--card-border);
  padding: 18px 14px; display: flex; flex-direction: column; gap: 20px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transform: translateX(-105%);
  transition: transform .3s cubic-bezier(.2, .9, .2, 1); z-index: 50;
}
.sidebar.show { transform: translateX(0); }

.sidebar-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sidebar-top .brand .wordmark-block { display: flex; }
.sidebar-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08);
  color: var(--text); cursor: pointer; font-family: inherit;
  transition: background .2s ease, border-color .2s ease;
}
.sidebar-close:hover { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .3); color: var(--error); }
.sidebar-close svg { width: 14px; height: 14px; }

.sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 0 6px; margin-top: 4px;
}
.sidebar-eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--text-faint);
}
.sidebar-nav { display: flex; flex-direction: column; gap: 4px; }
.sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 12px;
  color: var(--text-dim); text-decoration: none;
  font-size: 14px; font-weight: 500;
  transition: background .2s ease, color .2s ease;
}
.sidebar-link svg { width: 18px; height: 18px; color: var(--text-faint); flex-shrink: 0; transition: color .2s ease; }
.sidebar-link:hover { background: rgba(255, 255, 255, .04); color: var(--text); }
.sidebar-link:hover svg { color: var(--text); }
.sidebar-link.active {
  background: linear-gradient(135deg, rgba(74, 222, 128, .14), rgba(34, 197, 94, .07));
  color: var(--green-1); border: 1px solid rgba(34, 197, 94, .25);
  padding: 9px 11px; font-weight: 600;
}
.sidebar-link.active svg { color: var(--green-1); }
.sidebar-link.temporary { position: relative; }
.sidebar-link.temporary .badge-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--warn); margin-left: auto;
  box-shadow: 0 0 8px rgba(251, 191, 36, .5); flex-shrink: 0;
}
.sidebar-link.temporary.active {
  background: linear-gradient(135deg, rgba(251, 191, 36, .12), rgba(251, 191, 36, .04));
  color: var(--warn); border: 1px solid rgba(251, 191, 36, .25);
}
.sidebar-link.temporary.active svg { color: var(--warn); }
.sidebar-link.temporary.active .badge-dot { background: var(--warn); }

.sidebar-footer {
  margin-top: auto; padding: 14px 12px; font-size: 11px;
  color: var(--text-faint); border-top: 1px solid var(--card-border);
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-footer-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow: hidden; }
.sidebar-footer .phone-mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text-dim); }

.sidebar-collapse-btn {
  flex-shrink: 0; width: 28px; height: 28px;
  border-radius: 7px; background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08); color: var(--text-dim);
  cursor: pointer; display: none; align-items: center; justify-content: center;
  font-family: inherit;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.sidebar-collapse-btn:hover {
  background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .25); color: var(--green-1);
}
.sidebar-collapse-btn svg { width: 14px; height: 14px; transition: transform .3s cubic-bezier(.2, .9, .2, 1); }

/* MAIN */
.main { flex: 1; min-width: 0; padding: 8px 0 0; }
.main-content { padding-bottom: 24px; }

/* Page Head / Welcome */
.welcome { margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.page-head { margin-bottom: 18px; }
.welcome-text, .page-head { min-width: 0; }
.eyebrow {
  font-size: 10px; font-weight: 600; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px;
}
.welcome h1, .page-head h1 {
  font-size: 24px; font-weight: 700; color: #fff;
  letter-spacing: -0.02em; line-height: 1.15;
}
.welcome h1 .accent, .page-head h1 .accent {
  background: linear-gradient(135deg, var(--green-1), var(--teal));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.welcome h1 .accent.warn, .page-head h1 .accent.warn {
  background: linear-gradient(135deg, var(--warn), #f59e0b);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.welcome-sub, .page-head p {
  font-size: 13px; color: var(--text-dim); line-height: 1.5; margin-top: 8px; max-width: 640px;
}

/* COMPONENTS */
/* Cards */
.card {
  position: relative; background: var(--card); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 20px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  overflow: hidden; margin-bottom: 14px;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 70px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .03), transparent);
  pointer-events: none; border-radius: 20px 20px 0 0;
}
.table-card {
  position: relative; width: 100%;
  background: var(--card); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 0;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}
.table-card::before { display: none; }
.card-head {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 18px; position: relative;
}
.card-head-text h2, .card-head-text h3 {
  font-size: 17px; font-weight: 700; color: #fff;
  letter-spacing: -0.005em; margin-bottom: 3px;
}
.card-head-text p { font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.card-head-icon {
  width: 44px; height: 44px; border-radius: 12px;
  background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .25);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.card-head-icon svg { width: 20px; height: 20px; color: var(--green-1); }
.card-head-icon.warn { background: rgba(251, 191, 36, .1); border-color: rgba(251, 191, 36, .25); }
.card-head-icon.warn svg { color: var(--warn); }

/* Buttons */
.btn-primary {
  width: 100%; height: 56px; padding: 0 24px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, var(--green-1), var(--green-3));
  color: #fff; font-family: inherit; font-size: 14px; font-weight: 700;
  letter-spacing: .5px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 8px 24px rgba(34, 197, 94, .25);
  transition: transform .15s ease, box-shadow .2s ease; text-decoration: none;
}
.btn-primary:hover { box-shadow: 0 12px 32px rgba(34, 197, 94, .35); }
.btn-primary:active { transform: scale(.97); }
.btn-primary svg { width: 16px; height: 16px; }

.btn-secondary {
  width: 100%; height: 56px; padding: 0 24px;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 14px; color: var(--text); font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .2s ease, border-color .2s ease; text-decoration: none;
}
.btn-secondary:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .2); }
.btn-secondary svg { width: 16px; height: 16px; color: var(--text-dim); }

.btn-green-outline {
  width: 100%; height: 46px; padding: 0 18px;
  border: 1px solid rgba(34, 197, 94, .25); border-radius: 12px;
  background: rgba(34, 197, 94, .06); color: var(--green-1);
  font-family: inherit; font-size: 13px; font-weight: 700;
  text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s ease, border-color .2s ease; position: relative;
}
.btn-green-outline:hover { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .4); }
.btn-green-outline svg { width: 14px; height: 14px; }

.btn-danger-outline {
  height: 38px; padding: 0 14px;
  border: 1px solid rgba(248, 113, 113, .25); border-radius: 10px;
  background: transparent; color: var(--error);
  font-family: inherit; font-size: 12px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; transition: background .2s ease, border-color .2s ease;
}
.btn-danger-outline:hover { background: rgba(248, 113, 113, .08); border-color: rgba(248, 113, 113, .4); }
.btn-danger-outline svg { width: 12px; height: 12px; }

.copy-btn {
  flex-shrink: 0; height: 48px; padding: 0 16px;
  border: none; border-radius: 12px;
  background: linear-gradient(135deg, var(--green-1), var(--green-3));
  color: #fff; font-family: inherit; font-size: 13px; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; gap: 7px;
  box-shadow: 0 4px 12px rgba(34, 197, 94, .22);
  transition: transform .15s ease, box-shadow .2s ease;
}
.copy-btn:hover { box-shadow: 0 8px 22px rgba(34, 197, 94, .32); }
.copy-btn:active { transform: scale(.97); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.copied { background: linear-gradient(135deg, #34d399, var(--green-3)); }
.copy-btn.copied .copy-icon { display: none; }
.copy-btn .check-icon { display: none; }
.copy-btn.copied .check-icon { display: inline-flex; }

.copy-btn-sm {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--card-border); background: rgba(255, 255, 255, .03);
  color: var(--text-dim); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.copy-btn-sm:hover { background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .25); color: var(--green-1); }
.copy-btn-sm.copied { background: rgba(34, 197, 94, .12); border-color: rgba(34, 197, 94, .4); color: var(--green-1); }
.copy-btn-sm svg { width: 12px; height: 12px; }
.copy-btn-sm .check-icon { display: none; }
.copy-btn-sm.copied .copy-icon { display: none; }
.copy-btn-sm.copied .check-icon { display: inline-flex; }

/* Forms & Inputs */
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label, .field-label {
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-faint); margin-bottom: 6px;
}
.form-hint { font-size: 11px; color: var(--text-faint); line-height: 1.5; }
.input {
  height: 48px; padding: 0 14px; border-radius: 12px;
  background: var(--input-bg); border: 1px solid var(--card-border);
  color: var(--text); font-family: inherit; font-size: 15px; font-weight: 400;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.input::placeholder { color: rgba(255, 255, 255, .22); }
.input:focus {
  outline: none; border-color: var(--green-2); background: rgba(2, 6, 23, .7);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}

.input-with-toggle { position: relative; }
.input-with-toggle .input { width: 100%; padding-right: 48px; }
.input-toggle-btn {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 8px;
  background: transparent; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-faint);
  transition: color .2s ease, background .2s ease;
}
.input-toggle-btn:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.input-toggle-btn:focus-visible { outline: 2px solid var(--green-1); outline-offset: 2px; border-radius: 8px; }
.input-toggle-btn svg { width: 18px; height: 18px; }
.input-toggle-btn .icon-hide { display: none; }
.input-toggle-btn.showing .icon-show { display: none; }
.input-toggle-btn.showing .icon-hide { display: inline-flex; }

.select {
  height: 48px; padding: 0 40px 0 14px; border-radius: 12px;
  background: var(--input-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.4)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 14px center;
  border: 1px solid var(--card-border);
  color: var(--text); font-family: inherit; font-size: 15px; font-weight: 400;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
  appearance: none; -webkit-appearance: none;
}
.select:focus {
  outline: none; border-color: var(--green-2); background-color: rgba(2, 6, 23, .7);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .12);
}
.select option { background: #0f172a; color: #fff; }

/* Form utilities */
.field-optional {
  font-size: 10px; font-weight: 500; letter-spacing: 1px;
  color: var(--text-faint); margin-left: 6px; text-transform: none;
}
.input-mono { font-family: 'JetBrains Mono', monospace; letter-spacing: 0; }
.form-row.has-error .input,
.form-row.has-error .select {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(248, 113, 113, .12);
}
.field-error-text {
  font-size: 11px; color: var(--error); font-weight: 500;
  line-height: 1.4; margin-top: 2px; display: none;
}
.form-row.has-error .field-error-text { display: block; }
.form-row.has-error .form-hint { display: none; }

/* Card links — used below auth forms (login, signup) */
.card-links {
  margin-top: 22px; display: flex; flex-direction: column;
  gap: 12px; text-align: center;
}
.card-links p { font-size: 13px; color: var(--text-dim); line-height: 1.4; }
.card-links a {
  color: var(--green-1); text-decoration: underline;
  text-decoration-color: rgba(74, 222, 128, .4);
  text-underline-offset: 3px; font-weight: 600;
}
.card-links a:hover { text-decoration-color: var(--green-1); }
.card-divider { height: 1px; background: var(--card-border); margin: 4px 0; }

.save-state {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--green-1); font-weight: 600;
  opacity: 0; transition: opacity .2s ease;
}
.save-state.show { opacity: 1; }
.save-state svg { width: 14px; height: 14px; }

/* Vouchers */
.voucher-input {
  width: 100%; height: 56px; padding: 0 16px;
  background: var(--input-bg); border: 1px solid rgba(34, 197, 94, .25);
  border-radius: 14px; font-family: 'JetBrains Mono', monospace;
  font-size: 18px; font-weight: 700; letter-spacing: 2px; color: var(--green-1);
  text-transform: none; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.voucher-input::placeholder {
  color: var(--text-faint); font-weight: 500; letter-spacing: 1px;
  text-transform: uppercase; font-size: 14px;
}
.voucher-input:focus {
  outline: none; border-color: var(--green-1); background: rgba(34, 197, 94, .04);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
}

/* Icon Rows */
.icon-row { display: flex; gap: 12px; margin-bottom: 16px; align-items: flex-start; position: relative; }
.icon-row-box {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.icon-row-box.green { background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .25); }
.icon-row-box.green svg { width: 18px; height: 18px; color: var(--green-1); }
.icon-row-box.warn { background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .25); }
.icon-row-box.warn svg { width: 18px; height: 18px; color: var(--warn); }
.icon-row-box.teal { background: rgba(45, 212, 191, .08); border: 1px solid rgba(45, 212, 191, .2); }
.icon-row-box.teal svg { width: 18px; height: 18px; color: var(--teal); }

.icon-row-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.icon-row-text h2, .icon-row-text h3 { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 0; }
.icon-row-text p { font-size: 12px; color: var(--text-dim); line-height: 1.45; }

/* Info Rows (Key/Value Lists) */
.info-rows { display: flex; flex-direction: column; position: relative; }
.info-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; }
.info-row + .info-row { border-top: 1px solid var(--text-ghost); }
.info-row .label { font-size: 12px; font-weight: 600; color: var(--text-dim); }
.info-row .value {
  font-family: 'JetBrains Mono', monospace; font-size: 13px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.info-row .value-group { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.info-row .value-group .value { flex-shrink: 1; }

/* Info Grid / Cards */
.info-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 14px;}
.info-card {
  position: relative; background: rgba(255, 255, 255, .02);
  border: 1px solid var(--card-border); border-radius: 14px; padding: 16px;
  display: flex; gap: 14px; align-items: flex-start;
}
.info-card-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: rgba(45, 212, 191, .08); border: 1px solid rgba(45, 212, 191, .2);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.info-card-icon svg { width: 16px; height: 16px; color: var(--teal); }
.info-card-text { min-width: 0; }
.info-card-text .label {
  font-size: 9px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--teal); margin-bottom: 4px;
}
.info-card-text h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 4px; letter-spacing: -.005em; }
.info-card-text p { font-size: 12px; color: var(--text-dim); line-height: 1.5; }

/* Status Pill */
.status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; padding: 3px 8px; border-radius: 6px;
  font-family: 'JetBrains Mono', monospace; line-height: 1.2;
}
.status-pill.success { color: var(--green-1); background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .3); }
.status-pill.pending { color: var(--warn); background: rgba(251, 191, 36, .08); border: 1px solid rgba(251, 191, 36, .3); }
.status-pill.failed { color: var(--error); background: rgba(248, 113, 113, .08); border: 1px solid rgba(248, 113, 113, .3); }
.status-pill .dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* Result Panel */
.result-panel {
  margin-top: 14px; padding: 14px 16px; border-radius: 12px;
  display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5;
}
.result-panel.success { background: rgba(34, 197, 94, .06); border: 1px solid rgba(34, 197, 94, .25); color: var(--text); }
.result-panel.success .result-icon { background: rgba(34, 197, 94, .15); border-color: rgba(34, 197, 94, .35); }
.result-panel.success .result-icon svg { color: var(--green-1); }
.result-panel.error { background: rgba(248, 113, 113, .06); border: 1px solid rgba(248, 113, 113, .25); color: var(--text); }
.result-panel.error .result-icon { background: rgba(248, 113, 113, .15); border-color: rgba(248, 113, 113, .35); }
.result-panel.error .result-icon svg { color: var(--error); }
.result-icon {
  width: 32px; height: 32px; border-radius: 9px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--card-border);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.result-icon svg { width: 14px; height: 14px; }
.result-text { min-width: 0; }
.result-text strong { display: block; color: #fff; font-weight: 700; margin-bottom: 2px; }
.result-panel.form-top { margin-top: 0; margin-bottom: 18px; }

/* STAT CARDS ROW */
.stats-row {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 12px; margin-bottom: 16px;
}
.stat-card {
  position: relative; background: var(--card); border: 1px solid var(--card-border);
  border-radius: 18px; padding: 16px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  display: flex; flex-direction: column; gap: 8px; overflow: hidden; min-width: 0;
}
.stat-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 54px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .035), transparent);
  pointer-events: none; border-radius: 18px 18px 0 0;
}
.stat-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; position: relative;
}
.stat-label {
  font-size: 10px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: var(--text-faint);
}
.stat-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(34, 197, 94, .1); border: 1px solid rgba(34, 197, 94, .2);
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.stat-icon svg { width: 13px; height: 13px; color: var(--green-1); }
.stat-icon.teal { background: rgba(45, 212, 191, .1); border-color: rgba(45, 212, 191, .25); }
.stat-icon.teal svg { color: var(--teal); }
.stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 26px; font-weight: 700; color: #fff;
  line-height: 1; letter-spacing: -0.5px;
  display: inline-flex; align-items: baseline; gap: 3px; position: relative;
}
.stat-value .unit { font-size: 12px; font-weight: 500; color: var(--text-dim); letter-spacing: 0; }
.stat-value .sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; font-weight: 500; color: var(--text-faint);
}
.stat-hint { font-size: 11px; color: var(--text-dim); line-height: 1.4; position: relative; }
.stat-hint strong { color: var(--green-1); font-weight: 600; }

.mini-bar {
  height: 4px; background: rgba(255, 255, 255, .06);
  border-radius: 999px; overflow: hidden; position: relative;
}
.mini-bar-fill {
  height: 100%; background: linear-gradient(to right, var(--teal), #0ea5a0);
  border-radius: 999px; transition: width .5s ease;
}
.mini-bar-fill.green { background: linear-gradient(to right, var(--green-1), var(--green-3)); }

/* LISTS & TABLES */
.empty-state {
  padding: 56px 24px; text-align: center; display: none;
  flex-direction: column; align-items: center; gap: 14px;
}
.empty-state.show { display: flex; }
.empty-state .empty-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(34, 197, 94, .06); border: 1px dashed rgba(34, 197, 94, .25);
  display: flex; align-items: center; justify-content: center;
}
.empty-state .empty-icon svg { width: 26px; height: 26px; color: var(--green-1); }
.empty-state h3 { font-size: 17px; font-weight: 700; color: #fff; }
.empty-state p { font-size: 13px; color: var(--text-dim); max-width: 320px; line-height: 1.5; }
.empty-state a {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 18px;
  background: linear-gradient(135deg, var(--green-1), var(--green-3));
  color: #fff; text-decoration: none; border-radius: 12px; font-size: 13px; font-weight: 700;
  box-shadow: 0 4px 14px rgba(34, 197, 94, .25);
  transition: transform .15s ease, box-shadow .2s ease; margin-top: 4px;
}
.empty-state a:hover { box-shadow: 0 8px 22px rgba(34, 197, 94, .35); }
.empty-state a:active { transform: scale(.98); }
.empty-state a svg { width: 14px; height: 14px; }

.pagination {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 16px; border-top: 1px solid var(--card-border);
}
.page-btn {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 9px;
  background: rgba(255, 255, 255, .03); border: 1px solid var(--card-border);
  color: var(--text-dim); font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.page-btn:hover:not(:disabled):not(.active) {
  background: rgba(34, 197, 94, .08); border-color: rgba(34, 197, 94, .25); color: var(--text);
}
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-btn.active {
  background: linear-gradient(135deg, var(--green-1), var(--green-3));
  border-color: transparent; color: #fff; cursor: default;
  box-shadow: 0 4px 12px rgba(34, 197, 94, .25);
}
.page-btn svg { width: 12px; height: 12px; }
.page-info { font-size: 12px; color: var(--text-faint); padding: 0 8px; font-family: 'JetBrains Mono', monospace; }

/* SUBSCRIPTION HISTORY */
.history-head-row {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
  gap: 10px; margin-bottom: 14px; position: relative;
}
.view-all-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 600; color: var(--green-1);
  text-decoration: none; transition: opacity .15s ease;
}
.view-all-link:hover { opacity: .8; }
.view-all-link svg { width: 12px; height: 12px; }

.history-list { display: flex; flex-direction: column; gap: 10px; }
.history-item {
  background: rgba(255, 255, 255, .02); border: 1px solid var(--card-border);
  border-radius: 12px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.history-item-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.history-item-plan { font-size: 14px; font-weight: 700; color: #fff; }
.history-item-amount {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px; font-weight: 700; color: #fff; white-space: nowrap;
}
.history-item-meta {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  font-size: 11px; color: var(--text-dim);
}
.history-item-meta .meta-col { display: flex; flex-direction: column; gap: 2px; }
.history-item-meta .meta-col .lbl {
  font-size: 9px; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--text-faint); font-weight: 600;
}
.history-item-meta .meta-col .val { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--text); }

.history-table { display: none; }

/* FOOTER */
.footer {
  border-top: 1px solid var(--text-ghost); padding: 22px 16px;
  max-width: 1400px; width: 100%; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center;
}
.footer-whatsapp {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text); text-decoration: none; font-weight: 500;
  height: 38px; padding: 0 16px; border-radius: 999px;
  background: rgba(34, 197, 94, .08); border: 1px solid rgba(34, 197, 94, .2);
  transition: background .2s ease, border-color .2s ease;
}
.footer-whatsapp:hover { background: rgba(34, 197, 94, .15); border-color: rgba(34, 197, 94, .4); }
.footer-whatsapp svg { width: 14px; height: 14px; color: var(--green-1); }
.footer-copy {
  font-size: 10px; color: var(--text-faint);
  letter-spacing: 2px; text-transform: uppercase; font-weight: 600;
}

/* ============ TABLET ============ */
@media (min-width: 640px) {
  .header .brand .wordmark-block { display: flex; }
  .header-wrap { padding: 20px 24px 16px; }
  .body-wrap { padding: 0 24px 20px; }
  .welcome h1, .page-head h1 { font-size: 30px; }
  .card { padding: 26px; }
  .stats-row { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .stat-card { padding: 18px; }
  .stat-value { font-size: 30px; }
  .info-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .footer { flex-direction: row; justify-content: space-between; text-align: left; }
  .footer-whatsapp { height: 40px; }
}

/* ============ DESKTOP ============ */
@media (min-width: 960px) {
  .hamburger { display: none; }
  .sidebar-close { display: none; }
  .sidebar-collapse-btn { display: inline-flex; }

  html, body { height: 100vh; overflow: hidden; }
  .page { height: 100vh; display: flex; flex-direction: column; min-height: 0; }
  .header-wrap { flex-shrink: 0; max-width: none; padding: 16px 24px 0; }
  .body-wrap { flex: 1; min-height: 0; max-width: none; padding: 16px 24px 0; gap: 20px; }

  .sidebar {
    position: relative; transform: none;
    width: var(--sidebar-width); max-width: none;
    height: auto; min-height: 100%;
    background: var(--card); border: 1px solid var(--card-border);
    border-radius: 20px; padding: 18px 14px;
    flex-shrink: 0; z-index: 1;
  }
  .sidebar-backdrop { display: none; }
  
  .sidebar-top { display: none; }

  .sidebar.collapsed { width: var(--sidebar-width); padding: 18px 8px; }
  .sidebar.collapsed .sidebar-link-label { display: none; }
  .sidebar.collapsed .badge-dot { display: none; }
  .sidebar.collapsed .sidebar-link { justify-content: center; padding: 10px; position: relative;}
  .sidebar.collapsed .sidebar-link.active { padding: 9px; }
  .sidebar.collapsed .sidebar-eyebrow { display: none; }
  .sidebar.collapsed .brand .wordmark-block { display: none; }
  .sidebar.collapsed .sidebar-footer-text { display: none; }
  .sidebar.collapsed .sidebar-collapse-btn svg { transform: rotate(180deg); }
  /* Tooltip for collapsed sidebar links */
  .sidebar.collapsed .sidebar-link::after {
    content: attr(data-label);
    position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%);
    background: rgba(8, 13, 26, .95); border: 1px solid var(--card-border);
    color: var(--text); font-size: 12px; font-weight: 500; padding: 6px 10px; border-radius: 8px;
    white-space: nowrap; opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .15s ease, visibility .15s ease;
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3); z-index: 2;
  }
  .sidebar.collapsed .sidebar-link:hover::after { opacity: 1; visibility: visible; }

  .main {
    flex: 1; min-width: 0; min-height: 0;
    overflow-y: auto; padding: 8px 4px 0 0;
    display: flex; flex-direction: column;
  }
  .main-content { flex: 1; padding-bottom: 0; }
  .footer { margin-top: auto; padding: 20px 0 24px; max-width: none; }

  .welcome { margin-bottom: 24px; }
  .welcome-text h1 { font-size: 34px; }
  .page-head h1 { font-size: 34px; }

  .stats-row { gap: 16px; margin-bottom: 18px; }
  .stat-card { padding: 20px; }
  .stat-value { font-size: 34px; }
  .card { padding: 24px; }

  .history-list { display: none; }
  .history-table {
    display: block; width: 100%;
    border-collapse: separate; border-spacing: 0;
    overflow: hidden; border-radius: 12px;
    border: 1px solid var(--card-border);
  }
  .history-table table { width: 100%; border-collapse: collapse; }
  .history-table thead { background: rgba(255, 255, 255, .02); }
  .history-table th {
    text-align: left; font-size: 10px; font-weight: 600;
    letter-spacing: 2px; text-transform: uppercase;
    color: var(--text-faint);
    padding: 12px 16px; border-bottom: 1px solid var(--card-border);
  }
  .history-table th.right { text-align: right; }
  .history-table td {
    padding: 14px 16px; font-size: 13px; color: var(--text);
    border-bottom: 1px solid var(--card-border);
  }
  .history-table tbody tr:last-child td { border-bottom: none; }
  .history-table tbody tr { transition: background .15s ease; }
  .history-table tbody tr:hover { background: rgba(255, 255, 255, .02); }
  .history-table .mono { font-family: 'JetBrains Mono', monospace; font-weight: 500; }
  .history-table .plan-col { font-weight: 600; color: #fff; }
  .history-table td.right { text-align: right; }
}

@media (min-width: 1100px) {
  .info-grid { grid-template-columns: 1fr 1fr; }
}
