/* ===== Design tokens ===== */
:root {
  --color-primary: #6C5CE7;
  --color-primary-dark: #5849c2;
  --color-accent: #00B894;
  --gradient-brand: linear-gradient(135deg, #6C5CE7 0%, #00B894 100%);

  --bg: #F4F5FA;
  --bg-elevated: rgba(255, 255, 255, 0.65);
  --bg-solid: #ffffff;
  --text: #1B1B29;
  --text-muted: #5B5B72;
  --border: rgba(27, 27, 41, 0.09);
  --shadow: 0 8px 30px rgba(27, 27, 41, 0.08);
  --glass-blur: blur(18px);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", Arial, sans-serif;
}

:root[data-theme="dark"] {
  --bg: #0F0F17;
  --bg-elevated: rgba(32, 32, 48, 0.55);
  --bg-solid: #191925;
  --text: #F1F1F6;
  --text-muted: #A8A8BE;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F0F17;
    --bg-elevated: rgba(32, 32, 48, 0.55);
    --bg-solid: #191925;
    --text: #F1F1F6;
    --text-muted: #A8A8BE;
    --border: rgba(255, 255, 255, 0.08);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  }
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background-color .2s ease, color .2s ease;
}
h1, h2, h3, h4, p { margin: 0 0 .5rem 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
button, input, select, textarea { font-family: inherit; font-size: 1rem; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== Header / Nav ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  font-weight: 800;
  font-size: 1.25rem;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}
.nav-links a.nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: .95rem;
}
.nav-links a.nav-link:hover { color: var(--text); }
/* Role quick-links live only in the collapsed hamburger menu on mobile. */
.nav-link.mobile-only { display: none; }
.nav-actions { display: flex; align-items: center; gap: .75rem; }

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.1rem;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  font-size: .75rem;
  font-weight: 700;
}
.lang-switch a {
  padding: .3rem .55rem;
  color: var(--text-muted);
  line-height: 1;
}
.lang-switch a.active { background: var(--gradient-brand); color: #fff; }

.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e0356b;
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  font-size: 1.2rem;
}

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav-links {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-solid);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 80vh; overflow-y: auto; }
  .nav-link.mobile-only { display: block; }
  .nav-links a.nav-link {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
  }
  /* Role nav is in the hamburger now, so the horizontal admin strip is redundant. */
  .admin-sidebar { display: none; }
  .nav-actions.in-menu {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem;
    gap: .75rem;
  }
}

/* ===== Glass cards & buttons ===== */
.glass-card {
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border-radius: 12px;
  padding: .8rem 1.6rem;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .01em;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease,
    background-color .2s ease, border-color .2s ease, color .2s ease;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
@media (min-width: 480px) { .btn { width: auto; } }
.btn:active { transform: translateY(1px) scale(.98); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Primary: brand gradient with a diagonal light sweep on hover */
.btn-primary {
  background: var(--gradient-brand);
  background-size: 160% 160%;
  color: #fff;
  box-shadow: 0 6px 18px rgba(108, 92, 231, .28);
}
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-20deg);
  transition: left .55s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(108, 92, 231, .42);
}
.btn-primary:hover::after { left: 130%; }

/* Secondary: glass outline that fills with a brand tint on hover */
.btn-secondary {
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(108, 92, 231, .18);
}

/* Ghost: minimal text button (delete, tertiary actions) */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  padding: .5rem 1rem;
}
.btn-ghost:hover { background: var(--bg-elevated); color: #e0356b; }

/* Danger: destructive confirm */
.btn-danger { background: #e0356b; color: #fff; box-shadow: 0 6px 18px rgba(224, 53, 107, .3); }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(224, 53, 107, .42); }

.btn-block { width: 100%; }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }

/* ===== Hero ===== */
.hero { padding: 4rem 0 3rem; text-align: center; }
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  max-width: 780px;
  margin: 0 auto .9rem;
}
.hero .lead {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
}
.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-width: 340px;
  margin: 0 auto;
}
@media (min-width: 480px) {
  .hero-ctas { flex-direction: row; justify-content: center; max-width: none; }
}

.audience-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 3rem 0;
}
@media (min-width: 720px) { .audience-grid { grid-template-columns: 1fr 1fr; } }
.audience-card h3 { font-size: 1.3rem; margin-bottom: .5rem; }
.audience-card .badge-pill {
  display: inline-block;
  padding: .25rem .75rem;
  border-radius: 999px;
  background: var(--gradient-brand);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  margin-bottom: .75rem;
}
.audience-card ul { margin-top: 1rem; }
.audience-card li {
  padding: .4rem 0;
  color: var(--text-muted);
  display: flex;
  gap: .5rem;
}
.audience-card li::before { content: "✓"; color: var(--color-accent); font-weight: 800; }

