:root {
  color-scheme: light;
  --bg: #eef3f8;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --line: #d9e0e8;
  --line-strong: #bcc8d5;
  --text: #17212f;
  --muted: #66758a;
  --primary: #1f6feb;
  --primary-dark: #1858bd;
  --blue: #2f64e9;
  --green: #049866;
  --orange: #c2410c;
  --success: #127a4c;
  --warning: #9a6500;
  --danger: #b42318;
  --control: #ffffff;
  --control-soft: #f8fafc;
  --workspace-start: #f8fbff;
  --workspace-tab: rgba(248, 251, 255, 0.94);
  --sidebar-bg: #101a29;
  --sidebar-active: rgba(255, 255, 255, 0.10);
  --chart-grid: #dbe5ef;
  --chart-axis: #64748b;
  --chart-cursor: #17212f;
  --shadow: 0 12px 28px rgba(22, 34, 51, 0.10);
  --query-control-width: 220px;
  --query-control-height: 38px;
  --query-control-font-size: 14px;
  --query-control-color: var(--text);
  --sidebar-width: 232px;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151a21;
  --panel: #202731;
  --panel-soft: #1a2028;
  --line: #303b48;
  --line-strong: #485566;
  --text: #e6edf5;
  --muted: #9ba8b6;
  --primary: #5b8cff;
  --primary-dark: #8fb2ff;
  --blue: #6ea2ff;
  --green: #24d6a2;
  --orange: #f2b452;
  --success: #24d6a2;
  --warning: #f2b452;
  --danger: #ff6b6b;
  --control: #151b23;
  --control-soft: #1b232c;
  --workspace-start: #111820;
  --workspace-tab: rgba(17, 24, 32, 0.96);
  --sidebar-bg: #111820;
  --sidebar-active: rgba(91, 140, 255, 0.18);
  --chart-grid: #334150;
  --chart-axis: #a5b2c0;
  --chart-cursor: #d8e2ee;
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

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

button {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 14px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

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

.login-screen {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 56px;
  padding: 64px min(8vw, 120px);
  background:
    linear-gradient(90deg, rgba(5, 18, 32, 0.70), rgba(5, 18, 32, 0.32)),
    url("/assets/login-bg.png") center / cover no-repeat,
    #0f2238;
}

.login-screen.admin-login {
  background:
    linear-gradient(90deg, rgba(219, 234, 254, 0.96), rgba(239, 246, 255, 0.90)),
    url("/assets/login-bg.png") center / cover no-repeat,
    #eaf4ff;
}

.admin-login-toggle {
  position: absolute;
  top: 24px;
  right: min(8vw, 120px);
  z-index: 2;
  min-width: 112px;
  background: rgba(255, 255, 255, 0.94);
  color: #17212f;
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

.admin-login-toggle.active {
  background: #1f6feb;
  color: #ffffff;
  border-color: #1f6feb;
}

.login-screen.admin-login .login-panel {
  border-color: #bfdbfe;
  box-shadow: 0 24px 60px rgba(37, 99, 235, 0.18);
}

.login-screen.admin-login .login-visual,
.login-screen.admin-login .login-title-block h1 {
  color: #0f2f4f;
}

.login-screen.admin-login .login-logo-row span,
.login-screen.admin-login .login-title-block p {
  color: #496579;
}

.brand-logo {
  display: block;
  object-fit: contain;
}

.login-panel {
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  padding: 30px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(10px);
}

:root[data-theme="dark"] .login-screen,
:root[data-theme="dark"] .login-screen.admin-login {
  background:
    linear-gradient(90deg, rgba(17, 24, 32, 0.92), rgba(21, 27, 35, 0.78)),
    url("/assets/login-bg.png") center / cover no-repeat,
    #111820;
}

:root[data-theme="dark"] .login-panel,
:root[data-theme="dark"] .login-logo-row,
:root[data-theme="dark"] .admin-login-toggle {
  background: rgba(32, 39, 49, 0.96);
  color: var(--text);
  border-color: var(--line);
  box-shadow: var(--shadow);
}

:root[data-theme="dark"] .login-screen.admin-login .login-visual,
:root[data-theme="dark"] .login-screen.admin-login .login-title-block h1,
:root[data-theme="dark"] .login-title-block h1 {
  color: var(--text);
}

:root[data-theme="dark"] .login-screen.admin-login .login-logo-row span,
:root[data-theme="dark"] .login-screen.admin-login .login-title-block p,
:root[data-theme="dark"] .login-title-block p {
  color: var(--muted);
}

.login-visual {
  display: grid;
  gap: 42px;
  max-width: 760px;
  color: #ffffff;
}

.login-logo-row {
  display: flex;
  align-items: center;
  width: fit-content;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.18);
}

.login-screen.admin-login .login-logo-row {
  border-color: #bfdbfe;
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.16);
}

.login-brand-logo {
  width: min(330px, 54vw);
  height: auto;
}

.login-title-block {
  display: grid;
  gap: 14px;
}

.login-title-block h1 {
  max-width: 760px;
  color: #ffffff;
  font-size: 38px;
  line-height: 1.18;
  font-weight: 700;
  white-space: nowrap;
}

.login-title-block p {
  color: rgba(255, 255, 255, 0.74);
  font-size: 18px;
}

.login-form-title {
  display: grid;
  gap: 6px;
}

.login-form-title p {
  color: var(--muted);
}

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

.side-brand-logo {
  flex: none;
  width: 52px;
  height: 38px;
  padding: 6px;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.64);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #1f6feb;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 10px 24px rgba(31, 111, 235, 0.28);
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  font-size: 13px;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 22px;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 16px;
}

p {
  margin: 0;
}

.topbar p,
.muted,
.side-brand span {
  color: var(--muted);
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--text);
  background: var(--control);
}

