:root {
  --navy: #0f1c2e;
  --navy-2: #16283f;
  --navy-3: #1c3352;
  --gold: #c9a96e;
  --gold-soft: #ddc48e;
  --gold-dark: #9b773d;
  --cream: #f5f0e8;
  --cream-2: #ece4d6;
  --white: #fff;
  --ink: #1c2430;
  --ink-soft: #4c5567;
  --muted: #827b70;
  --line: #e4dbc9;
  --ok: #4f7a5c;
  --ok-bg: #e9f1ea;
  --warn: #9c6729;
  --warn-bg: #f7ecd9;
  --danger: #9c4a3f;
  --danger-bg: #f6e6e2;
  --shadow: 0 1px 2px rgba(15, 28, 46, .04), 0 12px 32px -18px rgba(15, 28, 46, .3);
  --sidebar: 268px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font: 15px/1.55 "DM Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; color: var(--navy); font-family: "Cormorant Garamond", Georgia, serif; line-height: 1.08; }
h1 { font-size: 31px; }
h2 { font-size: 23px; }
h3 { font-size: 18px; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
table { width: 100%; border-collapse: collapse; }
::selection { background: rgba(201, 169, 110, .35); }

.shell { display: flex; min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex: 0 0 var(--sidebar);
  flex-direction: column;
  height: 100vh;
  color: var(--cream);
  background: radial-gradient(ellipse 560px 360px at 10% -5%, rgba(201, 169, 110, .12), transparent 60%), linear-gradient(180deg, var(--navy), #0b1521);
  border-right: 1px solid rgba(0, 0, 0, .3);
}
.sidebar-brand { display: block; padding: 29px 26px 23px; border-bottom: 1px solid rgba(201, 169, 110, .16); }
.sidebar-brand img { display: block; width: 170px; }
.sidebar-brand span { display: block; margin-top: 9px; color: rgba(245, 240, 232, .48); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; }
.sidebar-nav { display: flex; flex: 1; flex-direction: column; gap: 3px; padding: 22px 14px; }
.nav-label { padding: 14px 12px 7px; color: rgba(245, 240, 232, .34); font-size: 12px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 4px; color: rgba(245, 240, 232, .72); font-weight: 500; transition: .15s ease; }
.nav-item svg { width: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.nav-item:hover, .nav-item.active { color: var(--white); background: linear-gradient(90deg, rgba(201, 169, 110, .16), rgba(201, 169, 110, .03)); }
.nav-item.active::before { position: absolute; top: 8px; bottom: 8px; left: -14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--gold); content: ""; }
.sidebar-foot { display: flex; align-items: center; gap: 10px; padding: 18px 24px 25px; border-top: 1px solid rgba(201, 169, 110, .16); }
.sidebar-foot > span:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-foot strong, .sidebar-foot small { display: block; line-height: 1.25; }
.sidebar-foot strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot small { color: rgba(245, 240, 232, .45); font-size: 12px; }
.logout { padding: 4px 0; border: 0; color: rgba(245, 240, 232, .55); background: none; font-size: 13px; }
.logout:hover { color: var(--gold-soft); }
.avatar-mini, .avatar-tiny, .avatar-big { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; border-radius: 50%; color: var(--navy); font-family: "Cormorant Garamond", Georgia, serif; font-weight: 700; }
.avatar-mini { width: 32px; height: 32px; background: linear-gradient(135deg, var(--gold-soft), var(--gold-dark)); font-size: 14px; }
.avatar-tiny { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--cream-2); font-size: 13px; }
.avatar-big { width: 68px; height: 68px; background: linear-gradient(135deg, var(--gold-soft), var(--gold-dark)); font-size: 26px; }

.main { min-width: 0; flex: 1; }
.topbar { display: flex; position: sticky; z-index: 20; top: 0; align-items: center; justify-content: space-between; height: 84px; padding: 0 40px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .96); backdrop-filter: blur(12px); }
.topbar-title p { margin-top: 3px; color: var(--muted); font-size: 14px; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-date { color: var(--ink-soft); text-align: right; line-height: 1.35; }
.topbar-date strong, .topbar-date span { display: block; }
.topbar-date strong { color: var(--navy); font-size: 14px; }
.topbar-date span { font-size: 13px; }
.content { width: 100%; max-width: 1480px; padding: 34px 40px 64px; }
.content > * { animation: reveal .42s both; }
.content > *:nth-child(2) { animation-delay: .05s; }
.content > *:nth-child(3) { animation-delay: .1s; }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { padding: 7px 10px; border: 1px solid var(--line); border-radius: 4px; color: var(--navy); list-style: none; cursor: pointer; }
.mobile-menu nav { position: absolute; top: 45px; right: 0; display: grid; width: 190px; padding: 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--white); box-shadow: var(--shadow); }
.mobile-menu a, .mobile-menu button { padding: 9px; border: 0; background: none; color: var(--navy); text-align: left; }
.eyebrow, .field-label { color: var(--gold-dark); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.hairline { height: 1px; margin: 20px 0; background: var(--line); }

@keyframes reveal { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
@media (max-width: 1080px) {
  .sidebar { flex-basis: 224px; }
  .sidebar-brand img { width: 155px; }
  .content, .topbar { padding-right: 24px; padding-left: 24px; }
}
@media (max-width: 820px) {
  .sidebar { display: none; }
  .topbar { height: 72px; }
  .topbar-date, .topbar-right > .avatar-mini { display: none; }
  .mobile-menu { display: block; }
  .content { padding: 24px 18px 48px; }
  h1 { font-size: 27px; }
}
@media (max-width: 540px) {
  .topbar { padding: 0 16px; }
  .topbar-title p { max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