/* ===== Tariffs ===== */
.tariff-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin: 2rem 0;
}
@media (min-width: 720px) { .tariff-grid { grid-template-columns: repeat(3, 1fr); } }
.tariff-card { display: flex; flex-direction: column; }
.tariff-card h3 { font-size: 1.3rem; }

/* Offer product images */
.offer-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: .9rem;
}
.offer-image {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
}
.tariff-price { font-size: 2rem; font-weight: 800; margin: .5rem 0 1rem; }
.tariff-price span { font-size: .95rem; color: var(--text-muted); font-weight: 500; }
.feature-list { margin-top: 1rem; flex: 1; }
.feature-list li {
  padding: .4rem 0;
  color: var(--text-muted);
  display: flex;
  gap: .5rem;
}
.feature-list li::before { content: "✓"; color: var(--color-accent); font-weight: 800; }
.tariff-card .btn { margin-top: 1.25rem; }

/* ===== Steps ===== */
.section { padding: 3rem 0; }
.section-title { font-size: 1.8rem; font-weight: 800; text-align: center; margin-bottom: 2rem; }
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .steps-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .steps-grid { grid-template-columns: repeat(4, 1fr); } }
.step-card { text-align: center; }
.step-number {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  margin: 0 auto 1rem;
}

/* ===== Stats ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}
.stat-card { text-align: center; }
.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.stat-label { color: var(--text-muted); font-size: .9rem; }

/* ===== FAQ ===== */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; float: right; color: var(--color-primary); font-weight: 800; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { color: var(--text-muted); margin-top: .75rem; }

/* ===== Forms ===== */
.auth-wrap {
  display: flex;
  justify-content: center;
  padding: 3rem 0;
}
.auth-card { width: 100%; max-width: 480px; }
.auth-card h1 { font-size: 1.5rem; margin-bottom: 1.5rem; text-align: center; }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .4rem; }
.form-control {
  width: 100%;
  padding: .7rem .9rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-solid);
  color: var(--text);
}
.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(108, 92, 231, .18);
}
select.form-control[multiple] { height: auto; min-height: 140px; }
.field-error { color: #e0356b; font-size: .8rem; margin-top: .3rem; }
.field-hint { color: var(--text-muted); font-size: .8rem; margin-top: .3rem; }
.form-footer-link { text-align: center; margin-top: 1.25rem; color: var(--text-muted); font-size: .9rem; }

/* ===== Flash messages ===== */
.flash-list { position: fixed; top: 84px; right: 1rem; left: 1rem; z-index: 100; display: flex; flex-direction: column; gap: .5rem; max-width: 420px; margin-left: auto; }
@media (min-width: 480px) { .flash-list { left: auto; } }
.flash {
  padding: .85rem 1.1rem;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-weight: 600;
  font-size: .9rem;
  background: var(--bg-solid);
  border-left: 4px solid var(--color-primary);
}
.flash-success { border-left-color: var(--color-accent); }
.flash-error { border-left-color: #e0356b; }
.flash-info { border-left-color: var(--color-primary); }

/* ===== Dashboards (placeholders) ===== */
.dashboard-wrap { padding: 2.5rem 0; }
.dashboard-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: 1rem; }
.role-badge {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  background: var(--gradient-brand);
  color: #fff;
  /* Prevent the badge from vertically stretching (into an oval/circle) when it's
     a flex item next to taller content, and keep the label on one line. */
  align-self: flex-start;
  white-space: nowrap;
  text-align: center;
  line-height: 1.4;
}
.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
  margin-top: .5rem;
}
.progress-fill { height: 100%; background: var(--gradient-brand); border-radius: 999px; }

