:root {
  --navy: #273142;
  --navy-2: #313d50;
  --red: #ed1c24;
  --red-dark: #cf151c;
  --red-soft: #fff0f1;
  --ink: #252a34;
  --text: #344054;
  --muted: #738095;
  --line: #e5e9ef;
  --soft: #f5f7fa;
  --white: #fff;
  --green: #07845c;
  --green-soft: #eaf8f2;
  --amber: #a76a05;
  --amber-soft: #fff7df;
  --blue: #315f93;
  --blue-soft: #edf4fb;
  --shadow: 0 2px 10px rgba(31, 42, 58, 0.045);
  font:
    14px/1.5 Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--text);
  background: var(--soft);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  background: var(--soft);
}
.auth-bootstrap {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  color: var(--muted);
  background: var(--soft);
}
.auth-bootstrap p { margin: 0; }
.auth-bootstrap__spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--line);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: auth-spin .75s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
button,
input,
select,
textarea {
  font: inherit;
}
button {
  border: 0;
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(237, 28, 36, 0.18);
  outline-offset: 2px;
}
svg.icon {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: block;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
.brand,
.topbar-brand {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--ink);
  line-height: 1;
}
.brand strong,
.topbar-brand strong {
  color: var(--red);
}
.brand small,
.topbar-brand small {
  display: block;
  color: #8a94a5;
  font-size: 8px;
  letter-spacing: 2.5px;
  margin-top: 5px;
  font-weight: 800;
}
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 1.05fr) minmax(430px, 0.95fr);
  background: #fff;
}
.auth-visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  padding: 72px;
  background: var(--navy);
  overflow: hidden;
}
.auth-visual:before,
.auth-visual:after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 50%;
}
.auth-visual:before {
  width: 720px;
  height: 720px;
  right: -260px;
  top: -300px;
}
.auth-visual:after {
  width: 480px;
  height: 480px;
  left: -220px;
  bottom: -210px;
}
.auth-visual-content {
  position: relative;
  z-index: 1;
  color: #fff;
}
.auth-mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  background: var(--red);
  border-radius: 15px;
  font-size: 30px;
  font-weight: 900;
  margin-bottom: 35px;
}
.auth-visual h2 {
  font-size: 38px;
  line-height: 1.16;
  letter-spacing: -0.035em;
  margin-bottom: 16px;
}
.auth-visual p {
  color: #bdc6d2;
  font-size: 16px;
}
.auth-card {
  align-self: center;
  width: min(100% - 48px, 430px);
  margin: auto;
  padding: 30px;
}
.auth-copy {
  margin: 55px 0 32px;
}
.auth-copy h1 {
  color: var(--ink);
  font-size: 28px;
  letter-spacing: -0.025em;
  margin-bottom: 7px;
}
.auth-copy p {
  color: var(--muted);
  margin: 0;
}
.auth-card label,
.form-grid label {
  display: grid;
  gap: 7px;
  color: #485568;
  font-size: 13px;
  font-weight: 650;
  margin-bottom: 18px;
}
.auth-card input,
.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid #d8dee7;
  border-radius: 9px;
  padding: 11px 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: 0.2s;
}
.auth-card input:focus,
.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
  border-color: #a5adba;
  box-shadow: 0 0 0 3px rgba(45, 56, 74, 0.08);
}
.password-field {
  position: relative;
}
.password-field button {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  padding: 7px;
  background: transparent;
  color: #7f8999;
}
.password-field input {
  padding-right: 46px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 9px;
  padding: 9px 15px;
  font-weight: 700;
  font-size: 13px;
  transition: 0.18s;
}
.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--red-dark);
}
.btn-danger {
  background: var(--red);
  color: #fff;
}
.btn-light {
  background: #fff;
  color: #3d4a5e;
  border: 1px solid #dbe1e9;
}
.btn-light:hover {
  background: #f8fafc;
  border-color: #c5cdd8;
}
.btn-small {
  min-height: 35px;
  padding: 7px 11px;
  font-size: 12px;
}
.btn-block {
  width: 100%;
  margin-top: 5px;
}
.auth-secure {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: #8791a0;
  margin-top: 24px;
}
.auth-secure svg {
  width: 15px;
  height: 15px;
}
.alert {
  padding: 11px 13px;
  border-radius: 9px;
  margin-top: 15px;
}
.alert-error {
  background: var(--red-soft);
  color: #a9242a;
  border: 1px solid #ffd8db;
}
.app-shell {
  min-height: 100vh;
}
.topbar {
  height: 70px;
  background: #fff;
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e8ebf0;
  box-shadow: 0 1px 5px rgba(31, 42, 58, 0.025);
}
.topbar-brand {
  height: 70px;
  width: 255px;
  padding: 19px 24px;
  background: #fff;
  border-right: 1px solid #e8ebf0;
}
.topbar-brand small {
  display: none;
}
.topbar-spacer {
  flex: 1;
}
.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 9px;
  background: transparent;
  color: #667286;
  margin: 0 2px;
}
.icon-btn:hover {
  background: #f3f5f8;
  color: var(--ink);
}
.menu-toggle {
  margin-left: 15px;
}
.account-button {
  height: 70px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  padding: 0 22px 0 14px;
  border-left: 1px solid #edf0f4;
  margin-left: 7px;
  color: var(--text);
}
.avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef1f5;
  color: var(--navy);
}
.avatar svg {
  width: 17px;
  height: 17px;
}
.account-copy {
  text-align: left;
  line-height: 1.3;
}
.account-copy strong,
.account-copy small {
  display: block;
}
.account-copy strong {
  font-size: 13px;
  color: var(--ink);
}
.account-copy small {
  font-size: 11px;
  color: var(--muted);
}
.account-button > svg {
  width: 14px;
  height: 14px;
}
.account-menu {
  position: fixed;
  right: 16px;
  top: 62px;
  z-index: 70;
  width: 205px;
  padding: 7px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 14px 40px rgba(31, 42, 58, 0.15);
}
.account-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 7px;
  background: transparent;
  color: #425067;
  text-align: left;
}
.account-menu button:hover {
  background: #f5f7fa;
}
.danger-text {
  color: #bd252b !important;
}
.sidebar {
  position: fixed;
  z-index: 45;
  left: 0;
  top: 70px;
  bottom: 0;
  width: 255px;
  display: flex;
  flex-direction: column;
  background: var(--navy);
  color: #cbd2dc;
  padding: 17px 13px;
}
.sidebar nav {
  overflow-y: auto;
  padding-right: 2px;
}
.nav-title {
  margin: 19px 12px 7px;
  color: #7f8b9d;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.11em;
}
.nav-title:first-child {
  margin-top: 5px;
}
.sidebar nav button {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  color: #c2cad6;
  padding: 11px 13px;
  border-radius: 8px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  margin: 2px 0;
  transition: 0.18s;
}
.sidebar nav button svg {
  width: 18px;
  height: 18px;
  color: #9ea9b8;
}
.sidebar nav button:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}
.sidebar nav button.active {
  background: #fff;
  color: var(--navy);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.12);
}
.sidebar nav button.active:before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--red);
  border-radius: 0 3px 3px 0;
}
.sidebar nav button.active svg {
  color: var(--red);
}
.sidebar-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: auto;
  padding: 14px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-status div {
  min-width: 0;
}
.sidebar-status strong,
.sidebar-status small {
  display: block;
}
.sidebar-status strong {
  font-size: 11px;
  color: #e5e9ef;
}
.sidebar-status small {
  font-size: 9px;
  color: #8e99a9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 175px;
}
.status-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
  margin-top: 4px;
}
.mobile-overlay {
  position: fixed;
  z-index: 40;
  inset: 70px 0 0;
  background: rgba(18, 25, 36, 0.5);
}
.workspace {
  margin-left: 255px;
  padding-top: 70px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.content {
  flex: 1;
  width: 100%;
  max-width: 1580px;
  margin: 0 auto;
  padding: 30px 32px 40px;
}
.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.page-heading h1 {
  color: var(--ink);
  font-size: 24px;
  letter-spacing: -0.025em;
  margin-bottom: 5px;
}
.page-heading p {
  color: var(--muted);
  margin: 0;
}
.panel {
  display: none;
}
.panel.active {
  display: block;
}
.footer {
  padding: 18px 32px;
  border-top: 1px solid var(--line);
  background: #fff;
  color: #7e8998;
  font-size: 12px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}
.kpi-grid.compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.kpi,
.card {
  background: #fff;
  border: 1px solid rgba(218, 224, 232, 0.9);
  border-radius: 11px;
  box-shadow: var(--shadow);
}
.kpi {
  min-height: 116px;
  padding: 21px;
  display: flex;
  align-items: center;
  gap: 15px;
}
.kpi-icon,
.soft-icon,
.modal-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: #eef2f7;
  color: var(--navy);
}
.kpi-icon.success,
.soft-icon.success {
  background: var(--green-soft);
  color: var(--green);
}
.kpi-icon.danger,
.soft-icon.danger,
.modal-icon.danger {
  background: var(--red-soft);
  color: var(--red);
}
.kpi-icon.warning {
  background: var(--amber-soft);
  color: var(--amber);
}
.kpi-icon svg,
.soft-icon svg,
.modal-icon svg {
  width: 21px;
  height: 21px;
}
.kpi small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 5px;
}
.kpi strong {
  display: block;
  color: var(--ink);
  font-size: 27px;
  line-height: 1;
  letter-spacing: -0.04em;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(285px, 1fr);
  gap: 20px;
}
.dashboard-side {
  display: grid;
  gap: 20px;
}
.card {
  overflow: visible;
}
.card-head {
  min-height: 73px;
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #edf0f4;
}
.card-head h2 {
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 3px;
}
.card-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.card-body {
  padding: 20px;
}
.summary-list {
  padding: 5px 20px 12px;
}
.summary-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #edf0f4;
}
.summary-list > div:last-child {
  border-bottom: 0;
}
.summary-list span {
  color: var(--muted);
}
.summary-list strong {
  color: var(--ink);
  font-size: 15px;
}
.security-card {
  padding: 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.security-card h3 {
  font-size: 14px;
  margin-bottom: 4px;
}
.security-card p {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 13px;
}
.live-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.live-label i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
}
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}
.search-box {
  position: relative;
  min-width: 260px;
  max-width: 400px;
  flex: 1;
}
.search-box > svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #8b95a4;
}
.search-box input {
  width: 100%;
  height: 40px;
  padding: 8px 12px 8px 38px;
  border: 1px solid #dce2e9;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  outline: none;
}
.search-box input:focus {
  border-color: #aab3c0;
  box-shadow: 0 0 0 3px rgba(45, 56, 74, 0.06);
}
.tabs {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: #e9edf2;
  border-radius: 9px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar {
  display: none;
}
.tabs button {
  white-space: nowrap;
  padding: 7px 11px;
  border-radius: 7px;
  background: transparent;
  color: #657186;
  font-size: 12px;
  font-weight: 650;
}
.tabs button.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(35, 45, 60, 0.1);
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
}
th {
  padding: 12px 15px;
  background: #f8fafc;
  color: #778296;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.075em;
  text-align: left;
  font-weight: 750;
  border-bottom: 1px solid #e8ecf1;
}
td {
  padding: 13px 15px;
  border-bottom: 1px solid #edf0f4;
  vertical-align: middle;
  color: #485568;
  font-size: 12px;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fbfcfd;
}
td strong {
  color: var(--ink);
}
td small {
  color: #8993a2;
}
.actions-col {
  text-align: right;
  width: 74px;
}
.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}
.table-action {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #f0f3f7;
  color: #526075;
}
.table-action:hover {
  background: #e5eaf0;
  color: var(--ink);
}
.table-action.danger:hover {
  background: var(--red-soft);
  color: var(--red);
}
.table-action svg {
  width: 16px;
  height: 16px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 99px;
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 750;
  background: #eef1f5;
  color: #536070;
}
.badge:before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.badge.active,
.badge.online,
.badge.completed {
  background: var(--green-soft);
  color: var(--green);
}
.badge.suspended,
.badge.revoked,
.badge.expired,
.badge.offline,
.badge.failed {
  background: var(--red-soft);
  color: #b32930;
}
.badge.pending,
.badge.delivered {
  background: var(--amber-soft);
  color: var(--amber);
}
code,
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  color: #3e4b60;
}
.empty-row td {
  text-align: center;
  padding: 45px 20px;
  color: var(--muted);
}
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.empty-state svg {
  width: 28px;
  height: 28px;
  color: #9aa4b3;
}
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid #edf0f4;
  color: var(--muted);
  font-size: 11px;
}
.pagination-buttons {
  display: flex;
  gap: 5px;
}
.pagination button {
  min-width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid #dce2e9;
  background: #fff;
  color: #526075;
}
.pagination button:hover:not(:disabled),
.pagination button.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.pagination button:disabled {
  opacity: 0.45;
  cursor: default;
}
.support-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.1fr);
  gap: 20px;
}
.router-selector {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  max-height: 420px;
  overflow-y: auto;
}
.router-choice {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  text-align: left;
}
.router-choice:hover,
.router-choice.active {
  border-color: #adb7c5;
  background: #f8fafc;
}
.router-choice.active {
  box-shadow: inset 3px 0 var(--red);
}
.router-choice .soft-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}
.router-choice .soft-icon svg {
  width: 17px;
  height: 17px;
}
.router-choice div {
  min-width: 0;
  flex: 1;
}
.router-choice strong,
.router-choice small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.router-choice strong {
  font-size: 12px;
  color: var(--ink);
}
.router-choice small {
  font-size: 10px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 14px;
}
.form-grid .full {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
}
.support-action-fields {
  display: grid;
  grid-template-columns: 1fr;
}
.support-action-fields[hidden] {
  display: none;
}
.bootstrap-error {
  width: min(92vw, 520px);
  margin: 12vh auto;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}
