@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');
:root {
  --bg: #f7f9fb;
  --card: #ffffff;
  --muted: #5f6b7a;
  --text: #0f1720;
  --primary: #ffc107; /* gold */
  --accent: #ffd28a;
  --border: #e6edf5;
  --success: #28c76f;
  --danger: #ff4d4f;
  --warning: #ff9f43;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10;
    --card: #11161c;
    --muted: #a9b0bc;
    --text: #e8eef7;
    --primary: #ffc107; /* gold in dark */
    --border: #202733;
  }
}
/* Manual dark mode override */
.dark {
  --bg: #0b0d10;
  --card: #11161c;
  --muted: #a9b0bc;
  --text: #e8eef7;
  --primary: #8ab4ff;
  --border: #202733;
}
.admin-theme { background: radial-gradient(1200px 500px at 20% -10%, rgba(138,180,255,.08), transparent 60%), var(--bg); }
.topbar { background: rgba(17,22,28,.85); backdrop-filter: saturate(1.1) blur(10px); border-bottom: 1px solid rgba(255,255,255,.06); }
.card { background: linear-gradient(180deg, rgba(20,24,32,.88), rgba(16,20,28,.88)); border: 1px solid rgba(255,255,255,.08); box-shadow: 0 18px 40px rgba(0,0,0,.45), 0 0 36px rgba(138,180,255,.12); }
.cta.secondary { background: rgba(59,130,246,.1); color: var(--text); border: 1px solid rgba(59,130,246,.2); }
.cta.secondary:hover { filter:none; box-shadow: 0 4px 12px rgba(59,130,246,.15); background: rgba(59,130,246,.15); border-color: rgba(59,130,246,.3); }

/* Loading bar */
.loading { position: fixed; top: 68px; left: 50%; transform: translateX(-50%); z-index: 60; display:flex; gap:10px; align-items:center; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.14); padding:8px 12px; border-radius: 999px; }
.loading.hidden { display:none; }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.24); border-top-color: var(--primary); border-radius: 999px; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size:12px; color: var(--muted); }