textarea {
  min-height: 74px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(31, 111, 235, 0.18);
  border-color: var(--primary);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.segmented.compact {
  width: 140px;
}

.segment {
  min-height: 32px;
  background: transparent;
  color: var(--muted);
  border-radius: 5px;
}

.segment.active {
  background: var(--control);
  color: var(--primary);
  border-color: var(--line);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

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

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

.secondary {
  background: color-mix(in srgb, var(--primary) 12%, var(--panel));
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 34%, var(--line));
}

.ghost {
  background: var(--control);
  color: var(--text);
  border-color: var(--line);
}

.danger {
  background: #fff1f0;
  color: var(--danger);
  border-color: #ffc9c3;
}

.full {
  width: 100%;
}

.message {
  display: none;
  min-height: 38px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.message.error,
.message.info,
.message.success {
  display: flex;
}

.message.error {
  background: color-mix(in srgb, var(--danger) 12%, var(--panel));
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 32%, var(--line));
}

.message.info {
  background: color-mix(in srgb, var(--primary) 12%, var(--panel));
  color: var(--primary-dark);
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
}

.message.success {
  background: color-mix(in srgb, var(--success) 12%, var(--panel));
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 30%, var(--line));
}

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

.sidebar {
  height: 100vh;
  overflow-y: auto;
  padding: 18px 14px;
  background: var(--sidebar-bg);
  color: #ffffff;
}

.side-brand {
  padding: 0 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.side-brand span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

.nav-menu {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.nav-menu button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  background: transparent;
  color: rgba(255, 255, 255, 0.74);
  border-color: transparent;
}

.nav-menu button.active,
.nav-menu button:hover {
  background: var(--sidebar-active);
  color: #ffffff;
}

.workspace {
  position: relative;
  min-width: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 22px 26px;
  background: linear-gradient(180deg, var(--workspace-start) 0, var(--bg) 240px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(188, 200, 213, 0.65);
}

.workbench-tabs {
  position: sticky;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 12px;
  padding: 8px 0;
  background: linear-gradient(180deg, var(--workspace-start) 0, var(--workspace-tab) 100%);
  border-bottom: 1px solid rgba(188, 200, 213, 0.45);
}

.tab-bar {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
}

.workbench-tab {
  min-width: 82px;
  max-width: 210px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--control);
  color: var(--muted);
  border-color: var(--line);
  white-space: nowrap;
}

.workbench-tab span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.workbench-tab i {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--muted);
  font-style: normal;
}

.workbench-tab i:hover {
  background: var(--panel-soft);
  color: var(--danger);
}

.workbench-tab.active {
  color: var(--primary-dark);
  border-color: #b8ccf8;
  box-shadow: inset 0 -2px 0 var(--primary);
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

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

.theme-toggle {
  width: 34px;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  background: var(--control);
  border-color: var(--line);
}

.theme-toggle::before {
  content: "";
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #d8e0ea;
  box-shadow: 0 1px 5px rgba(15, 23, 42, 0.18);
}

:root[data-theme="dark"] .theme-toggle::before {
  background: #05070a;
  border-color: #394655;
  box-shadow: 0 0 0 2px rgba(230, 237, 245, 0.08);
}

.portal-pill,
.user-pill,
.time-pill {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--control);
  white-space: nowrap;
}

.portal-pill {
  color: var(--primary-dark);
  background: color-mix(in srgb, var(--primary) 13%, var(--panel));
  border-color: color-mix(in srgb, var(--primary) 30%, var(--line));
}

.icon-btn {
  min-width: 34px;
}

.data-alert {
  padding: 10px 12px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 12%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--danger) 32%, var(--line));
  border-radius: 6px;
  font-size: 13px;
}

.toast {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--primary) 12%, var(--panel));
  color: var(--primary-dark);
  border: 1px solid color-mix(in srgb, var(--primary) 30%, var(--line));
}

.toast.error {
  background: color-mix(in srgb, var(--danger) 12%, var(--panel));
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 32%, var(--line));
}

.query-loading-overlay {
  position: fixed;
  inset: 0 0 0 var(--sidebar-width);
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 46%, transparent);
  backdrop-filter: blur(9px) saturate(135%);
  -webkit-backdrop-filter: blur(9px) saturate(135%);
}

.query-loading-overlay[hidden] {
  display: none;
}

.login-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: color-mix(in srgb, var(--bg) 54%, transparent);
  backdrop-filter: blur(13px) saturate(140%);
  -webkit-backdrop-filter: blur(13px) saturate(140%);
}

.login-loading-overlay[hidden] {
  display: none;
}

.login-loading-card {
  width: min(460px, calc(100vw - 48px));
  display: grid;
  gap: 14px;
  padding: 30px 34px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
  box-shadow: 0 22px 70px rgba(24, 58, 110, 0.22);
}

.login-loading-title {
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.login-progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line-strong) 52%, var(--panel));
  box-shadow: inset 0 1px 2px rgba(17, 33, 54, 0.14);
}

.login-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--success));
  box-shadow: 0 0 24px color-mix(in srgb, var(--primary) 34%, transparent);
  transition: width 220ms ease;
}

.login-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-loading-text {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
  text-align: center;
}

.login-loading-stage {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.query-loading-card {
  min-width: 260px;
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 30px 36px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel) 78%, transparent);
  border: 1px solid color-mix(in srgb, var(--primary) 22%, var(--line));
  box-shadow: 0 18px 60px rgba(31, 64, 120, 0.18);
}

.query-loading-spinner {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background:
    radial-gradient(farthest-side, var(--panel) 66%, transparent 68%),
    conic-gradient(from 0deg, var(--primary), var(--success), var(--primary) 72%, color-mix(in srgb, var(--primary) 14%, transparent) 100%);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 10%, transparent);
  animation: query-spin 0.9s linear infinite;
}

