:root {
  color-scheme: light;
  --ink: #193040;
  --ink-soft: #5c707c;
  --muted: #8b9aa3;
  --line: #dce5e8;
  --line-strong: #c7d5da;
  --paper: #f5f8f8;
  --surface: #ffffff;
  --surface-soft: #eef4f4;
  --navy: #102b3f;
  --teal: #138a88;
  --teal-dark: #0c6f70;
  --blue: #3b78b8;
  --green: #2f9272;
  --red: #c35656;
  --amber: #b7772c;
  --shadow: 0 16px 42px rgba(19, 45, 58, 0.08);
  --radius: 7px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
  line-height: 1.5;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(19, 138, 136, 0.2);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  background: var(--surface);
}

.auth-rail {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 42px clamp(30px, 6vw, 92px);
  color: #eaf4f4;
  background:
    linear-gradient(130deg, rgba(16, 43, 63, 0.98), rgba(16, 69, 76, 0.94)),
    #102b3f;
}

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

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  color: #c7f1eb;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.auth-brand strong,
.app-brand strong {
  display: block;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: 0.02em;
}

.auth-brand small,
.app-brand small {
  display: block;
  margin-top: 1px;
  color: #9cb2b8;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.auth-copy {
  max-width: 420px;
  margin: auto 0;
}

.auth-copy h1 {
  max-width: 340px;
  margin: 18px 0 12px;
  color: #f7fbfb;
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.12;
  letter-spacing: 0;
}

.auth-copy p {
  max-width: 350px;
  margin: 0;
  color: #b9cbcf;
  font-size: 16px;
}

.auth-footer {
  color: #8ca5ac;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  display: block;
  color: var(--teal);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.auth-rail .eyebrow {
  color: #7ed5cc;
}

.auth-panel {
  display: flex;
  width: min(100%, 520px);
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(32px, 8vw, 120px);
}

.auth-panel-head h2 {
  margin: 10px 0 6px;
  color: var(--navy);
  font-size: 34px;
  line-height: 1.15;
}

.auth-panel-head p {
  margin: 0 0 34px;
  color: var(--ink-soft);
}

.stack-form {
  display: grid;
  gap: 19px;
}

.field {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.field > span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.field > span em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.field input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input::placeholder {
  color: #a9b6bb;
}

.field input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(19, 138, 136, 0.1);
  outline: 0;
}

.field small {
  color: var(--muted);
  font-size: 11px;
}

.button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: var(--ink);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease,
    transform 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

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

.button.primary {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.button.primary:hover {
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}

.button.secondary {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--surface);
}

.button.secondary:hover {
  border-color: var(--teal);
  color: var(--teal-dark);
}

.button.danger {
  border-color: var(--red);
  color: #fff;
  background: var(--red);
}

.button.danger:hover {
  border-color: #a34444;
  background: #a34444;
}

.button.text-button {
  min-height: 28px;
  padding: 4px 0;
  color: var(--teal-dark);
}

.button.text-button:hover {
  color: var(--navy);
}

.button.wide {
  width: 100%;
}

.form-message {
  margin: 0;
  font-size: 12px;
}

.form-message.error {
  color: var(--red);
}

.auth-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.main-screen {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  width: 244px;
  flex: 0 0 244px;
  flex-direction: column;
  padding: 28px 18px 20px;
  color: #d9e8e9;
  background: var(--navy);
}

.sidebar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0 8px;
}

.version-tag {
  margin-top: 4px;
  color: #7b9ca4;
  font-size: 10px;
}

.connection-box {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 38px 5px 30px;
  padding: 11px 12px;
  border: 1px solid rgba(157, 203, 203, 0.16);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.045);
}

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

.connection-box strong {
  color: #e4f0f0;
  font-size: 11px;
}

.connection-box small {
  margin-top: 2px;
  overflow: hidden;
  color: #86a6ac;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #94a7ab;
  box-shadow: 0 0 0 4px rgba(148, 167, 171, 0.1);
}

.connection-box.online .status-dot {
  background: #65d1a7;
  box-shadow: 0 0 0 4px rgba(101, 209, 167, 0.13);
}

.connection-box.warning .status-dot {
  background: #e4aa5f;
  box-shadow: 0 0 0 4px rgba(228, 170, 95, 0.13);
}

.connection-box.offline .status-dot {
  background: #ec7b7b;
  box-shadow: 0 0 0 4px rgba(236, 123, 123, 0.13);
}

.main-nav {
  display: grid;
  gap: 4px;
}

.nav-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  padding: 11px 10px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 3px;
  color: #90abb1;
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  border-left-color: #67d1c5;
  color: #f4fbfb;
  background: rgba(255, 255, 255, 0.075);
}

