/* ============================================================
   Delivery — project & task control room
   Design tokens
   ============================================================ */
:root {
  --ink: #16181d;          /* sidebar / chrome */
  --ink-2: #1f232b;        /* raised ink surfaces */
  --ink-line: #2c313b;     /* dividers on ink */
  --paper: #f5f4ef;        /* workspace canvas */
  --surface: #ffffff;      /* cards */
  --surface-2: #fbfaf7;    /* subtle inset */
  --line: #e7e4db;         /* hairlines on paper */
  --line-strong: #d8d4c8;

  --primary: #3b5bdb;      /* actions / active */
  --primary-ink: #2c46ad;
  --amber: #d9772a;        /* deadlines / this week */
  --amber-soft: #fbeede;
  --green: #1f9d63;        /* done / on track */
  --green-soft: #e3f4ea;
  --red: #cf4034;          /* overdue */
  --red-soft: #fbe7e4;
  --violet: #7c3aed;

  --text: #1b1e24;
  --muted: #6f6d65;
  --faint: #9b988e;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(20,22,28,.06), 0 1px 1px rgba(20,22,28,.04);
  --shadow-md: 0 6px 22px rgba(20,22,28,.10), 0 2px 6px rgba(20,22,28,.06);

  --font-display: "Calibri Light", "Calibri", "Segoe UI", system-ui, sans-serif;
  --font-body: "Calibri Light", "Calibri", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Calibri Light", "Calibri", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 300;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  font-size: 14.5px;
  line-height: 1.45;
}

button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }
a { color: var(--primary); }