.query-loading-text {
  color: var(--primary-dark);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

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

.view {
  display: grid;
  gap: 16px;
}

.view-toolbar,
.query-bar,
.query-panel {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.query-panel {
  margin-bottom: 12px;
}

.query-bar .field,
.query-panel .field {
  width: var(--query-control-width);
  min-width: var(--query-control-width);
  max-width: var(--query-control-width);
  flex: 0 0 var(--query-control-width);
}

.query-bar .field.scope-field,
.query-panel .field.scope-field,
.query-bar .field:has(input.search),
.query-panel .field:has(input.search),
.query-bar .query-search-field,
.query-panel .query-search-field,
.report-rate-field {
  width: var(--query-control-width);
  min-width: var(--query-control-width);
  max-width: var(--query-control-width);
  flex: 0 0 var(--query-control-width);
}

.query-bar input,
.query-bar select,
.query-panel input,
.query-panel select {
  height: var(--query-control-height);
  min-height: var(--query-control-height);
  padding: 0 12px;
  color: var(--query-control-color);
  font-size: var(--query-control-font-size);
  line-height: 20px;
}

.query-bar input.search,
.query-panel input.search {
  width: var(--query-control-width);
  min-width: var(--query-control-width);
  max-width: var(--query-control-width);
}

.query-bar input::placeholder,
.query-panel input::placeholder {
  color: color-mix(in srgb, var(--query-control-color) 56%, transparent);
  opacity: 1;
}

.query-bar input[type="date"],
.query-bar input[type="datetime-local"],
.query-bar input[type="time"],
.query-panel input[type="date"],
.query-panel input[type="datetime-local"],
.query-panel input[type="time"] {
  color: var(--query-control-color);
}

.multi-select {
  position: relative;
  min-width: var(--query-control-width);
}

.multi-select summary {
  min-height: var(--query-control-height);
  padding: 8px 34px 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--query-control-color);
  background: var(--control);
  cursor: pointer;
  list-style: none;
  font-size: var(--query-control-font-size);
}

.multi-select summary::-webkit-details-marker {
  display: none;
}

.multi-select summary::after {
  content: "v";
  position: absolute;
  right: 12px;
  top: 8px;
  color: var(--muted);
}

.multi-select-menu {
  position: absolute;
  z-index: 20;
  width: 100%;
  margin-top: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.multi-select-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  color: var(--text);
  border-radius: 5px;
}

.multi-select-menu label:hover {
  background: var(--panel-soft);
}

.multi-select-menu input {
  width: 16px;
  min-height: 16px;
}

.query-actions {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 8px;
  flex: 2 1 320px;
  flex-wrap: wrap;
}

.query-bar .query-actions button,
.query-panel .query-actions button {
  min-height: var(--query-control-height);
}

.query-actions.wide {
  flex-basis: 100%;
}

.exception-query-panel {
  align-items: flex-end;
  justify-content: flex-start;
  gap: 10px;
}

.exception-query-panel .query-actions {
  flex: 0 0 auto;
  margin-left: 0;
}

.exception-approvals-query {
  justify-content: flex-start;
  gap: 8px;
}

.exception-approvals-query .field {
  width: 168px;
  min-width: 168px;
  max-width: 168px;
  flex-basis: 168px;
}

.exception-approvals-query .query-search-field {
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  flex-basis: 210px;
}

.exception-approvals-query input.search {
  width: 210px;
  min-width: 210px;
  max-width: 210px;
}

.exception-approvals-query .query-actions {
  flex: 0 0 auto;
  margin-left: 0;
}

.dashboard-content {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.dashboard-query {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 0;
}

.dashboard-query .field {
  min-width: 0;
  width: 180px;
  max-width: none;
  flex: 0 1 180px;
}

.dashboard-query .field.scope-field {
  min-width: 0;
  max-width: none;
  flex: 0 1 180px;
}

.dashboard-query .field:nth-of-type(3) {
  width: 160px;
  flex-basis: 160px;
}

.dashboard-query .field:nth-of-type(4) {
  width: 170px;
  flex-basis: 170px;
}

.dashboard-query .field span {
  min-height: 18px;
  font-size: 13px;
  line-height: 18px;
}

.dashboard-query select,
.dashboard-query input {
  width: 100%;
  height: var(--query-control-height);
  min-width: 0;
  padding: 0 10px;
  color: var(--query-control-color);
  font-size: var(--query-control-font-size);
  line-height: 20px;
}

.dashboard-query-actions {
  flex: 0 0 auto;
  margin-left: 0;
  align-self: end;
  white-space: nowrap;
  min-height: 38px;
  display: inline-flex;
  gap: 8px;
}

.dashboard-query-actions button {
  min-height: 38px;
  min-width: 68px;
  padding: 0 12px;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  min-width: 0;
}

.dashboard-kpi {
  --kpi-accent: var(--primary);
  --kpi-accent-soft: color-mix(in srgb, var(--primary) 14%, transparent);
  position: relative;
  min-height: 122px;
  padding: 14px;
  display: grid;
  grid-template-columns: clamp(58px, 5.4vw, 74px) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  background:
    radial-gradient(circle at 18% 40%, var(--kpi-accent-soft), transparent 36%),
    linear-gradient(145deg, color-mix(in srgb, var(--panel) 94%, #071722 6%), color-mix(in srgb, var(--panel) 92%, var(--kpi-accent) 4%));
  border: 1px solid color-mix(in srgb, var(--kpi-accent) 32%, var(--line));
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.012), 0 14px 28px rgba(5, 13, 24, 0.18);
}

.dashboard-kpi-auto {
  --kpi-accent: #55d6bf;
}

.dashboard-kpi-interlock {
  --kpi-accent: #f4c84a;
  --kpi-accent-soft: rgba(244, 200, 74, 0.16);
}

.dashboard-kpi-stability {
  --kpi-accent: #8dc7ff;
}

.dashboard-kpi-overall {
  --kpi-accent: #f59f3a;
  --kpi-accent-soft: rgba(245, 159, 58, 0.18);
}

.dashboard-kpi-icon {
  width: clamp(58px, 5.4vw, 74px);
  height: clamp(58px, 5.4vw, 74px);
  display: grid;
  place-items: center;
}

.dashboard-kpi-icon svg {
  width: clamp(58px, 5.4vw, 74px);
  height: clamp(58px, 5.4vw, 74px);
  overflow: visible;
  filter: drop-shadow(0 0 15px color-mix(in srgb, var(--kpi-accent) 34%, transparent));
}

.kpi-icon-track,
.overall-track {
  fill: none;
  stroke: color-mix(in srgb, var(--kpi-accent) 20%, #25374c);
  stroke-width: 7;
}

.kpi-icon-ring,
.overall-ring {
  fill: none;
  stroke: var(--kpi-accent);
  stroke-linecap: round;
  stroke-width: 7;
  transform: rotate(-116deg);
  transform-origin: 48px 48px;
}

.auto-ring-main {
  stroke-dasharray: 68 32;
}

.auto-ring-gap {
  opacity: 0.68;
  stroke-dasharray: 18 82;
  stroke-dashoffset: -70;
}

.kpi-icon-node {
  fill: var(--panel);
  stroke: var(--kpi-accent);
  stroke-width: 5;
}

.kpi-icon-line,
.stability-wave,
.shield-check,
.shield-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.kpi-icon-line {
  stroke: var(--kpi-accent);
  stroke-width: 5;
}

.shield-fill {
  fill: color-mix(in srgb, var(--kpi-accent) 18%, transparent);
}

.shield-line {
  stroke: var(--kpi-accent);
  stroke-width: 6;
}

.shield-check {
  stroke: #ffb938;
  stroke-width: 6;
}

.stability-ring-main {
  stroke-dasharray: 58 42;
}

.stability-wave {
  stroke: var(--kpi-accent);
  stroke-width: 6;
}

.overall-ring {
  stroke-dasharray: 78 22;
  stroke: #ffa632;
}

.overall-slice {
  fill: rgba(255, 166, 50, 0.28);
}

.dashboard-kpi-info {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 22px;
  height: 22px;
  min-height: 22px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border-color: color-mix(in srgb, var(--text) 50%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--text) 78%, transparent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-style: italic;
  line-height: 1;
}

.dashboard-kpi-copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: 8px;
}

.dashboard-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  font-size: 13px;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}

.dashboard-delta b {
  font-size: 18px;
  line-height: 1;
}

.dashboard-delta.delta-up {
  color: var(--danger);
}

.dashboard-delta.delta-down {
  color: var(--success);
}

.dashboard-delta.delta-same {
  color: var(--text);
}

.dashboard-kpi h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}

.dashboard-kpi strong {
  display: block;
  margin: 0;
  color: var(--kpi-accent);
  font-size: clamp(24px, 2.3vw, 32px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.dashboard-kpi p {
  margin: 0;
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.dashboard-kpi small {
  color: var(--muted);
  text-align: right;
}

.dashboard-kpi-footer .status {
  min-width: 84px;
  justify-content: center;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 68fr) minmax(280px, 32fr);
  gap: 10px;
  min-width: 0;
}

.dashboard-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.dashboard-trend-box {
  min-width: 0;
  min-height: 284px;
}

.dashboard-status-panel {
  min-width: 0;
  min-height: 284px;
  display: grid;
  align-content: space-between;
  gap: 10px;
}

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

.dashboard-status-cell {
  min-height: 66px;
  padding: 10px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--panel-soft) 86%, transparent);
}

.dashboard-status-cell span {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-status-value {
  font-size: clamp(15px, 1.25vw, 18px);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-status-value.info {
  color: var(--blue);
}

.dashboard-status-value.good {
  color: var(--success);
}

.dashboard-status-value.warn {
  color: var(--warning);
}

.dashboard-status-value.bad {
  color: var(--danger);
}

.dashboard-status-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.dashboard-detail-panel .panel-header {
  align-items: center;
  min-width: 0;
}

.dashboard-detail-panel .toolbar-group {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  min-width: 0;
}

.dashboard-detail-panel .toolbar-group select {
  width: 170px;
  min-width: 170px;
}

.dashboard-detail-panel .search {
  width: 220px;
  min-width: 180px;
}

.dashboard-detail-panel,
.dashboard-detail-panel .panel-body {
  min-width: 0;
  max-width: 100%;
}

.dashboard-detail-panel .table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

.dashboard-detail-table.wide-table {
  table-layout: fixed;
  min-width: 1200px;
}

.dashboard-detail-table th,
.dashboard-detail-table td {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dashboard-detail-table th:nth-child(1),
.dashboard-detail-table td:nth-child(1) {
  width: 64px;
}

.dashboard-detail-table th:nth-child(2),
.dashboard-detail-table td:nth-child(2) {
  width: 210px;
}

.dashboard-detail-table th:nth-child(3),
.dashboard-detail-table td:nth-child(3) {
  width: 110px;
}

.dashboard-detail-table th:nth-child(4),
.dashboard-detail-table td:nth-child(4) {
  width: 190px;
}

.dashboard-detail-table th:nth-child(5),
.dashboard-detail-table td:nth-child(5),
.dashboard-detail-table th:nth-child(6),
.dashboard-detail-table td:nth-child(6),
.dashboard-detail-table th:nth-child(7),
.dashboard-detail-table td:nth-child(7),
.dashboard-detail-table th:nth-child(8),
.dashboard-detail-table td:nth-child(8) {
  width: 110px;
}

.dashboard-detail-table th:nth-child(9),
.dashboard-detail-table td:nth-child(9) {
  width: 180px;
}

.dashboard-detail-table th:nth-child(10),
.dashboard-detail-table td:nth-child(10) {
  width: 100px;
}

.quick-range,
.button-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-range button,
.tab-strip button {
  background: var(--control-soft);
  color: var(--text);
  border-color: var(--line);
}

.quick-range button.active,
.tab-strip button.active {
  background: var(--control);
  color: var(--primary);
  border-color: #b8ccf8;
  box-shadow: inset 0 -2px 0 var(--primary);
}

.tab-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

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

.metric,
.panel,
.form-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric {
  padding: 16px;
  min-height: 86px;
  box-shadow: 0 6px 18px rgba(22, 34, 51, 0.04);
}

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

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.metric.compact strong {
  font-size: 20px;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.panel {
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(22, 34, 51, 0.05);
}

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

.panel-title {
  display: grid;
  gap: 4px;
}

.panel-body {
  padding: 16px;
}

.backup-policy-card,
.backup-job-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.backup-policy-card h3,
.backup-job-card h3 {
  margin-top: 4px;
}

.backup-policy-actions {
  flex: none;
}

.backup-job-card {
  display: grid;
  align-items: stretch;
}

.backup-job-head,
.backup-job-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.backup-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--line-strong) 42%, var(--panel));
}

.backup-progress-bar {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--success));
  transition: width 220ms ease;
}

