/* Travify Customer Portal — Design system v2
 * Reemplaza el style.css anterior. Usa variables CSS para tematización.
 */

:root {
  --brand: #FF3C9A;
  --brand-50: #FFF0F8;
  --brand-100: #FFE0F0;
  --brand-600: #E62E84;
  --brand-700: #C71F6F;
  --surface: #F8FAFC;
  --ink: #0F172A;
  --ink-2: #334155;
  --ink-3: #64748B;
  --border: #E2E8F0;
  --success: #10B981;
  --success-bg: #D1FAE5;
  --warning: #F59E0B;
  --warning-bg: #FEF3C7;
  --danger: #EF4444;
  --danger-bg: #FEE2E2;
  --shadow-card: 0 4px 20px rgba(15, 23, 42, 0.05);
  --shadow-card-hover: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-card: 16px;
  --radius-btn: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--surface);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ========== LAYOUT ========== */
/* Estructura: #shell { .portal-sidebar (aside) + .portal-main (main, con .portal-header dentro y .portal-content dentro) }
   Sidebar es fija a la izquierda (256px). Main lleva un margin-left para no quedar tapado.
   En móvil (<=900px): sidebar se oculta off-canvas y se abre con el botón hamburguesa. */

body { background: var(--surface); }
#shell { display: block; }

.portal-sidebar {
  position: fixed; left: 0; top: 0;
  width: 256px; height: 100vh;
  background: #fff;
  border-right: 1px solid var(--border);
  z-index: 40;
  overflow-y: auto;
  transition: transform 0.25s ease;
}
.sidebar-inner {
  display: flex; flex-direction: column; gap: 16px;
  padding: 20px;
  min-height: 100%;
}
.sidebar-logo {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 4px 16px; flex-shrink: 0;
}
.sidebar-logo svg { display: block; height: 32px; width: auto; }

.sidebar-nav {
  flex: 1;
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: var(--ink-2); font-size: 14px;
  text-decoration: none; cursor: pointer;
  background: transparent; border: none; width: 100%; text-align: left;
  font-family: inherit;
  transition: background 0.15s, color 0.15s;
}
.sidebar-nav-item:hover { background: var(--surface); }
.sidebar-nav-item.is-active {
  background: var(--brand); color: #fff; font-weight: 600;
}
.sidebar-nav-item.is-active svg { color: #fff; }
.sidebar-nav-item svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--ink-3); }

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* Backdrop que tapa el contenido cuando el sidebar está abierto en móvil */
.portal-sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15, 23, 42, 0.4);
  z-index: 35;
  opacity: 0; transition: opacity 0.2s ease;
}
.portal-sidebar-backdrop.is-visible {
  display: block; opacity: 1;
}

.portal-main {
  margin-left: 256px;
  min-height: 100vh;
  display: flex; flex-direction: column;
}

/* ========== HEADER ========== */
.portal-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 16px 32px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.portal-mobile-toggle {
  display: none;
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface);
  align-items: center; justify-content: center;
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.portal-mobile-toggle svg { width: 22px; height: 22px; color: var(--ink-2); }
.portal-header-title {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
  min-width: 0; /* permite que el h1 trunque si hace falta */
}
.portal-title {
  font-size: 18px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0;
}
.portal-header-actions {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.lang-switcher {
  background: transparent; border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 26px 6px 12px;
  font-size: 13px; color: var(--ink-2);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center;
  cursor: pointer; font-family: inherit;
}
.user-pill {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  font-size: 13px;
  max-width: 200px;
}
.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-700));
  color: #fff; font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-name {
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ========== CONTENT ========== */
.portal-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
  width: 100%;
  flex: 1;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
  .portal-sidebar {
    transform: translateX(-100%);
    box-shadow: 4px 0 20px rgba(15, 23, 42, 0.08);
  }
  .portal-sidebar.is-open {
    transform: translateX(0);
  }
  .portal-main {
    margin-left: 0;
  }
  .portal-mobile-toggle { display: inline-flex; }
  .portal-header {
    padding: 12px 16px;
  }
  .portal-content {
    padding: 20px 16px;
  }
  /* En móvil reducimos el user-pill: solo avatar, sin nombre largo */
  .user-pill .user-name {
    display: none;
  }
  .user-pill {
    padding: 4px;
  }
  .lang-switcher {
    padding: 6px 22px 6px 10px;
    font-size: 12px;
  }
  .portal-title {
    font-size: 17px;
  }
}

