/* ============================================================
   Livasta Admin — Upgraded Premium Design System
   ============================================================ */

:root {
  --pine: #007A7A;        /* brand teal — primary */
  --pine-light: #0E9C95;  /* lighter teal */
  --pine-dark: #00605E;
  --cream: #FFFFFF;       /* light surfaces */
  --canvas: #F0F4F1;      /* soft canvas background matching listings page */
  --coral: #EB6F4A;       /* warm accent */
  --coral-dark: #D65A36;
  --gold: #D9A35A;
  --ink: #1E2D34;         /* deep slate text */
  --sage: #DCE8DF;        /* sage border tint */
  --muted: #5E727A;       /* balanced muted text */
  --violet: #6D5AE6;      /* indigo/violet highlight accent */
  --violet-soft: #ECE9FB;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-full: 999px;
  
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.11);
}

/* ---------- Reset & Base ---------- */
body {
  font-family: 'Plus Jakarta Sans', sans-serif;
  background-color: var(--canvas);
  color: var(--ink);
}

.font-display {
  font-family: 'Fraunces', serif;
}

.rail {
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.rail::-webkit-scrollbar {
  display: none;
}

/* ---------- Tab Links (hybrid SPA navbar) ---------- */
.tab-link {
  position: relative;
  transition: color 0.2s ease;
}
.tab-link.active {
  color: var(--violet) !important;
}
.tab-link.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -13px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--pine), var(--violet)) !important;
  box-shadow: 0 3px 10px rgba(109, 90, 230, 0.35);
}
.tab-link.active::before {
  content: '';
  position: absolute;
  inset: 4px -11px 8px;
  z-index: -1;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(0,122,122,.09), rgba(109,90,230,.10));
}
.tab-link:not(.active) {
  color: var(--muted);
}
.tab-link:not(.active):hover {
  color: var(--violet);
}

.mtab-link.active {
  background: linear-gradient(135deg, var(--pine), var(--violet)) !important;
  color: white !important;
}

.section-panel {
  display: none;
}
.section-panel.active {
  display: block;
}

/* ---------- Switches ---------- */
.switch {
  width: 40px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--sage);
  position: relative;
  transition: background 0.2s ease;
  cursor: pointer;
  flex-shrink: 0;
}
.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.switch.on {
  background: var(--pine);
}
.switch.on::after {
  left: 20px;
}