.backup-job-meta {
  color: var(--muted);
  font-size: 13px;
}

.backup-records-table {
  min-width: 1080px;
}

.block {
  display: block;
  margin-top: 4px;
}

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

.toolbar .search {
  width: min(360px, 100%);
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar label {
  min-width: 150px;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scrollbar-gutter: stable;
}

.sheet-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
}

.sheet-tabs button {
  min-height: 34px;
  padding: 0 18px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}

.sheet-tabs button.active {
  border-color: color-mix(in srgb, var(--primary) 36%, var(--line));
  background: color-mix(in srgb, var(--primary) 14%, var(--panel));
  color: var(--primary);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--primary) 18%, transparent);
}

.message-push-health,
.message-push-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.message-push-health {
  min-height: 62px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warning);
  border-radius: 8px;
  background: var(--panel-soft);
}

.message-push-health.ready {
  border-left-color: var(--success);
}

.message-push-health > div {
  display: grid;
  gap: 4px;
}

.message-push-health span:not(.status),
.message-push-toolbar p {
  color: var(--muted);
}

.message-push-toolbar h3,
.message-push-toolbar p {
  margin: 0;
}

.message-push-toolbar > div {
  display: grid;
  gap: 4px;
}

.message-push-table {
  min-width: 1180px;
}