@media (max-width: 480px) {
  .portal-header-actions { gap: 6px; }
  .portal-content { padding: 16px 12px; }
}

.greeting h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.greeting p { color: var(--ink-3); margin-top: 4px; }
.section-title {
  font-size: 18px; font-weight: 700; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.section-title .link {
  font-size: 13px; color: var(--brand); font-weight: 600;
  display: flex; align-items: center; gap: 4px;
}

/* ========== CARDS ========== */
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.card-featured {
  border: 2px solid var(--brand);
  box-shadow: var(--shadow-card-hover);
}
.card-featured::before {
  content: ''; position: absolute; right: -48px; top: -48px;
  width: 192px; height: 192px; background: rgba(255, 60, 154, 0.05);
  border-radius: 50%; filter: blur(40px); pointer-events: none;
}
.card-clickable { transition: box-shadow 0.15s, transform 0.15s; }
.card-clickable:hover { box-shadow: var(--shadow-card-hover); }
.card-clickable:active { transform: scale(0.98); }

/* ========== BADGES ========== */
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; line-height: 1.4;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-muted { background: rgba(100, 116, 139, 0.1); color: var(--ink-3); }

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 14px;
  transition: all 0.15s;
  cursor: pointer;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--brand); color: white; box-shadow: 0 2px 8px rgba(255, 60, 154, 0.25); }
.btn-primary:hover { background: var(--brand-600); }
.btn-secondary { background: white; color: var(--ink); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--surface); }
.btn-ghost { background: transparent; color: var(--brand); border: 1px solid var(--brand); }
.btn-ghost:hover { background: var(--brand-50); }
.btn-full { width: 100%; }
.btn-icon { padding: 0; width: 44px; height: 44px; }

/* ========== eSIM CARD ========== */
.esim-active {
  display: flex; flex-direction: column; gap: 16px;
}
.esim-active-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.esim-active-country { display: flex; gap: 16px; align-items: center; }
.esim-active-flag {
  width: 56px; height: 56px; border-radius: 14px; background: var(--brand-50);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
}
.esim-active-title { font-size: 22px; font-weight: 700; margin-top: 4px; }
.esim-active-sub { color: var(--ink-3); font-size: 13px; }
.esim-active-usage { text-align: right; }
.esim-active-usage strong { font-size: 22px; color: var(--brand); display: block; }
.esim-active-usage span { font-size: 12px; color: var(--ink-3); }

.progress-wrap { width: 100%; }
.progress-labels {
  display: flex; justify-content: space-between;
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-3); font-weight: 600; margin-bottom: 6px;
}
.progress-bar { width: 100%; height: 8px; background: var(--surface); border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--brand-700), var(--brand));
  border-radius: 999px;
}
.progress-fill.warning { background: var(--warning); }
.progress-fill.danger { background: var(--danger); }

/* ========== eSIM LIST CARD ========== */
.esim-card {
  display: flex; flex-direction: column; gap: 12px;
}
.esim-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.esim-card-country { display: flex; align-items: center; gap: 12px; }
.esim-card-flag { font-size: 28px; }
.esim-card-name { font-weight: 700; font-size: 14px; }
.esim-card-plan { font-size: 11px; color: var(--ink-3); margin-top: 2px; }
.esim-card-actions { display: flex; gap: 8px; margin-top: 12px; }
.esim-card-actions .btn { padding: 10px 16px; font-size: 13px; }

.esims-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.esim-card-expired { opacity: 0.75; }
.esim-card-expired .esim-card-flag { filter: grayscale(1); }

/* ========== EMPTY STATE ========== */
.empty-state {
  text-align: center; padding: 60px 20px;
  background: white; border-radius: var(--radius-card); border: 1px dashed var(--border);
}
.empty-icon { font-size: 48px; margin-bottom: 12px; }
.empty-title { font-size: 18px; font-weight: 700; margin-bottom: 4px; }
.empty-text { color: var(--ink-3); font-size: 14px; max-width: 400px; margin: 0 auto; }

/* ========== FILTERS PILLS ========== */
.filter-pills {
  display: inline-flex; background: white; border: 1px solid var(--border);
  border-radius: 999px; padding: 4px;
}
.filter-pills button {
  padding: 6px 16px; border-radius: 999px; font-size: 13px;
  color: var(--ink-2); font-weight: 500;
}
.filter-pills button.active { background: var(--brand); color: white; font-weight: 600; }

