:root {
  --bg: #090d1c;
  --bg-soft: #0f1428;
  --panel: rgba(18, 24, 48, .84);
  --panel-strong: #151c39;
  --panel-hover: #1a2345;
  --line: rgba(154, 164, 211, .18);
  --muted: #8c94b7;
  --muted-2: #687194;
  --text: #f3f1ec;
  --gold: #eab958;
  --gold-bright: #ffd777;
  --gold-soft: rgba(234, 185, 88, .14);
  --purple: #8d82ff;
  --green: #5ad39c;
  --red: #f0839b;
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
  --radius: 18px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--text); background: radial-gradient(circle at 78% 0%, rgba(87, 61, 159, .2), transparent 34rem), radial-gradient(circle at 6% 90%, rgba(34, 78, 117, .12), transparent 30rem), var(--bg); font-family: var(--font); min-height: 100vh; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
.app-shell { min-height: 100vh; display: flex; }
.sidebar { width: 248px; flex: 0 0 248px; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(13, 18, 39, .96), rgba(8, 12, 25, .9)); padding: 28px 16px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.brand-lockup { display: flex; align-items: center; gap: 12px; padding: 0 13px 32px; }
.brand-lockup strong { display: block; font-family: var(--display); font-size: 18px; letter-spacing: .01em; }
.brand-lockup small { display: block; color: var(--muted); margin-top: 3px; font-size: 10px; letter-spacing: .07em; }
.brand-mark { width: 34px; height: 34px; position: relative; }
.brand-mark span { position: absolute; width: 20px; height: 20px; border: 2px solid var(--gold); border-radius: 50%; transform: rotate(45deg); top: 7px; }
.brand-mark span:first-child { left: 2px; }
.brand-mark span:last-child { right: 2px; opacity: .72; }
.main-nav { display: grid; gap: 7px; }
.nav-item { border: 0; background: transparent; color: var(--muted); border-radius: 12px; padding: 12px 13px; display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer; transition: .2s ease; font-size: 13px; }
.nav-item:hover { color: var(--text); background: rgba(255,255,255,.05); }
.nav-item.active { color: var(--text); background: linear-gradient(100deg, rgba(234,185,88,.18), rgba(141,130,255,.1)); box-shadow: inset 3px 0 var(--gold); }
.nav-icon { width: 22px; text-align: center; color: var(--muted-2); font-size: 18px; }
.nav-item.active .nav-icon { color: var(--gold-bright); }
.sidebar-quote { margin: auto 12px 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: 9px; letter-spacing: .23em; line-height: 1.9; text-align: center; }
.sidebar-quote strong { display: block; color: #c2c8df; font-weight: 600; }
.sidebar-quote i { display: block; height: 3px; width: 3px; background: var(--gold); margin: 8px auto 0; transform: rotate(45deg); }
.sidebar-foot { color: var(--muted-2); font-size: 11px; padding: 0 13px; display: flex; align-items: center; gap: 7px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(90,211,156,.1); }
.main-content { min-width: 0; flex: 1; }
.topbar { min-height: 76px; display: flex; justify-content: space-between; align-items: center; padding: 20px clamp(20px, 4vw, 52px); border-bottom: 1px solid rgba(154,164,211,.1); }
.breadcrumb { color: var(--muted); font-size: 12px; display: flex; align-items: center; gap: 10px; }
.breadcrumb b { color: var(--muted-2); font-weight: 400; }
.breadcrumb strong { color: var(--text); font-weight: 500; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.icon-button, .avatar, .mobile-menu { border: 1px solid var(--line); background: rgba(255,255,255,.04); cursor: pointer; }
.icon-button { width: 34px; height: 34px; border-radius: 10px; color: var(--gold-bright); font-size: 22px; line-height: 1; }
.icon-button:hover { background: var(--gold-soft); border-color: rgba(234,185,88,.45); }
.avatar { width: 34px; height: 34px; border-radius: 50%; color: #1e1736; background: linear-gradient(145deg, var(--gold-bright), var(--gold)); font-weight: 700; font-size: 11px; }
.mobile-menu { display: none; border-radius: 9px; font-size: 18px; padding: 5px 9px; }
.view-container { max-width: 1460px; padding: 38px clamp(20px, 4vw, 52px) 70px; margin: 0 auto; }
.view-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.view-heading h1 { margin: 0; font-family: var(--display); font-size: clamp(30px, 4vw, 47px); font-weight: 500; letter-spacing: -.03em; }
.view-heading p { color: var(--muted); margin: 8px 0 0; font-size: 13px; }
.eyebrow { color: var(--gold); text-transform: uppercase; font-size: 10px; letter-spacing: .21em; font-weight: 700; margin-bottom: 10px; }
.button { border: 1px solid transparent; border-radius: 11px; padding: 11px 16px; cursor: pointer; font-size: 12px; font-weight: 700; transition: .2s ease; display: inline-flex; gap: 8px; align-items: center; justify-content: center; }
.button-primary { color: #171426; background: linear-gradient(135deg, var(--gold-bright), var(--gold)); box-shadow: 0 10px 26px rgba(234,185,88,.16); }
.button-primary:hover { transform: translateY(-1px); box-shadow: 0 13px 30px rgba(234,185,88,.26); }
.button-ghost { color: var(--gold-bright); background: transparent; border-color: rgba(234,185,88,.45); }
.button-ghost:hover { background: var(--gold-soft); }
.button-muted { color: var(--muted); background: rgba(255,255,255,.04); border-color: var(--line); }
.button-danger { color: var(--red); background: rgba(240,131,155,.08); border-color: rgba(240,131,155,.25); }
.card { background: linear-gradient(145deg, rgba(26, 32, 65, .86), rgba(12, 17, 37, .84)); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, .72fr); gap: 18px; }
.progress-card { padding: clamp(24px, 4vw, 38px); position: relative; overflow: hidden; background: radial-gradient(circle at 85% 18%, rgba(147, 100, 213, .2), transparent 23rem), linear-gradient(135deg, rgba(28, 33, 70, .95), rgba(10, 16, 35, .95)); }
.progress-card::after { content: ""; position: absolute; width: 190px; height: 190px; right: -70px; bottom: -100px; border: 1px solid rgba(234,185,88,.2); transform: rotate(45deg); box-shadow: 0 0 0 20px rgba(234,185,88,.03), 0 0 0 40px rgba(234,185,88,.02); }
.progress-top { display: flex; justify-content: space-between; align-items: start; gap: 20px; position: relative; z-index: 1; }
.balance-label { color: var(--muted); font-size: 12px; }
.balance-value { color: var(--gold-bright); font-family: var(--display); font-size: clamp(42px, 6vw, 70px); line-height: 1; letter-spacing: -.05em; margin: 8px 0 8px; }
.target-value { color: var(--muted); font-size: 13px; }
.target-value strong { color: var(--text); font-weight: 500; }
.percent-box { text-align: right; }
.percent-value { font-family: var(--display); font-size: 28px; color: var(--gold-bright); }
.percent-label { color: var(--muted); font-size: 11px; display: block; margin-top: 3px; }
.progress-track { height: 15px; margin: 35px 0 12px; border: 1px solid rgba(210,215,240,.26); background: #0b1022; border-radius: 999px; position: relative; box-shadow: inset 0 2px 5px rgba(0,0,0,.35); }
.progress-fill { height: 100%; min-width: 10px; border-radius: inherit; background: linear-gradient(90deg, #c89c3d, var(--gold-bright)); box-shadow: 0 0 18px rgba(234,185,88,.65); transition: width .6s cubic-bezier(.2,.8,.2,1); position: relative; }
.progress-fill::after { content: ""; width: 7px; height: 7px; background: #fff1bf; border-radius: 50%; position: absolute; right: -2px; top: 3px; box-shadow: 0 0 10px 4px rgba(255,215,119,.55); }
.progress-caption { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 11px; }
.progress-caption span:last-child { color: var(--muted); }
.next-card { padding: 27px; display: flex; flex-direction: column; justify-content: space-between; min-height: 255px; }
.next-card-header { display: flex; justify-content: space-between; align-items: start; }
.flag-icon { color: var(--gold-bright); font-size: 27px; }
.next-card .eyebrow { margin: 0 0 7px; color: var(--muted); letter-spacing: .13em; }
.next-card h2 { margin: 0; font-family: var(--display); font-size: 29px; font-weight: 500; }
.next-card p { margin: 20px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.next-card p strong { color: var(--gold-bright); font-weight: 600; }
.mini-callout { display: flex; gap: 10px; align-items: center; margin-top: auto; padding: 10px 12px; border: 1px solid rgba(234,185,88,.4); color: #e7ca89; border-radius: 10px; font-size: 11px; line-height: 1.35; }
.mini-callout span { color: var(--gold-bright); font-size: 19px; }
.section { margin-top: 28px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 13px; }
.section-head h2 { margin: 0; font-family: var(--display); font-size: 23px; font-weight: 500; }
.section-head a { color: var(--purple); font-size: 11px; cursor: pointer; }
.milestone-card { padding: 28px 26px 20px; overflow-x: auto; }
.milestones { min-width: 650px; display: flex; align-items: start; position: relative; justify-content: space-between; }
.milestones::before { content: ""; left: 5%; right: 5%; height: 1px; top: 20px; background: linear-gradient(90deg, var(--gold), rgba(149,159,202,.3)); position: absolute; }
.milestone { position: relative; z-index: 1; text-align: center; width: 13%; color: var(--muted-2); }
.milestone-dot { margin: 0 auto 10px; width: 42px; height: 42px; border: 1px solid rgba(154,164,211,.35); background: #111832; border-radius: 50%; display: grid; place-items: center; font-size: 15px; color: var(--muted-2); }
.milestone.reached .milestone-dot { background: linear-gradient(145deg, var(--gold-bright), #bf8d28); color: #2a2040; border-color: var(--gold-bright); box-shadow: 0 0 22px rgba(234,185,88,.3); }
.milestone.current .milestone-dot { border-color: var(--gold); color: var(--gold-bright); box-shadow: 0 0 0 5px rgba(234,185,88,.1); }
.milestone.current { color: var(--gold-bright); }
.milestone.reached { color: var(--text); }
.milestone b { display: block; font-size: 11px; font-weight: 500; white-space: nowrap; }
.milestone small { display: block; margin-top: 4px; font-size: 9px; color: var(--muted-2); }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-card { padding: 17px 18px; }
.stat-card small { color: var(--muted); font-size: 11px; }
.stat-card strong { display: block; margin-top: 8px; font-family: var(--display); font-size: 25px; color: var(--text); }
.stat-card .stat-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; color: var(--muted-2); font-size: 10px; }
.stat-up { color: var(--green); }
.sources-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.source-card { padding: 18px; min-height: 194px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.source-card::before { content: ""; position: absolute; width: 88px; height: 88px; right: -25px; top: -25px; border: 1px solid rgba(234,185,88,.15); transform: rotate(45deg); }
.source-top { display: flex; justify-content: space-between; align-items: start; }
.source-symbol { width: 43px; height: 43px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; color: var(--gold-bright); background: rgba(234,185,88,.11); border: 1px solid rgba(234,185,88,.24); }
.source-menu { border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 20px; }
.source-card h3 { font-family: var(--display); font-size: 19px; margin: 15px 0 4px; font-weight: 500; }
.source-card .source-total { color: var(--gold-bright); font-size: 12px; }
.source-card .source-meta { margin-top: auto; color: var(--muted-2); font-size: 10px; }
.source-card .button { margin-top: 13px; width: 100%; }
.add-source { border: 1px dashed rgba(234,185,88,.35); background: rgba(234,185,88,.04); display: grid; place-items: center; min-height: 194px; color: var(--gold-bright); cursor: pointer; }
.add-source:hover { background: var(--gold-soft); }
.add-source strong { display: block; font-family: var(--display); font-weight: 500; margin-top: 7px; }
.add-source span { display: block; font-size: 28px; text-align: center; }
.bottom-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr); gap: 18px; }
.panel-card { padding: 22px; }
.activity-list { display: grid; gap: 0; }
.activity-item { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid rgba(154,164,211,.1); }
.activity-item:last-child { border-bottom: 0; padding-bottom: 0; }
.activity-icon { flex: 0 0 34px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--gold-bright); background: var(--gold-soft); }
.activity-main { min-width: 0; flex: 1; }
.activity-main strong { font-size: 12px; display: block; font-weight: 600; }
.activity-main small { display: block; color: var(--muted-2); font-size: 10px; margin-top: 3px; }
.activity-value { color: var(--green); font-size: 12px; font-weight: 700; }
.level-card { padding: 22px; position: relative; overflow: hidden; background: radial-gradient(circle at 90% 10%, rgba(141,130,255,.28), transparent 17rem), linear-gradient(135deg, #1b2148, #11162e); }
.level-card .level-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.level-number { width: 57px; height: 57px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--gold); color: var(--gold-bright); background: rgba(234,185,88,.1); font-family: var(--display); font-size: 23px; box-shadow: 0 0 25px rgba(234,185,88,.16); }
.level-name { font-family: var(--display); font-size: 23px; }
.level-card p { color: var(--muted); font-size: 11px; line-height: 1.5; margin: 15px 0 11px; }
.xp-track { height: 7px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.xp-fill { height: 100%; background: linear-gradient(90deg, var(--purple), var(--gold-bright)); border-radius: inherit; transition: width .5s ease; }
.xp-row { display: flex; justify-content: space-between; color: var(--muted-2); font-size: 10px; margin-top: 7px; }
.view-panel { padding: 28px; }
.view-panel h2 { font-family: var(--display); font-size: 28px; font-weight: 500; margin: 0 0 5px; }
.view-panel > p { color: var(--muted); font-size: 13px; margin: 0 0 22px; }
.table-list { display: grid; gap: 8px; }
.table-row { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 12px; padding: 13px 15px; }
.table-row .row-grow { flex: 1; min-width: 0; }
.table-row strong { display: block; font-size: 12px; }
.table-row small { display: block; color: var(--muted-2); font-size: 10px; margin-top: 4px; }
.table-row .row-value { color: var(--gold-bright); font-weight: 700; font-size: 12px; }
.row-actions { display: flex; gap: 6px; }
.small-button { border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; padding: 7px 9px; border-radius: 8px; font-size: 11px; }
.small-button:hover { color: var(--text); background: rgba(255,255,255,.06); }
.empty-state { text-align: center; padding: 46px 20px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); }
.empty-state .empty-symbol { font-size: 32px; color: var(--gold); }
.empty-state h3 { color: var(--text); font-family: var(--display); font-weight: 500; font-size: 21px; margin: 14px 0 6px; }
.empty-state p { margin: 0 auto 17px; max-width: 370px; font-size: 12px; line-height: 1.6; }
.achievement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.achievement { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); min-height: 146px; }
.achievement.locked { opacity: .52; filter: saturate(.5); }
.achievement-badge { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-bright); background: var(--gold-soft); border: 1px solid rgba(234,185,88,.3); font-size: 19px; }
.achievement strong { display: block; font-family: var(--display); margin-top: 13px; font-size: 17px; font-weight: 500; }
.achievement small { color: var(--muted-2); font-size: 10px; line-height: 1.4; display: block; margin-top: 4px; }
.settings-grid { display: grid; gap: 11px; max-width: 650px; }
.setting-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px solid var(--line); background: rgba(255,255,255,.025); border-radius: 12px; padding: 16px; }
.setting-row strong { display: block; font-size: 12px; }
.setting-row small { color: var(--muted); display: block; margin-top: 4px; font-size: 10px; }
.switch { width: 37px; height: 21px; border-radius: 99px; background: var(--gold); position: relative; cursor: pointer; border: 0; }
.switch::after { content: ""; position: absolute; width: 15px; height: 15px; right: 3px; top: 3px; border-radius: 50%; background: #fff; }
.modal-backdrop { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(4, 7, 17, .76); backdrop-filter: blur(8px); }
.modal-backdrop[hidden] { display: none; }
.modal { width: min(100%, 470px); max-height: min(90vh, 720px); overflow-y: auto; border: 1px solid rgba(234,185,88,.3); border-radius: 20px; background: linear-gradient(145deg, #20274d, #0e1329); box-shadow: 0 30px 100px rgba(0,0,0,.6); padding: 28px; position: relative; }
.modal-close { position: absolute; right: 15px; top: 13px; border: 0; background: transparent; color: var(--muted); font-size: 25px; cursor: pointer; }
.modal h2 { font-family: var(--display); font-size: 29px; font-weight: 500; margin: 0 0 6px; }
.modal p { color: var(--muted); font-size: 12px; line-height: 1.55; margin: 0 0 20px; }
.form-grid { display: grid; gap: 14px; }
.form-field label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 7px; }
.form-field input, .form-field select { width: 100%; color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; background: rgba(8, 12, 27, .75); }
.form-field input::placeholder { color: var(--muted-2); }
.form-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 21px; }
.confirm-value { text-align: center; padding: 17px; border: 1px solid rgba(234,185,88,.33); background: rgba(234,185,88,.08); border-radius: 13px; margin: 17px 0; }
.confirm-value strong { display: block; color: var(--gold-bright); font-family: var(--display); font-size: 34px; margin-top: 4px; }
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 30; display: grid; gap: 10px; max-width: min(370px, calc(100vw - 40px)); }
.toast { border: 1px solid rgba(234,185,88,.35); border-left: 3px solid var(--gold); background: #171d3a; box-shadow: var(--shadow); border-radius: 12px; padding: 13px 15px; animation: toastIn .25s ease; }
.toast strong { display: block; font-size: 12px; color: var(--gold-bright); }
.toast span { display: block; color: var(--muted); font-size: 11px; margin-top: 3px; line-height: 1.4; }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (max-width: 1050px) { .sidebar { width: 210px; flex-basis: 210px; } .hero-grid, .bottom-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .app-shell { display: block; } .sidebar { position: fixed; z-index: 15; left: 0; top: 0; transform: translateX(-102%); transition: transform .25s ease; width: min(290px, 84vw); box-shadow: 20px 0 60px rgba(0,0,0,.45); } .sidebar.open { transform: translateX(0); } .mobile-menu { display: block; } .topbar { gap: 12px; padding: 16px 18px; } .breadcrumb { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .view-container { padding: 28px 16px 50px; } .view-heading { align-items: start; flex-direction: column; } .view-heading .button { width: 100%; } .progress-top { flex-direction: column; } .percent-box { text-align: left; } .progress-track { margin-top: 22px; } .stats-row { grid-template-columns: 1fr; } .sources-grid, .achievement-grid { grid-template-columns: 1fr; } .source-card, .add-source { min-height: 160px; } .bottom-grid { gap: 14px; } .panel-card, .view-panel { padding: 19px; } .setting-row { align-items: start; flex-direction: column; } }