/* ---------- Badges ---------- */
.badge {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.badge-success { background: #E3F1E6; color: #2F7D4F; }
.badge-warning { background: #FBF0DD; color: #B5792A; }
.badge-danger { background: #FBE7E1; color: #C5502E; }
.badge-info { background: #EEF3F0; color: var(--pine); }
.badge-muted { background: #EFEAE0; color: var(--muted); }
.badge-coral { background: var(--coral); color: white; }

.filter-btn.active {
  background: var(--pine);
  color: white;
  border-color: var(--pine);
}

#mobile-panel {
  transform: translateY(-12px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}
#mobile-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

#account-pop {
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
#account-pop.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Cards with dynamic hover ---------- */
.card-lift {
  background-color: var(--cream);
  border-radius: var(--radius-xl);
  border: 1px solid var(--sage);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
}
.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 36px -16px rgba(0, 122, 122, 0.2);
  border-color: rgba(0, 122, 122, 0.25);
}

/* ---------- Premium KPI Cards ---------- */
.kpi-card {
  background-color: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--sage);
  border-left-width: 4px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}
.kpi-card:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 16px 36px -16px rgba(0, 122, 122, 0.25);
  border-color: rgba(0, 122, 122, 0.25);
}
.kpi-card::after {
  content: '';
  position: absolute;
  top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  transform: skewX(-20deg);
  transition: 0.5s;
  pointer-events: none;
}
.kpi-card:hover::after {
  left: 150%;
}
.kpi-card-pine { border-left-color: var(--pine); }
.kpi-card-gold { border-left-color: var(--gold); }
.kpi-card-coral { border-left-color: var(--coral); }
.kpi-card-violet { border-left-color: var(--violet); }

/* ---------- Quick Actions Bar ---------- */
.qa-bar {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  border: 1px solid var(--sage);
  box-shadow: var(--shadow-sm);
  padding: 8px;
}
.qa-btn {
  border-radius: var(--radius-full);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.qa-btn:hover {
  background: var(--pine);
  color: var(--cream);
}

/* ---------- 3D Hero Banner ---------- */
.hero-3d {
  position: relative;
  overflow: hidden;
  background: linear-gradient(115deg, #071D1B, #007A7A 50%, #00605E);
  border-radius: var(--radius-2xl);
  box-shadow: 0 12px 35px -10px rgba(0, 122, 122, 0.3);
}
.hero-3d::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(700px circle at 15% -10%, rgba(235, 111, 74, 0.22), transparent 60%);
  pointer-events: none;
}
.hero-3d::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 140px;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  transform: skewX(-18deg);
  animation: shine 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shine {
  0%, 60% { left: -30% }
  100% { left: 130% }
}

#globeCanvas {
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: min(44%, 400px);
  aspect-ratio: 1;
  opacity: 0.95;
  pointer-events: none;
  z-index: 1;
}
@media (max-width: 768px) {
  #globeCanvas {
    opacity: 0.25;
    width: 65%;
    right: -10%;
  }
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7BC894;
  box-shadow: 0 0 0 0 rgba(123, 200, 148, 0.6);
  animation: livepulse 2s infinite;
}
@keyframes livepulse {
  0% { box-shadow: 0 0 0 0 rgba(123, 200, 148, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(123, 200, 148, 0); }
  100% { box-shadow: 0 0 0 0 rgba(123, 200, 148, 0); }
}

/* ---------- Avatar Ring ---------- */
.ring-avatar {
  position: relative;
  border-radius: 50%;
  padding: 2px;
  background: conic-gradient(from 180deg, var(--coral), var(--gold), var(--pine), var(--coral));
}
.ring-avatar img {
  border-radius: 50%;
  display: block;
}
/* NB: don't force display:block on .init here — it would override .init's flex
   centering below (this selector is more specific), pushing the initials to the
   top-left so they look clipped/uncentered inside the ring. */
.ring-avatar .init {
  border-radius: 50%;
}
.init {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  overflow: hidden;      /* keep initials inside the circle */
  aspect-ratio: 1 / 1;   /* stay perfectly round even if only one dimension is set */
  color: var(--cream);
  /* Default fill so the initials are always visible. Many avatars are built in
     JS with a Tailwind colour class (e.g. `bg-pine`); the Play CDN doesn't
     always generate those for dynamically-inserted nodes, which left cream
     initials on no background (invisible). This guarantees a fill; explicit
     `bg-*` classes or inline `background` still override it when they apply. */
  background: var(--pine);
}

.meter {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--sage);
  overflow: hidden;
}
.meter > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.feed-item {
  position: relative;
  padding-left: 24px;
}
.feed-item::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: -16px;
  width: 2px;
  background: var(--sage);
}
.feed-item:last-child::before {
  display: none;
}
.feed-dot {
  position: absolute;
  left: 0;
  top: 5px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 3px solid var(--cream);
  box-shadow: 0 0 0 1px var(--sage);
}

.tick-row {
  transition: background 0.25s ease;
}
.tick-row:hover {
  background: rgba(220, 232, 223, 0.25);
}

.chip-num {
  font-variant-numeric: tabular-nums;
}

.gcell {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.gcell:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 24px -8px rgba(0, 122, 122, 0.3);
  z-index: 2;
}

.fade-panel {
  animation: panelIn 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Table upgrades ---------- */
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
td {
  color: var(--ink);
}

/* ---------- Responsive Layout Fixes ---------- */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

.overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
  .hero-3d {
    padding: 1.5rem !important;
    border-radius: var(--radius-xl);
  }
  .hero-3d h1 {
    font-size: 1.5rem !important;
  }
  .card-lift {
    border-radius: var(--radius-lg);
  }
}

/* ---------- Notification Panel (Slide-in sidebar) ---------- */
.notification-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-left: 1px solid var(--sage);
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  /* Above the mobile bottom nav (z-index 99) so it covers it when open. */
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.33, 1, 0.68, 1);
  display: flex;
  flex-direction: column;
}

.notification-panel.open {
  transform: translateX(0);
}

.notification-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(22, 51, 44, 0.35);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.notification-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.notification-panel .panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--sage);
}

.notification-panel .panel-title {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--pine);
}

.notification-panel .notif-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.notif-item {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid rgba(220, 232, 223, 0.5);
  transition: background 0.15s ease;
  cursor: pointer;
}

.notif-item:hover {
  background: rgba(220, 232, 223, 0.25);
}

.notif-item.unread {
  background: rgba(235, 111, 74, 0.04);
  border-left: 3px solid var(--coral);
}

