/* ===========================================================
   VERSE shared stylesheet — design tokens + common components
   Linked from every page. Colors are defined as CSS variables
   so switching data-theme="dark" on <html> re-themes everything
   that references them, with no per-page color logic needed.
   =========================================================== */

:root{
  --bg:#FAF9F6;
  --card:#FFFFFF;
  --ink:#1F1D19;
  --ink-soft:#63615A;
  --line:#E5E2D9;

  --accent:#A6791C;
  --accent-soft:#FBF3E1;
  --accent-contrast:#FFFFFF;

  --teal:#0F6E56;
  --teal-soft:#E1F5EE;

  --amber:#854F0B;
  --amber-bg:#FAEEDA;

  --coral:#993C1D;
  --coral-bg:#FAECE7;

  --status-open:#639922;
  --status-busy:#EF9F27;
  --status-closed:#E24B4A;

  --chip-bg:#F3F1EA;

  --indigo-1:#171233;
  --indigo-2:#2C2560;
  --indigo-3:#4A3A8C;
  --gold:#C9971F;
}

[data-theme="dark"]{
  --bg:#121214;
  --card:#1B1B1E;
  --ink:#F5F3EE;
  --ink-soft:#A8A5A0;
  --line:#2C2C30;

  --accent:#D9A73C;
  --accent-soft:#2A2416;
  --accent-contrast:#171233;

  --teal:#5DCAA5;
  --teal-soft:#12261F;

  --amber:#FFB74D;
  --amber-bg:#3D2E12;

  --coral:#FF8B75;
  --coral-bg:#3A1E18;

  --status-open:#8BC34A;
  --status-busy:#FFB74D;
  --status-closed:#FF6B6B;

  --chip-bg:#26262A;
}

*{box-sizing:border-box;}
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:-apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
}
a{color:inherit;}

/* ---------- NAV ---------- */
nav{
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center;
  padding:14px 24px; border-bottom:1px solid var(--line); background:var(--card);
  position:sticky; top:0; z-index:100;
}
nav .nav-left{justify-self:start; display:flex; align-items:center;}
nav .nav-left a{
  color:var(--ink-soft); text-decoration:none; font-size:13px; font-weight:600;
}
nav .nav-center-logo{
  justify-self:center; font-weight:900; font-size:20px; letter-spacing:0.02em;
  color:var(--accent); text-decoration:none;
}
nav .nav-right{justify-self:end; display:flex; align-items:center; gap:16px;}
nav .nav-right a{color:var(--ink-soft); text-decoration:none; font-size:13.5px; font-weight:600;}
nav .nav-right a:hover{color:var(--accent);}
nav .nav-right a.active{color:var(--accent); font-weight:800;}
.nav-badge{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:16px; height:16px; padding:0 4px; margin-left:3px;
  background:var(--coral); color:#fff; font-size:10px; font-weight:800;
  border-radius:20px; vertical-align:middle;
}

.theme-toggle{
  width:38px; height:21px; border-radius:20px; background:var(--line); border:none;
  cursor:pointer; position:relative; padding:0; flex-shrink:0;
}
.theme-toggle::after{
  content:''; width:17px; height:17px; background:var(--accent); border-radius:50%;
  position:absolute; top:2px; left:2px; transition:left 0.15s ease;
}
[data-theme="dark"] .theme-toggle::after{left:19px;}

/* ---------- SHARED COMPONENTS ---------- */
.card{
  background:var(--card); border:1px solid var(--line); border-radius:14px; padding:22px;
}
h3.section-label{
  font-size:13.5px; margin:0 0 12px 0; text-transform:uppercase; letter-spacing:.03em; color:var(--ink-soft);
}

.btn-primary{
  background:var(--accent); color:var(--accent-contrast); border:none; padding:10px 18px;
  border-radius:8px; font-size:13.5px; font-weight:700; cursor:pointer; text-decoration:none;
  display:inline-block; text-align:center;
}
.btn-primary:hover{opacity:0.92;}
.btn-secondary{
  background:var(--chip-bg); color:var(--ink); border:none; padding:10px 18px;
  border-radius:8px; font-size:13.5px; font-weight:600; cursor:pointer; text-decoration:none;
  display:inline-block; text-align:center;
}

.status-dot{width:9px; height:9px; border-radius:50%; display:inline-block;}
.status-dot.open{background:var(--status-open);}
.status-dot.busy{background:var(--status-busy);}
.status-dot.closed{background:var(--status-closed);}

.badge-pending{background:var(--amber-bg); color:var(--amber);}
.badge-accepted{background:var(--teal-soft); color:var(--teal);}
.badge-declined{background:var(--coral-bg); color:var(--coral);}
.badge-pending, .badge-accepted, .badge-declined{
  font-size:11px; font-weight:700; padding:3px 10px; border-radius:20px;
}

/* ---------- HUB SIDEBAR LAYOUT ---------- */
.hub-shell{display:flex; align-items:flex-start;}
.hub-sidebar{
  width:220px; flex-shrink:0; background:var(--card); border-right:1px solid var(--line);
  padding:20px 14px; position:sticky; top:65px; align-self:flex-start;
  height:calc(100vh - 65px); overflow-y:auto;
}
.hub-sidebar .back-link{
  display:block; font-size:12.5px; color:var(--ink-soft); text-decoration:none;
  padding:6px 6px 12px 6px; border-bottom:1px solid var(--line); margin-bottom:8px;
}
.hub-sidebar .hub-title{font-size:14.5px; font-weight:700; padding:0 6px 2px 6px;}
.hub-sidebar .hub-sub{font-size:11.5px; color:var(--ink-soft); padding:0 6px 12px 6px;}
.hub-sidebar a.side-tab{
  display:flex; align-items:center; gap:10px; padding:10px 10px; border-radius:8px;
  font-size:13.5px; font-weight:600; color:var(--ink-soft); text-decoration:none; margin-bottom:2px;
}
.hub-sidebar a.side-tab:hover{background:var(--chip-bg);}
.hub-sidebar a.side-tab.active{background:var(--accent-soft); color:var(--accent);}
.hub-sidebar .side-icon{width:18px; height:18px; flex-shrink:0; display:flex; align-items:center; justify-content:center; font-size:15px;}
.tab-dot{
  display:inline-block; width:8px; height:8px; border-radius:50%; background:var(--coral);
  margin-left:6px; vertical-align:middle; flex-shrink:0;
}
.hub-main{flex:1; min-width:0; padding:28px 48px 60px 48px; max-width:1400px; margin:0 auto;}
@media (max-width:760px){
  .hub-shell{flex-direction:column;}
  .hub-sidebar{
    width:100%; position:static; height:auto; display:flex; overflow-x:auto; overflow-y:visible;
    gap:4px; padding:10px; border-right:none; border-bottom:1px solid var(--line);
  }
  .hub-sidebar .back-link, .hub-sidebar .hub-title, .hub-sidebar .hub-sub{display:none;}
  .hub-sidebar a.side-tab{flex-direction:column; gap:2px; font-size:11px; padding:8px 10px; white-space:nowrap;}
  .hub-main{padding:20px 16px 60px 16px;}
}