/* ========== THINGS TO DO ========== */
.attractions-scroll {
  display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px;
  scrollbar-width: thin;
}
.attractions-scroll::-webkit-scrollbar { height: 6px; }
.attractions-scroll::-webkit-scrollbar-track { background: transparent; }
.attractions-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

.attraction-card {
  flex-shrink: 0; width: 260px;
  background: white; border: 1px solid var(--border);
  border-radius: var(--radius-card); overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s, transform 0.15s;
}
.attraction-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.attraction-card img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  background: var(--surface);
}
.attraction-card-body { padding: 14px 16px; }
.attraction-card-body h4 { font-size: 14px; font-weight: 600; }
.attraction-card-body p { font-size: 12px; color: var(--ink-3); margin-top: 4px; line-height: 1.5; }

/* ========== QR ========== */
.qr-block { text-align: center; }
.qr-frame {
  display: inline-block; position: relative;
  background: var(--ink); padding: 24px; border-radius: 18px;
  margin: 0 auto;
}
.qr-frame::before, .qr-frame::after,
.qr-frame .corner-tr::before, .qr-frame .corner-bl::before {
  content: ''; position: absolute; width: 28px; height: 28px; border: 3px solid var(--brand);
}
.qr-frame::before { top: -2px; left: -2px; border-right: none; border-bottom: none; border-radius: 8px 0 0 0; }
.qr-frame::after { bottom: -2px; right: -2px; border-left: none; border-top: none; border-radius: 0 0 8px 0; }
.qr-frame .corner-tr::before { top: -2px; right: -2px; border-left: none; border-bottom: none; border-radius: 0 8px 0 0; }
.qr-frame .corner-bl::before { bottom: -2px; left: -2px; border-right: none; border-top: none; border-radius: 0 0 0 8px; }
.qr-frame .qr-inner { background: white; padding: 12px; border-radius: 8px; }
.qr-frame .qr-inner img, .qr-frame .qr-inner svg { display: block; width: 180px; height: 180px; }

/* ========== STATS / TECH DETAILS ========== */
.tech-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
}
.tech-stat { background: var(--surface); border-radius: 10px; padding: 12px; }
.tech-stat-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--ink-3); font-weight: 600;
}
.tech-stat-value { font-size: 14px; font-weight: 700; margin-top: 4px; color: var(--ink); }

.tech-list { font-size: 14px; }
.tech-list .row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px 24px;
  border-top: 1px solid var(--border);
}
.tech-list .row:first-child { border-top: none; }
.tech-list .label { color: var(--ink-3); }
.tech-list .value { font-weight: 600; }
.tech-list code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  background: var(--brand-50); color: var(--brand);
  padding: 4px 8px; border-radius: 6px;
}
.copy-btn {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-3); margin-left: 8px;
}
.copy-btn:hover { background: var(--border); color: var(--brand); }

/* ========== INSTALL TABS ========== */
.tabs { border-bottom: 1px solid var(--border); display: flex; }
.tab {
  flex: 1; padding: 14px;
  font-size: 14px; font-weight: 600;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.steps { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step-num {
  width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0;
  background: var(--brand); color: white; font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step p { font-size: 13px; color: var(--ink-2); line-height: 1.5; }

/* ========== TOAST ========== */
.toast {
  position: fixed; top: 24px; right: 24px;
  padding: 14px 20px; border-radius: 12px;
  background: var(--ink); color: white; font-size: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  transform: translateX(120%); transition: transform 0.2s;
  z-index: 100;
}
.toast.show { transform: translateX(0); }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); }

/* ========== LOADING ========== */
.loading-overlay {
  position: fixed; inset: 0;
  background: rgba(248, 250, 252, 0.8);
  backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  z-index: 200;
}
.spinner {
  width: 24px; height: 24px; border-radius: 50%;
  border: 3px solid var(--border); border-top-color: var(--brand);
  animation: spin 0.8s linear infinite;
}
.spinner-lg { width: 40px; height: 40px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== LAYOUT GRIDS ========== */
.grid { display: grid; gap: 24px; }
.grid-12 { grid-template-columns: repeat(12, 1fr); }
.col-8 { grid-column: span 8; }
.col-4 { grid-column: span 4; }
.col-7 { grid-column: span 7; }
.col-5 { grid-column: span 5; }
@media (max-width: 1024px) {
  .col-8, .col-4, .col-7, .col-5 { grid-column: span 12; }
}

/* ========== AUTH PAGES ========== */
/* Estructura: body.auth-page > .auth-card > .auth-card-inner > {logo, brand-tag, error, title, subtitle, form, legal}
   El form contiene .auth-label, .auth-input y .auth-button.
   Antes el CSS atacaba .auth-card h1/input/label genéricos; el HTML pasó a usar
   clases específicas (.auth-title, .auth-input, .auth-button) y no había estilos
   para .auth-button → salía como texto plano. */

.auth-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface);
  padding: 20px;
}

