:root {
  --ink: #112437;
  --muted: #54697f;
  --paper: #f4f8fc;
  --card: #ffffff;
  --line: #d7e2ed;
  --accent: #0672a8;
  --good: #148061;
  --warn: #b77807;
  --bad: #b3414b;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(900px 360px at 110% -20%, #d8eef7 0%, transparent 58%),
    radial-gradient(780px 340px at -20% 100%, #ffe7dc 0%, transparent 58%),
    var(--paper);
  line-height: 1.45;
}

.wrap {
  width: min(1420px, calc(100vw - 14px));
  margin: 8px auto 14px;
}

.hero {
  border-radius: 20px;
  padding: 10px 12px;
  background: linear-gradient(125deg, #0d2f4f, #0672a8);
  color: #fff;
  box-shadow: 0 14px 30px rgba(13, 47, 79, 0.25);
}

.hero-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: clamp(36px, 4.8vw, 50px);
  height: auto;
  flex: 0 0 auto;
}

.title {
  margin: 0;
  font-family: "Outfit", "Manrope", sans-serif;
  font-size: clamp(22px, 3.1vw, 31px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.subtitle {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.95;
  max-width: 860px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.14);
  font-weight: 700;
  padding: 7px 11px;
  font-size: 12px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  cursor: pointer;
}

.btn:hover { background: rgba(255, 255, 255, 0.24); }

.meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.card {
  margin-top: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 10px 24px rgba(17, 36, 55, 0.08);
  padding: 10px;
}

.controls {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr auto auto;
  gap: 6px;
  align-items: end;
}

label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  color: #214158;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input {
  width: 100%;
  border: 1px solid #cad8e6;
  border-radius: 10px;
  padding: 7px 9px;
  font-size: 12px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: #fff;
  color: var(--ink);
}

.btn-light {
  border: 1px solid #c8d7e6;
  border-radius: 10px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  background: #f7fbff;
  color: #143954;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.btn-light.primary {
  border-color: #0d6f9f;
  background: #0d6f9f;
  color: #fff;
}

.helper {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.helper.good { color: var(--good); }
.helper.warn { color: var(--warn); }
.helper.bad { color: var(--bad); }

.table-shell {
  margin-top: 10px;
  border: 1px solid #dbe6f0;
  border-radius: 12px;
  overflow: auto;
  background: #fff;
  max-height: 70vh;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1220px;
}

th, td {
  border-bottom: 1px solid #e7eef5;
  text-align: left;
  padding: 6px;
  vertical-align: top;
  font-size: 11px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f8fd;
  color: #173a55;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

tr:nth-child(2n) td {
  background: #fbfdff;
}

.name {
  font-size: 13px;
  font-weight: 800;
  color: #123a55;
}

.subtext {
  margin-top: 2px;
  font-size: 11px;
  color: #577089;
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid #d2deea;
  background: #f8fbff;
  color: #36526a;
  white-space: nowrap;
}

.badge.warn {
  border-color: #e6d3a0;
  background: #fff8ea;
  color: #8d5e0b;
}

.badge.good {
  border-color: #a8d7c4;
  background: #edf9f3;
  color: #166349;
}

.row-notes {
  min-height: 54px;
  resize: vertical;
}

.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.empty {
  padding: 18px;
  color: #4b667f;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 980px) {
  .brand-lockup {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .brand-logo {
    width: min(50px, 16vw);
  }
  .controls {
    grid-template-columns: 1fr;
  }
  .table-shell {
    max-height: none;
  }
}
