:root {
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: #162846;
  background: #f5f7fb;
  font-size: 14px;
  line-height: 1.55;
  font-synthesis: none;
  --accent: #315bcc;
  --muted: #69788f;
  --line: #e4e9f2;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  outline-offset: 4px;
}
button,
a {
  touch-action: manipulation;
}
a {
  color: var(--accent);
}
h1,
h2,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1px;
  line-height: 1.2;
  margin-bottom: 12px;
}
h2 {
  font-size: 17px;
  letter-spacing: -0.3px;
  margin: 0;
}
p {
  margin-bottom: 16px;
}
.shell {
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 30px 20px;
  display: flex;
  flex-direction: column;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 42px;
}
.brand > div {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}
.brand > div > span {
  font-size: 12px;
  color: var(--muted);
}
.brand-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #173a7e;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 1px;
}
.nav-label,
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.7px;
  font-weight: 700;
  color: #7c8aa0;
}
.nav-label {
  margin: 0 12px 14px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.sidebar nav a {
  padding: 12px 10px;
  display: flex;
  gap: 13px;
  color: #65748b;
  text-decoration: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 550;
}
.sidebar nav a:hover {
  background: #f6f8fc;
}
.sidebar nav a.active {
  background: #eaf0fe;
  color: #244fb9;
}
.nav-number {
  font-size: 10px;
  align-self: center;
  opacity: 0.65;
}
.sidebar-footer {
  margin-top: auto;
  font-size: 12px;
  color: #7c8aa0;
  padding-top: 28px;
}
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2c9d79;
  margin-right: 8px;
}
.main {
  min-width: 0;
}
.topbar {
  height: 82px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 42px;
  gap: 16px;
}
.topbar .muted {
  font-size: 12px;
}
.user {
  display: flex;
  align-items: center;
  gap: 14px;
}
.user strong {
  font-size: 12px;
}
#page {
  max-width: 1500px;
  margin: auto;
  padding: 38px 42px 70px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}
