:root {
  --bg: #f4f8ff;
  --surface: #ffffff;
  --surface-soft: #eef5ff;
  --ink: #10233f;
  --muted: #6d7b90;
  --line: #dbe7f6;
  --primary: #1677ff;
  --primary-dark: #005bd8;
  --cyan: #0099cc;
  --teal: #14b8a6;
  --orange: #ff7d00;
  --red: #e5484d;
  --violet: #722ed1;
  --nav: #06224a;
  --shadow: 0 18px 46px rgba(30, 64, 120, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(244, 248, 255, 0.96)),
    radial-gradient(circle at 88% 4%, rgba(22, 119, 255, 0.1), transparent 34%),
    var(--bg);
  font-family:
    Inter,
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
}

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

button {
  cursor: pointer;
}

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

.sidebar {
  min-height: 100vh;
  padding: 22px 16px;
  color: #fff;
  background: linear-gradient(180deg, #062a5c 0%, #03162f 100%);
  box-shadow: 10px 0 26px rgba(4, 31, 70, 0.16);
}

.brand,
.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand {
  min-height: 54px;
  margin-bottom: 24px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(22, 119, 255, 0.24);
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 17px;
}

.brand span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
  text-decoration: none;
}

.nav a:hover,
.nav a.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(22, 119, 255, 0.95), rgba(0, 153, 204, 0.78));
}

.workspace {
  min-width: 0;
  padding: 22px 28px 32px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  margin-bottom: 20px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 0;
  font-size: 17px;
}

.account {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 42px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

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

.metric,
.panel,
.login-box,
.login-stage,
.dialog-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  position: relative;
  min-height: 118px;
  padding: 18px 18px 18px 84px;
  overflow: hidden;
}

.metric::after {
  content: "";
  position: absolute;
  right: -28px;
  top: -28px;
  width: 94px;
  height: 94px;
  border-radius: 999px;
  background: rgba(22, 119, 255, 0.1);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.metric-icon {
  position: absolute;
  left: 20px;
  top: 28px;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  font-style: normal;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(22, 119, 255, 0.18);
}

.metric strong {
  display: block;
  margin: 14px 0 8px;
  font-size: 32px;
  line-height: 1;
}

.metric em {
  color: var(--teal);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.tone-2::after {
  background: rgba(20, 184, 166, 0.12);
}

.tone-3::after {
  background: rgba(255, 125, 0, 0.12);
}

.tone-4::after {
  background: rgba(114, 46, 209, 0.12);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.9fr);
  gap: 14px;
  margin-bottom: 14px;
}

.segmented {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border-radius: 8px;
  background: #eef5ff;
}

.segmented span {
  min-width: 58px;
  padding: 6px 10px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.segmented .active {
  color: var(--primary-dark);
  background: #fff;
  box-shadow: 0 4px 12px rgba(22, 119, 255, 0.12);
}

.toolbar {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

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

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

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  background: #f7faff;
}

td {
  font-size: 14px;
}

.photo-pair,
.row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.photo-pair button {
  width: 44px;
  height: 44px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 8px;
  background: transparent;
}

.photo-pair img {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

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

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

.form-grid .span-full {
  grid-column: 1 / -1;
}

.actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  min-height: 38px;
  padding: 0 15px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.ghost-button,
.icon-button {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.danger-button {
  color: var(--red);
  background: #fff7f7;
  border-color: rgba(229, 72, 77, 0.24);
}

.mini {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.wide {
  width: 100%;
}

.tag,
.pill,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.tag,
.pill {
  color: var(--primary-dark);
  background: var(--surface-soft);
}

.status.enabled {
  color: #0f8a5f;
  background: #e8fff5;
}

.status.disabled {
  color: var(--red);
  background: #fff0f0;
}

.panel {
  min-height: 260px;
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

select,
textarea,
input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}

textarea {
  min-height: 116px;
  padding-top: 10px;
  resize: vertical;
}

select:focus,
textarea:focus,
input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

label {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.distribution {
  display: grid;
  gap: 12px;
}

.dist-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 12px;
  overflow: hidden;
}

.dist-row::before,
.dist-row em {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  border-radius: 999px;
  background: #eef4fb;
}

.dist-row em {
  right: auto;
  background: linear-gradient(90deg, var(--primary), var(--cyan));
}

.dist-row span {
  min-width: 0;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 999px;
  background: var(--primary);
}

.dot-2 {
  background: var(--teal);
}

.dot-3 {
  background: var(--orange);
}

.dot-4 {
  background: var(--violet);
}

.dot-5 {
  background: var(--red);
}

.trend-line {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 14px;
  align-items: end;
  min-height: 220px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(#edf4ff 1px, transparent 1px) 0 0 / 100% 44px,
    #fbfdff;
}

.trend-line i {
  position: relative;
  display: block;
  min-height: 36px;
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--primary), var(--cyan));
}

.trend-line b {
  position: absolute;
  left: 50%;
  top: -6px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--cyan);
  transform: translateX(-50%);
}

.donut-summary {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  margin: 6px auto 20px;
  border-radius: 999px;
  background:
    radial-gradient(circle, #fff 0 44%, transparent 45%),
    conic-gradient(var(--primary) 0 38%, var(--cyan) 38% 60%, var(--teal) 60% 78%, var(--orange) 78% 90%, var(--violet) 90% 100%);
}

.donut-summary strong,
.donut-summary span {
  grid-area: 1 / 1;
}

.donut-summary strong {
  margin-top: -16px;
  font-size: 26px;
}

.donut-summary span {
  margin-top: 30px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

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

.quick-grid button {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--primary-dark);
  background: #f8fbff;
  font-weight: 900;
}

.quick-grid i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--cyan));
  font-style: normal;
}

.audit-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow: auto;
}

