:root {
  --teal: #036c70;
  --teal-dark: #024e51;
  --teal-light: #edf6f6;
  --ink: #1b1b1b;
  --muted: #616161;
  --line: #e6e6e6;
  --bg: #f6f7f9;
  --card: #ffffff;
  --accent: #0f6cbd;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Demo banner */
.demo-banner {
  background: #fff4ce;
  border-bottom: 1px solid #f2e08a;
  color: #6b5900;
  font-size: 13px;
  padding: 8px 20px;
  text-align: center;
}
.demo-banner code { background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 4px; }

/* Top bar */
.topbar {
  background: var(--teal);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  height: 56px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 7px;
  background: #fff; color: var(--teal);
  display: grid; place-items: center; font-weight: 800;
}
.brand-name { font-size: 16px; white-space: nowrap; }
.topnav { display: flex; gap: 4px; margin-left: 8px; }
.topnav a {
  color: #eafcff; padding: 6px 12px; border-radius: 6px; font-size: 14px; font-weight: 500;
}
.topnav a:hover { background: rgba(255,255,255,.14); text-decoration: none; }
.topnav a.active { background: rgba(255,255,255,.22); }
.search { margin-left: auto; }
.search input {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff; border-radius: 18px; padding: 7px 14px; width: 200px; font-size: 13px;
}
.search input::placeholder { color: #d6f2f4; }
.search input:focus { outline: none; background: #fff; color: var(--ink); }

/* Hero */
.hero {
  background: linear-gradient(120deg, var(--teal), var(--teal-dark));
  color: #fff;
}
.hero-content { max-width: 1200px; margin: 0 auto; padding: 56px 20px; }
.hero-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; opacity: .85; margin: 0 0 6px; }
.hero h1 { font-size: 40px; margin: 0 0 12px; font-weight: 700; }
.hero-desc { font-size: 17px; max-width: 640px; opacity: .95; margin: 0; }

/* Bands */
main { max-width: 1200px; margin: 0 auto; padding: 8px 20px 40px; }
.band { margin-top: 32px; }
.section-title { font-size: 20px; font-weight: 700; margin: 0 0 14px; }
.section-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.loading { color: var(--muted); padding: 16px 0; font-size: 14px; }

/* Quick links */
.quicklinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.quicklink {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; align-items: center; gap: 12px; box-shadow: var(--shadow);
  transition: transform .1s ease, box-shadow .1s ease;
}
.quicklink:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.1); text-decoration: none; }
.quicklink .ql-icon { font-size: 22px; }
.quicklink .ql-label { font-weight: 600; color: var(--ink); font-size: 14px; }

/* Two column */
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

/* News */
.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.news-card h3 { margin: 0 0 6px; font-size: 17px; }
.news-card .meta { color: var(--muted); font-size: 12.5px; margin-bottom: 8px; }
.news-card p { margin: 0; color: #333; font-size: 14.5px; }

/* People */
.people-list { display: flex; flex-direction: column; gap: 8px; }
.person {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; box-shadow: var(--shadow);
}
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 38px;
  display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px;
}
.person .p-name { font-weight: 600; font-size: 14px; }
.person .p-title { color: var(--muted); font-size: 12.5px; }

/* Documents table */
.doc-table { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.doc-row {
  display: grid; grid-template-columns: 1fr 130px 120px; align-items: center;
  padding: 11px 16px; border-bottom: 1px solid var(--line); font-size: 14px;
}
.doc-row:last-child { border-bottom: none; }
.doc-row.header { background: #fafafa; font-weight: 600; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .03em; }
.doc-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.doc-name .doc-icon { font-size: 18px; }
.doc-name .clickable { cursor: pointer; font-weight: 500; }
.doc-name .clickable:hover { color: var(--accent); text-decoration: underline; }
.doc-meta { color: var(--muted); font-size: 13px; }
.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb a { cursor: pointer; }
.breadcrumb .sep { margin: 0 6px; color: var(--line); }

/* Lists grid */
.lists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.list-card {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--teal);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.list-card h3 { margin: 0 0 4px; font-size: 15px; }
.list-card p { margin: 0; color: var(--muted); font-size: 13px; }

/* Footer */
.footer {
  max-width: 1200px; margin: 24px auto 0; padding: 20px; color: var(--muted);
  font-size: 13px; border-top: 1px solid var(--line); text-align: center;
}
.mode-tag { margin-left: 8px; padding: 2px 8px; border-radius: 10px; background: var(--teal-light); color: var(--teal); font-size: 11px; font-weight: 600; }

.hidden { display: none !important; }

/* ---- Progress Tracker ---- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  background: var(--card); color: var(--ink); border: 1px solid var(--line);
  border-radius: 8px; padding: 8px 14px; font-size: 13.5px; font-weight: 600;
  font-family: inherit; text-decoration: none; transition: background .1s ease;
}
.btn:hover { background: #f0f0f0; text-decoration: none; }
.btn-primary { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn-primary:hover { background: var(--teal-dark); }
.tracker-actions { display: flex; gap: 10px; align-items: center; }

.dropzone {
  border: 2px dashed var(--line); border-radius: var(--radius); background: var(--card);
  padding: 40px 20px; text-align: center; color: var(--muted); margin-top: 18px;
}
.dropzone.over { border-color: var(--teal); background: var(--teal-light); }
.dropzone p { margin: 4px 0; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 18px 0 0; border-bottom: 2px solid var(--line); }
.tab {
  background: none; border: none; border-bottom: 3px solid transparent; cursor: pointer;
  padding: 10px 16px; font-size: 14px; font-weight: 600; color: var(--muted); font-family: inherit;
  display: flex; align-items: center; gap: 8px; margin-bottom: -2px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--teal); border-bottom-color: var(--teal); }
.tab-count { background: var(--teal-light); color: var(--teal); border-radius: 10px; padding: 1px 8px; font-size: 11px; }
.tab-add { color: var(--teal); font-size: 16px; }

.grid-wrap { margin-top: 16px; }
.grid-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.grid-hint { color: var(--muted); font-size: 12.5px; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); }
table.grid { border-collapse: collapse; width: 100%; font-size: 13.5px; }
table.grid th, table.grid td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); text-align: left; }
table.grid th {
  background: #fafafa; padding: 10px 12px; font-weight: 600; color: var(--muted);
  position: sticky; top: 0; white-space: nowrap; font-size: 12.5px; text-transform: uppercase; letter-spacing: .02em;
}
table.grid td { padding: 0; }
table.grid td:last-child, table.grid th:last-child { border-right: none; }
input.cell {
  border: none; background: transparent; width: 100%; min-width: 120px; padding: 9px 12px;
  font: inherit; font-size: 13.5px; color: var(--ink); outline: 2px solid transparent; outline-offset: -2px;
}
input.cell:focus { outline-color: var(--teal); background: #fff; }
input.cell.saved { background: #e9f7 ; animation: flash .7s ease; }
@keyframes flash { from { background: #d6f5df; } to { background: transparent; } }
.row-tools { width: 44px; text-align: center; }
.icon-btn { background: none; border: none; cursor: pointer; font-size: 14px; opacity: .5; padding: 6px; }
.icon-btn:hover { opacity: 1; }
.empty-sheet { padding: 30px; text-align: center; color: var(--muted); display: flex; flex-direction: column; gap: 12px; align-items: center; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: #1b1b1b; color: #fff; padding: 10px 18px; border-radius: 8px; font-size: 13.5px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 100;
}
.toast.err { background: #b4232a; }
