:root {
  --black: #111111;
  --white: #ffffff;
  --gold: #c9a227;
  --gold-soft: #f2e6ad;
  --walnut: #6f4e37;
  --walnut-soft: #f2ebe6;
  --purple: #6f42c1;
  --navy: #163a70;
  --red: #c62828;
  --orange: #f57c00;
  --gray: #6b7280;
  --green: #2f855a;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --surface: #f7f5f1;
  --shadow: 0 16px 40px rgba(17,17,17,.08);
  --radius: 20px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, sans-serif; color: var(--ink); background: var(--surface); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 290px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: linear-gradient(165deg, #111, #27211c); color: white; padding: 26px 20px; display: flex; flex-direction: column; gap: 28px; z-index: 30; }
.brand-block { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: start; }
.brand-mark { width: 58px; height: 58px; border-radius: 18px; background: linear-gradient(145deg, #f5df79, var(--gold)); color: #111; display: grid; place-items: center; font: 700 34px/1 Oswald; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
.eyebrow { font-size: 11px; letter-spacing: .16em; font-weight: 800; color: var(--gold); text-transform: uppercase; }
.brand-block h1 { margin: 4px 0 4px; font: 700 22px/1.05 Oswald; text-transform: uppercase; letter-spacing: .02em; }
.brand-block p { margin: 0; font-size: 12px; line-height: 1.4; color: #d7d1ca; }
.nav-list { display: grid; gap: 7px; }
.nav-item { width: 100%; border: 0; background: transparent; color: #ddd; padding: 12px 14px; border-radius: 14px; display: flex; align-items: center; gap: 12px; text-align: left; font-weight: 700; }
.nav-item:hover, .nav-item.active { color: white; background: rgba(201,162,39,.16); box-shadow: inset 3px 0 0 var(--gold); }
.sidebar-note { margin-top: auto; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); border-radius: 16px; padding: 14px; display: grid; gap: 4px; font-size: 12px; color: #d8d8d8; }
.main-content { min-width: 0; padding: 0 28px 40px; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; background: rgba(247,245,241,.9); backdrop-filter: blur(14px); }
.topbar h2 { margin: 4px 0 0; font: 700 28px/1.1 Oswald; text-transform: uppercase; letter-spacing: .02em; color: var(--black); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-button { border: 1px solid var(--line); background: white; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); color: #111; font-weight: 800; }
.menu-button { display: none; }
.view { display: none; }
.view.active { display: block; }
.hero-grid { display: grid; grid-template-columns: 1.45fr .8fr; gap: 18px; }
.card { background: white; border: 1px solid rgba(17,17,17,.06); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card h3 { margin: 0; font: 700 20px/1.1 Oswald; text-transform: uppercase; color: var(--black); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.card-subtitle { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.hero-card { background: linear-gradient(135deg, #111 15%, #31271d 100%); color: white; overflow: hidden; position: relative; min-height: 240px; }
.hero-card::after { content: "M"; position: absolute; right: -10px; bottom: -55px; font: 700 220px/1 Oswald; color: rgba(201,162,39,.09); }
.hero-card h3 { color: white; font-size: 34px; max-width: 540px; }
.hero-card p { color: #ddd5cc; max-width: 550px; line-height: 1.6; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; position: relative; z-index: 1; }
.button { border: 0; border-radius: 13px; padding: 11px 15px; font-weight: 800; }
.button.primary { background: var(--gold); color: #111; }
.button.secondary { background: white; color: var(--black); border: 1px solid var(--line); }
.button.ghost { background: rgba(255,255,255,.1); color: white; border: 1px solid rgba(255,255,255,.15); }
.button.small { padding: 8px 11px; font-size: 12px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.stat-card { background: white; border-radius: 18px; padding: 17px; box-shadow: var(--shadow); border-left: 5px solid var(--gold); }
.stat-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; }
.stat-card strong { display: block; margin-top: 6px; font: 700 25px/1 Oswald; color: var(--black); }
.dashboard-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; margin-top: 18px; }
.span-7 { grid-column: span 7; }.span-5 { grid-column: span 5; }.span-6 { grid-column: span 6; }.span-12 { grid-column: span 12; }
.person-chip { display: inline-flex; align-items: center; gap: 7px; padding: 7px 10px; border-radius: 999px; background: #f4f4f4; font-size: 12px; font-weight: 800; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.list { display: grid; gap: 10px; }
.list-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.item-title { font-weight: 800; color: var(--black); }
.item-meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.checkbox { width: 21px; height: 21px; accent-color: var(--gold); }
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; background: var(--gold-soft); color: #6d5510; font-size: 11px; padding: 6px 9px; font-weight: 800; }
.quote-card { background: linear-gradient(135deg, #f4e9b4, #fff7d9); border: 0; }
.quote-card blockquote { margin: 14px 0 0; font: 600 22px/1.4 Oswald; color: #2a2418; }
.filters { display: flex; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-btn { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 8px 11px; font-size: 12px; font-weight: 800; }
.filter-btn.active { background: var(--black); color: white; }
.calendar-layout { display: grid; grid-template-columns: 1.6fr .8fr; gap: 18px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.calendar-day-name { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); padding: 5px; }
.calendar-cell { min-height: 102px; border: 1px solid var(--line); border-radius: 14px; padding: 9px; background: white; }
.calendar-cell.muted { opacity: .35; }
.calendar-date { font-weight: 800; font-size: 12px; }
.calendar-event { margin-top: 7px; border-radius: 8px; padding: 5px 6px; font-size: 10px; font-weight: 800; color: white; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.search-input, .field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; background: white; color: var(--ink); }
.field textarea { min-height: 110px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.field { display: grid; gap: 7px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 800; color: var(--ink); }
.brain-box { min-height: 190px !important; font-size: 16px; line-height: 1.6; }
.parse-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.parse-card { border: 1px solid var(--line); border-radius: 16px; padding: 14px; background: #fff; }
.parse-card h4 { margin: 0 0 8px; font: 700 16px/1.1 Oswald; text-transform: uppercase; }
.profile-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.profile-card { border-radius: 18px; padding: 16px; color: white; min-height: 150px; display: flex; flex-direction: column; justify-content: space-between; }
.profile-card h4 { margin: 0; font: 700 21px/1 Oswald; text-transform: uppercase; }
.profile-card p { margin: 5px 0 0; font-size: 12px; opacity: .86; }
.profile-icon { font-size: 30px; }
.empty-state { padding: 28px; border: 1px dashed #c9c9c9; border-radius: 16px; text-align: center; color: var(--muted); background: #fafafa; }
.modal { border: 0; padding: 0; border-radius: 22px; width: min(620px, calc(100vw - 28px)); box-shadow: 0 30px 80px rgba(0,0,0,.28); }
.modal::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(3px); }
.modal-card { padding: 22px; }
.modal-header { display: flex; align-items: start; justify-content: space-between; margin-bottom: 18px; }
.modal-header h3 { margin: 4px 0 0; font: 700 25px/1.1 Oswald; text-transform: uppercase; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 18px; }
.toast { position: fixed; right: 24px; bottom: 24px; background: #111; color: white; padding: 12px 16px; border-radius: 12px; font-weight: 700; opacity: 0; transform: translateY(12px); transition: .2s; pointer-events: none; z-index: 100; }
.toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 980px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -310px; transition: left .25s; width: 290px; }
  .sidebar.open { left: 0; }
  .menu-button { display: grid; }
  .main-content { padding: 0 18px 30px; }
  .hero-grid, .calendar-layout { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .span-7,.span-5,.span-6,.span-12 { grid-column: auto; }
  .profile-grid { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 640px) {
  .topbar h2 { font-size: 21px; }
  .topbar { min-height: 78px; }
  .hero-card h3 { font-size: 29px; }
  .stat-grid { grid-template-columns: 1fr; }
  .calendar-grid { gap: 4px; }
  .calendar-cell { min-height: 76px; padding: 6px; }
  .calendar-event { font-size: 8px; padding: 4px; }
  .form-grid, .parse-grid, .profile-grid { grid-template-columns: 1fr; }
  .section-toolbar { align-items: stretch; flex-direction: column; }
}
