/* Càn Khôn — Tinh Bàn Hoàng Kim Design System (Phone-first + Responsive Desktop) */
:root {
  --bg: #0b0a08;
  --bg-elev: #15120d;
  --bg-card: rgba(24, 20, 14, 0.88);
  --bg-card-soft: rgba(31, 26, 18, 0.72);
  --border: rgba(229, 185, 92, 0.28);
  --border-strong: rgba(235, 198, 114, 0.58);
  --gold: #e5b95c;
  --gold-bright: #f5d88e;
  --gold-deep: #b3802c;
  --text: #f6f0e4;
  --muted: #b5a58b;
  --dim: #7f725e;
  --ok: #34c77b;
  --ok-bg: rgba(34, 150, 88, 0.18);
  --warn: #e5a93c;
  --bad: #e35d5d;
  --bad-bg: rgba(227, 93, 93, 0.14);
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  --font-sans: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 50% -10%, rgba(217, 168, 75, 0.14), transparent 52%), var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100dvh;
  overflow-x: hidden;
  line-height: 1.45;
}

/* App Shell */
.app-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100dvh;
  padding-bottom: calc(82px + env(safe-area-inset-bottom, 0px));
  position: relative;
}

@media (min-width: 960px) {
  .app-shell {
    max-width: 1120px;
    padding: 0 24px 96px;
  }
}

/* Top Bar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
  background: rgba(11, 10, 8, 0.84);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 185, 92, 0.16);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 14px rgba(229, 185, 92, 0.25);
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.02em;
  background: linear-gradient(135deg, #fff3cf, #e5b95c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.pro-pill {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f3d282, #b8842e);
  color: #161006;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-pill {
  max-width: 164px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: rgba(24, 20, 14, 0.95);
  color: var(--gold-bright);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(24, 20, 14, 0.9);
  border: 1px solid var(--border);
  color: var(--gold-bright);
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.icon-btn svg { width: 17px; height: 17px; }

/* Main Container */
.view { display: none; padding: 14px; }
.view.active { display: block; animation: fadeIn 0.18s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

@media (min-width: 960px) {
  .home-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 18px;
    align-items: start;
  }
  .two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
  }
}

/* Flagship Hero Card (Tinh Bàn Hoàng Kim) */
.hero-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), 0 0 28px rgba(229, 185, 92, 0.12);
  margin-bottom: 14px;
  background: #100d09;
}

.hero-art {
  position: relative;
  min-height: 248px;
  padding: 18px 16px 16px;
  background-image: linear-gradient(90deg, rgba(11, 10, 8, 0.86) 0%, rgba(11, 10, 8, 0.48) 54%, rgba(11, 10, 8, 0.18) 100%),
                    linear-gradient(180deg, rgba(11, 10, 8, 0.12) 0%, rgba(11, 10, 8, 0.82) 86%, #110e0a 100%),
                    url("/art/hero-mountain.webp");
  background-size: cover;
  background-position: center 25%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-weekday {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}

.hero-day-num {
  font-family: var(--font-serif);
  font-size: 74px;
  font-weight: 700;
  line-height: 0.96;
  margin: 4px 0 6px;
  background: linear-gradient(180deg, #fff9e8 0%, #f3d07c 58%, #bd8832 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.65));
}

.hero-solar {
  font-size: 14px;
  font-weight: 500;
  color: #f3ebdc;
}

.hero-lunar {
  font-size: 13px;
  color: var(--gold-bright);
  margin-top: 3px;
}

.hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(16, 13, 9, 0.78);
  border: 1px solid rgba(229, 185, 92, 0.25);
  backdrop-filter: blur(8px);
  font-size: 12px;
}

.hero-strip strong { color: var(--gold-bright); display: block; font-size: 12px; }
.hero-strip span { color: var(--muted); }

/* Auspicious Status Banner */
.status-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) 14px 12px;
  border-radius: 16px;
  margin-bottom: 14px;
  background: linear-gradient(110deg, rgba(24, 48, 34, 0.65) 0%, rgba(28, 22, 14, 0.92) 60%, rgba(44, 33, 18, 0.88) 100%);
  border: 1px solid rgba(229, 185, 92, 0.36);
  cursor: pointer;
  width: 100%;
  text-align: left;
  color: var(--text);
}

.status-banner.bad {
  background: linear-gradient(110deg, rgba(64, 24, 24, 0.65) 0%, rgba(28, 22, 14, 0.92) 70%);
}

