:root {
  --navy: #142a3a;
  --navy-2: #1c3a50;
  --blue: #2f6f91;
  --sky: #e9f4f8;
  --gold: #d89a3d;
  --cream: #fbfaf6;
  --ink: #19242c;
  --muted: #64727c;
  --line: #dfe6e9;
  --white: #ffffff;
  --green: #287a63;
  --shadow: 0 12px 30px rgba(20, 42, 58, .08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--cream); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 260px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 28px 20px 20px; display: flex; flex-direction: column; gap: 28px; color: var(--white); background: var(--navy); }
.brand { display: flex; gap: 12px; align-items: center; color: inherit; text-decoration: none; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; font-family: Georgia, serif; font-weight: 700; background: var(--gold); color: var(--navy); }
.brand strong, .brand small, .profile strong, .profile small { display: block; }
.brand strong { font-family: Georgia, serif; font-size: 22px; letter-spacing: .2px; }
.brand small, .profile small { color: #b9cad4; margin-top: 2px; }
nav { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 10px; color: #dce7ed; text-decoration: none; border: 0; background: transparent; cursor: pointer; text-align: left; }
.nav-link:hover, .nav-link.active { background: var(--navy-2); color: var(--white); }
.nav-icon { width: 22px; text-align: center; }
.sidebar-card { margin-top: auto; padding: 16px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: rgba(255,255,255,.05); }
.sidebar-card .eyebrow { color: #9fc1d3; }
.sidebar-card strong { display: block; margin: 7px 0 3px; }
.sidebar-card p { margin: 0; color: #b9cad4; font-size: 12px; }
.profile { display: flex; align-items: center; gap: 11px; border-top: 1px solid rgba(255,255,255,.12); padding-top: 18px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: var(--navy); background: #d9e9ef; font-weight: 700; }

main { min-width: 0; }
.topbar { height: 76px; padding: 0 34px; display: flex; align-items: center; gap: 20px; background: rgba(251,250,246,.92); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 5; }
.menu-button { display: none; border: 0; background: none; font-size: 24px; }
.search { width: min(610px, 55vw); display: flex; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.search input { width: 100%; border: 0; outline: 0; color: var(--ink); background: transparent; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.role-picker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.role-picker select { padding: 8px 28px 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink); }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); color: var(--gold); cursor: pointer; }

.content { padding: 38px 42px 56px; max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: .13em; font-size: 11px; font-weight: 800; color: var(--blue); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 6px 0 8px; font-family: Georgia, serif; font-size: clamp(30px, 4vw, 46px); line-height: 1.05; color: var(--navy); }
h2 { font-family: Georgia, serif; color: var(--navy); }
.subhead { color: var(--muted); max-width: 720px; line-height: 1.6; }
.primary-button, .secondary-button { border: 0; border-radius: 10px; padding: 11px 16px; font-weight: 700; cursor: pointer; }
.primary-button { background: var(--navy); color: var(--white); }
.secondary-button { background: var(--sky); color: var(--navy); }
.grid { display: grid; gap: 18px; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 26px; }
.stat, .card, .hero, .table-card { background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.stat { padding: 20px; }
.stat span { color: var(--muted); font-size: 13px; }
.stat strong { display: block; margin-top: 7px; font-family: Georgia, serif; font-size: 30px; color: var(--navy); }
.stat small { color: var(--green); }
.hero { padding: 30px; display: grid; grid-template-columns: 1.3fr .7fr; gap: 28px; align-items: center; margin-bottom: 26px; overflow: hidden; position: relative; }
.hero:after { content: ""; position: absolute; width: 260px; height: 260px; right: -70px; bottom: -120px; border-radius: 50%; background: var(--sky); }
.hero p { color: var(--muted); line-height: 1.6; }
.progress-ring { width: 160px; aspect-ratio: 1; margin: auto; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--gold) 0 68%, #edf1f2 68%); position: relative; z-index: 1; }
.progress-ring:before { content: ""; width: 124px; height: 124px; position: absolute; border-radius: 50%; background: var(--white); }
.progress-ring strong { position: relative; font-size: 30px; color: var(--navy); }
.two-column { grid-template-columns: 1.2fr .8fr; }
.card { padding: 22px; }
.card-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 15px; }
.card-head h2 { margin: 0; font-size: 21px; }
.link-button { border: 0; background: transparent; color: var(--blue); cursor: pointer; font-weight: 700; }
.list { display: grid; gap: 11px; }
.list-item { padding: 14px; display: flex; gap: 13px; align-items: center; border: 1px solid var(--line); border-radius: 12px; }
.item-icon { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: var(--sky); }
.item-copy { min-width: 0; flex: 1; }
.item-copy strong, .item-copy small { display: block; }
.item-copy small { margin-top: 3px; color: var(--muted); }
.pill { padding: 5px 9px; border-radius: 999px; background: #edf6f2; color: var(--green); font-size: 11px; font-weight: 800; white-space: nowrap; }
.favorite { border: 0; background: none; color: #aab3b8; cursor: pointer; font-size: 18px; }
.favorite.active { color: var(--gold); }
.catalog { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.catalog .card { display: flex; flex-direction: column; min-height: 235px; }
.catalog .card p { color: var(--muted); line-height: 1.5; }
.catalog .card .primary-button { margin-top: auto; align-self: start; }
.tag { display: inline-block; width: fit-content; padding: 5px 8px; border-radius: 7px; background: var(--sky); color: var(--blue); font-size: 11px; font-weight: 800; }
.table-card { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.empty { padding: 52px 20px; text-align: center; color: var(--muted); }
.toast { position: fixed; right: 24px; bottom: 24px; padding: 12px 16px; border-radius: 10px; color: var(--white); background: var(--navy); box-shadow: var(--shadow); transform: translateY(90px); opacity: 0; transition: .25s; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1050px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .catalog { grid-template-columns: repeat(2, 1fr); }
  .two-column { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -280px; z-index: 20; width: 260px; transition: left .25s; }
  .sidebar.open { left: 0; }
  .menu-button { display: block; }
  .topbar { padding: 0 16px; }
  .search { width: 100%; }
  .role-picker { display: none; }
  .content { padding: 28px 18px 46px; }
  .page-head, .hero { display: block; }
  .page-head .primary-button { margin-top: 16px; }
  .progress-ring { margin-top: 25px; }
  .catalog, .stats { grid-template-columns: 1fr; }
}
