:root {
  color-scheme: light;
  --navy-950: #071522;
  --navy-900: #0b1f33;
  --navy-800: #11314e;
  --teal-600: #00a98f;
  --teal-500: #0ac4a5;
  --teal-100: #d9f8f1;
  --blue-100: #e8f2fb;
  --paper: #ffffff;
  --canvas: #f3f6f8;
  --ink: #192633;
  --muted: #667685;
  --line: #dce4e9;
  --green: #159b68;
  --green-soft: #e2f6ed;
  --amber: #d38413;
  --amber-soft: #fff2d8;
  --red: #d84855;
  --red-soft: #fde8eb;
  --purple: #7456b9;
  --shadow-sm: 0 1px 2px rgb(11 31 51 / 6%), 0 4px 16px rgb(11 31 51 / 5%);
  --shadow-lg: 0 18px 55px rgb(11 31 51 / 16%);
  --radius: 16px;
  --radius-sm: 10px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--canvas);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% -10%, rgb(10 196 165 / 10%), transparent 30rem),
    var(--canvas);
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(340px, 0.88fr) minmax(520px, 1.12fr);
  min-height: 100vh;
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100vh;
  padding: clamp(2rem, 6vw, 5.5rem);
  overflow: hidden;
  color: #fff;
  background: var(--navy-900);
}

.login-brand::before,
.login-brand::after {
  position: absolute;
  content: "";
  border-radius: 50%;
  pointer-events: none;
}

.login-brand::before {
  right: -15rem;
  bottom: -16rem;
  width: 38rem;
  height: 38rem;
  border: 1px solid rgb(21 214 179 / 35%);
  box-shadow: 0 0 0 5rem rgb(21 214 179 / 5%), 0 0 0 10rem rgb(21 214 179 / 3%);
}

.login-brand::after {
  top: 18%;
  right: 15%;
  width: 9rem;
  height: 9rem;
  background: rgb(21 214 179 / 8%);
  filter: blur(1px);
}

.brand-mark,
.sidebar-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  color: var(--navy-900);
  background: var(--teal-500);
  font-weight: 900;
  font-size: 1.4rem;
}

.brand-title {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-subtitle {
  margin: 0.2rem 0 0;
  color: #9eb2c4;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.login-statement {
  position: relative;
  z-index: 1;
  max-width: 36rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--teal-600);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.login-statement .eyebrow {
  color: var(--teal-500);
}

.login-statement h1 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.5rem, 5vw, 5.25rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.login-statement p:last-child {
  max-width: 33rem;
  margin: 1.75rem 0 0;
  color: #aec0ce;
  font-size: 1.03rem;
  line-height: 1.75;
}

.login-foot {
  position: relative;
  z-index: 1;
  color: #7890a4;
  font-size: 0.8rem;
}

.login-panel {
  display: grid;
  min-height: 100vh;
  padding: 2rem;
  place-items: center;
}

.login-card {
  width: min(100%, 430px);
  padding: clamp(2rem, 5vw, 3.25rem);
  border: 1px solid rgb(220 228 233 / 80%);
  border-radius: 24px;
  background: rgb(255 255 255 / 92%);
  box-shadow: var(--shadow-lg);
}

.login-card h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1.9rem;
  letter-spacing: -0.035em;
}

.login-card > p {
  margin: 0.7rem 0 2rem;
  color: var(--muted);
  line-height: 1.55;
}

.demo-note {
  margin-top: 1.5rem;
  padding: 1rem;
  border: 1px solid #c7eee6;
  border-radius: var(--radius-sm);
  color: #31655d;
  background: #effbf8;
  font-size: 0.82rem;
  line-height: 1.6;
}

.demo-note code {
  color: var(--navy-800);
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 60;
  top: 0;
  left: 0;
  display: flex;
  width: min(284px, calc(100vw - 2rem));
  flex-direction: column;
  height: 100vh;
  padding: 1.4rem 1rem 1rem;
  overflow-y: auto;
  color: #fff;
  background: var(--navy-900);
  box-shadow: 18px 0 45px rgb(7 21 34 / 22%);
  transform: translateX(-102%);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

body.menu-open {
  overflow: hidden;
}

body.menu-open .sidebar {
  transform: translateX(0);
}

.sidebar-brand {
  padding: 0.35rem 0.55rem 1.5rem;
}

.sidebar-close {
  flex: 0 0 auto;
  margin-left: auto;
}

.sidebar-brand .brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 1.15rem;
}

