/* ============================================================
   SAA Comfort Air LLC — shared stylesheet
   Design tokens live at the top; light + dark palettes.
   ============================================================ */

:root {
  --navy: #0f2439;
  --navy-2: #16324f;
  --orange: #e8632c;
  --orange-2: #c94f1e;
  --ink: #16232f;
  --muted: #5b6b7a;
  --line: #dfe6ec;
  --bg: #f5f7f9;
  --card: #ffffff;
  --ok: #1c7c4d;
  --warn: #b3541e;
  --danger: #b3261e;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16,36,57,.06), 0 8px 24px rgba(16,36,57,.06);
  --maxw: 1120px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
}
img { max-width: 100%; }
a { color: var(--orange-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--navy); }
p { margin: 0 0 1em; }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- top bar / nav ---------- */
.topbar { background: var(--navy); color: #fff; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; flex-wrap: wrap; gap: 10px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: .2px; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 34px; height: 34px; border-radius: 8px; background: var(--orange); display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; }
.brand .sub { display: block; font-weight: 400; font-size: .72rem; color: #b7c4d1; letter-spacing: .3px; }
nav.mainnav { display: flex; gap: 4px; flex-wrap: wrap; }
nav.mainnav a { color: #dbe6f0; padding: 8px 12px; border-radius: 8px; font-weight: 600; font-size: .93rem; }
nav.mainnav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
nav.mainnav a.active { background: var(--orange); color: #fff; }
nav.mainnav a.emp { border: 1px solid rgba(255,255,255,.25); }

/* ---------- hero ---------- */
.hero { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 65%, #1c3f5f 100%); color: #fff; padding: 64px 0; }
.hero h1 { color: #fff; font-size: 2.4rem; max-width: 640px; }
.hero p.lead { color: #d7e2ec; font-size: 1.15rem; max-width: 560px; }
.hero .cta-row { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn { display: inline-block; padding: 11px 20px; border-radius: 8px; font-weight: 700; font-size: .95rem; border: 1px solid transparent; cursor: pointer; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--orange-2); }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.55); }
.btn-outline:hover { background: rgba(255,255,255,.1); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: #f0f3f6; }
.btn-sm { padding: 7px 12px; font-size: .85rem; border-radius: 6px; }
.btn-danger { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- sections / cards ---------- */
section { padding: 48px 0; }
section.tight { padding: 28px 0; }
.section-head { max-width: 680px; margin-bottom: 28px; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h3 { margin-bottom: 6px; }
.card .muted { color: var(--muted); font-size: .92rem; }
.card-flush { padding: 0; overflow: hidden; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 100px; background: #eef2f5; color: var(--navy); font-size: .74rem; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; }
.badge-orange { background: #fdece3; color: var(--orange-2); }
.badge-ok { background: #e4f4ea; color: var(--ok); }

/* ---------- alt bg band ---------- */
.band { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-navy { background: var(--navy); color: #fff; }
.band-navy h2 { color: #fff; }
.band-navy .muted { color: #b7c4d1; }

/* ---------- footer ---------- */
footer.site { background: var(--navy); color: #b7c4d1; padding: 32px 0; margin-top: 40px; }
footer.site .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: .88rem; }
footer.site a { color: #dbe6f0; }

/* ---------- forms ---------- */
label { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; color: var(--navy); }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; font-size: .95rem; font-family: inherit; background: #fff; color: var(--ink);
}
textarea { resize: vertical; }
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }
.check-row { display: flex; align-items: center; gap: 8px; }
.check-row input { width: auto; }

/* ---------- employee dashboard ---------- */
.emp-shell { background: var(--bg); min-height: 100vh; }
.emp-header { background: var(--navy); color: #fff; padding: 18px 0; }
.emp-header .container { display: flex; align-items: center; justify-content: space-between; }
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 900px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.tool-card .icon { width: 38px; height: 38px; border-radius: 8px; background: #eef2f5; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.tool-card.stub { opacity: .65; }
.tool-card.stub .icon { background: #f2eee8; }

/* ---------- worksheet tables ---------- */
.worksheet-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
table.worksheet { border-collapse: collapse; width: 100%; min-width: 760px; font-size: .88rem; }
table.worksheet thead th { text-align: left; background: #eef2f5; color: var(--navy); padding: 9px 10px; font-size: .74rem; text-transform: uppercase; letter-spacing: .3px; border-bottom: 1px solid var(--line); position: sticky; top: 0; }
table.worksheet tbody td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.worksheet tbody tr.group-row td { background: #f8f5ef; font-weight: 700; color: var(--navy); font-size: .78rem; text-transform: uppercase; letter-spacing: .3px; }
table.worksheet tbody tr:hover td { background: #fbfcfd; }
table.worksheet input[type=number] { width: 78px; padding: 5px 7px; font-size: .88rem; }
table.worksheet .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.worksheet .spec { color: var(--muted); font-size: .82rem; max-width: 260px; }
table.worksheet .item-name { font-weight: 600; }
table.worksheet tfoot td { padding: 10px; font-weight: 700; border-top: 2px solid var(--navy); }
.pill-optional { font-size: .68rem; padding: 2px 7px; border-radius: 100px; background: #eef2f5; color: var(--muted); }

.totals-strip { display: flex; gap: 14px; flex-wrap: wrap; margin: 16px 0; }
.total-box { flex: 1; min-width: 190px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.total-box .label { font-size: .78rem; text-transform: uppercase; letter-spacing: .3px; color: var(--muted); font-weight: 700; }
.total-box .value { font-size: 1.6rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.total-box.grand { background: var(--navy); border-color: var(--navy); }
.total-box.grand .label { color: #b7c4d1; }
.total-box.grand .value { color: #fff; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 10px; }
.toggle-row .meta { flex: 1; }
.toggle-row .meta .name { font-weight: 700; color: var(--navy); }
.toggle-row .meta .desc { font-size: .85rem; color: var(--muted); }
.toggle-row .price { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 130px; text-align: right; }
.switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; background: #c9d3db; border-radius: 100px; cursor: pointer; transition: .15s; }
.switch .slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.switch input:checked + .slider { background: var(--ok); }
.switch input:checked + .slider::before { transform: translateX(20px); }

details.detail-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin-bottom: 16px; overflow: hidden; }
details.detail-panel > summary { cursor: pointer; padding: 14px 16px; font-weight: 700; color: var(--navy); background: #f8fafb; list-style: none; display: flex; justify-content: space-between; align-items: center; }
details.detail-panel > summary::-webkit-details-marker { display: none; }
details.detail-panel > summary .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
details.detail-panel > summary::after { content: "▸"; color: var(--muted); transition: .15s; }
details.detail-panel[open] > summary::after { transform: rotate(90deg); }
details.detail-panel .detail-body { padding: 16px; border-top: 1px solid var(--line); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); margin-bottom: 8px; }
.checklist li input { width: 18px; height: 18px; }
.checklist li.checked { background: #f2f9f5; border-color: #cfe9d8; }
.checklist li.checked label { text-decoration: line-through; color: var(--muted); }
.checklist label { margin: 0; font-weight: 500; color: var(--ink); flex: 1; cursor: pointer; }

.note-box { background: #fdf6ec; border: 1px solid #f0dcb4; color: #7a5417; border-radius: 8px; padding: 12px 14px; font-size: .88rem; margin: 14px 0; }
.note-box.blue { background: #eaf2fb; border-color: #c7dcf3; color: #234a75; }
.printable-summary { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 18px; }
.printable-summary h3 { margin-bottom: 4px; }
.printable-summary .terms { font-size: .85rem; color: var(--muted); white-space: pre-line; margin-top: 10px; }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--navy); padding: 20px; }
.login-card { background: #fff; border-radius: 14px; padding: 32px; width: 100%; max-width: 360px; box-shadow: var(--shadow); text-align: center; }
.login-card .mark { width: 52px; height: 52px; border-radius: 12px; background: var(--orange); color: #fff; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; font-size: 1.3rem; }
.login-error { color: var(--danger); font-size: .85rem; margin-top: 8px; min-height: 1.2em; }

.breadcrumb { font-size: .82rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); }
.page-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.stub-note { text-align: center; padding: 60px 20px; color: var(--muted); }