.audit-list article {
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.audit-list strong,
.audit-list span {
  display: block;
}

.audit-list span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.audit-list p {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 13px;
}

.settings-list {
  display: grid;
  gap: 12px;
}

.settings-list label {
  margin: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.login-mask {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(180deg, rgba(5, 42, 92, 0.12), rgba(5, 42, 92, 0.06)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='720' viewBox='0 0 1200 720'%3E%3Crect width='1200' height='720' fill='%23eaf4ff'/%3E%3Cpath d='M0 500 C160 430 250 470 390 420 C530 370 620 390 750 330 C900 260 1040 290 1200 220 L1200 720 L0 720Z' fill='%23cfe5ff'/%3E%3Cpath d='M0 570 C180 510 330 560 500 500 C690 430 820 460 990 390 C1080 350 1140 340 1200 320 L1200 720 L0 720Z' fill='%239dcaff'/%3E%3C/svg%3E")
      center / cover;
}

.login-mask.hidden {
  display: none;
}

.login-box {
  width: min(420px, 100%);
  padding: 28px;
}

.login-stage {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 420px;
  width: min(1060px, 100%);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid rgba(219, 231, 246, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 28px 70px rgba(4, 31, 70, 0.18);
  backdrop-filter: blur(10px);
}

.login-visual {
  position: relative;
  min-height: 520px;
  padding: 66px 58px;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(0, 52, 113, 0.28), rgba(0, 111, 196, 0.18)),
    linear-gradient(135deg, #1474e8 0%, #0099cc 100%);
}

.login-visual::before,
.login-visual::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px -80px;
  height: 210px;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.18), transparent 16%),
    linear-gradient(160deg, transparent 0 46%, rgba(255, 255, 255, 0.22) 47% 63%, transparent 64%),
    linear-gradient(180deg, rgba(0, 168, 255, 0.38), rgba(20, 184, 166, 0.36));
  transform: skewY(-5deg);
}

.login-visual::after {
  bottom: -118px;
  background: rgba(0, 42, 92, 0.28);
  transform: skewY(-9deg);
}

.login-crest {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px solid rgba(255, 255, 255, 0.78);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 26px;
  font-weight: 900;
}

.login-visual h2 {
  position: relative;
  z-index: 1;
  margin: 70px 0 14px;
  font-size: 34px;
  line-height: 1.35;
}

.login-visual p {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 16px;
  font-weight: 800;
}

.login-landmark {
  position: absolute;
  right: 94px;
  bottom: 112px;
  z-index: 1;
  width: 54px;
  height: 180px;
  border-radius: 999px 999px 10px 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.26));
  box-shadow:
    -38px 92px 0 -20px rgba(255, 255, 255, 0.32),
    38px 92px 0 -20px rgba(255, 255, 255, 0.32);
}

.login-box {
  width: auto;
  margin: 44px;
  align-self: center;
}

.login-brand {
  margin-bottom: 22px;
}

.login-box h2 {
  margin-bottom: 0;
  font-size: 26px;
}

.form-error {
  min-height: 20px;
  margin-bottom: 10px;
  color: var(--red);
  font-size: 14px;
}