.status-orb {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 13px;
  background: radial-gradient(circle at 35% 30%, #4de091, #19874f);
  color: #fff;
  box-shadow: 0 0 18px rgba(52, 199, 123, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.status-banner.bad .status-orb {
  background: radial-gradient(circle at 35% 30%, #f07d7d, #a82828);
  box-shadow: 0 0 18px rgba(227, 93, 93, 0.4);
}

.status-meta { flex: 1; min-width: 0; }
.status-title { font-size: 15px; font-weight: 700; color: var(--text); }
.status-sub { font-size: 12px; color: var(--gold-bright); margin-top: 2px; }

/* 5 Shortcut Tiles (Matching Approved Board) */
.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.shortcut-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(36, 29, 19, 0.92), rgba(18, 15, 10, 0.95));
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease;
}

.shortcut-btn:hover, .shortcut-btn:active {
  transform: translateY(-1px);
  border-color: var(--border-strong);
}

.sc-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 216, 142, 0.35);
}

.sc-icon svg { width: 20px; height: 20px; }
.sc-cal { background: linear-gradient(135deg, #6b491c, #2f1f0c); color: #f6d584; }
.sc-pick { background: linear-gradient(135deg, #7c2d23, #3a1410); color: #ffcf8f; }
.sc-tuvi { background: linear-gradient(135deg, #4f3a6d, #231936); color: #f0d7ff; }
.sc-name { background: linear-gradient(135deg, #704b19, #31200a); color: #ffe094; }
.sc-fs { background: linear-gradient(135deg, #3c5426, #1c2912); color: #d8f29e; }

/* Cards & Typography */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-bright);
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.card-link {
  font-size: 12px;
  color: var(--gold);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  font-weight: 600;
}

.hint-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.hint-item { display: flex; align-items: flex-start; gap: 9px; color: #eee6d8; }
.dot-badge { width: 18px; height: 18px; border-radius: 999px; display: inline-grid; place-items: center; flex-shrink: 0; font-size: 11px; font-weight: 800; margin-top: 1px; }
.dot-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(52, 199, 123, 0.4); }
.dot-bad { background: var(--bad-bg); color: var(--bad); border: 1px solid rgba(227, 93, 93, 0.4); }
.dot-gold { background: rgba(229, 185, 92, 0.16); color: var(--gold-bright); border: 1px solid rgba(229, 185, 92, 0.4); }

/* Sub-tabs (Segmented Control) */
.seg-tabs {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: 13px;
  background: rgba(16, 13, 9, 0.92);
  border: 1px solid var(--border);
  margin-bottom: 14px;
  overflow-x: auto;
}

.seg-btn {
  flex: 1;
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.seg-btn.active {
  background: linear-gradient(135deg, #ebc46a, #b7842e);
  color: #161006;
  font-weight: 700;
}

/* Forms & Gold CTA */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 12px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-row { display: flex; flex-direction: column; gap: 5px; margin-bottom: 10px; }
.form-row.full { grid-column: 1 / -1; }
label { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }

input, select, textarea {
  width: 100%;
  background: rgba(12, 10, 8, 0.92);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
  font-family: var(--font-sans);
  font-size: 13px;
  outline: none;
}

input:focus, select:focus, textarea:focus { border-color: var(--gold); }
input[type="range"] { accent-color: var(--gold); padding: 4px 0; border: 0; background: transparent; cursor: pointer; }

.btn-gold {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  color: #171106;
  background: linear-gradient(135deg, #f3d280 0%, #d8a545 55%, #b37e27 100%);
  box-shadow: 0 6px 18px rgba(216, 165, 69, 0.28);
  cursor: pointer;
}

.btn-ghost {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  background: rgba(24, 20, 14, 0.8);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-danger {
  border: 1px solid rgba(227, 93, 93, 0.4);
  border-radius: 10px;
  padding: 6px 10px;
  background: rgba(227, 93, 93, 0.12);
  color: #ff9c9c;
  font-size: 12px;
  cursor: pointer;
}

/* Monthly Calendar Grid */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-weekdays, .cal-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-weekdays span { font-size: 11px; color: var(--muted); padding: 4px 0; font-weight: 600; }
.cal-weekdays span:last-child { color: #e87a6e; }

.cal-cell {
  border-radius: 10px;
  padding: 6px 2px;
  background: rgba(15, 12, 9, 0.72);
  border: 1px solid transparent;
  cursor: pointer;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.cal-cell.empty { background: transparent; cursor: default; }
.cal-cell .d-sol { font-size: 13px; font-weight: 700; }
.cal-cell .d-lun { font-size: 10px; color: var(--muted); }
.cal-cell .d-dot { width: 5px; height: 5px; border-radius: 999px; }
.cal-cell.yellow .d-dot { background: var(--ok); }
.cal-cell.black .d-dot { background: var(--bad); }
.cal-cell.selected, .cal-cell.today {
  border-color: var(--gold);
  background: linear-gradient(180deg, rgba(229, 185, 92, 0.28), rgba(229, 185, 92, 0.08));
}

/* Activity Picker List */
.act-list { display: flex; flex-direction: column; gap: 7px; margin-bottom: 12px; }
.act-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(14, 12, 9, 0.85);
  border: 1px solid rgba(229, 185, 92, 0.16);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.act-item.active { border-color: var(--gold); background: rgba(229, 185, 92, 0.14); color: var(--gold-bright); font-weight: 600; }

/* Ranked Day / Brand / Name Cards */
.rank-item {
  padding: 12px;
  border-radius: 13px;
  background: rgba(15, 13, 10, 0.88);
  border: 1px solid var(--border);
  margin-bottom: 9px;
}
.rank-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rank-score {
  font-weight: 800;
  font-size: 13px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(243, 210, 128, 0.25), rgba(180, 129, 43, 0.22));
  color: var(--gold-bright);
  border: 1px solid var(--border-strong);
}

/* Visual Showcase Art Headers (Phong Thủy, Đặt Tên, Kỳ Môn, AI) */
.art-banner {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b0a08;
  margin-bottom: 12px;
  text-align: center;
  padding: 12px;
}
.art-banner img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  border-radius: 12px;
  object-fit: contain;
}
.compass-img {
  width: 210px;
  height: 210px;
  border-radius: 999px !important;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  filter: drop-shadow(0 0 22px rgba(229, 185, 92, 0.28));
}
.orb-img {
  width: 170px;
  height: 170px;
  filter: drop-shadow(0 0 24px rgba(229, 185, 92, 0.32));
}
.seal-img { width: 100%; max-height: 175px; object-fit: cover !important; }
.qimen-img { width: 175px; height: 175px; filter: drop-shadow(0 0 20px rgba(229, 185, 92, 0.28)); }

/* 3x3 Luo Shu / Kỳ Môn Grids */
.grid-3x3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.palace-cell {
  border-radius: 11px;
  padding: 8px 6px;
  background: rgba(15, 13, 10, 0.92);
  border: 1px solid rgba(229, 185, 92, 0.22);
  font-size: 11px;
}
.palace-cell.good { border-color: rgba(52, 199, 123, 0.45); background: rgba(20, 42, 30, 0.45); }
.palace-cell.warn { border-color: rgba(227, 93, 93, 0.5); background: rgba(58, 22, 22, 0.42); }
.palace-dir { font-weight: 700; color: var(--gold-bright); font-size: 11px; }
.palace-stars { display: flex; justify-content: space-between; margin: 4px 0; font-weight: 700; font-size: 12px; }

/* 12-Palace Tử Vi Grid */
.tuvi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  font-size: 10px;
}
.tv-cell {
  background: rgba(15, 13, 10, 0.92);
  border: 1px solid rgba(229, 185, 92, 0.22);
  border-radius: 9px;
  padding: 6px 5px;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tv-cell.menh { border-color: var(--gold); box-shadow: inset 0 0 12px rgba(229, 185, 92, 0.16); }
.tv-center {
  grid-column: 2 / 4;
  grid-row: 2 / 4;
  background: radial-gradient(circle at center, rgba(229, 185, 92, 0.12), rgba(14, 12, 9, 0.95));
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 4px;
}
.tv-chuc { font-weight: 700; color: var(--gold-bright); font-size: 10px; display: flex; justify-content: space-between; }
.tv-chinh { font-weight: 700; color: #fff6de; font-size: 10px; }
.tv-phu { color: var(--muted); font-size: 9px; line-height: 1.25; }

/* Radar Chart & Score Gauge */
.radar-wrap { display: flex; justify-content: center; padding: 6px 0; }
.radar-wrap svg { width: 100%; max-width: 330px; height: auto; }

.gauge-ring {
  width: 122px;
  height: 122px;
  margin: 4px auto 10px;
  border-radius: 999px;
  background: radial-gradient(circle, #18130c 58%, transparent 59%),
              conic-gradient(#f3d280 var(--pct, 92%), rgba(229, 185, 92, 0.15) 0);
  display: grid;
  place-items: center;
  box-shadow: 0 0 26px rgba(229, 185, 92, 0.25);
  border: 1px solid var(--border-strong);
}
.gauge-ring strong { font-family: var(--font-serif); font-size: 34px; color: var(--gold-bright); line-height: 1; }
.gauge-ring span { font-size: 11px; color: var(--muted); }

/* Pillars & Bars */
.pillars-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 10px; }
.pillar-box {
  background: rgba(14, 11, 8, 0.92);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 8px 4px;
  text-align: center;
}
.pillar-box .pl { font-size: 10px; color: var(--muted); }
.pillar-box .pv { font-size: 14px; font-weight: 700; color: var(--gold-bright); margin-top: 3px; }
.pillar-box .pg { font-size: 10px; color: #d8ccb4; margin-top: 2px; }

.el-bars { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; }
.el-row { display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; gap: 8px; font-size: 12px; }
.el-track { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.el-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #b3802c, #f3d280); }

/* Quick AI Chips */
.chip-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 10px 0; }
.chip-btn {
  padding: 10px 10px;
  border-radius: 12px;
  background: rgba(18, 15, 10, 0.9);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
}
.chip-btn:hover { border-color: var(--gold); color: var(--gold-bright); }

/* Prayer Pre */
.prayer-box {
  white-space: pre-wrap;
  background: rgba(12, 10, 8, 0.92);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  font-size: 13px;
  line-height: 1.65;
  color: #f3ead8;
  max-height: 360px;
  overflow-y: auto;
}

/* Badges & Tags */
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag {
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(229, 185, 92, 0.14);
  border: 1px solid rgba(229, 185, 92, 0.3);
  color: var(--gold-bright);
}
.tag.ok { background: var(--ok-bg); border-color: rgba(52, 199, 123, 0.38); color: #8af0b8; }
.tag.bad { background: var(--bad-bg); border-color: rgba(227, 93, 93, 0.38); color: #ffa3a3; }

.muted { color: var(--muted); font-size: 12px; }
.msg { font-size: 12px; margin-top: 8px; min-height: 16px; }
.msg.ok { color: var(--ok); }
.msg.err { color: var(--bad); }

/* Fixed Bottom Nav */
.bottom-nav {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 100%;
  max-width: 480px;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: rgba(12, 10, 8, 0.95);
  backdrop-filter: blur(18px);
  border-top: 1px solid rgba(229, 185, 92, 0.25);
  padding: 6px 4px calc(8px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 960px) {
  .bottom-nav { max-width: 640px; border-radius: 18px 18px 0 0; border-left: 1px solid var(--border); border-right: 1px solid var(--border); }
}

.nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: 0;
  color: var(--muted);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 600;
  padding: 5px 2px;
  cursor: pointer;
}
.nav-btn svg { width: 20px; height: 20px; }
.nav-btn.active { color: var(--gold-bright); }
.nav-btn.active svg { filter: drop-shadow(0 0 8px rgba(229, 185, 92, 0.55)); }

/* Toast */
.toast {
  position: fixed;
  top: 66px;
  left: 50%;
  transform: translateX(-50%);
  background: #201a11;
  color: var(--gold-bright);
  border: 1px solid var(--border-strong);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  z-index: 90;
  box-shadow: var(--shadow);
  display: none;
}
.toast.show { display: block; }
input[type="date"] { color-scheme: dark; }

/* East-West Multi-Method Convergence Matrix */
.conv-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 12px;
}
@media (min-width: 560px) {
  .conv-grid { grid-template-columns: repeat(2, 1fr); }
}
.conv-card {
  background: rgba(15, 13, 9, 0.92);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 11px;
}
.conv-card.dai-cat, .conv-card.cat { border-color: rgba(52, 199, 123, 0.34); }
.conv-card.can-nhac { border-color: rgba(227, 93, 93, 0.38); }
.conv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 4px;
}
.conv-name { font-size: 12px; font-weight: 700; color: var(--gold-bright); }
.conv-trad {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(229, 185, 92, 0.14);
  color: var(--gold);
  margin-left: 4px;
}
.conv-badge { font-size: 12px; font-weight: 600; color: #f6efe0; margin-bottom: 3px; }
.conv-detail { font-size: 11px; color: var(--muted); line-height: 1.4; }
.conv-summary {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(229, 185, 92, 0.08);
  border: 1px solid rgba(229, 185, 92, 0.28);
  font-size: 12px;
}
.conv-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(12, 10, 8, 0.88);
}
.conv-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 11.5px;
}
.conv-table th, .conv-table td {
  padding: 8px 7px;
  text-align: left;
  border-bottom: 1px solid rgba(229, 185, 92, 0.12);
  white-space: nowrap;
}
.conv-table th {
  font-size: 10.5px;
  color: var(--gold);
  font-weight: 700;
  background: rgba(24, 20, 14, 0.95);
}
.conv-table tbody tr { cursor: pointer; transition: background 0.15s; }
.conv-table tbody tr:hover, .conv-table tbody tr.selected { background: rgba(229, 185, 92, 0.14); }
.dot-v {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
}
.dot-v.dai-cat { background: rgba(52, 199, 123, 0.22); color: #8af0b8; }
.dot-v.cat { background: rgba(229, 185, 92, 0.2); color: var(--gold-bright); }
.dot-v.trung { background: rgba(255, 255, 255, 0.09); color: #d8cdb8; }
.dot-v.can-nhac { background: rgba(227, 93, 93, 0.22); color: #ffa3a3; }
