:root {
  --ink: #10233e;
  --muted: #64748b;
  --line: #e4eaf2;
  --canvas: #f3f6fa;
  --panel: #ffffff;
  --nav: #102a4c;
  --nav-deep: #0b203a;
  --primary: #1769e0;
  --primary-dark: #0f55bb;
  --primary-soft: #eaf2ff;
  --cyan: #0ea5a8;
  --blue: #2f80ed;
  --yellow: #e5a000;
  --red: #e44855;
  --green: #16a36a;
  --shadow: 0 8px 24px rgba(30, 58, 95, 0.08);
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

body {
  margin: 0;
  min-width: 1180px;
  color: var(--ink);
  background: var(--canvas);
}

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

button {
  cursor: pointer;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  background:
    radial-gradient(circle at 18% 20%, rgba(40, 128, 237, 0.22), transparent 34%),
    linear-gradient(135deg, #092344 0%, #103e78 52%, #1769e0 100%);
}

.login-intro {
  padding: 72px 6.5vw;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-intro::after {
  content: "";
  position: absolute;
  right: -160px;
  bottom: -180px;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 62px rgba(255, 255, 255, 0.035),
    0 0 0 132px rgba(255, 255, 255, 0.025);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-emblem {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 21px;
}

.login-copy {
  max-width: 660px;
  position: relative;
  z-index: 1;
}

.login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.login-copy h1 {
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.18;
  margin: 22px 0 18px;
  letter-spacing: -0.03em;
}

.login-copy p {
  margin: 0;
  max-width: 580px;
  color: rgba(255, 255, 255, 0.75);
  font-size: 17px;
  line-height: 1.9;
}

.closed-loop {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.loop-chip {
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 13px;
}

.loop-arrow {
  color: rgba(255, 255, 255, 0.45);
}

.login-footnote {
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
  position: relative;
  z-index: 1;
}

.login-panel-wrap {
  background: #f7f9fc;
  padding: 46px 7vw;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: min(520px, 100%);
}

.login-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.login-card > p {
  color: var(--muted);
  margin: 0 0 28px;
}

.form-label {
  display: block;
  margin: 15px 0 7px;
  color: #33465f;
  font-size: 14px;
  font-weight: 600;
}

.input,
.select,
.textarea {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  border: 1px solid #d8e0eb;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  outline: none;
  transition: 0.18s ease;
}

.textarea {
  min-height: 96px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23, 105, 224, 0.1);
}

.btn {
  min-height: 39px;
  padding: 8px 16px;
  border: 0;
  border-radius: 8px;
  color: #334155;
  background: #eef2f7;
  font-weight: 600;
  transition: 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(0.98);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid #bad2f5;
}

.btn-danger {
  color: #b4232f;
  background: #fff0f1;
}

.btn-sm {
  min-height: 31px;
  padding: 5px 10px;
  font-size: 12px;
}

.login-submit {
  width: 100%;
  min-height: 46px;
  margin-top: 22px;
}

.demo-title {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 28px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.demo-title::before,
.demo-title::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 9px;
}

.demo-account {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  text-align: left;
  background: #fff;
  color: #34475e;
}

.demo-account:hover {
  border-color: #9bc0f7;
  background: var(--primary-soft);
}

.demo-account strong,
.demo-account span {
  display: block;
}

.demo-account strong {
  font-size: 13px;
}

.demo-account span {
  color: var(--muted);
  font-size: 11px;
  margin-top: 3px;
}

.demo-warning {
  margin-top: 14px;
  color: #896616;
  font-size: 12px;
  line-height: 1.7;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, var(--nav), var(--nav-deep));
  color: #fff;
  position: fixed;
  inset: 0 auto 0 0;
  width: 244px;
  overflow-y: auto;
  z-index: 20;
}

.side-brand {
  height: 72px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.side-brand .brand-emblem {
  width: 38px;
  height: 38px;
  font-size: 17px;
}

.side-brand strong,
.side-brand small {
  display: block;
}

.side-brand strong {
  font-size: 14px;
}

.side-brand small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

.side-nav {
  padding: 14px 12px 30px;
}

.nav-group-label {
  margin: 18px 11px 7px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.nav-item {
  width: 100%;
  height: 42px;
  margin: 3px 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  text-align: left;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(44, 126, 236, 0.78), rgba(48, 138, 255, 0.35));
  box-shadow: inset 3px 0 #65b0ff;
}

.nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.main-shell {
  grid-column: 2;
  min-width: 0;
}

.topbar {
  height: 72px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 15;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.breadcrumb {
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb strong {
  color: var(--ink);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 13px;
}

.prototype-badge {
  padding: 6px 10px;
  border-radius: 999px;
  color: #685018;
  background: #fff7dc;
  border: 1px solid #f5dfa0;
  font-size: 11px;
}

.avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #2c7fec, #1558b7);
  font-weight: 700;
}

.mini-avatar {
  width: 29px;
  height: 29px;
  display: inline-grid;
  margin-right: 9px;
  border-radius: 8px;
  vertical-align: middle;
  font-size: 11px;
}

.user-meta {
  line-height: 1.25;
}

.user-meta strong,
.user-meta small {
  display: block;
}

.user-meta strong {
  font-size: 13px;
}

.user-meta small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.logout-link {
  border: 0;
  color: var(--muted);
  background: transparent;
}

.content {
  padding: 28px;
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.page-head h1 {
  margin: 0;
  font-size: 25px;
  letter-spacing: -0.02em;
}

.page-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-strip {
  min-height: 122px;
  padding: 24px 27px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  border-radius: var(--radius);
  color: #fff;
  background:
    linear-gradient(100deg, rgba(8, 57, 112, 0.96), rgba(24, 110, 219, 0.93)),
    #1769e0;
  box-shadow: var(--shadow);
}

.hero-strip::after {
  content: "";
  position: absolute;
  width: 310px;
  height: 310px;
  right: -80px;
  border-radius: 50%;
  border: 42px solid rgba(255, 255, 255, 0.055);
  box-shadow: 0 0 0 40px rgba(255, 255, 255, 0.035);
}

.hero-strip h2 {
  margin: 0 0 8px;
  font-size: 21px;
}

.hero-strip p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
}

.hero-date {
  position: relative;
  z-index: 1;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  text-align: right;
}

.hero-date strong,
.hero-date small {
  display: block;
}

.hero-date small {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.66);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.process-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.process-stats:has(.stat-card:nth-child(4):last-child) {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat-card {
  padding: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #ebeff5;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 3px 12px rgba(30, 58, 95, 0.045);
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
}

.stat-value {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.04em;
}

.stat-note {
  margin-top: 7px;
  color: #7b8ba1;
  font-size: 10px;
}

.stat-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
}

.stat-icon-cyan {
  color: #087f82;
  background: #e5f8f7;
}

.stat-icon-green {
  color: #16885c;
  background: #e7f8f1;
}

.stat-icon-yellow {
  color: #a66d00;
  background: #fff5d9;
}

.stat-icon-red {
  color: #c6313f;
  background: #ffedf0;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1.18fr 0.82fr;
  gap: 16px;
  margin-bottom: 16px;
}

.panel {
  border: 1px solid #e9edf3;
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: 0 3px 14px rgba(30, 58, 95, 0.04);
}

.panel-head {
  min-height: 58px;
  padding: 0 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid #edf1f5;
}

.panel-head h3 {
  margin: 0;
  font-size: 15px;
}

.panel-body {
  padding: 18px 19px;
}

.legend {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--muted);
  font-size: 11px;
}

.legend i {
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 5px;
  border-radius: 50%;
}

.bar-chart {
  min-height: 205px;
  display: flex;
  align-items: flex-end;
  gap: 26px;
  padding: 16px 12px 3px;
  border-bottom: 1px solid var(--line);
  background: repeating-linear-gradient(to top, transparent 0 47px, #eff3f7 48px);
}

.bar-item {
  min-width: 90px;
  height: 175px;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-direction: column;
  gap: 7px;
}

.bar-value {
  color: var(--muted);
  font-size: 11px;
}

.bar {
  width: min(62px, 70%);
  min-height: 5px;
  border-radius: 7px 7px 2px 2px;
  background: linear-gradient(#52a0ff, #1769e0);
  box-shadow: 0 4px 12px rgba(23, 105, 224, 0.2);
}

.bar-name {
  width: 100%;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.severity-list {
  display: grid;
  gap: 14px;
}

.severity-row {
  display: grid;
  grid-template-columns: 74px 1fr 40px;
  align-items: center;
  gap: 12px;
}

.severity-label {
  font-size: 12px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf1f5;
}

.progress > i {
  height: 100%;
  display: block;
  border-radius: inherit;
}

.progress-blue { background: var(--blue); }
.progress-yellow { background: var(--yellow); }
.progress-red { background: var(--red); }
.progress-green { background: var(--green); }

.data-table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  padding: 12px 14px;
  color: #64748b;
  background: #f7f9fc;
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf1f5;
  color: #34465c;
  vertical-align: middle;
}

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

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

.primary-cell {
  color: var(--ink);
  font-weight: 650;
}

.secondary-cell {
  display: block;
  margin-top: 4px;
  color: #8694a6;
  font-size: 10px;
}

.report-cell {
  max-width: 230px;
  line-height: 1.65;
}

.comment-text {
  display: block;
  max-width: 180px;
  color: #36506f;
  line-height: 1.55;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  white-space: nowrap;
}

.tag::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.tag-blue {
  color: #1769e0;
  background: #eaf2ff;
}

.tag-green {
  color: #16885c;
  background: #e7f8f1;
}

.tag-yellow {
  color: #a66d00;
  background: #fff5d9;
}

.tag-red {
  color: #c6313f;
  background: #ffedf0;
}

.tag-gray {
  color: #66758a;
  background: #eef2f6;
}

.toolbar {
  min-height: 66px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.filters,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search {
  width: 230px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #dbe3ed;
  border-radius: 8px;
  outline: none;
}

.search:focus {
  border-color: var(--primary);
}

.filter-select {
  min-width: 126px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid #dbe3ed;
  border-radius: 8px;
  color: #52657c;
  background: #fff;
}

.empty {
  padding: 54px 20px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  margin-bottom: 10px;
  font-size: 30px;
  opacity: 0.5;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 30px;
  background: rgba(7, 21, 38, 0.48);
  backdrop-filter: blur(3px);
}

.modal {
  width: min(680px, 96vw);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(9, 31, 57, 0.25);
}

.modal-wide {
  width: min(880px, 96vw);
}

.modal-head {
  padding: 18px 21px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.modal-head h3 {
  margin: 0;
  font-size: 17px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  background: #f1f4f7;
}

.modal-body {
  padding: 20px 21px;
}

.modal-foot {
  padding: 15px 21px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  border-top: 1px solid var(--line);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3px 16px;
}

.form-span-2 {
  grid-column: span 2;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.detail-item {
  padding: 12px;
  border-radius: 9px;
  background: #f6f8fb;
}

.detail-item label,
.detail-item strong {
  display: block;
}

.detail-item label {
  color: var(--muted);
  font-size: 10px;
  margin-bottom: 6px;
}

.detail-item strong {
  font-size: 12px;
}

.incident-summary {
  padding: 15px;
  margin: 16px 0;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  color: #34465d;
  background: #f2f7ff;
  line-height: 1.8;
  font-size: 12px;
}

.incident-evidence {
  margin: 0 0 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.incident-evidence-title {
  margin-bottom: 10px;
  color: #34465d;
  font-size: 12px;
  font-weight: 700;
}

.incident-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}

.incident-evidence-grid a {
  display: block;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6f8fb;
}

.incident-evidence-grid img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.incident-evidence-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.timeline {
  margin: 10px 0 0 8px;
  padding-left: 22px;
  border-left: 2px solid #dce7f5;
}

.timeline-item {
  padding: 0 0 18px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -28px;
  top: 3px;
  width: 10px;
  height: 10px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 1px #9fc4f7;
}

.timeline-item strong {
  font-size: 12px;
}

.timeline-item p {
  margin: 5px 0;
  color: #50637a;
  font-size: 12px;
}

.timeline-item small {
  color: #8a99aa;
  font-size: 10px;
}

.notice-box {
  padding: 14px 16px;
  border: 1px solid #f1d688;
  border-radius: 10px;
  color: #725713;
  background: #fff9e9;
  font-size: 12px;
  line-height: 1.8;
}

.rule-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.account-section {
  margin-bottom: 16px;
}

.panel-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.account-toolbar {
  margin-top: 4px;
  border-top: 1px solid var(--line);
}

.account-code {
  display: inline-block;
  padding: 4px 7px;
  border-radius: 6px;
  color: #245b91;
  background: #eef6ff;
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
}

.account-actions {
  min-width: 210px;
  white-space: nowrap;
}

.activation-result {
  padding: 24px;
  border: 1px solid #cfe0f5;
  border-radius: 12px;
  text-align: center;
  background: linear-gradient(145deg, #f4f9ff, #edf5ff);
}

.activation-result p,
.activation-result span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.activation-result strong {
  display: block;
  margin: 14px 0 10px;
  color: var(--primary);
  font-family: Consolas, monospace;
  font-size: 34px;
  letter-spacing: 8px;
}

.rule-flow {
  justify-content: center;
  padding: 10px 0;
}

.policy-list {
  margin: 0;
  padding-left: 20px;
  color: #50637a;
  font-size: 12px;
  line-height: 1.9;
}

.policy-list li + li {
  margin-top: 5px;
}

.rule-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.rule-card h3 {
  margin: 0 0 9px;
  font-size: 15px;
}

.rule-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.level-line {
  height: 4px;
  margin: -18px -18px 15px;
  border-radius: 12px 12px 0 0;
}

.flow {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.flow-step {
  padding: 8px 10px;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  color: #34516f;
  background: #f6f9fd;
  font-size: 11px;
}

.flow-current {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 4px 12px rgba(23, 105, 224, 0.18);
}

.flow-arrow {
  color: #9badc1;
}

.check-line {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #dbe3ed;
  border-radius: 9px;
  font-weight: 500;
}

.incident-headline {
  margin-bottom: 15px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.incident-headline h3 {
  margin: 11px 0 5px;
  font-size: 20px;
}

.incident-headline p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.deadline-box {
  min-width: 180px;
  padding: 12px 14px;
  border: 1px solid #dce7f5;
  border-radius: 10px;
  text-align: right;
  background: #f6f9fd;
}

.deadline-box small,
.deadline-box strong {
  display: block;
}

.deadline-box small {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 10px;
}

.deadline-box strong {
  font-size: 12px;
}

.deadline-overdue {
  color: #b4232f;
  border-color: #f1b8bd;
  background: #fff0f1;
}

.incident-controls {
  padding: 14px;
  border: 1px solid #e4eaf2;
  border-radius: 10px;
  background: #f8fafc;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.exceptional-row {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px dashed #d7e0ea;
}

.loading {
  min-height: 300px;
  display: grid;
  place-items: center;
  color: var(--muted);
}

.spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #d8e5f5;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

#toast-root {
  position: fixed;
  right: 24px;
  top: 88px;
  z-index: 200;
  display: grid;
  gap: 9px;
}

.toast {
  min-width: 270px;
  padding: 12px 14px;
  border: 1px solid #d9e4f2;
  border-radius: 10px;
  color: #33465d;
  background: #fff;
  box-shadow: var(--shadow);
  animation: toast-in 0.2s ease-out;
  font-size: 12px;
}

.toast.success {
  border-left: 4px solid var(--green);
}

.toast.error {
  border-left: 4px solid var(--red);
}

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

@media (max-width: 1320px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