.message-body-cell {
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-error-cell {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-role-list {
  max-height: 240px;
  overflow-y: auto;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.message-role-list label {
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr) minmax(160px, auto);
  align-items: center;
  gap: 8px;
}

.table-action-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .message-push-health,
  .message-push-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .message-role-list {
    grid-template-columns: 1fr;
  }
}

body.table-scroll-enhanced .table-wrap {
  scrollbar-gutter: auto;
  scrollbar-width: none;
}

body.table-scroll-enhanced .table-wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.fixed-table-scrollbar {
  position: fixed;
  left: 0;
  bottom: 10px;
  z-index: 40;
  height: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  background: color-mix(in srgb, var(--panel) 82%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 30, 50, 0.14);
}

.fixed-table-scrollbar[hidden] {
  display: none;
}

.fixed-table-scrollbar-inner {
  height: 1px;
}

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

.wide-table {
  min-width: 1280px;
}

.cell-nowrap {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
}

.cell-ellipsis {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exception-events-table {
  table-layout: fixed;
  min-width: 1580px;
}

.exception-events-table .exception-col-actions {
  width: 132px;
}

.exception-events-table .exception-col-appeal {
  width: 92px;
}

.exception-events-table .exception-col-confirm {
  width: 92px;
}

.exception-events-table .exception-col-type {
  width: 132px;
}

.exception-events-table .exception-col-scope {
  width: 132px;
}

.exception-events-table .exception-col-object {
  width: 248px;
}

.exception-events-table .exception-col-opc {
  width: 188px;
}

.exception-events-table .exception-col-range {
  width: 250px;
}

.exception-events-table .exception-col-duration {
  width: 76px;
}

.exception-events-table .exception-col-shift {
  width: 70px;
}

.exception-events-table .exception-col-event-no {
  width: 172px;
}

.exception-events-table .exception-col-detail {
  width: 68px;
}

.exception-events-table th,
.exception-events-table td {
  white-space: nowrap;
}

.exception-events-table .cell-ellipsis {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exception-events-table .row-actions {
  flex-wrap: nowrap;
  white-space: nowrap;
}

.exception-events-table .exception-row-actions {
  gap: 6px;
}

.exception-events-table .status {
  white-space: nowrap;
}

.exception-events-table .exception-event-no {
  display: inline-block;
  white-space: nowrap;
}

.exception-events-table .exception-detail-cell {
  text-align: right;
}

.exception-event-row {
  cursor: pointer;
}

.exception-event-row:hover {
  background: color-mix(in srgb, var(--primary) 6%, transparent);
}

.exception-approvals-table {
  table-layout: fixed;
  min-width: 1480px;
}

.exception-approvals-table .approval-col-actions {
  width: 154px;
}

.exception-approvals-table .approval-col-status {
  width: 98px;
}

.exception-approvals-table .approval-col-node {
  width: 112px;
}

.exception-approvals-table .approval-col-event {
  width: 156px;
}

.exception-approvals-table .approval-col-type {
  width: 92px;
}

.exception-approvals-table .approval-col-object {
  width: 330px;
}

.exception-approvals-table .approval-col-range {
  width: 275px;
}

.exception-approvals-table .approval-col-reason {
  width: 240px;
}

.exception-approvals-table .approval-col-applicant {
  width: 160px;
}

.exception-approvals-table th,
.exception-approvals-table td {
  white-space: nowrap;
}

.exception-approvals-table .approval-actions {
  flex-wrap: nowrap;
  gap: 6px;
}

.exception-approvals-table .approval-actions button {
  min-width: 54px;
}

.exception-approvals-table .approval-node,
.exception-approvals-table .cell-ellipsis {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exception-approvals-table .approval-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}

.exception-approvals-table .approval-inline > * {
  min-width: 0;
}

.exception-approvals-table .approval-stack {
  display: grid;
  gap: 3px;
  max-width: 100%;
  white-space: normal;
  line-height: 1.35;
}

.exception-approvals-table .approval-stack code {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
}

.exception-approvals-table .approval-range {
  display: block;
  max-width: 100%;
  white-space: normal;
  line-height: 1.42;
  overflow-wrap: anywhere;
}

.bypass-table th,
.bypass-table td {
  vertical-align: top;
}

.bypass-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.bypass-table td:nth-child(1),
.bypass-table td:nth-child(5),
.bypass-table td:nth-child(6) {
  white-space: nowrap;
}

th,
td {
  height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  color: var(--muted);
  background: var(--panel-soft);
  font-weight: 600;
}

tr:hover td {
  background: var(--panel-soft);
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  background: var(--panel-soft);
  color: var(--muted);
  white-space: nowrap;
}

.status.good {
  background: color-mix(in srgb, var(--success) 14%, var(--panel));
  color: var(--success);
}

.status.warn {
  background: color-mix(in srgb, var(--warning) 16%, var(--panel));
  color: var(--warning);
}

.status.danger {
  background: color-mix(in srgb, var(--danger) 14%, var(--panel));
  color: var(--danger);
}

.status.info {
  background: color-mix(in srgb, var(--primary) 14%, var(--panel));
  color: var(--primary-dark);
}

.status.off {
  background: var(--panel-soft);
  color: var(--muted);
}

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

.ledger-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 16px;
  align-items: start;
}

.ledger-main,
.ledger-side {
  min-width: 0;
}

.form-panel {
  padding: 16px;
}

.form-panel form {
  display: grid;
  gap: 12px;
}

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

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

.admin-object-table,
.admin-users-table,
.admin-permissions-table {
  table-layout: fixed;
}

.admin-object-table {
  min-width: 1560px;
}

.admin-users-table {
  min-width: 1900px;
}

.admin-permissions-table {
  min-width: 1060px;
}

.admin-object-table th,
.admin-object-table td,
.admin-users-table th,
.admin-users-table td,
.admin-permissions-table th,
.admin-permissions-table td {
  height: 52px;
  white-space: nowrap;
}

.admin-object-table .row-actions,
.admin-users-table .row-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  white-space: nowrap;
}

.admin-object-table .row-actions button,
.admin-users-table .row-actions button {
  min-width: 52px;
}

.status-stack {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.notes-ellipsis {
  color: var(--text);
}

.admin-object-table .object-col-type {
  width: 74px;
}

.admin-object-table .object-col-code {
  width: 118px;
}

.admin-object-table .object-col-scope {
  width: 132px;
}

.admin-object-table .object-col-name {
  width: 220px;
}

.admin-object-table .object-col-tag {
  width: 188px;
}

.admin-object-table .object-col-rule {
  width: 120px;
}

.admin-object-table .object-col-status {
  width: 158px;
}

.admin-object-table .object-col-notes {
  width: 430px;
}

.admin-object-table .object-col-actions {
  width: 120px;
}

.admin-users-table .users-col-id {
  width: 64px;
}

.admin-users-table .users-col-account {
  width: 170px;
}

.admin-users-table .users-col-name {
  width: 130px;
}

.admin-users-table .users-col-oa {
  width: 100px;
}

.admin-users-table .users-col-department {
  width: 170px;
}

.admin-users-table .users-col-position {
  width: 190px;
}

.admin-users-table .users-col-email {
  width: 220px;
}

.admin-users-table .users-col-role {
  width: 220px;
}

.admin-users-table .users-col-perms {
  width: 96px;
}

.admin-users-table .users-col-status {
  width: 90px;
}

.admin-users-table .users-col-time {
  width: 170px;
}

.admin-users-table .users-col-actions {
  width: 220px;
}

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

.user-role-picker {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.user-role-picker legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.user-role-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.user-role-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  white-space: nowrap;
}

.user-role-option input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.workflow-config-table {
  min-width: 980px;
}

.workflow-config-table th:nth-child(1) { width: 250px; }
.workflow-config-table th:nth-child(2) { width: 180px; }
.workflow-config-table th:nth-child(3) { width: 260px; }
.workflow-config-table th:nth-child(4) { width: 300px; }
.workflow-config-table th:nth-child(5) { width: 90px; }
.workflow-config-table th:nth-child(6) { width: 90px; }

.workflow-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.workflow-role-badge,
.workflow-user-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 9px;
  border-radius: 5px;
  white-space: nowrap;
  font-size: 13px;
}

.workflow-role-badge {
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 9%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--primary) 24%, var(--line));
}