.login-tip {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.toast-host {
  position: fixed;
  right: 22px;
  top: 22px;
  z-index: 300;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  padding: 12px 14px;
  border: 1px solid rgba(22, 119, 255, 0.22);
  border-radius: 8px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 38px rgba(16, 35, 63, 0.16);
  font-size: 14px;
  font-weight: 800;
  animation: toast-in 180ms ease-out;
}

.toast-success {
  border-color: rgba(20, 184, 166, 0.32);
}

.toast-error {
  border-color: rgba(229, 72, 77, 0.32);
}

.toast.leaving {
  opacity: 0;
  transform: translateY(-8px);
  transition: 200ms ease;
}

.dialog-mask {
  position: fixed;
  inset: 0;
  z-index: 260;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(6, 34, 74, 0.38);
  backdrop-filter: blur(4px);
}

.dialog-card {
  position: relative;
  width: min(430px, 100%);
  padding: 22px;
}

.dialog-card h2 {
  margin: 0 36px 8px 0;
  font-size: 20px;
}

.dialog-card p {
  margin-bottom: 16px;
  color: var(--muted);
  line-height: 1.7;
}

.dialog-close {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
  font-size: 20px;
  line-height: 1;
}

.dialog-field {
  margin-bottom: 8px;
}

.dialog-error {
  min-height: 20px;
  margin: 6px 0 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.image-preview {
  position: fixed;
  inset: 0;
  z-index: 280;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(3, 15, 35, 0.86);
}

.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  width: min(1100px, 100%);
  height: min(760px, calc(100vh - 56px));
  overflow: hidden;
}

.preview-stage img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
  transition: transform 160ms ease;
}

.preview-close,
.preview-nav,
.preview-tools button {
  border: 1px solid rgba(143, 200, 255, 0.28);
  border-radius: 8px;
  color: #fff;
  background: rgba(6, 34, 74, 0.74);
  font-weight: 900;
}

.preview-close {
  position: absolute;
  right: 10px;
  top: 10px;
  z-index: 2;
  width: 42px;
  height: 42px;
  font-size: 24px;
}

.preview-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 46px;
  height: 68px;
  font-size: 36px;
  transform: translateY(-50%);
}

.preview-nav.prev {
  left: 10px;
}

.preview-nav.next {
  right: 10px;
}

.preview-tools {
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 2;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.preview-tools button {
  min-height: 36px;
  padding: 0 12px;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fly-line {
  to {
    stroke-dashoffset: -24;
  }
}

.screen-board {
  min-height: 760px;
  padding: 18px;
  border-radius: 8px;
  color: #d7ecff;
  background:
    linear-gradient(180deg, rgba(4, 21, 45, 0.96), rgba(3, 18, 38, 0.98)),
    radial-gradient(circle at 52% 45%, rgba(20, 184, 166, 0.22), transparent 34%),
    #04162f;
  box-shadow: 0 24px 70px rgba(3, 22, 47, 0.28);
}

.screen-board:fullscreen {
  overflow: auto;
  border-radius: 0;
}

.screen-titlebar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  align-items: center;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid rgba(22, 119, 255, 0.35);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(0, 79, 158, 0.32), rgba(0, 23, 56, 0.52));
}

.screen-titlebar h2 {
  color: #fff;
  font-size: 24px;
  text-align: center;
}

.screen-titlebar span {
  color: #d7ecff;
  font-size: 14px;
}

.screen-titlebar span:last-child {
  text-align: right;
}

.screen-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.screen-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(0, 229, 255, 0.34);
  border-radius: 6px;
  color: #d7ecff;
  background: rgba(0, 68, 140, 0.48);
  font-size: 12px;
  font-weight: 900;
}

.screen-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.screen-stats article,
.screen-card {
  border: 1px solid rgba(0, 168, 255, 0.34);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(0, 74, 145, 0.38), rgba(0, 25, 64, 0.72));
  box-shadow: inset 0 0 22px rgba(0, 168, 255, 0.12);
}

.screen-stats article {
  position: relative;
  min-height: 92px;
  padding: 15px 15px 12px 72px;
}

.screen-stats i {
  position: absolute;
  left: 16px;
  top: 20px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  color: #fff;
  background: radial-gradient(circle, rgba(20, 184, 166, 0.8), rgba(22, 119, 255, 0.28));
  font-style: normal;
  font-weight: 900;
}

.screen-stats span,
.screen-stats em {
  display: block;
  color: #8fc8ff;
  font-size: 13px;
  font-style: normal;
}

.screen-stats strong {
  display: block;
  margin: 5px 0;
  color: #fff;
  font-size: 28px;
}

.screen-grid {
  display: grid;
  grid-template-columns: 280px minmax(420px, 1fr) 280px;
  gap: 10px;
}