/* ===== Deal checklist ===== */
.checklist {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1rem;
}
.checklist-step {
  flex: 1;
  min-width: 120px;
  text-align: center;
  padding: .75rem .5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-solid);
  border: 1.5px solid var(--border);
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
}
.checklist-step.done { background: var(--gradient-brand); color: #fff; border-color: transparent; }
.checklist-step.current { border-color: var(--color-primary); color: var(--text); }

/* ===== Admin layout ===== */
.admin-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  padding: 2rem 0;
}
.admin-sidebar {
  width: 200px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  position: sticky;
  top: 84px;
}
.admin-sidebar a {
  padding: .6rem .9rem;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: .9rem;
}
.admin-sidebar a:hover { background: var(--bg-elevated); color: var(--text); }
.admin-sidebar a.active { background: var(--gradient-brand); color: #fff; }
.admin-content { flex: 1; min-width: 0; }

/* Inline action forms (e.g. subscription extend/budget/cancel) — wrap cleanly and
   stack on narrow screens instead of overlapping. */
.sub-actions {
  display: flex;
  gap: .75rem;
  margin-top: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.sub-action-form {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.sub-action-form .form-control { width: 150px; }
.sub-actions .btn { white-space: nowrap; }
@media (max-width: 620px) {
  .sub-actions { flex-direction: column; align-items: stretch; }
  .sub-action-form { width: 100%; }
  .sub-action-form .form-control { flex: 1; width: auto; }
}

@media (max-width: 900px) {
  .admin-layout { flex-direction: column; padding-top: 1.25rem; }
  .admin-sidebar {
    width: 100%;
    flex-direction: row;
    overflow-x: auto;
    position: static;
    gap: .5rem;
    padding-bottom: .5rem;
  }
  .admin-sidebar a { white-space: nowrap; }
}

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--border);
}
.admin-row:last-child { border-bottom: none; }

/* ===== Portfolio stories ===== */
.stories-row {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: .5rem .25rem 1rem;
}
.story-item { flex-shrink: 0; text-align: center; width: 84px; }
.story-ring {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  padding: 3px;
  background: var(--gradient-brand);
  cursor: pointer;
  transition: transform .15s ease;
}
.story-ring:hover { transform: scale(1.06); }
.story-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--bg);
}
.story-label {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: .35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.story-add {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 2px dashed var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--color-primary);
  cursor: pointer;
  background: var(--bg-elevated);
}

/* Fullscreen story viewer */
.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 8, 14, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}
.story-viewer.open { display: flex; }
.story-stage {
  position: relative;
  width: min(430px, 100%);
  height: 100%;
  max-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.story-stage img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
  object-fit: contain;
}
.story-progress {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  display: flex;
  gap: 4px;
  z-index: 3;
}
.story-progress span {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.3);
  overflow: hidden;
}
.story-progress span.active { background: #fff; }
.story-meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1.25rem 1.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
  color: #fff;
  border-radius: 0 0 16px 16px;
}
.story-meta .result {
  display: inline-block;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 800;
  padding: .3rem .8rem;
  border-radius: 999px;
  font-size: .9rem;
  margin-bottom: .5rem;
}
.story-meta .reach { color: rgba(255, 255, 255, 0.85); font-size: .85rem; }
.story-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 4;
  font-size: 1.6rem;
  color: #fff;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}
.story-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40%;
  z-index: 2;
  cursor: pointer;
}
.story-nav.prev { left: 0; }
.story-nav.next { right: 0; }