.workflow-user-badge {
  color: var(--text);
  background: var(--panel-soft);
  border: 1px solid var(--line);
}

.workflow-role-field {
  position: relative;
}

.workflow-role-trigger {
  width: 100%;
  min-height: var(--query-control-height, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line-strong, var(--line));
  border-radius: 6px;
  text-align: left;
}

.workflow-role-trigger[aria-expanded="true"] {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 12%, transparent);
}

.workflow-role-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 300px;
  margin-top: 8px;
  padding: 10px;
  overflow: auto;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.workflow-role-picker[hidden] {
  display: none;
}

.workflow-role-option {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 56px;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}

.workflow-role-option:has(input:checked) {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 6%, var(--panel));
}

.workflow-role-option input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.workflow-role-option-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.workflow-role-option-copy strong,
.workflow-role-option-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workflow-role-option-copy small {
  color: var(--muted);
  font-size: 12px;
}

.workflow-current-users {
  display: grid;
  gap: 7px;
  padding: 11px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.workflow-current-users > span:first-child {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.wechat-contacts-table {
  min-width: 1420px;
}

.admin-permissions-table .permissions-col-code {
  width: 330px;
}

.admin-permissions-table .permissions-col-name {
  width: 290px;
}

.admin-permissions-table .permissions-col-module {
  width: 220px;
}

.admin-permissions-table .permissions-col-type {
  width: 110px;
}

.admin-permissions-table .permissions-col-status {
  width: 90px;
}

.audit-login-table,
.audit-operation-table {
  table-layout: fixed;
}

.audit-login-table {
  min-width: 1120px;
}

.audit-operation-table {
  min-width: 1320px;
}

.audit-login-table th,
.audit-login-table td,
.audit-operation-table th,
.audit-operation-table td {
  height: 52px;
  white-space: nowrap;
}

.audit-login-table th:nth-child(1),
.audit-login-table td:nth-child(1) {
  width: 190px;
}

.audit-login-table th:nth-child(2),
.audit-login-table td:nth-child(2),
.audit-login-table th:nth-child(3),
.audit-login-table td:nth-child(3) {
  width: 160px;
}

.audit-login-table th:nth-child(4),
.audit-login-table td:nth-child(4),
.audit-login-table th:nth-child(5),
.audit-login-table td:nth-child(5) {
  width: 110px;
}

.audit-login-table th:nth-child(6),
.audit-login-table td:nth-child(6) {
  width: 150px;
}

.audit-login-table th:nth-child(7),
.audit-login-table td:nth-child(7) {
  width: 240px;
}

.audit-operation-table th:nth-child(1),
.audit-operation-table td:nth-child(1) {
  width: 190px;
}

.audit-operation-table th:nth-child(2),
.audit-operation-table td:nth-child(2),
.audit-operation-table th:nth-child(3),
.audit-operation-table td:nth-child(3),
.audit-operation-table th:nth-child(4),
.audit-operation-table td:nth-child(4) {
  width: 150px;
}

.audit-operation-table th:nth-child(5),
.audit-operation-table td:nth-child(5) {
  width: 260px;
}

.audit-operation-table th:nth-child(6),
.audit-operation-table td:nth-child(6) {
  width: 280px;
}

.audit-operation-table th:nth-child(7),
.audit-operation-table td:nth-child(7) {
  width: 110px;
}

.audit-operation-table th:nth-child(8),
.audit-operation-table td:nth-child(8) {
  width: 130px;
}

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

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 30, 50, 0.38);
}

