:root {
  color-scheme: light;
  --ink: #12252f; --sub: #54646e; --line: #cfdae1; --bg: #f8fafb; --panel: #edf3f5;
  --accent: #22618e; --accent-ink: #ffffff;
  --acc2: #71ebdf; --a1: #eaf4fb; --a2: #d3e7f5; --a3: #a8cbe4; --a6: #1a4c70; --a7: #17415f;
  --g1: #e6fbf8; --g2: #dff5f2; --g7: #14615a;
  --n2: #e8eef2; --n3: #cfdae1; --n6: #6f818c; --n7: #54646e;
  --fh: 'Caprasimo', system-ui; --fb: 'Figtree', system-ui;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--fb), -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  background:
    radial-gradient(820px 440px at 100% -60px, #fbdcef 0%, rgba(251,220,239,0) 72%),
    radial-gradient(820px 440px at 0% -60px, #d4f2ee 0%, rgba(212,242,238,0) 72%),
    var(--bg);
  background-attachment: fixed;
  color: var(--ink);
}

.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar { background: var(--panel); padding: 26px 18px; display: flex; flex-direction: column; gap: 26px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; justify-content: center; padding: 0 8px; text-decoration: none; color: inherit; }
.brand img.logo { display: block; width: 130px; height: auto; }
.brand img.logo-compact { display: none; }

.sidebar-topbar { display: contents; }
.sidebar-body { display: contents; }
.sidebar-toggle { display: none; }
.sidebar-backdrop { display: none; }

.nav { display: flex; flex-direction: column; gap: 5px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 11px 14px; border-radius: 999px;
  color: var(--n7); font-weight: 600; font-size: 14px; text-decoration: none; transition: background .12s ease;
}
.nav-item:hover { background: var(--a2); }
.nav-item.active { background: var(--accent); color: #fff; }
.nav-item svg { flex: none; }

.sign-out-link { font-size: 12.5px; color: var(--n6); text-decoration: none; display: inline-block; padding: 0 4px; }
.sign-out-link:hover { text-decoration: underline; }

.usage-card { margin-top: auto; background: #ffffff; border-radius: 20px; padding: 16px; }
.usage-bar { margin-top: 9px; height: 8px; background: var(--n3); border-radius: 999px; overflow: hidden; }
.usage-bar-fill { height: 100%; border-radius: 999px; background: var(--accent); }
.usage-label { margin-top: 8px; font-size: 12.5px; color: var(--n7); font-variant-numeric: tabular-nums; }
.usage-unlimited { font-size: 13px; font-weight: 700; color: var(--g7); line-height: 1.45; }

.main { padding: 32px 40px 60px; overflow: hidden; }
h1.appTitle { font-family: var(--fh); font-weight: 400; font-size: 28px; line-height: 1.1; margin: 0; }
.tagline { color: var(--sub); font-size: 14px; margin: 8px 0 0; }

@media print {
  .sidebar, .no-print { display: none !important; }
  .shell { display: block; }
  .main { padding: 0 !important; }
}

@media (max-width: 700px) {
  .shell { display: block; }
  .sidebar { position: sticky; top: 0; z-index: 60; height: auto; padding: 0; gap: 0; overflow: visible; }

  .sidebar-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 16px; background: var(--panel); border-bottom: 1px solid var(--line);
  }
  .brand { padding: 0; justify-content: flex-start; }
  .brand img.logo-full { display: none; }
  .brand img.logo-compact { display: block; height: 30px; width: auto; }

  .sidebar-toggle {
    display: flex; align-items: center; justify-content: center; flex: none; width: 38px; height: 38px;
    border-radius: 10px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; padding: 0;
  }
  .sidebar-toggle .icon-close { display: none; }
  .sidebar.open .sidebar-toggle .icon-menu { display: none; }
  .sidebar.open .sidebar-toggle .icon-close { display: block; }

  .sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(18,37,47,.42); z-index: 55; }
  .sidebar.open .sidebar-backdrop { display: block; }

  .sidebar-body {
    display: none; position: fixed; top: 57px; left: 0; right: 0; z-index: 56;
    background: var(--panel); padding: 18px 16px 22px; flex-direction: column; gap: 18px;
    max-height: calc(100vh - 57px); overflow-y: auto; border-bottom: 1px solid var(--line);
    box-shadow: 0 16px 30px rgba(18,37,47,.18);
  }
  .sidebar.open .sidebar-body { display: flex; }
  .usage-card { margin-top: 0; }

  .main { padding: 20px 16px 48px; }
  h1.appTitle { font-size: 23px; }
}