.nav-icon {
  width: 21px;
  color: #668991;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.nav-item.active .nav-icon {
  color: #78d8ce;
}

.sidebar-footer {
  display: grid;
  gap: 18px;
  margin-top: auto;
  padding: 18px 8px 0;
  border-top: 1px solid rgba(183, 220, 220, 0.13);
}

.operator {
  display: flex;
  align-items: center;
  gap: 10px;
}

.operator-avatar {
  display: inline-grid;
  width: 29px;
  height: 29px;
  place-items: center;
  border-radius: 50%;
  color: #c9f4ec;
  background: rgba(89, 190, 178, 0.2);
  font-size: 11px;
  font-weight: 800;
}

.operator strong,
.operator small {
  display: block;
}

.operator strong {
  color: #e7f2f2;
  font-size: 11px;
}

.operator small {
  margin-top: 1px;
  color: #7f9da4;
  font-size: 10px;
}

.sidebar .text-button {
  justify-content: flex-start;
  color: #8faeb4;
  font-size: 11px;
  font-weight: 600;
}

.content-shell {
  min-width: 0;
  flex: 1;
}

.topbar {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(22px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
}

.topbar-leading,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.topbar h1 {
  margin: 4px 0 0;
  color: var(--navy);
  font-size: 18px;
  line-height: 1.2;
}

.last-updated {
  color: var(--muted);
  font-size: 11px;
}

.menu-button {
  display: none;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  color: var(--ink);
  background: var(--surface);
  font-size: 11px;
}

.main-content {
  max-width: 1600px;
  margin: 0 auto;
  padding: 38px clamp(22px, 4vw, 56px) 64px;
}

.page-view {
  display: block;
}

.page-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.page-intro h2 {
  margin: 8px 0 5px;
  color: var(--navy);
  font-size: 25px;
  line-height: 1.25;
}

.page-intro p {
  margin: 0;
  color: var(--ink-soft);
}

.intro-context {
  min-width: 138px;
  padding: 10px 14px;
  border-left: 2px solid var(--teal);
  background: var(--surface);
}

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

.intro-context span {
  color: var(--muted);
  font-size: 10px;
}

.intro-context strong {
  margin-top: 3px;
  color: var(--navy);
  font-size: 13px;
}

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

.metric-card {
  position: relative;
  min-height: 135px;
  padding: 19px 20px 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 18px rgba(19, 45, 58, 0.025);
}

.metric-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 52px;
  height: 3px;
  content: "";
  background: var(--line-strong);
}

.metric-card.accent-blue::after {
  background: var(--blue);
}

.metric-card.accent-green::after {
  background: var(--green);
}

.metric-card.accent-red::after {
  background: var(--red);
}

.metric-label {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 650;
}

.metric-value {
  margin: 12px 0 10px;
  color: var(--navy);
  font-size: 30px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1;
}

.metric-meta {
  color: var(--muted);
  font-size: 10px;
}

.dashboard-grid,
.settings-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(275px, 0.8fr);
  gap: 20px;
}

.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 4px 18px rgba(19, 45, 58, 0.025);
}

.surface-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 17px;
}

.surface-head h3 {
  margin: 6px 0 0;
  color: var(--navy);
  font-size: 15px;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #f8fbfb;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #edf2f3;
  color: var(--ink);
  font-size: 12px;
  vertical-align: middle;
}

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

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

.table-primary {
  display: block;
  max-width: 180px;
  overflow: hidden;
  color: var(--navy);
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-secondary {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.empty-state {
  display: grid;
  min-height: 190px;
  place-items: center;
  padding: 28px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.empty-state strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 13px;
}

.status-surface {
  padding-bottom: 20px;
}

.status-body {
  display: grid;
  gap: 8px;
  min-height: 78px;
  padding: 0 22px;
}

.status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.status-line span {
  color: var(--muted);
  font-size: 11px;
}

.status-line strong {
  max-width: 180px;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-divider {
  height: 1px;
  margin: 16px 22px 8px;
  background: var(--line);
}

.status-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 7px 22px;
}

.status-stat span {
  color: var(--muted);
  font-size: 11px;
}

.status-stat strong {
  color: var(--navy);
  font-size: 15px;
}

.status-surface > .button {
  margin: 16px 22px 0;
}

.status-badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

.status-badge.neutral {
  color: #6d7e86;
  background: #edf2f3;
}

.status-badge.pending {
  color: #90601f;
  background: #fbf0dc;
}

.status-badge.success {
  color: #247558;
  background: #e5f4ed;
}

.status-badge.failure {
  color: #a74444;
  background: #f9e8e8;
}

.status-badge.unknown {
  color: #486d8f;
  background: #e6f0f8;
}

.notice {
  margin: -9px 0 20px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 4px;
  color: var(--ink);
  background: var(--surface);
  font-size: 12px;
}

.notice.error {
  border-left-color: var(--red);
  color: #8f3d3d;
  background: #fff7f7;
}

.notice.success {
  border-left-color: var(--green);
  color: #256b53;
  background: #f4fbf7;
}

.editor-surface {
  overflow: hidden;
}

.editor-head {
  align-items: flex-end;
}

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

.file-button {
  position: relative;
  overflow: hidden;
}

.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.payout-table-wrap {
  min-height: 198px;
}

.payout-table {
  min-width: 1000px;
}

.payout-table th,
.payout-table td {
  padding-right: 10px;
  padding-left: 10px;
}

.payout-table .index-col {
  width: 42px;
  text-align: center;
}

.payout-table .amount-col {
  width: 145px;
}

.payout-table .action-col {
  width: 66px;
  text-align: center;
}

.cell-input {
  width: 100%;
  min-height: 34px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font-size: 11px;
}

.cell-input:focus {
  border-color: var(--teal);
  outline: 0;
  box-shadow: 0 0 0 2px rgba(19, 138, 136, 0.09);
}

.cell-input.invalid {
  border-color: var(--red);
  background: #fff9f9;
}

.icon-button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--red);
  background: #fff;
  font-size: 14px;
  line-height: 1;
}