.modal-panel {
  position: relative;
  z-index: 1;
  width: min(680px, calc(100vw - 40px));
  max-height: calc(100vh - 56px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 64px rgba(15, 30, 50, 0.24);
  overflow: hidden;
}

.modal-panel.wide {
  width: min(1180px, calc(100vw - 40px));
}

.modal-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.modal-header-error {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  max-width: min(460px, calc(100% - 240px));
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 10%, var(--panel));
  border: 1px solid color-mix(in srgb, var(--danger) 34%, var(--line));
  border-radius: 7px;
  box-shadow: 0 8px 18px rgba(180, 35, 24, 0.12);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  z-index: 2;
}

.modal-header-error[hidden] {
  display: none;
}

.modal-body {
  overflow: auto;
  padding: 16px;
}

.modal-form {
  display: grid;
  gap: 12px;
}

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

.checkbox-line {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.checkbox-line input {
  width: 18px;
  min-height: 18px;
}

.row-actions button {
  min-height: 30px;
  padding: 0 10px;
}

.roles-table {
  min-width: 1020px;
  table-layout: fixed;
}

.roles-table th,
.roles-table td {
  height: 54px;
  padding: 10px 12px;
  white-space: nowrap;
}

.roles-table th:nth-child(1),
.roles-table td:nth-child(1) {
  width: 210px;
}

.roles-table th:nth-child(2),
.roles-table td:nth-child(2),
.roles-table th:nth-child(3),
.roles-table td:nth-child(3) {
  width: 86px;
  text-align: center;
}

.roles-table th:nth-child(4),
.roles-table td:nth-child(4) {
  width: 92px;
  text-align: center;
}

.roles-table th:nth-child(5),
.roles-table td:nth-child(5) {
  white-space: normal;
}

.roles-table th:nth-child(6),
.roles-table td:nth-child(6) {
  width: 260px;
}

.roles-table .row-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
}

.roles-table .row-actions button {
  min-width: 66px;
}

.role-name-cell {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.role-description-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

.audit-query-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr)) auto;
  align-items: end;
  justify-content: initial;
  gap: 10px;
}

.audit-query-panel .field {
  width: auto;
  min-width: 0;
  max-width: none;
  flex: none;
}

.audit-query-panel .query-actions {
  margin-left: 0;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.audit-table {
  min-width: 1320px;
  table-layout: fixed;
}

.audit-table th,
.audit-table td {
  height: 54px;
  padding: 10px 12px;
}

.audit-table th {
  white-space: nowrap;
}

.audit-table th:nth-child(1),
.audit-table td:nth-child(1) {
  width: 132px;
}

.audit-table th:nth-child(2),
.audit-table td:nth-child(2) {
  width: 140px;
}

.audit-table th:nth-child(3),
.audit-table td:nth-child(3) {
  width: 92px;
}

.audit-table th:nth-child(4),
.audit-table td:nth-child(4) {
  width: 132px;
}

.audit-table th:nth-child(5),
.audit-table td:nth-child(5) {
  width: 150px;
}

.audit-table th:nth-child(7),
.audit-table td:nth-child(7) {
  width: 92px;
}

.audit-table th:nth-child(8),
.audit-table td:nth-child(8) {
  width: 128px;
}

.audit-table th:nth-child(6),
.audit-table td:nth-child(6),
.audit-table th:nth-child(9),
.audit-table td:nth-child(9) {
  white-space: normal;
}

.audit-object-text,
.audit-detail-text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.45;
}

.wechat-config-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  align-items: end;
}

.wechat-switch-field .toggle-line {
  height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}

.wechat-status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 12px;
}

.wechat-contact-query {
  display: grid;
  margin-top: 12px;
  grid-template-columns: minmax(260px, 420px) auto;
}

.wechat-contacts-table th,
.wechat-contacts-table td {
  white-space: nowrap;
}

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

.rate-card {
  padding: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.rate-card strong {
  display: block;
  margin: 10px 0 4px;
  font-size: 30px;
}

.rate-card.blue {
  border-color: #c9d8ff;
}

.rate-card.green {
  border-color: #bce8d2;
}

.rate-card.orange {
  border-color: #ffd4b8;
}

.rate-card .rate-line {
  height: 6px;
  margin-top: 14px;
  border-radius: 999px;
  background: var(--panel-soft);
  overflow: hidden;
}

.rate-card .rate-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.rate-card.blue .rate-line span {
  background: var(--blue);
}

.rate-card.green .rate-line span {
  background: var(--green);
}

.rate-card.orange .rate-line span {
  background: var(--orange);
}

.chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.8fr);
  gap: 12px;
}

.chart-grid.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rate-analysis-chart-grid {
  grid-template-columns: minmax(0, 68fr) minmax(300px, 32fr);
  align-items: stretch;
  gap: 10px;
}

.rate-analysis-trend-box,
.rate-analysis-ranking-box {
  min-width: 0;
  min-height: 286px;
}

.rate-analysis-trend-box {
  padding: 12px 12px 10px;
}

.rate-analysis-trend-box .chart-svg {
  height: clamp(232px, 28vh, 280px);
  margin-top: 2px;
}

.rate-analysis-ranking-box {
  padding: 12px;
}

.chart-box {
  min-height: 250px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.chart-box h3 {
  margin-bottom: 10px;
}

.chart-svg {
  width: 100%;
  height: 220px;
  display: block;
}

.dashboard-trend-box .chart-svg {
  height: clamp(210px, 24vh, 250px);
}

.chart-hit-zone {
  fill: transparent;
  cursor: crosshair;
}

.chart-cursor,
.chart-tooltip {
  opacity: 0;
  transition: opacity 120ms ease;
  pointer-events: none;
}

.chart-cursor {
  stroke: var(--chart-cursor);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.chart-tooltip rect {
  fill: rgba(15, 23, 42, 0.92);
}

.chart-hit:hover .chart-cursor,
.chart-hit:hover .chart-tooltip {
  opacity: 1;
}

.chart-note {
  margin-top: 8px;
}

.deduction-ranking-list {
  display: grid;
  gap: 6px;
}

.deduction-ranking-row {
  min-height: 30px;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) max-content;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
}

.deduction-rank {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: var(--blue);
  background: rgba(47, 100, 233, 0.12);
  font-size: 12px;
  font-weight: 700;
}

.deduction-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.deduction-ranking-row strong {
  color: #ea580c;
  font-size: 13px;
  white-space: nowrap;
}

.overview-list {
  display: grid;
  gap: 10px;
}

.overview-list div {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 6px;
}

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

.heat-cell {
  min-height: 76px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--success) 36%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--success) 12%, var(--panel));
}