.sidebar-brand .brand-title {
  font-size: 0.94rem;
}

.sidebar-brand .brand-subtitle {
  font-size: 0.68rem;
}

.nav-label {
  margin: 0.75rem 0.75rem 0.55rem;
  color: #6f899f;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.nav-list {
  display: grid;
  gap: 0.25rem;
}

.nav-link {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0.85rem;
  border: 0;
  border-radius: 10px;
  color: #b5c5d2;
  background: transparent;
  text-align: left;
  font-size: 0.9rem;
  font-weight: 650;
  transition: 150ms ease;
}

.nav-link:hover {
  color: #fff;
  background: rgb(255 255 255 / 6%);
}

.nav-link.active {
  color: #fff;
  background: rgb(10 196 165 / 16%);
  box-shadow: inset 3px 0 var(--teal-500);
}

.nav-icon {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: currentColor;
  font-size: 1rem;
}

.sidebar-spacer {
  flex: 1;
}

.user-card {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem;
  border-top: 1px solid rgb(255 255 255 / 8%);
}

.user-card > div:nth-child(2) {
  min-width: 0;
}

.avatar {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: var(--navy-900);
  background: var(--teal-500);
  font-weight: 850;
}

.user-name {
  overflow: hidden;
  margin: 0;
  font-size: 0.82rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-role {
  margin: 0.15rem 0 0;
  color: #7790a4;
  font-size: 0.7rem;
  text-transform: capitalize;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: var(--paper);
}

.sidebar .icon-button {
  border-color: transparent;
  color: #8299aa;
  background: transparent;
}

.main-area {
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 2rem;
  border-bottom: 1px solid rgb(220 228 233 / 85%);
  background: rgb(255 255 255 / 88%);
  backdrop-filter: blur(14px);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-menu {
  display: inline-grid;
}

.breadcrumb {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.system-live {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px var(--green-soft);
}

.page {
  width: min(100%, 1536px);
  margin: 0 auto;
  padding: clamp(1.25rem, 3vw, 2.5rem);
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.6rem;
}

.page-heading h1 {
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.page-heading p {
  max-width: 720px;
  margin: 0.55rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.page-actions,
.button-row,
.filter-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #fff;
  background: var(--navy-900);
  font-weight: 750;
  font-size: 0.84rem;
  transition: 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgb(11 31 51 / 16%);
}

.button.primary {
  color: var(--navy-950);
  background: var(--teal-500);
}

.button.secondary {
  border-color: var(--line);
  color: var(--navy-800);
  background: var(--paper);
}

.button.danger {
  color: var(--red);
  background: var(--red-soft);
}

.button.small {
  min-height: 34px;
  padding: 0.45rem 0.7rem;
  font-size: 0.76rem;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.card {
  border: 1px solid rgb(220 228 233 / 85%);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.card-header h2,
.card-header h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1rem;
  letter-spacing: -0.015em;
}

.card-subtitle {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.77rem;
}

.card-body {
  padding: 1.2rem;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.metric-card {
  position: relative;
  min-height: 130px;
  overflow: hidden;
  padding: 1.15rem;
}

.metric-card::after {
  position: absolute;
  right: -1.2rem;
  bottom: -1.7rem;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: var(--teal-100);
  content: "";
}

.metric-label {
  position: relative;
  z-index: 1;
  margin: 0;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.metric-value {
  position: relative;
  z-index: 1;
  margin: 0.75rem 0 0;
  color: var(--navy-900);
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  font-weight: 850;
  letter-spacing: -0.045em;
}

.metric-meta {
  position: relative;
  z-index: 1;
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.72rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
  gap: 1rem;
  margin-top: 1rem;
}

.chart-card {
  min-height: 360px;
}

.chart-wrap {
  width: 100%;
  overflow: hidden;
}

.chart-wrap svg {
  display: block;
  width: 100%;
  height: 260px;
}

.chart-gridline {
  stroke: #e7edf1;
  stroke-width: 1;
}

.chart-axis-text {
  fill: #80909e;
  font-size: 10px;
}

.chart-actual {
  fill: none;
  stroke: #0d6389;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.chart-budget {
  fill: none;
  stroke: var(--teal-500);
  stroke-dasharray: 6 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.chart-point {
  fill: #fff;
  stroke: #0d6389;
  stroke-width: 2;
}

.chart-legend {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.74rem;
}

.legend-line {
  display: inline-block;
  width: 22px;
  margin-right: 0.4rem;
  border-top: 3px solid #0d6389;
  vertical-align: middle;
}

.legend-line.budget {
  border-color: var(--teal-500);
  border-top-style: dashed;
}

.reporting-panel {
  display: grid;
  min-height: 360px;
  align-content: start;
}

.progress-ring-wrap {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: center;
  gap: 1rem;
}

.progress-ring {
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
}

.progress-ring-bg,
.progress-ring-value {
  fill: none;
  stroke-width: 11;
}

.progress-ring-bg {
  stroke: #e9f0f3;
}

.progress-ring-value {
  stroke: var(--teal-500);
  stroke-linecap: round;
}

.progress-copy strong {
  display: block;
  color: var(--navy-900);
  font-size: 2rem;
  letter-spacing: -0.05em;
}

.progress-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.missing-list,
.alert-list,
.activity-list {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.missing-item,
.alert-item,
.activity-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid #edf1f3;
  font-size: 0.8rem;
}

.alert-item {
  padding: 0.8rem;
  border: 1px solid #f1d4d8;
  border-radius: 10px;
  background: #fff8f9;
}

.alert-item strong,
.activity-item strong {
  display: block;
  color: var(--navy-900);
  font-size: 0.8rem;
}

.alert-item span,
.activity-item span {
  display: block;
  margin-top: 0.2rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.admin-record-copy {
  min-width: 0;
}

.admin-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  white-space: nowrap;
}

.record-inactive {
  opacity: 0.62;
  background: #f8fafb;
}

.record-inactive:hover {
  opacity: 0.82;
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.department-tile {
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfdfd;
}

.department-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.department-tile h4 {
  overflow: hidden;
  margin: 0;
  color: var(--navy-900);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.department-tile p {
  display: -webkit-box;
  min-height: 2.5em;
  margin: 0.6rem 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  color: #485966;
  background: #edf2f4;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.badge.green,
.badge.complete,
.badge.closed {
  color: #0d7850;
  background: var(--green-soft);
}

.badge.amber,
.badge.medium,
.badge.in-progress,
.badge.waiting {
  color: #98610c;
  background: var(--amber-soft);
}

.badge.red,
.badge.critical,
.badge.overdue {
  color: #b82d3b;
  background: var(--red-soft);
}

.badge.high,
.badge.reviewed {
  color: #58419c;
  background: #eee9fa;
}

.badge.open,
.badge.low {
  color: #276b8d;
  background: var(--blue-100);
}

.empty-state {
  padding: 2.4rem 1rem;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--navy-900);
  font-size: 0.95rem;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.data-table th {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  color: #72828f;
  background: #f8fafb;
  text-align: left;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 0.85rem;
  border-bottom: 1px solid #edf1f3;
  color: #354552;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.data-table tbody tr:hover {
  background: #fbfdfd;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.cell-title {
  display: block;
  color: var(--navy-900);
  font-weight: 750;
}

.cell-meta {
  display: block;
  margin-top: 0.22rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.report-hero {
  overflow: hidden;
  margin-bottom: 1rem;
  color: #fff;
  background: var(--navy-900);
}

.report-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem;
  border-bottom: 1px solid rgb(255 255 255 / 10%);
}

.report-hero h2 {
  margin: 0;
  font-size: 1.35rem;
}

.report-hero p {
  margin: 0.35rem 0 0;
  color: #9fb4c4;
  font-size: 0.78rem;
}

.report-facts {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}

.report-fact {
  min-height: 94px;
  padding: 1rem 1.2rem;
  border-right: 1px solid rgb(255 255 255 / 9%);
}

.report-fact:last-child {
  border-right: 0;
}

.report-fact span {
  display: block;
  color: #7f9aae;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.report-fact strong {
  display: block;
  margin-top: 0.45rem;
  font-size: 1rem;
}

.report-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 1rem;
}

.stack {
  display: grid;
  min-width: 0;
  gap: 1rem;
  align-content: start;
}

.report-columns > * {
  min-width: 0;
}

.department-summary-table {
  table-layout: fixed;
}

.department-summary-table th:nth-child(1) { width: 15%; }
.department-summary-table th:nth-child(2) { width: 13%; }
.department-summary-table th:nth-child(3) { width: 12%; }
.department-summary-table th:nth-child(4) { width: 36%; }
.department-summary-table th:nth-child(5) { width: 24%; }

.report-summary-column .card,
.report-summary-column .card-body,
.direction-box {
  min-width: 0;
}

.direction-box {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.direction-box {
  padding: 1.1rem;
  border-left: 4px solid var(--teal-500);
  border-radius: 10px;
  color: #29444f;
  background: #effbf8;
  line-height: 1.6;
}

.form-card {
  max-width: 1050px;
}

.submission-lookup,
.submission-receipt {
  max-width: 1050px;
}

.submission-lookup {
  margin-bottom: 1rem;
  padding: 1.2rem 1.35rem;
}

.submission-receipt {
  overflow: hidden;
}

.submission-receipt-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 1.6rem auto 0;
  place-items: center;
  border-radius: 50%;
  color: #0d7850;
  background: var(--green-soft);
  font-size: 1.6rem;
  font-weight: 850;
}

.submission-receipt-copy {
  padding: 1rem 1.35rem 1.35rem;
  text-align: center;
}

.submission-receipt-copy h2 {
  margin: 0.35rem 0 0;
  color: var(--navy-900);
  font-size: 1.35rem;
}

.submission-receipt-copy > p:last-child {
  margin: 0.55rem 0 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.submission-receipt-details {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-top: 1px solid var(--line);
  background: var(--line);
}

.submission-receipt-details > div {
  min-width: 0;
  padding: 1rem 1.2rem;
  background: #fff;
}

.submission-receipt-details span {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.submission-receipt-details strong {
  color: var(--navy-900);
  font-size: 0.82rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.submission-receipt-details .submission-receipt-update {
  grid-column: 1 / -1;
}

.form-section {
  padding: 1.35rem;
  border-bottom: 1px solid var(--line);
}

.form-section:last-child {
  border-bottom: 0;
}

.form-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1.15rem;
}

.section-number {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: var(--navy-950);
  background: var(--teal-100);
  font-size: 0.75rem;
  font-weight: 850;
}

.form-section-heading h3 {
  margin: 0;
  color: var(--navy-900);
  font-size: 0.96rem;
}

.form-section-heading p {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.45;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: grid;
  align-content: start;
  gap: 0.42rem;
}

.field.full {
  grid-column: 1 / -1;
}

.field label,
.field-label {
  color: #455662;
  font-size: 0.76rem;
  font-weight: 750;
}

.field small {
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.4;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid #cfd9df;
  border-radius: 10px;
  outline: 0;
  color: var(--ink);
  background: #fff;
  transition: 150ms ease;
}

.input,
.select {
  min-height: 43px;
  padding: 0.62rem 0.72rem;
}

.textarea {
  min-height: 96px;
  padding: 0.72rem;
  line-height: 1.5;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 3px rgb(10 196 165 / 12%);
}

.segmented {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.segment {
  position: relative;
}

.segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.segment span {
  display: inline-flex;
  min-width: 76px;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.8rem;
  border: 1px solid #cfd9df;
  border-radius: 10px;
  color: var(--muted);
  background: #fff;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
}

.segment input:checked + span {
  border-color: var(--teal-600);
  color: #087665;
  background: var(--teal-100);
  box-shadow: 0 0 0 2px rgb(10 196 165 / 9%);
}

.segment.status-green input:checked + span {
  border-color: var(--green);
  color: #0d7850;
  background: var(--green-soft);
}

.segment.status-amber input:checked + span {
  border-color: var(--amber);
  color: #8a5607;
  background: var(--amber-soft);
}

.segment.status-red input:checked + span {
  border-color: var(--red);
  color: #b82d3b;
  background: var(--red-soft);
}

.conditional-panel {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #cde8e2;
  border-radius: 12px;
  background: #f6fcfa;
}

.form-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.2rem 1.35rem;
  background: #f9fbfc;
  border-radius: 0 0 var(--radius) var(--radius);
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid #c9e7f5;
  border-radius: 12px;
  color: #315b70;
  background: #eff8fc;
  font-size: 0.8rem;
  line-height: 1.55;
}

.notice.warning {
  border-color: #edd39e;
  color: #71501a;
  background: #fff9eb;
}

.notice.danger {
  border-color: #f0c5ca;
  color: #84313a;
  background: #fff5f6;
}

.skeleton {
  position: relative;
  min-height: 120px;
  overflow: hidden;
  border-radius: var(--radius);
  background: #e9eef1;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 55%), transparent);
  content: "";
  transform: translateX(-100%);
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  to { transform: translateX(100%); }
}

.toast-region {
  position: fixed;
  z-index: 100;
  right: 1.2rem;
  bottom: 1.2rem;
  display: grid;
  width: min(380px, calc(100vw - 2.4rem));
  gap: 0.6rem;
}

.toast {
  padding: 0.9rem 1rem;
  border: 1px solid #bfe7dd;
  border-radius: 12px;
  color: #1b5f51;
  background: #effbf8;
  box-shadow: var(--shadow-lg);
  font-size: 0.82rem;
  animation: toast-in 180ms ease-out;
}

.toast.error {
  border-color: #efc0c6;
  color: #8c2935;
  background: #fff3f5;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

.modal-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  padding: 1rem;
  overflow-y: auto;
  place-items: center;
  background: rgb(7 21 34 / 55%);
  backdrop-filter: blur(5px);
}

.modal {
  width: min(100%, 720px);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.modal-header,
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  color: var(--navy-900);
  font-size: 1.05rem;
}

.modal-body {
  padding: 1.2rem;
}

.modal-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.mobile-overlay {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: block;
  visibility: hidden;
  background: rgb(7 21 34 / 45%);
  opacity: 0;
  transition:
    opacity 180ms ease,
    visibility 180ms ease;
}

body.menu-open .mobile-overlay {
  visibility: visible;
  opacity: 1;
}

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(3, 1fr); }
  .report-facts { grid-template-columns: repeat(3, 1fr); }
  .report-fact:nth-child(3) { border-right: 0; }
  .report-fact:nth-child(-n+3) { border-bottom: 1px solid rgb(255 255 255 / 9%); }
}

@media (max-width: 940px) {
  .login-page { grid-template-columns: 1fr; }
  .login-brand { display: none; }
  .dashboard-grid,
  .report-columns { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .submission-receipt-details { grid-template-columns: 1fr; }
  .submission-receipt-details .submission-receipt-update { grid-column: auto; }
  .topbar { min-height: 62px; padding: 0 1rem; }
  .system-live span:last-child { display: none; }
  .page { padding: 1rem; }
  .page-heading { align-items: flex-start; flex-direction: column; }
  .page-heading h1 { font-size: 1.9rem; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric-card { min-height: 112px; padding: 1rem; }
  .metric-grid .metric-card:first-child { grid-column: 1 / -1; }
  .status-grid { grid-template-columns: repeat(2, 1fr); }
  .field-grid,
  .field-grid.three { grid-template-columns: 1fr; }
  .report-facts { grid-template-columns: repeat(2, 1fr); }
  .report-fact { border-bottom: 1px solid rgb(255 255 255 / 9%); }
  .report-fact:nth-child(2n) { border-right: 0; }
  .progress-ring-wrap { grid-template-columns: 100px 1fr; }
  .progress-ring { width: 100px; height: 100px; }
  .data-table { min-width: 720px; }
  .activity-item { align-items: stretch; flex-direction: column; }
  .activity-item .admin-actions { justify-content: flex-start; }
}

@media (max-width: 460px) {
  .login-panel { padding: 1rem; }
  .login-card { padding: 1.5rem; border-radius: 18px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-grid .metric-card:first-child { grid-column: auto; }
  .status-grid { grid-template-columns: 1fr; }
  .form-footer { align-items: stretch; flex-direction: column-reverse; }
  .form-footer .button { width: 100%; }
}

@media print {
  body { background: #fff; }
  .sidebar,
  .topbar,
  .page-actions,
  .button,
  .notice { display: none !important; }
  .app-shell { display: block; }
  .page { max-width: none; padding: 0; }
  .card { break-inside: avoid; border-color: #bbb; box-shadow: none; }
}