.bootstrap-error button {
  min-height: 40px;
  padding: 9px 15px;
  border-radius: 9px;
  background: var(--red);
  color: var(--white);
  font-weight: 700;
}
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}
.settings-form {
  padding: 20px;
}
.settings-form label {
  margin-bottom: 0;
}
.settings-form label > span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.settings-form label b {
  color: var(--red);
}
.settings-form label small,
.form-divider small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}
.form-divider {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 5px 0 1px;
  padding-top: 16px;
  border-top: 1px solid #edf0f4;
}
.form-divider span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}
.form-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 5px;
}
.card-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 20px 20px;
  padding: 11px 12px;
  border-radius: 9px;
  background: #f7f8fa;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}
.card-note svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 1px;
}
.settings-list {
  display: grid;
  gap: 0;
}
.settings-list > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding: 13px 0;
  border-bottom: 1px solid #edf0f4;
}
.settings-list > div:last-child {
  border: 0;
}
.settings-list span {
  color: var(--muted);
}
.settings-list code {
  max-width: 65%;
  overflow-wrap: anywhere;
  text-align: right;
}
.settings-list strong {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  text-align: right;
}
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--red);
  font-weight: 650;
}
.text-link svg {
  width: 14px;
  height: 14px;
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.about-grid > div {
  display: grid;
  align-content: start;
  gap: 10px;
}
.about-grid strong {
  color: var(--ink);
}
.about-grid p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.span-2 {
  grid-column: span 2;
}
.toast {
  position: fixed;
  z-index: 100;
  top: 84px;
  right: 22px;
  max-width: min(390px, calc(100vw - 28px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #bfe8d8;
  border-radius: 10px;
  background: #fff;
  color: #176747;
  box-shadow: 0 14px 40px rgba(31, 42, 58, 0.16);
}
.toast.error {
  border-color: #f2c4c7;
  color: #a9242a;
}
.toast > svg {
  width: 19px;
  height: 19px;
}
.toast span {
  flex: 1;
}
.toast button {
  background: transparent;
  color: inherit;
  font-size: 20px;
}
.modal {
  border: 0;
  padding: 0;
  width: min(92vw, 560px);
  max-height: min(90vh, 760px);
  border-radius: 13px;
  background: #fff;
  color: var(--text);
  box-shadow: 0 28px 90px rgba(18, 25, 36, 0.3);
}
.modal-small {
  width: min(92vw, 460px);
}
.confirm-body {
  padding: 0 22px 4px;
}
.confirm-impact {
  margin: 0;
  padding: 12px 13px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #fff7f7;
  color: #7f1d1d;
  font-size: 12px;
  line-height: 1.55;
}
.modal::backdrop {
  background: rgba(25, 31, 42, 0.58);
  backdrop-filter: blur(2px);
}
.modal > form,
.dialog-content {
  margin: 0;
}
.modal header {
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid #edf0f4;
}
.modal header > div {
  display: flex;
  gap: 13px;
  align-items: flex-start;
}
.modal header h2 {
  color: var(--ink);
  font-size: 16px;
  margin-bottom: 3px;
}
.modal header p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
}
.modal-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
}
.modal-icon svg {
  width: 18px;
  height: 18px;
}
.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f1f3f6;
  color: #667286;
  font-size: 21px;
  line-height: 1;
}
.modal-body {
  padding: 20px 22px;
  max-height: 60vh;
  overflow-y: auto;
}
.modal footer {
  padding: 14px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 9px;
  border-top: 1px solid #edf0f4;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.detail-grid > div {
  padding: 12px;
  background: #f7f9fb;
  border-radius: 8px;
}
.detail-grid span,
.detail-grid strong {
  display: block;
}
.detail-grid span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 4px;
}
.detail-grid strong {
  font-size: 12px;
  color: var(--ink);
  overflow-wrap: anywhere;
}
@media (max-width: 1100px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .support-grid {
    grid-template-columns: 1fr;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
  .settings-grid .span-2 {
    grid-column: auto;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 850px) {
  .topbar-brand {
    width: auto;
    border-right: 0;
    padding-left: 18px;
    padding-right: 12px;
  }
  .menu-toggle {
    order: -1;
    margin-left: 9px;
  }
  .sidebar {
    transform: translateX(-105%);
    transition: transform 0.22s ease;
    box-shadow: 14px 0 40px rgba(20, 27, 37, 0.22);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .workspace {
    margin-left: 0;
  }
  .content {
    padding: 24px 18px 34px;
  }
  .account-copy {
    display: none;
  }
  .account-button {
    padding: 0 13px;
    border-left: 0;
  }
  .account-button > svg {
    display: none;
  }
  .dashboard-side {
    grid-template-columns: 1fr;
  }
  .filter-bar {
    align-items: stretch;
    flex-direction: column;
  }
  .search-box {
    max-width: none;
    width: 100%;
  }
  .tabs {
    max-width: 100%;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
  .span-2 {
    grid-column: auto;
  }
  .footer {
    padding: 17px 18px;
  }
}
@media (max-width: 560px) {
  .auth-shell {
    display: block;
    background: #fff;
  }
  .auth-visual {
    display: none;
  }
  .auth-card {
    width: 100%;
    min-height: 100vh;
    padding: 44px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  .auth-copy {
    margin: 50px 0 30px;
  }
  .topbar {
    height: 62px;
  }
  .topbar-brand {
    height: 62px;
    font-size: 23px;
    padding-top: 17px;
  }
  .menu-toggle {
    width: 36px;
    height: 36px;
  }
  .workspace {
    padding-top: 62px;
  }
  .sidebar {
    top: 62px;
    width: min(82vw, 280px);
  }
  .mobile-overlay {
    inset: 62px 0 0;
  }
  .content {
    padding: 20px 12px 30px;
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 21px;
  }
  .page-heading p {
    font-size: 12px;
  }
  .hide-mobile {
    display: none;
  }
  .kpi-grid,
  .kpi-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .kpi {
    padding: 14px 11px;
    min-height: 94px;
    gap: 10px;
  }
  .kpi-icon {
    width: 35px;
    height: 35px;
    border-radius: 9px;
  }
  .kpi-icon svg {
    width: 17px;
    height: 17px;
  }
  .kpi small {
    font-size: 10px;
    line-height: 1.25;
  }
  .kpi strong {
    font-size: 21px;
  }
  .card-head {
    padding: 15px;
    min-height: 65px;
  }
  .card-head .live-label {
    display: none;
  }
  .table-wrap {
    margin: 0;
  }
  .table-wrap table {
    min-width: 680px;
  }
  th {
    padding: 10px 12px;
  }
  td {
    padding: 12px;
  }
  .tabs {
    width: 100%;
  }
  .support-grid {
    gap: 13px;
  }
  .settings-list > div {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
  .settings-list code {
    max-width: 100%;
    text-align: left;
  }
  .settings-list strong {
    text-align: left;
  }
  .settings-form {
    padding: 16px;
  }
  .form-divider {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .form-actions .btn {
    width: 100%;
  }
  .about-grid {
    gap: 22px;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .form-grid label {
    grid-column: 1 !important;
  }
  .modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }
  .modal header,
  .modal-body,
  .modal footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .modal footer .btn {
    flex: 1;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .toast {
    top: 73px;
    right: 10px;
  }
  .footer {
    text-align: center;
  }
  .pagination {
    align-items: flex-start;
    flex-direction: column;
  }
  .account-menu {
    top: 55px;
    right: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
