/* ============================================================
   Matterbolt — house design system (PropSpot token pattern,
   own palette: legal navy + steel neutrals). No emojis in UI.
   ============================================================ */
:root {
  --brand: #1d4ed8;            /* action blue */
  --brand-dark: #1e40af;
  --navy: #0f1b33;             /* headers / sidebar */
  --bg: #f4f6fa;
  --panel: #ffffff;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 4px 16px rgba(15, 23, 42, .05);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

/* ── Panels ── */
.os-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.panel-section { padding: 20px 24px; }
.panel-section + .panel-section { border-top: 1px solid var(--border); }
.panel-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.panel-sub { color: var(--text-muted); font-size: 13px; margin: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 8px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none;
  background: var(--brand); color: #fff; transition: background .12s;
}
.btn:hover { background: var(--brand-dark); }
.btn:disabled { opacity: .55; cursor: default; }
.btn-secondary { background: #fff; color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-link { background: none; border: none; color: var(--brand); font-weight: 600; cursor: pointer; padding: 0; font-size: 13px; }
.btn-block { width: 100%; }

/* ── Forms ── */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.field input, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; background: #fff; color: var(--text);
}
.field input:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
.form-error { color: var(--danger); font-size: 13px; margin: 8px 0 0; min-height: 18px; }
.form-note { color: var(--text-muted); font-size: 13px; margin-top: 8px; }

/* ── Auth layout ── */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand .wordmark { font-size: 28px; font-weight: 900; letter-spacing: -.03em; color: var(--navy); }
.auth-brand .wordmark .accent { color: var(--brand); }
.auth-brand .tagline { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

/* ── Topbar (app shell) ── */
.topbar {
  background: var(--navy); color: #fff; padding: 0 24px; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
}
.topbar .wordmark { font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.topbar .wordmark .accent { color: #93c5fd; }
.topbar .user-chip { font-size: 13px; color: #cbd5e1; display: flex; align-items: center; gap: 12px; }
main.page { max-width: 960px; margin: 32px auto; padding: 0 24px; }

/* ── Status pills (case states) ── */
.pill {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  background: #e2e8f0; color: #334155;
}
.pill.hold { background: #fef3c7; color: #92400e; }
.pill.done { background: #dcfce7; color: #166534; }
.pill.active { background: #dbeafe; color: #1e40af; }

/* ── App modal (never native confirm/alert) ── */
.app-modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
}
.app-modal { background: #fff; border-radius: var(--radius); padding: 24px; max-width: 380px; width: 92%; box-shadow: var(--shadow); }
.app-modal h3 { margin: 0 0 8px; font-size: 16px; }
.app-modal p { margin: 0 0 20px; color: var(--text-muted); font-size: 14px; }
.app-modal .row { display: flex; gap: 10px; justify-content: flex-end; }
