/* FW HQ — royal blue #244396, yellow outline accent #F5C400. NASA-like, mobile-first. */
:root {
  --blue: #244396;
  --blue-dark: #1a3170;
  --yellow: #F5C400;
  --ink: #1a1a1a;
  --muted: #4a5560;
  --line: #d8dee6;
  --bg: #f4f5f7;
  --card: #fff;
  --ok: #157a3a;
  --ok-bg: #e8f6ec;
  --warn: #a15c00;
  --warn-bg: #fff4e0;
  --err: #b42318;
  --err-bg: #fdecea;
  --orange: #c05600;
  --focus: #244396;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(18, 32, 64, 0.06);
  --font: "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
  min-height: 100vh;
}
.skip {
  position: absolute; left: -999px; top: 0;
}
.skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px; z-index: 10; }
.top {
  background: var(--blue);
  color: #fff;
  border-bottom: 4px solid var(--yellow);
}
.top-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px;
  padding: 10px 16px; max-width: 1200px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; }
.brand img {
  width: 44px; height: 44px; object-fit: contain;
  background: #fff; border-radius: 4px;
  outline: 2px solid var(--yellow); outline-offset: 1px;
}
.nav { display: flex; flex-wrap: wrap; gap: 6px 14px; flex: 1; }
.nav a { color: #fff; text-decoration: none; font-weight: 600; font-size: 0.95rem; padding: 6px 0; }
.nav a:hover, .nav a:focus { text-decoration: underline; }
.badge {
  display: inline-block; background: var(--yellow); color: var(--blue-dark);
  border-radius: 999px; padding: 0 6px; margin-left: 4px; font-size: 0.75rem;
}
.who { margin-left: auto; display: flex; gap: 12px; align-items: center; font-size: 0.9rem; }
.who a { color: #fff; }
.main { max-width: 960px; margin: 0 auto; padding: 20px 16px 80px; }
.main-wide { max-width: 1200px; }
h1 { font-size: 1.6rem; margin: 0 0 12px; letter-spacing: -0.02em; }
h2 { font-size: 1.2rem; margin: 24px 0 8px; }
p, li { font-size: 1rem; }
.lede { color: var(--muted); margin-top: 0; }
a { color: var(--blue); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); margin: 12px 0;
}
.tiles { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
@media (min-width: 640px) { .tiles { grid-template-columns: 1fr 1fr; } }
.tile {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; text-decoration: none; color: inherit; box-shadow: var(--shadow);
  min-height: 120px;
}
.tile:hover, .tile:focus { border-color: var(--blue); outline: 2px solid var(--yellow); }
.tile h2 { margin: 0 0 6px; color: var(--blue); }
.tile.soon { opacity: 0.7; cursor: default; }
.tile.soon:hover { outline: none; border-color: var(--line); }
.soon-tag { display: inline-block; background: var(--warn-bg); color: var(--warn); font-size: 0.8rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
label { display: block; font-weight: 650; margin: 12px 0 4px; }
input[type="text"], input[type="password"], input[type="date"], input[type="number"],
input[type="search"], select, textarea {
  width: 100%; max-width: 28rem; font: inherit; padding: 10px 12px;
  border: 1px solid #8a93a0; border-radius: 4px; background: #fff;
}
textarea { max-width: 40rem; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--yellow); border-color: var(--blue); }
.field-error { color: var(--err); font-size: 0.9rem; margin: 4px 0 0; }
.hint { color: var(--muted); font-size: 0.9rem; margin: 4px 0 0; }
.btn, button.btn {
  font: inherit; font-weight: 650; padding: 10px 16px; border-radius: 4px;
  border: 1px solid var(--blue); background: #fff; color: var(--blue); cursor: pointer;
  display: inline-block; text-decoration: none;
}
.btn:hover, .btn:focus { outline: 3px solid var(--yellow); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-danger { border-color: var(--err); color: var(--err); }
.btn-danger.btn-primary { background: var(--err); color: #fff; }
.btn[disabled], .btn:disabled { opacity: 0.5; cursor: not-allowed; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.flash { padding: 12px 14px; border-radius: var(--radius); margin: 0 0 16px; }
.flash-ok { background: var(--ok-bg); color: var(--ok); }
.flash-error { background: var(--err-bg); color: var(--err); }
.flash-warn { background: var(--warn-bg); color: var(--warn); }
.pw-wrap { position: relative; max-width: 28rem; }
.pw-wrap input { padding-right: 4.5rem; }
.toggle-pw {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--blue); font: inherit; font-weight: 650; cursor: pointer;
}
.caps { color: var(--warn); font-weight: 650; margin: 6px 0 0; display: none; }
.caps.is-on { display: block; }
.checklist { list-style: none; padding: 0; margin: 10px 0; max-width: 28rem; }
.checklist li {
  display: flex; align-items: flex-start; gap: 8px; padding: 4px 0;
  color: var(--orange); font-weight: 600;
}
.checklist li::before { content: "●"; }
.checklist li.is-ok { color: var(--ok); }
.checklist li.is-ok::before { content: "✓"; }
.checklist li.is-wait { color: var(--muted); }
.strength { margin: 8px 0; font-weight: 650; }
.strength[data-level="Weak"] { color: var(--err); }
.strength[data-level="Fair"] { color: var(--warn); }
.strength[data-level="Strong"], .strength[data-level="Excellent"] { color: var(--ok); }
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; background: #fff; }
table.data th, table.data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: #eef1f6; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 0.8rem; font-weight: 700; }
.status-pending, .status-cancel_requested { background: var(--warn-bg); color: var(--warn); }
.status-approved { background: var(--ok-bg); color: var(--ok); }
.status-declined, .status-cancelled { background: #eee; color: var(--muted); }
.self-tag { background: #e8e6ff; color: #3b2d9b; padding: 2px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; }
.balances { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .balances { grid-template-columns: 1fr 1fr 1fr; } }
.bal { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); padding: 12px; border-radius: var(--radius); }
.bal .n { font-size: 1.6rem; font-weight: 700; }
.calendar { width: 100%; border-collapse: collapse; background: #fff; table-layout: fixed; }
.calendar th, .calendar td { border: 1px solid var(--line); padding: 6px; height: 92px; vertical-align: top; font-size: 0.85rem; }
.calendar th { background: var(--blue); color: #fff; height: auto; text-align: left; }
.calendar .muted { color: var(--muted); background: #f7f7f7; height: 92px; }
.who-off { display: block; margin-top: 4px; background: #e8eefc; border-radius: 3px; padding: 1px 4px; }
.who-off.pending { background: var(--warn-bg); }
.month-nav { display: flex; gap: 12px; align-items: center; margin: 8px 0 16px; }
.fab-problem {
  position: fixed; right: 16px; bottom: 16px; z-index: 20;
  background: #fff; color: var(--blue); border: 2px solid var(--blue);
  border-radius: 999px; padding: 10px 14px; font: inherit; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.dialog { border: 1px solid var(--line); border-radius: 8px; padding: 0; width: min(28rem, 96vw); }
.dialog::backdrop { background: rgba(16, 24, 40, 0.45); }
.dialog-form { padding: 16px 18px 20px; }
.help-panel { background: #fff; border: 1px solid var(--line); padding: 16px; border-radius: var(--radius); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.empty { padding: 20px; background: #fff; border: 1px dashed var(--line); color: var(--muted); }
.login-box { max-width: 26rem; margin: 32px auto; background: #fff; padding: 24px; border: 1px solid var(--line); border-top: 4px solid var(--yellow); border-radius: var(--radius); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: end; margin: 0 0 12px; }
.filter-bar label { margin-top: 0; }
.filter-bar input, .filter-bar select { max-width: 16rem; }
.preview-box { background: #eef1f6; padding: 12px; border-radius: var(--radius); margin: 12px 0; }
.day-grid { display: flex; flex-wrap: wrap; gap: 4px; font-size: 0.85rem; }
.day-grid span { padding: 2px 6px; border-radius: 3px; background: #eee; }
.day-grid .work { background: #e8eefc; }
.day-grid .half { background: var(--warn-bg); }