::selection { background: #d9e0fb; }

/* ============================================================
   App shell
   ============================================================ */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
  background: var(--ink);
  color: #d7d9de;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--ink-line);
}
.brand {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--ink-line);
}
.brand .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--amber);
  display: grid; place-items: center;
  color: #1a1206; font-family: var(--font-display); font-weight: 700;
  flex-shrink: 0;
}
.brand .wordmark { font-family: var(--font-display); font-weight: 600; font-size: 15px; color: #fff; letter-spacing: -0.01em; }
.brand .wordmark small { display: block; font-family: var(--font-mono); font-size: 9.5px; font-weight: 400; letter-spacing: .14em; color: #7e8794; text-transform: uppercase; margin-top: 1px; }

.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .16em;
  text-transform: uppercase; color: #6a7280; padding: 14px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: #b9bdc6; background: none; border: none; width: 100%; text-align: left;
  font-size: 13.5px; font-weight: 450; transition: background .12s, color .12s;
}
.nav-item:hover { background: var(--ink-2); color: #fff; }
.nav-item.active { background: var(--ink-2); color: #fff; }
.nav-item.active .ico { color: var(--amber); }
.nav-item .ico { width: 17px; height: 17px; flex-shrink: 0; color: #8b919c; }
.nav-item.active .ico { color: var(--amber); }
.nav-item .count {
  margin-left: auto; font-family: var(--font-mono); font-size: 11px;
  color: #8b919c; background: var(--ink-2); padding: 1px 7px; border-radius: 20px;
}
.nav-item.active .count { background: #313742; color: #d7d9de; }

.nav-ctx {
  margin: 8px 12px; padding: 11px 12px; border-radius: var(--radius-sm);
  background: var(--ink-2); border: 1px solid var(--ink-line);
}
.nav-ctx .lbl { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: #6a7280; }
.nav-ctx .nm { color: #fff; font-weight: 500; font-size: 13.5px; margin-top: 3px; line-height: 1.3; }
.nav-ctx .client { color: #8b919c; font-size: 12px; margin-top: 1px; }

.sidebar-foot { margin-top: auto; padding: 14px 12px; border-top: 1px solid var(--ink-line); display: flex; flex-direction: column; gap: 2px; }
.foot-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 12px; border-radius: var(--radius-sm); border: none; background: none;
  color: #9aa0aa; font-size: 12.5px; text-align: left; transition: background .12s, color .12s;
}
.foot-btn:hover { background: var(--ink-2); color: #fff; }
.foot-btn .ico { width: 15px; height: 15px; }

/* ---- Main ---- */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 30px; border-bottom: 1px solid var(--line);
  background: rgba(245,244,239,.85); backdrop-filter: blur(6px);
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-family: var(--font-display); font-size: 21px; font-weight: 600; margin: 0; letter-spacing: -0.02em; }
.topbar .sub { color: var(--muted); font-size: 13px; margin-top: 1px; }
.topbar .spacer { flex: 1; }

.content { padding: 28px 30px 60px; max-width: 1240px; width: 100%; }

/* ============================================================
   Buttons / controls
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--text); font-size: 13px; font-weight: 500;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.btn:hover { border-color: #bdb8a9; box-shadow: var(--shadow-sm); }
.btn .ico { width: 15px; height: 15px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-ink); border-color: var(--primary-ink); }
.btn-ghost { background: none; border-color: transparent; }
.btn-ghost:hover { background: rgba(0,0,0,.05); box-shadow: none; }
.btn-danger { color: var(--red); border-color: var(--red-soft); background: var(--red-soft); }
.btn-danger:hover { background: #f7d8d4; border-color: #f0c4bf; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.icon-btn { display: grid; place-items: center; width: 30px; height: 30px; padding: 0; border-radius: 7px; border: 1px solid transparent; background: none; color: var(--muted); }
.icon-btn:hover { background: rgba(0,0,0,.06); color: var(--text); }
.icon-btn .ico { width: 16px; height: 16px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; font-weight: 500; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); background: var(--surface); color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,91,219,.14);
}
.textarea { resize: vertical; min-height: 72px; }

.search {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); min-width: 240px;
}
.search input { border: none; outline: none; background: none; flex: 1; }
.search .ico { width: 16px; height: 16px; color: var(--faint); }

/* ============================================================
   Cards / tables
   ============================================================ */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }

.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }

.empty {
  text-align: center; padding: 64px 24px; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2);
}
.empty .ico { width: 30px; height: 30px; color: var(--faint); margin-bottom: 10px; }
.empty h3 { font-family: var(--font-display); font-weight: 600; color: var(--text); margin: 0 0 4px; }

/* Project grid */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.proj-card { padding: 18px; display: flex; flex-direction: column; gap: 14px; transition: box-shadow .14s, transform .14s, border-color .14s; }
.proj-card:hover { box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.proj-card .head { display: flex; align-items: flex-start; gap: 10px; }
.proj-card h3 { font-family: var(--font-display); font-size: 16.5px; font-weight: 600; margin: 0; letter-spacing: -0.01em; line-height: 1.25; }
.proj-card .client { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.proj-card .desc { font-size: 13px; color: var(--muted); line-height: 1.5; flex: 1; }
.proj-card .meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-track { flex: 1; height: 7px; background: var(--line); border-radius: 20px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 20px; transition: width .3s; }
.progress-pct { font-family: var(--font-mono); font-size: 12px; color: var(--muted); min-width: 34px; text-align: right; }
.proj-card .actions { display: flex; gap: 6px; padding-top: 12px; border-top: 1px solid var(--line); }

/* status pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 20px; white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.pill-active { background: var(--green-soft); color: #157a4a; }
.pill-active .dot { background: var(--green); }
.pill-on_hold { background: var(--amber-soft); color: #9a5418; }
.pill-on_hold .dot { background: var(--amber); }
.pill-completed { background: #ecebf7; color: #5b3aad; }
.pill-completed .dot { background: var(--violet); }

.prio { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 6px; border-radius: 5px; font-weight: 500; }
.prio-high { background: var(--red-soft); color: #a8281e; }
.prio-medium { background: var(--amber-soft); color: #9a5418; }
.prio-low { background: #eef0f2; color: #5f6670; }

/* Table */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); font-weight: 500; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface-2); }

.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.avatar-lg { width: 38px; height: 38px; font-size: 14px; }
.who { display: inline-flex; align-items: center; gap: 9px; }
.who .nm { font-weight: 500; }
.who .ro { color: var(--muted); font-size: 12px; }

.dev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.dev-card { padding: 16px; display: flex; align-items: center; gap: 13px; }
.dev-card .info { flex: 1; min-width: 0; }
.dev-card .info .nm { font-weight: 600; }
.dev-card .info .ro { color: var(--muted); font-size: 12.5px; }
.dev-card .info .em { color: var(--faint); font-size: 12px; font-family: var(--font-mono); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-card .load { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-align: center; }
.dev-card .load b { display: block; font-size: 19px; color: var(--text); font-weight: 600; }

.date-cell { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.date-cell.overdue { color: var(--red); font-weight: 500; }

/* ============================================================
   Dashboard
   ============================================================ */
.dash-tabs { display: inline-flex; padding: 3px; background: #ebe9e2; border-radius: 10px; gap: 2px; }
.dash-tab { padding: 7px 16px; border-radius: 8px; border: none; background: none; font-size: 13px; font-weight: 500; color: var(--muted); }
.dash-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.section-eyebrow { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--faint); margin: 0 0 12px; }

/* Stat cards */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden; }
.stat .k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat .v { font-family: var(--font-display); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.05; margin-top: 6px; }
.stat .x { font-size: 12px; color: var(--muted); margin-top: 3px; }
.stat .accent { position: absolute; top: 0; left: 0; width: 3px; height: 100%; }
.stat .v.green { color: var(--green); } .stat .v.amber { color: var(--amber); } .stat .v.red { color: var(--red); }

.dash-cols { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; align-items: start; }

/* Signature: delivery rail */
.rail-card { padding: 20px; }
.rail-card .hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.rail-card h2 { font-family: var(--font-display); font-size: 17px; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.rail-card .hd .sub { color: var(--muted); font-size: 12.5px; }
.rail { display: grid; grid-template-columns: repeat(7, 1fr); gap: 0; margin-top: 18px; border-top: 2px solid var(--ink); }
.rail-day { border-right: 1px solid var(--line); padding: 0 6px; min-height: 130px; }
.rail-day:last-child { border-right: none; }
.rail-day .daymark { text-align: center; padding: 8px 0 12px; }
.rail-day .daymark .dow { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.rail-day .daymark .dnum { font-family: var(--font-display); font-size: 18px; font-weight: 600; line-height: 1.1; margin-top: 2px; }
.rail-day.is-today .daymark .dnum { color: var(--amber); }
.rail-day.is-today { background: linear-gradient(180deg, var(--amber-soft), transparent 60%); }
.rail-day .tick { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); margin: -23px auto 0; border: 2px solid var(--surface); position: relative; }
.rail-day.has-items .tick { background: var(--amber); }
.rail-chip { background: var(--surface-2); border: 1px solid var(--line); border-left: 3px solid var(--primary); border-radius: 6px; padding: 7px 8px; margin-bottom: 6px; }
.rail-chip.high { border-left-color: var(--red); }
.rail-chip .t { font-size: 11.5px; font-weight: 500; line-height: 1.25; }
.rail-chip .m { display: flex; align-items: center; gap: 5px; margin-top: 5px; }
.rail-chip .m .avatar { width: 17px; height: 17px; font-size: 8.5px; }
.rail-chip .m .pn { font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-empty { font-size: 11px; color: var(--faint); text-align: center; padding-top: 14px; }

.list-card { padding: 18px 20px; }
.list-card h2 { font-family: var(--font-display); font-size: 16px; font-weight: 600; margin: 0 0 14px; }
.mini-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.mini-row:last-child { border-bottom: none; }
.mini-row .bar-wrap { flex: 1; min-width: 0; }
.mini-row .bar-wrap .nm { font-size: 13px; font-weight: 500; margin-bottom: 5px; display: flex; justify-content: space-between; gap: 8px; }
.mini-row .bar-wrap .nm span { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

.workload-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.workload-row:last-child { border-bottom: none; }
.workload-row .info { flex: 1; }
.workload-row .info .nm { font-size: 13px; font-weight: 500; }
.workload-row .info .ro { font-size: 11.5px; color: var(--muted); }
.workload-row .badge-load { font-family: var(--font-mono); font-size: 12px; background: var(--surface-2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 20px; color: var(--muted); }

/* ============================================================
   Kanban
   ============================================================ */
.kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: start; }
.kcol { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 120px; }
.kcol.drop { border-color: var(--primary); background: #eef1fd; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 13px 14px; border-bottom: 1px solid var(--line); }
.kcol-head .swatch { width: 8px; height: 8px; border-radius: 50%; }
.kcol-head .ttl { font-family: var(--font-display); font-size: 13px; font-weight: 600; }
.kcol-head .cnt { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 1px 8px; }
.kcol-body { padding: 10px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px; box-shadow: var(--shadow-sm); cursor: grab; transition: box-shadow .12s, transform .12s; }
.kcard:hover { box-shadow: var(--shadow-md); }
.kcard.dragging { opacity: .5; }
.kcard.editable { cursor: grab; }
.kcard .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.kcard .proj-tag { display: inline-block; font-size: 10.5px; font-weight: 500; color: var(--primary); background: #eef1fd; border-radius: 5px; padding: 2px 7px; margin-bottom: 8px; }
.kcard.clickable { cursor: pointer; }
.kcard .t { font-size: 13.5px; font-weight: 500; line-height: 1.3; }
.kcard .d { font-size: 12px; color: var(--muted); line-height: 1.45; margin-bottom: 10px; }
.kcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kcard .date { font-family: var(--font-mono); font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.kcard .date.overdue { color: var(--red); }
.kcard .date .ico { width: 12px; height: 12px; }
.kcol-empty { text-align: center; padding: 20px 8px; color: var(--faint); font-size: 12px; }

/* ============================================================
   Modal
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; background: rgba(22,24,29,.5); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 100; padding: 24px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-md); width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; animation: pop .16s; }
.modal.wide { max-width: 640px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.modal-head h2 { font-family: var(--font-display); font-size: 18px; font-weight: 600; margin: 0; }
.modal-body { padding: 18px 24px; display: flex; flex-direction: column; gap: 15px; }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 24px 22px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }

.share-box { display: flex; gap: 8px; }
.share-box input { flex: 1; font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.share-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; }

/* ============================================================
   Toast
   ============================================================ */
#toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow-md); display: flex; align-items: center; gap: 9px; animation: toastin .2s; }
.toast .ico { width: 16px; height: 16px; color: var(--green); }
@keyframes toastin { from { opacity: 0; transform: translateY(10px); } }

/* ============================================================
   Read-only share view
   ============================================================ */
.ro-banner { background: var(--ink); color: #fff; padding: 9px 30px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.ro-banner .ico { width: 15px; height: 15px; color: var(--amber); }
.ro-banner .badge { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; background: rgba(255,255,255,.12); padding: 2px 9px; border-radius: 20px; margin-left: auto; }
.ro-wrap { max-width: 1180px; margin: 0 auto; padding: 26px 30px 60px; }
.ro-head { margin-bottom: 22px; }
.ro-head h1 { font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; margin: 0; }
.ro-head .sub { color: var(--muted); margin-top: 3px; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1080px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .dash-cols { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .nav { flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .nav-label, .nav-ctx { display: none; }
  .sidebar-foot { margin: 0; border: none; flex-direction: row; }
  .brand { border: none; }
  .content { padding: 20px 16px 50px; }
  .topbar { padding: 14px 16px; }
  .rail { grid-template-columns: 1fr; }
  .rail-day { border-right: none; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 60px 1fr; gap: 10px; min-height: auto; padding: 10px; }
  .rail-day .tick { display: none; }
  .kanban { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stat-row { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .proj-grid, .dev-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Login (admin)
   ============================================================ */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(1200px 500px at 50% -10%, #ffffff, var(--paper)); }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow-md); padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 15px; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 4px; }
.login-brand .mark { width: 40px; height: 40px; border-radius: 10px; background: var(--amber);
  display: grid; place-items: center; color: #1a1206; font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.login-brand .wm { font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -0.01em; }
.login-brand .wm-sub { color: var(--muted); font-size: 12.5px; }
.login-btn { justify-content: center; padding: 11px; font-size: 14px; margin-top: 2px; }
.login-err { background: var(--red-soft); color: #a8281e; border-radius: var(--radius-sm); padding: 9px 12px; font-size: 13px; }
.login-note { color: var(--muted); font-size: 12px; text-align: center; margin: 2px 0 0; line-height: 1.5; }

/* ============================================================
   Filter bar
   ============================================================ */
.filterbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filterbar .fb-search { min-width: 190px; flex: 0 1 220px; }
.filterbar .select { width: auto; min-width: 130px; padding: 8px 11px; }
.filterbar .fb-date { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.filterbar .fb-date .input { width: auto; padding: 7px 9px; }
.filterbar .fb-clear { margin-left: auto; }
.board-tip { color: var(--muted); font-size: 12.5px; margin-top: 14px; }

/* ============================================================
   Sync indicator
   ============================================================ */
.sync-ind { display: flex; align-items: center; gap: 7px; font-size: 11.5px; padding: 6px 12px 8px; }
.sync-ind .d { width: 7px; height: 7px; border-radius: 50%; }
.sync-ind.on { color: #7fe0ad; } .sync-ind.on .d { background: #37d98a; box-shadow: 0 0 0 3px rgba(55,217,138,.15); }
.sync-ind.off { color: #8b919c; } .sync-ind.off .d { background: #6a7280; }

:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
