/* Land Lawyers – team dashboard.
   Builds on /assets/css/site.css: same black and tan-gold theme, Cinzel headings, Montserrat text.
   Layout: fixed menu on the left (slides in on phones), sticky title bar, content on the right. */

*, *::before, *::after { box-sizing: border-box; }
button, input, select, textarea { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.boot { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); }

/* ---------- Sign-in ---------- */
.login-wrap {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  padding: 40px 16px;
  background: radial-gradient(60% 50% at 50% 0%, rgba(210, 180, 140, 0.10), transparent 70%);
}
.login-card { width: 100%; max-width: 420px; padding: 32px 28px; display: grid; gap: 8px; }
.login-card .eyebrow { margin-bottom: 4px; }
.login-card .h2 { font-size: 1.875rem; }
.login-card .body-muted { margin: 0 0 8px; }
.login-card .field-label { margin: 12px 0 0; }
.login-card .btn { margin-top: 16px; width: 100%; }
.login-card .hint { text-align: center; }
.pw-wrap { position: relative; }
.pw-wrap .field { padding-right: 76px; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; cursor: pointer;
  color: var(--gold); font-size: 13px; font-weight: 600;
}
.pw-toggle:focus-visible { outline: 2px solid var(--gold); }

/* ---------- Layout ---------- */
.dash { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 26px; padding: 22px 14px;
  background: var(--surface); border-right: 1px solid var(--line);
}
.side .brand { padding: 0 8px; }
.side .brand-name { font-size: 17px; }
.nav { display: grid; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px;
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.nav a.active { color: var(--gold); background: var(--gold-soft); font-weight: 600; }
.nav a:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.nav .count {
  margin-left: auto; min-width: 22px; padding: 1px 7px; border-radius: 99px; text-align: center;
  background: var(--gold); color: #0a0a0a; font-size: 11px; font-weight: 700; line-height: 1.6;
}
.nav-label { padding: 16px 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--subtle); }
.side-foot { margin-top: auto; display: grid; gap: 12px; padding: 16px 12px 0; border-top: 1px solid var(--line); font-size: 13px; }
.side-foot a { color: var(--muted); text-decoration: none; }
.side-foot a:hover { color: var(--gold); }
.side-who b { display: block; font-size: 14px; color: var(--text); }
.side-who span { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }

.main { min-width: 0; }
.dtop {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px; min-height: 68px; padding: 10px 28px;
  background: rgba(0, 0, 0, 0.84); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.dtitle {
  flex: 1; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--font-display); font-weight: 600; font-size: 1.375rem; letter-spacing: 0.01em;
}
.who { text-align: right; line-height: 1.3; }
.who b { display: block; font-size: 14px; }
.who span { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); }
.d-menu { display: none; }
.content { padding: 28px; max-width: 1360px; }
.content:focus { outline: none; }
#banner .alert { margin: 16px 28px 0; }

@media (max-width: 1023px) {
  .dash { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; z-index: 70; inset: 0 auto 0 0; width: 280px; max-width: 86vw; transform: translateX(-105%); transition: transform .25s ease; }
  .dash.nav-open .side { transform: none; box-shadow: 30px 0 60px rgba(0, 0, 0, 0.6); }
  .d-menu { display: inline-flex; }
  .dtop { padding: 10px 16px; gap: 12px; }
  .content { padding: 20px 16px 40px; }
  #banner .alert { margin: 12px 16px 0; }
  .who { display: none; }
}
@media (min-width: 1024px) { .side-who { display: none; } }
.scrim { position: fixed; inset: 0; z-index: 65; background: rgba(0, 0, 0, 0.6); }