/* ===== Floating support widget ===== */
.fab-stack {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  align-items: center;
}
.fab {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .28);
  transition: transform .18s cubic-bezier(.34, 1.56, .64, 1);
}
.fab:hover { transform: scale(1.1); }
.fab:active { transform: scale(.95); }
.fab-tg { background: #29a9eb; }
.fab-chat { background: var(--gradient-brand); }

.support-panel {
  position: fixed;
  right: 20px;
  bottom: 86px;
  z-index: 151;
  width: min(340px, calc(100vw - 40px));
  height: 460px;
  max-height: calc(100vh - 120px);
  background: var(--bg-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .35);
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.support-panel.open { display: flex; }
.support-head {
  padding: .9rem 1rem;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.support-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}
.support-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.support-empty { color: var(--text-muted); font-size: .85rem; text-align: center; margin: auto; }
.support-msg {
  max-width: 82%;
  padding: .5rem .8rem;
  border-radius: 14px;
  font-size: .9rem;
}
.support-msg span { display: block; font-size: .65rem; opacity: .7; margin-top: .2rem; }
.support-msg.me { align-self: flex-end; background: var(--gradient-brand); color: #fff; border-bottom-right-radius: 4px; }
.support-msg.admin { align-self: flex-start; background: var(--bg-elevated); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.support-input {
  display: flex;
  gap: .5rem;
  padding: .75rem;
  border-top: 1px solid var(--border);
}
.support-input input {
  flex: 1;
  padding: .55rem .8rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--bg);
  color: var(--text);
}
.support-input input:focus { outline: none; border-color: var(--color-primary); }

/* ===== User honorary badges ===== */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
  color: #fff;
  background: var(--gradient-brand);
}
.user-badge-top_seller { background: linear-gradient(135deg, #d4a13a, #8a5a17); }
.user-badge-top_bloger { background: linear-gradient(135deg, #ff5c8a, #a11c6b); }
.user-badge-verified   { background: linear-gradient(135deg, #17b978, #0a6b52); }
.user-badge-trusted    { background: linear-gradient(135deg, #2b8dff, #0b3a8c); }

/* ===== Dashboard growth line charts ===== */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: .75rem;
}
@media (min-width: 720px) { .charts-grid { grid-template-columns: repeat(3, 1fr); } }
.line-chart { color: var(--text); margin-top: .5rem; }
.lc-svg { display: block; overflow: visible; }
.lc-val { fill: var(--text); font-size: 13px; font-weight: 700; }
.lc-label { fill: var(--text-muted); font-size: 12px; }

.notif-image {
  max-width: 100%;
  max-height: 260px;
  border-radius: var(--radius-sm);
  margin: .5rem 0;
  display: block;
}

/* ===== Admin sidebar collapsible groups ===== */
.admin-group { display: flex; flex-direction: column; }
.admin-group-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
  padding: .55rem .9rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  opacity: .75;
}
.admin-group-head:hover { opacity: 1; color: var(--text); }
.admin-group-caret { font-size: .7rem; transition: transform .2s ease; }
.admin-group.open .admin-group-caret { transform: rotate(180deg); }
.admin-group-links { display: none; flex-direction: column; gap: .25rem; }
.admin-group.open .admin-group-links { display: flex; }

/* ===== 3D credit card ===== */
.credit-card {
  position: relative;
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1.586 / 1;
  border-radius: 16px;
  padding: 1.25rem 1.4rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .35);
  background: linear-gradient(135deg, #6d5efc, #4a2fb8);
  transition: transform .2s ease, box-shadow .2s ease;
}
.credit-card:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 0 18px 40px rgba(0, 0, 0, .45); }
.card-design-purple { background: linear-gradient(135deg, #7b5cff, #3a1c94); }
.card-design-blue   { background: linear-gradient(135deg, #2b8dff, #0b3a8c); }
.card-design-gold   { background: linear-gradient(135deg, #d4a13a, #8a5a17); color: #2a1e05; }
.card-design-dark   { background: linear-gradient(135deg, #3a3f4b, #14161c); }
.card-design-green  { background: linear-gradient(135deg, #17b978, #0a6b52); }
.card-design-pink   { background: linear-gradient(135deg, #ff5c8a, #a11c6b); }
.credit-card-glow {
  position: absolute;
  top: -40%;
  right: -20%;
  width: 220px;
  height: 220px;
  background: rgba(255, 255, 255, .18);
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}
.credit-card-top { display: flex; justify-content: space-between; align-items: center; }
.credit-card-bank { font-weight: 800; letter-spacing: .06em; font-size: .95rem; text-transform: uppercase; }
.credit-card-chip {
  width: 42px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f6d365, #d9a441);
  box-shadow: inset 0 0 4px rgba(0, 0, 0, .4);
}
.credit-card-number {
  font-family: "Courier New", monospace;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .3);
}
.credit-card-bottom { display: flex; justify-content: space-between; align-items: flex-end; }
.credit-card-label { display: block; font-size: .6rem; opacity: .75; text-transform: uppercase; letter-spacing: .05em; }
.credit-card-owner { font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: .95rem; }
.credit-card-brand { font-weight: 800; font-style: italic; opacity: .9; }

.payment-cards { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin-bottom: .5rem; }
.card-admin-grid { display: grid; grid-template-columns: 1fr; gap: 1.75rem; }
@media (min-width: 720px) { .card-admin-grid { grid-template-columns: 1fr 1fr; } }
.card-form-layout { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 860px) { .card-form-layout { grid-template-columns: 1fr 380px; } }

/* ===== Auto-payment (coming soon) ===== */
.autopay-box {
  position: relative;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}
.autopay-soon {
  position: absolute;
  top: -.6rem;
  right: 1rem;
  background: var(--gradient-brand);
  color: #fff;
  font-size: .65rem;
  font-weight: 800;
  padding: .15rem .6rem;
  border-radius: 999px;
  text-transform: uppercase;
}
.autopay-btns { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
.autopay-btns .btn { width: auto; opacity: .6; cursor: not-allowed; }

/* ===== Custom file input (js/file-input.js wraps the real input) ===== */
.file-field {
  display: flex;
  align-items: center;
  gap: .75rem;
  cursor: pointer;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem .6rem;
  background: var(--bg-elevated);
  transition: border-color .15s ease, background .15s ease;
}
.file-field:hover { border-color: var(--color-primary); }
.file-field.has-file { border-style: solid; border-color: var(--color-accent); }
.file-field-input {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.file-field-btn {
  flex-shrink: 0;
  background: var(--gradient-brand);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  padding: .5rem .9rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}
.file-field-name {
  color: var(--text-muted);
  font-size: .9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-field.has-file .file-field-name { color: var(--text); }

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: 3rem;
  color: var(--text-muted);
  font-size: .85rem;
  text-align: center;
}