.page-heading .eyebrow {
  margin-bottom: 10px;
}
.page-heading p:last-child {
  margin-bottom: 0;
}
.muted {
  color: var(--muted);
  font-size: 13px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  border-radius: 7px;
  padding: 11px 17px;
  font-weight: 650;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
.button:hover {
  background: #244cb9;
}
.button.secondary {
  color: #415878;
  background: #fff;
  border-color: #dce3ee;
}
.button:disabled {
  opacity: 0.5;
  cursor: wait;
}
.button.wide {
  width: 100%;
}
.text-link {
  font-weight: 600;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.text-link:hover {
  text-decoration: underline;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 25px;
  margin-bottom: 22px;
  min-width: 0;
}
.card-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 20px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 23px 20px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.stat strong {
  font-size: 30px;
  letter-spacing: -1px;
  font-weight: 650;
}
.stat .eyebrow {
  font-size: 9px;
}
.stat .muted {
  font-size: 11px;
}
.grid-two {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 22px;
}
.grid-two > .card {
  height: calc(100% - 22px);
}
.badge {
  display: inline-flex;
  background: #edf1f7;
  color: #526781;
  padding: 4px 9px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.2px;
}
.badge.success {
  color: #18785b;
  background: #e8f6ef;
}
.badge.warning {
  color: #976020;
  background: #fff3dc;
}
.note {
  padding: 14px 17px;
  background: #edf2fd;
  border: 1px solid #dce6fc;
  border-radius: 7px;
  color: #42638e;
  font-size: 12px;
  margin-bottom: 20px;
}
.note.warning {
  background: #fff8e9;
  border-color: #f3e4c0;
  color: #866122;
}
.note.error {
  background: #fff0f0;
  color: #9f3737;
  border-color: #f4d4d4;
}
.note.success {
  background: #eff8f4;
  border-color: #dbece4;
  color: #348366;
}
.table-wrap {
  overflow: auto;
}
table {
  border-collapse: collapse;
  text-align: left;
  width: 100%;
  white-space: nowrap;
  font-size: 12px;
}
th {
  color: #8290a3;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  padding: 0 12px 12px;
}
td {
  padding: 14px 12px;
  border-bottom: 1px solid #f0f3f8;
}
td:first-child,
th:first-child {
  padding-left: 0;
}
tr:last-child td {
  border-bottom: 0;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 22px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
}
.field small {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
}
input,
select,
textarea {
  background: #fff;
  border: 1px solid #d9e1ed;
  border-radius: 6px;
  min-height: 42px;
  padding: 10px 12px;
  min-width: 0;
  width: 100%;
  color: #263b5a;
}
input[type="checkbox"] {
  width: 17px;
  min-height: 17px;
  accent-color: var(--accent);
  align-self: flex-start;
}
.checks {
  display: flex;
  gap: 28px;
  margin: 10px 0 22px;
}
.checks .field {
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
}
textarea {
  resize: vertical;
}
.actions,
.spread {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 10px 0;
}
.chart svg {
  width: 100%;
  display: block;
  min-height: 190px;
}
.chart .spread {
  font-size: 10px;
}
.empty,
.loading {
  padding: 32px;
  color: var(--muted);
  text-align: center;
}
.loading {
  min-height: 120px;
}
.download-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 20px 0;
}
details {
  margin: 16px 0;
}
summary {
  font-size: 12px;
  color: var(--accent);
  cursor: pointer;
}
pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 450px;
  overflow: auto;
  background: #f6f8fc;
  padding: 18px;
  border-radius: 6px;
  font-size: 11px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 30px;
  max-width: 480px;
  width: 90%;
}
dialog::backdrop {
  background: #13234266;
}
dialog h2 {
  margin-bottom: 20px;
}
dialog .button {
  margin: 20px 8px 0 0;
}
.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 10% 10%, #dce7fc, transparent 50%), #f5f7fb;
  padding: 30px;
}
.login-card {
  max-width: 460px;
  background: #fff;
  padding: 46px;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 25px 80px #1d3c7810;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.login-card h1 {
  font-size: 37px;
  margin: 0;
}
.login-card p {
  color: var(--muted);
  margin: 0;
}
.login-card small {
  font-size: 11px;
  color: #8a97aa;
}
.login-card .eyebrow {
  color: var(--accent);
}
#notification {
  display: none;
  position: fixed;
  bottom: 28px;
  right: 28px;
  max-width: 460px;
  padding: 17px 22px;
  background: #173a67;
  color: #fff;
  border-radius: 9px;
  box-shadow: 0 4px 30px #16284625;
  z-index: 100;
  font-size: 13px;
}
#notification.show {
  display: block;
}
#notification.error {
  background: #963e3e;
}
@media (max-width: 1100px) {
  .shell {
    grid-template-columns: 205px minmax(0, 1fr);
  }
  #page {
    padding: 28px 24px;
  }
  .topbar {
    padding: 0 24px;
  }
  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-two {
    grid-template-columns: 1fr;
  }
  .user strong {
    display: none;
  }
}
@media (max-width: 720px) {
  .shell {
    display: block;
  }
  .sidebar {
    position: relative;
    height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand {
    margin: 0 0 16px;
  }
  .sidebar nav {
    flex-direction: row;
    overflow: auto;
    gap: 5px;
  }
  .sidebar nav a {
    white-space: nowrap;
    padding: 10px;
  }
  .sidebar-footer,
  .nav-label,
  .nav-number {
    display: none;
  }
  .topbar {
    height: 64px;
    padding: 0 18px;
  }
  .topbar > .muted {
    display: none;
  }
  .user {
    margin-left: auto;
  }
  #page {
    padding: 24px 16px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  h1 {
    font-size: 28px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 18px;
  }
  .stat {
    padding: 18px 14px;
  }
  .stat strong {
    font-size: 25px;
  }
  .checks {
    flex-direction: column;
    gap: 12px;
  }
  .login-card {
    padding: 30px;
  }
  #notification {
    left: 16px;
    right: 16px;
    bottom: 16px;
  }
}

.team-choice {
  margin: -18px 0 24px;
}
.team-choice select {
  font-size: 12px;
  background: #f6f8fc;
  border-color: #e4e9f2;
}
.login-card form .button {
  margin-top: 14px;
}
.card > form > .button {
  margin-top: 18px;
}
/* Long navigation remains usable with operational and analytical screens. */
.sidebar {
  padding: 22px 16px;
}
.sidebar .brand {
  margin-bottom: 18px;
  flex-shrink: 0;
}
.sidebar nav {
  overflow-y: auto;
  min-height: 0;
  gap: 2px;
}
.sidebar nav a {
  padding: 9px 10px;
  flex-shrink: 0;
}
.sidebar-footer {
  padding-top: 18px;
  flex-shrink: 0;
}
.team-choice {
  flex-shrink: 0;
}
.condition-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr 0.8fr auto;
  align-items: end;
  gap: 12px;
  margin: 14px 0;
}
.condition-row button {
  margin-bottom: 14px;
}
.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin: 20px 0;
}
.bar-list {
  display: grid;
  gap: 12px;
  padding: 16px 0;
}
.bar-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) 2fr auto;
  gap: 12px;
  align-items: center;
}
.bar-row > span {
  overflow-wrap: anywhere;
  font-size: 12px;
}
.bar-track {
  height: 12px;
  background: #edf1fb;
  border-radius: 4px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: #456ad6;
  border-radius: 4px;
}
select[multiple] {
  min-height: 105px;
}
@media (max-width: 900px) {
  .condition-row {
    grid-template-columns: 1fr 1fr;
  }
}