.notif-item .notif-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-icon.booking { background: #E3F1E6; color: #2F7D4F; }
.notif-icon.message { background: #E8EFF9; color: #3B6EC2; }
.notif-icon.review { background: #FBF0DD; color: #B5792A; }
.notif-icon.alert { background: #FBE7E1; color: #C5502E; }
.notif-icon.payout { background: var(--sage); color: var(--pine); }

.notif-item .notif-content {
  flex: 1;
  min-width: 0;
}

.notif-item .notif-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 2px;
}

.notif-item .notif-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

.notif-item .notif-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}


/* ============================================================
   Admin finance — payments & bookings
   ============================================================ */
.pay-stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.pay-stat {
  position: relative; overflow: hidden; padding: 18px 20px;
  background: #fff; border: 1px solid #DCE8DF; border-radius: 20px;
  transition: box-shadow .2s, transform .2s;
}
.pay-stat:hover { box-shadow: 0 10px 30px -14px rgba(22,51,44,.35); transform: translateY(-2px); }
.pay-stat::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #16332C;
}
.pay-stat--green::before { background: #2F7D4F; }
.pay-stat--gold::before  { background: #D9A35A; }
.pay-stat--ink::before   { background: #8C968F; }
.pay-stat__label {
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: #8C968F;
}
.pay-stat__value {
  font-size: 26px; font-weight: 800; color: #222723; margin-top: 6px;
  font-variant-numeric: tabular-nums; line-height: 1.1;
}
.pay-stat__note { font-size: 12px; color: #8C968F; margin-top: 5px; }

.pay-card { background: #fff; border: 1px solid #DCE8DF; border-radius: 22px; padding: 20px 22px; }
.pay-card--flush { padding: 0; overflow: hidden; }
.pay-card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap; padding: 20px 22px 14px;
}
.pay-card:not(.pay-card--flush) .pay-card__head { padding: 0 0 14px; }
.pay-h { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 600; color: #16332C; margin: 0; }
.pay-card__note { font-size: 12px; color: #8C968F; }

/* revenue by plan */
.pay-plan-list { display: flex; flex-direction: column; gap: 14px; }
.pay-plan__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.pay-plan__name { font-size: 14px; font-weight: 700; color: #222723; }
.pay-plan__amt { font-size: 14px; font-weight: 800; color: #16332C; font-variant-numeric: tabular-nums; }
.pay-plan__amt em { font-style: normal; font-size: 12px; font-weight: 600; color: #8C968F; }
.pay-plan__bar { height: 8px; border-radius: 999px; background: #EEF3F0; overflow: hidden; }
.pay-plan__bar span {
  display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #16332C, #2F7D4F); transition: width .5s ease;
}
.pay-empty-note { font-size: 13px; color: #8C968F; margin: 0; }

/* search + chips */
.pay-search { position: relative; display: flex; align-items: center; gap: 8px;
  border: 1px solid #DCE8DF; border-radius: 999px; padding: 7px 14px; background: #fff; color: #8C968F; }
.pay-search:focus-within { border-color: #16332C; box-shadow: 0 0 0 3px rgba(22,51,44,.08); }
.pay-search input { border: 0; outline: 0; font-size: 13px; font-family: inherit; color: #222723; min-width: 210px; background: transparent; }

.pay-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 22px 16px; }
.pay-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 14px; border-radius: 999px; border: 1.5px solid #DCE8DF;
  background: #fff; color: #8C968F; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s;
}
.pay-chip:hover { border-color: #16332C; color: #16332C; }
.pay-chip.is-active { background: #16332C; border-color: #16332C; color: #FBF6EC; }
.pay-chip__n {
  min-width: 20px; padding: 0 6px; border-radius: 999px; background: #EEF3F0;
  color: #5B6760; font-size: 11px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums;
}
.pay-chip.is-active .pay-chip__n { background: rgba(255,255,255,.22); color: #FBF6EC; }

/* tables */
.pay-table-wrap { overflow-x: auto; border-top: 1px solid #DCE8DF; }
.pay-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; text-align: left; }
.pay-table thead tr { background: #F6F9F7; }
.pay-table th {
  padding: 12px 18px; font-size: 11px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: #8C968F; white-space: nowrap; border-bottom: 1px solid #DCE8DF;
}
.pay-th-amt { text-align: right; }
.pay-table td { padding: 14px 18px; border-bottom: 1px solid rgba(220,232,223,.7); vertical-align: middle; }
.pay-table tbody tr:last-child td { border-bottom: 0; }
.pay-row:hover, .bk-row:hover { background: rgba(22,51,44,.025); }

.pay-host, .bk-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pay-host__mark, .bk-who__mark {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(140deg, #16332C, #2F7D4F);
  color: #fff; font-size: 12px; font-weight: 800;
}
.bk-who__mark { width: 28px; height: 28px; border-radius: 9px; font-size: 11px;
  background: linear-gradient(140deg, #8C968F, #B4C0B8); }
.bk-who__mark--host { background: linear-gradient(140deg, #16332C, #2F7D4F); }
.pay-host__txt { min-width: 0; }
.pay-host__txt strong { display: block; color: #222723; font-weight: 700; }
.pay-host__txt span { display: block; font-size: 12px; color: #8C968F; }
.pay-sub, .bk-sub { display: block; font-size: 12px; color: #8C968F; margin-top: 2px; }
.pay-ref {
  font-size: 12px; color: #5B6760; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  max-width: 190px; display: inline-block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
.pay-amt, .bk-amt {
  text-align: right; font-weight: 800; color: #222723; white-space: nowrap;
  font-variant-numeric: tabular-nums; font-size: 15px;
}
.pay-amt.is-free { color: #16332C; font-size: 13px; font-weight: 700; }

/* empty states */
.pay-td-empty, .bk-td-empty { padding: 36px 18px; text-align: center; color: #8C968F; }
.pay-td-empty strong { display: block; color: #222723; font-size: 15px; margin-bottom: 3px; }
.pay-td-empty span:not(.pay-empty__mark) { font-size: 13px; }
.pay-empty__mark {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  margin: 0 auto 12px; border-radius: 50%; background: #EEF3F0; color: #16332C; font-size: 19px; font-weight: 800;
}
.bk-empty { padding: 54px 24px; text-align: center; color: #8C968F; border-top: 1px solid #DCE8DF; }
.bk-empty[hidden] { display: none !important; }
.bk-empty strong { display: block; color: #222723; font-size: 17px; margin-bottom: 6px; font-family: 'Fraunces', serif; }
.bk-empty span:not(.bk-empty__mark) { display: block; font-size: 13.5px; line-height: 1.6; max-width: 46ch; margin: 0 auto; }
.bk-empty__mark {
  display: flex; align-items: center; justify-content: center; width: 52px; height: 52px;
  margin: 0 auto 14px; border-radius: 50%; background: #EEF3F0; color: #16332C;
}
.pay-foot { font-size: 12.5px; color: #8C968F; line-height: 1.6; max-width: 70ch; }

@media (max-width: 700px) {
  .pay-card__head { padding: 16px 16px 12px; }
  .pay-chips { padding: 0 16px 14px; }
  .pay-search input { min-width: 0; width: 100%; }
  .pay-table th, .pay-table td { padding: 11px 12px; }
  .pay-ref { max-width: 110px; }
}

/* Compact overview KPI cards — the sparkline canvas had no height cap, so each
   card grew to Chart.js's default and the row looked oversized. */
.spark-wrap { height: 30px; overflow: hidden; }
.spark-wrap canvas.spark { height: 30px !important; width: 100% !important; }
.kpi-card { border-radius: 16px; }
.kpi-card .chip-num { line-height: 1.1; }
@media (min-width: 1280px) {
  /* six-across on wide screens: tighter type so the denser grid reads cleanly */
  .kpi-card .chip-num { font-size: 1.4rem; }
}

/* Support ticket filter chips (same family as the payment chips). */
.sup-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 999px;
  border: 1.5px solid #DCE8DF; background: #fff; color: #8C968F; font-size: 13px; font-weight: 700; cursor: pointer; transition: all .15s; }
.sup-chip:hover { border-color: #4F46E5; color: #4F46E5; }
.sup-chip.is-active { background: #4F46E5; border-color: #4F46E5; color: #fff; }
.sup-chip__n { min-width: 20px; padding: 0 6px; border-radius: 999px; background: #EEF0FF; color: #4F46E5;
  font-size: 11px; font-weight: 800; text-align: center; font-variant-numeric: tabular-nums; }
.sup-chip.is-active .sup-chip__n { background: rgba(255,255,255,.22); color: #fff; }

/* ============================================================
   ADMIN THEME v2 — multi-colour spectrum
   The dashboard was a single teal hue that no longer matched the indigo
   admin header. This introduces a six-hue spectrum built around that indigo
   identity, so each KPI reads as its own metric at a glance while the page
   still holds together as one system.
   ============================================================ */
:root {
  --a-indigo:  #4F46E5;
  --a-violet:  #7C3AED;
  --a-pink:    #EC4899;
  --a-cyan:    #06B6D4;
  --a-amber:   #F59E0B;
  --a-emerald: #10B981;
  --a-ink:     #16182F;
  --a-canvas:  #F5F6FB;
  --a-line:    #E6E8F5;
}

/* Canvas picks up a faint indigo wash instead of the old sage-green. */
body { background-color: var(--a-canvas); }
body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(620px circle at 8% -5%,  rgba(79, 70, 229, .07), transparent 60%),
    radial-gradient(560px circle at 98% 8%,  rgba(236, 72, 153, .06), transparent 58%),
    radial-gradient(600px circle at 50% 105%, rgba(6, 182, 212, .05), transparent 60%);
}
main { position: relative; z-index: 1; }

/* ---------- HERO: animated multi-colour mesh ---------- */
.hero-3d {
  background: linear-gradient(120deg, #2B1B6B 0%, #4F46E5 38%, #7C3AED 68%, #C026D3 100%);
  background-size: 220% 220%;
  animation: heroDrift 18s ease-in-out infinite;
  box-shadow: 0 22px 60px -24px rgba(79, 70, 229, .65);
  border: 1px solid rgba(255, 255, 255, .12);
}
@keyframes heroDrift {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
/* colour blooms replace the old single coral wash */
.hero-3d::before {
  background:
    radial-gradient(680px circle at 12% -12%, rgba(236, 72, 153, .38), transparent 62%),
    radial-gradient(560px circle at 88% 112%, rgba(6, 182, 212, .30), transparent 60%);
}
.hero-3d::after { width: 180px; background: linear-gradient(105deg, transparent, rgba(255,255,255,.10), transparent); }

/* ---------- KPI cards: one hue each ---------- */
.kpi-card {
  background: rgba(255, 255, 255, .9);
  border-color: var(--a-line);
  border-left-width: 4px;
}
/* hover glow tinted to the card's own hue */
.kpi-card:hover {
  transform: translateY(-5px) scale(1.012);
  border-color: color-mix(in srgb, var(--kpi-hue, var(--a-indigo)) 40%, transparent);
  box-shadow: 0 20px 42px -18px color-mix(in srgb, var(--kpi-hue, var(--a-indigo)) 55%, transparent);
}
/* a soft hue wash in the corner so the colour reads even without hover */
.kpi-card::before {
  content: ''; position: absolute; top: 0; right: 0; width: 120px; height: 120px;
  background: radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--kpi-hue, var(--a-indigo)) 16%, transparent), transparent 70%);
  pointer-events: none;
}
.kpi-card-indigo  { --kpi-hue: var(--a-indigo);  border-left-color: var(--a-indigo); }
.kpi-card-violet  { --kpi-hue: var(--a-violet);  border-left-color: var(--a-violet); }
.kpi-card-pink    { --kpi-hue: var(--a-pink);    border-left-color: var(--a-pink); }
.kpi-card-cyan    { --kpi-hue: var(--a-cyan);    border-left-color: var(--a-cyan); }
.kpi-card-amber   { --kpi-hue: var(--a-amber);   border-left-color: var(--a-amber); }
.kpi-card-emerald { --kpi-hue: var(--a-emerald); border-left-color: var(--a-emerald); }
/* icon tile + number inherit the card hue */
.kpi-card span[class*="rounded-"] > svg { color: var(--kpi-hue, var(--a-indigo)); }
.kpi-card .chip-num { color: var(--a-ink); }

/* generic cards pick up the indigo system */
.card-lift { border-color: var(--a-line); }
.card-lift:hover {
  box-shadow: 0 18px 40px -18px rgba(79, 70, 229, .28);
  border-color: rgba(79, 70, 229, .28);
}
.qa-btn:hover { background: var(--a-indigo); color: #fff; }

/* ---------- GSAP entrance: pre-hide only when GSAP will animate ---------- */
html.gsap-ready .kpi-anim,
html.gsap-ready .reveal { opacity: 0; }

/* Motion-sensitive users get everything immediately, no drift, no reveal. */
@media (prefers-reduced-motion: reduce) {
  .hero-3d { animation: none; }
  .hero-3d::after { animation: none; }
  html.gsap-ready .kpi-anim,
  html.gsap-ready .reveal { opacity: 1 !important; transform: none !important; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .hero-3d { background-size: 300% 300%; }
}
@media (max-width: 640px) {
  .kpi-card::before { width: 80px; height: 80px; }
  .kpi-card:hover { transform: translateY(-3px); }
  .hero-3d { box-shadow: 0 14px 34px -18px rgba(79, 70, 229, .6); }
}
