:root {
  --navy: #090a0c;
  --navy-2: #2b2116;
  --ink: #f4ecd9;
  --muted: #b9ad96;
  --line: rgba(217, 197, 129, 0.22);
  --bg: #08090b;
  --panel: #131311;
  --teal: #d9bd72;
  --teal-dark: #f2d58b;
  --teal-soft: rgba(217, 189, 114, 0.12);
  --blue-soft: rgba(155, 131, 89, 0.14);
  --amber: #e0ae44;
  --amber-soft: rgba(224, 174, 68, 0.12);
  --red: #dd3948;
  --red-soft: rgba(221, 57, 72, 0.12);
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.34);
}

.auth-locked { overflow: hidden; }
.auth-locked .app-shell { display: none; }
.login-screen[hidden] { display: none; }
.login-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  background: #08090b;
}
.login-visual {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(30px, 4.5vw, 68px);
  background:
    radial-gradient(circle at 78% 42%, rgba(231, 194, 101, .18), transparent 20rem),
    radial-gradient(circle at 15% 82%, rgba(118, 91, 59, .16), transparent 24rem),
    linear-gradient(145deg, #070809, #13110d 64%, #08090b);
  border-right: 1px solid rgba(217, 197, 129, .18);
}
.login-visual::before {
  content: "⚙";
  position: absolute;
  right: -4rem;
  top: 50%;
  translate: 0 -50%;
  color: rgba(224, 190, 102, .055);
  font-size: min(44vw, 34rem);
  line-height: 1;
  transform: rotate(-12deg);
}
.login-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 1px 1px, rgba(244, 226, 175, .12) 1px, transparent 0);
  background-size: 34px 34px;
  mask-image: linear-gradient(135deg, black, transparent 70%);
}
.login-brand,.login-mobile-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 15px; }
.login-brand > span:last-child { display: flex; flex-direction: column; }
.login-brand strong,.login-mobile-brand strong { color: #efd892; letter-spacing: .1em; font-size: 13px; }
.login-brand small { color: #9f947f; font-size: 10px; margin-top: 3px; }
.login-story { position: relative; z-index: 1; margin: auto 0; max-width: 720px; padding: 50px 0; }
.login-kicker { display: inline-flex; color: #e4c574; border: 1px solid rgba(217, 189, 114, .26); background: rgba(217, 189, 114, .08); border-radius: 999px; padding: 7px 12px; font-size: 10px; font-weight: 850; letter-spacing: .17em; }
.login-story h1 { color: #f4ecd9; font-family: Georgia, "Times New Roman", serif; font-size: clamp(42px, 5.1vw, 76px); line-height: .98; letter-spacing: -.055em; margin: 28px 0 24px; max-width: 820px; }
.login-story h1 em { color: #e0bd66; font-style: normal; }
.login-story > p { color: #b9ad96; max-width: 610px; font-size: clamp(15px, 1.35vw, 19px); }
.login-benefits { display: flex; flex-wrap: wrap; gap: 12px 22px; margin-top: 32px; color: #d9cfb8; font-size: 12px; }
.login-benefits span { display: flex; align-items: center; gap: 8px; }
.login-benefits i { display: grid; place-items: center; width: 21px; height: 21px; border-radius: 50%; color: #1c160a; background: linear-gradient(145deg,#f6e4a2,#b88b38); font-style: normal; font-weight: 900; }
.login-disclaimer { position: relative; z-index: 1; display: flex; align-items: center; gap: 9px; color: #8f8575; font-size: 11px; margin: 0; }
.login-disclaimer span { width: 8px; height: 8px; border-radius: 50%; background: #e3bf62; box-shadow: 0 0 0 4px rgba(227,191,98,.1),0 0 18px rgba(227,191,98,.45); }
.login-panel { display: grid; place-items: center; padding: clamp(24px, 5vw, 72px); background: radial-gradient(circle at 50% 10%, rgba(217,189,114,.06), transparent 22rem), #0b0c0d; }
.login-card { width: min(440px, 100%); }
.login-mobile-brand { display: none; margin-bottom: 34px; }
.login-card h2 { color: #f3dfaa; font-family: Georgia, "Times New Roman", serif; font-size: clamp(32px, 3.3vw, 45px); line-height: 1.05; margin: 8px 0 10px; }
.login-intro { color: #9f947f; margin: 0 0 30px; }
.login-form { display: grid; gap: 10px; }
.login-form > label,.login-label-row label { color: #c9baa0; font-size: 11px; font-weight: 750; }
.login-label-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.login-label-row button { border: 0; background: transparent; color: #dfc473; font-size: 11px; padding: 0; }
.login-input-wrap { display: flex; align-items: center; min-height: 52px; border: 1px solid rgba(217,197,129,.24); border-radius: 13px; background: #0f1010; transition: .2s; }
.login-input-wrap:focus-within { border-color: #caa958; box-shadow: 0 0 0 3px rgba(217,189,114,.1); }
.login-input-wrap > span { color: #8f826d; padding-left: 15px; }
.login-input-wrap input { flex: 1; min-width: 0; border: 0; box-shadow: none!important; background: transparent; padding: 13px 11px; color: #f4ecd9; }
.login-input-wrap input::placeholder { color: #665f55; }
.password-toggle { border: 0; background: transparent; color: #dfc473; padding: 10px 14px; font-size: 10px; font-weight: 800; }
.remember-me { display: flex!important; flex-direction: row!important; align-items: center; gap: 8px; margin: 4px 0 8px; color: #8f8575!important; font-weight: 500!important; }
.remember-me input { accent-color: #d4ae50; }
.login-error { color: #f29aa0; background: rgba(221,57,72,.08); border: 1px solid rgba(221,57,72,.2); border-radius: 10px; padding: 9px 11px; font-size: 11px; margin: 0; }
.login-submit { min-height: 52px; display: flex; align-items: center; justify-content: space-between; padding-inline: 18px; margin-top: 2px; }
.login-submit b { font-size: 20px; }
.demo-access,.create-account { min-height: 46px; border-radius: 11px; font-weight: 750; }
.demo-access { color: #ddc578; border: 1px solid rgba(217,197,129,.24); background: #11110f; }
.login-divider { display: flex; align-items: center; gap: 12px; color: #776f63; font-size: 10px; margin: 27px 0 15px; }
.login-divider::before,.login-divider::after { content: ""; height: 1px; flex: 1; background: rgba(217,197,129,.15); }
.create-account { width: 100%; color: #ead394; border: 1px solid rgba(217,197,129,.3); background: transparent; }
.login-safe { color: #6f695f; font-size: 9px; text-align: center; margin: 18px 0 0; }

@media (max-width: 900px) {
  .login-screen { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-panel { min-height: 100dvh; padding: 28px 20px; }
  .login-mobile-brand { display: flex; }
}

html {
  color-scheme: dark;
}

body {
  background:
    radial-gradient(circle at 78% 4%, rgba(217, 197, 129, 0.09), transparent 25rem),
    radial-gradient(circle at 12% 82%, rgba(118, 91, 59, 0.1), transparent 28rem),
    linear-gradient(145deg, #08090b 0%, #0d0d0d 45%, #090a0c 100%);
  color: var(--ink);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(244, 226, 175, 0.12) 1px, transparent 0);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 72%);
}

h1, h2, h3, h4,
.metric-card > strong,
.small-metric strong,
.plan-card > strong {
  font-family: Georgia, "Times New Roman", serif;
}

.eyebrow {
  color: #e4c574;
  letter-spacing: 0.17em;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), transparent 22%),
    linear-gradient(180deg, #08090b 0%, #11100e 58%, #090909 100%);
  border-right: 1px solid rgba(217, 197, 129, 0.18);
  box-shadow: 18px 0 50px rgba(0, 0, 0, 0.18);
}

.brand {
  border-bottom-color: rgba(217, 197, 129, 0.18);
}

.brand-mark {
  position: relative;
  overflow: visible;
  color: #1b1409;
  background:
    linear-gradient(145deg, #fff2b5 0%, #d7ad50 42%, #765b3b 100%);
  border: 1px solid #f5dfa4;
  box-shadow:
    0 0 0 5px rgba(217, 197, 129, 0.08),
    0 10px 28px rgba(0, 0, 0, 0.4),
    inset 0 1px rgba(255, 255, 255, 0.65);
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px dashed rgba(217, 197, 129, 0.42);
  border-radius: 50%;
  transform: rotate(12deg);
}

.brand-copy strong {
  color: #efd892;
  letter-spacing: 0.09em;
}

.brand-copy small,
.nav-item,
.demo-note {
  color: #a99c85;
}

.nav-item {
  border: 1px solid transparent;
}

.nav-item:hover,
.nav-item.active {
  color: #f8ebc7;
  background: linear-gradient(90deg, rgba(217, 189, 114, 0.16), rgba(217, 189, 114, 0.035));
  border-color: rgba(217, 189, 114, 0.18);
}

.nav-item.active {
  box-shadow: inset 3px 0 #e0bd66, 0 8px 22px rgba(0, 0, 0, 0.12);
}

.logout {
  color: #e57d82;
}

.demo-note {
  border-top-color: rgba(217, 197, 129, 0.16);
}

.demo-note span {
  background: #e3bf62;
  box-shadow: 0 0 0 4px rgba(227, 191, 98, 0.1), 0 0 18px rgba(227, 191, 98, 0.45);
}

.topbar {
  background: rgba(9, 10, 12, 0.88);
  border-bottom-color: rgba(217, 197, 129, 0.18);
  box-shadow: 0 8px 35px rgba(0, 0, 0, 0.22);
}

.topbar-title h1 {
  color: #f0dfb4;
}

.scenario-control select,
.panel-head select,
select,
textarea,
input {
  color: #f4ecd9;
  background: #0c0d0e;
  border-color: rgba(217, 197, 129, 0.26);
}

.icon-button {
  color: #e3c676;
  background: #11110f;
  border-color: rgba(217, 197, 129, 0.24);
}

.profile-button {
  color: #f4ecd9;
}

.avatar {
  color: #21180b;
  background: linear-gradient(145deg, #f6e4a2, #b88b38 68%, #765b3b);
  border: 1px solid #f1d886;
}

.mobile-demo-bar {
  border-bottom: 1px solid rgba(217, 197, 129, 0.2);
}

.hero-row {
  position: relative;
  overflow: hidden;
  min-height: 104px;
}

.hero-row::after {
  content: "⚙";
  position: absolute;
  right: 300px;
  top: -55px;
  z-index: -1;
  color: rgba(217, 189, 114, 0.055);
  font-size: 190px;
  line-height: 1;
  transform: rotate(-12deg);
}

.hero-row h2,
.section-heading h2 {
  color: #f3dfaa;
  text-shadow: 0 0 28px rgba(217, 189, 114, 0.08);
}

.hero-row p:not(.eyebrow),
.section-heading p,
.panel > p,
.referral-panel > p,
.metric-card > p,
.plan-card p,
.faq p,
.profile-intro p,
.rule-card p,
.institution-hero p {
  color: var(--muted);
}

.status-card,
.metric-card,
.small-metric,
.panel,
.plan-card,
.resource-card,
.rule-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.025), transparent 38%),
    linear-gradient(180deg, #151513 0%, #10100f 100%);
  border-color: rgba(217, 197, 129, 0.22);
  box-shadow:
    var(--shadow),
    inset 0 1px rgba(255, 255, 255, 0.025);
}

.status-card {
  position: relative;
  overflow: hidden;
}

.status-card::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #45c469, transparent);
}

.status-dot {
  background: #45c469;
  box-shadow: 0 0 0 5px rgba(69, 196, 105, 0.12), 0 0 18px rgba(69, 196, 105, 0.52);
}

.status-days {
  color: #70da89;
  background: rgba(69, 196, 105, 0.1);
  border: 1px solid rgba(69, 196, 105, 0.22);
}

.status-card.warning-state::after { background: linear-gradient(90deg, transparent, #e5bd42, transparent); }
.status-card.warning-state .status-dot { background: #e5bd42; box-shadow: 0 0 0 5px rgba(229, 189, 66, 0.12), 0 0 18px rgba(229, 189, 66, 0.42); }
.status-card.warning-state .status-days { color: #f0d166; background: rgba(229, 189, 66, 0.1); border-color: rgba(229, 189, 66, 0.22); }
.status-card.inactive-state::after { background: linear-gradient(90deg, transparent, #dad6ca, transparent); }
.status-card.inactive-state .status-dot { background: #dad6ca; box-shadow: 0 0 0 5px rgba(218, 214, 202, 0.1), 0 0 16px rgba(218, 214, 202, 0.28); }
.status-card.inactive-state .status-days { color: #e4dfd1; background: rgba(218, 214, 202, 0.09); border-color: rgba(218, 214, 202, 0.18); }
.status-card.frozen-state::after { background: linear-gradient(90deg, transparent, #cbc938, transparent); }
.status-card.frozen-state .status-dot { background: #cbc938; box-shadow: 0 0 0 5px rgba(203, 201, 56, 0.1), 0 0 18px rgba(203, 201, 56, 0.38); }
.status-card.frozen-state .status-days { color: #e0de62; background: rgba(203, 201, 56, 0.1); border-color: rgba(203, 201, 56, 0.2); }

.alert {
  color: #dceede;
  background:
    linear-gradient(90deg, rgba(69, 196, 105, 0.11), rgba(69, 196, 105, 0.035)),
    #11130f;
  border-color: rgba(69, 196, 105, 0.28);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025);
}

.alert p { color: #a9bbaa; }
.alert button { color: #d9c581; }
.alert-icon { background: #2f9f4e; box-shadow: 0 0 20px rgba(69, 196, 105, 0.25); }
.alert.warning-state { background: rgba(224, 174, 68, 0.09); border-color: rgba(224, 174, 68, 0.28); color: #f2dfae; }
.alert.warning-state p { color: #c4b58e; }
.alert.warning-state .alert-icon { background: #bd8420; }
.alert.inactive-state { background: rgba(218, 214, 202, 0.07); border-color: rgba(218, 214, 202, 0.22); color: #ece7da; }
.alert.inactive-state .alert-icon { color: #1b1b1b; background: #d7d3c8; }
.alert.frozen-state { background: rgba(203, 201, 56, 0.08); border-color: rgba(203, 201, 56, 0.24); color: #eeecad; }
.alert.frozen-state .alert-icon { color: #1b1b0d; background: #b8b52f; }

.metric-card,
.panel,
.plan-card,
.resource-card,
.rule-card {
  position: relative;
  overflow: hidden;
}

.metric-card::before,
.panel::before,
.plan-card::before,
.resource-card::before,
.rule-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 217, 143, 0.42), transparent);
  opacity: 0.58;
}

.metric-card > strong,
.small-metric strong,
.plan-card > strong {
  color: #f1d584;
}

.metric-head,
.small-metric span,
.small-metric small,
.autorenew-badge,
.transactions p small,
.tree-node small,
.binary-node small,
.setting-row small,
.requirement small,
.referral-stats span {
  color: #9f947f;
}

.button.primary {
  color: #1d1508;
  background: linear-gradient(135deg, #f5dda0 0%, #d6ad50 48%, #9b7130 100%);
  border: 1px solid #efd88f;
  box-shadow: 0 9px 24px rgba(188, 139, 45, 0.2), inset 0 1px rgba(255, 255, 255, 0.7);
}

.button.primary:hover {
  color: #100d08;
  background: linear-gradient(135deg, #fff0b7, #e3be67 54%, #a87931);
}

.button.secondary,
.button.light {
  color: #ead394;
  background: #11110f;
  border-color: rgba(217, 197, 129, 0.3);
}

.button.disabled {
  color: #756e61;
  background: #181817;
  border: 1px solid rgba(217, 197, 129, 0.1);
}

.text-button,
.alert button {
  color: #e2c779;
}

.pill.blue,
.pill.green,
.pill.neutral {
  color: #e8d18e;
  background: rgba(217, 189, 114, 0.1);
  border: 1px solid rgba(217, 189, 114, 0.18);
}

.pill.warning {
  color: #efc963;
  background: rgba(224, 174, 68, 0.1);
  border: 1px solid rgba(224, 174, 68, 0.2);
}

.progress {
  background: #24231f;
}

.progress span,
.progress.teal span {
  background: linear-gradient(90deg, #8c6427, #e2c069 55%, #f6e3a8);
  box-shadow: 0 0 12px rgba(217, 189, 114, 0.24);
}

.copy-field,
.activation-date,
.requirement,
.tabs {
  background: #0b0c0d;
  border-color: rgba(217, 197, 129, 0.18);
}

.copy-field button {
  color: #1b1409;
  background: linear-gradient(135deg, #eed58d, #b48433);
}

.referral-stats,
.referral-stats div,
.requirements,
.transactions > div,
.checklist > div,
.faq details,
.setting-row,
.profile-intro,
th,
td {
  border-color: rgba(217, 197, 129, 0.14);
}

.date-badge {
  color: #1b1408;
  background: linear-gradient(145deg, #f0d891, #9f722d);
  box-shadow: 0 0 22px rgba(217, 189, 114, 0.16);
}

.switch span { background: #3c3a34; }
.switch input:checked + span { background: linear-gradient(90deg, #9d752f, #d9bd72); }

.course-art,
.course-cover {
  color: #f8e8b5;
  background:
    radial-gradient(circle at 50% 50%, transparent 0 22%, rgba(217, 189, 114, 0.2) 23% 24%, transparent 25% 36%, rgba(217, 189, 114, 0.13) 37% 38%, transparent 39%),
    conic-gradient(from 12deg, #191510, #4a351b, #17130e, #9b7130, #191510, #5c421e, #191510);
  border: 1px solid rgba(240, 216, 145, 0.3);
  box-shadow: inset 0 0 55px rgba(0, 0, 0, 0.52), 0 16px 40px rgba(0, 0, 0, 0.28);
}

.transaction-icon {
  color: #e6ce89;
  background: rgba(217, 189, 114, 0.1);
  border: 1px solid rgba(217, 189, 114, 0.16);
}

.transaction-icon.cash { color: #d9c581; background: rgba(217, 197, 129, 0.08); }
.transaction-icon.reserve { color: #e3b44f; background: rgba(227, 180, 79, 0.08); }
.positive { color: #75d489 !important; }

.tabs button { color: #a69a83; }
.tabs button.active {
  color: #f0db9c;
  background: linear-gradient(180deg, #242019, #171512);
  border: 1px solid rgba(217, 197, 129, 0.2);
}

.career-step { color: #7f776a; }
.career-step > span { background: #25231e; }
.career-step.complete > span,
.career-step.current > span {
  color: #1b1408;
  background: linear-gradient(145deg, #f3da94, #a7762d);
}
.career-step.current { color: #e8cf89; }
.career-step.current > span { box-shadow: 0 0 0 7px rgba(217, 189, 114, 0.09), 0 0 20px rgba(217, 189, 114, 0.18); }
.career-line { background: #302d27; }
.career-line.complete { background: linear-gradient(90deg, #8c6427, #e2c069); }

.tree-node,
.binary-node {
  color: #f1e6cd;
  background: #0c0d0d;
  border-color: rgba(217, 197, 129, 0.22);
}
.tree-node > span {
  color: #e7cf8c;
  background: rgba(217, 189, 114, 0.1);
}
.tree-node.self { border-color: #d9bd72; box-shadow: 0 0 24px rgba(217, 189, 114, 0.1); }
.tree-node.self > span { color: #211708; background: linear-gradient(145deg, #f2db98, #a9772e); }
.tree-connect,
.tree-row::before { background: rgba(217, 197, 129, 0.34); }
.binary-node.root { color: #f1dc9f; background: rgba(217, 189, 114, 0.08); border-color: #d5b765; }

.plan-card.current {
  border-color: #d9bd72;
  box-shadow: 0 0 0 1px rgba(217, 189, 114, 0.2), 0 20px 55px rgba(0, 0, 0, 0.38), 0 0 35px rgba(217, 189, 114, 0.08);
}
.plan-level,
.resource-card span { color: #e1c473; }
.popular { color: #1d1508; background: linear-gradient(135deg, #f3dd9d, #b68335); }
.plan-card li { border-color: rgba(217, 197, 129, 0.12); }
.plan-card li::before { color: #e0bd66; }

.institution-hero {
  position: relative;
  background:
    radial-gradient(circle at 75% 40%, rgba(247, 220, 143, 0.22), transparent 24%),
    linear-gradient(120deg, #0a0b0c 0%, #211a11 55%, #0b0b0b 100%);
  border: 1px solid rgba(217, 197, 129, 0.3);
  box-shadow: var(--shadow), inset 0 1px rgba(255, 255, 255, 0.04);
}
.institution-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(100deg, transparent 62%, rgba(255, 235, 173, 0.05));
}
.institution-hero h3 { color: #f3dda1; }
.institution-mark { color: #f4d98e; }
.resource-icon,
.contact-icon {
  color: #e6c875;
  background: rgba(217, 189, 114, 0.09);
  border: 1px solid rgba(217, 189, 114, 0.17);
}

.contact-card {
  background: linear-gradient(180deg, #151513, #0e0f0f);
}

select:focus,
textarea:focus,
input:focus {
  border-color: #caa958;
  box-shadow: 0 0 0 3px rgba(217, 189, 114, 0.1);
}

.rule-card > span {
  color: #f0ca68;
  background: rgba(224, 174, 68, 0.1);
  border: 1px solid rgba(224, 174, 68, 0.2);
}

.legal-callout {
  color: #f0dfae;
  background: linear-gradient(90deg, rgba(224, 174, 68, 0.09), rgba(224, 174, 68, 0.025));
  border-color: rgba(224, 174, 68, 0.26);
}

.mobile-nav {
  background: rgba(10, 10, 10, 0.96);
  border-top-color: rgba(217, 197, 129, 0.2);
  box-shadow: 0 -12px 30px rgba(0, 0, 0, 0.28);
}
.mobile-nav button { color: #8e8574; }
.mobile-nav button.active { color: #e4c878; }

.toast {
  color: #1a1307;
  background: linear-gradient(135deg, #f0d991, #b98534);
  border: 1px solid #efd78c;
}

.modal-backdrop { background: rgba(0, 0, 0, 0.76); }
.modal {
  color: #f4ecd9;
  background: linear-gradient(145deg, #171612, #0e0f10);
  border: 1px solid rgba(217, 197, 129, 0.3);
}
.modal p { color: var(--muted); }
.modal-close { color: #b4a78e; }

@media (max-width: 820px) {
  .mobile-demo-bar {
    color: #d8b95e;
    background: #15130e;
  }
  .sidebar {
    box-shadow: 30px 0 70px rgba(0, 0, 0, 0.7);
  }
  .hero-row::after {
    right: -65px;
    top: -20px;
    font-size: 150px;
  }
}