.icon-button:hover {
  border-color: var(--red);
  background: #fff5f5;
}

.editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 18px;
  border-top: 1px solid var(--line);
  background: #fbfdfd;
}

.editor-hint,
.editor-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  color: var(--muted);
  font-size: 11px;
}

.editor-summary {
  justify-content: flex-end;
}

.editor-summary strong {
  color: var(--navy);
  font-size: 13px;
}

.submit-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 20px;
  padding: 18px 22px;
  border: 1px solid #c9e4df;
  border-radius: var(--radius);
  background: #f1faf8;
}

.submit-bar h3 {
  margin: 5px 0 3px;
  color: var(--navy);
  font-size: 14px;
}

.submit-bar p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 11px;
}

.tasks-head {
  padding-bottom: 16px;
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 3px;
  border-radius: 4px;
  background: var(--surface-soft);
}

.segment {
  min-height: 29px;
  padding: 5px 12px;
  border: 0;
  border-radius: 3px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 11px;
  font-weight: 650;
}

.segment:hover,
.segment.active {
  color: var(--navy);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(19, 45, 58, 0.1);
}

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

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

.saved-label {
  color: var(--muted);
  font-size: 11px;
}

.settings-form {
  display: grid;
  gap: 19px;
  padding: 0 22px 23px;
}

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

.switch-row {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fbfdfd;
}

.switch-copy strong,
.switch-copy small {
  display: block;
}

.switch-copy strong {
  color: var(--ink);
  font-size: 12px;
}

.switch-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.switch-row input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch-ui {
  position: relative;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: #c6d1d4;
  transition: background 160ms ease;
}

.switch-ui::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  content: "";
  background: #fff;
  box-shadow: 0 1px 3px rgba(19, 45, 58, 0.22);
  transition: transform 160ms ease;
}

.switch-row input:checked + .switch-ui {
  background: var(--teal);
}

.switch-row input:checked + .switch-ui::after {
  transform: translateX(16px);
}

.settings-aside {
  align-self: start;
}

.security-list {
  display: grid;
  gap: 0;
  padding: 0 22px 21px;
}

.security-item {
  display: flex;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid #edf2f3;
}

.security-item:last-child {
  border-bottom: 0;
}

.security-index {
  color: var(--teal);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
}

.security-item strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.security-item p {
  margin: 4px 0 0;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.65;
}

.provider-response {
  margin: 0 22px 22px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fbfb;
}

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

.response-head strong {
  font-size: 11px;
}

.response-head .text-button {
  min-height: auto;
  font-size: 10px;
}

.provider-response pre {
  max-height: 190px;
  margin: 0;
  padding: 11px;
  overflow: auto;
  color: #385563;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.modal {
  position: fixed;
  z-index: 20;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 31, 43, 0.58);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 640px);
  max-height: calc(100vh - 44px);
  overflow: auto;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 24px 70px rgba(7, 31, 45, 0.24);
}

.task-card {
  width: min(100%, 900px);
}

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

.modal-head h2 {
  margin: 7px 0 0;
  color: var(--navy);
  font-size: 20px;
}

.close-button {
  min-height: 29px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 10px;
}

.close-button:hover {
  border-color: var(--ink-soft);
  color: var(--ink);
}

.confirm-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 20px 25px;
  border: 1px solid var(--line);
  background: var(--line);
}

.confirm-stat {
  padding: 14px 13px;
  background: #fbfdfd;
}

