/* SparClean PA - the one custom stylesheet. Bootstrap 5.3.3 + Icons are vendored
   in assets/vendor/. Brand colors are defined ONCE here; reference the variables,
   never the hex values. Palette taken from SparCleanLogo.png (navy/blue/green) and
   sparcleanpa.com (--bg #0b1220 ink). Goal per Tim: minimal, clean, fast. */
:root {
  --sc-ink: #0b1220;      /* sparcleanpa.com page background - used for text here */
  --sc-navy: #003078;     /* logo outline navy - headings, card headers */
  --sc-blue: #006fc2;     /* logo blue #0084e5 darkened for AA contrast on white */
  --sc-green: #2f8f2a;    /* logo green #42ad33 darkened for AA contrast on white */
  --sc-bg: #f6f8fb;
  --sc-border: #e4e9f0;
  --bs-primary: var(--sc-blue);
  --bs-link-color: var(--sc-blue);
  --bs-body-font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  background-color: var(--sc-bg);
  color: var(--sc-ink);
}

.sc-navbar { border-bottom: 1px solid var(--sc-border); }
.sc-navbar .navbar-brand img { height: 40px; width: auto; display: block; }
.sc-navbar .nav-link { color: var(--sc-ink); font-weight: 500; }
.sc-navbar .nav-link.active { color: var(--sc-blue); }

.btn-primary {
  --bs-btn-bg: var(--sc-blue); --bs-btn-border-color: var(--sc-blue);
  --bs-btn-hover-bg: var(--sc-navy); --bs-btn-hover-border-color: var(--sc-navy);
  --bs-btn-active-bg: var(--sc-navy); --bs-btn-active-border-color: var(--sc-navy);
}
.btn-success {
  --bs-btn-bg: var(--sc-green); --bs-btn-border-color: var(--sc-green);
}

/* The one card treatment - use on every content block. */
.sc-card {
  border: none;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(11, 18, 32, .06);
}
.sc-card .card-header {
  background: #fff;
  border-bottom: 1px solid var(--sc-border);
  font-weight: 600;
  color: var(--sc-navy);
  border-radius: 14px 14px 0 0;
}

.console-box {
  background: #1e1e1e;
  color: #d4d4d4;
  font-family: Consolas, "SFMono-Regular", Menlo, monospace;
  font-size: .82rem;
  line-height: 1.55;
  padding: 12px 14px;
  border-radius: 6px;
  max-height: 320px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
}
.console-box .ok { color: #6ee7b7; }
.console-box .fail { color: #f87171; }
.console-box .skip { color: #93c5fd; }

.sc-main { max-width: 1280px; }
.page-title { font-size: 1.35rem; font-weight: 700; color: var(--sc-navy); margin: 0; }

/* ---------- Sign-in ---------- */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 14px;
  padding: 2rem 1.75rem;
  box-shadow: 0 1px 3px rgba(11, 18, 32, .08);
}
.otp-input { letter-spacing: .5em; font-size: 1.5rem; }

/* ---------- Tables ---------- */
.sc-table { margin: 0; }
.sc-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #5b6778; font-weight: 600; white-space: nowrap; }
.sc-table td, .sc-table th { vertical-align: middle; }
.status-pill { font-size: .75rem; font-weight: 600; }
.job-cancelled td { color: #8a94a3; }
.job-cancelled td.fw-semibold { text-decoration: line-through; }
.notes-cell { max-width: 260px; }
.sc-table a:not(.btn) { text-decoration: none; font-weight: 500; }
.sc-table a:not(.btn):hover { text-decoration: underline; }

/* ---------- Invoice document ---------- */
.invoice-title { font-size: 1.75rem; font-weight: 700; color: var(--sc-navy); letter-spacing: .02em; }
.invoice-meta td { padding: 1px 0; }
.invoice-lines th:first-child, .invoice-lines td:first-child { width: 7rem; }
.invoice-totals { min-width: 260px; }
.invoice-totals td { padding: 3px 0; }
.invoice-totals td:last-child { text-align: right; padding-left: 2rem; }
.invoice-balance td { border-top: 2px solid var(--sc-navy); padding-top: 6px; font-weight: 700; font-size: 1.1rem; color: var(--sc-navy); }

@media print {
  body { background: #fff; }
  .sc-navbar, footer, .d-print-none { display: none !important; }
  .sc-main { max-width: none; padding: 0 !important; }
  .sc-card { box-shadow: none; }
  .invoice-doc .card-body { padding: 0 !important; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- Customer invoice page ---------- */
.public-invoice { max-width: 900px; }
.pay-box { border-left: 4px solid var(--sc-green); }
.pay-amount { color: var(--sc-navy); }

/* ---------- To-do list ---------- */
.todo-item.todo-overdue { border-left: 3px solid #dc3545; }
.todo-check { min-width: 2.4rem; }
.todo-extra summary { cursor: pointer; list-style: none; }
.todo-extra summary::-webkit-details-marker { display: none; }
