:root { --bg: #f4efe3; --bg-2: #ece3d1; --surface: #fffdf8; --surface-2: #faf5ea; --surface-3: #f3ecdc; --ink: #1a2232; --ink-2: #2e3850; --muted: #5d6272; --muted-2: #6b7080; --line: #e6dcc8; --line-strong: #d5c5a3; --gold: #bd9540; --gold-2: #ddc076; --gold-soft: #f5e9c9; --wine: #7b2c3a; --wine-2: #9c4050; --wine-soft: #f7e5e6; --navy: #16213a; --navy-2: #1d2c4c; --teal: #22615c; --teal-soft: #e2f1ee; --blue: #2b5b86; --blue-soft: #e5eef7; --green: #3c7953; --green-soft: #e5f2e9; --amber: #7f5510; --amber-soft: #fbf0d8; --rose: #a84257; --rose-soft: #fbe7ea; --red: #b23a3a; --red-soft: #fbe6e6; --shadow: 0 18px 40px -28px rgba(26, 34, 50, .45); --shadow-lg: 0 30px 70px -35px rgba(18, 26, 42, .55); --radius: 18px; --radius-sm: 12px; --sidebar-w: 272px; --font-body: "GE SS Unique", "Segoe UI", Tahoma, Arial, sans-serif; --font-display: "GE SS Unique", "Segoe UI", Tahoma, Arial, sans-serif; --sidebar-bg: #121a2a; --sidebar-ink: #e9e1cf; --sidebar-muted: #9da3b4; --sidebar-line: rgba(255, 255, 255, .08); --pattern: rgba(189, 149, 64, .10); }
[data-theme="dark"] { --bg: #0e1420; --bg-2: #121a29; --surface: #161f30; --surface-2: #1b2538; --surface-3: #202c42; --ink: #f2ead8; --ink-2: #e3d9c5; --muted: #a3a9ba; --muted-2: #80879a; --line: #2a3650; --line-strong: #3a4866; --gold: #d6ae55; --gold-2: #e7cc8c; --gold-soft: #332b1b; --wine: #c27080; --wine-2: #d18b98; --wine-soft: #33212a; --navy: #0b1220; --navy-2: #131e33; --teal: #64b3a9; --teal-soft: #16302e; --blue: #7fb0dc; --blue-soft: #17283a; --green: #7fc09a; --green-soft: #172c21; --amber: #e0b464; --amber-soft: #322816; --rose: #e091a1; --rose-soft: #331d25; --red: #e08080; --red-soft: #351b1b; --shadow: 0 18px 40px -28px rgba(0, 0, 0, .8); --shadow-lg: 0 30px 70px -35px rgba(0, 0, 0, .9); --sidebar-bg: #0a101b; --sidebar-ink: #f0e8d7; --sidebar-muted: #8d95a9; --pattern: rgba(214, 174, 85, .12); }
*, ::before, ::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0px; min-height: 100vh; background: radial-gradient(1200px 700px at 85% -10%, color-mix(in srgb, var(--gold) 10%, transparent), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, color-mix(in srgb, var(--wine) 7%, transparent), transparent 55%),
    var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.75; -webkit-font-smoothing: antialiased; text-rendering: optimizelegibility; }
::selection { background: var(--gold-soft); color: var(--ink); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, h5 { margin: 0px; line-height: 1.35; font-weight: 700; letter-spacing: -0.2px; }
p { margin: 0px; }
ul, ol { margin: 0px; padding: 0px; list-style: none; }
kbd { font-family: var(--font-body); font-size: 11px; padding: 2px 7px; border-top-color: ; border-top-style: ; border-top-width: ; border-right-color: ; border-right-style: ; border-right-width: ; border-bottom-color: ; border-bottom-style: ; border-left-color: ; border-left-style: ; border-left-width: ; border-image-source: ; border-image-slice: ; border-image-width: ; border-image-outset: ; border-image-repeat: ; border-bottom-width: 2px; border-radius: 6px; background: var(--surface-2); color: var(--muted); }
.skip-link { position: fixed; inset-inline-start: 12px; top: -60px; z-index: 1000; background: var(--navy); color: rgb(255, 255, 255); padding: 10px 16px; border-radius: 10px; transition: top 0.2s; }
.skip-link:focus { top: 12px; }
.app-shell { min-height: 100vh; }
.main-wrap { margin-inline-start: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.sidebar { position: fixed; inset-block: 0px; inset-inline-start: 0px; width: var(--sidebar-w); background: linear-gradient(180deg, rgba(189,149,64,.05), transparent 30%),
    var(--sidebar-bg); color: var(--sidebar-ink); padding: 22px 18px 18px; display: flex; flex-direction: column; gap: 18px; z-index: 60; overflow-y: auto; border-inline-end: 1px solid rgba(255, 255, 255, 0.06); scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.15) transparent; }
.sidebar::after { content: ""; position: absolute; inset: 0px; background-image: radial-gradient(circle at 20% 10%, var(--pattern), transparent 32%),
    repeating-linear-gradient(45deg, transparent 0 22px, rgba(255,255,255,.012) 22px 23px); pointer-events: none; }
.sidebar > * { position: relative; z-index: 1; }
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 2px 4px 14px; border-bottom: 1px solid var(--sidebar-line); }
.brand-mark { width: 54px; height: 54px; flex: 0 0 auto; border-radius: 16px; display: grid; place-items: center; padding: 3px; background: rgb(255, 255, 255); overflow: hidden; box-shadow: rgba(0, 0, 0, 0.65) 0px 12px 24px -12px, rgba(221, 192, 118, 0.55) 0px 0px 0px 1px, rgba(255, 255, 255, 0.7) 0px 1px inset; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.35; }
.brand-text strong { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: rgb(255, 255, 255); letter-spacing: 0px; }
.brand-text span { font-size: 11.5px; color: var(--sidebar-muted); margin-top: 3px; letter-spacing: 0.3px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-group { margin-top: 10px; }
.nav-group-label { font-size: 10.5px; letter-spacing: 1.4px; color: var(--sidebar-muted); padding: 6px 12px; font-weight: 700; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 12px; color: var(--sidebar-muted); font-size: 13.5px; font-weight: 500; transition: background 0.18s, color 0.18s, transform 0.18s; position: relative; }
.nav-link svg { width: 19px; height: 19px; flex: 0 0 auto; opacity: 0.85; }
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: rgb(255, 255, 255); }
.nav-link.active { background: linear-gradient(90deg, rgba(189, 149, 64, 0.18), rgba(189, 149, 64, 0.06)); color: rgb(255, 255, 255); box-shadow: rgba(189, 149, 64, 0.22) 0px 0px 0px 1px inset; }
.nav-link.active::before { content: ""; position: absolute; inset-inline-start: 0px; top: 8px; bottom: 8px; width: 3px; border-radius: 3px; background: var(--gold-2); }
.nav-badge { margin-inline-start: auto; font-size: 10px; font-weight: 700; min-width: 20px; height: 20px; padding: 0px 6px; border-radius: 20px; display: inline-flex; align-items: center; justify-content: center; background: rgba(189, 149, 64, 0.2); color: var(--gold-2); }
.nav-badge.wine { background: rgba(156, 64, 80, 0.3); color: rgb(240, 182, 192); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--sidebar-line); }
.sidebar-verse { font-family: var(--font-display); font-size: 14px; line-height: 1.8; color: rgb(216, 207, 185); background: rgba(255, 255, 255, 0.035); border: 1px solid var(--sidebar-line); border-radius: 14px; padding: 12px 14px; }
.sidebar-verse small { display: block; margin-top: 4px; font-family: var(--font-body); font-size: 10.5px; color: var(--sidebar-muted); }
.side-action { display: flex; align-items: center; gap: 9px; width: 100%; background: transparent; border: 1px solid var(--sidebar-line); color: var(--sidebar-muted); border-radius: 12px; padding: 9px 12px; font-size: 12.5px; transition: 0.18s; }
.side-action:hover { color: rgb(255, 255, 255); border-color: rgba(189, 149, 64, 0.4); background: rgba(189, 149, 64, 0.08); }
.side-action-icon { font-size: 16px; color: var(--gold-2); }
.sidebar-scrim { position: fixed; inset: 0px; background: rgba(8, 12, 20, 0.55); z-index: 55; backdrop-filter: blur(2px); }
.topbar { position: sticky; top: 0px; z-index: 40; display: flex; align-items: center; gap: 14px; min-height: 76px; padding: 12px clamp(16px, 3vw, 34px); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); }
.topbar-title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0px; }
.topbar-logo { display: none; width: 40px; height: 40px; flex: 0 0 auto; padding: 2px; border-radius: 12px; background: rgb(255, 255, 255); overflow: hidden; box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-sm); }
.topbar-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.topbar-logo:hover { box-shadow: 0 0 0 1px var(--gold-2), var(--shadow-sm); }
.eyebrow { font-size: 10.5px; letter-spacing: 1.4px; color: var(--amber); font-weight: 700; text-transform: uppercase; }
.topbar-title h1 { font-family: var(--font-display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.search-pill { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 11px; color: var(--muted); font-size: 12.5px; box-shadow: rgba(255, 255, 255, 0.4) 0px 1px 0px inset; transition: 0.18s; }
.search-pill:hover { border-color: var(--line-strong); color: var(--ink); }
.search-pill svg { width: 17px; height: 17px; }
.search-pill kbd { margin-inline-start: 4px; }
.today-chip { font-size: 12px; color: var(--muted); padding: 7px 11px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.icon-btn { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 11px; position: relative; transition: 0.18s; }
.icon-btn:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
.icon-btn svg { width: 19px; height: 19px; }
.menu-btn { display: none; }
.privacy-dot { position: absolute; top: 7px; inset-inline-end: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 2px var(--surface); }
.privacy-btn.off .privacy-dot { background: var(--red); }
.ico-moon { display: none; }
[data-theme="dark"] .ico-sun { display: none; }
[data-theme="dark"] .ico-moon { display: block; }
[data-theme="dark"] .privacy-dot { box-shadow: 0 0 0 2px var(--surface); }
.content { padding: clamp(18px, 3vw, 34px) clamp(18px, 3vw, 34px) 50px; flex: 1 1 0%; max-width: 1560px; width: 100%; margin-inline: auto; outline: none; }
.app-footer { padding: 18px clamp(16px, 3vw, 34px) 26px; color: var(--muted-2); font-size: 11.5px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-top: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.footer-logo { width: 24px; height: 24px; flex: 0 0 auto; object-fit: contain; padding: 1px; border-radius: 7px; background: rgb(255, 255, 255); box-shadow: 0 0 0 1px var(--line); }
.dot-sep { opacity: 0.45; }
.view { animation: 0.38s cubic-bezier(0.2, 0.7, 0.2, 1) 0s 1 normal both running viewIn; }
@keyframes viewIn { 
  0% { opacity: 0; transform: translateY(9px); }
  100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
.display { font-family: var(--font-display); }
.eyebrow-warm { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; color: var(--amber); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }
.strong { font-weight: 700; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.arabic-nums { font-variant-numeric: tabular-nums; }
.section-title { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 23px; margin-bottom: 4px; }
.section-title::before { content: ""; width: 3px; height: 21px; border-radius: 3px; background: linear-gradient(var(--gold-2), var(--gold)); }
.section-sub { color: var(--muted); font-size: 12.5px; margin-bottom: 16px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-bottom: 22px; }
.page-head .grow { flex: 1 1 0%; min-width: 220px; }
.page-head h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-pad { padding: clamp(16px, 2.2vw, 24px); }
.card-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { font-size: 16.5px; }
.card-head .spacer { flex: 1 1 0%; }
.card-sub { color: var(--muted); font-size: 12px; }
.card-link { color: var(--amber); font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.card-link:hover { color: var(--wine); }
.card-flush { padding: 0px; }
.card-tint { background: linear-gradient(160deg, var(--surface), var(--surface-2)); }
.card-warm { background: linear-gradient(150deg, rgb(255, 249, 236), rgb(253, 244, 223)); border-color: rgb(234, 219, 184); }
[data-theme="dark"] .card-warm { background: linear-gradient(150deg, rgb(33, 29, 21), rgb(26, 29, 43)); border-color: rgb(60, 53, 36); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0px, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0px, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0px, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.divider { height: 1px; background: var(--line); margin: 14px 0px; }
.divider-dashed { height: 1px; background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px); margin: 14px 0px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid transparent; border-radius: 11px; padding: 9px 15px; font-size: 12.5px; font-weight: 700; transition: 0.18s; white-space: nowrap; line-height: 1.5; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0px); }
.btn-primary { background: linear-gradient(145deg, var(--gold-2), var(--gold)); color: rgb(33, 24, 10); box-shadow: rgba(189, 149, 64, 0.85) 0px 12px 24px -14px, rgba(255, 255, 255, 0.45) 0px 1px inset; }
.btn-primary:hover { filter: brightness(1.03); }
.btn-wine { background: linear-gradient(145deg, var(--wine-2), var(--wine)); color: rgb(255, 255, 255); box-shadow: rgba(123, 44, 58, 0.8) 0px 12px 24px -14px; }
.btn-navy { background: var(--navy); color: rgb(255, 255, 255); }
[data-theme="dark"] .btn-navy { background: var(--navy-2); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--line-strong); }
.btn-soft { background: var(--gold-soft); color: var(--amber); border-color: transparent; }
.btn-soft:hover { background: color-mix(in srgb, var(--gold-soft) 80%, var(--gold) 20%); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-danger:hover { background: color-mix(in srgb, var(--red-soft) 80%, var(--red) 20%); }
.btn-sm { padding: 6px 10px; font-size: 11px; border-radius: 9px; }
.btn-xs { padding: 4px 8px; font-size: 10.5px; border-radius: 8px; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0px; padding: 0px; color: var(--amber); font-weight: 700; font-size: 12px; }
.link-btn:hover { color: var(--wine); }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 700; line-height: 1.7; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge-gold { background: var(--gold-soft); color: var(--amber); border-color: transparent; }
.badge-wine { background: var(--wine-soft); color: var(--wine); border-color: transparent; }
.badge-green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.badge-blue { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.badge-red { background: var(--red-soft); color: var(--red); border-color: transparent; }
.badge-teal { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.badge-rose { background: var(--rose-soft); color: var(--rose); border-color: transparent; }
.badge-muted { background: var(--surface-2); color: var(--muted); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentcolor; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 11.5px; font-weight: 600; transition: 0.15s; white-space: nowrap; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.active { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip-count { font-size: 9.5px; opacity: 0.7; }
.filter-row { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .label { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.input, .select, .textarea { width: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; font-size: 13px; color: var(--ink); transition: 0.15s; outline: none; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 18%, transparent); }
.textarea { min-height: 100px; resize: vertical; line-height: 1.8; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(0% + 14px) calc(50% + 1px), calc(0% + 19px) calc(50% + 1px); background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-inline-start: 32px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
.input-sm { padding: 6px 10px; font-size: 12px; border-radius: 9px; }
.search-field { position: relative; }
.search-field svg { position: absolute; inset-inline-start: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted-2); pointer-events: none; }
.search-field .input { padding-inline-start: 34px; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--gold); }
.table-wrap { overflow: auto; border-radius: 14px; border: 1px solid var(--line); }
table.data { width: 100%; border-collapse: collapse; font-size: 12.5px; min-width: 620px; background: var(--surface); }
table.data thead th { text-align: start; padding: 11px 12px; font-size: 10.5px; letter-spacing: 0.2px; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--line); position: sticky; top: 0px; z-index: 1; font-weight: 700; }
table.data td { padding: 10px 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); vertical-align: middle; }
table.data tbody tr:last-child td { border-bottom: 0px; }
table.data tbody tr:hover { background: color-mix(in srgb, var(--gold) 5%, transparent); }
table.data .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table-actions { display: flex; gap: 5px; justify-content: flex-end; }
.scroll-x { overflow-x: auto; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0px, 1fr)); gap: 13px; }
.stat-card { display: flex; gap: 13px; align-items: flex-start; padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; inset-inline-end: -20px; top: -30px; width: 90px; height: 90px; border-radius: 50%; background: var(--tone-bg, var(--gold-soft)); opacity: 0.45; }
.stat-icon { width: 42px; height: 42px; flex: 0 0 auto; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: var(--tone-bg, var(--gold-soft)); color: var(--tone, var(--amber)); position: relative; z-index: 1; }
.stat-icon svg { width: 21px; height: 21px; }
.stat-body { position: relative; z-index: 1; min-width: 0px; }
.stat-value { font-size: 26px; font-weight: 800; line-height: 1.15; letter-spacing: -0.5px; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 11.5px; color: var(--muted); margin-top: 2px; font-weight: 600; }
.stat-sub { font-size: 10.5px; color: var(--muted-2); margin-top: 3px; }
.tone-gold { --tone: var(--amber); --tone-bg: var(--gold-soft); }
.tone-wine { --tone: var(--wine); --tone-bg: var(--wine-soft); }
.tone-green { --tone: var(--green); --tone-bg: var(--green-soft); }
.tone-blue { --tone: var(--blue); --tone-bg: var(--blue-soft); }
.tone-teal { --tone: var(--teal); --tone-bg: var(--teal-soft); }
.tone-rose { --tone: var(--rose); --tone-bg: var(--rose-soft); }
.hero { position: relative; overflow: hidden; border-radius: 22px; background: radial-gradient(700px 300px at 90% 0%, rgba(221, 192, 118, 0.25), transparent 60%), radial-gradient(500px 300px at 10% 100%, rgba(156, 64, 80, 0.35), transparent 60%), linear-gradient(135deg, rgb(17, 26, 45) 0%, rgb(27, 41, 66) 55%, rgb(58, 34, 48) 100%); color: rgb(255, 255, 255); padding: clamp(22px, 3.5vw, 38px); box-shadow: var(--shadow-lg); isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0px; z-index: -1; background-image: repeating-linear-gradient(45deg, transparent 0px, transparent 30px, rgba(255, 255, 255, 0.024) 30px, rgba(255, 255, 255, 0.024) 31px), radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.08), transparent 25%); }
.hero::after { content: "✝"; position: absolute; inset-inline-end: 22px; top: -22px; font-size: 190px; line-height: 1; color: rgba(221, 192, 118, 0.07); z-index: -1; font-family: var(--font-display); }
.hero-grid { display: grid; grid-template-columns: 1.45fr 0.8fr; gap: 26px; align-items: stretch; }
.hero-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 1.2px; color: var(--gold-2); font-weight: 700; }
.hero-brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hero-logo { width: 64px; height: 64px; flex: 0 0 auto; border-radius: 18px; background: rgb(255, 255, 255); padding: 3px; display: grid; place-items: center; overflow: hidden; box-shadow: rgba(0, 0, 0, 0.85) 0px 14px 28px -16px, rgba(221, 192, 118, 0.6) 0px 0px 0px 1px; }
.hero-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hero-kicker::before { content: ""; width: 22px; height: 1px; background: var(--gold-2); }
.hero h2 { font-family: var(--font-display); font-size: clamp(32px, 4.4vw, 52px); line-height: 1.15; margin: 10px 0px 6px; color: rgb(255, 255, 255); font-weight: 700; }
.hero-sub { color: rgb(201, 195, 181); font-size: 13.5px; max-width: 60ch; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; }
.hero-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.13); color: rgb(232, 224, 206); font-size: 11px; }
.hero-pill b { color: var(--gold-2); font-weight: 700; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hero-side { border-radius: 16px; padding: 18px; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); backdrop-filter: blur(4px); display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.countdown { display: flex; align-items: baseline; gap: 8px; }
.countdown b { font-size: 44px; line-height: 1; font-family: var(--font-display); color: var(--gold-2); }
.countdown span { font-size: 12px; color: rgb(213, 205, 189); }
.hero-side .next-date { font-size: 12px; color: rgb(213, 205, 189); }
.hero-side .next-lesson { font-family: var(--font-display); font-size: 17px; line-height: 1.5; color: rgb(255, 255, 255); }
.hero-side .next-meta { display: flex; flex-direction: column; gap: 5px; font-size: 11px; color: rgb(201, 195, 181); }
.hero-side .next-meta b { color: rgb(240, 230, 210); font-weight: 600; }
.hero-progress { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.12); overflow: hidden; }
.hero-progress span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.progress { height: 7px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width 0.45s cubic-bezier(0.2, 0.7, 0.2, 1); }
.progress.green > span { background: linear-gradient(90deg, var(--green), #8bc7a1); }
.progress.wine > span { background: linear-gradient(90deg, var(--wine), var(--wine-2)); }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .progress { flex: 1 1 0%; }
.progress-val { font-size: 11px; font-weight: 700; color: var(--muted); min-width: 34px; text-align: end; font-variant-numeric: tabular-nums; }
.ring-wrap { position: relative; width: 118px; height: 118px; flex: 0 0 auto; }
.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; }
.ring .track { stroke: var(--surface-3); }
.ring .value { stroke: var(--gold); stroke-linecap: round; transition: stroke-dashoffset 0.6s; }
.ring-label { position: absolute; inset: 0px; display: grid; place-content: center; text-align: center; line-height: 1.2; }
.ring-label b { font-size: 22px; font-weight: 800; }
.ring-label span { font-size: 9.5px; color: var(--muted); }
.alert-list { display: flex; flex-direction: column; gap: 8px; }
.alert-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 11px; border-radius: 12px; background: var(--surface-2); border: 1px solid transparent; transition: 0.15s; }
.alert-item:hover { border-color: var(--line); background: var(--surface); }
.alert-item .a-icon { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; background: var(--tone-bg, var(--gold-soft)); color: var(--tone, var(--amber)); font-size: 15px; }
.alert-item .a-body { min-width: 0px; flex: 1 1 0%; }
.alert-item .a-title { font-size: 12px; font-weight: 700; }
.alert-item .a-sub { font-size: 10.5px; color: var(--muted); }
.alert-item .a-side { flex: 0 0 auto; }
.week-list { display: flex; flex-direction: column; gap: 9px; }
.week-card { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); transition: 0.18s; position: relative; }
.week-card:hover { transform: translateY(-1px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.week-card.is-next { border-color: color-mix(in srgb, var(--gold) 55%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 6%, var(--surface)), var(--surface)); }
.week-card.is-done { opacity: 0.82; }
.week-num { width: 48px; height: 48px; flex: 0 0 auto; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--surface-2); border: 1px solid var(--line); line-height: 1.05; }
.week-num b { font-size: 16px; font-weight: 800; }
.week-num span { font-size: 8.5px; color: var(--muted); }
.week-card.is-next .week-num { background: var(--gold-soft); border-color: transparent; color: var(--amber); }
.week-main { min-width: 0px; flex: 1 1 0%; }
.week-title { font-size: 13.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.week-meta { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 4px; font-size: 10.5px; color: var(--muted); }
.week-meta .sep { opacity: 0.4; }
.week-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex: 0 0 auto; }
.week-chev { color: var(--muted-2); font-size: 18px; }
.month-label { display: flex; align-items: center; gap: 10px; margin: 18px 0px 9px; color: var(--muted); font-size: 11.5px; font-weight: 700; letter-spacing: 0.4px; }
.month-label::after { content: ""; flex: 1 1 0%; height: 1px; background: var(--line); }
.detail-hero { border-radius: 20px; padding: clamp(18px, 3vw, 28px); background: radial-gradient(600px 240px at 90% 0%, rgba(221, 192, 118, 0.22), transparent 60%), linear-gradient(135deg, rgb(23, 34, 58), rgb(43, 34, 51)); color: rgb(255, 255, 255); box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.detail-hero::after { content: "✝"; position: absolute; inset-inline-end: 20px; bottom: -60px; font-size: 180px; color: rgba(221, 192, 118, 0.07); font-family: var(--font-display); }
.detail-hero h2 { font-family: var(--font-display); font-size: clamp(27px, 3.4vw, 42px); line-height: 1.3; margin: 8px 0px; }
.detail-hero p { color: rgb(201, 195, 181); font-size: 13px; }
.detail-meta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.detail-meta span { padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.12); font-size: 10.5px; color: rgb(230, 223, 207); }
.detail-body { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; margin-top: 16px; align-items: start; }
.detail-col { display: flex; flex-direction: column; gap: 16px; min-width: 0px; }
.info-block { padding: 16px 18px; }
.info-block h3 { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 9px; }
.info-block h3 .ib-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); color: var(--gold); font-size: 14px; }
.info-block p, .info-block li { font-size: 12.5px; color: var(--ink-2); line-height: 1.9; }
.info-block .quote { font-family: var(--font-display); font-size: 17px; line-height: 1.9; color: var(--ink); }
.info-block .meta-line { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11.5px; color: var(--muted); }
.info-block .meta-line b { color: var(--ink-2); font-weight: 600; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.text-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.text-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
details.acc { border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
details.acc summary { cursor: pointer; padding: 10px 13px; font-size: 12px; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 7px; }
details.acc summary::-webkit-details-marker { display: none; }
details.acc summary::before { content: "＋"; color: var(--gold); font-weight: 700; }
details.acc[open] summary::before { content: "−"; }
details.acc .acc-body { padding: 0px 13px 13px; font-size: 12.5px; color: var(--ink-2); line-height: 1.95; white-space: pre-line; }
.tabs { display: flex; gap: 4px; overflow-x: auto; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { border: 0px; background: transparent; padding: 7px 13px; border-radius: 9px; font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; transition: 0.15s; }
.tab:hover { color: var(--ink); }
.tab.active { background: var(--surface); color: var(--ink); box-shadow: rgba(0, 0, 0, 0.25) 0px 2px 8px -4px; }
.tab .count { font-size: 9.5px; opacity: 0.65; margin-inline-start: 4px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; flex: 0 0 auto; display: grid; place-items: center; color: rgb(255, 255, 255); font-weight: 800; font-size: 15px; background: linear-gradient(145deg, var(--navy-2), var(--wine)); box-shadow: rgba(255, 255, 255, 0.2) 0px 1px inset; letter-spacing: 0px; }
.avatar.lg { width: 68px; height: 68px; font-size: 25px; }
.avatar.xl { width: 96px; height: 96px; font-size: 34px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }
.avatar.g1 { background: linear-gradient(145deg, rgb(169, 124, 47), rgb(211, 171, 90)); }
.avatar.g2 { background: linear-gradient(145deg, rgb(43, 91, 134), rgb(77, 134, 184)); }
.avatar.g3 { background: linear-gradient(145deg, rgb(35, 100, 95), rgb(75, 154, 144)); }
.avatar.g4 { background: linear-gradient(145deg, rgb(123, 44, 58), rgb(177, 84, 99)); }
.avatar.g5 { background: linear-gradient(145deg, rgb(81, 58, 120), rgb(128, 96, 176)); }
.avatar.has-photo { background-size: cover; background-position: center center; background-repeat: no-repeat; color: transparent; box-shadow: rgba(255, 255, 255, 0.3) 0px 0px 0px 1px inset; }
.avatar-wrap { position: relative; flex: 0 0 auto; }
.avatar-cam { position: absolute; inset-inline-end: -3px; bottom: -3px; width: 28px; height: 28px; border-radius: 50%; background: var(--surface); color: var(--amber); border: 1px solid var(--line); display: grid; place-items: center; box-shadow: var(--shadow); cursor: pointer; }
.avatar-cam:hover { background: var(--gold-soft); border-color: var(--gold-2); }
.avatar-cam svg { width: 14px; height: 14px; }
.photo-picker { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 14px; background: var(--surface-2); }
.photo-editor { display: flex; align-items: center; gap: 16px; }
.photo-editor .avatar { flex: 0 0 auto; }
.design-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(245px, 1fr)); gap: 14px; }
.design-card { display: flex; flex-direction: column; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); transition: 0.18s; }
.design-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.design-thumb { display: block; width: 100%; aspect-ratio: 4 / 3; border: 0px; padding: 0px; background: var(--surface-2); cursor: zoom-in; overflow: hidden; }
.design-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s; }
.design-card:hover .design-thumb img { transform: scale(1.035); }
.design-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: var(--muted-2); }
.design-body { padding: 12px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1 1 0%; }
.design-title { font-size: 12.5px; font-weight: 700; line-height: 1.5; }
.design-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 7px; }
.design-view { text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.design-view img { display: block; max-width: 100%; max-height: 68vh; margin: 0px auto; border-radius: 10px; object-fit: contain; }
.design-link-row { display: flex; align-items: center; gap: 4px; font-size: 9.5px; color: var(--muted); min-width: 0px; }
.design-link-row a { color: var(--amber); text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.design-link-row a:hover { text-decoration: underline; }
.design-link-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.design-view-link { margin-top: 10px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); display: flex; gap: 8px; font-size: 12px; align-items: flex-start; }
.design-view-link a { color: var(--amber); font-weight: 700; }
.linked-designs { margin-top: 6px; }
.linked-designs-title { display: flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--muted); margin-bottom: 4px; }
.linked-designs-title span { background: var(--gold-soft); color: var(--amber); border-radius: 999px; padding: 0px 5px; font-weight: 700; }
.linked-designs-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.linked-thumb { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); padding: 0px; background: var(--surface); cursor: zoom-in; display: grid; place-items: center; color: var(--muted-2); }
.linked-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.linked-thumb:hover { border-color: var(--gold); transform: translateY(-1px); }
.linked-more { font-size: 9.5px; color: var(--muted); }
.lib-focus { outline: 2px solid var(--gold); outline-offset: 2px; animation: 1s ease 0s 2 normal none running focusPulse; }
@keyframes focusPulse { 
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 0 6px var(--gold-soft); }
}
.points-rule { padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.points-rule:hover { border-color: var(--line-strong); }
.points-rule .badge { white-space: nowrap; }
.upload-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 28px 18px; border: 2px dashed var(--line-strong); border-radius: 15px; background: var(--surface-2); cursor: pointer; text-align: center; transition: 0.15s; }
.upload-drop:hover, .upload-drop.dragover { border-color: var(--gold); background: var(--gold-soft); }
.upload-drop .upload-icon { color: var(--gold); margin-bottom: 2px; }
.upload-drop b { font-size: 13px; }
.upload-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.upload-preview { position: relative; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 1 / 1; background: var(--surface-2); }
.upload-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.upload-preview span { position: absolute; inset-inline: 0px; bottom: 0px; background: rgba(0, 0, 0, 0.58); color: rgb(255, 255, 255); font-size: 8.5px; padding: 3px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.student-card { display: flex; flex-direction: column; gap: 10px; padding: 15px; position: relative; transition: 0.18s; }
.student-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.student-top { display: flex; align-items: center; gap: 10px; }
.student-name { font-size: 13px; font-weight: 700; line-height: 1.4; }
.student-sub { font-size: 10.5px; color: var(--muted); }
.student-stats { display: flex; gap: 14px; padding-top: 9px; border-top: 1px dashed var(--line); }
.student-stats div { display: flex; flex-direction: column; line-height: 1.2; }
.student-stats b { font-size: 14px; font-weight: 800; }
.student-stats span { font-size: 9.5px; color: var(--muted); }
.student-actions { display: flex; gap: 5px; margin-inline-start: auto; }
.att-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.att-row { display: grid; grid-template-columns: minmax(180px, 1.4fr) 190px 90px; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 11px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); }
.att-row:last-child { border-bottom: 0px; }
.att-row:hover { background: color-mix(in srgb, var(--gold) 4%, transparent); }
.att-person { display: flex; align-items: center; gap: 9px; min-width: 0px; }
.att-name { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-group { font-size: 10px; color: var(--muted); }
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 2px; gap: 2px; }
.seg-btn { border: 0px; background: transparent; border-radius: 7px; padding: 4px 9px; font-size: 11px; font-weight: 700; color: var(--muted); min-width: 34px; transition: 0.12s; }
.seg-btn:hover { color: var(--ink); }
.seg-btn.on[data-v="ح"] { background: var(--green-soft); color: var(--green); }
.seg-btn.on[data-v="ق"] { background: var(--blue-soft); color: var(--blue); }
.seg-btn.on[data-v="خ"] { background: var(--teal-soft); color: var(--teal); }
.seg-btn.on[data-v="غ"] { background: var(--red-soft); color: var(--red); }
.att-summary { display: grid; grid-template-columns: repeat(5, minmax(0px, 1fr)); gap: 8px; }
.att-sum-card { padding: 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); text-align: center; }
.att-sum-card b { display: block; font-size: 21px; line-height: 1.2; font-weight: 800; }
.att-sum-card span { font-size: 10px; color: var(--muted); }
.att-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 10.5px; color: var(--muted); }
.att-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-inline-end: 3px; }
.chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 120px; padding-top: 8px; }
.chart-bar { flex: 1 1 0%; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.chart-bar .bar { width: 100%; max-width: 34px; border-radius: 6px 6px 3px 3px; background: linear-gradient(var(--gold-2), var(--gold)); min-height: 3px; transition: height 0.5s; position: relative; }
.chart-bar .bar:hover { filter: brightness(1.06); }
.chart-bar .bar b { position: absolute; top: -17px; inset-inline: 0px; text-align: center; font-size: 9.5px; color: var(--muted); font-weight: 700; }
.chart-bar span { font-size: 8.5px; color: var(--muted-2); white-space: nowrap; }
.chart-legend { font-size: 10.5px; color: var(--muted); }
.day-grid { display: grid; grid-template-columns: repeat(7, minmax(180px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 5px; }
.day-card { min-width: 180px; display: flex; flex-direction: column; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); overflow: hidden; }
.day-card.done { opacity: 0.72; }
.day-top { padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; gap: 6px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.day-top b { font-size: 12px; }
.day-top span { font-size: 9.5px; color: var(--muted); }
.day-body { padding: 11px 12px; font-size: 10.5px; color: var(--ink-2); line-height: 1.85; flex: 1 1 0%; max-height: 210px; overflow: auto; white-space: pre-line; }
.day-foot { padding: 8px 10px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 6px; }
.day-foot .check { font-size: 10px; color: var(--muted); }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.lib-card { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.lib-card .lib-top { display: flex; align-items: flex-start; gap: 9px; }
.lib-card .lib-top .grow { flex: 1 1 0%; min-width: 0px; }
.lib-title { font-size: 13.5px; font-weight: 700; line-height: 1.5; }
.lib-meta { font-size: 10.5px; color: var(--muted); }
.lib-text { font-size: 12px; line-height: 1.9; color: var(--ink-2); }
.lib-quote { font-family: var(--font-display); font-size: 17px; line-height: 1.9; color: var(--ink); }
.lib-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-top: 6px; }
.lib-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.tag { font-size: 9.5px; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); }
.bday-card { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.bday-card:last-child { border-bottom: 0px; }
.bday-date { width: 54px; height: 54px; flex: 0 0 auto; border-radius: 13px; background: var(--gold-soft); color: var(--amber); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.bday-date b { font-size: 19px; font-weight: 800; }
.bday-date span { font-size: 9px; }
.bday-main { flex: 1 1 0%; min-width: 0px; }
.bday-name { font-size: 13px; font-weight: 700; }
.bday-sub { font-size: 10.5px; color: var(--muted); }
.bday-side { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.task-item { display: flex; align-items: flex-start; gap: 10px; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.task-item.overdue { border-color: color-mix(in srgb, var(--red) 40%, var(--line)); background: var(--red-soft); }
.task-item.done { opacity: 0.6; }
.task-item.done .task-title { text-decoration: line-through; }
.task-check { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex: 0 0 auto; }
.task-main { flex: 1 1 0%; min-width: 0px; }
.task-title { font-size: 12.5px; font-weight: 700; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; font-size: 10px; color: var(--muted); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty .empty-icon { font-size: 38px; opacity: 0.45; margin-bottom: 8px; }
.empty h3 { font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.empty p { font-size: 12px; }
.toast-stack { position: fixed; inset-inline-start: 18px; bottom: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: 340px; }
.toast { display: flex; align-items: center; gap: 9px; background: var(--navy); color: rgb(242, 234, 216); border: 1px solid rgba(255, 255, 255, 0.1); padding: 10px 14px; border-radius: 12px; font-size: 12px; box-shadow: var(--shadow-lg); animation: 0.25s ease 0s 1 normal both running toastIn; }
.toast.ok { border-inline-start: 3px solid var(--gold-2); }
.toast.err { border-inline-start: 3px solid rgb(224, 128, 128); }
.toast.info { border-inline-start: 3px solid rgb(127, 176, 220); }
.toast.out { animation: 0.25s ease 0s 1 normal both running toastOut; }
@keyframes toastIn { 
  0% { opacity: 0; transform: translateY(10px); }
}
@keyframes toastOut { 
  100% { opacity: 0; transform: translateY(8px); }
}
.modal-root { position: fixed; inset: 0px; z-index: 150; display: grid; place-items: center; padding: 18px; background: rgba(10, 15, 25, 0.55); backdrop-filter: blur(4px); animation: 0.18s ease 0s 1 normal none running fadeIn; }
.modal-root[hidden] { display: none; }
@keyframes fadeIn { 
  0% { opacity: 0; }
}
.modal { width: min(620px, 100%); max-height: calc(-36px + 100vh); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); animation: 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) 0s 1 normal both running modalIn; }
.modal.wide { width: min(820px, 100%); }
@keyframes modalIn { 
  0% { opacity: 0; transform: translateY(14px) scale(0.985); }
}
.modal-head { display: flex; align-items: flex-start; gap: 10px; padding: 18px 20px 0px; }
.modal-head h3 { font-family: var(--font-display); font-size: 22px; flex: 1 1 0%; }
.modal-body { padding: 16px 20px; }
.modal-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; padding: 0px 20px 20px; }
.modal-close { width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--muted); display: grid; place-items: center; }
.modal-close:hover { color: var(--ink); }
.search-overlay { position: fixed; inset: 0px; z-index: 170; background: rgba(9, 13, 22, 0.55); backdrop-filter: blur(4px); display: flex; justify-content: center; padding: 12vh 18px 18px; animation: 0.16s ease 0s 1 normal none running fadeIn; }
.search-overlay[hidden] { display: none; }
.search-panel { width: min(680px, 100%); max-height: 70vh; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden; animation: 0.2s ease 0s 1 normal both running modalIn; }
.search-head { display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--line); }
.search-head svg { width: 20px; height: 20px; color: var(--muted); }
.search-head input { flex: 1 1 0%; border: 0px; outline: none; background: transparent; font-size: 15px; }
.search-results { overflow-y: auto; padding: 8px; flex: 1 1 0%; }
.search-group-label { font-size: 9.5px; letter-spacing: 1px; color: var(--muted-2); padding: 8px 10px 4px; font-weight: 700; }
.result-item { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.result-item:hover, .result-item.active { background: var(--surface-2); }
.result-item .r-icon { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; font-size: 13px; flex: 0 0 auto; }
.result-item .r-main { min-width: 0px; flex: 1 1 0%; }
.result-item .r-title { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-item .r-sub { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-foot { display: flex; align-items: center; gap: 8px; padding: 9px 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 9px; }
.quick { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); text-align: start; transition: 0.15s; }
.quick:hover { border-color: var(--line-strong); background: var(--surface-2); transform: translateY(-1px); }
.quick .q-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--tone-bg, var(--gold-soft)); color: var(--tone, var(--amber)); flex: 0 0 auto; }
.quick .q-title { font-size: 11.5px; font-weight: 700; line-height: 1.4; }
.quick .q-sub { font-size: 9.5px; color: var(--muted); }
.note { display: flex; gap: 9px; padding: 11px 13px; border-radius: 12px; background: var(--amber-soft); color: var(--amber); font-size: 11.5px; line-height: 1.8; border: 1px solid color-mix(in srgb, var(--amber) 20%, transparent); }
.note.wine { background: var(--wine-soft); color: var(--wine); border-color: color-mix(in srgb, var(--wine) 20%, transparent); }
.note.blue { background: var(--blue-soft); color: var(--blue); border-color: color-mix(in srgb, var(--blue) 20%, transparent); }
.note.green { background: var(--green-soft); color: var(--green); border-color: color-mix(in srgb, var(--green) 20%, transparent); }
.note b { font-weight: 700; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 12px; font-size: 12px; margin: 0px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0px; color: var(--ink-2); font-weight: 600; }
.mask { letter-spacing: 1px; color: var(--muted-2); }
.reveal { border: 0px; background: none; color: var(--amber); font-size: 10px; font-weight: 700; }
.podium { display: grid; grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: 10px; align-items: end; }
.podium-card { text-align: center; padding: 14px 10px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.podium-card.first { background: linear-gradient(160deg, var(--gold-soft), var(--surface)); border-color: var(--gold-2); padding-top: 22px; }
.podium-place { font-size: 20px; }
.podium-name { font-size: 11.5px; font-weight: 700; margin-top: 6px; line-height: 1.4; }
.podium-points { font-size: 18px; font-weight: 800; color: var(--amber); }
.podium-points small { font-size: 9px; font-weight: 600; color: var(--muted); }
.boot { min-height: 50vh; display: grid; place-content: center; text-align: center; color: var(--muted); gap: 10px; }
.boot-mark { width: 92px; height: 92px; margin: 0px auto; border-radius: 26px; display: grid; place-items: center; padding: 6px; background: rgb(255, 255, 255); overflow: hidden; box-shadow: var(--shadow-lg), 0 0 0 1px rgba(221,192,118,.45); animation: 1.4s ease 0s infinite normal none running pulse; }
.boot-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
@keyframes pulse { 
  0%, 100% { transform: scale(1); opacity: 0.85; }
  50% { transform: scale(1.06); opacity: 1; }
}
@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0px, 1fr)); }
  .hero-grid { grid-template-columns: 1.3fr 0.9fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0px, 1fr)); }
}
@media (max-width: 1080px) {
  :root { --sidebar-w: 0px; }
  .main-wrap { margin-inline-start: 0px; }
  .sidebar { transform: translateX(105%); transition: transform 0.25s; width: 286px; }
  .sidebar.open { transform: none; }
  .menu-btn { display: grid; }
  .topbar-logo { display: grid; place-items: center; }
  .detail-body { grid-template-columns: 1fr; }
  .day-grid { grid-template-columns: repeat(7, minmax(190px, 1fr)); }
}
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .search-pill span { display: none; }
  .search-pill kbd { display: none; }
  .search-pill { padding: 8px 10px; }
  .today-chip { display: none; }
  .att-row { grid-template-columns: 1fr auto; grid-template-areas: "person seg"; row-gap: 2px; }
  .att-row .att-person { grid-area: person; }
  .att-row .segmented { grid-area: seg; }
  .att-row .att-status { display: none; }
  .att-summary { grid-template-columns: repeat(3, minmax(0px, 1fr)); }
  .podium { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head h2 { font-size: 28px; }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  .topbar { min-height: 66px; padding: 10px 14px; }
  .topbar-title h1 { font-size: 21px; }
  .eyebrow { font-size: 9px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 12px; gap: 9px; }
  .stat-icon { width: 36px; height: 36px; }
  .stat-value { font-size: 21px; }
  .stat-label { font-size: 10px; }
  .content { padding: 14px; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .grid-auto { grid-template-columns: 1fr; }
  .card-pad { padding: 14px; }
  .hero { padding: 20px 16px; }
  .hero h2 { font-size: 30px; }
  .hero::after { font-size: 120px; }
  .att-summary { grid-template-columns: 1fr 1fr; }
  .week-card { flex-wrap: wrap; }
  .week-side { flex-direction: row; width: 100%; justify-content: flex-end; }
  .modal-body, .modal-head { padding-inline: 14px; }
  .toast-stack { inset-inline: 12px; bottom: 12px; max-width: none; }
  .photo-editor, .photo-picker { flex-direction: column; align-items: flex-start; }
  .design-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .design-body { padding: 9px 10px; }
}
@media (max-width: 430px) {
  .design-grid { grid-template-columns: 1fr; }
}
@media print {
  body { background: rgb(255, 255, 255); color: rgb(0, 0, 0); font-size: 11pt; }
  .sidebar, .topbar, .app-footer, .toast-stack, .modal-root, .search-overlay, .no-print { display: none !important; }
  .main-wrap { margin: 0px; }
  .content { padding: 0px; max-width: none; }
  .card, .hero, .detail-hero { box-shadow: none; border-color: rgb(204, 204, 204); background: rgb(255, 255, 255) !important; color: rgb(0, 0, 0) !important; }
  .hero::after, .detail-hero::after { display: none; }
  a { text-decoration: none; color: rgb(0, 0, 0); }
}
.user-chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-style: inherit; font-variant: inherit; font-stretch: inherit; line-height: inherit; font-family: inherit; font-optical-sizing: inherit; font-size-adjust: inherit; font-kerning: inherit; font-feature-settings: inherit; font-variation-settings: inherit; font-language-override: inherit; font-size: 11px; font-weight: 700; cursor: pointer; box-shadow: var(--shadow-sm); max-width: 190px; }
.user-chip:hover { border-color: var(--gold-2); background: var(--gold-soft); }
.user-chip .avatar { width: 25px; height: 25px; font-size: 10px; }
.user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.user-row.is-off { opacity: 0.55; }
.user-row .grow { min-width: 0px; }
.user-row b { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-row small { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)); gap: 7px; }
.check-line { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 500; color: var(--ink); }
.check-line input { accent-color: var(--gold); }
.code-chip { display: inline-block; direction: ltr; letter-spacing: 0.14em; background: var(--gold-soft); color: var(--amber); padding: 4px 9px; border-radius: 8px; font-size: 12px; }
.forecast-grid { display: grid; grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 8px; }
.forecast-card { border: 1px solid var(--line); border-radius: 11px; padding: 10px 11px; background: var(--surface-2); }
.forecast-card span { display: block; font-size: 10px; color: var(--muted); }
.forecast-card b { display: block; font-size: 23px; line-height: 1.25; color: var(--teal); font-variant-numeric: tabular-nums; }
.forecast-card small { display: block; font-size: 9.5px; color: var(--muted); }
.case-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 11px; background: var(--surface-2); }
.case-card.is-closed { opacity: 0.62; }
.case-card .row { gap: 6px; }
.due-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); font-size: 11.5px; }
.due-row > span:first-child { min-width: 0px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chips-wrap { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-action { background: var(--wine-soft); border-color: color-mix(in srgb, var(--wine) 22%, var(--line)); color: var(--wine); }
.chip-action:hover { background: color-mix(in srgb, var(--wine-soft) 80%, var(--wine) 10%); color: var(--wine); }
.cal-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 10px; }
.cal-event { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); }
.cal-date { width: 45px; flex: 0 0 auto; text-align: center; border-radius: 9px; padding: 4px 3px; background: var(--surface); border: 1px solid var(--line); }
.cal-date b { display: block; font-size: 18px; line-height: 1; font-variant-numeric: tabular-nums; }
.cal-date span { display: block; font-size: 9px; color: var(--muted); }
.cal-date small { display: block; font-size: 8.5px; color: var(--muted); }
.cal-event .grow { min-width: 0px; }
.cal-event .grow b { font-size: 12px; }
.cal-type { display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 3px 7px; font-size: 9px; font-weight: 700; background: var(--gold-soft); color: var(--amber); }
.cal-calendar, .cal-custom { background: var(--gold-soft); color: var(--amber); }
.cal-service, .cal-meeting { background: var(--blue-soft); color: var(--blue); }
.cal-visit { background: var(--wine-soft); color: var(--wine); }
.cal-birthday { background: var(--rose-soft); color: var(--rose); }
.cal-task { background: var(--green-soft); color: var(--green); }
.cal-crm { background: var(--wine-soft); color: var(--wine); }
.message-preview { border: 1px dashed var(--line-strong); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); font-size: 12px; line-height: 1.95; white-space: normal; }
.rows-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.backup-version { display: flex; align-items: center; gap: 7px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.backup-version .grow { min-width: 0px; }
.backup-version b { display: block; font-size: 11.5px; }
.backup-version small { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.section-grid { display: grid; grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 7px; }
.section-export-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 8px 9px; background: var(--surface-2); font-size: 11px; }
.section-export-row .row { gap: 5px; }
@media (max-width: 820px) {
  .rows-2, .section-grid { grid-template-columns: 1fr; }
  .forecast-grid { grid-template-columns: 1fr 1fr; }
  .user-chip { max-width: 130px; }
}
@media (max-width: 560px) {
  .user-chip span { display: none; }
  .user-chip { padding: 7px; }
  .forecast-grid { grid-template-columns: 1fr; }
  .cal-event { flex-wrap: wrap; }
  .cal-event > .row { width: 100%; justify-content: flex-end; }
  .section-export-row { flex-direction: column; align-items: flex-start; }
}
:root { --bg: #f4f1e8; --bg-2: #ece7da; --surface: #fffdf9; --surface-2: #f8f4ea; --surface-3: #efe8d8; --ink: #18211f; --ink-2: #303a37; --muted: #646d68; --muted-2: #7d857f; --line: #e4dccb; --line-strong: #cdbfa1; --gold: #b28a35; --gold-2: #d8b970; --gold-soft: #f7edd3; --wine: #7d3240; --wine-2: #9c4655; --wine-soft: #f8e7e9; --navy: #131f30; --navy-2: #1e2f47; --teal: #2a655e; --teal-soft: #e3f1ee; --blue: #2d5d89; --blue-soft: #e6eff8; --green: #3d7a55; --green-soft: #e6f3ea; --amber: #7c5411; --amber-soft: #fbf0d7; --rose: #a84257; --rose-soft: #fbe8ec; --red: #b03a3a; --red-soft: #fbe7e7; --shadow-sm: 0 1px 2px rgba(24, 33, 31, .05), 0 3px 10px -6px rgba(24, 33, 31, .12); --shadow: 0 16px 36px -28px rgba(24, 33, 31, .45), 0 3px 10px -6px rgba(24, 33, 31, .10); --shadow-lg: 0 36px 80px -46px rgba(19, 31, 48, .6), 0 12px 30px -24px rgba(19, 31, 48, .35); --radius: 20px; --radius-sm: 13px; --radius-xs: 9px; --sidebar-w: 272px; --font-body: "GE SS Unique", "Segoe UI", Tahoma, Arial, sans-serif; --font-display: "GE SS Unique", "Segoe UI", Tahoma, Arial, sans-serif; --sidebar-bg: #101a2a; --sidebar-ink: #ece5d5; --sidebar-muted: #9aa4b4; --sidebar-line: rgba(255, 255, 255, .08); --pattern: rgba(216, 185, 112, .10); }
[data-theme="dark"] { --bg: #0d1319; --bg-2: #111a23; --surface: #151e27; --surface-2: #1a242e; --surface-3: #202c38; --ink: #f1ebdb; --ink-2: #ded7c6; --muted: #a1aaa5; --muted-2: #7e8782; --line: #27333e; --line-strong: #3b4955; --gold: #d6b25c; --gold-2: #ead297; --gold-soft: #322a1a; --wine: #c87988; --wine-2: #d593a0; --wine-soft: #33222a; --navy: #0a1018; --navy-2: #121d2a; --teal: #6bb8ae; --teal-soft: #16302e; --blue: #82b2dd; --blue-soft: #17283a; --green: #84c49e; --green-soft: #172c21; --amber: #e3bb6d; --amber-soft: #322816; --rose: #e094a4; --rose-soft: #331d25; --red: #e08686; --red-soft: #351b1b; --shadow-sm: 0 1px 2px rgba(0, 0, 0, .35), 0 3px 10px -6px rgba(0, 0, 0, .5); --shadow: 0 18px 38px -28px rgba(0, 0, 0, .85), 0 3px 10px -6px rgba(0, 0, 0, .45); --shadow-lg: 0 38px 84px -46px rgba(0, 0, 0, .95), 0 12px 30px -24px rgba(0, 0, 0, .65); --sidebar-bg: #080e16; --sidebar-ink: #f1ebdc; --sidebar-muted: #8b95a5; --pattern: rgba(214, 178, 92, .12); }
html { scroll-behavior: smooth; }
body { font-size: 15.5px; line-height: 1.9; letter-spacing: 0px; background-image: ; background-position-x: ; background-position-y: ; background-size: ; background-repeat: ; background-origin: ; background-clip: ; background-color: ; background-attachment: fixed; }
b, strong { font-weight: 700; }
h1, h2, h3, h4, h5 { letter-spacing: 0px; line-height: 1.35; }
p { line-height: inherit; }
::selection { background: var(--gold-soft); color: var(--ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
input, textarea, select, button { letter-spacing: 0px; }
kbd { letter-spacing: 0px; border-radius: 7px; }
* { scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--gold) 38%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background-image: ; background-position-x: ; background-position-y: ; background-size: ; background-repeat: ; background-attachment: ; background-origin: ; background-color: ; border-radius: 999px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-image: ; background-position-x: ; background-position-y: ; background-size: ; background-repeat: ; background-attachment: ; background-origin: ; background-color: ; background-clip: padding-box; }
.display, .section-title, .page-head h2, .hero h2, .detail-hero h2, .topbar-title h1, .brand-text strong, .modal-head h3, .portal-brand h1, .portal-login h2, .portal-section-head h2 { font-family: var(--font-display); font-weight: 700; letter-spacing: 0px; }
.eyebrow, .eyebrow-warm, .nav-group-label, .hero-kicker, .search-group-label { letter-spacing: 0px; }
.sidebar { padding: 24px 18px 20px; gap: 20px; background: radial-gradient(340px 220px at 50% -8%, rgba(216, 185, 112, .16), transparent 70%),
    linear-gradient(180deg, #152137 0%, var(--sidebar-bg) 46%, #0a121f 100%); border-inline-end: 1px solid rgba(255, 255, 255, 0.07); box-shadow: rgba(0, 0, 0, 0.9) 22px 0px 60px -50px; }
.sidebar::after { background-image: radial-gradient(circle at 18% 8%, var(--pattern), transparent 30%),
    repeating-linear-gradient(135deg, transparent 0 26px, rgba(255, 255, 255, .014) 26px 27px); }
.sidebar-brand { gap: 13px; padding: 2px 2px 16px; }
.brand-mark { width: 56px; height: 56px; border-radius: 18px; padding: 3px; box-shadow: rgba(0, 0, 0, 0.8) 0px 16px 30px -16px, rgba(216, 185, 112, 0.55) 0px 0px 0px 1px, rgba(216, 185, 112, 0.35) 0px 0px 24px -6px, rgba(255, 255, 255, 0.8) 0px 1px inset; }
.brand-text strong { font-size: 21px; color: rgb(255, 255, 255); }
.brand-text span { font-size: 11px; color: var(--sidebar-muted); margin-top: 2px; letter-spacing: 0px; }
.nav { gap: 3px; }
.nav-group { margin-top: 4px; }
.nav-group-label { font-size: 10px; color: var(--sidebar-muted); padding: 9px 12px 5px; font-weight: 700; opacity: 0.85; }
.nav-link { padding: 10px 12px; border-radius: 13px; gap: 11px; font-size: 13.5px; font-weight: 500; transition: background 0.2s, color 0.2s, box-shadow 0.2s; }
.nav-link svg { opacity: 0.72; transition: opacity 0.2s, color 0.2s; }
.nav-link:hover { background: rgba(255, 255, 255, 0.06); color: rgb(255, 255, 255); }
.nav-link:hover svg { opacity: 1; }
.nav-link.active { background: linear-gradient(90deg, rgba(216, 185, 112, 0.18), rgba(216, 185, 112, 0.043)); color: rgb(255, 255, 255); font-weight: 700; box-shadow: rgba(216, 185, 112, 0.2) 0px 0px 0px 1px inset; }
.nav-link.active::before { top: 9px; bottom: 9px; width: 3px; background: linear-gradient(var(--gold-2), var(--gold)); box-shadow: rgba(216, 185, 112, 0.65) 0px 0px 12px; }
.nav-link.active svg { opacity: 1; color: var(--gold-2); }
.nav-badge { border-radius: 999px; background: rgba(216, 185, 112, 0.18); color: var(--gold-2); }
.sidebar-foot { gap: 11px; padding-top: 14px; }
.sidebar-verse { font-family: var(--font-display); font-size: 13.5px; line-height: 1.95; color: rgb(224, 216, 197); background: linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.024)); border: 1px solid var(--sidebar-line); border-radius: 16px; padding: 13px 15px; }
.sidebar-verse small { font-family: var(--font-body); font-size: 10.5px; color: var(--sidebar-muted); margin-top: 6px; }
.side-action { border-radius: 14px; padding: 10px 13px; font-size: 12.5px; font-weight: 700; background: rgba(255, 255, 255, 0.03); }
.side-action:hover { background: rgba(216, 185, 112, 0.1); border-color: rgba(216, 185, 112, 0.45); }
.side-action-icon { color: var(--gold-2); }
.sidebar-scrim { background: rgba(8, 12, 20, 0.58); backdrop-filter: blur(4px); }
.topbar { min-height: 78px; padding: 12px clamp(16px, 3vw, 36px); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(18px) saturate(1.35); border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent); box-shadow: rgba(24, 33, 31, 0.55) 0px 20px 40px -42px; }
.topbar-title h1 { font-size: clamp(22px, 2.2vw, 29px); }
.eyebrow { font-size: 10.5px; color: var(--gold); font-weight: 700; }
.search-pill { border-radius: 999px; padding: 9px 14px; font-size: 12.5px; background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s; }
.search-pill:hover { transform: translateY(-1px); border-color: var(--gold-2); box-shadow: var(--shadow); color: var(--ink); }
.search-pill kbd { background: var(--surface-2); border-color: var(--line); }
.today-chip { border-radius: 999px; padding: 8px 13px; background: var(--surface); box-shadow: var(--shadow-sm); }
.icon-btn { width: 40px; height: 40px; border-radius: 13px; background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-sm); transition: transform 0.18s, border-color 0.18s, background 0.18s, box-shadow 0.18s; }
.icon-btn:hover { transform: translateY(-2px); border-color: var(--gold-2); background: var(--surface); box-shadow: var(--shadow); }
.icon-btn:active { transform: translateY(0px) scale(0.97); }
.topbar-logo { width: 44px; height: 44px; border-radius: 14px; padding: 2px; box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-sm); }
.user-chip { border-radius: 999px; padding: 6px 8px; max-width: 220px; font-size: 11px; box-shadow: var(--shadow-sm); }
.user-chip:hover { border-color: var(--gold-2); background: var(--gold-soft); }
.user-chip .avatar { width: 27px; height: 27px; font-size: 11px; }
.content { padding: clamp(20px, 3vw, 38px) clamp(20px, 3vw, 38px) 64px; max-width: 1560px; }
.app-footer { padding: 22px clamp(16px, 3vw, 36px) 30px; font-size: 11.5px; color: var(--muted-2); border-top: 1px solid color-mix(in srgb, var(--line) 58%, transparent); background: color-mix(in srgb, var(--surface) 35%, transparent); }
.footer-logo { width: 26px; height: 26px; border-radius: 8px; }
.section-title { font-size: 23px; gap: 11px; margin-bottom: 5px; }
.section-title::before { width: 4px; height: 22px; border-radius: 999px; background: linear-gradient(var(--gold-2), var(--gold)); }
.section-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 18px; }
.page-head { margin-bottom: 24px; gap: 16px; }
.page-head h2 { font-size: clamp(27px, 3vw, 38px); line-height: 1.25; }
.page-head p { font-size: 13.5px; color: var(--muted); margin-top: 5px; }
.eyebrow-warm { color: var(--gold); font-weight: 700; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: border-color 0.22s, box-shadow 0.22s, transform 0.22s; }
.card-pad { padding: clamp(18px, 2.2vw, 26px); }
.card-head { gap: 11px; margin-bottom: 16px; }
.card-head h3 { font-size: 17px; line-height: 1.4; }
.card-sub { font-size: 11.5px; }
.card-link { color: var(--gold); font-weight: 700; }
.card-link:hover { color: var(--wine); }
.card-tint { background: linear-gradient(165deg, var(--surface), var(--surface-2)); }
.card-warm { background: linear-gradient(155deg, var(--gold-soft), var(--surface) 78%); border-color: color-mix(in srgb, var(--gold) 28%, var(--line)); }
.btn { border-radius: 999px; padding: 10px 18px; font-size: 12.5px; font-weight: 700; position: relative; overflow: hidden; isolation: isolate; transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.2s, background 0.2s, border-color 0.2s, color 0.2s; }
.btn::after { content: ""; position: absolute; top: 0px; bottom: 0px; left: -80%; width: 46%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.42), transparent); transform: skewX(-18deg); pointer-events: none; z-index: -1; transition: left 0.55s cubic-bezier(0.2, 0.8, 0.2, 1); }
.btn:hover::after { left: 135%; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0px) scale(0.98); }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: rgb(36, 26, 6); box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--gold) 80%, transparent), inset 0 1px rgba(255, 255, 255, .55); }
.btn-primary:hover { box-shadow: 0 18px 32px -16px color-mix(in srgb, var(--gold) 88%, transparent), inset 0 1px rgba(255, 255, 255, .6); }
.btn-wine { background: linear-gradient(180deg, var(--wine-2), var(--wine)); color: rgb(255, 255, 255); box-shadow: 0 12px 24px -14px color-mix(in srgb, var(--wine) 75%, transparent), inset 0 1px rgba(255, 255, 255, .2); }
.btn-navy { background: var(--navy); color: rgb(255, 255, 255); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .btn-navy { background: var(--navy-2); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--surface); border-color: var(--gold-2); color: var(--ink); box-shadow: var(--shadow); }
.btn-soft { background: var(--gold-soft); color: var(--amber); border-color: color-mix(in srgb, var(--gold) 18%, transparent); }
.btn-soft:hover { background: color-mix(in srgb, var(--gold-soft) 82%, var(--gold) 18%); }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: color-mix(in srgb, var(--red) 16%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--red-soft) 80%, var(--red) 20%); }
.btn-sm { padding: 7px 13px; font-size: 11px; }
.btn-xs { padding: 5px 9px; font-size: 10.5px; }
.link-btn { color: var(--gold); font-weight: 700; transition: color 0.18s; }
.link-btn:hover { color: var(--wine); }
.badge { padding: 4px 10px; border-radius: 999px; font-size: 10.5px; font-weight: 700; }
.badge-gold { background: var(--gold-soft); color: var(--amber); }
.badge-wine { background: var(--wine-soft); color: var(--wine); }
.chip { padding: 7px 13px; border-radius: 999px; background: var(--surface); font-size: 11.5px; font-weight: 500; box-shadow: var(--shadow-sm); transition: 0.18s; }
.chip:hover { border-color: var(--line-strong); color: var(--ink); transform: translateY(-1px); }
.chip.active { background: var(--gold-soft); color: var(--amber); border-color: var(--gold-2); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 25%, transparent); }
.field { gap: 6px; }
.field label, .label { font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: 0px; }
.input, .select, .textarea { border-radius: 12px; padding: 10px 13px; font-size: 13px; background: var(--surface); border-color: var(--line); box-shadow: rgba(24, 33, 31, 0.04) 0px 1px 2px inset; transition: border-color 0.18s, box-shadow 0.18s, background 0.18s; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 16%, transparent); }
.textarea { line-height: 1.9; }
.input-sm { padding: 7px 11px; font-size: 12px; border-radius: 10px; }
.search-field .input { padding-inline-start: 36px; }
.check { font-size: 12px; gap: 8px; }
.check input { width: 17px; height: 17px; accent-color: var(--gold); }
.check-line input { accent-color: var(--gold); }
.table-wrap { border-radius: 16px; border-color: var(--line); background: var(--surface); }
table.data { font-size: 12.5px; }
table.data thead th { padding: 12px; font-size: 10.5px; letter-spacing: 0px; background: var(--surface-2); color: var(--muted); font-weight: 700; border-bottom: 1px solid var(--line); }
table.data td { padding: 11px 12px; }
table.data tbody tr { transition: background 0.15s; }
table.data tbody tr:hover { background: color-mix(in srgb, var(--gold) 6%, transparent); }
.stat-grid { gap: 14px; }
.stat-card { border-radius: 18px; padding: 18px; gap: 14px; box-shadow: var(--shadow-sm); transition: transform 0.22s, box-shadow 0.22s, border-color 0.22s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.stat-card::after { width: 118px; height: 118px; inset-inline-end: -34px; top: -46px; background: radial-gradient(circle, var(--tone-bg, var(--gold-soft)), transparent 70%); opacity: 0.7; }
.stat-icon { width: 46px; height: 46px; border-radius: 14px; font-size: 20px; }
.stat-icon svg { width: 22px; height: 22px; }
.stat-value { font-size: 28px; letter-spacing: 0px; line-height: 1.15; }
.stat-label { font-size: 11.5px; color: var(--muted); }
.stat-sub { font-size: 10.5px; color: var(--muted-2); }
.hero { border-radius: 26px; padding: clamp(26px, 3.6vw, 44px); background: radial-gradient(760px 340px at 92% -16%, rgba(216, 185, 112, 0.3), transparent 62%), radial-gradient(520px 320px at 4% 116%, rgba(156, 70, 85, 0.42), transparent 62%), linear-gradient(135deg, rgb(14, 25, 41) 0%, rgb(22, 37, 61) 54%, rgb(42, 31, 44) 100%); box-shadow: var(--shadow-lg), inset 0 1px rgba(255, 255, 255, .08); }
.hero::before { background-image: repeating-linear-gradient(45deg, transparent 0px, transparent 32px, rgba(255, 255, 255, 0.024) 32px, rgba(255, 255, 255, 0.024) 33px), radial-gradient(circle at 74% 18%, rgba(255, 255, 255, 0.09), transparent 26%); }
.hero::after { content: "✝"; inset-inline-end: -6px; top: -58px; font-size: 250px; color: rgba(216, 185, 112, 0.055); font-family: var(--font-display); }
.hero-grid { grid-template-columns: 1.5fr 0.82fr; gap: clamp(18px, 3vw, 34px); }
.hero-kicker { color: var(--gold-2); font-size: 11px; }
.hero-kicker::before { width: 26px; background: linear-gradient(90deg, transparent, var(--gold-2)); }
.hero-logo { width: 68px; height: 68px; border-radius: 20px; padding: 3px; box-shadow: rgba(0, 0, 0, 0.9) 0px 16px 32px -18px, rgba(216, 185, 112, 0.6) 0px 0px 0px 1px, rgba(216, 185, 112, 0.4) 0px 0px 30px -8px; }
.hero h2 { font-size: clamp(34px, 4.4vw, 56px); line-height: 1.22; margin: 14px 0px 10px; }
.hero-sub { color: rgb(203, 198, 185); font-size: 13.5px; line-height: 1.95; max-width: 58ch; }
.hero-meta { gap: 8px; margin-top: 18px; }
.hero-pill { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.067); border-color: rgba(255, 255, 255, 0.13); font-size: 11px; }
.hero-pill b { color: var(--gold-2); }
.hero-actions { gap: 9px; margin-top: 22px; }
.hero-side { border-radius: 20px; padding: 20px; background: linear-gradient(160deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)); border-color: rgba(255, 255, 255, 0.14); backdrop-filter: blur(10px); }
.countdown b { font-size: 50px; font-weight: 700; color: var(--gold-2); }
.countdown span { font-size: 12px; color: rgb(216, 209, 194); }
.hero-side .next-lesson { font-size: 18px; line-height: 1.55; }
.hero-side .next-date { color: rgb(216, 209, 194); }
.hero-side .next-meta { color: rgb(201, 196, 183); }
.hero-side .next-meta b { color: rgb(243, 236, 221); }
.hero-progress { height: 6px; background: rgba(255, 255, 255, 0.14); }
.hero-progress span { background: linear-gradient(90deg, var(--gold), var(--gold-2)); box-shadow: rgba(216, 185, 112, 0.5) 0px 0px 12px; }
.progress { height: 8px; background: var(--surface-3); }
.progress > span { background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.progress.green > span { background: linear-gradient(90deg, var(--green), #8dc9a6); }
.progress.wine > span { background: linear-gradient(90deg, var(--wine), var(--wine-2)); }
.progress-val { font-size: 11px; }
.ring circle { stroke-width: 8; }
.ring .track { stroke: var(--surface-3); }
.ring .value { stroke: var(--gold); filter: drop-shadow(0 0 5px color-mix(in srgb, var(--gold) 35%, transparent)); }
.ring-label b { font-size: 23px; font-weight: 700; }
.ring-label span { font-size: 9.5px; }
.alert-list { gap: 9px; }
.alert-item { border-radius: 14px; padding: 11px 13px; background: var(--surface-2); }
.alert-item:hover { background: var(--surface); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.alert-item .a-icon { width: 32px; height: 32px; border-radius: 10px; }
.week-list { gap: 10px; }
.week-card { border-radius: 16px; padding: 14px 16px; background: var(--surface); box-shadow: var(--shadow-sm); }
.week-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.week-card.is-next { border-color: color-mix(in srgb, var(--gold) 52%, var(--line)); background: linear-gradient(90deg, color-mix(in srgb, var(--gold) 7%, var(--surface)), var(--surface)); }
.week-num { width: 50px; height: 50px; border-radius: 14px; }
.week-num b { font-size: 17px; font-weight: 700; }
.month-label { font-size: 11.5px; letter-spacing: 0px; }
.detail-hero { border-radius: 24px; background: radial-gradient(620px 260px at 90% -6%, rgba(216, 185, 112, 0.26), transparent 62%), linear-gradient(135deg, rgb(22, 35, 58), rgb(43, 34, 51)); box-shadow: var(--shadow-lg); }
.detail-hero h2 { line-height: 1.35; }
.detail-hero p { color: rgb(203, 198, 185); }
.info-block { padding: 18px 20px; }
.info-block h3 { font-size: 14.5px; gap: 9px; }
.info-block h3 .ib-icon { width: 30px; height: 30px; border-radius: 9px; background: var(--gold-soft); color: var(--gold); }
.info-block p, .info-block li { line-height: 1.95; }
.info-block .quote { font-family: var(--font-display); font-size: 17px; line-height: 2; }
details.acc { border-radius: 13px; background: var(--surface-2); }
details.acc summary { padding: 11px 14px; font-size: 12px; }
details.acc summary::before { color: var(--gold); }
.tabs { border-radius: 14px; padding: 5px; background: var(--surface-2); gap: 3px; }
.tab { border-radius: 10px; padding: 8px 14px; font-size: 12px; }
.tab.active { background: var(--surface); box-shadow: var(--shadow-sm); }
.avatar { box-shadow: inset 0 1px rgba(255, 255, 255, .22), 0 0 0 2px var(--surface); }
.avatar.has-photo { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3), 0 0 0 2px var(--surface); }
.avatar-cam { border-radius: 50%; box-shadow: var(--shadow); }
.photo-picker { border-radius: 16px; background: var(--surface-2); }
.design-card { border-radius: 18px; box-shadow: var(--shadow-sm); }
.design-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.design-thumb img { transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); }
.upload-drop { border-radius: 16px; background: var(--surface-2); }
.upload-drop:hover, .upload-drop.dragover { border-color: var(--gold); background: var(--gold-soft); }
.student-card { border-radius: var(--radius); padding: 17px; }
.student-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.student-stats b { font-weight: 700; }
.att-row { border-radius: 12px; }
.att-row:hover { background: color-mix(in srgb, var(--gold) 5%, transparent); }
.segmented { border-radius: 11px; background: var(--surface-2); }
.seg-btn { border-radius: 8px; }
.att-sum-card { border-radius: 14px; background: var(--surface-2); }
.chart-bar .bar { border-radius: 7px 7px 3px 3px; background: linear-gradient(var(--gold-2), var(--gold)); }
.day-card { border-radius: 16px; }
.day-top { background: var(--surface-2); }
.lib-card { border-radius: var(--radius); padding: 18px; }
.lib-quote { font-family: var(--font-display); font-size: 18px; line-height: 2; }
.tag { border-radius: 999px; background: var(--surface-2); }
.bday-card { padding: 14px 15px; }
.bday-date { border-radius: 14px; background: var(--gold-soft); }
.task-item { border-radius: 14px; background: var(--surface); }
.task-check { accent-color: var(--gold); }
.quick { border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.quick:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.quick .q-icon { width: 34px; height: 34px; border-radius: 10px; }
.note { border-radius: 14px; padding: 12px 14px; line-height: 1.85; }
.podium-card { border-radius: 16px; background: var(--surface-2); }
.podium-card.first { background: linear-gradient(165deg, var(--gold-soft), var(--surface)); border-color: var(--gold-2); }
.podium-points { color: var(--gold); }
.empty { padding: 46px 20px; }
.empty .empty-icon { opacity: 0.4; margin-bottom: 10px; }
.empty h3 { font-size: 15.5px; margin-bottom: 5px; color: var(--ink); }
.kv dt { color: var(--muted); }
.kv dd { color: var(--ink-2); font-weight: 700; }
.toast-stack { gap: 9px; max-width: 360px; }
.toast { border-radius: 14px; padding: 12px 16px; font-size: 12px; background: rgb(15, 25, 38); border-color: rgba(255, 255, 255, 0.12); box-shadow: var(--shadow-lg); animation: 0.32s cubic-bezier(0.2, 0.8, 0.2, 1) 0s 1 normal both running toastIn; }
.toast.ok { border-inline-start: 3px solid var(--gold-2); }
.toast.err { border-inline-start: 3px solid rgb(224, 134, 134); }
.toast.info { border-inline-start: 3px solid rgb(130, 178, 221); }
@keyframes toastOut { 
  100% { opacity: 0; transform: translateY(10px) scale(0.98); }
}
.modal-root { background: rgba(9, 14, 22, 0.52); backdrop-filter: blur(10px) saturate(0.9); }
.modal { border-radius: 24px; border-color: var(--line); box-shadow: var(--shadow-lg); animation: 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0s 1 normal both running modalIn; }
@keyframes modalIn { 
  0% { opacity: 0; transform: translateY(18px) scale(0.98); }
}
.modal-head { padding: 22px 24px 0px; }
.modal-head h3 { font-size: 23px; }
.modal-body { padding: 18px 24px; }
.modal-foot { padding: 0px 24px 22px; gap: 9px; }
.modal-close { width: 34px; height: 34px; border-radius: 10px; background: var(--surface-2); }
.modal-close:hover { color: var(--ink); border-color: var(--line-strong); }
.search-overlay { background: rgba(9, 14, 22, 0.55); backdrop-filter: blur(10px); padding-top: 10vh; }
.search-panel { border-radius: 22px; border-color: var(--line); box-shadow: var(--shadow-lg); }
.search-head { padding: 15px 17px; border-bottom-color: var(--line); }
.search-head input { font-size: 15.5px; }
.search-head svg { color: var(--gold); }
.result-item { border-radius: 12px; padding: 10px 11px; }
.result-item:hover, .result-item.active { background: var(--gold-soft); }
.result-item .r-icon { border-radius: 9px; background: var(--surface-3); color: var(--gold); }
.search-foot { font-size: 10px; }
.boot { gap: 16px; min-height: 54vh; }
.boot-mark { width: 100px; height: 100px; border-radius: 30px; padding: 8px; box-shadow: 0 26px 50px -24px rgba(0, 0, 0, .6), 0 0 0 1px rgba(216, 185, 112, .5), 0 0 0 12px color-mix(in srgb, var(--gold) 7%, transparent); animation: 2.8s cubic-bezier(0.45, 0, 0.55, 1) 0s infinite normal none running bootPulse; }
@keyframes bootPulse { 
  0%, 100% { transform: scale(1); box-shadow: 0 26px 50px -24px rgba(0, 0, 0, .6), 0 0 0 1px rgba(216, 185, 112, .5), 0 0 0 10px color-mix(in srgb, var(--gold) 8%, transparent); }
  50% { transform: scale(1.035); box-shadow: 0 30px 56px -24px rgba(0, 0, 0, .6), 0 0 0 1px rgba(216, 185, 112, .6), 0 0 0 22px color-mix(in srgb, var(--gold) 0%, transparent); }
}
.boot p { font-size: 12.5px; }
.view { animation: 0.5s cubic-bezier(0.16, 1, 0.3, 1) 0s 1 normal both running viewIn; }
@keyframes viewIn { 
  0% { opacity: 0; transform: translateY(14px) scale(0.995); filter: blur(2px); }
  100% { opacity: 1; transform: none; filter: none; }
}
.view > * { animation: 0.55s cubic-bezier(0.16, 1, 0.3, 1) 0s 1 normal both running riseIn; }
.view > :nth-child(1) { animation-delay: 0.02s; }
.view > :nth-child(2) { animation-delay: 0.06s; }
.view > :nth-child(3) { animation-delay: 0.1s; }
.view > :nth-child(4) { animation-delay: 0.14s; }
.view > :nth-child(5) { animation-delay: 0.18s; }
.view > :nth-child(6) { animation-delay: 0.22s; }
@keyframes riseIn { 
  0% { opacity: 0; transform: translateY(14px); }
  100% { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}
@media (max-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0px, 1fr)); }
  .hero-grid { grid-template-columns: 1.3fr 0.9fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0px, 1fr)); }
}
@media (max-width: 1080px) {
  :root { --sidebar-w: 0px; }
  .main-wrap { margin-inline-start: 0px; }
  .sidebar { transform: translateX(105%); transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); width: 290px; }
  .sidebar.open { transform: none; }
  .menu-btn { display: grid; }
  .topbar-logo { display: grid; place-items: center; }
  .detail-body { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero h2 { font-size: clamp(30px, 6vw, 40px); }
  .search-pill { padding: 8px 10px; }
  .search-pill span, .search-pill kbd { display: none; }
  .today-chip { display: none; }
  .page-head h2 { font-size: 28px; }
  .detail-body { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .user-chip { max-width: 150px; }
}
@media (max-width: 560px) {
  body { font-size: 14px; }
  .topbar { min-height: 66px; padding: 10px 14px; }
  .topbar-title h1 { font-size: 21px; }
  .eyebrow { font-size: 9px; }
  .content { padding: 15px 15px 48px; }
  .card-pad { padding: 15px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .stat-card { padding: 13px; gap: 10px; }
  .stat-icon { width: 37px; height: 37px; border-radius: 11px; }
  .stat-value { font-size: 21px; }
  .stat-label { font-size: 10px; }
  .hero { padding: 22px 17px; border-radius: 22px; }
  .hero h2 { font-size: 30px; }
  .hero::after { font-size: 130px; }
  .hero-side { padding: 15px; }
  .countdown b { font-size: 40px; }
  .grid-auto { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .modal-head, .modal-body { padding-inline: 16px; }
  .modal-foot { padding-inline: 16px; }
  .toast-stack { inset-inline: 12px; bottom: 12px; max-width: none; }
  .user-chip { padding: 7px; max-width: none; }
  .user-chip span { display: none; }
  .week-card { flex-wrap: wrap; }
  .week-side { flex-direction: row; width: 100%; justify-content: flex-end; }
  .att-summary { grid-template-columns: 1fr 1fr; }
  .podium { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .photo-editor, .photo-picker { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 430px) {
  .design-grid { grid-template-columns: 1fr; }
}
.visits-tabs { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px 8px 16px; margin-bottom: 16px; flex-wrap: wrap; }
.visits-tabs .tabs { background: transparent; border: 0px; padding: 0px; gap: 3px; flex-wrap: wrap; }
.visits-tabs .tab { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; }
.visits-tabs .tab.active { background: var(--gold-soft); color: var(--amber); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 24%, transparent); }
.visits-tabs-note { font-size: 10.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.visits-content { animation: 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0s 1 normal both running riseIn; }
.visit-callout { display: flex; align-items: center; gap: 14px; margin-top: 14px; padding: 15px 18px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--wine) 20%, var(--line)); background: linear-gradient(120deg, var(--wine-soft), var(--surface) 72%); box-shadow: var(--shadow-sm); }
.visit-callout.is-calm { border-color: color-mix(in srgb, var(--green) 20%, var(--line)); background: linear-gradient(120deg, var(--green-soft), var(--surface) 72%); }
.visit-callout b { display: block; font-size: 13.5px; }
.visit-callout span:not(.vc-icon) { font-size: 11px; color: var(--muted); }
.vc-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: 0 0 auto; background: var(--surface); color: var(--wine); box-shadow: var(--shadow-sm); }
.visit-callout.is-calm .vc-icon { color: var(--green); }
.visit-priority-list { display: grid; gap: 9px; }
.visit-priority-list.is-detailed { grid-template-columns: repeat(auto-fill, minmax(390px, 1fr)); margin-top: 14px; }
.visit-person { display: flex; align-items: flex-start; gap: 11px; position: relative; padding: 13px 14px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.visit-person:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.visit-person::before { content: ""; position: absolute; inset-inline-start: 0px; top: 14px; bottom: 14px; width: 3px; border-radius: 999px; background: var(--muted-2); }
.visit-person.is-urgent::before { background: linear-gradient(var(--wine-2), var(--wine)); box-shadow: 0 0 10px color-mix(in srgb, var(--wine) 45%, transparent); }
.visit-person.is-important::before { background: linear-gradient(var(--gold-2), var(--gold)); }
.visit-person.is-follow::before { background: linear-gradient(var(--blue), #6da6d6); }
.visit-person.is-stable::before { background: var(--green); }
.visit-person .avatar { flex: 0 0 auto; }
.vp-rank { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; background: var(--surface-2); font-size: 11px; font-weight: 700; color: var(--muted); }
.visit-person.is-urgent .vp-rank { background: var(--wine-soft); color: var(--wine); }
.vp-body { flex: 1 1 0%; min-width: 0px; display: flex; flex-direction: column; gap: 3px; }
.vp-head { display: flex; align-items: center; justify-content: space-between; gap: 7px; flex-wrap: wrap; }
.vp-name { font-weight: 700; font-size: 13px; }
.vp-reasons { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.mini-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.visit-person.is-urgent .vp-reasons .mini-tag:first-child { background: var(--wine-soft); color: var(--wine); border-color: transparent; }
.visit-person.is-important .vp-reasons .mini-tag:first-child { background: var(--gold-soft); color: var(--amber); border-color: transparent; }
.visit-person.is-follow .vp-reasons .mini-tag:first-child { background: var(--blue-soft); color: var(--blue); border-color: transparent; }
.vp-suggest { font-size: 10px; color: var(--muted-2); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.vp-stats { display: flex; flex-wrap: wrap; gap: 8px; font-size: 10px; color: var(--muted); margin-top: 3px; }
.vp-stats span { display: inline-flex; align-items: center; gap: 3px; }
.vp-actions { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; align-items: stretch; }
.visit-priority-list.is-detailed .vp-actions { display: grid; grid-template-columns: 1fr 1fr; }
.visit-due { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); flex-wrap: wrap; }
.visit-due .avatar { flex: 0 0 auto; }
.plan-snapshot { border: 1px solid var(--line); border-radius: 16px; padding: 13px 14px; background: linear-gradient(165deg, var(--surface), var(--surface-2)); }
.plan-snapshot.is-expanded { padding: 16px; }
.plan-snapshot .row-between b { font-size: 13px; }
.plan-progress-row { display: flex; align-items: center; gap: 8px; margin: 9px 0px; }
.plan-progress-row .grow { flex: 1 1 0%; }
.name-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; max-height: 132px; overflow: auto; padding-bottom: 2px; }
.name-chip { font-family: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 4px 9px; font-size: 10px; display: inline-flex; align-items: center; gap: 3px; cursor: pointer; transition: transform 0.16s, border-color 0.16s, background 0.16s; }
.name-chip:hover { border-color: var(--gold-2); color: var(--ink); transform: translateY(-1px); }
.name-chip.done { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 28%, transparent); color: var(--green); text-decoration: line-through 1px; }
.plan-checkpoint { margin-top: 8px; font-size: 10.5px; color: var(--muted); display: flex; gap: 5px; line-height: 1.7; }
.visit-dist { display: grid; gap: 9px; }
.visit-dist-row { display: flex; align-items: center; gap: 7px; font-size: 11.5px; position: relative; padding-bottom: 8px; }
.visit-dist-row .vd-bar { position: absolute; inset-inline: 0px; bottom: 0px; height: 3px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.visit-dist-row .vd-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); border-radius: 99px; }
.visit-dist-row > b { font-size: 12px; color: var(--gold); }
.vd-icon, .visit-log-icon { width: 27px; height: 27px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; background: var(--tone-bg, var(--surface-2)); color: var(--tone, var(--gold)); }
.visit-insight-strip { display: grid; grid-template-columns: repeat(4, minmax(0px, 1fr)); gap: 8px; margin-bottom: 12px; }
.visit-insight-strip > div { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; padding: 8px 12px; display: flex; align-items: baseline; gap: 7px; box-shadow: var(--shadow-sm); }
.visit-insight-strip b { font-size: 20px; color: var(--gold); line-height: 1.2; }
.visit-insight-strip span { font-size: 10.5px; color: var(--muted); }
.visit-filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.visit-filter-bar .tabs { padding: 4px; }
.visit-filter-bar .tab { font-size: 10.5px; padding: 6px 10px; display: inline-flex; gap: 4px; align-items: center; }
.tab-count { background: var(--surface-3); border-radius: 99px; padding: 0px 5px; font-size: 9px; }
.tab.active .tab-count { background: var(--gold-soft); color: var(--amber); }
.plan-progress-cell { display: flex; align-items: center; gap: 6px; min-width: 108px; }
.plan-progress-cell .progress { flex: 1 1 0%; }
.plan-progress-cell span { font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.visit-log-group { margin-bottom: 17px; }
.visit-log-group[hidden] { display: none; }
.visit-log-date { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.visit-log-date b { font-size: 13px; color: var(--ink); }
.visit-log-date span { font-size: 10px; color: var(--muted); }
.visit-log-item { display: flex; gap: 9px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-sm); align-items: flex-start; }
.visit-log-item[hidden] { display: none; }
.visit-log-icon { width: 32px; height: 32px; border-radius: 10px; }
.visit-log-body { flex: 1 1 0%; min-width: 0px; display: flex; flex-direction: column; gap: 4px; }
.visit-log-note { font-size: 11.5px; color: var(--ink-2); line-height: 1.8; white-space: pre-line; }
.visit-needs { display: flex; flex-wrap: wrap; gap: 4px; }
.visit-next { font-size: 10px; color: var(--blue); display: flex; align-items: center; gap: 4px; }
.visit-next.is-overdue { color: var(--wine); font-weight: 700; }
.visit-log-actions { display: flex; flex-direction: column; gap: 3px; flex: 0 0 auto; }
.visit-file-hero { display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 16px; background: linear-gradient(150deg, var(--gold-soft), var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 22%, var(--line)); }
.visit-file-hero .avatar { width: 52px; height: 52px; font-size: 19px; flex: 0 0 auto; }
.visit-file-stats { display: grid; grid-template-columns: repeat(4, minmax(0px, 1fr)); gap: 8px; margin-top: 10px; }
.visit-file-stats > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; text-align: center; }
.visit-file-stats b { display: block; font-size: 18px; color: var(--gold); line-height: 1.3; }
.visit-file-stats span { font-size: 9.5px; color: var(--muted); }
.visit-file-line { display: flex; gap: 8px; align-items: flex-start; padding: 8px 0px; border-bottom: 1px dashed var(--line); }
.visit-file-line:last-child { border-bottom: 0px; }
.visit-context { margin-bottom: 14px; padding: 12px 13px; border-radius: 15px; background: linear-gradient(150deg, var(--gold-soft), var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 20%, var(--line)); }
.visit-context-main { display: flex; align-items: flex-start; gap: 10px; }
.visit-context .avatar { width: 42px; height: 42px; font-size: 16px; flex: 0 0 auto; }
.visit-context-stats { display: flex; flex-wrap: wrap; gap: 7px; font-size: 10px; color: var(--muted); margin-top: 4px; }
.visit-context-stats span { display: inline-flex; align-items: center; gap: 3px; }
.visit-context-stats .wine-text { color: var(--wine); font-weight: 700; }
.pick-chips, .tmpl-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pick-chip { font-family: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 5px 11px; font-size: 10.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; transition: transform 0.16s, border-color 0.16s, background 0.16s; }
.pick-chip:hover { border-color: var(--gold-2); color: var(--ink); transform: translateY(-1px); }
.pick-chip.active { background: var(--gold-soft); color: var(--amber); border-color: var(--gold-2); font-weight: 700; }
.quick-dates { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 5px; }
.quick-date { font-family: inherit; border: 1px dashed var(--line-strong); background: transparent; border-radius: 99px; padding: 2px 8px; font-size: 9.5px; color: var(--muted); cursor: pointer; }
.quick-date:hover, .quick-date.active { background: var(--gold-soft); color: var(--amber); border-color: var(--gold-2); }
.plan-name-list { display: grid; gap: 5px; max-height: 310px; overflow: auto; }
.plan-name-row { display: flex; align-items: center; gap: 7px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); font-size: 11.5px; cursor: pointer; transition: 0.16s; }
.plan-name-row:hover { border-color: var(--line-strong); background: var(--surface); }
.plan-name-row.done { opacity: 0.8; background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 20%, var(--line)); }
.plan-name-row.done .grow { text-decoration: line-through; }
.plan-name-row input { accent-color: var(--gold); width: 16px; height: 16px; flex: 0 0 auto; }
.visit-plan-table td { vertical-align: middle; }
.visit-plan-table .btn { white-space: nowrap; }
.msg-hero { position: relative; overflow: hidden; isolation: isolate; margin-bottom: 14px; padding: 18px 20px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--gold) 24%, var(--line)); background: linear-gradient(135deg, var(--gold-soft), var(--surface) 52%, var(--surface-2)); box-shadow: var(--shadow-sm); }
.msg-hero::after { content: ""; position: absolute; z-index: -1; inset-inline-start: -60px; top: -80px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--gold) 22%, transparent), transparent 68%); pointer-events: none; }
.msg-hero-head { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; }
.msg-hero-icon { width: 52px; height: 52px; border-radius: 16px; flex: 0 0 auto; display: grid; place-items: center; background: var(--surface); color: var(--gold); box-shadow: var(--shadow-sm); animation: 4s ease-in-out 0s infinite normal none running floatY; }
.msg-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: 0.2px; color: var(--amber); display: flex; align-items: center; gap: 5px; }
.msg-hero h3 { font-size: 18px; margin: 2px 0px 4px; }
.msg-hero-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 10.5px; color: var(--muted); }
.msg-hero-meta span { display: inline-flex; align-items: center; gap: 4px; }
.msg-week-nav { display: flex; align-items: center; gap: 5px; flex: 0 0 auto; }
.msg-week-nav .select { max-width: 175px; }
.msg-hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0px, 1fr)); gap: 8px; margin-top: 14px; }
.msg-hero-stats > div { background: color-mix(in srgb, var(--surface) 78%, transparent); border: 1px solid var(--line); border-radius: 13px; padding: 9px 11px; display: flex; align-items: baseline; gap: 7px; }
.msg-hero-stats b { font-size: 21px; line-height: 1.1; color: var(--gold); }
.msg-hero-stats span { font-size: 10px; color: var(--muted); }
.msg-progress-row { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.msg-progress-row .grow { flex: 1 1 0%; }
.msg-hero-actions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 12px; }
.msg-hero-actions .tiny { margin-inline-start: auto; }
.msg-template-box { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); margin-bottom: 14px; overflow: hidden; }
.msg-template-box > summary { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; cursor: pointer; padding: 12px 15px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); list-style: none; transition: background 0.18s; }
.msg-template-box > summary::-webkit-details-marker { display: none; }
.msg-template-box > summary:hover { background: var(--surface-2); }
.msg-template-box > summary .tiny { font-weight: 400; margin-inline-start: auto; }
.msg-template-box[open] > summary { border-bottom: 1px solid var(--line); background: var(--surface-2); }
.msg-template-body { padding: 14px 15px; display: flex; flex-direction: column; gap: 10px; animation: 0.3s ease 0s 1 normal both running riseIn; }
.msg-template-body .textarea { min-height: 170px; font-size: 12px; line-height: 1.9; }
.msg-ph-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.msg-ph-chips .pick-chip { padding: 3px 9px; font-size: 9.5px; }
.msg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.msg-card { position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 17px; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; animation: 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0s 1 normal both running riseIn; }
.msg-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.msg-card[hidden] { display: none; }
.msg-card .avatar { flex: 0 0 auto; }
.msg-card::before { content: ""; position: absolute; inset-inline-start: 0px; top: 13px; bottom: 13px; width: 3px; border-radius: 999px; background: linear-gradient(var(--gold-2), var(--gold)); }
.msg-card.is-sent::before { background: var(--green); }
.msg-card-body { flex: 1 1 0%; min-width: 0px; display: flex; flex-direction: column; gap: 6px; }
.msg-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.msg-card-name { display: block; font-size: 13px; line-height: 1.4; }
.msg-preview { font-size: 10.8px; color: var(--muted); line-height: 1.85; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; padding: 7px 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.msg-card-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 9.5px; color: var(--muted); }
.msg-card-meta span { display: inline-flex; align-items: center; gap: 3px; }
.msg-card-actions { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; align-items: stretch; }
.msg-card.is-sent { background: linear-gradient(160deg, var(--green-soft), var(--surface) 65%); }
.absence-hero { margin-bottom: 14px; padding: 17px 19px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--wine) 22%, var(--line)); background: linear-gradient(135deg, var(--wine-soft), var(--surface) 55%, var(--surface-2)); box-shadow: var(--shadow-sm); }
.absence-hero-main { display: flex; align-items: flex-start; gap: 13px; }
.absence-hero-icon { width: 50px; height: 50px; border-radius: 15px; flex: 0 0 auto; display: grid; place-items: center; background: var(--surface); color: var(--wine); box-shadow: var(--shadow-sm); }
.absence-hero h3, .data-hero h3 { font-size: 16.5px; margin-bottom: 3px; }
.absence-hero-stats, .data-hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0px, 1fr)); gap: 8px; margin-top: 13px; }
.absence-hero-stats > div, .data-hero-stats > div { background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; text-align: center; }
.absence-hero-stats b, .data-hero-stats b { display: block; font-size: 20px; line-height: 1.15; color: var(--wine); }
.data-hero-stats b { color: var(--gold); }
.absence-hero-stats span, .data-hero-stats span { font-size: 9.5px; color: var(--muted); }
.absence-person[hidden] { display: none; }
.absence-person .vp-suggest { color: var(--wine); }
.data-hero { margin-bottom: 14px; padding: 17px 19px; border-radius: 22px; border: 1px solid color-mix(in srgb, var(--blue) 22%, var(--line)); background: linear-gradient(135deg, var(--blue-soft), var(--surface) 55%, var(--surface-2)); box-shadow: var(--shadow-sm); }
.data-hero-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.data-hero-icon { width: 50px; height: 50px; border-radius: 15px; flex: 0 0 auto; display: grid; place-items: center; background: var(--surface); color: var(--blue); box-shadow: var(--shadow-sm); }
.data-hero-ring { flex: 0 0 auto; margin-inline-start: auto; }
.data-list { display: grid; gap: 9px; }
.data-row { display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; position: relative; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; }
.data-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.data-row[hidden] { display: none; }
.data-row .avatar { flex: 0 0 auto; }
.data-row::before { content: ""; position: absolute; inset-inline-start: 0px; top: 13px; bottom: 13px; width: 3px; border-radius: 999px; background: linear-gradient(var(--blue), #6da6d6); }
.data-row.is-done { background: linear-gradient(160deg, var(--green-soft), var(--surface) 72%); }
.data-row.is-done::before { background: var(--green); }
.data-row-body { flex: 1 1 0%; min-width: 0px; display: flex; flex-direction: column; gap: 6px; }
.data-row-actions { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; align-items: stretch; }
.data-gaps { display: flex; flex-wrap: wrap; gap: 4px; }
.data-gap { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: 9.5px; color: var(--muted); white-space: nowrap; }
.data-gap.is-required { background: var(--wine-soft); color: var(--wine); border-color: transparent; font-weight: 700; }
.data-field.is-missing { border-radius: 12px; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--wine) 45%, transparent); padding: 8px; background: color-mix(in srgb, var(--wine-soft) 45%, transparent); }
.data-field.is-missing label { color: var(--wine); }
.data-completion .note { margin-top: 12px; }
.contact-picker { display: flex; flex-direction: column; gap: 6px; }
.contact-hero { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px; background: linear-gradient(150deg, var(--gold-soft), var(--surface)); border: 1px solid color-mix(in srgb, var(--gold) 22%, var(--line)); flex-wrap: wrap; }
.contact-hero .avatar { width: 44px; height: 44px; font-size: 17px; flex: 0 0 auto; }
.contact-list-title { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.contact-list { display: grid; gap: 7px; margin-top: 7px; }
.contact-option { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-2); transition: border-color 0.18s, background 0.18s, transform 0.18s; flex-wrap: wrap; }
.contact-option:hover { border-color: var(--gold-2); background: var(--surface); transform: translateY(-1px); }
.contact-role { width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center; background: var(--surface); color: var(--gold); box-shadow: var(--shadow-sm); }
.contact-option b { font-size: 11.5px; display: block; }
.contact-number { font-size: 12px; font-weight: 700; color: var(--ink-2); letter-spacing: 0.4px; direction: ltr; text-align: start; }
.contact-actions { display: flex; gap: 4px; flex-wrap: wrap; margin-inline-start: auto; }
.contact-picker .textarea { font-size: 12px; line-height: 1.9; }
.msg-editor { display: flex; flex-direction: column; gap: 10px; }
.msg-editor .textarea { min-height: 190px; font-size: 12px; line-height: 1.9; }
@keyframes floatY { 
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-4px); }
}
@media (prefers-reduced-motion: reduce) {
  .msg-hero-icon { animation: auto ease 0s 1 normal none running none; }
}
@media (max-width: 860px) {
  .visit-priority-list.is-detailed { grid-template-columns: 1fr; }
  .visit-insight-strip { grid-template-columns: 1fr 1fr; }
  .visit-file-stats { grid-template-columns: 1fr 1fr; }
  .visits-tabs { position: static; }
  .msg-hero-stats, .absence-hero-stats, .data-hero-stats { grid-template-columns: 1fr 1fr; }
  .msg-week-nav { width: 100%; }
  .msg-week-nav .select { flex: 1 1 0%; max-width: none; }
}
@media (max-width: 560px) {
  .visit-person { flex-wrap: wrap; }
  .vp-actions, .visit-priority-list.is-detailed .vp-actions { width: 100%; display: grid; grid-template-columns: 1fr 1fr; flex-direction: row; }
  .visits-tabs { padding: 7px; }
  .visits-tabs .tab { font-size: 10px; padding: 7px 9px; }
  .visits-tabs-note { display: none; }
  .visit-callout { flex-wrap: wrap; }
  .visit-log-item { flex-wrap: wrap; }
  .visit-log-actions { flex-flow: wrap; width: 100%; }
  .visit-file-hero { flex-wrap: wrap; }
  .visit-file-stats { grid-template-columns: 1fr 1fr; }
  .visit-filter-bar .tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .msg-grid { grid-template-columns: 1fr; }
  .msg-card { flex-wrap: wrap; }
  .msg-card-actions { width: 100%; flex-flow: wrap; }
  .msg-hero { padding: 15px; }
  .msg-hero-actions .tiny { margin-inline-start: 0px; }
  .msg-template-box > summary .tiny { display: none; }
  .data-row { flex-wrap: wrap; }
  .data-row-actions { width: 100%; flex-flow: wrap; }
  .contact-option { flex-wrap: wrap; }
  .contact-actions { width: 100%; margin-inline-start: 0px; }
  .contact-actions .btn { flex: 1 1 0%; }
  .data-hero-ring { margin-inline-start: 0px; }
}
.att-date-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.att-date-nav { display: flex; align-items: center; gap: 7px; flex: 1 1 0%; min-width: 260px; }
.att-date-nav .select { flex: 1 1 0%; min-width: 190px; }
.att-date-meta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted); }
.att-date-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.att-date-meta .link-btn { font-size: 10.5px; }
.att-hero { display: grid; grid-template-columns: auto minmax(0px, 1.3fr) minmax(220px, 1fr); align-items: center; gap: 18px; padding: 16px 18px; margin-bottom: 14px; border-radius: 20px; border: 1px solid color-mix(in srgb, var(--gold) 20%, var(--line)); background: linear-gradient(135deg, var(--gold-soft), var(--surface) 55%, var(--surface-2)); box-shadow: var(--shadow-sm); }
.att-hero-ring .ring-wrap { width: 112px; height: 112px; }
.att-hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0px, 1fr)); gap: 8px; }
.att-hero-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 9px 10px; text-align: center; box-shadow: var(--shadow-sm); }
.att-hero-stats b { display: block; font-size: 22px; line-height: 1.25; color: var(--ink); }
.att-hero-stats > div:nth-child(1) b { color: var(--green); }
.att-hero-stats > div:nth-child(2) b { color: var(--gold); }
.att-hero-stats > div:nth-child(3) b { color: var(--wine); }
.att-hero-stats > div:nth-child(4) b { color: var(--blue); }
.att-hero-stats span { font-size: 9.5px; color: var(--muted); }
.att-hero-progress { display: flex; flex-direction: column; gap: 6px; }
.att-hero-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 3px; }
.att-tabs { margin-bottom: 14px; }
.att-content { animation: 0.35s cubic-bezier(0.16, 1, 0.3, 1) 0s 1 normal both running riseIn; }
.att-toolbar-card { padding: 12px 14px; margin-bottom: 10px; }
.att-toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.att-status-tabs { padding: 4px; flex-wrap: wrap; }
.att-status-tabs .tab { font-size: 10.5px; padding: 6px 10px; display: inline-flex; align-items: center; gap: 4px; }
.att-toolbar-second { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.att-legend { display: flex; flex-wrap: wrap; gap: 10px; font-size: 10px; color: var(--muted); margin-top: 10px; align-items: center; }
.att-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; margin-inline-end: 3px; }
.att-list-meta { display: flex; align-items: baseline; gap: 6px; padding: 0px 4px 7px; font-size: 11px; color: var(--muted); }
.att-list-meta b { color: var(--gold); font-size: 13px; }
.att-list { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 6px; box-shadow: var(--shadow-sm); }
.att-row { grid-template-columns: minmax(200px, 1.55fr) 190px minmax(96px, auto); gap: 10px; padding: 9px 10px; border-radius: 12px; border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent); transition: background 0.18s, box-shadow 0.18s; }
.att-row[hidden], .att-reason-row[hidden], .empty[hidden] { display: none !important; }
.att-row.is-absent { background: color-mix(in srgb, var(--wine-soft) 52%, transparent); }
.att-row.is-absent:hover { background: color-mix(in srgb, var(--wine-soft) 72%, transparent); }
.att-person-btn { border: 0px; background: transparent; padding: 0px; font-family: inherit; cursor: pointer; text-align: start; min-width: 0px; width: 100%; border-radius: 10px; }
.att-person-btn:hover .att-name { color: var(--amber); }
.att-who { display: flex; flex-direction: column; gap: 1px; min-width: 0px; }
.att-who .att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-rate-mini { color: var(--green); }
.att-rate-mini.is-low { color: var(--wine); }
.att-streak { color: var(--wine); font-weight: 700; }
.att-mark { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.att-quick-links { display: flex; align-items: center; gap: 3px; }
.att-icon-btn { width: 27px; height: 27px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--muted); cursor: pointer; transition: 0.16s; text-decoration: none; }
.att-icon-btn:hover { color: var(--amber); border-color: var(--gold-2); background: var(--gold-soft); transform: translateY(-1px); }
.att-side { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.att-last { white-space: nowrap; }
.att-reason-row { grid-column: 1 / -1; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; padding: 6px 8px; margin-top: 2px; border-radius: 11px; background: color-mix(in srgb, var(--wine-soft) 42%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--wine) 22%, var(--line)); }
.att-reason-label { font-size: 9.5px; color: var(--wine); display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.reason-chip { font-family: inherit; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: 2px 8px; font-size: 9.5px; cursor: pointer; transition: 0.16s; }
.reason-chip:hover { border-color: var(--wine); color: var(--wine); }
.reason-chip.active { background: var(--wine); color: rgb(255, 255, 255); border-color: var(--wine); font-weight: 700; }
.att-reason-saved { margin-inline-start: auto; }
.att-trend-note { margin-top: 8px; font-size: 10px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.att-group-breakdown { display: grid; gap: 10px; }
.att-group-row { display: grid; grid-template-columns: 64px minmax(60px, 1fr) 38px auto; align-items: center; gap: 8px; font-size: 11px; }
.att-group-name { font-weight: 700; }
.att-group-row b { color: var(--gold); font-size: 12px; }
.att-rank-list { display: grid; gap: 6px; }
.att-rank-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); }
.att-rank-num { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: var(--wine-soft); color: var(--wine); font-size: 10px; font-weight: 700; flex: 0 0 auto; }
.att-heat-wrap { margin-top: 4px; max-height: 290px; }
.att-heatmap { border-collapse: separate; border-spacing: 5px; font-size: 10px; width: 100%; }
.att-heatmap th { font-weight: 400; color: var(--muted); font-size: 9px; text-align: center; white-space: nowrap; }
.att-heat-name { text-align: start; font-weight: 600; font-size: 10.5px; white-space: nowrap; }
.att-heat-dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; font-size: 9.5px; font-weight: 700; margin: auto; }
.att-heat-dot.is-present { background: var(--green-soft); color: var(--green); }
.att-heat-dot.is-absent { background: var(--wine-soft); color: var(--wine); }
.att-heat-dot.is-blank { background: var(--surface-3); color: var(--muted-2); }
.att-follow-hero { display: flex; align-items: center; gap: 22px; padding: 13px 18px; margin-bottom: 14px; border-radius: 18px; border: 1px solid color-mix(in srgb, var(--wine) 18%, var(--line)); background: linear-gradient(120deg, var(--wine-soft), var(--surface) 68%); flex-wrap: wrap; }
.att-follow-hero > div:not(.att-follow-hero-actions) { display: flex; align-items: baseline; gap: 6px; }
.att-follow-hero b { font-size: 24px; color: var(--wine); line-height: 1.2; }
.att-follow-hero span { font-size: 10.5px; color: var(--muted); }
.att-follow-hero-actions { display: flex; gap: 6px; margin-inline-start: auto; flex-wrap: wrap; }
.att-follow-row { display: flex; align-items: flex-start; gap: 8px; padding: 9px 10px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); animation: 0.28s ease 0s 1 normal both running riseIn; }
.att-follow-row.is-compact { padding: 7px 8px; align-items: center; }
.att-follow-row .avatar { flex: 0 0 auto; }
.att-follow-actions { display: flex; align-items: center; gap: 3px; flex: 0 0 auto; flex-wrap: wrap; }
.att-reason-row.is-inline { grid-column: auto; width: 100%; margin-top: 5px; padding: 5px 6px; background: transparent; border: 0px; }
.att-plan-step { display: flex; align-items: flex-start; gap: 8px; padding: 8px 9px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line); color: var(--gold); }
.att-plan-step div { display: flex; flex-direction: column; gap: 1px; }
.att-plan-step b { font-size: 11.5px; color: var(--ink); }
.att-plan-step span { font-size: 10px; color: var(--muted); }
.att-profile-ring { flex: 0 0 auto; }
.att-profile-ring .ring-wrap { width: 92px; height: 92px; }
.att-profile-ring .ring-label b { font-size: 15px; }
.att-history { display: grid; gap: 5px; max-height: 330px; overflow: auto; }
.att-history-row { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line); }
.att-history-dot { width: 27px; height: 27px; border-radius: 9px; display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: 0 0 auto; }
.att-history-dot.is-present { background: var(--green-soft); color: var(--green); }
.att-history-dot.is-absent { background: var(--wine-soft); color: var(--wine); }
.att-chart { height: 138px; }
.att-chart .bar b { font-size: 9px; }
@media (max-width: 980px) {
  .att-hero { grid-template-columns: auto minmax(0px, 1fr); }
  .att-hero-progress { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  .att-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .att-hero-stats { width: 100%; }
  .att-hero-progress { width: 100%; text-align: start; }
  .att-hero-actions { justify-content: center; }
  .att-row { grid-template-columns: minmax(0px, 1fr) auto; }
  .att-mark { justify-content: flex-end; }
  .att-side { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .att-date-nav { flex-wrap: wrap; }
  .att-date-nav .select { order: -1; width: 100%; flex-basis: 100%; }
  .att-toolbar-second { align-items: flex-start; flex-direction: column; }
  .att-bulk-actions { width: 100%; }
  .att-group-row { grid-template-columns: 58px minmax(50px, 1fr) 36px; }
  .att-group-row .tiny { display: none; }
  .att-follow-hero-actions { margin-inline-start: 0px; width: 100%; }
  .att-follow-row { flex-wrap: wrap; }
  .att-follow-actions { width: 100%; justify-content: flex-end; }
}
@media (max-width: 520px) {
  .att-hero-stats { grid-template-columns: 1fr 1fr; }
  .att-status-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .att-row { grid-template-columns: 1fr; gap: 7px; }
  .att-mark { justify-content: space-between; }
  .att-side { grid-column: auto; }
  .att-reason-saved { display: none; }
  .att-date-meta { font-size: 9.5px; gap: 8px; }
  .att-list { padding: 4px; }
}

/* ==================== V3: students, profiles, archive, weekly verse ==================== */

.students-hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
  padding: 22px 24px;
  border-radius: 24px;
  background:
    radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 55%),
    linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #f4efe3;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.students-hero::after {
  content: "✝";
  position: absolute;
  inset-inline-end: 18px;
  bottom: -46px;
  font-size: 170px;
  opacity: .06;
  font-family: var(--font-display);
  pointer-events: none;
}
.students-hero-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.35;
  margin: 8px 0 6px;
}
.students-hero-copy p { color: #c9c3b5; font-size: 13px; line-height: 1.85; margin: 0; max-width: 62ch; }
.students-hero-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: var(--gold-2);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .2px;
}
.students-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.students-hero-tags span {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  font-size: 11.5px;
  color: #e8dfc8;
}
.students-hero-side {
  display: flex; flex-direction: column; gap: 12px;
  align-items: stretch; justify-content: center;
}
.sh-side-num {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.08);
}
.sh-side-num b { font-family: var(--font-display); font-size: 28px; line-height: 1; color: var(--gold-2); }
.sh-side-num span { font-size: 11.5px; color: #c9c3b5; }
.sh-side-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.students-hero .btn-ghost { color: #e8dfc8; border-color: rgba(255,255,255,.18); }
.students-hero .btn-ghost:hover { background: rgba(255,255,255,.08); }
.students-hero .tiny { color: #a8a296; }

.students-toolbar { display: flex; flex-direction: column; gap: 10px; }

.student-card-rich { display: flex; flex-direction: column; gap: 10px; padding: 16px; text-decoration: none; color: var(--ink); }
.student-card-rich:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.sc-top { display: flex; align-items: center; gap: 10px; }
.sc-identity { flex: 1; min-width: 0; }
.sc-identity .student-name { font-weight: 700; font-size: 14px; line-height: 1.3; }
.sc-identity .student-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sc-points {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--amber);
  font-weight: 700;
  font-size: 12px;
  white-space: nowrap;
}
.sc-points small { font-size: 9.5px; font-weight: 500; }
.sc-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.sc-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sc-chip-patron { background: var(--gold-soft); color: var(--amber); }
.sc-chip-talent { background: var(--teal-soft); color: var(--teal); }
.sc-chip-muted { background: var(--surface-2); color: var(--muted); }
.sc-rate { display: flex; flex-direction: column; gap: 4px; }
.sc-rate-head { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); }
.sc-rate-head b { color: var(--ink); font-size: 12.5px; }
.sc-bday { background: var(--rose-soft); color: var(--rose); border-radius: 10px; padding: 4px 6px; }
.sc-bday b { font-size: 13px; }

.student-profile-hero {
  position: relative;
  border-radius: 26px;
  padding: 22px 24px;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: #f4efe3;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.sph-bg { position: absolute; inset: 0; background: radial-gradient(90% 90% at 100% 0%, color-mix(in srgb, var(--gold) 22%, transparent), transparent 60%); pointer-events: none; }
.sph-top { position: relative; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sph-identity { flex: 1; min-width: 220px; }
.sph-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; color: var(--gold-2); font-weight: 700;
  padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 16%, transparent);
}
.sph-identity h2 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 34px); margin: 8px 0 4px; line-height: 1.2; }
.sph-identity p { color: #c9c3b5; font-size: 13px; margin: 0; }
.sph-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sph-chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600;
  background: rgba(255,255,255,.09); color: #e8dfc8;
}
.sph-chip.gold { background: color-mix(in srgb, var(--gold) 26%, transparent); color: var(--gold-2); }
.sph-chip.blue { background: color-mix(in srgb, var(--blue) 30%, transparent); color: #a9c7e6; }
.sph-chip.teal { background: color-mix(in srgb, var(--teal) 30%, transparent); color: #9fd4cd; }
.sph-chip.wine { background: color-mix(in srgb, var(--wine) 35%, transparent); color: #e6a9b1; }
.sph-chip.muted { background: rgba(255,255,255,.06); color: #a8a296; }
.sph-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.sph-actions .btn-ghost { color: #e8dfc8; border-color: rgba(255,255,255,.18); }
.sph-actions .btn-ghost:hover { background: rgba(255,255,255,.08); }
.sph-metrics {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.10);
}
.sph-metrics > div { display: flex; flex-direction: column; gap: 2px; }
.sph-metrics b { font-family: var(--font-display); font-size: 18px; color: var(--gold-2); line-height: 1.1; }
.sph-metrics span { font-size: 10.5px; color: #a8a296; }
.sph-progress { position: relative; margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.sph-progress .tiny { color: #a8a296; }

.patron-show { display: flex; gap: 12px; align-items: flex-start; }
.patron-mark {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--gold-soft); color: var(--gold);
  flex-shrink: 0;
}
.patron-show b { font-size: 15px; color: var(--ink); }
.talent-show { display: flex; flex-direction: column; gap: 6px; }
.talent-headline { font-weight: 700; font-size: 14px; color: var(--ink); }
.talent-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

.archive-hero {
  border-radius: 22px;
  padding: 20px 22px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--wine) 12%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--wine) 22%, var(--line));
  margin-bottom: 14px;
}
.archive-hero-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.archive-hero-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--wine-soft); color: var(--wine);
  flex-shrink: 0;
}
.archive-hero-main h2 { margin: 0; font-family: var(--font-display); font-size: 20px; }
.archive-hero-main p { margin: 4px 0 0; font-size: 12.5px; color: var(--muted); max-width: 60ch; }
.archive-hero-stats { margin-inline-start: auto; display: flex; gap: 16px; }
.archive-hero-stats div { display: flex; flex-direction: column; align-items: center; }
.archive-hero-stats b { font-family: var(--font-display); font-size: 20px; color: var(--wine); }
.archive-hero-stats span { font-size: 10.5px; color: var(--muted); }
.archive-reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.archive-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.archive-card { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.archive-card-top { display: flex; align-items: center; gap: 10px; }
.archive-reason {
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--wine-soft);
  border: 1px solid color-mix(in srgb, var(--wine) 18%, transparent);
  font-size: 12.5px;
}
.archive-reason span { display: inline-flex; align-items: center; gap: 5px; color: var(--wine); font-weight: 700; font-size: 11.5px; }
.archive-reason b { display: block; margin-top: 4px; color: var(--ink); }
.archive-reason p { margin: 6px 0 0; font-size: 12px; color: var(--muted); white-space: pre-line; }
.archive-meta { display: flex; gap: 12px; font-size: 11px; color: var(--muted); flex-wrap: wrap; }
.archive-meta span { display: inline-flex; align-items: center; gap: 4px; }
.archive-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.archive-detail { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); }
.archive-warning {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px;
  background: var(--amber-soft);
  color: var(--ink);
}
.archive-warning b { display: block; margin-bottom: 3px; }
.archive-warning p { margin: 0; font-size: 12.5px; color: var(--muted); }
.archive-modal .archive-warning { margin-bottom: 6px; }

.verse-bank {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  padding: 18px 20px;
  border-radius: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--teal) 8%, var(--surface)), var(--surface));
  border: 1px solid color-mix(in srgb, var(--teal) 22%, var(--line));
  margin: 14px 0;
}
.verse-bank-main { display: flex; gap: 12px; align-items: flex-start; }
.verse-bank-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--teal-soft); color: var(--teal);
  flex-shrink: 0;
}
.verse-bank-kicker { font-size: 11.5px; font-weight: 700; color: var(--teal); display: flex; align-items: center; gap: 5px; margin-bottom: 6px; }
.verse-bank-quote {
  font-family: var(--font-display);
  font-size: 16px; line-height: 1.8;
  color: var(--ink);
  margin: 0;
  padding: 0;
  border: 0;
}
.verse-bank-quote cite {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-style: normal;
  color: var(--muted);
  font-family: var(--font-body);
}
.verse-bank-actions { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.verse-bank-actions .select { width: 100%; }
.verse-bank-hint { margin-top: 8px; }

@media (max-width: 860px) {
  .students-hero, .verse-bank { grid-template-columns: 1fr; }
  .sph-top { flex-direction: column; align-items: flex-start; }
  .archive-hero-stats { margin-inline-start: 0; }
}