.auth-card {
  background: #fff;
  border-radius: var(--radius-card);
  width: 100%; max-width: 400px;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  overflow: hidden;
}
.auth-card-inner {
  padding: 40px 32px;
}

.auth-logo {
  display: block;
  margin: 0 auto 16px;
  height: 36px;
  text-align: center;
}
.auth-logo svg {
  display: inline-block;
  height: 36px;
  width: auto;
}

.auth-brand-tag {
  display: block;
  text-align: center;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--brand);
  font-weight: 700;
  background: rgba(255, 60, 154, 0.1);
  padding: 4px 10px;
  border-radius: 5px;
  margin: 0 auto 24px;
  width: fit-content;
}

.auth-title {
  font-size: 22px; font-weight: 700;
  text-align: center;
  margin: 0 0 6px;
  color: var(--ink);
  letter-spacing: -0.3px;
}
.auth-subtitle {
  color: var(--ink-3);
  text-align: center;
  font-size: 14px;
  margin: 0 0 24px;
  line-height: 1.5;
}

.auth-form {
  display: flex; flex-direction: column; gap: 12px;
}
.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 -4px; /* compacta con el input siguiente */
  color: var(--ink-2);
}
.auth-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-btn);
  border: 1px solid var(--border);
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}
.auth-input::placeholder { color: var(--ink-3); }
.auth-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(255, 60, 154, 0.15);
}

.auth-button {
  width: 100%;
  padding: 13px 16px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, transform 0.08s;
  margin-top: 4px;
}
.auth-button:hover { background: var(--brand-600); }
.auth-button:active { transform: scale(0.98); }
.auth-button:disabled {
  background: var(--ink-3);
  cursor: not-allowed;
  opacity: 0.7;
}

.auth-error {
  background: var(--danger-bg);
  color: var(--danger);
  padding: 10px 14px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  margin-bottom: 16px;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.auth-info {
  background: var(--brand-50);
  color: var(--brand-700);
  padding: 12px 16px;
  border-radius: var(--radius-btn);
  font-size: 13px;
  margin-bottom: 16px;
  text-align: center;
  border: 1px solid rgba(255, 60, 154, 0.15);
}

.auth-legal {
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
  margin: 20px 0 0;
  line-height: 1.5;
}
.auth-legal a {
  color: var(--brand);
  font-weight: 600;
}

/* Variantes para verify.html */
.auth-mail-icon {
  font-size: 48px;
  text-align: center;
  margin: 0 0 16px;
  line-height: 1;
}

.auth-button-secondary {
  background: var(--surface);
  color: var(--ink-2);
  border: 1px solid var(--border);
  margin-top: 16px;
}
.auth-button-secondary:hover {
  background: var(--border);
}

.auth-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }

