/* Chief of Staff OS — OfferPex brand
   Palette (measured from the official OfferPex artwork):
   deep navy #0E1D31 · gold #D9AE57 · bright gold #F8D77F
   teal #016155 · lit teal #01A092 · warm white #FDFCF4 · cream #FFFAF0 */
:root {
  --navy: #0e1d31;
  --navy-2: #132a45;
  --navy-3: #1a3552;
  --gold: #d9ae57;
  --gold-bright: #f8d77f;
  --teal: #016155;
  --teal-lit: #01a092;
  --cream: #fffaf0;
  --warm: #fdfcf4;
  --ink: #eef2f7;
  --muted: #a9b8c9;
  --line: #26405e;
  --danger: #e0655f;
  --sidebar-w: 248px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--navy);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}
a { color: var(--gold-bright); }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; }

/* ---------- layout: left sidebar (desktop) / drawer (mobile) ---------- */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w);
  background: #0a1626; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; z-index: 40;
}
.brand { padding: 20px 18px 14px; border-bottom: 1px solid var(--line); }
.brand img { display: block; width: 168px; }
.brand .tag { margin: 10px 0 0; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 10px 12px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.nav a:hover { background: var(--navy-2); }
.nav a.active { background: var(--navy-3); color: var(--gold-bright); box-shadow: inset 3px 0 0 var(--gold); }
.nav .ico { width: 20px; text-align: center; font-size: 17px; }
.nav-foot { margin-top: auto; padding: 14px 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.nav-foot a { color: var(--muted); }
.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  display: none; align-items: center; gap: 12px;
  padding: 10px 14px; background: #0a1626; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar img { height: 30px; }
.topbar .spacer { flex: 1; }
.hamburger {
  background: none; border: 1px solid var(--line); border-radius: 8px;
  color: var(--ink); width: 44px; height: 44px; font-size: 22px; cursor: pointer;
}
.content { padding: 26px 28px 48px; max-width: 1060px; width: 100%; margin: 0 auto; }
.scrim { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 35; }

/* ---------- headings / cards ---------- */
h1 { font-size: 28px; margin: 0 0 6px; color: var(--warm); }
h2 { font-size: 20px; margin: 0 0 10px; color: var(--warm); }
h3 { font-size: 17px; margin: 0 0 8px; color: var(--warm); }
.lede { color: var(--muted); margin: 0 0 22px; max-width: 72ch; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.card {
  background: var(--navy-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 18px 20px; margin-bottom: 18px;
}
.card h2, .card h3 { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--navy-2); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat .num { font-size: 34px; font-weight: 800; color: var(--gold-bright); line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: 14px; margin-top: 4px; }
.rule {
  border-left: 4px solid var(--gold); background: #1d2f47;
  padding: 14px 16px; border-radius: 0 10px 10px 0; margin-bottom: 18px;
}
.rule strong { color: var(--gold-bright); }
.note { font-size: 14px; color: var(--muted); }
.pill {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.pill.active, .pill.strong { background: rgba(1,160,146,.22); color: #5fe3d3; }
.pill.open { background: rgba(217,174,87,.2); color: var(--gold-bright); }
.pill.done { background: rgba(1,160,146,.22); color: #5fe3d3; }
.pill.paused { background: rgba(169,184,201,.18); color: var(--muted); }
.pill.gap { background: rgba(224,101,95,.18); color: #f2a19d; }
.pill.archived { background: rgba(169,184,201,.18); color: var(--muted); }
.pill.planned { background: rgba(248,215,127,.16); color: var(--gold-bright); }
.muted { color: var(--muted); }
.empty { color: var(--muted); padding: 14px 0; }

/* ---------- forms ---------- */
form .field { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=number],
select, textarea {
  width: 100%; font-size: 16px; padding: 12px 14px; min-height: 48px;
  background: #0a1626; color: var(--ink);
  border: 1px solid var(--line); border-radius: 9px;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: var(--gold); }
textarea { min-height: 96px; resize: vertical; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 56px; }
.eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: none; background: none; cursor: pointer;
  color: var(--muted); display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.eye:hover { color: var(--gold-bright); }
.eye svg { width: 22px; height: 22px; }
.eye .eye-off { display: none; }
.eye.showing .eye-on { display: none; }
.eye.showing .eye-off { display: block; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px; border-radius: 9px; border: none;
  background: var(--gold); color: #1a1206; font-size: 16px; font-weight: 700;
  cursor: pointer; text-decoration: none;
}
.btn:hover { background: var(--gold-bright); }
.btn.ghost { background: transparent; color: var(--gold-bright); border: 1px solid var(--gold); }
.btn.ghost:hover { background: rgba(217,174,87,.12); }
.btn.small { min-height: 44px; padding: 8px 14px; font-size: 15px; }
.btn.danger { background: transparent; color: #f2a19d; border: 1px solid var(--danger); }
.btn.danger:hover { background: rgba(224,101,95,.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inline-form { display: inline; }
.flash { padding: 13px 16px; border-radius: 10px; margin-bottom: 18px; font-weight: 600; }
.flash.ok { background: rgba(1,160,146,.2); border: 1px solid var(--teal-lit); color: #7de8db; }
.flash.err { background: rgba(224,101,95,.16); border: 1px solid var(--danger); color: #f6b3af; }

/* ---------- tables (stack on mobile) ---------- */
.table-wrap { overflow-x: hidden; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .05em; }
td .actions { display: flex; gap: 8px; flex-wrap: wrap; }
tr.done-row td { color: var(--muted); }
tr.done-row td:first-child { text-decoration: line-through; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 440px; background: var(--navy-2); border: 1px solid var(--line); border-radius: 14px; padding: 28px 26px; }
.auth-card .logo { display: block; width: 200px; margin: 0 auto 8px; }
.auth-card h1 { text-align: center; font-size: 23px; }
.auth-card .lede { text-align: center; }
.auth-links { text-align: center; margin-top: 16px; font-size: 15px; }
.callout { border: 1px dashed var(--gold); border-radius: 10px; padding: 13px 15px; margin-bottom: 18px; background: rgba(217,174,87,.06); }
.callout strong { color: var(--gold-bright); }
.footer { margin-top: auto; padding: 18px 28px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- mobile pass: 430 / 390 / 360 ---------- */
@media (max-width: 860px) {
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; width: 280px; max-width: 84vw; }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open .scrim { display: block; }
  .main { margin-left: 0; }
  .topbar { display: flex; }
  .content { padding: 18px 16px 40px; }
  .form-row { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
  /* tables become stacked cards */
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tr { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; padding: 6px 12px; background: #10233a; }
  .table-wrap td { border-bottom: none; padding: 7px 0; }
  .table-wrap td::before {
    content: attr(data-label); display: block;
    font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted);
  }
  .table-wrap td.actions-cell::before { content: none; }
  .table-wrap td .actions { margin-top: 4px; }
}

/* --- Sell the Lazy Simplicity OS additions (v1) --- */
.pill.manual { background: rgba(248,215,127,.16); color: var(--gold-bright); }
.pill.flow { background: rgba(1,160,146,.22); color: #5fe3d3; }
.pill.shortcut { background: rgba(217,174,87,.2); color: var(--gold-bright); }
.pill.one-click, .pill.keyboard, .pill.scheduled, .pill.voice, .pill.automatic {
  background: rgba(169,184,201,.18); color: var(--ink);
}
.steps { margin: 8px 0 0; padding-left: 20px; color: var(--muted); font-size: 14px; }
.steps li { margin-bottom: 2px; }