.confirm-stat span,
.confirm-stat strong {
  display: block;
}

.confirm-stat span {
  color: var(--muted);
  font-size: 10px;
}

.confirm-stat strong {
  margin-top: 5px;
  color: var(--navy);
  font-size: 16px;
}

.confirm-warning {
  margin: 0 25px;
  padding: 11px 12px;
  border-left: 3px solid var(--amber);
  color: #855a29;
  background: #fff8ec;
  font-size: 11px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 22px 25px 25px;
}

.task-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 20px 25px;
  border: 1px solid var(--line);
  background: var(--line);
}

.task-overview-item {
  min-width: 0;
  padding: 12px;
  background: #fbfdfd;
}

.task-overview-item span,
.task-overview-item strong {
  display: block;
}

.task-overview-item span {
  color: var(--muted);
  font-size: 10px;
}

.task-overview-item strong {
  margin-top: 4px;
  overflow: hidden;
  color: var(--navy);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-section {
  padding: 0 25px 22px;
}

.detail-section h3 {
  margin: 0 0 10px;
  color: var(--navy);
  font-size: 13px;
}

.detail-section .data-table {
  min-width: 580px;
}

.detail-code {
  max-height: 180px;
  margin: 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: #385563;
  background: #f8fbfb;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.toast-region {
  position: fixed;
  z-index: 30;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 40px));
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--teal);
  border-radius: 5px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
  font-size: 12px;
  animation: toast-in 180ms ease-out;
}

.toast.error {
  border-left-color: var(--red);
}

.toast.success {
  border-left-color: var(--green);
}

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

.sidebar-overlay {
  position: fixed;
  z-index: 9;
  inset: 0;
  background: rgba(10, 31, 43, 0.46);
}

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

  .dashboard-grid,
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .auth-screen {
    grid-template-columns: 1fr;
  }

  .auth-rail {
    min-height: 260px;
    padding: 27px 28px;
  }

  .auth-copy {
    margin: 42px 0 0;
  }

  .auth-copy h1 {
    margin-top: 11px;
    font-size: 34px;
  }

  .auth-footer {
    display: none;
  }

  .auth-panel {
    width: 100%;
    padding: 42px 28px 56px;
  }

  .sidebar {
    position: fixed;
    z-index: 10;
    top: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    transition: transform 180ms ease;
  }

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

  .menu-button {
    display: inline-flex;
  }

  .topbar {
    min-height: 70px;
    padding: 15px 20px;
  }

  .last-updated {
    display: none;
  }

  .main-content {
    padding: 30px 20px 52px;
  }

  .topbar-actions .button {
    min-height: 32px;
    padding: 7px 9px;
    font-size: 10px;
  }
}

@media (max-width: 600px) {
  .metric-grid {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .metric-card {
    min-height: 120px;
    padding: 15px;
  }

  .metric-value {
    font-size: 25px;
  }

  .page-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 15px;
  }

  .page-intro h2 {
    font-size: 22px;
  }

  .page-intro > .button {
    width: 100%;
  }

  .intro-context {
    width: 100%;
  }

  .surface-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 17px 16px 14px;
  }

  .surface-head.editor-head {
    align-items: flex-start;
  }

  .toolbar {
    width: 100%;
  }

  .toolbar .button {
    flex: 1 1 auto;
  }

  .editor-foot,
  .submit-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .editor-summary {
    justify-content: flex-start;
  }

  .submit-actions,
  .submit-actions .button {
    width: 100%;
  }

  .submit-actions .button {
    flex: 1;
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .settings-form {
    padding-right: 16px;
    padding-left: 16px;
  }

  .settings-surface .surface-head,
  .settings-aside .surface-head {
    padding-right: 16px;
    padding-left: 16px;
  }

  .security-list {
    padding-right: 16px;
    padding-left: 16px;
  }

  .provider-response {
    margin-right: 16px;
    margin-left: 16px;
  }

  .tasks-head {
    gap: 10px;
  }

  .segmented-control {
    width: 100%;
  }

  .segment {
    flex: 1 1 auto;
    padding-right: 6px;
    padding-left: 6px;
  }

  .confirm-summary {
    grid-template-columns: 1fr;
    margin-right: 16px;
    margin-left: 16px;
  }

  .confirm-warning,
  .modal-actions {
    margin-right: 16px;
    margin-left: 16px;
  }

  .modal-actions {
    padding-right: 0;
    padding-left: 0;
  }

  .task-overview {
    grid-template-columns: 1fr 1fr;
    margin-right: 16px;
    margin-left: 16px;
  }

  .detail-section {
    padding-right: 16px;
    padding-left: 16px;
  }

  .modal-head {
    padding-right: 16px;
    padding-left: 16px;
  }
}