/* ========== TEXT HELPERS ========== */
.text-muted { color: var(--ink-3); }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-bold { font-weight: 700; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ============ AFFILIATE PORTAL SPECIFIC ============ */

/* Greeting */
.portal-greeting { margin-bottom: 28px; }
.portal-greeting h2 { font-size: 26px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.5px; }
.portal-greeting p { color: var(--text-muted); font-size: 14px; margin: 0; }

/* KPI grid */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.kpi-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 18px 20px; box-shadow: 0 4px 20px rgba(15,23,42,0.04);
  position: relative; overflow: hidden;
}
.kpi-card-highlight { border: 2px solid var(--brand); }
.kpi-card-highlight::before {
  content: ''; position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px; background: rgba(255,60,154,0.08); border-radius: 50%; filter: blur(40px);
}
.kpi-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.kpi-label {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--text-muted); font-weight: 600;
}
.kpi-header svg { color: var(--brand); width: 18px; height: 18px; }
.kpi-value {
  font-size: 30px; font-weight: 700; letter-spacing: -0.5px;
  line-height: 1.1;
}
.kpi-value-brand { color: var(--brand); }
.kpi-value-sub { font-size: 14px; color: var(--text-muted); font-weight: 400; }
.kpi-trend, .kpi-sub {
  font-size: 11px; color: var(--text-muted); margin-top: 6px; font-weight: 500;
}
.trend-up { color: var(--success, #10B981); font-weight: 600; }
.trend-down { color: var(--danger, #EF4444); font-weight: 600; }

@media (max-width: 900px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .kpi-grid { grid-template-columns: 1fr; } }

/* Two-col grid (chart + sidebar) */
.portal-two-col {
  display: grid; grid-template-columns: 2fr 1fr; gap: 20px; margin-bottom: 24px;
}
@media (max-width: 900px) { .portal-two-col { grid-template-columns: 1fr; } }

.portal-card {
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  padding: 22px; box-shadow: 0 4px 20px rgba(15,23,42,0.04);
}
.portal-card-wide { /* same, just for clarity */ }
.portal-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
}
.portal-card-header h3 { font-size: 16px; font-weight: 700; margin: 0; }
.portal-card-sub { font-size: 12px; color: var(--text-muted); margin: 4px 0 0; }
.portal-link {
  color: var(--brand); font-size: 13px; font-weight: 600; text-decoration: none;
}
.portal-link:hover { text-decoration: underline; }

/* Chart bars */
.chart-bars {
  display: flex; align-items: flex-end; gap: 14px;
  height: 180px; padding: 0 6px;
}
.chart-bar-col {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 8px; height: 100%; justify-content: flex-end;
}
.chart-bar-value {
  font-size: 11px; color: var(--text-muted); font-weight: 600;
}
.chart-bar-col.is-current .chart-bar-value { color: var(--brand); font-weight: 700; }
.chart-bar {
  width: 100%; background: rgba(255,60,154,0.15); border-radius: 6px 6px 0 0;
  transition: height 0.4s ease;
  min-height: 4px;
}
.chart-bar-col.is-current .chart-bar {
  background: linear-gradient(to top, var(--brand-700, #C71F6F), var(--brand));
}
.chart-bar-label {
  font-size: 11px; color: var(--text-muted);
}
.chart-bar-col.is-current .chart-bar-label { color: var(--brand); font-weight: 700; }

/* Coupon rows in dashboard */
.coupon-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; background: var(--bg-secondary, #F8FAFC);
  border-radius: 10px; margin-bottom: 10px;
}
.coupon-row:last-child { margin-bottom: 0; }
.coupon-code {
  font-family: 'SF Mono', Menlo, monospace; font-weight: 700; font-size: 14px;
  margin: 0;
}
.coupon-sub {
  font-size: 11px; color: var(--text-muted); margin: 2px 0 0;
}
.coupon-amount { text-align: right; }
.coupon-amount-value { font-size: 14px; font-weight: 700; color: var(--brand); margin: 0; }
.coupon-amount-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin: 2px 0 0; }

/* CTA card */
.portal-cta-card {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-700, #C71F6F) 100%);
  border-radius: 16px; padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; color: #fff; flex-wrap: wrap;
}
.portal-cta-eyebrow {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  opacity: 0.85; font-weight: 600; margin-bottom: 4px;
}
.portal-cta-amount { font-size: 36px; font-weight: 700; letter-spacing: -0.8px; line-height: 1; }
.portal-cta-sub { font-size: 13px; opacity: 0.9; margin-top: 6px; }
.portal-cta-button {
  background: #fff; color: var(--brand); padding: 12px 20px;
  border-radius: 12px; font-weight: 700; font-size: 13px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
  transition: transform 0.15s ease;
}
.portal-cta-button:hover { transform: translateY(-1px); }
.portal-cta-button svg { color: var(--brand); width: 18px; height: 18px; }

/* Empty states */
.portal-empty {
  text-align: center; color: var(--text-muted); padding: 40px 20px;
  font-size: 14px;
}

/* Brand tag in sidebar/logo */
.sidebar-brand-tag {
  font-size: 9px; text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--text-muted); font-weight: 700;
  background: rgba(255,60,154,0.1); color: var(--brand);
  padding: 2px 6px; border-radius: 4px; margin-left: 4px;
}