.heat-cell.warn {
  border-color: color-mix(in srgb, var(--warning) 36%, var(--line));
  background: color-mix(in srgb, var(--warning) 12%, var(--panel));
}

.heat-cell strong {
  display: block;
  font-size: 19px;
}

.heat-cell span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
}

.detail-list {
  display: grid;
  gap: 8px;
}

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

.info-list {
  display: grid;
  gap: 8px;
}

.info-list div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
}

.info-list span {
  color: var(--muted);
}

.info-list b {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.result-box {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.detail-item {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.detail-item span {
  color: var(--muted);
  font-size: 12px;
}

.detail-item strong {
  overflow-wrap: anywhere;
}

.link-button {
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-button:hover {
  color: #1d4ed8;
}

.role-permission-summary {
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(320px, 1.6fr) 90px;
  gap: 10px;
  align-items: stretch;
}

.role-permission-summary > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.role-permission-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.role-permission-summary strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-permission-summary-desc strong {
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.permission-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 26%, var(--line));
  border-radius: 6px;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, transparent);
}

.role-permission-matrix {
  max-height: min(62vh, 620px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.role-permission-matrix table {
  min-width: 1190px;
  table-layout: fixed;
}

.role-permission-matrix th,
.role-permission-matrix td {
  height: 44px;
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
}

.role-permission-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel-soft);
}

.role-permission-matrix .permission-menu-col {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 190px;
  min-width: 190px;
  max-width: 190px;
  text-align: left;
  background: var(--panel-soft);
}

.role-permission-matrix th:not(.permission-menu-col),
.role-permission-matrix td:not(.permission-menu-col) {
  width: 74px;
}

.role-permission-matrix th:nth-child(11),
.role-permission-matrix td:nth-child(11),
.role-permission-matrix th:nth-child(12),
.role-permission-matrix td:nth-child(12),
.role-permission-matrix th:nth-child(13),
.role-permission-matrix td:nth-child(13) {
  width: 92px;
}

.role-permission-matrix tbody .permission-menu-col {
  background: var(--panel);
}

.permission-group-row td {
  position: sticky;
  left: 0;
  z-index: 4;
  text-align: left;
  padding: 8px 10px;
  background: color-mix(in srgb, var(--panel-soft) 94%, var(--primary) 6%);
}

.permission-group-row label,
.permission-menu-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}

.permission-menu-check span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-toggle {
  min-height: 26px;
  width: 28px;
  padding: 0;
  margin-right: 6px;
}

.permission-action-check {
  display: inline-grid;
  place-items: center;
}

.permission-action-check input,
.permission-menu-check input,
.permission-group-row input {
  width: 16px;
  min-height: 16px;
}

.permission-disabled-cell {
  color: var(--muted);
  background: color-mix(in srgb, var(--panel-soft) 80%, transparent);
}

.compact-table {
  max-height: 280px;
  overflow: auto;
}

button.small {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.pagination-bar {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  width: fit-content;
  max-width: 100%;
  margin-top: 10px;
  margin-left: auto;
  padding-top: 10px;
}

.pagination-controls,
.pagination-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pagination-bar input[data-page-input] {
  width: 54px;
  min-height: 30px;
  padding: 4px 6px;
  text-align: center;
}

.pagination-bar select {
  min-height: 32px;
  min-width: 64px;
  padding: 5px 8px;
}

.pagination-bar .small {
  min-height: 30px;
  padding: 5px 9px;
}

.pagination-range {
  min-width: 106px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

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

@media (max-width: 1080px) {
  .login-screen {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 40px 24px;
  }

  .login-visual {
    max-width: 100%;
    gap: 24px;
  }

  .login-title-block h1 {
    font-size: 34px;
    white-space: normal;
  }

  .metrics,
  .dashboard-kpis,
  .rate-cards,
  .admin-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .ledger-layout,
  .chart-grid,
  .chart-grid.equal {
    grid-template-columns: 1fr;
  }

  .dashboard-query {
    display: flex;
  }

  .dashboard-main-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .audit-query-panel {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .audit-query-panel .query-actions {
    grid-column: 1 / -1;
    justify-self: start;
  }
}

@media (max-width: 820px) {
  .login-screen {
    padding: 26px 16px;
  }

  .admin-login-toggle {
    top: 14px;
    right: 16px;
  }

  .login-title-block h1 {
    font-size: 28px;
  }

  .login-title-block p {
    font-size: 15px;
  }

  .login-panel {
    padding: 22px;
  }

  .app-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .sidebar {
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .workspace {
    height: auto;
    overflow: visible;
  }

  .query-loading-overlay {
    inset: 0;
  }

  .topbar,
  .top-actions,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .query-bar,
  .query-panel,
  .view-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-query-panel {
    display: flex;
  }

  .audit-query-panel .query-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .query-bar .field,
  .query-bar .field.scope-field,
  .query-bar .query-search-field,
  .query-panel .field,
  .query-panel .field.scope-field,
  .query-panel .query-search-field,
  .report-rate-field {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
  }

  .query-bar input.search,
  .query-panel input.search {
    width: 100%;
    min-width: 0;
    max-width: none;
  }

  .dashboard-query {
    display: flex;
  }

  .workbench-tabs,
  .page-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .role-permission-summary {
    grid-template-columns: 1fr;
  }

  .segmented.compact {
    width: 100%;
  }

  .metrics,
  .dashboard-kpis,
  .dashboard-context,
  .rate-cards,
  .admin-grid,
  .form-grid,
  .heat-grid {
    grid-template-columns: 1fr;
  }

  .user-form-grid,
  .user-role-options {
    grid-template-columns: 1fr;
  }
}
