:root {
  --navy: #124273;
  --navy-deep: #0c3258;
  --line: #d5e3f0;
  --bg: #f3f7fb;
  --text: #16324d;
  --muted: #5c7388;
}
* { box-sizing: border-box; }
body.of-app {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Prompt", sans-serif;
}
a { color: var(--navy); }
button, input, select, textarea { font-family: inherit; font-size: 15px; }

.of-shell { display: flex; min-height: 100vh; align-items: stretch; }
.of-nav-toggle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.of-side {
  width: 260px;
  flex: 0 0 260px;
  background: linear-gradient(180deg, #0f4174 0%, #0c3258 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.of-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #fff;
  text-decoration: none;
  padding: 4px 10px 18px;
}
.of-brand span { font-size: 20px; font-weight: 700; line-height: 1.3; }
.of-brand small { color: rgba(255,255,255,.75); font-size: 12px; }
.of-side-nav { display: flex; flex-direction: column; gap: 4px; }
.of-side-label {
  margin: 16px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,.55);
}
.of-side-link {
  color: rgba(255,255,255,.9);
  text-decoration: none;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 500;
  white-space: nowrap;
}
.of-side-link:hover { background: rgba(255,255,255,.1); color: #fff; }
.of-side-link.is-on { background: rgba(255,255,255,.18); color: #fff; font-weight: 700; }
.of-side-foot {
  margin-top: auto;
  padding: 14px 12px 4px;
  border-top: 1px solid rgba(255,255,255,.16);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.of-side-foot strong { font-size: 14px; }
.of-side-foot a { color: rgba(255,255,255,.8); font-size: 13px; }

.of-main { flex: 1; min-width: 0; padding: 24px 28px 48px; }
.of-menu-btn { display: none; }
.of-dash { max-width: 1180px; }
.of-top, .of-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}
.of-kicker { margin: 0 0 4px; color: var(--muted); font-size: 13px; font-weight: 600; }
.of-top h1, .of-head h1 { margin: 0; font-size: 28px; color: var(--navy); line-height: 1.25; }
.of-note { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.of-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.of-kpi {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 16px 14px;
  box-shadow: 0 8px 20px rgba(18,66,115,.04);
}
.of-kpi span { display: block; color: var(--muted); font-size: 13px; }
.of-kpi strong { display: block; margin-top: 6px; font-size: 32px; line-height: 1; color: var(--navy); }
.of-kpi em { display: block; margin-top: 8px; font-style: normal; font-size: 12px; color: #1a5a96; }
.of-kpi.is-warn { box-shadow: inset 0 3px 0 #c48a2a; }

.of-split { display: grid; grid-template-columns: 1.3fr .7fr; gap: 14px; margin-top: 14px; }
.of-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.of-panel h2 { margin: 0 0 14px; font-size: 16px; color: var(--navy); }
.of-subhead { margin-top: 18px; }
.of-meter { display: grid; grid-template-columns: 92px 1fr 28px; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.of-meter span { color: #2c4a64; }
.of-meter b { text-align: right; color: var(--navy); }
.of-track { height: 8px; border-radius: 99px; background: #e7eef5; overflow: hidden; }
.of-track div { height: 100%; border-radius: 99px; background: linear-gradient(90deg, #1a5a96, #124273); }
.of-todo { margin: 0; padding: 0; list-style: none; }
.of-todo li { margin: 0 0 8px; }
.of-todo a { font-size: 14px; line-height: 1.45; }

.of-table-panel { margin-top: 14px; }
.of-panel-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.of-panel-head h2 { margin-bottom: 0; }
.of-search { display: flex; gap: 8px; flex-wrap: wrap; }
.of-search input[type="search"] { width: 260px; }
.of-table-wrap { overflow-x: auto; margin-top: 12px; }
.of-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.of-table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.of-table td { padding: 12px 10px; border-bottom: 1px solid #eef3f8; vertical-align: middle; font-size: 14px; }
.of-table tr:hover td { background: #f7fbfe; }
.of-code { color: var(--muted); font-size: 12px; white-space: nowrap; }
.of-title { display: block; color: #12304f; font-weight: 600; text-decoration: none; line-height: 1.4; }
.of-title:hover { text-decoration: underline; }
.of-table small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.of-row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.of-row-actions form { margin: 0; }
.of-row-actions .of-btn { min-height: 32px; padding: 4px 10px; font-size: 13px; }

.of-flash, .of-errors {
  background: #e7f2fb;
  border: 1px solid #b7d0e6;
  color: var(--navy-deep);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.of-errors { background: #fff4f4; border-color: #e7c1c1; color: #8a2a3a; }
.of-errors ul { margin: 0; padding-left: 18px; }
.of-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
  margin-bottom: 12px;
}
.of-pill {
  background: #e7f2fb;
  color: #0f4174;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.of-pill.wait { background: #f3f1ea; color: #8a5a12; }
.of-pill.draft { background: #fff4e5; color: #8a5a12; }
.of-btn, button.of-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 10px;
  border: 0;
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.of-btn:hover { background: #0f4174; color: #fff; }
.of-btn.ghost { background: #fff; color: var(--navy); border: 1px solid var(--navy); }
.of-btn.ghost:hover { background: #eef5fb; }
.of-btn.danger, button.of-btn.danger { background: #8d3a3a; color: #fff; }
.of-wrap { max-width: 920px; }
.of-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.of-field { display: flex; flex-direction: column; gap: 6px; }
.of-field.wide { grid-column: 1 / -1; }
.of-field span { font-size: 13px; font-weight: 600; color: var(--navy); }
.of-form h2 { margin: 8px 0 0; font-size: 16px; color: var(--navy); grid-column: 1 / -1; }
input[type="text"], input[type="url"], input[type="password"], input[type="number"], input[type="search"], input[type="date"], input[type="file"], select, textarea {
  width: 100%;
  border: 1.5px solid #c5d7e8;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f8fbfe;
  color: var(--text);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--navy);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(18,66,115,.15);
}
.of-check { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--navy); }
.of-help { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.of-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.of-login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(700px 240px at 80% 0%, rgba(255,255,255,.16), transparent 60%),
    linear-gradient(155deg, #0f4174, #124273 55%, #0c3258);
}
.of-login-card {
  width: 420px;
  max-width: 100%;
  background: #fff;
  border-radius: 18px;
  padding: 28px 24px;
  box-shadow: 0 16px 40px rgba(0,0,0,.2);
}
.of-login-card h1 { margin: 0 0 6px; color: var(--navy); font-size: 26px; }
.of-login-card p { margin: 0 0 16px; color: var(--muted); }
.of-login-card label { display: block; margin: 12px 0; }
.of-login-card label span { display: block; margin-bottom: 6px; font-weight: 600; color: var(--navy); }
.of-login-card button { width: 100%; margin-top: 8px; }

@media (max-width: 980px) {
  .of-kpis { grid-template-columns: 1fr 1fr; }
  .of-split { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .of-shell { display: block; }
  .of-side { display: none; width: 100%; height: auto; position: relative; }
  .of-nav-toggle:checked ~ .of-side { display: flex; }
  .of-menu-btn {
    display: inline-flex;
    margin-bottom: 8px;
    background: var(--navy);
    color: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
    cursor: pointer;
  }
  .of-main { padding: 16px; }
  .of-grid { grid-template-columns: 1fr; }
  .of-search input[type="search"] { width: 100%; }
}
@media (max-width: 560px) {
  .of-kpis, .of-top { grid-template-columns: 1fr; }
  .of-top { flex-direction: column; }
}
