:root {
  --navy: #14263F;
  --navy-light: #1E3A5F;
  --gold: #B6A178;
  --gold-soft: #F5F0E6;
  --bg: #F4F6F9;
  --card: #FFFFFF;
  --text: #172337;
  --muted: #64748B;
  --border: #E2E8F0;
  --ok: #1F7A4D;
  --warn: #C47A1A;
  --danger: #B54747;
  --radius: 8px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}
header#sc-nav {
  background: var(--navy);
  color: white;
  padding: 0 12px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  font-size: 12px;
}
header#sc-nav h1 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}
header#sc-nav .nav {
  display: flex;
  gap: 1px;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
}
header#sc-nav .nav a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 4px 7px;
  border-radius: 3px;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
}
header#sc-nav .nav a:hover {
  background: var(--navy-light);
  color: white;
}
body {
  padding-top: 36px !important;
}
/* Hide old page headers when shared nav is present */
body > header:not(#sc-nav) { display: none; }
.page { max-width: 1200px; margin: 0 auto; padding: 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.card h2 { margin: 0 0 12px; font-size: 15px; color: var(--navy); font-weight: 600; }
label { display: block; font-size: 11px; font-weight: 600; margin: 8px 0 4px; color: var(--navy); }
input, select, textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  background: white;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(182,161,120,0.15);
}
button.primary {
  padding: 8px 16px;
  background: var(--navy);
  color: white;
  border: none;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}
button.primary:hover { background: var(--navy-light); }
button.secondary {
  padding: 8px 16px;
  background: white;
  color: var(--navy);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
}
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.summary-bar {
  display: flex;
  gap: 16px;
  padding: 14px 20px;
  background: white;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.sum-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  min-width: 140px;
}
.sum-card .n { font-size: 20px; font-weight: 700; color: var(--navy); }
.sum-card .l { font-size: 11px; color: var(--muted); margin-top: 2px; }
table { width: 100%; border-collapse: collapse; }
th { background: var(--navy); color: white; text-align: left; padding: 8px 6px; font-size: 12px; font-weight: 600; }
td { padding: 7px 6px; border-bottom: 1px solid var(--border); }
tr:hover td { background: #F8FAFC; }
.note { font-size: 11px; color: var(--muted); padding: 8px 0; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
.badge.ok { background: #D1FAE5; color: var(--ok); }
.badge.warn { background: #FEF3C7; color: var(--warn); }
.badge.danger { background: #FEE2E2; color: var(--danger); }