/* Table polish */
.table-wrap thead th { font-weight:700; text-transform: uppercase; }
.status-dot { width:10px; height:10px; border-radius:999px; display:inline-block; margin-right:8px; box-shadow: 0 0 0 2px rgba(255,255,255,.06) inset; }
.dot-success { background: var(--success); }
.dot-danger { background: var(--danger); }
.dot-warning { background: var(--warning); }
.avatar { width:24px; height:24px; border-radius:999px; background: rgba(255,255,255,.08); display:inline-flex; align-items:center; justify-content:center; font-weight:800; font-size:12px; margin-right:8px; }

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'DM Sans', system-ui, -apple-system, Segoe UI, Inter, Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Fintech-friendly numeric alignment */
.kpi-meta .h4,
.stat-number,
.table-wrap th,
.table-wrap td,
#statTotal, #statConfirmed, #statStars, #statReferred {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
}
main { flex: 1 0 auto; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
.container.wide { max-width: 1280px; }
.container.full { max-width: 100%; padding-left: 0; padding-right: 0; }
.site-header {
  position: sticky; top: 0; backdrop-filter: blur(12px);
  background: rgba(10,13,17,.6);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  z-index: 20;
  transition: background .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.site-header.scrolled { background: rgba(10,13,17,.78); box-shadow: 0 10px 28px rgba(0,0,0,.28); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .4px; text-decoration: none; color: inherit; }
.logo { font-size: 18px; color: var(--primary); }
.name { opacity: .95; font-weight: 800; }
nav { display:flex; align-items:center; gap: 16px; }
nav a {
  color: var(--text);
  text-decoration: none;
  opacity: .92;
  position: relative;
  padding: 6px 2px;
  transition: opacity .15s ease, color .15s ease;
}
nav a:hover { opacity: 1; }
/* Animated underline on hover/active */
nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), #8ab4ff);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
  opacity: .9;
}
nav a:hover::after,
nav a.active::after,
nav a[aria-current="page"]::after { transform: scaleX(1); }
nav a.active,
nav a[aria-current="page"] { opacity: 1; }
.menu-toggle { display:none; border:none; background: transparent; color: var(--text); font-size: 22px; }
/* pill button in header */
.pill { display:inline-block; padding: 10px 14px; border-radius: 999px; background: var(--primary); color: #111; text-decoration: none; font-weight: 800; letter-spacing: .2px; }

.hero { padding: 56px 0 24px; background: radial-gradient(800px 400px at 20% 0%, rgba(136,170,255,0.2) 0%, rgba(0,0,0,0) 60%); }
.hero-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 36px; align-items: center; }
.hero-text h1 { font-size: 42px; margin: 0 0 12px; line-height: 1.1; }
.badge { display:inline-block; background:#e8f2ff; color: var(--primary); padding: 6px 10px; border-radius: 999px; font-weight:600; margin-bottom:8px; }
.badge { background: rgba(255,193,7,.15); }
.badge.gold-pill { background: #fff; color: #111; font-weight: 700; border: 1px solid rgba(0,0,0,.25); }
.location-gold { color: #ffc107 !important; margin: 0 0 16px; font-size: 18px; font-weight: 600; }
.features { display:grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin: 32px 0 0; }
.feature { position:relative; background: linear-gradient(180deg, rgba(20,24,32,.88), rgba(12,16,22,.88)); border: 1px solid rgba(255,255,255,.10); border-radius: 16px; padding: 24px 20px; display:flex; flex-direction:column; align-items:center; text-align:center; gap: 16px; box-shadow: 0 16px 40px rgba(0,0,0,.35); overflow:hidden; }
.feature::after { content:""; position:absolute; inset:auto -10% -30% -10%; height:60%; background: radial-gradient(600px 120px at 0% 100%, rgba(138,180,255,.18), transparent 60%); pointer-events:none; }
.feature .feat-text { display:flex; flex-direction:column; gap:8px; align-items:center; }
.feature .feat-title { font-size: 28px; font-weight: 800; letter-spacing:.02em; }
.feature .feat-sub { color: var(--muted); font-size: 14px; }
.feature .feat-icon { width: 72px; height: 72px; display:flex; align-items:center; justify-content:center; border-radius: 18px; background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.02)); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 10px 26px rgba(0,0,0,.35); }
.feature .feat-icon .emoji { font-size: 36px; }
.feature:hover { transform: translateY(-2px); box-shadow: 0 22px 50px rgba(0,0,0,.45); transition: transform .15s ease, box-shadow .15s ease; }
.muted { color: var(--muted); font-size: 11px; }
.hero-text p { color: var(--muted); margin: 0 0 16px; font-size: 18px; }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.cta.airbnb { background: #fff; color: #111; border: 1px solid rgba(0,0,0,.25); font-weight: 900; letter-spacing: .04em; }
.cta { display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: none; background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #3b82f6 100%); color: white; font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: 0 6px 16px rgba(30,58,138,.3); transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; }
.cta:hover { filter: brightness(1.1); box-shadow: 0 8px 20px rgba(30,58,138,.4); transform: translateY(-1px); }
.pill { background: linear-gradient(135deg, #ffd54f 0%, #ffc107 100%); box-shadow: 0 6px 16px rgba(255,193,7,.25); }
.cta.submit { border: none; cursor: pointer; }
/* Small CTA for table actions */
.cta.cta-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.cta.danger { background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 50%, #ef4444 100%); }
.hero-image img, .hero-video { width: 100%; border-radius: 16px; box-shadow: 0 12px 36px rgba(0,0,0,.35), 0 0 24px rgba(255,193,7,.08); display:block; }
@media (min-width: 1280px) {
  .hero-image img, .hero-video { height: 420px; object-fit: cover; }
}
/* Tweak hero layout for ~900px wide portrait screens to avoid tall right column creating blank space */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 16px; }
  .hero-image img, .hero-video { height: auto; max-height: 360px; object-fit: cover; }
  /* Ensure badge doesn't overlap the title on tall portrait screens */
  .hero-badge { left: 12px; right: 12px; top: 12px; max-width: none; }
  .hero-text { margin-top: 160px; }
}

/* Hero badge overlay */
.hero { position: relative; }
.hero-badge { position: absolute; left: 24px; top: 24px; z-index: 10; max-width: 680px; color: var(--text); }
.hero-badge .hb-desc { color: var(--muted); margin: 6px 0; }
.hero-badge .hb-meta { font-weight: 600; margin-bottom: 6px; }
.hero-badge .hb-pills { display:flex; gap:8px; flex-wrap:wrap; margin: 6px 0; }
.hero-badge .pill-badge { display:inline-block; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; border: 1px solid rgba(255,255,255,.2); background: rgba(255,255,255,.1); }
.hero-badge .pill-badge.superhost { background: linear-gradient(135deg, #ffd54f, #ffc107); color: #111; border-color: rgba(255,193,7,.3); box-shadow: 0 4px 12px rgba(255,193,7,.3); }
.hero-badge .pill-badge.top { background: linear-gradient(135deg, #ffd54f, #ffc107); color: #111; border-color: rgba(255,193,7,.3); box-shadow: 0 4px 12px rgba(255,193,7,.3); }
.hero-badge .hb-highlights { display:flex; flex-wrap:wrap; gap:8px; margin-top: 6px; }
.hero-badge .hb-hl { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 10px; padding: 6px 8px; }

/* Medal style badge */
/* Airbnb-like badge */
.ab-badge { background: rgba(10,10,10,.46); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 10px 12px; box-shadow: 0 18px 40px rgba(0,0,0,.45); }
.ab-row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.ab-pill { display:inline-flex; align-items:center; gap:6px; padding: 6px 12px; border-radius: 999px; font-weight:800; font-size:12px; letter-spacing:.02em; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.08); color:#fff; text-transform: none; }
.ab-guest { background: linear-gradient(135deg, #ffd54f, #ffc107); color:#111; border: 1px solid rgba(255,193,7,.3); font-weight:900; letter-spacing:.04em; box-shadow: 0 4px 12px rgba(255,193,7,.3); }
.ab-star { font-size: 12px; line-height: 1; }
.ab-superhost { background: linear-gradient(135deg, #ffd54f, #ffc107); color:#111; border: 1px solid rgba(255,193,7,.3); font-weight:900; letter-spacing:.04em; box-shadow: 0 4px 12px rgba(255,193,7,.3); }
.ab-top { background: linear-gradient(135deg, #ffd54f, #ffc107); color: #111; border: 1px solid rgba(255,193,7,.3); box-shadow: 0 4px 12px rgba(255,193,7,.3); }
.ab-lines { margin-top: 6px; color: var(--text); }
.ab-line { margin-top: 2px; font-size: 14px; }
.ab-desc { color: var(--muted); }
.ab-meta { font-weight: 700; }
.ab-host { color: var(--muted); }
@media (max-width: 880px){ 
  .hero-badge { left: 12px; right: 12px; top: 12px; max-width: none; }
  .hero-text { margin-top: 180px; }
}

.gallery-section { padding: 40px 0; }
.gallery-section h2, .amenities-section h2 { margin: 0 0 16px; }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery img { width: 100%; border-radius: 12px; display: block; box-shadow: 0 4px 16px rgba(16,24,40,.08); }

.amenities-section { padding: 40px 0; }
.amenities { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; color: #ffc107; }
.amenities li { list-style: '✓ '; padding-left: 4px; }

.good-to-know { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 16px; color: var(--muted); }
.good-to-know ul li { color: #ffc107; }
.good-to-know h3 { color: var(--text); margin: 0 0 10px; }
.good-to-know ul { margin: 0; padding-left: 18px; }

/* Details tabs */
.details-section { padding: 40px 0; }
.details-content { border: 1px solid var(--border); border-top: none; border-radius: 0 0 12px 12px; overflow: hidden; }
.nav-tabs .nav-link { color: var(--text); background: rgba(255,255,255,.04); border-color: var(--border); }
.nav-tabs .nav-link.active { background: var(--card); border-color: var(--border) var(--border) transparent var(--border); color: var(--text); }
.details-card { background: var(--card); padding: 18px; }
.details-card p { color: var(--text); }
.details-card ul { color: var(--muted); margin: 0 0 6px 18px; }

/* Badge meta panel under hero */
#heroMeta { background: transparent; border: none; box-shadow: none; }
#heroMeta .badge-panel { display:flex; gap: 16px; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.14); }
#heroMeta .bp-left { display:flex; flex-direction:column; gap:4px; }
#heroMeta .bp-badge { display:inline-block; background: rgba(255,193,7,.18); color: var(--primary); padding: 4px 10px; border-radius: 999px; font-weight: 800; letter-spacing:.2px; }
#heroMeta .bp-desc { color: var(--muted); }
#heroMeta .bp-right { text-align:right; color: var(--muted); }
#heroMeta .bp-rating { color: var(--text); font-weight:700; }
#heroMeta .bp-highlights { display:flex; gap:12px; flex-wrap:wrap; margin-top:10px; }
#heroMeta .bp-hl { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; box-shadow: 0 6px 16px rgba(0,0,0,.12); }
@media (max-width: 880px){ #heroMeta .badge-panel { flex-direction: column; align-items:flex-start; } #heroMeta .bp-right { text-align:left; } }

.signup-section { padding: 48px 0 80px; }
.signup-card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 24px; display: grid; grid-template-columns: 1fr 1.2fr; gap: 20px; box-shadow: 0 10px 30px rgba(20,40,80,.08), 0 0 20px rgba(255,193,7,.06); }
.signup-copy p { color: var(--muted); }
.signup-copy .small { color: var(--muted); }
.signup-image { width: 100%; border-radius: 12px; margin-top: 12px; box-shadow: 0 8px 22px rgba(0,0,0,.25); border: 1px solid var(--border); }
/* Styled rules link */
.rules-link { display:inline-flex; align-items:center; gap:6px; text-decoration:none; color: var(--primary); font-weight:700; }
.rules-link::after { content:'↗'; font-size: 12px; opacity: .8; }
.rules-link:hover { text-decoration: underline; }
.signup-form .field { margin-bottom: 14px; }
.signup-form label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 14px; }
.signup-form input, .signup-form textarea, .signup-form select { width: 100%; padding: 12px 12px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text); }
/* Inline checkbox row for consent */
.signup-form input[type="checkbox"] { width: auto; padding: 0; margin: 0; accent-color: var(--primary); }
.signup-form label.checkbox-inline { display: inline-flex; align-items: center; gap: 8px; line-height: 1.4; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-message { margin-top: 8px; color: var(--muted); min-height: 20px; }
.legal { margin-top: 8px; font-size: 12px; color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); background: var(--card); position: relative; }
.site-footer::before { content:""; position:absolute; left:0; right:0; top:0; height:2px; background: linear-gradient(90deg, rgba(255,193,7,.3), rgba(138,180,255,.25)); opacity:.4; }
.site-footer .container { padding: 22px 0 50px; color: var(--muted); text-align: center; }

/* Public dark inputs */
.dark .signup-form input,
.dark .signup-form textarea,
.dark .signup-form select {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: var(--text) !important;
}
.dark .signup-form input::placeholder,
.dark .signup-form textarea::placeholder { color: var(--muted); }
.dark .signup-form input:focus,
.dark .signup-form select:focus,
.dark .signup-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(138,180,255,.2);
}

@media (max-width: 880px) {
  .hero-inner { grid-template-columns: 1fr; }
  .signup-card { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .amenities { grid-template-columns: repeat(2, 1fr); }
  .hero { padding-top: 24px; }
  .menu-toggle { display:block; }
  #siteNav {
    position: absolute; top: 64px; right: 12px;
    background: rgba(10,13,17,.96);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    display:none;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 14px 34px rgba(0,0,0,.35);
  }
  #siteNav a, #siteNav .pill { display:block; padding: 10px 12px; }
  .site-header.open #siteNav { display:flex; animation: dropdown .14s ease-out; }
  /* Support legacy inline JS that toggles #siteNav.active */
  #siteNav.active { display:flex; animation: dropdown .14s ease-out; }
}

@keyframes dropdown { from { transform: translateY(-6px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@media (max-width: 980px) { .features { grid-template-columns: repeat(2,1fr); gap: 14px; } }
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; gap: 12px; }
}

/* Keep hero CTAs inline on small mobile (e.g., iPhone 12 width) */
@media (max-width: 420px) {
  .hero-ctas { flex-wrap: nowrap; gap: 8px; }
  .hero-ctas .cta { flex: 1 1 0; padding: 10px 12px; font-size: 13px; text-align: center; }
  /* Keep hero badge pills on a single line on iPhone 12 widths */
  .ab-badge { padding: 7px 9px; }
  .ab-row { flex-wrap: nowrap; gap: 4px; justify-content: flex-start; }
  .ab-pill { padding: 3px 7px; font-size: 10.5px; letter-spacing: .005em; white-space: nowrap; }
  .ab-star { font-size: 10.5px; }
  /* Slightly smaller subtitle to avoid overflow */
  .hero .hero-text p { font-size: 16px; line-height: 1.35; }
}

/* Modal */
.modal:not(.fade).hidden { display: none; }
.modal:not(.fade) { position: fixed; inset: 0; background: rgba(0,0,0,.65); display:flex; align-items:center; justify-content:center; z-index: 50; backdrop-filter: blur(6px) saturate(1.15); }
.modal-card { background: linear-gradient(180deg, rgba(20,26,34,.98), rgba(14,18,24,.98)); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 22px; max-width: 560px; width: 92%; color: var(--text); position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.modal-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), #8ab4ff); opacity: .9; border-top-left-radius: 14px; border-top-right-radius: 14px; }
.modal-close { position: absolute; right: 16px; top: 12px; background: transparent; color: var(--text); border: none; font-size: 22px; cursor: pointer; opacity: .8; }
.modal-close:hover { opacity: 1; }
.modal-card h2 { margin: 0 0 8px; font-size: 22px; }
.tasks label { display:block; margin: 10px 0; color: var(--text); font-weight: 500; }
.task-row { display:flex !important; align-items:center; justify-content:space-between; gap:10px; padding:10px 12px; border-radius:10px; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); }
.task-row .task-title { opacity:.95; }
.task-row a.visit-task { display:inline-block; padding:6px 10px; border-radius:8px; background: rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.12); color: var(--text); text-decoration:none; }
.task-row a.visit-task:hover { background: rgba(255,255,255,.14); }
.progress { height: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--primary), #8ab4ff); width: 0%; transition: width .25s ease; }

/* Compact modal layout */
.modal-compact { padding: 0; max-height: 80vh; display:flex; flex-direction: column; overflow:hidden; }
.modal-header { display:flex; align-items:center; justify-content:space-between; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.12); }
.mh-left { display:flex; align-items:center; gap:10px; }
.mh-icon { width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; border-radius:8px; background: linear-gradient(135deg, var(--primary), #8ab4ff); color:#111; font-weight:800; }
.mh-title { margin:0; font-size: 18px; }
.mh-sub { margin:0; font-size:12px; color: var(--muted); }
.modal-body { padding: 12px 14px; overflow:auto; }
.fine-print summary { cursor: pointer; color: var(--muted); }
.fine-print { margin-bottom: 8px; }
.modal-card input[type="text"], .modal-card input[type="number"], .modal-card input[type="tel"], .modal-card input[type="email"], .modal-card select { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: var(--text); }
.modal-card input::placeholder { color: var(--muted); }
.modal-card a.cta { background: var(--primary); color: #fff; }
.modal-card .cta { width: 100%; text-align: center; padding: 12px 18px; border-radius: 10px; font-weight: 700; }
#starsOut { font-weight: 700; margin: 10px 0; color: var(--muted); }
/* Task chip stars */
.task-chip { display:inline-block; margin-left:6px; padding: 2px 6px; border-radius: 999px; font-size: 12px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: var(--muted); }
.task-chip::before { content: '☆ '; }
.task-chip.active { background: rgba(255,193,7,.16); border-color: rgba(255,193,7,.35); color: #ffd666; }
.task-chip.active::before { content: '★ '; }
/* Modal form inputs */
.modal-card label { display:block; margin: 10px 0; color: var(--muted); font-weight: 500; }
.modal-card input[type="text"], .modal-card input[type="date"] { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: var(--text); }

/* Reviews */
.reviews-section { padding: 40px 0 20px; }
.reviews-head { display:flex; align-items:baseline; justify-content:space-between; gap: 16px; margin-bottom: 16px; }
.reviews-link { color: var(--primary); text-decoration: none; }
.reviews-link:hover { text-decoration: underline; }
.reviews-scroll { display:flex; gap: 12px; overflow-x: auto; padding: 6px 2px 10px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.reviews-scroll > * { flex: 0 0 auto; }
.reviews-scroll::-webkit-scrollbar { height: 6px; }
.reviews-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 6px; }
.reviews-scroll .card { min-width: 280px; max-width: 320px; scroll-snap-align: start; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); position: relative; overflow: hidden; }
.reviews-scroll .card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--primary), #8ab4ff); opacity: .8; }
.reviews-scroll .card .card-text { color: var(--text); font-size: 15px; line-height: 1.5; }
.reviews-scroll .card .text-secondary { color: var(--muted) !important; }
.reviews-scroll .card .card-body { padding: 12px 14px 14px; }
#reviews .card-text::before { content: ""; margin-right: 2px; color: var(--muted); font-size: 18px; }
#reviews .card-text::after { content: ""; margin-left: 1px; color: var(--muted); font-size: 18px; }
.stars { color: #ffc107; letter-spacing: 1px; text-shadow: 0 0 6px rgba(255,193,7,.25); }
.review-avatar { display:flex; justify-content:center; padding-top: 14px; }
.review-avatar .avatar { width: 56px; height: 56px; border-radius: 50%; display:flex; align-items:center; justify-content:center; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.15); box-shadow: 0 6px 18px rgba(0,0,0,.25); color: var(--text); }
.review-avatar .avatar svg { width: 28px; height: 28px; }
.reviews-nav { position:absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
#prevReviews { left: -6px; }
#nextReviews { right: -6px; }

/* Sticky CTA for mobile */
.sticky-cta { position: fixed; bottom: 12px; left: 0; right: 0; display:flex; gap: 10px; justify-content:center; z-index: 40; }
.sticky-cta .cta { box-shadow: 0 8px 20px rgba(16,24,40,.16); }
/* Desktop: float actions at bottom-right */
@media (min-width: 880px) {
  .sticky-cta {
    left: auto; right: 16px; bottom: 16px; top: auto; width: auto;
    flex-direction: column; align-items: stretch; gap: 8px;
  }
  .sticky-cta .cta { white-space: nowrap; }
}

/* Promotion pill (public giveaway header) */
.promo-pill-wrap { margin: 12px 0 14px; }
.promo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px; /* slightly narrower */
  border-radius: 999px;
  background: rgba(52, 211, 153, .16); /* green tint */
  border: 1px solid rgba(52, 211, 153, .35);
  color: #a7f3d0; /* emerald-200 */
  font-weight: 800;
  font-size: 14px;
  line-height: 1.25;
  box-shadow: 0 6px 14px rgba(52,211,153,.16);
  white-space: nowrap;
  width: fit-content;
}
.promo-pill .emoji { opacity: .9 }
.promo-text { display: inline-flex; flex-direction: column; align-items: flex-start; }
.promo-main { line-height: 1.2; }
.promo-sub { line-height: 1.15; opacity: .9; }

/* Admin vendors: flow steps */
.flow-steps {
  counter-reset: step;
  list-style: none;
  margin: 0 0 8px 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.flow-steps li {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px 12px 10px 36px;
  color: var(--text);
}
.flow-steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 10px;
  top: 10px;
  width: 18px; height: 18px;
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 999px;
  font-size: 12px; font-weight: 800;
  color: #111;
  background: linear-gradient(135deg, var(--primary), #8ab4ff);
  box-shadow: 0 0 0 2px rgba(0,0,0,.2);
}
.flow-steps li strong { color: var(--text); }
.flow-steps a { color: var(--primary); text-decoration: none; }
.flow-steps a:hover { text-decoration: underline; }

/* Collapsed flow summary */
.flow-summary {
  cursor: pointer;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
}
.flow-details[open] > .flow-summary { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }

/* Quick flow chips */
.flow-quick { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
  margin-bottom: 8px; 
}
.step-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.step-chip .num {
  display: inline-flex; align-items:center; justify-content:center;
  width: 18px; height: 18px; border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #8ab4ff);
  color: #111; font-weight: 900; font-size: 12px;
}

/* Admin dashboard */
.card { background: var(--card); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.24), 0 0 22px rgba(0,112,224,.12); }
.card-body { padding: 14px; color: var(--text); }
.h4 { font-size: 1.25rem; font-weight: 700; }
.small { font-size: 12px; }
.text-secondary { color: var(--muted) !important; }
.admin-kpis { 
  display: grid; 
  grid-template-columns: repeat(4, 1fr); 
  gap: 16px; 
  margin-bottom: 16px;
}

.admin-kpis .card {
  background: linear-gradient(180deg, rgba(20,24,32,.92), rgba(16,20,28,.92));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0,0,0,.3), 0 0 30px rgba(138,180,255,.06);
  transition: all 0.3s ease;
  overflow: hidden;
  position: relative;
}

.admin-kpis .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(0,0,0,.4), 0 0 40px rgba(138,180,255,.1);
  border-color: rgba(255,255,255,.12);
}

.admin-kpis .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #ffc107, #8ab4ff);
  opacity: 0.9;
}

.admin-kpis .card-body {
  padding: 20px;
  position: relative;
}
@media (max-width: 980px) { .admin-kpis { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 560px) { .admin-kpis { grid-template-columns: 1fr; } }

/* Admin: modern data table */
.table-wrap { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); box-shadow: 0 8px 24px rgba(0,0,0,.18); display: inline-block; min-width: 100%; }
.table-wrap table { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: auto; }
.table-wrap thead th { position: sticky; top: 0; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); backdrop-filter: blur(4px); text-align: left; color: var(--muted); font-size: 12px; letter-spacing: .02em; border-bottom: 1px solid var(--border); padding: 12px 14px; }
.table-wrap tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table-wrap tbody td:nth-child(1), .table-wrap thead th:nth-child(1) { position: sticky; left: 0; background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.02)); z-index: 2; }
.table-wrap tbody td:nth-child(2), .table-wrap thead th:nth-child(2) { min-width: 220px; }
.table-wrap tbody td:nth-child(3), .table-wrap thead th:nth-child(3) { min-width: 140px; }
.table-wrap tbody td:nth-child(4), .table-wrap thead th:nth-child(4) { min-width: 180px; }
.table-wrap tbody td:nth-child(5), .table-wrap thead th:nth-child(5) { min-width: 120px; }
.table-wrap tbody td:nth-child(6), .table-wrap thead th:nth-child(6) { min-width: 100px; text-align: right; }
.table-wrap tbody td:nth-child(7), .table-wrap thead th:nth-child(7) { min-width: 120px; }
.table-wrap tbody td:nth-child(8), .table-wrap thead th:nth-child(8) { min-width: 90px; text-align: center; }
.table-wrap tbody td:nth-child(9), .table-wrap thead th:nth-child(9) { min-width: 110px; text-align: center; }
.table-wrap tbody td:nth-child(10), .table-wrap thead th:nth-child(10) { min-width: 100px; text-align: center; }
.table-wrap tbody td:nth-child(11), .table-wrap thead th:nth-child(11) { min-width: 120px; }
.table-wrap tbody td:nth-child(12), .table-wrap thead th:nth-child(12) { min-width: 80px; }
.table-wrap tbody td:nth-child(13), .table-wrap thead th:nth-child(13) { min-width: 120px; }
.table-wrap tbody td:nth-child(14), .table-wrap thead th:nth-child(14) { min-width: 140px; }
.table-wrap tbody tr:nth-child(odd) { background: rgba(255,255,255,.03); }
.table-wrap tbody tr:hover { background: rgba(255,193,7,.06); }
.table-wrap thead th, .table-wrap tbody td { white-space: nowrap; }
.table-scroll { overflow: auto; -webkit-overflow-scrolling: touch; }

/* Vendors table widths */
#vendorsTable.table-wrap tbody td:nth-child(1), #vendorsTable.table-wrap thead th:nth-child(1) { min-width: 260px; }
#vendorsTable.table-wrap tbody td:nth-child(2), #vendorsTable.table-wrap thead th:nth-child(2) { min-width: 160px; }
#vendorsTable.table-wrap tbody td:nth-child(3), #vendorsTable.table-wrap thead th:nth-child(3) { min-width: 180px; }
#vendorsTable.table-wrap tbody td:nth-child(4), #vendorsTable.table-wrap thead th:nth-child(4) { min-width: 120px; }
#vendorsTable.table-wrap tbody td:nth-child(5), #vendorsTable.table-wrap thead th:nth-child(5) { min-width: 110px; }
#vendorsTable.table-wrap tbody td:nth-child(6), #vendorsTable.table-wrap thead th:nth-child(6) { min-width: 90px; text-align: right; }
#vendorsTable.table-wrap tbody td:nth-child(7), #vendorsTable.table-wrap thead th:nth-child(7) { min-width: 90px; text-align: right; }
#vendorsTable.table-wrap tbody td:nth-child(8), #vendorsTable.table-wrap thead th:nth-child(8) { min-width: 110px; text-align: right; }
#vendorsTable.table-wrap tbody td:nth-child(9), #vendorsTable.table-wrap thead th:nth-child(9) { min-width: 180px; }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace; font-size: 12px; background: rgba(0,0,0,.08); padding: 2px 6px; border-radius: 6px; }
.chip { display:inline-block; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.chip.yes { background: rgba(0,200,120,.14); color: #57d59a; border: 1px solid rgba(87,213,154,.35); }
.chip.no { background: rgba(255,80,80,.12); color: #ff8a8a; border: 1px solid rgba(255,138,138,.3); }
/* Status pills for invoices/products */
.status-pill { display:inline-flex; align-items:center; gap:6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; text-transform: lowercase; border: 1px solid transparent; }
.status-paid { background: rgba(87,213,154,0.16); color: #57d59a; border-color: rgba(87,213,154,0.35); }
.status-pending { background: rgba(255,193,7,0.16); color: #ffd85a; border-color: rgba(255,193,7,0.35); }
.status-cancelled { background: rgba(255,80,80,0.14); color: #ff8a8a; border-color: rgba(255,138,138,0.3); }
.status-expired { background: rgba(169,176,188,0.14); color: #c0cad6; border-color: rgba(169,176,188,0.3); }
#subsPager { gap: 8px; }
#subsPager .cta.secondary { padding: 8px 12px; }
.filters-grid { display:grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px; align-items:end; }
@media (max-width: 980px){ .filters-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 560px){ .filters-grid { grid-template-columns: 1fr; } }

/* Draw UI polish */
.draw-summary { 
  display: inline-flex; align-items: center; gap: 10px; 
  padding: 10px 12px; border-radius: 12px; 
  background: rgba(255,255,255,.06); 
  border: 1px solid rgba(255,255,255,.12);
}
.draw-summary .emoji { filter: saturate(1.2); }
.draw-summary .count { font-size: 20px; font-weight: 800; }

/* Segmented inside fields */
.field .segmented { width: 100%; justify-content: space-between; }
.field input[type="range"] { width: 100%; }

/* Date controls inline layout */
.date-controls-row { display:flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.date-controls-row .segmented { flex: 1 1 auto; }
.date-mode-inline { display:flex; align-items:center; gap:8px; }
.segmented.seg-sm .seg { padding: 4px 8px; font-size: 12px; }

/* Date range input group */
.input-group.date-range { 
  display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: center; 
  gap: 8px; padding: 10px 12px; border-radius: 10px; 
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
}
.input-group.date-range .icon { opacity: .8; }
.input-group.date-range .divider { width: 10px; height: 2px; background: rgba(255,255,255,.2); border-radius: 999px; }
.input-group.date-range input[type="date"] { 
  background: transparent !important; border: none !important; color: var(--text) !important; padding: 6px 8px !important; 
}
.input-group.date-range input[type="date"]:focus { outline: none; box-shadow: none; }

/* Grid span helper for wider field */
.col-span-2 { grid-column: span 2; }
@media (max-width: 980px){ .col-span-2 { grid-column: span 3; } }
@media (max-width: 560px){ .col-span-2 { grid-column: span 1; } }

/* Admin: header & layout */
.admin-header { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  margin: 20px 0 16px; 
  padding: 20px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.admin-header .page-title {
  font-size: 32px;
  font-weight: 800;
  color: #e8eef7;
  margin: 0;
  background: linear-gradient(135deg, #e8eef7, #9aa4b2);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-header .breadcrumbs {
  color: #9aa4b2;
  font-weight: 500;
  margin-bottom: 8px;
}
.breadcrumbs { opacity: .75; }
.page-title { margin: 2px 0 0; }
.actions { display:flex; gap: 8px; }
.promo-grid .card { background: rgba(255,255,255,.03); }

/* Admin: top horizontal navbar (Dashonic-like) */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--card); border-bottom: 1px solid var(--border); box-shadow: 0 4px 16px rgba(0,0,0,.12); transition: background .2s ease, box-shadow .2s ease, border-color .2s ease; }
.topbar.scrolled { box-shadow: 0 10px 26px rgba(0,0,0,.22); border-color: color-mix(in oklab, var(--border) 80%, #000 20%); }
.topbar-inner { display:flex; align-items:center; justify-content:space-between; height: 60px; }
.topbar .brand { display:flex; align-items:center; gap:10px; font-weight:700; }
.topbar .brand .logo { width:28px; height:28px; display:inline-flex; align-items:center; justify-content:center; border-radius:8px; background: linear-gradient(135deg, var(--primary), #8ab4ff); color:#111; font-weight:800; }
.topbar nav { display:flex; align-items:center; gap: 14px; }
.topbar nav a { color: var(--text); text-decoration:none; font-weight:600; opacity:.92; position: relative; padding: 6px 2px; transition: opacity .15s ease, color .15s ease; }
.topbar nav a:hover { opacity:1; color: #fff; }
/* Keep admin/vendor links clean on desktop (no underline animation) */
.topbar nav a::after { content: none; }

/* Desktop layout for wrapped nav/actions */
.topbar .topbar-menu { display:flex; align-items:center; gap: 14px; margin-left: auto; }
.topbar .topbar-menu nav { display:flex; align-items:center; gap: 14px; }
.topbar .topbar-menu .actions { display:flex; gap: 8px; }

/* Admin/vendor mobile menu */
@media (max-width: 880px){
  .topbar .menu-toggle { display:block; border:none; background: transparent; color: var(--text); font-size: 22px; margin-left: 8px; }
  /* Hide inline nav/actions; the wrapper becomes the dropdown */
  .topbar > .container > nav, .topbar > .container > .actions,
  .topbar-inner > nav, .topbar-inner > .actions { display:none !important; }
  .topbar .topbar-menu { position: absolute; top: 60px; right: 12px; left: 12px; display:none; flex-direction: column; gap: 8px; background: rgba(20,24,32,.96); border: 1px solid var(--border); border-radius: 12px; padding: 10px; box-shadow: 0 14px 34px rgba(0,0,0,.35); }
  .topbar .topbar-menu nav, .topbar .topbar-menu .actions { display:flex; }
  .topbar .topbar-menu nav { flex-direction: column; gap: 6px; }
  .topbar.open .topbar-menu { display:flex; animation: dropdown .14s ease-out; }
}
.topbar .actions { display:flex; gap:8px; align-items:center; }
.badge-pill { background: rgba(255,193,7,.18); color: var(--primary); padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; }

/* Admin: Sidebar layout inspired by DashboardKit */
.admin-layout { display:grid; grid-template-columns: 240px 1fr; gap: 16px; }
.admin-layout.no-sidebar { grid-template-columns: 1fr; }
.toast { position: fixed; right: 16px; bottom: 16px; background: linear-gradient(180deg, rgba(20,26,34,.98), rgba(14,18,24,.98)); border: 1px solid rgba(255,255,255,.12); padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4); color: var(--text); z-index: 70; opacity: 1; transform: translateY(0); transition: opacity .2s ease, transform .2s ease; }
.toast.hidden { opacity: 0; transform: translateY(6px); pointer-events: none; }
.sidebar { position: sticky; top: 68px; align-self: start; height: calc(100vh - 80px); background: linear-gradient(180deg, rgba(20,26,34,.95), rgba(12,16,22,.95)); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 12px; box-shadow: 0 12px 36px rgba(0,0,0,.35); }
.sidebar-brand { padding: 8px 8px 12px; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: 10px; }
.side-nav { display:flex; flex-direction: column; gap: 6px; }
.side-nav a { display:flex; align-items:center; gap: 10px; padding: 10px 12px; color: var(--text); text-decoration: none; border-radius: 10px; opacity: .9; }
.side-nav a:hover { background: rgba(255,255,255,.06); opacity: 1; }
.side-nav a.active { background: linear-gradient(90deg, rgba(255,193,7,.25), rgba(138,180,255,.18)); color: #fff; border: 1px solid rgba(255,255,255,.12); }
.content { min-width: 0; }
.trip-bars { display:flex; gap:10px; align-items:flex-end; height:120px; margin-bottom:12px }
.chart-grid { 
  display: grid; 
  grid-template-columns: 1.6fr .8fr; 
  gap: 16px;
  margin-bottom: 16px;
}

.chart-grid .card {
  background: linear-gradient(180deg, rgba(20,24,32,.95), rgba(16,20,28,.95));
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(0,0,0,.4), 0 0 40px rgba(138,180,255,.08);
  transition: all 0.3s ease;
  overflow: hidden;
}

.chart-grid .card:hover {
  transform: translateY(-2px);
  box-shadow: 0 25px 60px rgba(0,0,0,.5), 0 0 50px rgba(138,180,255,.12);
  border-color: rgba(255,255,255,.15);
}

.chart-grid .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #60a5fa, #34d399);
  opacity: 0.8;
}

.chart-grid .card-body {
  padding: 16px;
  position: relative;
}

.chart-grid .card-body > div:first-child {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.chart-grid .card-body .small {
  color: #9aa4b2 !important;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.chart-grid .card-body h3 {
  color: #e8eef7;
  font-weight: 700;
  margin: 0 0 8px 0;
  font-size: 16px;
}

/* Enhanced chart styling */
.apex-chart {
  border-radius: 12px;
  overflow: hidden;
}

/* Make charts more compact */
.chart-grid .card-body > div:not(:first-child) {
  margin-top: 8px;
}

.chart-grid .card-body .segmented {
  margin-top: 4px;
}

/* Reduce spacing in chart sections */
.chart-grid .card-body > div > div:first-child {
  margin-bottom: 8px;
}

/* Smooth transitions for chart interactions */
.apex-chart * {
  transition: all 0.2s ease;
}

/* Enhanced tooltip styling */
.apexcharts-tooltip {
  background: linear-gradient(180deg, rgba(20,26,34,.98), rgba(14,18,24,.98)) !important;
  border: 1px solid rgba(255,255,255,.15) !important;
  border-radius: 12px !important;
  box-shadow: 0 16px 40px rgba(0,0,0,.4) !important;
  color: #e8eef7 !important;
}

.apexcharts-tooltip-title {
  background: rgba(255,255,255,.08) !important;
  border-bottom: 1px solid rgba(255,255,255,.12) !important;
  color: #e8eef7 !important;
  font-weight: 600 !important;
}
.promo-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px }
/* Segmented control */
.segmented { 
  display: inline-flex; 
  background: rgba(255,255,255,.08); 
  border: 1px solid rgba(255,255,255,.16); 
  border-radius: 999px; 
  padding: 3px; 
  gap: 3px; 
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.segmented .seg { background: transparent; border: none; color: var(--text); padding: 6px 10px; border-radius: 999px; cursor: pointer; font-weight: 600; opacity: .8; }
.segmented .seg[aria-selected="true"], .segmented .active-primary { background: linear-gradient(180deg, var(--primary), color-mix(in oklab, var(--primary) 72%, #000 28%)); color: #0b0d10; opacity: 1; }
.kpi-card { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 12px; 
}

.kpi-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-meta .small {
  color: #9aa4b2 !important;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.kpi-meta .h4 {
  font-size: 28px;
  font-weight: 800;
  color: #e8eef7;
  margin: 0;
  line-height: 1.1;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.12);
  font-size: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,.2);
}
.kpi-spark { height: 36px; }
/* Column visibility chips */
#colVis .chip { cursor: pointer; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); }
#colVis .chip.active { background: rgba(255,255,255,.18); }

@media (max-width: 1100px) {
  .admin-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
}
@media (max-width: 980px) {
  .chart-grid { 
    grid-template-columns: 1fr; 
    gap: 20px;
  }
  .promo-grid { grid-template-columns: 1fr; }
  
  .chart-grid .card-body {
    padding: 16px;
  }
  
  .admin-kpis .card-body {
    padding: 16px;
  }
}

/* Admin sections as cards */
.section-card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.14); margin: 12px 0; }
.section-card .section-head { display:flex; align-items:center; justify-content:space-between; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.section-card .section-body { padding: 14px; }

/* Admin: dark inputs */
.admin-theme input:not([type="checkbox"]):not([type="radio"]),
.admin-theme select,
.admin-theme textarea {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--text);
  font-size: 16px;
  padding: 14px 16px;
  border-radius: 10px;
}
.admin-theme input::placeholder,
.admin-theme textarea::placeholder { color: var(--muted); }
.admin-theme input:focus,
.admin-theme select:focus,
.admin-theme textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(138,180,255,.2);
}
/* Stronger specificity to override .signup-form defaults on admin */
.admin-theme .signup-form input,
.admin-theme .signup-form select,
.admin-theme .signup-form textarea {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: var(--text) !important;
  font-size: 16px !important;
  padding: 14px 16px !important;
}
.admin-theme .signup-form input::placeholder,
.admin-theme .signup-form textarea::placeholder { color: var(--muted); }
/* Filters grid explicit override */
.admin-theme .filters-grid input,
.admin-theme .filters-grid select {
  background: rgba(255,255,255,.06) !important;
  border: 1px solid rgba(255,255,255,.14) !important;
  color: var(--text) !important;
}
/* Topbar search (if present) */
.admin-theme .topbar .search input { 
  background: rgba(255,255,255,.08) !important; 
  border: 1px solid rgba(255,255,255,.16) !important; 
  color: var(--text) !important; 
  border-radius: 12px !important;
  padding: 10px 16px !important;
  font-size: 14px !important;
  transition: all 0.2s ease !important;
}

.admin-theme .topbar .search input:focus {
  background: rgba(255,255,255,.12) !important;
  border-color: rgba(138,180,255,.4) !important;
  box-shadow: 0 0 0 3px rgba(138,180,255,.1) !important;
}
/* Improve native widget theming */
.admin-theme input,
.admin-theme select,
.admin-theme textarea { color-scheme: dark; }
/* Autofill */
.admin-theme input:-webkit-autofill,
.admin-theme input:-webkit-autofill:hover,
.admin-theme input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  -webkit-box-shadow: 0 0 0px 1000px rgba(255,255,255,.06) inset;
  transition: background-color 9999s ease-in-out 0s;
}

/* Admin: modern buttons */
.admin-theme .cta {
  background: linear-gradient(180deg, color-mix(in oklab, var(--primary) 92%, #fff 8%), color-mix(in oklab, var(--primary) 86%, #000 14%));
  color: #0a0a0a;
  border: 1px solid color-mix(in oklab, var(--primary) 40%, #000 60%);
  box-shadow: 0 10px 24px color-mix(in oklab, var(--primary) 28%, #000 72%);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease, background .12s ease;
}
.admin-theme .cta:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 14px 30px color-mix(in oklab, var(--primary) 32%, #000 68%); }
.admin-theme .cta:active { transform: translateY(0); filter: brightness(.98); }
.admin-theme .cta:focus-visible { outline: none; box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 28%, #8ab4ff 72%), 0 12px 30px rgba(0,0,0,.35); }

.admin-theme .cta.secondary {
  background: rgba(59,130,246,.1);
  color: var(--text);
  border: 1px solid rgba(59,130,246,.2);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.admin-theme .cta.secondary:hover { background: rgba(59,130,246,.15); border-color: rgba(59,130,246,.3); }

.admin-theme .cta.danger { 
  background: linear-gradient(180deg, #ff6b6b, #e03131);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 26px rgba(224,49,49,.35);
}
.admin-theme .cta.danger:hover { filter: brightness(1.05); box-shadow: 0 14px 32px rgba(224,49,49,.45); }

.admin-theme .cta.ghost {
  background: transparent;
  color: var(--text);
  border: 1px dashed rgba(255,255,255,.2);
}

.admin-theme .cta[disabled],
.admin-theme .cta:disabled { opacity: .6; cursor: not-allowed; filter: none; transform: none; }

/* Admin content editor */
.editor-nav { position: sticky; top: 68px; z-index: 30; display:flex; gap:8px; flex-wrap:wrap; margin: 8px 0 10px; padding: 6px 0; }
.editor-nav a { padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: var(--text); text-decoration:none; font-size: 12px; }
.editor-nav a:hover { background: rgba(255,255,255,.12); }
.editor-grid { display:grid; grid-template-columns: 1.4fr .9fr; gap: 16px; align-items: start; }
@media (max-width: 1100px){ .editor-grid { grid-template-columns: 1fr; } }
.editor-preview { position: sticky; top: 84px; align-self: start; }
.preview-card { background: linear-gradient(180deg, rgba(20,24,32,.88), rgba(16,20,28,.88)); border: 1px solid rgba(255,255,255,.08); border-radius: 12px; padding: 12px; box-shadow: 0 14px 36px rgba(0,0,0,.45); }
.preview-hero { display:grid; grid-template-columns: 1.2fr 1fr; gap: 12px; align-items:center; }
.preview-hero-text h2 { margin: 6px 0 4px; font-size: 22px; }
.preview-badge { display:inline-block; padding: 4px 8px; border-radius: 999px; background: rgba(255,193,7,.16); color: #ffd666; font-weight: 700; font-size: 12px; }
.preview-hero-img img { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.35); }
.preview-ctas .pill { display:inline-block; margin-right: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: var(--text); font-size: 12px; }
.preview-features { display:flex; gap: 8px; flex-wrap:wrap; margin: 10px 0; }
.pv-feature { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 4px 8px; display:flex; gap:6px; align-items:center; font-size: 12px; }
.preview-gallery { display:grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.preview-gallery img { width: 100%; height: 72px; object-fit: cover; border-radius: 8px; }
.preview-reviews { margin-top: 10px; display:grid; grid-template-columns: 1fr; gap: 8px; }
.preview-reviews .pv-review { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px; }
.pv-review .pv-name { color: var(--muted); font-size: 12px; }
.list-wrap { display:flex; flex-direction:column; gap:8px; }
.list-row { align-items:end; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 10px; }
.list-actions { display:flex; gap: 6px; align-items:center; }
.drag-handle { cursor: grab; user-select:none; padding: 4px 8px; border-radius: 8px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); }
.list-row.dragging { opacity: .6; }
.list-row.drop-before { box-shadow: inset 0 3px 0 rgba(138,180,255,.6); }
.list-row.drop-after { box-shadow: inset 0 -3px 0 rgba(138,180,255,.6); }

/* Admin content polish */
.three-cols { grid-template-columns: 1fr 1fr 1fr; }
.section-head { gap: 10px; }
.section-head .small { opacity: .8; }
.thumb-row { margin-top: 8px; }
.thumb-row img { width: 100%; max-width: 480px; height: 140px; object-fit: cover; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 8px 22px rgba(0,0,0,.25); }

/* Media preview block */
.media-preview { display:flex; gap:10px; align-items:center; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 10px; margin-top: 8px; }
.media-preview img { width: 160px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid rgba(255,255,255,.12); box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.media-preview.logo img { width: 64px; height: 64px; object-fit: contain; background: rgba(255,255,255,.06); }
.media-status { font-size: 12px; color: var(--muted); }

.editor-sticky { position: sticky; bottom: 12px; margin-top: 12px; display:flex; align-items:center; justify-content:space-between; gap: 12px; background: linear-gradient(180deg, rgba(20,26,34,.95), rgba(12,16,22,.95)); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 10px 12px; box-shadow: 0 12px 30px rgba(0,0,0,.4); }
.editor-sticky .sticky-status { color: var(--muted); font-size: 12px; }
.editor-sticky .sticky-actions { display:flex; gap:8px; }

/* Settings look (WordPress‑like) */
.editor-form.settings .field-row { display:grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 980px){ .editor-form.settings .field-row { grid-template-columns: 1fr; } }
.editor-form.settings .field label { display:flex; flex-direction: column; gap: 6px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 10px 12px; }
.admin-content-page .editor-form.settings .field label { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.14); }
.editor-form.settings .field label > input,
.editor-form.settings .field label > textarea,
.editor-form.settings .field label > select { margin-top: 2px; }
.editor-form .hint { color: var(--muted); font-size: 12px; }

/* Make inputs feel larger/modern */
.admin-theme input:not([type="checkbox"]):not([type="radio"]),
.admin-theme select,
.admin-theme textarea {
  padding: 12px 14px;
  border-radius: 12px;
}

/* Ensure chart containers are properly sized */
.chart-grid .apex-chart {
  margin: 0;
  padding: 0;
}

/* Compact spacing for chart headers */
.chart-grid .card-body > div:first-child {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* Reduce spacing between chart elements */
.chart-grid .card-body > div:not(:first-child) {
  margin-top: 8px;
}

.chart-grid .card-body .segmented {
  margin-top: 4px;
}

/* Reduce spacing in chart sections */
.chart-grid .card-body > div > div:first-child {
  margin-bottom: 8px;
}

/* Newsletter page styles */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.template-btn {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  border-left: 4px solid transparent;
}

.template-btn:hover {
  border-color: var(--accent);
  border-left-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,.15);
}

.template-btn h4 {
  margin: 0 0 8px 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.template-btn p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.4;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,.15);
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

.preview-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  margin: 16px 0;
  max-height: 400px;
  overflow-y: auto;
}

.preview-header {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  color: var(--text);
}

.preview-body {
  line-height: 1.6;
  color: var(--text);
}

.preview-body h2,
.preview-body h3 {
  margin-top: 20px;
  margin-bottom: 12px;
  color: var(--text);
}

.preview-body p {
  margin-bottom: 12px;
  color: var(--text);
}

.preview-body ul {
  margin-bottom: 12px;
  padding-left: 20px;
}

.preview-body li {
  margin-bottom: 6px;
  color: var(--text);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}

.checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.field-help {
  margin-top: 8px;
}

.field-help p {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
  font-style: italic;
}

/* Newsletter page enhancements */
.newsletter-page .container.wide,
.newsletter-page main.container.wide,
.newsletter-page main.container.wide.admin {
  max-width: 1280px !important;
  padding: 0 24px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

/* Override base container constraints for newsletter page */
.newsletter-page main.container {
  max-width: 1100px !important;
  padding: 0 24px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

/* Ensure the admin layout takes standard width */
.newsletter-page .admin-layout {
  max-width: 1280px !important;
  padding: 0 24px !important;
  margin: 0 auto !important;
  width: 100% !important;
}

.newsletter-page .admin-layout.no-sidebar {
  grid-template-columns: 1fr;
}

.newsletter-page .section-card {
  margin: 20px 0;
  padding: 24px;
}

.newsletter-page .section-head {
  padding: 0 0 16px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.newsletter-page .section-head h2 {
  font-size: 24px;
  margin: 0 0 8px 0;
  color: var(--text);
}

.newsletter-page .section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.newsletter-page .section-body {
  padding: 0;
}

/* Enhanced form styling */
.newsletter-page .signup-form {
  max-width: none;
}

.newsletter-page .field {
  margin-bottom: 24px;
}

.newsletter-page .field label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.newsletter-page .field input,
.newsletter-page .field textarea,
.newsletter-page .field select {
  width: 100%;
  padding: 16px 18px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 16px;
  transition: all 0.3s ease;
}

.newsletter-page .field input:focus,
.newsletter-page .field textarea:focus,
.newsletter-page .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(255,193,7,.15);
  background: var(--bg);
}

.newsletter-page .field input::placeholder,
.newsletter-page .field textarea::placeholder {
  color: var(--muted);
  opacity: 0.7;
}

.newsletter-page .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .newsletter-page .field-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* Enhanced field help */
.newsletter-page .field-help {
  margin-top: 8px;
  padding: 12px 16px;
  background: rgba(59,130,246,.08);
  border: 1px solid rgba(59,130,246,.15);
  border-radius: 8px;
}

.newsletter-page .field-help p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

/* Enhanced checkbox styling */
.newsletter-page .checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
  padding: 16px;
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.newsletter-page .checkbox-label:hover {
  border-color: var(--primary);
  background: rgba(255,193,7,.05);
}

.newsletter-page .checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--primary);
}

.newsletter-page .checkbox-label span {
  flex: 1;
  line-height: 1.4;
}

/* Enhanced template grid */
.newsletter-page .template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.newsletter-page .template-btn {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.newsletter-page .template-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #8ab4ff);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.newsletter-page .template-btn:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 32px rgba(0,0,0,.2);
}

.newsletter-page .template-btn:hover::before {
  opacity: 1;
}

.newsletter-page .template-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}

.newsletter-page .template-btn h4 {
  margin: 0 0 12px 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.newsletter-page .template-btn p {
  margin: 0 0 16px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.newsletter-page .template-tip {
  background: rgba(59,130,246,.1);
  color: var(--primary);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

/* Enhanced stats grid */
.newsletter-page .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.newsletter-page .stat-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.newsletter-page .stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #8ab4ff);
  opacity: 0.8;
}

.newsletter-page .stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 32px rgba(0,0,0,.2);
}

.newsletter-page .stat-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}

.newsletter-page .stat-number {
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  line-height: 1;
}

.newsletter-page .stat-label {
  font-size: 16px;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 8px;
}

.newsletter-page .stat-description {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

/* Enhanced form actions */
.newsletter-page .form-actions {
  display: flex;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 2px solid var(--border);
}

.newsletter-page .form-actions .cta {
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  border-radius: 12px;
  min-width: 140px;
}

.newsletter-page .form-actions .cta.secondary {
  background: rgba(59,130,246,.1);
  color: var(--text);
  border: 2px solid rgba(59,130,246,.2);
}

.newsletter-page .form-actions .cta.secondary:hover {
  background: rgba(59,130,246,.15);
  border-color: rgba(59,130,246,.3);
  box-shadow: 0 8px 20px rgba(59,130,246,.2);
}

/* Enhanced preview modal */
.newsletter-page .modal-card {
  max-width: 800px;
  width: 95%;
}

.newsletter-page .preview-content {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin: 20px 0;
  max-height: 500px;
  overflow-y: auto;
}

.newsletter-page .preview-header {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
  font-size: 16px;
  color: var(--text);
}

.newsletter-page .preview-body {
  line-height: 1.7;
  color: var(--text);
  font-size: 16px;
}

.newsletter-page .preview-body h2,
.newsletter-page .preview-body h3 {
  margin-top: 24px;
  margin-bottom: 16px;
  color: var(--text);
}

.newsletter-page .preview-body p {
  margin-bottom: 16px;
  color: var(--text);
}

.newsletter-page .preview-body ul {
  margin-bottom: 16px;
  padding-left: 24px;
}

.newsletter-page .preview-body li {
  margin-bottom: 8px;
  color: var(--text);
}

/* Responsive adjustments */
@media (max-width: 1200px) {
  .newsletter-page .container.wide,
  .newsletter-page main.container.wide,
  .newsletter-page main.container.wide.admin {
    max-width: 1280px !important;
    padding: 0 20px !important;
    margin: 0 auto !important;
    width: 100% !important;
  }
  
  .newsletter-page main.container {
    max-width: 1100px !important;
    padding: 0 20px !important;
    margin: 0 auto !important;
    width: 100% !important;
  }
  
  .newsletter-page .admin-layout {
    max-width: 1280px !important;
    padding: 0 20px !important;
    margin: 0 auto !important;
    width: 100% !important;
  }
}

@media (max-width: 768px) {
  .newsletter-page .section-card {
    padding: 20px;
    margin: 16px 0;
  }
  
  .newsletter-page .field {
    margin-bottom: 20px;
  }
  
  .newsletter-page .field input,
  .newsletter-page .field textarea,
  .newsletter-page .field select {
    padding: 14px 16px;
    font-size: 16px;
  }
  
  .newsletter-page .form-actions {
    flex-direction: column;
    gap: 12px;
  }
  
  .newsletter-page .form-actions .cta {
    width: 100%;
    min-width: auto;
  }
}

@media (max-width: 480px) {
  .newsletter-page .template-grid {
    grid-template-columns: 1fr;
  }
  
  .newsletter-page .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Commission tracking styles */
.chip.success { background: rgba(40,199,111,.14); color: #57d59a; border: 1px solid rgba(87,213,154,.35); }
.chip.warning { background: rgba(255,159,67,.14); color: #ffb366; border: 1px solid rgba(255,179,102,.35); }
.chip.secondary { background: rgba(255,255,255,.06); color: var(--muted); border: 1px solid rgba(255,255,255,.14); }

.commission-amount { font-weight: 700; color: var(--primary); }
.commission-pending { color: var(--warning); }
.commission-paid { color: var(--success); }

#commissionTable.table-wrap tbody td:nth-child(1), #commissionTable.table-wrap thead th:nth-child(1) { min-width: 100px; }
#commissionTable.table-wrap tbody td:nth-child(2), #commissionTable.table-wrap thead th:nth-child(2) { min-width: 200px; }
#commissionTable.table-wrap tbody td:nth-child(3), #commissionTable.table-wrap thead th:nth-child(3) { min-width: 120px; }
#commissionTable.table-wrap tbody td:nth-child(4), #commissionTable.table-wrap thead th:nth-child(4) { min-width: 120px; text-align: right; }
#commissionTable.table-wrap tbody td:nth-child(5), #commissionTable.table-wrap thead th:nth-child(5) { min-width: 100px; text-align: center; }
#commissionTable.table-wrap tbody td:nth-child(6), #commissionTable.table-wrap thead th:nth-child(6) { min-width: 200px; }
#commissionTable.table-wrap tbody td:nth-child(7), #commissionTable.table-wrap thead th:nth-child(7) { min-width: 150px; }

.modal-content { background: linear-gradient(180deg, rgba(20,26,34,.98), rgba(14,18,24,.98)); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; padding: 22px; max-width: 560px; width: 92%; color: var(--text); position: relative; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.modal-header h3 { margin: 0; font-size: 20px; }
.modal-header button { background: transparent; border: none; color: var(--text); font-size: 24px; cursor: pointer; opacity: 0.8; }
.modal-header button:hover { opacity: 1; }

.modal-content input,
.modal-content select,
.modal-content textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: var(--text);
  margin-bottom: 12px;
}

.modal-content input::placeholder,
.modal-content textarea::placeholder {
  color: var(--muted);
}

.modal-content input:focus,
.modal-content select:focus,
.modal-content textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255,193,7,.1);
}

/* Commission modal improvements */
.info-box {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 12px;
  border-radius: 6px;
  margin-bottom: 20px;
}

.info-box p {
  margin: 0;
  font-size: 14px;
  color: #93c5fd;
  line-height: 1.4;
}

.modal-content small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.3;
}

.modal-content .field {
  margin-bottom: 16px;
}

.modal-content .field label {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
}

.modal-content .field input,
.modal-content .field select,
.modal-content .field textarea {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 14px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.modal-content .field textarea {
  min-height: 80px;
  resize: vertical;
}

.modal-content .field input:focus,
.modal-content .field select:focus,
.modal-content .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.1);
}

.modal-content .field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 768px) {
  .modal-content .field-row {
    grid-template-columns: 1fr;
  }
}

.modal-content .cta {
  padding: 12px 20px;
  font-weight: 600;
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.modal-content .cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Commission table improvements */
#commissionTable .commission-amount {
  font-weight: 700;
  color: var(--primary);
  text-align: right;
}

#commissionTable .chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#commissionTable .chip.success {
  background: rgba(40, 199, 111, 0.15);
  color: #57d59a;
  border: 1px solid rgba(87, 213, 154, 0.3);
}

#commissionTable .chip.warning {
  background: rgba(255, 159, 67, 0.15);
  color: #ffb366;
  border: 1px solid rgba(255, 179, 102, 0.3);
}

#commissionTable .chip.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

#commissionTable .chip.danger {
  background: rgba(255, 77, 79, 0.15);
  color: #ff8a8a;
  border: 1px solid rgba(255, 138, 138, 0.3);
}

/* Vendor commission table improvements */
#commissionTable.table-wrap tbody td:nth-child(1), #commissionTable.table-wrap thead th:nth-child(1) { min-width: 100px; }
#commissionTable.table-wrap tbody td:nth-child(2), #commissionTable.table-wrap thead th:nth-child(2) { min-width: 120px; }
#commissionTable.table-wrap tbody td:nth-child(3), #commissionTable.table-wrap thead th:nth-child(3) { min-width: 120px; text-align: right; }
#commissionTable.table-wrap tbody td:nth-child(4), #commissionTable.table-wrap thead th:nth-child(4) { min-width: 100px; text-align: center; }
#commissionTable.table-wrap tbody td:nth-child(5), #commissionTable.table-wrap thead th:nth-child(5) { min-width: 120px; text-align: center; }
#commissionTable.table-wrap tbody td:nth-child(6), #commissionTable.table-wrap thead th:nth-child(6) { min-width: 150px; }
#commissionTable.table-wrap tbody td:nth-child(7), #commissionTable.table-wrap thead th:nth-child(7) { min-width: 140px; }

#commissionTable .commission-amount {
  font-weight: 700;
  color: var(--primary);
  text-align: right;
}

/* Commission filters styling */
.commission-filters {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px;
}

.commission-filters select {
  font-size: 13px;
  min-width: 120px;
}

.commission-filters label {
  font-size: 13px;
  color: var(--muted);
}

/* Shop page dark overrides */
.dark.shop-page .text-muted { color: rgba(255,255,255,0.8) !important; }
.dark.shop-page .product-card p { color: rgba(255,255,255,0.92) !important; }
.dark.shop-page .form-label, 
.dark.shop-page .form-control, 
.dark.shop-page .btn, 
.dark.shop-page h1, 
.dark.shop-page h4, 
.dark.shop-page strong, 
.dark.shop-page span { color: #fff; }
.dark.shop-page .btn-outline-light { color: #fff; border-color: rgba(255,255,255,0.4); }
.dark.shop-page .btn-outline-light:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); }
/* Ensure alerts (which have light backgrounds) use dark text for contrast */
.dark.shop-page .alert { color: #111; }
.dark.shop-page .alert * { color: #111; }