/* ---------- Building blocks ---------- */
.stack { display: grid; gap: 24px; min-width: 0; }
.stack-sm { display: grid; gap: 12px; }
.grid-2 { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.grid-3 { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
@media (min-width: 1180px) { .grid-2 { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.box { padding: 24px; }
@media (max-width: 639px) { .box { padding: 20px 16px; } }
.box > h2, .box-head h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.125rem; letter-spacing: 0.01em; margin: 0 0 16px; }
.box-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.box-head h2 { margin: 0; }
.sub-h { margin: 24px 0 10px; font-size: 14px; font-weight: 600; color: var(--text); }
.box-intro { margin: -6px 0 18px; font-size: 14px; color: var(--muted); line-height: 1.6; }
.mt { margin-top: 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }
.loading { color: var(--muted); padding: 40px 0; margin: 0; }
.empty { padding: 36px 20px; text-align: center; color: var(--muted); margin: 0; }
.text-link.sm { font-size: 12px; min-height: 0; padding: 0; }

.kpis.wide { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
@media (max-width: 639px) { .kpis.wide { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi .k-val { font-variant-numeric: tabular-nums; }

.filters { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.filters .wide { grid-column: span 2; }
@media (max-width: 520px) { .filters .wide { grid-column: auto; } }
.filters .field, .form-row .field { min-height: 46px; font-size: 14px; }
.filters .field-label { margin-bottom: 6px; }
.toolbar-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.toolbar-row p { margin: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
textarea.field.sm { min-height: 84px; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-danger { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border-color: rgba(239, 68, 68, 0.45); }
.btn-danger:hover:not(:disabled) { background: rgba(239, 68, 68, 0.2); }
.panel.danger { border-color: rgba(239, 68, 68, 0.3); }

/* Tables */
.panel > .table-wrap { border: 0; border-radius: 0; }
table.data tr.link-row { cursor: pointer; }
table.data tr.link-row:hover td, table.data tr.link-row:focus-visible td { background: rgba(255, 255, 255, 0.035); }
table.data tr.link-row:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
table.data tr.selected td { background: var(--gold-soft); }
table.data td .sub { display: block; margin-top: 2px; font-size: 13px; color: var(--muted); }
table.data td b.mono { white-space: nowrap; }
table.data td.clip { max-width: 320px; }
table.data.fit { min-width: 0; }

/* Label / value lists */
.kv { display: grid; grid-template-columns: minmax(110px, 36%) minmax(0, 1fr); margin: 0; }
.kv > div { display: contents; }
.kv dt, .kv dd { margin: 0; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.5; }
.kv dt { padding-right: 16px; color: var(--muted); }
.kv dd { font-weight: 500; overflow-wrap: anywhere; white-space: pre-line; }
.kv > div:last-child dt, .kv > div:last-child dd { border-bottom: 0; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; font-size: 14px; }

/* Status pills */
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.st-new { color: #0a0a0a; background: var(--gold); }
.st-contacted { color: var(--gold); background: var(--gold-soft); }
.st-closed, .st-off { color: var(--muted); background: rgba(255, 255, 255, 0.06); }
.st-warn { color: #fca5a5; background: rgba(239, 68, 68, 0.12); }

/* Overview */
.attn { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.attn button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-radius: 12px; cursor: pointer; text-align: left;
  color: var(--text); font-size: 14px; font-weight: 500;
  background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line-strong);
}
.attn button:hover { border-color: rgba(210, 180, 140, 0.5); }
.attn button b { color: var(--gold); font-family: var(--font-display); font-size: 1.25rem; }
.bars { display: grid; gap: 12px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; font-size: 14px; }
.bar-row .n { font-weight: 600; font-variant-numeric: tabular-nums; }
.bar-track { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.bar-track span { display: block; height: 100%; min-width: 2px; border-radius: inherit; background: linear-gradient(90deg, var(--gold-dark), var(--gold-light)); }
.split { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Request page */
.req-head { display: grid; gap: 10px; }
.req-title { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.req-title .h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.back { display: inline-flex; align-items: center; gap: 8px; width: fit-content; color: var(--muted); font-size: 14px; text-decoration: none; }
.back:hover { color: var(--gold); }
.finding { display: grid; gap: 10px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.finding .field { min-height: 44px; font-size: 14px; }
.finding select.field { max-width: 240px; }
.finding .hint { margin-top: 2px; }
.sign-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.sign { display: grid; gap: 8px; align-content: start; padding: 18px; border-radius: 14px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, 0.02); }
.sign.done { border-color: rgba(210, 180, 140, 0.5); background: var(--gold-soft); }
.sign h3 { margin: 0; font-size: 15px; font-weight: 600; }
.sign p { margin: 0; line-height: 1.5; }
.sign .pill { width: fit-content; }
.note { padding: 14px 0; border-bottom: 1px solid var(--line); }
.note:last-child { border-bottom: 0; padding-bottom: 0; }
.note .meta { font-size: 12px; color: var(--subtle); }
.note p { margin: 6px 0 0; white-space: pre-line; overflow-wrap: anywhere; font-size: 14px; line-height: 1.6; }
.timeline .t-date { color: var(--muted); }
.timeline li.done .dot, .timeline li.now .dot { color: transparent; }

/* Accounts */
.role-matrix th, .role-matrix td { text-align: center; }
.role-matrix th:first-child, .role-matrix td:first-child { text-align: left; }
.yes { color: var(--gold); font-weight: 700; }
.no { color: var(--subtle); }
.pw-row { display: flex; gap: 8px; }
.pw-row .field { flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.pw-row .btn { flex-shrink: 0; }
.editor { margin-bottom: 20px; padding: 20px; border-radius: 16px; border: 1px solid rgba(210, 180, 140, 0.35); background: rgba(210, 180, 140, 0.04); }
.editor h3 { margin: 0 0 14px; font-size: 16px; font-weight: 600; }
.check-row { display: flex; align-items: center; gap: 10px; min-height: 46px; font-size: 14px; }
.check-row input { width: 18px; height: 18px; accent-color: #d2b48c; }

/* Toast */
.toast {
  position: fixed; right: 20px; bottom: 20px; z-index: 90; max-width: min(440px, calc(100vw - 32px));
  padding: 14px 18px; border-radius: 12px; font-size: 14px; line-height: 1.5;
  background: #141416; color: var(--text); border: 1px solid rgba(210, 180, 140, 0.5);
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8);
}
.toast.error { color: #fca5a5; border-color: rgba(239, 68, 68, 0.5); }
@media (max-width: 639px) { .toast { left: 16px; right: 16px; bottom: 16px; } }

/* Two-step sign-in QR code (white background so phone cameras can read it) */
.qr { width: 196px; max-width: 100%; padding: 10px; border-radius: 12px; background: #fff; }
.qr svg { display: block; width: 100%; height: auto; }