.screen-side {
  display: grid;
  gap: 10px;
}

.screen-card {
  min-height: 196px;
  padding: 12px;
}

.screen-card h3 {
  margin: 0 0 12px;
  color: #fff;
  font-size: 15px;
}

.screen-line {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 10px;
  align-items: end;
  height: 130px;
  padding: 26px 10px 26px;
  background: linear-gradient(rgba(0, 168, 255, 0.14) 1px, transparent 1px) 0 0 / 100% 32px;
}

.screen-line i {
  position: relative;
  min-height: 24px;
  border-radius: 999px 999px 4px 4px;
  background: linear-gradient(180deg, #00e5ff, #1677ff);
}

.screen-line i span,
.screen-line i strong {
  position: absolute;
  left: 50%;
  color: #8fc8ff;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  transform: translateX(-50%);
  white-space: nowrap;
}

.screen-line i span {
  bottom: -19px;
}

.screen-line i strong {
  top: -18px;
  color: #fff;
}

.trend-line i span,
.trend-line i strong {
  position: absolute;
  left: 50%;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  transform: translateX(-50%);
  white-space: nowrap;
}

.trend-line i span {
  bottom: -22px;
}

.trend-line i strong {
  top: -22px;
  color: var(--ink);
}

.screen-donut {
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin: 2px auto 12px;
  border-radius: 999px;
  background:
    radial-gradient(circle, #05234e 0 46%, transparent 47%),
    conic-gradient(#1677ff 0 43%, #00d3b8 43% 68%, #ffa726 68% 84%, #7c4dff 84% 100%);
}

.screen-donut strong,
.screen-donut span {
  grid-area: 1 / 1;
}

.screen-donut strong {
  margin-top: -12px;
  color: #fff;
  font-size: 22px;
}

.screen-donut span {
  margin-top: 22px;
  color: #8fc8ff;
  font-size: 12px;
}

.screen-map {
  position: relative;
  min-height: 392px;
  overflow: hidden;
  border: 1px solid rgba(0, 168, 255, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(rgba(0, 153, 204, 0.1) 1px, transparent 1px) 0 0 / 42px 42px,
    linear-gradient(90deg, rgba(0, 153, 204, 0.1) 1px, transparent 1px) 0 0 / 42px 42px,
    radial-gradient(circle at 50% 52%, rgba(20, 184, 166, 0.24), transparent 26%),
    #041933;
}

.map-outline {
  position: absolute;
  inset: 34px 42px;
  border: 2px solid rgba(0, 229, 255, 0.72);
  overflow: hidden;
  background:
    linear-gradient(rgba(0, 229, 255, 0.08) 1px, transparent 1px) 0 0 / 12.5% 12.5%,
    linear-gradient(90deg, rgba(0, 229, 255, 0.08) 1px, transparent 1px) 0 0 / 12.5% 12.5%,
    radial-gradient(circle at 60% 56%, rgba(255, 167, 38, 0.4), transparent 6%),
    radial-gradient(circle at 60% 38%, rgba(0, 229, 255, 0.28), transparent 18%),
    rgba(22, 119, 255, 0.12);
  clip-path: polygon(18% 7%, 46% 2%, 76% 11%, 93% 34%, 89% 70%, 66% 94%, 28% 88%, 5% 60%);
}

.map-center {
  position: absolute;
  display: grid;
  place-items: center;
  z-index: 4;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(0, 229, 255, 0.7);
  border-radius: 999px;
  color: #fff;
  background: rgba(22, 119, 255, 0.28);
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.fly-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: visible;
  pointer-events: none;
}

.fly-layer path {
  fill: none;
  stroke: rgba(255, 167, 38, 0.82);
  stroke-dasharray: 6 7;
  stroke-linecap: round;
  stroke-width: 0.55;
  filter: drop-shadow(0 0 5px rgba(255, 167, 38, 0.55));
  animation: fly-line 1.9s linear infinite;
}

.region-point {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: var(--size);
  height: var(--size);
  padding: 0;
  border: 0;
  border-radius: 999px;
  color: #d7ecff;
  background: rgba(143, 200, 255, 0.24);
  transform: translate(-50%, -50%);
}

.region-point.active {
  background: rgba(255, 167, 38, 0.92);
  box-shadow: 0 0 20px 8px rgba(255, 167, 38, 0.35);
}

.region-point i {
  width: 38%;
  height: 38%;
  border-radius: inherit;
  background: #fff;
  opacity: 0.9;
}

.region-point span {
  position: absolute;
  left: calc(100% + 4px);
  top: 50%;
  max-width: 72px;
  overflow: hidden;
  padding: 3px 6px;
  border: 1px solid rgba(0, 229, 255, 0.32);
  border-radius: 4px;
  color: #e6f7ff;
  background: rgba(0, 40, 92, 0.82);
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  white-space: nowrap;
}

.region-point strong {
  position: absolute;
  right: -4px;
  top: -8px;
  display: none;
  min-width: 18px;
  min-height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  color: #fff;
  background: #ff4d4f;
  font-size: 10px;
  line-height: 18px;
}

.region-point.active strong {
  display: block;
}

.map-note {
  position: absolute;
  left: 18px;
  bottom: 18px;
  max-width: 260px;
  color: #8fc8ff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.heat-legend {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 6px;
  background: rgba(0, 12, 32, 0.62);
  color: #d7ecff;
  font-size: 12px;
}

.heat-legend b {
  width: 90px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, #00e5ff, #00d3b8, #ffa726, #ff4d4f);
}

.screen-empty {
  display: grid;
  place-items: center;
  min-height: 112px;
  border: 1px dashed rgba(143, 200, 255, 0.26);
  border-radius: 8px;
  color: #8fc8ff;
  font-size: 13px;
  font-weight: 800;
}

.screen-bars {
  display: grid;
  gap: 10px;
}

.screen-bars div {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.screen-bars span {
  overflow: hidden;
  color: #d7ecff;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-bars b {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(143, 200, 255, 0.16);
}

.screen-bars i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1677ff, #00e5ff);
}

.screen-bars strong {
  color: #d7ecff;
  text-align: right;
}

.officer-rank,
.screen-list,
.screen-table {
  display: grid;
  gap: 8px;
}

.officer-rank div,
.screen-list div,
.screen-table div {
  display: grid;
  align-items: center;
  min-height: 28px;
  color: #d7ecff;
  font-size: 12px;
}

.officer-rank div {
  grid-template-columns: 28px minmax(0, 1fr) 46px;
  gap: 8px;
}

.officer-rank em {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(255, 167, 38, 0.82);
  color: #fff;
  font-style: normal;
  font-weight: 900;
}

.officer-rank small {
  display: block;
  color: #8fc8ff;
}

.screen-bottom {
  display: grid;
  grid-template-columns: 300px minmax(520px, 1.25fr) 300px;
  gap: 10px;
  margin-top: 10px;
}

.screen-list div {
  grid-template-columns: minmax(0, 1fr) 48px 58px;
  gap: 8px;
}

.screen-table div {
  grid-template-columns: 76px minmax(220px, 1fr) 134px 58px;
  gap: 10px;
  padding: 4px 8px;
  border-radius: 4px;
  background: rgba(0, 168, 255, 0.08);
}

.realtime-card {
  min-width: 0;
}

.screen-list span,
.screen-table span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-list em {
  color: #8fc8ff;
  font-style: normal;
}

.screen-list strong,
.screen-table span:last-child {
  color: #14b8a6;
}

.warning-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.warning-grid span {
  display: grid;
  gap: 6px;
  place-items: center;
  min-height: 62px;
  border: 1px solid rgba(255, 167, 38, 0.34);
  border-radius: 8px;
  color: #ffa726;
  background: rgba(255, 167, 38, 0.08);
  font-weight: 900;
}

.warning-grid strong {
  color: #fff;
  font-size: 20px;
}

@media (max-width: 1080px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    padding: 14px;
  }

  .nav {
    grid-template-columns: repeat(6, minmax(92px, 1fr));
    overflow-x: auto;
  }

  .workspace {
    padding: 18px;
  }

  .stats-grid,
  .content-grid,
  .toolbar,
  .form-grid,
  .screen-grid,
  .screen-bottom,
  .screen-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar .span-2 {
    grid-column: span 1;
  }

  .login-stage {
    grid-template-columns: 1fr;
  }

  .login-visual {
    display: none;
  }

  .login-box {
    margin: 18px;
  }
}

@media (max-width: 680px) {
  .topbar,
  .account,
  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .stats-grid,
  .content-grid,
  .toolbar,
  .form-grid,
  .quick-grid,
  .screen-grid,
  .screen-bottom,
  .screen-stats {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 24px;
  }

  .screen-board {
    padding: 10px;
  }

  .screen-titlebar {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .screen-titlebar span:last-child,
  .screen-actions {
    justify-content: center;
    text-align: center;
  }

  .screen-map {
    min-height: 330px;
  }
}
