:root {
  --ink: #e2e8f0;
  --muted: #8c9ba5;
  --line: rgba(255, 255, 255, 0.08);
  --paper: #13182a;
  --surface: #090c17;
  --deep: #0c101d;
  --accent: #00e5cc;
  --accent2: #3b82f6;
  --danger: #ef4444;
  --warning: #f59e0b;
  --shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--surface);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
}
button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}
button {
  cursor: pointer;
}
.hidden {
  display: none !important;
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(460px, 1fr);
  background: #fff;
}
.login-brand {
  position: relative;
  overflow: hidden;
  background: var(--deep);
  color: #fff;
  padding: clamp(44px, 8vw, 120px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand-mark {
  width: 58px;
  height: 58px;
  border: 2px solid #54d9c9;
  display: grid;
  place-items: center;
  color: #54d9c9;
  font-size: 26px;
  font-weight: 800;
  transform: rotate(-7deg);
  margin-bottom: 32px;
}
.brand-mark.small {
  width: 34px;
  height: 34px;
  font-size: 16px;
  margin: 0;
}
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  color: #91a8a9;
  margin: 0 0 10px;
  text-transform: uppercase;
}
.accent {
  color: var(--accent);
}
.login-brand h1 {
  font-size: clamp(52px, 7vw, 88px);
  line-height: 1;
  margin: 0 0 20px;
  letter-spacing: 0;
}
.login-brand > p:last-of-type {
  font-size: 18px;
  color: #b9c9ca;
}
.brand-grid {
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(84, 217, 201, 0.16);
  right: -180px;
  bottom: -180px;
  transform: rotate(20deg);
  box-shadow:
    0 0 0 60px rgba(84, 217, 201, 0.035),
    0 0 0 120px rgba(84, 217, 201, 0.025);
}
.login-form {
  width: min(390px, calc(100% - 48px));
  margin: auto;
}
.login-form h2 {
  font-size: 34px;
  margin: 0 0 40px;
}
.login-form label,
.field {
  display: grid;
  gap: 8px;
  font-weight: 700;
  color: #455557;
  margin-bottom: 18px;
}
.login-form input,
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid #cbd7d8;
  background: #fff;
  color: var(--ink);
  padding: 12px 13px;
  outline: none;
  border-radius: 4px;
}
.login-form input:focus,
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 139, 125, 0.1);
}
.primary,
.secondary,
.ghost,
.danger {
  border: 0;
  border-radius: 4px;
  min-height: 40px;
  padding: 0 16px;
  font-weight: 700;
}
.primary {
  background: var(--accent);
  color: #fff;
}
.primary:hover {
  background: #0b7469;
}
.secondary {
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
}
.ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.danger {
  border: 1px solid #efcaca;
  background: #fff;
  color: var(--danger);
}
.full {
  width: 100%;
  margin-top: 10px;
}
.form-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 13px;
}
.app {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  min-height: 100vh;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: var(--deep);
  color: #dbe7e7;
  padding: 24px 14px;
  display: flex;
  flex-direction: column;
}
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  padding: 0 10px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
nav {
  display: grid;
  gap: 5px;
  padding-top: 22px;
}
nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #b8c8c9;
  background: transparent;
  border: 0;
  padding: 13px 14px;
  text-align: left;
  border-radius: 4px;
  font-weight: 650;
}
nav button:hover,
nav button.active {
  background: #1c4140;
  color: #fff;
}
.nav-icon {
  font-size: 10px;
  color: #60d6c7;
  border: 1px solid rgba(96, 214, 199, 0.35);
  padding: 3px;
}
.sidebar-foot {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  padding: 20px 10px 2px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 8px;
  font-size: 12px;
}
.sidebar-foot strong {
  grid-column: 2;
  color: #fff;
}
.status-dot {
  width: 8px;
  height: 8px;
  margin-top: 3px;
  border-radius: 50%;
  background: var(--accent2);
}
.status-dot.status-error {
  background: var(--danger);
}
main {
  min-width: 0;
}
.topbar {
  height: 76px;
  background: #0d1222;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 30px;
  position: sticky;
  top: 0;
  z-index: 5;
  color: #fff;
}
.topbar h2 {
  margin: 0;
  font-size: 22px;
  color: #fff;
}
.topbar .eyebrow {
  margin-bottom: 4px;
  color: #00e5cc;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.draft {
  color: var(--warning);
  font-size: 12px;
  font-weight: 700;
}
.content {
  padding: 24px 32px 60px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.metric,
.panel {
  background: #13182a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  color: #e2e8f0;
}
.metric {
  padding: 22px;
}
.metric p {
  margin: 0 0 14px;
  color: var(--muted);
}
.metric strong {
  font-size: 30px;
  color: #fff;
}
.metric small {
  display: block;
  margin-top: 9px;
  color: #64748b;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
}
.panel {
  padding: 20px;
}
.panel-head,
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}
.panel h3 {
  margin: 0;
  font-size: 16px;
  color: #ffffff;
}
.empty {
  padding: 58px 20px;
  text-align: center;
  color: var(--muted);
}
.empty.compact {
  padding: 28px 16px;
}
.empty-action {
  display: grid;
  justify-items: center;
  gap: 10px;
}
.empty-action strong {
  color: #ffffff;
  font-size: 16px;
}
.empty-action span {
  max-width: 560px;
  line-height: 1.6;
  color: var(--muted);
}
.filter-bar {
  display: grid;
  grid-template-columns: minmax(160px, 220px) minmax(130px, 170px) minmax(220px, 1fr) auto auto;
  gap: 10px;
  margin-bottom: 14px;
}
.filter-bar input,
.filter-bar select {
  min-width: 0;
  min-height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  padding: 0 12px;
  background: #182035;
  color: #fff;
}
.bars {
  display: grid;
  gap: 16px;
}
.bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 50px;
  gap: 12px;
  align-items: center;
}
.bar-row progress {
  width: 100%;
  height: 8px;
  border: 0;
  background: #1e243b;
}
.bar-row progress::-webkit-progress-bar {
  background: #1e243b;
}
.bar-row progress::-webkit-progress-value,
.bar-row progress::-moz-progress-bar {
  background: var(--accent2);
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  text-align: left;
  color: #8c9ba5;
  font-size: 12px;
  font-weight: 700;
  background: #182035;
}
th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  padding: 13px 12px;
  vertical-align: top;
}
td {
  font-size: 13px;
  color: #e2e8f0;
}
.ip-location {
  display: grid;
  justify-items: start;
  gap: 6px;
  min-width: 132px;
}
.ip-location small {
  max-width: 220px;
  color: var(--muted);
  line-height: 1.45;
}
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: rgba(0, 229, 204, 0.12);
  color: #00e5cc;
  border: 1px solid rgba(0, 229, 204, 0.3);
  font-size: 11px;
  font-weight: 750;
}
.badge.warn {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}
.badge.off {
  background: rgba(140, 155, 165, 0.15);
  color: #8c9ba5;
  border-color: rgba(140, 155, 165, 0.3);
}
.badge.danger {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.badge.status-healthy {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.3);
}
.badge.status-warning {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}
.badge.status-error {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.badge.status-info {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.3);
}
.badge.status-muted {
  background: rgba(140, 155, 165, 0.1);
  color: #8c9ba5;
  border-color: rgba(140, 155, 165, 0.25);
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
}
.status-dot.dot-healthy,.dot-healthy { background: #4ade80; }
.status-dot.dot-info,.dot-info { background: #38bdf8; }
.status-dot.dot-warning,.dot-warning { background: #fbbf24; }
.status-dot.dot-error,.dot-error { background: #f87171; }
.row-actions {
  display: flex;
  gap: 8px;
}
.link-button {
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 700;
}
.toolbar-title h3 {
  margin: 0 0 4px;
  font-size: 18px;
}
.toolbar-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}
.modal-shell {
  padding: 0;
  border: 0;
  width: min(1040px, calc(100vw - 30px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: #fff;
  color: var(--ink);
}
dialog {
  padding: 0;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}
dialog::backdrop {
  background: rgba(7, 27, 28, 0.58);
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.modal-head h3 {
  margin: 0;
  font-size: 21px;
}
.icon-button {
  border: 0;
  background: #f0f4f4;
  color: #3c4a4c;
  width: 34px;
  height: 34px;
  font-size: 22px;
  border-radius: 4px;
}
.modal-body {
  padding: 24px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 18px;
}
.form-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 20px;
}
.form-tabs button {
  min-height: 42px;
  border: 0;
  border-right: 1px solid var(--line);
  background: #f7f9f9;
  color: var(--muted);
  font-weight: 700;
}
.form-tabs button:last-child {
  border-right: 0;
}
.form-tabs button.active {
  color: #fff;
  background: var(--accent);
}
.form-section {
  display: none;
  min-width: 0;
}
.form-section.active {
  display: grid;
}
.rules-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.rules-head h4 {
  margin: 0 0 5px;
  color: var(--accent);
}
.rules-head span {
  color: var(--muted);
  font-size: 12px;
}
.rules-list {
  display: grid;
}
.rule-row {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
  padding: 16px 0 0;
  border-bottom: 1px solid var(--line);
}
.rule-row > .field:nth-of-type(1) {
  grid-column: 1 / span 3;
}
.rule-row > .field:nth-of-type(2) {
  grid-column: 4 / span 2;
}
.rule-row > .field:nth-of-type(3) {
  grid-column: 6 / span 2;
}
.rule-row > .field:nth-of-type(4) {
  grid-column: 8 / span 2;
}
.rule-row > .rule-value {
  grid-column: 1 / span 9;
  grid-row: 2;
}
.rule-row > .field:nth-of-type(6) {
  grid-column: 10 / span 2;
  grid-row: 2;
}
.rule-row .field {
  margin-bottom: 16px;
}
.rule-row .rule-delete {
  grid-column: 12;
  grid-row: 2;
  margin-bottom: 16px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.detail-grid > div {
  min-width: 0;
  display: grid;
  gap: 8px;
  padding: 14px;
  background: #fff;
}
.detail-grid span {
  color: var(--muted);
  font-size: 12px;
}
.detail-grid strong,
.detail-grid pre {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.detail-wide {
  grid-column: span 2;
}
.span-2 {
  grid-column: span 2;
}
.field textarea {
  min-height: 88px;
  resize: vertical;
}
.field textarea.certificate-text {
  min-height: 180px;
}
.field textarea.key-text {
  min-height: 160px;
}
.check-row {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 2px 0 20px;
}
.check-row label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 650;
}
.section-title {
  grid-column: span 2;
  font-size: 13px;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  padding: 16px 0 9px;
  margin: 0 0 18px;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 5px;
}
.hint {
  font-size: 11px;
  color: #829092;
  font-weight: 400;
}
.toast {
  position: fixed;
  z-index: 30;
  right: 24px;
  top: 20px;
  transform: translateY(-90px);
  opacity: 0;
  background: var(--deep);
  color: #fff;
  padding: 13px 18px;
  border-radius: 4px;
  box-shadow: var(--shadow);
  transition: 0.2s;
}
.toast.show {
  transform: none;
  opacity: 1;
}
.toast.error {
  background: #a93636;
}
.code {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  background: #f3f6f6;
  padding: 3px 5px;
}
.health-list {
  display: grid;
}
.health-row {
  display: flex;
  justify-content: space-between;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.settings-grid .panel {
  min-height: 200px;
}
.settings-grid p {
  color: var(--muted);
  line-height: 1.7;
}
.secret {
  word-break: break-all;
  background: #f2f6f5;
  padding: 12px;
  font-family: monospace;
  font-size: 12px;
}
.qr-wrap {
  text-align: center;
}
.dashboard-shell {
  display: grid;
  gap: 16px;
}
.dashboard-toolbar {
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.dashboard-title h3 {
  margin: 0 0 4px;
  font-size: 20px;
}
.dashboard-title .eyebrow {
  margin-bottom: 5px;
}
.dashboard-title > span,
.panel-head span,
.trend-unit > div > span {
  color: var(--muted);
  font-size: 12px;
}
.dashboard-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dashboard-controls select {
  width: 180px;
  min-height: 40px;
  border: 1px solid #cbd7d8;
  border-radius: 4px;
  padding: 0 32px 0 11px;
  background: #fff;
  color: var(--ink);
}
.segmented {
  height: 40px;
  display: flex;
  border: 1px solid #cbd7d8;
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}
.segmented button {
  min-width: 68px;
  padding: 0 11px;
  border: 0;
  border-right: 1px solid #dce4e4;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}
.segmented button:last-child {
  border-right: 0;
}
.segmented button.active {
  background: var(--deep);
  color: #fff;
}
.dashboard-refresh {
  min-width: 40px;
  height: 40px;
  font-size: 20px;
}
.dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 12px;
}
.dashboard-metrics .metric {
  position: relative;
  min-height: 138px;
  padding: 20px;
  overflow: hidden;
}
.dashboard-metrics .metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #dce4e4;
}
.dashboard-metrics .metric-accent::before {
  background: var(--accent2);
}
.dashboard-metrics .metric-danger::before {
  background: var(--danger);
}
.dashboard-metrics .metric p {
  margin-bottom: 12px;
}
.dashboard-metrics .metric strong {
  font-size: 28px;
}
.dashboard-primary-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(290px, 0.75fr);
  gap: 16px;
}
.dashboard-trend,
.status-panel {
  min-height: 370px;
}
.chart-legend {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 12px;
}
.chart-legend span::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 50%;
}
.legend-request::before {
  background: #19a997;
}
.legend-attack::before {
  background: #e65e58;
}
.trend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}
.trend-unit {
  min-width: 0;
}
.trend-unit > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 8px;
}
.trend-unit > div > strong {
  font-size: 18px;
}
.sparkline {
  min-height: 230px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
}
.sparkline svg {
  grid-column: 1 / -1;
  width: 100%;
  aspect-ratio: 720 / 176;
  min-height: 176px;
}
.sparkline > span:last-child {
  text-align: right;
}
.sparkline span,
.sparkline strong {
  color: #849290;
  font-size: 11px;
}
.sparkline strong {
  font-weight: 700;
}
.chart-grid-line {
  stroke: #e6eceb;
  stroke-width: 1;
}
.chart-empty {
  height: 230px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}
.donut-wrap {
  width: min(190px, 72%);
  margin: 10px auto 18px;
}
.donut-wrap svg {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  transform: rotate(-90deg);
}
.donut-wrap text {
  transform: rotate(90deg);
  transform-origin: 60px 60px;
  fill: var(--ink);
}
.donut-total {
  font-size: 15px;
  font-weight: 800;
}
.donut-caption {
  font-size: 8px;
  fill: var(--muted) !important;
}
.status-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 18px;
}
.status-legend > div {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 7px;
}
.status-legend strong {
  font-size: 12px;
}
.status-legend small {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 10px;
}
.status-color {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.status-color.teal {
  background: #0f8b7d;
}
.status-color.blue {
  background: #3478a5;
}
.status-color.gold {
  background: #d6a64c;
}
.status-color.red {
  background: #d84848;
}
.dashboard-secondary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.dashboard-secondary-grid .panel {
  min-height: 330px;
}
.rank-list {
  display: grid;
  gap: 18px;
}
.rank-row > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  margin-bottom: 8px;
}
.rank-row > div:first-child span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rank-row > div:first-child strong {
  font-size: 12px;
}
.rank-row > small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}
.rank-track {
  height: 6px;
  overflow: hidden;
  background: #edf2f1;
}
.rank-track i {
  display: block;
  height: 100%;
  background: #d6a64c;
}
.rank-track.site i {
  background: #3478a5;
}
.rank-track.geo i {
  background: #19a997;
}
.rank-track.danger i {
  background: #e65e58;
}
.dashboard-events .panel-head {
  margin-bottom: 12px;
}
.dashboard-health {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}
.dashboard-health .status-dot {
  margin: 0;
}
body.dashboard-screen {
  background: #101718;
}
.dashboard-screen .app {
  grid-template-columns: 1fr;
  background: #101718;
}
.dashboard-screen .sidebar,
.dashboard-screen .topbar {
  display: none;
}
.dashboard-screen .content {
  max-width: none;
  padding: 18px 22px 40px;
}
.dashboard-screen .dashboard-title h3,
.dashboard-screen .dashboard-shell .metric strong,
.dashboard-screen .dashboard-shell .panel h3,
.dashboard-screen .trend-unit > div > strong,
.dashboard-screen .status-legend strong,
.dashboard-screen .rank-row strong,
.dashboard-screen .donut-wrap text {
  color: #f1f6f5;
  fill: #f1f6f5;
}
.dashboard-screen .dashboard-title > span,
.dashboard-screen .dashboard-title .eyebrow,
.dashboard-screen .dashboard-shell .metric p,
.dashboard-screen .dashboard-shell .metric small,
.dashboard-screen .dashboard-shell .panel-head span,
.dashboard-screen .trend-unit > div > span,
.dashboard-screen .sparkline span,
.dashboard-screen .sparkline strong,
.dashboard-screen .status-legend small,
.dashboard-screen .rank-row small,
.dashboard-screen .dashboard-health {
  color: #8fa09e;
}
.dashboard-screen .dashboard-shell .metric,
.dashboard-screen .dashboard-shell .panel {
  background: #192324;
  border-color: #293536;
  box-shadow: none;
}
.dashboard-screen .dashboard-controls select,
.dashboard-screen .segmented,
.dashboard-screen .dashboard-refresh,
.dashboard-screen #dashboardScreen {
  background: #192324;
  border-color: #344243;
  color: #dce7e5;
}
.dashboard-screen .segmented button {
  border-color: #344243;
  color: #91a19f;
}
.dashboard-screen .segmented button.active {
  background: #e9c29e;
  color: #182021;
}
.dashboard-screen .chart-grid-line,
.dashboard-screen .dashboard-events th,
.dashboard-screen .dashboard-events td {
  stroke: #334041;
  border-color: #2d393a;
}
.dashboard-screen .dashboard-events th {
  background: #151e1f;
  color: #91a19f;
}
.dashboard-screen .dashboard-events td,
.dashboard-screen .dashboard-events .code {
  color: #dce7e5;
}
.dashboard-screen .dashboard-events .ip-location small {
  color: #8fa09e;
}
.dashboard-screen .dashboard-events .code {
  background: #222e2f;
}
.dashboard-screen .rank-track {
  background: #2a3536;
}
.mobile-menu {
  display: none;
}
@media (max-width: 1280px) {
  .dashboard-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .dashboard-primary-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(270px, 0.8fr);
  }
  .dashboard-secondary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .trend-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-trend {
    min-height: 650px;
  }
}
@media (max-width: 900px) {
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-brand {
    display: none;
  }
  .app {
    grid-template-columns: 76px 1fr;
  }
  .sidebar {
    padding: 18px 8px;
  }
  .logo strong,
  nav button:not(.active) .nav-label,
  .sidebar-foot span,
  .sidebar-foot strong {
    display: none;
  }
  .logo {
    justify-content: center;
    padding: 0 0 20px;
  }
  .sidebar nav button {
    font-size: 0;
    justify-content: center;
  }
  .nav-icon {
    width: 24px;
    height: 24px;
  }
  .content {
    padding: 20px 16px;
  }
  .topbar {
    padding: 0 16px;
  }
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2,
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .dashboard-controls {
    width: 100%;
    flex-wrap: wrap;
  }
  .dashboard-controls select {
    flex: 1;
  }
  .dashboard-primary-grid,
  .dashboard-secondary-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-trend {
    min-height: 650px;
  }
  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }
  .filter-bar input {
    grid-column: span 2;
  }
  .rule-row {
    grid-template-columns: 1fr 1fr;
  }
  .rule-row > .field:nth-of-type(n),
  .rule-row > .rule-value,
  .rule-row > .field:nth-of-type(6),
  .rule-row .rule-delete {
    grid-column: auto;
    grid-row: auto;
  }
}
@media (max-width: 580px) {
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    z-index: 10;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: 64px;
    display: block;
    padding: 6px;
  }
  .logo,
  .sidebar-foot {
    display: none;
  }
  nav {
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, 1fr);
  }
  nav button {
    padding: 8px 2px;
  }
  .topbar {
    height: 76px;
  }
  .topbar .eyebrow,
  .draft {
    display: none;
  }
  .top-actions .ghost {
    display: none;
  }
  .content {
    padding-bottom: 85px;
  }
  .metric-grid {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard-controls .segmented {
    order: 4;
    width: 100%;
  }
  .dashboard-controls .segmented button {
    flex: 1;
  }
  .dashboard-screen .content {
    padding: 14px 12px 30px;
  }
  .metric {
    padding: 16px;
  }
  .metric strong {
    font-size: 24px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .span-2,
  .section-title {
    grid-column: span 1;
  }
  .form-tabs {
    grid-template-columns: 1fr 1fr;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .detail-wide {
    grid-column: span 1;
  }
  .table-wrap {
    overflow: auto;
  }
}

/* ================= 流量分析与防护大屏 现代化深色融合 UI ================= */
.traffic-analytics-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.analytics-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #141724;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 18px;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.segmented-tabs {
  display: flex;
  background: #1e2235;
  border-radius: 6px;
  padding: 3px;
}
.segmented-tabs .tab-btn {
  border: 0;
  background: transparent;
  color: #8c9ba5;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 16px;
  border-radius: 4px;
}
.segmented-tabs .tab-btn.active {
  background: #00e5cc;
  color: #0b0f19;
  box-shadow: 0 2px 10px rgba(0, 229, 204, 0.3);
}
.refresh-note { font-size: 12px; color: #64748b; }

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header-right select {
  background: #1e2235;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
}

/* 8 大核心真实指标 Grid */
.analytics-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.metric-card {
  background: #141724;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.m-label { font-size: 12px; color: #8c9ba5; font-weight: 600; }
.m-val { font-size: 24px; font-weight: 800; color: #ffffff; font-family: Inter, monospace; }
.m-val.text-warn { color: #f59e0b; }
.m-val.text-danger { color: #ef4444; }
.m-val.text-cyan { color: #00e5cc; }
.m-sub { font-size: 11px; color: #475569; }

/* 流量分析与地理位置 100% 独占大整行卡片 */
.map-section {
  width: 100%;
  background: #13182a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.map-body-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: stretch;
}
.globe-map-container {
  width: 100%;
  height: 480px;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: #090c17;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.globe-full-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.location-rank-box {
  background: #182035;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
}
.location-rank-box h4 {
  margin: 0 0 16px;
  font-size: 13px;
  color: #8c9ba5;
  font-weight: 700;
}
.loc-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  justify-content: flex-start;
}
.loc-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.loc-txt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #e2e8f0;
}
.loc-txt strong {
  font-family: Inter, monospace;
  font-size: 14px;
  color: #00e5cc;
}
.loc-bar {
  height: 6px;
  background: #0d1222;
  border-radius: 3px;
  overflow: hidden;
}
.loc-bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #ffb703, #f97316);
  border-radius: 3px;
}

.trend-section {
  width: 100%;
  background: #13182a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 20px 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.trend-charts-box { display: flex; flex-direction: column; gap: 20px; }
.trend-item { height: 140px; display: flex; flex-direction: column; justify-content: space-between; }
.t-head { display: flex; justify-content: space-between; font-size: 13px; color: #8c9ba5; font-weight: 600; }

/* 多维分析 4 Grid */
.analytics-bottom-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

/* 环形图 Dynamic Donut */
.dynamic-donut-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.donut-svg-side { width: 110px; height: 110px; flex-shrink: 0; }
.donut-center-num { font-size: 18px; font-weight: 800; fill: #ffffff; }
.donut-center-lbl { font-size: 10px; fill: #8c9ba5; }

.donut-legend-side { display: grid; gap: 6px; flex: 1; }
.chart-legend-row { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.legend-lbl { flex: 1; color: #8c9ba5; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-val { color: #fff; font-weight: 700; }
.legend-pct { color: #475569; font-size: 10px; min-width: 32px; text-anchor: right; }

.rank-bar-list { display: grid; gap: 10px; }
.rank-bar-item { display: grid; gap: 4px; font-size: 11px; }
.r-info { display: flex; justify-content: space-between; color: #cbd5e1; }
.r-info small { color: #64748b; font-size: 10px; }
.r-track { height: 4px; background: #1e2235; border-radius: 2px; overflow: hidden; }
.r-track.danger i { display: block; height: 100%; background: #ef4444; }
.r-track.site i { display: block; height: 100%; background: #3b82f6; }


/* ================= 防护大屏 全屏模式 (Screen Fullscreen Theme) ================= */
.big-screen-fullscreen {
  min-height: 100vh;
  background: #070913;
  color: #e2e8f0;
  padding: 16px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.screen-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 44px;
}
.screen-logo-title { display: flex; align-items: center; gap: 10px; }
.screen-logo-title h2 { margin: 0; font-size: 22px; color: #ffffff; letter-spacing: 1px; font-weight: 800; }
.live-dot-pulse { width: 10px; height: 10px; border-radius: 50%; background: #00e5cc; box-shadow: 0 0 12px #00e5cc; }

.screen-controls { display: flex; align-items: center; gap: 12px; }
.btn-s-tab { background: #131627; border: 1px solid rgba(255,255,255,0.12); color: #8c9ba5; padding: 5px 14px; border-radius: 4px; font-size: 12px; }
.btn-s-tab.active { background: #00e5cc; color: #070913; font-weight: 700; border-color: #00e5cc; }
.screen-clock-tag { font-family: monospace; color: #00e5cc; background: rgba(0,229,204,0.1); padding: 4px 10px; border-radius: 4px; font-size: 13px; }
.btn-s-action { background: #131627; border: 1px solid rgba(255,255,255,0.12); color: #fff; padding: 5px 12px; border-radius: 4px; font-size: 12px; }

/* 3 列 Layout */
.screen-main-layout {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  gap: 14px;
  flex: 1;
  height: calc(100vh - 90px);
}
.screen-col-left, .screen-col-right { display: flex; flex-direction: column; gap: 12px; }
.screen-col-center { display: flex; flex-direction: column; gap: 12px; }

.screen-metric-card {
  background: #111425;
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-left: 4px solid #00e5cc;
}
.screen-metric-card.purple { border-left-color: #8b5cf6; }
.screen-metric-card.orange { border-left-color: #ff7a45; }
.screen-metric-card p { margin: 0; font-size: 11px; color: #8c9ba5; }
.screen-metric-card strong { font-size: 26px; color: #fff; font-family: monospace; }

.screen-panel-box {
  background: #111425;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
}
.screen-panel-box.flex-fill { flex: 1; }
.map-fill-box { flex: 1; padding: 0; overflow: hidden; }
.qps-mini-box { height: 130px; }

.box-title-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.box-title-bar h3 { margin: 0; font-size: 13px; color: #fff; }
.box-title-bar span { font-size: 10px; color: #475569; }

.screen-ip-list { display: grid; gap: 8px; }
.ip-row { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.03); padding: 8px 10px; border-radius: 4px; font-size: 11px; }
.rank-tag { width: 18px; height: 18px; border-radius: 3px; background: #1e2235; color: #94a3b8; display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.rank-tag.tag-1 { background: #ef4444; color: #fff; }
.rank-tag.tag-2 { background: #f97316; color: #fff; }
.rank-tag.tag-3 { background: #f59e0b; color: #fff; }
.ip-meta { flex: 1; display: grid; }
.ip-meta small { color: #64748b; font-size: 10px; }
.cnt { color: #f87171; font-weight: 700; font-family: monospace; }
.ip-latest { display: grid; flex: 0 0 auto; text-align: right; }
.ip-latest strong { color: #dce8e5; font: 700 10px/1.3 monospace; }
.ip-latest small { color: #f87171; font-size: 9px; }

.red-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 8px #ef4444; margin-right: 6px; }
.screen-attack-stream { display: grid; gap: 8px; overflow-y: auto; max-height: calc(100vh - 180px); }
.stream-card { background: rgba(255,255,255,0.02); border-left: 2px solid #ef4444; padding: 8px 10px; border-radius: 0 4px 4px 0; display: grid; gap: 4px; }
.card-head { display: flex; justify-content: space-between; font-size: 11px; }
.card-head .ip { color: #00e5cc; }
.card-head .loc { color: #64748b; font-size: 10px; }
.card-meta { display: flex; justify-content: space-between; font-size: 10px; }
.card-meta .cat { color: #f87171; font-weight: 600; }
.card-meta .time { color: #475569; }
.card-uri { font-family: monospace; font-size: 10px; color: #cbd5e1; word-break: break-all; }

/* 趋势图与贝塞尔折线图 赛博朋克样式 */
.sparkline-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.sparkline-container svg {
  width: 100%;
  height: 145px;
  overflow: visible;
}
.chart-mesh-line {
  stroke: rgba(255, 255, 255, 0.07);
  stroke-width: 1;
  stroke-dasharray: 4, 4;
}
.sparkline-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #64748b;
  padding-top: 4px;
}
.peak-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid currentColor;
  background: rgba(11, 14, 26, 0.7);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}
.continent-dots circle {
  transition: opacity 0.3s ease;
}

/* 地理热力图 2D/3D 模式切换与热力级别指示器 */
.map-mode-switch {
  display: flex;
  background: #182035;
  border-radius: 6px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.map-mode-switch .mode-btn {
  border: 0;
  background: transparent;
  color: #8c9ba5;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 4px;
  transition: all 0.2s ease;
}
.map-mode-switch .mode-btn.active {
  background: #00e5cc;
  color: #090c17;
  box-shadow: 0 0 12px rgba(0, 229, 204, 0.4);
}
.heat-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
}
.heat-dot.level-hot { background: #ef4444; box-shadow: 0 0 8px #ef4444; }
.heat-dot.level-warm { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.heat-dot.level-normal { background: #00e5cc; box-shadow: 0 0 8px #00e5cc; }
.rank-num {
  font-weight: 800;
  font-size: 10px;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
}
.rank-num.num-1 { background: #ef4444; color: #fff; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.rank-num.num-2 { background: #f97316; color: #fff; }
.rank-num.num-3 { background: #f59e0b; color: #fff; }
.rank-num.num-4, .rank-num.num-5 { background: #1e243b; color: #8c9ba5; }
.trend-up { color: #10b981; font-size: 10px; font-weight: 700; }

/* 2026 visual system: compact SOC console */
:root {
  --ink: #eef4f2;
  --muted: #84928f;
  --line: rgba(207, 226, 220, 0.1);
  --paper: #151b1b;
  --surface: #0a0e0f;
  --deep: #0d1213;
  --accent: #39dec5;
  --accent2: #5ba8ff;
  --danger: #ff5f68;
  --warning: #ffae57;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

html {
  background: var(--surface);
}

body {
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    var(--surface);
  background-size: 48px 48px;
  color: var(--ink);
}

button {
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

button:active {
  transform: translateY(1px);
}

.app {
  grid-template-columns: 216px minmax(0, 1fr);
  background: transparent;
}

.sidebar {
  z-index: 8;
  padding: 22px 14px 18px;
  background: rgba(10, 14, 15, 0.98);
  border-right: 1px solid var(--line);
}

.logo {
  min-height: 52px;
  padding: 0 10px 20px;
  gap: 11px;
  border-color: var(--line);
  font-size: 16px;
}

.brand-mark,
.brand-mark.small {
  border: 0;
  border-radius: 8px;
  transform: none;
  background: #39dec5;
  color: #07100f;
  box-shadow: 0 0 0 1px rgba(57, 222, 197, 0.3), 0 8px 24px rgba(57, 222, 197, 0.18);
}

.brand-mark.small {
  width: 32px;
  height: 32px;
  font-size: 14px;
}

nav {
  gap: 4px;
  padding-top: 18px;
}

nav button {
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #8d9a98;
  font-size: 13px;
}

nav button:hover {
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.05);
  color: #dce6e3;
}

nav button.active {
  background: linear-gradient(90deg, rgba(57, 222, 197, 0.12), rgba(57, 222, 197, 0.03) 70%, transparent);
  border-color: rgba(57, 222, 197, 0.15);
  color: #e8f8f5;
  box-shadow: inset 3px 0 0 #39dec5, 0 0 20px rgba(57, 222, 197, 0.06);
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: #6b7c78;
  transition: all 180ms ease;
}

.nav-icon .lucide-icon {
  width: 16px;
  height: 16px;
}

nav button:hover .nav-icon {
  background: rgba(57, 222, 197, 0.08);
  color: #99c5be;
}

nav button.active .nav-icon {
  background: linear-gradient(135deg, rgba(57, 222, 197, 0.25), rgba(59, 130, 246, 0.18));
  color: #5ef0d8;
  box-shadow: 0 0 12px rgba(57, 222, 197, 0.2);
}

.sidebar-foot {
  padding: 18px 10px 2px;
  border-color: var(--line);
  color: #768380;
}

.sidebar-foot strong {
  color: #b7c3c0;
}

.topbar {
  height: 72px;
  padding: 0 26px;
  background: rgba(12, 17, 18, 0.92);
  border-color: var(--line);
  backdrop-filter: blur(16px);
}

.topbar h2 {
  font-size: 20px;
  font-weight: 750;
}

.topbar .eyebrow {
  color: #778682;
  font-size: 9px;
}

.top-actions .ghost,
.top-actions .primary {
  min-height: 36px;
  border-radius: 6px;
}

.primary {
  background: #39dec5;
  color: #07100f;
}

.primary:hover {
  background: #68ead6;
}

.secondary {
  background: rgba(57, 222, 197, 0.08);
  border-color: rgba(57, 222, 197, 0.35);
  color: #5de5d0;
}

.ghost {
  background: #171d1e;
  border-color: var(--line);
  color: #d6dfdd;
}

.content {
  min-width: 0;
  padding: 20px 24px 48px;
}

.metric,
.panel,
.analytics-header,
.metric-card,
.map-section,
.trend-section {
  background: rgba(20, 26, 27, 0.96);
  border-color: var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.panel-head {
  margin-bottom: 16px;
}

.panel h3 {
  font-size: 15px;
  font-weight: 750;
}

.panel-head span {
  display: block;
  margin-top: 4px;
  color: #687673;
  font-size: 11px;
}

.code,
.dashboard-screen .dashboard-events .code {
  display: inline-block;
  max-width: 100%;
  padding: 2px 5px;
  border: 1px solid rgba(57, 222, 197, 0.14);
  border-radius: 3px;
  background: rgba(57, 222, 197, 0.06);
  color: #73e9d7;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

th {
  background: #171e1f;
  color: #7f8d8a;
}

th,
td {
  border-color: var(--line);
}

tbody tr:hover td {
  background: rgba(255, 255, 255, 0.018);
}

.badge {
  border-radius: 4px;
}

.toast {
  border: 1px solid var(--line);
  border-radius: 6px;
}

.modal-shell,
.modal-head,
.detail-grid > div {
  background: #151b1c;
  color: var(--ink);
}

dialog {
  background: #151b1c;
  border: 1px solid var(--line);
  border-radius: 8px;
}

dialog::backdrop {
  background: rgba(2, 5, 6, 0.76);
  backdrop-filter: blur(4px);
}

.modal-head {
  border-color: var(--line);
}

.icon-button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #1b2223;
  color: #cbd5d2;
}

.login-form input,
.field input,
.field select,
.field textarea,
.filter-bar input,
.filter-bar select {
  background: #101617;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

.field,
.login-form label {
  color: #aab6b3;
}

/* Traffic analytics */
.traffic-analytics-page {
  gap: 14px;
  min-width: 0;
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
}

.analytics-header {
  min-height: 60px;
  padding: 10px 12px;
}

.header-left,
.header-right {
  min-width: 0;
}

.segmented-tabs {
  flex-shrink: 0;
  padding: 3px;
  background: #0f1516;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.segmented-tabs .tab-btn {
  min-height: 32px;
  padding: 0 17px;
  border-radius: 4px;
  color: #83918e;
}

.segmented-tabs .tab-btn.active {
  background: #39dec5;
  color: #07100f;
  box-shadow: none;
}

.refresh-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #687673;
  white-space: nowrap;
}

.refresh-note i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #55d9a5;
  box-shadow: 0 0 9px rgba(85, 217, 165, 0.75);
}

.header-right select,
.dashboard-controls select {
  min-height: 38px;
  padding: 0 34px 0 12px;
  background: #101617;
  border-color: var(--line);
  border-radius: 6px;
  color: #dfe8e6;
}

.header-right .segmented {
  height: 38px;
  background: #101617;
  border-color: var(--line);
  border-radius: 6px;
}

.header-right .segmented button {
  min-width: 66px;
  border-color: var(--line);
  color: #7e8b88;
}

.header-right .segmented button.active {
  background: #f2a572;
  color: #15100d;
}

.dashboard-refresh {
  width: 38px;
  min-width: 38px;
  height: 38px;
  color: #9ba8a5;
  font-size: 18px;
}

.analytics-metrics-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}

.metric-card {
  position: relative;
  grid-column: span 3;
  min-width: 0;
  min-height: 118px;
  padding: 17px 18px;
  gap: 7px;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  right: 18px;
  height: 2px;
  background: rgba(255, 255, 255, 0.09);
}

.metric-primary.metric-requests::before { background: #39dec5; }
.metric-primary.metric-visitors::before { background: #5ba8ff; }
.metric-primary.metric-blocked::before { background: #ffae57; }
.metric-primary.metric-threats::before { background: #ff5f68; }

.metric-card .m-label {
  color: #899693;
  font-size: 11px;
  font-weight: 650;
}

.metric-card .m-val {
  line-height: 1.05;
  color: #f5faf8;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 28px;
}

.metric-card .m-sub {
  color: #5f6c69;
  font-size: 10px;
}

.metric-card .text-warn { color: #ffb461; }
.metric-card .text-danger { color: #ff6c74; }
.metric-card .text-cyan { color: #49e4cc; }

.metric-card.metric-compact {
  grid-column: span 3;
  min-height: 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: end;
  padding: 14px 17px;
  gap: 4px 12px;
}

.metric-compact .m-label {
  align-self: start;
}

.metric-compact .m-val {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 22px;
}

.metric-compact .m-sub {
  grid-column: 1;
}

.metric-health .m-val span {
  color: #58dca9;
  font-family: inherit;
  font-size: 16px;
}

.metric-health .m-val .is-error {
  color: #ff6c74;
}

.trend-up {
  color: #58dca9;
}

.map-section,
.trend-section {
  padding: 18px;
}

.map-section > .panel-head {
  min-height: 48px;
  margin-bottom: 14px;
}

.map-section > .panel-head h3 {
  font-size: 16px;
}

.map-section > .panel-head span {
  margin-top: 4px;
}

.map-body-grid {
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
  align-items: stretch;
}

#trafficMapWrap {
  min-width: 0;
  position: relative;
}

.globe-map-container {
  width: 100%;
  height: clamp(410px, 38vw, 680px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-color: rgba(139, 180, 171, 0.14);
  border-radius: 6px;
  background: #080d0e;
  box-shadow: inset 0 0 0 1px rgba(3, 8, 8, 0.72);
}

.traffic-geo-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.map-hover-tooltip {
  width: 180px;
  display: none;
  position: absolute;
  z-index: 5;
  padding: 9px 11px;
  pointer-events: none;
  border: 1px solid rgba(75, 222, 199, 0.58);
  border-radius: 5px;
  background: rgba(10, 18, 18, 0.94);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(8px);
}

.map-hover-tooltip.visible {
  display: block;
}

.map-hover-tooltip strong,
.map-hover-tooltip span {
  display: block;
}

.map-hover-tooltip strong {
  overflow: hidden;
  color: #eef6f4;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-hover-tooltip span {
  margin-top: 4px;
  color: #56dec9;
  font-size: 11px;
  font-weight: 700;
}

.heat-blocked .map-hover-tooltip {
  border-color: rgba(255, 98, 108, 0.62);
}

.heat-blocked .map-hover-tooltip span {
  color: #ff7b84;
}

.geo-map-stage.mode-3d .traffic-geo-canvas {
  cursor: grab;
  touch-action: none;
}

.geo-map-stage.mode-3d .traffic-geo-canvas.is-dragging {
  cursor: grabbing;
}

.geo-map-stage::before {
  width: 180px;
  height: 180px;
  position: absolute;
  right: -74px;
  top: -74px;
  z-index: 1;
  border: 1px solid rgba(77, 215, 193, 0.12);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.geo-map-data-strip {
  min-height: 32px;
  display: flex;
  align-items: center;
  gap: 10px;
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  padding: 0 11px;
  border: 1px solid rgba(126, 165, 158, 0.18);
  border-radius: 5px;
  background: rgba(10, 17, 17, 0.88);
  color: #7f918d;
  font-size: 10px;
  backdrop-filter: blur(8px);
}

.geo-map-data-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #9daca9;
}

.geo-map-data-strip span i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #49dfc6;
  box-shadow: 0 0 8px rgba(73, 223, 198, 0.68);
  animation: livePulse 2s ease-in-out infinite;
}

.geo-map-stage.heat-blocked .geo-map-data-strip span i {
  background: #ff626c;
  box-shadow: 0 0 9px rgba(255, 98, 108, 0.72);
}

.geo-map-data-strip strong {
  color: #edf5f2;
  font-size: 10px;
}

.geo-map-data-strip em {
  color: #ffab78;
  font-style: normal;
}

.geo-map-stage.heat-blocked .geo-map-data-strip em {
  color: #ff7b84;
}

.geo-map-legend {
  width: min(330px, 48%);
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  position: absolute;
  bottom: 16px;
  left: 18px;
  z-index: 2;
  color: #64736f;
  font-size: 10px;
}

.geo-map-legend em {
  padding-left: 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  color: #899793;
  font-style: normal;
  white-space: nowrap;
}

.geo-map-legend i {
  height: 5px;
  border-radius: 3px;
  background: linear-gradient(90deg, #293c39 0%, #55b9ad 38%, #f4bd72 72%, #ff925b 100%);
}

.geo-map-stage.heat-blocked .geo-map-legend i {
  background: linear-gradient(90deg, #293c39 0%, #f4bd72 45%, #ff925b 70%, #ff626c 100%);
}

.geo-map-stage.heat-blocked .geo-map-legend strong {
  color: #ff7b84;
}

.geo-map-legend strong {
  color: #ffad7b;
  font-size: 10px;
}

.location-rank-box {
  min-width: 0;
  padding: 5px 2px 5px 20px;
  background: transparent;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
}

.location-rank-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  margin-bottom: 18px;
  padding-bottom: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.location-rank-head div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.location-rank-box h4 {
  margin: 0;
  color: #c4cecb;
  font-size: 13px;
}

.location-rank-head div > span {
  color: #53635f;
  font-size: 9px;
}

.location-rank-head > strong {
  min-width: 28px;
  color: #50dcc4;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 18px;
  text-align: right;
}

.location-rank-box.heat-blocked .location-rank-head > strong {
  color: #ff7079;
}

.loc-list {
  gap: 18px;
}

.loc-item {
  gap: 8px;
}

.loc-txt {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto auto;
  gap: 8px;
  color: #aebbb8;
}

.loc-rank-index {
  color: #53645f;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
}

.loc-txt .loc-name {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loc-share {
  color: #667572;
  font-size: 10px;
  text-align: right;
}

.loc-txt strong {
  min-width: 30px;
  color: #f0f5f3;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  text-align: right;
}

.loc-bar,
.r-track {
  background: #0d1314;
}

.loc-bar {
  height: 4px;
  margin-left: 32px;
}

.loc-bar i {
  background: linear-gradient(90deg, #44cdb8 0%, #f1b874 62%, #ff8f5b 100%);
  box-shadow: 0 0 9px rgba(255, 143, 91, 0.18);
}

.location-rank-box.heat-blocked .loc-bar i {
  background: linear-gradient(90deg, #f4bd72 0%, #ff925b 55%, #ff626c 100%);
  box-shadow: 0 0 9px rgba(255, 98, 108, 0.22);
}

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

.map-mode-switch {
  padding: 3px;
  background: #0f1516;
  border-color: var(--line);
}

.map-mode-switch .mode-btn {
  min-height: 30px;
  padding: 0 12px;
  color: #7c8986;
}

.map-mode-switch .mode-btn.active {
  background: #eaa06e;
  color: #18110d;
  box-shadow: none;
}

.map-data-switch .mode-btn.active {
  background: #49d8c1;
  color: #07110f;
}

.map-data-switch.is-blocked .mode-btn.active {
  background: #ff6a74;
  color: #19090b;
}

.trend-charts-box {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.trend-item {
  min-width: 0;
  height: 194px;
  padding: 12px 0 0;
}

.trend-item + .trend-item {
  padding-left: 26px;
  border-left: 1px solid var(--line);
}

.t-head strong {
  color: #e7efed;
}

.sparkline-container svg {
  height: 136px;
}

.chart-mesh-line {
  stroke: rgba(255, 255, 255, 0.055);
}

.analytics-bottom-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.analytics-bottom-row .panel {
  min-width: 0;
  min-height: 236px;
}

.dynamic-donut-wrap {
  min-width: 0;
  gap: 10px;
}

.donut-svg-side {
  width: 98px;
  height: 98px;
}

.donut-legend-side {
  min-width: 0;
}

.chart-legend-row {
  min-width: 0;
}

.legend-lbl {
  color: #889592;
}

.legend-pct {
  color: #667370;
}

.rank-bar-list {
  gap: 13px;
}

.r-info {
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.r-info > span:not(.rank-num),
.r-info > small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.r-info .val {
  flex-shrink: 0;
}

.r-track.danger i { background: #ff646d; }
.r-track.site i { background: #5ba8ff; }

.recent-events-section .table-wrap {
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: 6px;
  overflow: auto;
}

.recent-events-section table {
  min-width: 900px;
}

/* Full-screen security operations view */
body.screen-mode {
  overflow: hidden;
  background: #070b0d;
}

.dashboard-screen .content {
  padding: 0;
}

.big-screen-fullscreen {
  position: relative;
  width: 100%;
  height: 100dvh;
  min-height: 640px;
  padding: 14px 16px 16px;
  gap: 12px;
  overflow: hidden;
  background:
    linear-gradient(rgba(57, 222, 197, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(57, 222, 197, 0.025) 1px, transparent 1px),
    #070b0d;
  background-size: 52px 52px;
}

.big-screen-fullscreen::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: linear-gradient(90deg, #39dec5, #5ba8ff 52%, #ff6b72);
  opacity: 0.9;
}

.screen-header-row {
  position: relative;
  z-index: 1;
  height: 54px;
  flex-shrink: 0;
}

.screen-logo-title {
  gap: 11px;
}

.screen-logo-title > div p {
  margin: 0 0 3px;
  color: #55716c;
  font-size: 8px;
  font-weight: 800;
}

.screen-logo-title h2 {
  font-size: 19px;
  letter-spacing: 0;
}

.live-dot-pulse {
  width: 9px;
  height: 9px;
  background: #39dec5;
  box-shadow: 0 0 12px rgba(57, 222, 197, 0.85);
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  50% { opacity: 0.48; transform: scale(0.82); }
}

.screen-controls {
  gap: 7px;
}

.btn-s-tab,
.btn-s-action,
.screen-clock-tag {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #111718;
  color: #a9b5b2;
  display: inline-flex;
  align-items: center;
}

.btn-s-tab.active {
  background: #39dec5;
  border-color: #39dec5;
  color: #07100f;
}

.screen-clock-tag {
  background: rgba(57, 222, 197, 0.06);
  color: #62e5d1;
}

.screen-main-layout {
  position: relative;
  z-index: 1;
  min-height: 0;
  height: auto;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr) minmax(270px, 310px);
  gap: 12px;
}

.screen-col-left,
.screen-col-center,
.screen-col-right {
  min-width: 0;
  min-height: 0;
  gap: 10px;
}

.screen-metric-card,
.screen-panel-box {
  background: rgba(17, 23, 24, 0.96);
  border: 1px solid var(--line);
  border-radius: 7px;
}

.screen-metric-card {
  position: relative;
  min-height: 86px;
  padding: 13px 15px;
  border-left: 1px solid var(--line);
  overflow: hidden;
}

.screen-metric-card::after {
  content: "";
  position: absolute;
  top: 14px;
  right: 14px;
  width: 28px;
  height: 3px;
  border-radius: 2px;
  background: #39dec5;
}

.screen-metric-card.purple::after { background: #8d7cff; }
.screen-metric-card.orange::after { background: #ff915d; }
.screen-metric-card p { color: #71807c; }
.screen-metric-card strong { font-size: 24px; }

.screen-panel-box {
  min-height: 0;
  padding: 13px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
}

.screen-panel-box.flex-fill {
  min-height: 0;
  overflow: hidden;
}

.map-fill-box {
  position: relative;
  min-height: 0;
  padding: 0;
}

.map-fill-box .globe-map-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 7px;
}

.screen-attack-map-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.attack-map-container {
  background: #080d0e;
}

.screen-map-heading {
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 3;
  pointer-events: none;
}

.screen-map-heading strong {
  color: #dfe9e6;
  font-size: 12px;
}

.screen-map-heading span {
  color: #56716c;
  font-size: 8px;
  font-weight: 800;
}

.screen-node-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  position: absolute;
  right: 16px;
  bottom: 14px;
  z-index: 3;
  color: #69e5d1;
  font-size: 10px;
  font-weight: 700;
  pointer-events: none;
}

.screen-node-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39dec5;
  box-shadow: 0 0 10px rgba(57, 222, 197, 0.75);
}

.screen-map-tooltip {
  border-color: rgba(255, 98, 108, 0.62);
}

.screen-map-tooltip span {
  color: #ff7b84;
}

.qps-mini-box {
  flex: 0 0 144px;
  height: 144px;
}

.qps-mini-box .box-title-bar {
  margin-bottom: 4px;
}

.qps-sparkline-wrap,
.qps-sparkline-wrap .sparkline-container {
  min-height: 0;
  height: 100%;
}

.qps-sparkline-wrap .sparkline-container svg {
  height: 82px;
}

.qps-sparkline-wrap .sparkline-footer {
  display: none;
}

.box-title-bar h3 {
  font-size: 12px;
}

.box-title-bar span {
  color: #5e6b68;
}

.screen-ip-list {
  gap: 7px;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.ip-row {
  min-width: 0;
  padding: 8px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 5px;
}

.ip-meta {
  min-width: 0;
}

.ip-meta strong,
.ip-meta small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-attack-stream {
  flex: 1;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding-right: 3px;
}

.stream-card {
  min-width: 0;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.022);
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-left: 2px solid #ff646d;
  border-radius: 0 5px 5px 0;
}

.card-head,
.card-meta {
  gap: 8px;
}

.card-head > *,
.card-meta > * {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.screen-attack-stream::-webkit-scrollbar,
.screen-ip-list::-webkit-scrollbar {
  width: 4px;
}

.screen-attack-stream::-webkit-scrollbar-thumb,
.screen-ip-list::-webkit-scrollbar-thumb {
  background: #2d3b39;
  border-radius: 4px;
}

@media (max-width: 1500px) {
  .analytics-bottom-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .analytics-bottom-row .panel {
    min-height: 220px;
  }
}

@media (max-width: 1180px) {
  .app {
    grid-template-columns: 76px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 8px;
  }

  .logo {
    justify-content: center;
    padding-inline: 0;
  }

  .logo strong,
  .nav-label,
  .sidebar-foot span,
  .sidebar-foot strong {
    display: none;
  }

  nav button {
    justify-content: center;
    padding: 0;
  }

  .sidebar-foot {
    display: flex;
    justify-content: center;
  }

  .metric-card,
  .metric-card.metric-compact {
    grid-column: span 6;
  }

  .map-body-grid {
    grid-template-columns: minmax(0, 1fr) 260px;
  }

  .screen-main-layout {
    grid-template-columns: 220px minmax(0, 1fr) 270px;
  }
}

@media (max-width: 900px) {
  .analytics-header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .header-left,
  .header-right {
    justify-content: space-between;
  }

  .map-section > .panel-head {
    flex-wrap: wrap;
    gap: 12px;
  }

  .map-body-grid,
  .trend-charts-box {
    grid-template-columns: 1fr;
  }

  .location-rank-box {
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .location-rank-head {
    margin-bottom: 14px;
  }

  .loc-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trend-item + .trend-item {
    padding-left: 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  body.screen-mode {
    overflow: auto;
  }

  .big-screen-fullscreen {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .screen-header-row {
    height: auto;
    align-items: flex-start;
    gap: 12px;
  }

  .screen-controls {
    justify-content: flex-end;
    flex-wrap: wrap;
  }

  .screen-main-layout {
    grid-template-columns: 1fr;
  }

  .screen-col-left {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .screen-col-left .flex-fill {
    grid-column: 1 / -1;
  }

  .map-fill-box {
    min-height: 460px;
  }

  .screen-col-right .flex-fill {
    max-height: 480px;
  }
}

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

  .topbar {
    height: 64px;
  }

  .topbar h2 {
    font-size: 17px;
  }

  .top-actions .primary {
    min-width: 92px;
    padding-inline: 12px;
  }

  .content {
    padding: 14px 12px 82px;
  }

  .sidebar {
    height: 66px;
    padding: 6px;
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .sidebar nav {
    grid-template-columns: repeat(7, 1fr);
  }

  .metric-card,
  .metric-card.metric-compact {
    grid-column: span 12;
  }

  .metric-card.metric-compact {
    min-height: 74px;
  }

  .header-left {
    align-items: flex-start;
    flex-direction: column;
  }

  .segmented-tabs,
  .header-right,
  .header-right select,
  .header-right .segmented {
    width: 100%;
  }

  .segmented-tabs .tab-btn,
  .header-right .segmented button {
    flex: 1;
  }

  .header-right {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .header-right select {
    flex-basis: 100%;
  }

  .header-right .segmented {
    width: calc(100% - 46px);
  }

  .panel-head {
    align-items: flex-start;
  }

  .map-mode-switch {
    flex-shrink: 0;
  }

  .map-toolbar {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-toolbar .map-mode-switch {
    width: 100%;
    display: flex;
  }

  .map-toolbar .mode-btn {
    min-width: 0;
    flex: 1;
    padding-inline: 8px;
  }

  .globe-map-container {
    height: 310px;
  }

  .geo-map-data-strip {
    max-width: calc(100% - 28px);
  }

  .geo-map-data-strip em {
    display: none;
  }

  .geo-map-legend {
    width: 190px;
  }

  .loc-list,
  .analytics-bottom-row {
    grid-template-columns: 1fr;
  }

  .analytics-bottom-row .panel {
    min-height: 0;
  }

  .dynamic-donut-wrap {
    justify-content: space-between;
  }

  .screen-logo-title h2 {
    font-size: 16px;
  }

  .screen-clock-tag,
  #screenTabScreen {
    display: none;
  }

  .screen-col-left {
    grid-template-columns: 1fr;
  }

  .screen-col-left .flex-fill {
    grid-column: auto;
  }

  .map-fill-box {
    min-height: 340px;
  }
}

/* 地区限制防护一键预设与 IP 地址库管理样式 */
.preset-geo-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
}
.btn-geo-preset {
  background: #182035;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 6px 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-geo-preset:hover {
  background: #232d4a;
  border-color: #00e5cc;
  color: #00e5cc;
  box-shadow: 0 0 10px rgba(0, 229, 204, 0.2);
}
.btn-geo-preset.active-cn {
  border-color: #ffb703;
  color: #ffb703;
}
.btn-geo-preset.deny-overseas {
  border-color: #f97316;
  color: #f97316;
}
.btn-geo-preset.allow-global {
  border-color: #3b82f6;
  color: #93c5fd;
}

.btn-upload-ipdb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #00e5cc, #3b82f6);
  color: #090c17;
  font-weight: 700;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-upload-ipdb:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 229, 204, 0.35);
}
.ipdb-manager-section {
  grid-column: span 2;
  margin-top: 14px;
}
.ipdb-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.ipdb-table th, .ipdb-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
}
.ipdb-table th {
  color: #8c9ba5;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.2);
}

/* Protected applications and CC policy workspace */
.lucide-icon {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.primary .lucide-icon,
.secondary .lucide-icon,
.ghost .lucide-icon {
  margin-right: 7px;
  vertical-align: -3px;
}

/* ═══════ Protected Applications Page — Modern SecOps ═══════ */

.applications-page,
.cc-page {
  display: grid;
  gap: 22px;
  width: min(100%, 1440px);
  margin-inline: auto;
}

/* 面包屑导航 */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #5e6e6b;
  font-size: 12px;
  font-weight: 500;
}

.breadcrumb strong {
  color: #c5d0cd;
}

.breadcrumb .lucide-icon {
  width: 13px;
  height: 13px;
  color: #3d4e4a;
}

/* 指标卡片行 */
.sites-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

@media (max-width: 1024px) {
  .sites-metrics-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .sites-metrics-row { grid-template-columns: 1fr; }
}

.sites-metric-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 84px;
  padding: 16px 18px;
  border-radius: 10px;
  background: rgba(16, 22, 24, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.sites-metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: xor;
  -webkit-mask-composite: xor;
  pointer-events: none;
  opacity: 0;
  transition: opacity 400ms ease;
}

.sites-metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.1);
}

.sites-metric-card:hover::before {
  opacity: 1;
}

.sites-metric-card.glow-cyan::before {
  background: linear-gradient(135deg, rgba(57, 222, 197, 0.45), transparent 60%);
}

.sites-metric-card.glow-cyan:hover {
  box-shadow: 0 0 28px rgba(57, 222, 197, 0.08);
}

.sites-metric-card.glow-orange::before {
  background: linear-gradient(135deg, rgba(255, 146, 91, 0.45), transparent 60%);
}

.sites-metric-card.glow-orange:hover {
  box-shadow: 0 0 28px rgba(255, 146, 91, 0.08);
}

.sites-metric-card.glow-blue::before {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.45), transparent 60%);
}

.sites-metric-card.glow-blue:hover {
  box-shadow: 0 0 28px rgba(59, 130, 246, 0.08);
}

.sites-metric-card.glow-warn::before {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.5), transparent 60%);
}

.sites-metric-card.glow-warn:hover {
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.08);
}

.sites-metric-card.glow-dim::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 60%);
}

.smc-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.smc-icon .lucide-icon {
  width: 18px;
  height: 18px;
}

.glow-cyan .smc-icon { color: #39dec5; background: rgba(57, 222, 197, 0.08); border-color: rgba(57, 222, 197, 0.15); }
.glow-orange .smc-icon { color: #ff925b; background: rgba(255, 146, 91, 0.08); border-color: rgba(255, 146, 91, 0.15); }
.glow-blue .smc-icon { color: #60a5fa; background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.15); }
.glow-warn .smc-icon { color: #f59e0b; background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.15); }
.glow-dim .smc-icon { color: #6b7c78; }

.smc-data {
  flex: 1;
  min-width: 0;
}

.smc-data span {
  display: block;
  color: #6b7c78;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.smc-data strong {
  display: block;
  margin-top: 2px;
  color: #f0f5f4;
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.smc-sub {
  position: absolute;
  right: 18px;
  bottom: 12px;
  color: #546360;
  font-size: 10px;
  font-weight: 500;
}

/* 工具栏 */
.applications-toolbar {
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.application-count,
.applications-tools,
.application-search,
.application-identity,
.application-actions,
.cc-policy-foot,
.cc-enable-row,
.cc-scope-section,
.cc-app-context {
  display: flex;
  align-items: center;
}

.application-count {
  min-width: 0;
  gap: 9px;
  color: #82908d;
  font-size: 12px;
}

.application-count strong {
  color: #f3f8f7;
  font-size: 23px;
}

.application-count i {
  width: 1px;
  height: 16px;
  margin-inline: 4px;
  background: var(--line);
}

.applications-tools {
  gap: 10px;
  flex: 1;
}

.applications-tools .primary,
.cc-policy-foot .secondary,
.cc-form .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toolbar-select {
  height: 40px;
  min-width: 110px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: #111718;
  color: #c5d0cd;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 160ms ease;
}

.toolbar-select:focus {
  border-color: rgba(57, 222, 197, 0.4);
  outline: none;
  box-shadow: 0 0 0 3px rgba(57, 222, 197, 0.07);
}

.application-search {
  width: min(340px, 34vw);
  height: 40px;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #111718;
  color: #6f7e7b;
  display: flex;
  align-items: center;
}

.application-search:focus-within {
  border-color: rgba(57, 222, 197, 0.42);
  box-shadow: 0 0 0 3px rgba(57, 222, 197, 0.07);
}

.application-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

/* 卡片网格 */
.applications-grid,
.cc-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
  gap: 16px;
  align-items: stretch;
}

/* 站点卡片 — 磨砂玻璃风格 */
.application-card,
.cc-policy-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(18, 24, 26, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  transition: border-color 220ms ease, box-shadow 220ms ease, transform 220ms ease;
}

.application-card:hover,
.cc-policy-card:hover {
  border-color: rgba(57, 222, 197, 0.2);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(57, 222, 197, 0.06);
  transform: translateY(-2px);
}

.application-card.is-disabled {
  opacity: 0.65;
}

.application-card.is-disabled:hover {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* 卡片头部 */
.application-card-head,
.cc-policy-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.application-identity {
  min-width: 0;
  gap: 12px;
}

/* 首字母渐变图标 */
.application-mark {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(57, 222, 197, 0.15), rgba(59, 130, 246, 0.12));
  border: 1px solid rgba(57, 222, 197, 0.18);
  color: #5ee8d2;
  transition: all 200ms ease;
}

.application-mark em {
  font-style: normal;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #5ef0d8, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.application-card:hover .application-mark {
  background: linear-gradient(135deg, rgba(57, 222, 197, 0.22), rgba(59, 130, 246, 0.18));
  box-shadow: 0 0 16px rgba(57, 222, 197, 0.12);
}

.application-mark.cc-mark {
  background: linear-gradient(135deg, rgba(255, 174, 87, 0.15), rgba(245, 158, 11, 0.1));
  border-color: rgba(255, 174, 87, 0.2);
}

.application-mark.cc-mark em {
  background: linear-gradient(135deg, #ffbd78, #f59e0b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.application-identity > div,
.cc-app-context > div {
  min-width: 0;
}

.application-identity h3 {
  margin: 0;
  overflow: hidden;
  color: #f0f5f4;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.application-identity p {
  margin: 4px 0 0;
  overflow: hidden;
  color: #74817f;
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.application-identity p span {
  color: #a3afac;
}

/* 域名行 */
.app-domain-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.domain-text {
  font-size: 11px;
  color: #8c9b98 !important;
}

.domain-extra {
  font-size: 10px;
  color: #5e6e6b;
  background: rgba(255, 255, 255, 0.04);
  padding: 1px 6px;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* 协议徽章 */
.protocol-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 18px;
}

.protocol-badge.is-https {
  background: rgba(57, 222, 197, 0.1);
  border: 1px solid rgba(57, 222, 197, 0.25);
  color: #4dd9c4;
}

.protocol-badge.is-http {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #d4a54c;
}

/* 状态 — 呼吸灯脉冲 */
.application-state {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5e6e6b;
  font-size: 11px;
  font-weight: 700;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #454f4c;
  display: block;
  flex: 0 0 8px;
}

.application-state.is-on {
  color: #5ee8d2;
}

.application-state.is-on .pulse-dot {
  background: #39dec5;
  box-shadow: 0 0 8px rgba(57, 222, 197, 0.6);
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(57, 222, 197, 0.5); }
  50% { box-shadow: 0 0 14px rgba(57, 222, 197, 0.8), 0 0 4px rgba(57, 222, 197, 1); }
}

/* 卡片主体 */
.application-card-body {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  min-height: 140px;
}

.application-mode {
  padding: 18px;
  border-right: 1px dashed rgba(255, 255, 255, 0.06);
}

/* 防护模式胶囊徽章 */
.mode-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  transition: all 200ms ease;
}

.mode-pill.is-block {
  background: rgba(255, 107, 53, 0.1);
  border: 1px solid rgba(255, 107, 53, 0.3);
  color: #ff8a5c;
}

.mode-pill.is-observe {
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
}

.mode-pill.is-off {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #5e6e6b;
}

.mode-pill .lucide-icon {
  width: 14px;
  height: 14px;
}

.application-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.application-stats div {
  min-width: 0;
}

.application-stats div + div {
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.application-stats span,
.cc-policy-meta span,
.cc-frequency > span {
  display: block;
  color: #546360;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.application-stats strong {
  display: block;
  margin-top: 4px;
  color: #e8f0ee;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

/* 详情列表 */
.application-details {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 11px;
  margin: 0;
  padding: 16px 18px;
}

.application-details > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.application-details dt {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #546360;
  font-size: 11px;
}

.application-details dt .lucide-icon {
  width: 13px;
  height: 13px;
}

.application-details dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #b8c4c1;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 卡片底栏 */
.application-card-foot {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px 8px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.15);
}

.application-tags {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
}

.application-tags span {
  flex: 0 0 auto;
  min-height: 22px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.025);
  color: #6b7c78;
  font-size: 10px;
  font-weight: 500;
}

.application-tags span.is-active {
  border-color: rgba(255, 174, 87, 0.2);
  background: rgba(255, 174, 87, 0.06);
  color: #ffb86d;
}

.application-actions {
  flex: 0 0 auto;
  gap: 4px;
}

.icon-action {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #5e6e6b;
  cursor: pointer;
  transition: all 160ms ease;
}

.icon-action .lucide-icon {
  width: 15px;
  height: 15px;
}

.icon-action:hover {
  border-color: rgba(57, 222, 197, 0.18);
  background: rgba(57, 222, 197, 0.06);
  color: #5ee8d2;
}

.icon-action.danger-action:hover {
  border-color: rgba(255, 95, 104, 0.2);
  background: rgba(255, 95, 104, 0.06);
  color: #ff777f;
}

.cc-policy-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(390px, 100%), 1fr));
}

.cc-global-panel {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(420px, 1.6fr) auto;
  align-items: center;
  gap: 22px;
  padding: 19px 20px;
  border: 1px solid rgba(255, 174, 87, 0.22);
  border-top: 2px solid #ffae57;
  border-radius: 7px;
  background: #111718;
}

.cc-global-copy {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.cc-global-copy p,
.cc-global-copy h3,
.cc-global-copy span {
  margin: 0;
}

.cc-global-copy p {
  color: #8a725d;
  font-size: 9px;
  font-weight: 800;
}

.cc-global-copy h3 {
  margin-top: 4px;
  color: #f1f5f4;
  font-size: 15px;
}

.cc-global-copy div > span {
  display: block;
  margin-top: 5px;
  color: #71807d;
  font-size: 10px;
  line-height: 1.5;
}

.cc-global-stats {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
}

.cc-global-stats > div {
  min-width: 0;
  padding: 11px 14px;
}

.cc-global-stats > div + div {
  border-left: 1px solid var(--line);
}

.cc-global-stats span,
.cc-global-stats strong {
  display: block;
}

.cc-global-stats span {
  color: #677572;
  font-size: 10px;
}

.cc-global-stats strong {
  margin-top: 6px;
  overflow: hidden;
  color: #dfe7e5;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-global-stats small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #75817e;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-global-stats em {
  color: #84918e;
  font-size: 10px;
  font-style: normal;
}

.cc-ip-panel {
  padding: 18px;
}

.cc-ip-panel .panel-head {
  margin-bottom: 14px;
}

.cc-ip-search {
  width: min(330px, 42vw);
}

.cc-ip-table {
  min-width: 1080px;
}

.cc-ip-disposition {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  color: #c7d1ce;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-ip-table td:last-child,
.cc-ip-table th:last-child {
  width: 112px;
  text-align: right;
}

.cc-ip-table .cc-ip-action {
  min-height: 32px;
  padding: 0 12px;
}

.cc-policy-card {
  border-top: 2px solid rgba(255, 255, 255, 0.08);
}

.cc-policy-card.is-enabled {
  border-top-color: #ffae57;
}

.cc-policy-card.is-target {
  box-shadow: 0 0 0 2px rgba(255, 174, 87, 0.18), 0 18px 42px rgba(0, 0, 0, 0.3);
}

.cc-policy-body {
  padding: 19px 18px;
}

.cc-frequency > div {
  min-height: 56px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 5px;
}

.cc-frequency strong {
  color: #f5f8f7;
  font-size: 29px;
  font-variant-numeric: tabular-nums;
}

.cc-frequency em {
  color: #87938f;
  font-size: 11px;
  font-style: normal;
}

.cc-frequency i {
  margin-inline: 7px;
  color: #45514e;
  font-size: 19px;
  font-style: normal;
}

.cc-policy-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 13px;
  border: 1px solid var(--line);
  background: var(--line);
}

.cc-policy-meta > div {
  min-width: 0;
  padding: 11px;
  background: #121819;
}

.cc-policy-meta strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #d8e0de;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-policy-meta .cc-policy-action small {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #77837f;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-policy-foot {
  min-height: 58px;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 14px 9px 18px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.1);
}

.cc-policy-foot .secondary {
  min-height: 36px;
}

.cc-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #707d7a;
  font-size: 11px;
  font-weight: 700;
}

.cc-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #596461;
  display: block;
}

.cc-status.is-on {
  color: #68dfcd;
}

.cc-status.is-on i {
  background: #39dec5;
  box-shadow: 0 0 10px rgba(57, 222, 197, 0.55);
}

.cc-switch {
  position: relative;
  width: 42px;
  height: 24px;
  flex: 0 0 42px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: #252c2d;
}

.cc-switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #899491;
  transition: transform 160ms ease, background 160ms ease;
}

.cc-switch[aria-checked="true"] {
  border-color: rgba(255, 174, 87, 0.5);
  background: rgba(255, 174, 87, 0.2);
}

.cc-switch[aria-checked="true"] span {
  transform: translateX(18px);
  background: #ffb666;
}

.cc-switch:disabled {
  cursor: wait;
  opacity: 0.6;
}

.cc-form {
  width: min(100%, 760px);
  display: grid;
  gap: 16px;
  margin-inline: auto;
}

.cc-app-context {
  gap: 11px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.cc-app-context strong,
.cc-app-context span {
  display: block;
}

.cc-app-context strong {
  color: #f0f5f4;
  font-size: 14px;
}

.cc-app-context > div > span {
  margin-top: 4px;
  color: #75827f;
  font-size: 11px;
}

.cc-enable-row,
.cc-scope-section {
  min-height: 66px;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #111718;
}

.cc-enable-row strong,
.cc-enable-row span,
.cc-scope-section strong,
.cc-scope-section span {
  display: block;
}

.cc-enable-row strong,
.cc-scope-section strong {
  color: #e3eae8;
  font-size: 13px;
}

.cc-enable-row > div > span,
.cc-scope-section > div > span {
  margin-top: 4px;
  color: #71807d;
  font-size: 11px;
}

.toggle-control {
  position: relative;
  width: 44px;
  height: 25px;
  flex: 0 0 44px;
  cursor: pointer;
}

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

.toggle-control > span {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 13px;
  background: #282f30;
  transition: background 160ms ease, border-color 160ms ease;
}

.toggle-control > span::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #929c99;
  transition: transform 160ms ease, background 160ms ease;
}

.toggle-control input:checked + span {
  border-color: rgba(255, 174, 87, 0.5);
  background: rgba(255, 174, 87, 0.2);
}

.toggle-control input:checked + span::after {
  transform: translateX(19px);
  background: #ffb666;
}

.toggle-control input:focus-visible + span {
  outline: 2px solid #5ba8ff;
  outline-offset: 2px;
}

.cc-form-section {
  padding: 4px 0;
}

.cc-form-section h4 {
  margin: 0 0 14px;
  color: #dfe7e5;
  font-size: 13px;
}

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

.cc-action-grid .field {
  position: relative;
}

.cc-action-grid .field.is-muted {
  opacity: 0.46;
}

.cc-action-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.cc-action-choice {
  min-width: 0;
  min-height: 92px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 9px;
  align-content: center;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  background: #111718;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.cc-action-choice:hover,
.cc-action-choice.is-active {
  border-color: rgba(57, 222, 197, 0.48);
  background: rgba(57, 222, 197, 0.07);
  box-shadow: inset 0 2px 0 rgba(57, 222, 197, 0.65);
}

.cc-action-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.cc-action-choice > span {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: #84908d;
  background: rgba(255, 255, 255, 0.025);
}

.cc-action-choice.is-active > span {
  border-color: rgba(57, 222, 197, 0.4);
  color: #39dec5;
  background: rgba(57, 222, 197, 0.1);
}

.cc-action-choice .lucide-icon {
  width: 16px;
  height: 16px;
}

.cc-action-choice strong {
  overflow: hidden;
  color: #e4ebe9;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-action-choice small {
  margin-top: 4px;
  overflow: hidden;
  color: #71807c;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cc-action-detail {
  margin-top: 10px;
  padding: 13px 14px;
  border: 1px solid rgba(57, 222, 197, 0.14);
  border-radius: 7px;
  background: rgba(5, 14, 15, 0.55);
}

.cc-action-detail > div:first-child strong,
.cc-action-detail > div:first-child span {
  display: block;
}

.cc-action-detail > div:first-child strong {
  color: #dce5e2;
  font-size: 12px;
}

.cc-action-detail > div:first-child span {
  margin-top: 4px;
  color: #74817e;
  font-size: 10px;
  line-height: 1.5;
}

.cc-mode-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px;
  margin-top: 11px;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: #0d1213;
}

.cc-mode-control label {
  cursor: pointer;
}

.cc-mode-control input {
  position: absolute;
  opacity: 0;
}

.cc-mode-control span {
  min-height: 31px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: #7f8c89;
  font-size: 11px;
  transition: color 160ms ease, background 160ms ease;
}

.cc-mode-control input:checked + span {
  color: #dffbf6;
  background: rgba(57, 222, 197, 0.15);
}

.cc-duration-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 94px;
  gap: 8px;
  margin-top: 10px;
}

.cc-duration-editor input,
.cc-duration-editor select {
  min-width: 0;
  height: 38px;
}

[data-cc-duration].is-muted {
  display: none;
}

.cc-permanent-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 10px 0 0;
  padding: 9px 10px;
  border-left: 2px solid #ff5b68;
  color: #d8989d;
  background: rgba(255, 75, 88, 0.06);
  font-size: 10px;
  line-height: 1.5;
}

.cc-permanent-note .lucide-icon {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.cc-frequency-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.cc-frequency-editor .field,
.cc-burst-field {
  position: relative;
}

.cc-frequency-editor input {
  padding-right: 46px;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}

.input-suffix {
  position: absolute;
  right: 13px;
  bottom: 13px;
  color: #75827f;
  font-size: 11px;
  font-weight: 500;
}

.cc-divider {
  margin-top: 7px;
  color: #596562;
  font-size: 20px;
}

.cc-burst-field {
  width: calc(50% - 22px);
}

.cc-rule-summary {
  min-height: 54px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  border-left: 3px solid #ffae57;
  background: rgba(255, 174, 87, 0.07);
  color: #b7c1be;
  font-size: 11px;
  line-height: 1.65;
}

.cc-rule-summary .lucide-icon {
  margin-top: 1px;
  color: #ffb666;
}

.cc-rule-summary strong {
  color: #f1f5f4;
}

.cc-rule-summary.is-off {
  border-left-color: #596461;
  background: rgba(255, 255, 255, 0.025);
  opacity: 0.7;
}

@media (max-width: 1120px) {
  .cc-global-panel {
    grid-template-columns: 1fr auto;
  }

  .cc-global-stats {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .application-card-body {
    grid-template-columns: 170px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .cc-global-panel {
    grid-template-columns: 1fr;
  }

  .cc-global-panel > .primary,
  .cc-ip-search {
    width: 100%;
  }

  .cc-global-stats {
    grid-column: auto;
    grid-template-columns: 1fr;
  }

  .cc-global-stats > div + div {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .cc-ip-panel .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .cc-action-grid {
    grid-template-columns: 1fr;
  }

  .cc-action-choices {
    grid-template-columns: 1fr;
  }

  .applications-toolbar,
  .application-card-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .applications-tools,
  .application-search {
    width: 100%;
  }

  .application-search {
    max-width: none;
  }

  .applications-tools .primary {
    flex: 0 0 auto;
  }

  .application-card-body {
    grid-template-columns: 1fr;
  }

  .application-mode {
    border-right: 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
  }

  .application-tags {
    flex-wrap: wrap;
    overflow: visible;
  }

  .application-actions {
    justify-content: flex-end;
  }

  .cc-burst-field {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .sidebar nav {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .sidebar nav .nav-label {
    display: none;
  }

  .application-count {
    flex-wrap: wrap;
  }

  .applications-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .applications-tools .primary {
    width: 100%;
  }

  .application-card-head,
  .cc-policy-head {
    align-items: flex-start;
  }

  .application-state {
    margin-top: 4px;
  }

  .application-details > div {
    grid-template-columns: 62px minmax(0, 1fr);
  }

  .cc-policy-meta {
    grid-template-columns: 1fr;
  }

  .cc-policy-foot {
    align-items: stretch;
    flex-direction: column;
  }

  .cc-frequency-editor {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cc-divider {
    display: none;
  }

  .modal-body {
    padding: 18px 14px;
  }
}

.application-tags .tag-allow {
  background: rgba(57, 222, 197, 0.12);
  color: #39dec5;
  border: 1px solid rgba(57, 222, 197, 0.25);
}

.application-tags .tag-deny {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.application-tags .tag-geo.is-active {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.application-tags .tag-geo {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.application-tags .tag-challenge.is-active {
  background: rgba(168, 85, 247, 0.15);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

.application-tags .tag-auth.is-active {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.cc-exempt-summary {
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(57, 222, 197, 0.04);
  border: 1px solid rgba(57, 222, 197, 0.12);
  font-size: 12px;
  color: #8da19e;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cc-exempt-summary strong {
  color: #39dec5;
}

.cc-exempt-summary small {
  color: #647572;
}

.ip-acl-overview-panel {
  margin-bottom: 24px;
}

.acl-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding: 16px;
}

@media (max-width: 1024px) {
  .acl-overview-grid {
    grid-template-columns: 1fr;
  }
}

.acl-overview-card {
  background: rgba(11, 15, 23, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 14px;
}

.acl-box-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.acl-icon-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.acl-icon-dot.is-allow { background: #39dec5; box-shadow: 0 0 8px rgba(57, 222, 197, 0.4); }
.acl-icon-dot.is-deny { background: #ef4444; box-shadow: 0 0 8px rgba(239, 68, 68, 0.4); }
.acl-icon-dot.is-exempt { background: #f59e0b; box-shadow: 0 0 8px rgba(245, 158, 11, 0.4); }

.acl-box-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

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

.acl-box-body th {
  text-align: left;
  color: #64748b;
  font-weight: 500;
  padding: 4px 8px;
}

.acl-box-body td {
  padding: 6px 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
}

.application-tags .is-empty {
  opacity: 0.45;
  border-style: dashed;
}

.acl-add-row {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 8px 4px;
}

.acl-add-input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: #0d1213;
  color: #e5ebe9;
  font-size: 12px;
  font-family: inherit;
  transition: border-color 180ms ease;
}

.acl-add-input:focus {
  outline: none;
  border-color: rgba(57, 222, 197, 0.5);
}

.acl-add-input::placeholder {
  color: #4a5653;
}

.acl-add-site {
  width: 120px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  background: #0d1213;
  color: #c0ccc9;
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
}

.acl-add-site:focus {
  outline: none;
  border-color: rgba(57, 222, 197, 0.5);
}

.danger-text {
  color: #f87171 !important;
  font-size: 11px;
}

.danger-text:hover {
  color: #fca5a5 !important;
}

.acl-box-body .link-button {
  padding: 2px 6px;
}

/* Access analytics */
.access-analytics-page {
  width: 100%;
  max-width: 1920px;
  margin-inline: auto;
  display: grid;
  gap: 14px;
  letter-spacing: 0;
}

.access-toolbar {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 4px 13px;
  border-bottom: 1px solid var(--line);
}

.access-title h2 {
  margin: 0;
  color: #edf5f2;
  font-size: 20px;
  font-weight: 620;
}

.access-title p {
  margin: 5px 0 0;
  color: #66736f;
  font-size: 11px;
}

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

.access-filters label {
  color: #6f7d7a;
  font-size: 11px;
}

.access-filters select {
  width: 190px;
  height: 36px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #101617;
  color: #dce6e3;
}

.access-range {
  height: 36px;
}

.access-range button {
  min-width: 46px;
  padding-inline: 9px;
  color: #7f8c89;
}

.access-range button.active {
  background: #39dec5;
  color: #07100f;
}

.access-freshness,
.access-live-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #7d8a87;
  font-size: 11px;
  white-space: nowrap;
}

.access-freshness i,
.access-live-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #55d9a5;
  box-shadow: 0 0 8px rgba(85, 217, 165, .7);
}

.access-freshness.delayed i {
  background: #f2a572;
  box-shadow: 0 0 8px rgba(242, 165, 114, .6);
}

.access-source-label {
  color: #63716d;
  font-size: 10px;
}

.access-route-strip {
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(60px, .5fr) minmax(180px, 1fr) minmax(60px, .5fr) minmax(180px, 1fr);
  align-items: center;
  padding: 14px 22px;
  border: 1px solid var(--line);
  background: #0d1314;
}

.access-route-strip > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.access-route-strip > div > span {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(57, 222, 197, .28);
  border-radius: 6px;
  color: #4de2cc;
  background: #10191a;
}

.access-route-strip svg {
  width: 20px;
  height: 20px;
}

.access-route-strip p,
.access-route-strip strong,
.access-route-strip small {
  min-width: 0;
  display: block;
}

.access-route-strip p {
  color: #71807d;
  font-size: 11px;
}

.access-route-strip strong {
  margin-top: 3px;
  overflow: hidden;
  color: #edf5f2;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-route-strip small {
  margin-top: 2px;
  color: #5d6967;
}

.route-line {
  height: 1px;
  position: relative;
  margin-inline: 16px;
  background: #273a38;
}

.route-line::after {
  width: 7px;
  height: 7px;
  position: absolute;
  right: 0;
  top: -3px;
  border-top: 1px solid #55d9c4;
  border-right: 1px solid #55d9c4;
  content: "";
  transform: rotate(45deg);
}

.access-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.access-kpi {
  min-width: 0;
  min-height: 102px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-top: 2px solid #45504e;
  background: #0d1314;
}

.access-kpi.primary { border-top-color: #39dec5; }
.access-kpi.blue { border-top-color: #5ba8ff; }
.access-kpi.amber { border-top-color: #f0a15f; }
.access-kpi.success { border-top-color: #c3da62; }

.access-kpi > span {
  color: #7b8986;
  font-size: 11px;
}

.access-kpi > strong {
  overflow-wrap: anywhere;
  color: #f1f7f5;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 25px;
  line-height: 1.1;
}

.access-kpi > small {
  color: #65716f;
  font-size: 10px;
}

.access-kpi em {
  font-style: normal;
}

.access-kpi em.up { color: #62dba9; }
.access-kpi em.down { color: #f07f83; }
.access-kpi em.neutral { color: #75817f; }

.access-health-strip {
  min-height: 78px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: #0c1213;
}

.access-health-strip > div {
  min-width: 0;
  padding: 13px 16px;
}

.access-health-strip > div + div {
  border-left: 1px solid var(--line);
}

.access-health-strip span,
.access-health-strip strong,
.access-health-strip small {
  display: block;
}

.access-health-strip span {
  color: #64716e;
  font-size: 10px;
}

.access-health-strip strong {
  margin-top: 5px;
  overflow: hidden;
  color: #e6eeec;
  font: 15px ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-health-strip small {
  margin-top: 4px;
  overflow: hidden;
  color: #4f5d59;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-trend-panel {
  padding: 17px 18px 13px;
}

.access-trend-body {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: 0;
  margin-top: 2px;
}

.access-trend-chart {
  min-width: 0;
  padding: 8px 18px 0 0;
}

.access-trend-chart + .access-trend-chart {
  padding: 8px 0 0 18px;
  border-left: 1px solid var(--line);
}

.access-chart-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.access-chart-label span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #74817e;
  font-size: 10px;
}

.access-chart-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39dec5;
}

.access-chart-label i.orange { background: #f0a15f; }

.access-chart-label strong {
  color: #dce6e3;
  font: 13px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.access-trend-chart .sparkline-container {
  min-height: 210px;
}

.access-map-panel {
  padding: 18px;
}

.access-map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
}

.access-map-layout .globe-map-container {
  height: clamp(430px, 39vw, 690px);
}

.access-map-layout aside {
  min-width: 0;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.access-map-layout aside h4 {
  margin: 4px 0 14px;
  color: #8e9a97;
  font-size: 11px;
  font-weight: 600;
}

.access-geo-rank > div {
  min-height: 54px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}

.access-geo-rank > div > span {
  color: #4b5a57;
  font: 11px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.access-geo-rank p strong,
.access-geo-rank p small,
.access-geo-rank em small {
  display: block;
}

.access-geo-rank p strong {
  overflow: hidden;
  color: #dce6e3;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-geo-rank p small {
  margin-top: 3px;
  color: #5c6a67;
  font-size: 10px;
}

.access-geo-rank em {
  color: #50dfca;
  font: normal 13px ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: right;
}

.access-geo-rank em small {
  margin-top: 2px;
  color: #55625f;
  font-size: 9px;
}

.access-breakdown-grid,
.access-top-grid {
  display: grid;
  gap: 10px;
}

.access-breakdown-grid > .panel,
.access-table-panel,
.access-events-panel {
  padding: 16px;
}

.access-breakdown-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.access-breakdown-grid > .panel {
  min-height: 250px;
}

.access-distribution {
  display: grid;
  gap: 13px;
  padding: 9px 0 0;
  list-style: none;
}

.access-distribution li {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.access-distribution li > span {
  min-width: 0;
  position: relative;
  padding: 8px 8px;
  overflow: hidden;
  color: #bdc8c5;
  font-size: 11px;
}

.access-distribution li > span i {
  width: var(--bar-width);
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 0;
  border-left: 2px solid var(--bar-color);
  background: color-mix(in srgb, var(--bar-color) 12%, transparent);
}

.access-distribution li > span {
  isolation: isolate;
}

.access-distribution li > span i { z-index: -1; }

.access-distribution li > strong {
  color: #eef5f3;
  font: 12px ui-monospace, SFMono-Regular, Consolas, monospace;
  text-align: right;
}

.access-distribution li > strong small {
  display: block;
  margin-top: 2px;
  color: #5d6967;
  font-size: 9px;
}

.access-top-panel {
  padding: 16px;
}

.access-top-tabs {
  height: 32px;
}

.access-top-tabs button {
  min-width: 86px;
  color: #71807d;
}

.access-top-tabs button.active {
  background: #26322f;
  color: #e6eeec;
}

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

.access-top-table,
.access-events-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.access-top-table th,
.access-top-table td,
.access-events-table th,
.access-events-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
  color: #a9b5b2;
  font-size: 10px;
  text-align: left;
  white-space: nowrap;
}

.access-top-table th,
.access-events-table th {
  color: #596663;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
}

.access-top-table th:first-child { width: 44%; }
.access-top-table td:first-child {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.access-top-table td:first-child strong {
  overflow: hidden;
  color: #dce6e3;
  font-weight: 550;
  text-overflow: ellipsis;
}

.access-rank {
  width: 18px;
  flex: 0 0 18px;
  color: #4fdfca;
  font: 10px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.table-unit {
  color: #53615e;
  font-size: 9px;
}

.access-events-table {
  min-width: 1080px;
}

.access-events-table th:nth-child(1) { width: 12%; }
.access-events-table th:nth-child(2) { width: 15%; }
.access-events-table th:nth-child(3) { width: 29%; }
.access-events-table th:nth-child(4) { width: 7%; }
.access-events-table th:nth-child(5) { width: 13%; }

.access-events-table td strong,
.access-events-table td small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.access-events-table td strong {
  color: #d9e3e0;
  font-weight: 550;
}

.access-events-table td small {
  margin-top: 3px;
  color: #56635f;
}

.method-tag {
  display: inline-block;
  min-width: 34px;
  margin-right: 7px;
  color: #49dfc9;
  font: 9px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.status-code,
.access-outcome {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 22px;
  border-radius: 4px;
  font: 10px ui-monospace, SFMono-Regular, Consolas, monospace;
}

.status-2,
.access-outcome.passed {
  background: rgba(85, 217, 165, .1);
  color: #62dba9;
}

.status-3 { background: rgba(91, 168, 255, .1); color: #74b5ff; }
.status-4 { background: rgba(242, 165, 114, .1); color: #f2a572; }
.status-5,
.access-outcome.blocked { background: rgba(240, 105, 112, .1); color: #f07f83; }

@media (max-width: 1500px) {
  .access-breakdown-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .access-toolbar { align-items: flex-start; flex-direction: column; }
  .access-filters { width: 100%; flex-wrap: wrap; }
  .access-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .access-health-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .access-health-strip > div:nth-child(4) { border-left: 0; border-top: 1px solid var(--line); }
  .access-health-strip > div:nth-child(5) { border-top: 1px solid var(--line); }
  .access-map-layout { grid-template-columns: minmax(0, 1fr) 250px; }
  .access-trend-body { grid-template-columns: 1fr; }
  .access-trend-chart + .access-trend-chart { padding: 14px 0 0; border-top: 1px solid var(--line); border-left: 0; }
}

@media (max-width: 760px) {
  .access-filters label,
  .access-filters select,
  .access-range { width: 100%; }
  .access-filters label { align-items: flex-start; flex-direction: column; }
  .access-range button { min-width: 0; flex: 1; }
  .access-kpi-grid,
  .access-breakdown-grid { grid-template-columns: 1fr; }
  .access-health-strip { grid-template-columns: 1fr; }
  .access-health-strip > div + div,
  .access-health-strip > div:nth-child(4),
  .access-health-strip > div:nth-child(5) { border-top: 1px solid var(--line); border-left: 0; }
  .access-map-layout { grid-template-columns: 1fr; }
  .access-map-layout .globe-map-container { height: 420px; }
  .access-map-layout aside { padding: 14px 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .access-top-panel .panel-head { align-items: flex-start; flex-direction: column; }
  .access-top-tabs { width: 100%; }
  .access-top-tabs button { min-width: 0; flex: 1; }
}
