/* ═══════════ Liquid Glass Design System ═══════════ */
:root {
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --gold-400:  #fbbf24;
  --gold-500:  #f59e0b;
  --gold-600:  #d97706;
  --ink-900:   #0f172a;
  --ink-700:   #334155;
  --ink-500:   #64748b;
  --ink-300:   #cbd5e1;

  --glass-bg:        rgba(255, 255, 255, 0.55);
  --glass-bg-strong: rgba(255, 255, 255, 0.7);
  --glass-border:    rgba(255, 255, 255, 0.6);
  --glass-highlight: rgba(255, 255, 255, 0.85);
  --glass-shadow:    0 8px 32px rgba(31, 38, 135, 0.12);
}

* { font-feature-settings: "cv11", "ss01"; }

html { -webkit-text-size-adjust: 100%; }

html, body {
  font-family: 'Inter', 'Noto Sans Myanmar', 'Pyidaungsu', 'Padauk', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  background: #eef1ff;
}

/* ── Animated mesh gradient wallpaper (bottom layer) ── */
body::before {
  content: "";
  position: fixed;
  inset: -25%;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(42% 38% at 18% 22%, rgba(99, 102, 241, 0.42), transparent 70%),
    radial-gradient(36% 34% at 82% 16%, rgba(168, 85, 247, 0.32), transparent 70%),
    radial-gradient(46% 42% at 74% 82%, rgba(245, 158, 11, 0.26), transparent 70%),
    radial-gradient(32% 30% at 12% 86%, rgba(56, 189, 248, 0.24), transparent 70%),
    linear-gradient(180deg, #eef2ff 0%, #fdf4ff 60%, #fff7ed 100%);
  animation: meshDrift 26s ease-in-out infinite alternate;
}

@keyframes meshDrift {
  from { transform: translate(0, 0) scale(1) rotate(0deg); }
  to   { transform: translate(2.5%, -2.5%) scale(1.07) rotate(1.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
  .animate-float, .animate-pulse-glow, .animate-spin-slow,
  .animate-shimmer, .animate-sparkle { animation: none; }
}

/* ── Typography ── */
:lang(my), .my { font-family: 'Noto Sans Myanmar', 'Pyidaungsu', 'Padauk', sans-serif; }

.text-gradient {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #f59e0b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-balance { text-wrap: balance; }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ═══════════ Glass Surfaces ═══════════ */
.card, .glass {
  position: relative;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border-radius: 1.5rem;
  border: 1px solid var(--glass-border);
  box-shadow:
    var(--glass-shadow),
    inset 0 1px 0 var(--glass-highlight),
    inset 0 -1px 0 rgba(255, 255, 255, 0.15);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.card-hover:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 48px rgba(31, 38, 135, 0.18),
    inset 0 1px 0 var(--glass-highlight);
}

.review-card.bulk-selected {
  border-color: rgba(99, 102, 241, 0.72);
  box-shadow:
    0 0 0 3px rgba(99, 102, 241, 0.16),
    0 16px 38px rgba(79, 70, 229, 0.14),
    inset 0 1px 0 var(--glass-highlight);
}

.table-modern tbody tr.member-bulk-selected {
  background: rgba(99, 102, 241, 0.1);
  box-shadow: inset 3px 0 0 rgba(99, 102, 241, 0.72);
}

/* fallback: no backdrop-filter support */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card, .glass { background: rgba(255, 255, 255, 0.93); }
  .dock { background: rgba(255, 255, 255, 0.96); }
  .input { background: rgba(255, 255, 255, 0.95); }
}

/* ── Brand gradient panels (vivid, non-glass heroes) ── */
.brand-gradient {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #a855f7 100%);
}

.brand-gradient-warm {
  background:
    radial-gradient(circle at 30% 20%, rgba(251, 191, 36, 0.35), transparent 50%),
    linear-gradient(135deg, rgba(79, 70, 229, 0.92) 0%, rgba(124, 58, 237, 0.92) 50%, rgba(192, 38, 211, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 20px 60px rgba(124, 58, 237, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.hero-grid {
  background-image:
    linear-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ═══════════ Buttons — glass capsules ═══════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all 0.2s cubic-bezier(0.34, 1.4, 0.64, 1);
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.9), rgba(109, 40, 217, 0.9));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow:
    0 8px 24px rgba(79, 70, 229, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-primary:hover {
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateY(-1px);
}

.btn-gold {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.92), rgba(217, 119, 6, 0.92));
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: white;
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow:
    0 10px 30px rgba(245, 158, 11, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn-gold:hover {
  box-shadow: 0 14px 40px rgba(245, 158, 11, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.btn-ghost { color: var(--ink-700); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.5); }

.btn-outline {
  background: rgba(255, 255, 255, 0.45);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-color: rgba(255, 255, 255, 0.7);
  color: var(--ink-700);
  box-shadow: 0 2px 10px rgba(31, 38, 135, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.btn-outline:hover { background: rgba(255, 255, 255, 0.7); color: var(--brand-600); }

.btn-success {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.92), rgba(5, 150, 105, 0.92));
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(16, 185, 129, 0.5), inset 0 1px 0 rgba(255,255,255,0.45); }

.btn-danger {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.92), rgba(225, 29, 72, 0.92));
  color: white;
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 8px 24px rgba(244, 63, 94, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 12px 32px rgba(244, 63, 94, 0.5), inset 0 1px 0 rgba(255,255,255,0.45); }

/* ═══════════ Inputs — frosted ═══════════ */
.input {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 255, 255, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 0.9rem;
  min-height: 44px;
  transition: all 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(31, 38, 135, 0.06);
}
.input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), inset 0 1px 2px rgba(31, 38, 135, 0.04);
}

/* ═══════════ Stat tiles — glass with color bloom ═══════════ */
.stat-tile {
  position: relative;
  overflow: hidden;
  padding: 1.25rem;
  border-radius: 1.5rem;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), inset 0 1px 0 var(--glass-highlight);
}
.stat-tile::after {
  content: "";
  position: absolute;
  top: -45%;
  right: -12%;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  opacity: 0.16;
  filter: blur(8px);
  pointer-events: none;
}
.stat-tile-indigo::after  { background: #6366f1; }
.stat-tile-emerald::after { background: #10b981; }
.stat-tile-amber::after   { background: #f59e0b; }
.stat-tile-rose::after    { background: #f43f5e; }
.stat-tile-violet::after  { background: #8b5cf6; }
.stat-tile-slate::after   { background: #64748b; }

/* ═══════════ Badges — tinted glass pills ═══════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* ═══════════ Mobile bottom dock (iOS tab bar) ═══════════ */
.dock {
  position: fixed;
  left: 0.75rem;
  right: 0.75rem;
  bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  z-index: 50;
  background: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  backdrop-filter: blur(28px) saturate(200%);
  border-radius: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 12px 40px rgba(31, 38, 135, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: flex-start;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  align-items: stretch;
  padding: 0.4rem 0.35rem;
}

.dock-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  flex: 0 0 auto;
  min-width: 4.5rem;
  min-height: 52px;
  border-radius: 1.4rem;
  color: var(--ink-500);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.2s cubic-bezier(0.34, 1.4, 0.64, 1);
  text-decoration: none;
  padding: 0.3rem 0.1rem;
}

.dock-item.active {
  color: var(--brand-700);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.14));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 2px 8px rgba(99, 102, 241, 0.15);
}

.dock-item:active { transform: scale(0.92); }

/* content clearance for the dock on mobile */
@media (max-width: 767px) {
  main { padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ═══════════ Tables ═══════════ */
.table-modern { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-modern thead th {
  background: rgba(255, 255, 255, 0.35);
  color: var(--ink-500);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}
.table-modern tbody td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  font-size: 0.875rem;
}
.table-modern tbody tr:last-child td { border-bottom: none; }
.table-modern tbody tr:hover { background: rgba(255, 255, 255, 0.35); }

/* ── Mobile: tables become stacked glass mini-cards ── */
@media (max-width: 767px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody { display: block; }
  .table-cards tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem 0.9rem;
    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 1.2rem;
    padding: 0.9rem 1.1rem;
    margin: 0.65rem 0.75rem;
    box-shadow: 0 4px 16px rgba(31, 38, 135, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.7);
  }
  .table-cards tbody tr:hover { background: rgba(255, 255, 255, 0.5); }
  .table-cards tbody td {
    display: block;
    border-bottom: none !important;
    padding: 0.1rem 0 !important;
  }
  .table-cards tbody td[data-th]::before {
    content: attr(data-th);
    display: block;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--ink-500);
    font-weight: 600;
    margin-bottom: 0.1rem;
  }
  .table-cards tbody td.tc-full { grid-column: 1 / -1; }
}

/* ═══════════ Animations ═══════════ */
@keyframes float       { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulseGlow   { 0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.6); } 50% { box-shadow: 0 0 0 18px rgba(245, 158, 11, 0); } }
@keyframes spinSlow    { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes shimmer     { 0%, 100% { opacity: 0.5; } 50% { opacity: 1; } }
@keyframes fadeUp      { 0% { opacity: 0; transform: translateY(10px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes celebrate   { 0% { transform: scale(0.8) rotate(-8deg); opacity: 0; } 60% { transform: scale(1.08) rotate(4deg); } 100% { transform: scale(1) rotate(0); opacity: 1; } }
@keyframes sparkle     { 0%, 100% { transform: scale(0.6) rotate(0); opacity: 0.4; } 50% { transform: scale(1.2) rotate(180deg); opacity: 1; } }

.animate-float        { animation: float 3.2s ease-in-out infinite; }
.animate-pulse-glow   { animation: pulseGlow 2.2s ease-out infinite; }
.animate-spin-slow    { animation: spinSlow 14s linear infinite; }
.animate-shimmer      { animation: shimmer 2.4s ease-in-out infinite; }
.animate-fade-up      { animation: fadeUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both; }
.animate-celebrate    { animation: celebrate 0.6s ease-out both; }
.animate-sparkle      { animation: sparkle 2.4s ease-in-out infinite; }

/* ═══════════ Utilities ═══════════ */
.focus-ring:focus-visible {
  outline: 3px solid rgba(99, 102, 241, 0.4);
  outline-offset: 2px;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.15); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, 0.25); }

audio { width: 100%; border-radius: 999px; }

/* iOS momentum scrolling */
.overflow-x-auto { -webkit-overflow-scrolling: touch; }
