@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;700;800;900&display=swap');

:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-soft: #f3f5f7;
  --line: #dde2ea;
  --text: #101828;
  --muted: #697586;
  --dark: #0b1422;
  --dark-2: #101d2f;
  --teal: #15c8bb;
  --green: #17b26a;
  --amber: #f59e0b;
  --red: #ef4444;
  --blue: #3b82f6;
  --violet: #7c3aed;
  font-family: 'Noto Sans KR', Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--bg);
  color: var(--text);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--teal);
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 420px);
  align-items: center;
  gap: 48px;
  padding: 56px clamp(28px, 6vw, 96px);
  background:
    radial-gradient(circle at 20% 20%, rgba(21, 200, 187, .2), transparent 28%),
    linear-gradient(135deg, #07111f 0%, #102033 52%, #f7fafc 52%);
}

#pulseCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .55;
}

.login-brand,
.login-panel {
  position: relative;
  z-index: 1;
}

.brand-mark,
.logo {
  font-weight: 800;
  letter-spacing: 0;
  color: #fff;
  font-size: 28px;
}

.brand-mark span,
.logo span {
  color: var(--teal);
}

.brand-category {
  color: #9fb3c8;
  font-size: 14px;
  margin: 10px 0 36px;
}

.login-brand h1 {
  color: #fff;
  max-width: 720px;
  font-size: clamp(42px, 6vw, 78px);
  line-height: .98;
  margin: 0 0 22px;
  letter-spacing: 0;
}

.brand-value {
  color: #8ff2e9;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 12px;
}

.brand-copy {
  color: #c5d3e3;
  max-width: 520px;
  line-height: 1.7;
  margin: 0;
}

.signal-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.signal-strip span {
  border: 1px solid rgba(143, 242, 233, .35);
  color: #d9fffb;
  padding: 9px 12px;
  border-radius: 2px;
  background: rgba(3, 12, 22, .34);
}

.login-panel {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
  padding: 24px;
  display: grid;
  gap: 12px;
}

.panel-label {
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.login-panel h2 {
  margin: 0;
  font-size: 28px;
}

.login-panel label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.login-panel input {
  border: 1px solid #cfd8e3;
  border-radius: 2px;
  padding: 13px 14px;
  background: #fff;
  color: var(--text);
}

.login-panel button,
.plan-card button,
.plus-preview button {
  border: 0;
  border-radius: 2px;
  background: var(--teal);
  color: #06201e;
  padding: 12px 14px;
  font-weight: 800;
}

.login-panel .btn-demo-login-secondary {
  border: 1px solid var(--teal);
  background: transparent;
  color: var(--teal);
  margin-top: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-panel .btn-demo-login-secondary:hover {
  background: rgba(21, 184, 166, 0.08);
}

.login-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 0;
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 12px 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--line);
}

.login-divider span {
  padding: 0 12px;
}

.agent-download-box {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 820px) {
  .login-divider,
  .agent-download-box {
    display: none !important;
  }
}

.agent-download-box p {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
  text-align: center;
}

.btn-agent-download {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-agent-download:hover {
  border-color: var(--teal);
  color: var(--teal);
  background: #f7fcfb;
}

.agent-guide-link {
  font-size: 12px;
  color: var(--muted);
  text-decoration: underline;
  text-align: center;
  transition: color 0.2s;
}

.agent-guide-link:hover {
  color: var(--teal);
}

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

.sidebar {
  background: #0b1422;
  color: #d8e3ef;
  padding: 8px 6px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.logo {
  font-size: 16px;
}

.logo-block p {
  color: #8ea1b7;
  font-size: 10px;
  margin: 3px 0 0;
}

.customer-card {
  background: #172337;
  border: 1px solid #22324b;
  border-radius: 2px;
  padding: 6px 8px;
  display: grid;
  gap: 2px;
}

.customer-card span,
.plan-card span {
  color: #8ea1b7;
  font-size: 10px;
}

.customer-card strong {
  color: #fff;
  font-size: 13px;
}

.customer-card small {
  color: #9fb3c8;
  font-size: 10px;
}

.side-menu {
  display: grid;
  gap: 3px;
}

.menu-section {
  color: #71839b;
  font-size: 10px;
  margin: 9px 0 3px;
}

.menu-section-button {
  width: 100%;
  border: 0;
  background: transparent;
  color: #71839b;
  padding: 5px 6px 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  font-size: 10px;
  font-weight: 800;
}

.menu-section-button strong {
  color: #8ea1b7;
  font-size: 12px;
  line-height: 1;
}

.menu-section-button.collapsed {
  color: #92a4bb;
}

.menu-group-items {
  display: grid;
  gap: 3px;
}

.menu-item {
  width: 100%;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: #cbd6e2;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: left;
  min-height: 30px;
  font-size: 12px;
}

.menu-item.active {
  background: #123f43;
  color: #58f4ea;
}

.menu-item.locked {
  color: #748299;
}

.menu-item .plus-badge {
  margin-left: auto;
  font-size: 9px;
  color: #9adff8;
  background: #12304a;
  border: 1px solid #1f5d84;
  padding: 1px 5px;
  border-radius: 4px;
}

.plan-card {
  margin-top: auto;
  background: #172337;
  border: 1px solid #22324b;
  border-radius: 2px;
  padding: 6px;
  display: grid;
  gap: 2px;
}

.plan-card strong {
  color: #8ff2e9;
}

.logout-btn {
  border: 1px solid #22324b !important;
  border-radius: 2px;
  background: transparent !important;
  color: #8ea1b7 !important;
  padding: 6px 8px;
  font-weight: 700;
  font-size: 10px;
  margin-top: 2px;
  transition: all 0.2s ease;
}

.logout-btn:hover {
  background: #7f1d1d !important;
  color: #fff !important;
  border-color: #ef4444 !important;
}

.menu-item span:first-child {
  width: 18px;
  flex: 0 0 18px;
  text-align: center;
  font-size: 11px;
  opacity: .9;
}

.menu-item strong {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-card button {
  padding: 9px 10px;
  font-size: 12px;
}

.main-content {
  min-width: 0;
  padding: 22px 24px 36px;
}

.lock-overlay {
  position: fixed;
  inset: 0 0 0 212px;
  z-index: 10;
  box-sizing: border-box;
}

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

.topbar h1 {
  margin: 0;
  font-size: 22px;
}

.topbar p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

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

.top-actions select,
.top-actions button,
.live-pill {
  border: 1px solid #dbe2ea;
  background: #ffffff;
  color: #344054;
  border-radius: 2px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.top-actions select {
  padding-right: 28px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23667085' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 12px;
  cursor: pointer;
}

.top-actions select:hover,
.top-actions button:hover {
  border-color: #b2c0d2;
  color: #101828;
  background: #fcfcfd;
}

.top-actions button:active {
  background: #f2f4f7;
  transform: scale(0.98);
}

#planToggle {
  background: #e6fffb;
  color: #06756d;
  border-color: #a0eee7;
}

#planToggle:hover {
  background: #d0f7f2;
  border-color: #79e0d6;
  color: #04524c;
}

#refreshButton {
  width: 38px;
  padding: 0;
  font-size: 16px;
  color: #667085;
}

.live-pill {
  font-size: 12px;
  color: #039855;
  font-weight: 800;
  background: #edfcf2;
  border-color: #abefc6;
  gap: 7px;
  box-shadow: none;
}

.live-pill span {
  width: 7px;
  height: 7px;
  background: #12b76a;
  border-radius: 50%;
  display: inline-block;
  position: relative;
}

/* Subtle heartbeat animation for the live green dot */
.live-pill span::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid #12b76a;
  animation: pulse-ring 2s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.5);
    opacity: 1;
  }

  80%,
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

.alert-banner {
  border: 1px solid #f6a23b;
  background: #fff3df;
  color: #8a4b07;
  border-radius: 2px;
  padding: 13px 16px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast-banner {
  border: 1px solid #15c8bb;
  background: #e6fffb;
  color: #06756d;
  border-radius: 4px;
  padding: 13px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 320px;
  max-width: 90vw;
}

.alert-item {
  font-size: 13px;
  line-height: 1.45;
  white-space: normal;
  display: flex;
  align-items: center;
  gap: 8px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card,
.panel,
.mini-panel,
.plus-preview {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.kpi-card {
  padding: 15px;
  border-left: 4px solid var(--green);
  min-height: 118px;
  display: grid;
  gap: 8px;
}

.kpi-card.warn {
  border-left-color: var(--amber);
}

.kpi-card.bad {
  border-left-color: var(--red);
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: #0b1220;
}

.kpi-value small {
  font-size: 14px;
  color: var(--muted);
}

.kpi-desc {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.status-badge {
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 800;
  color: #047857;
  background: #dff8ef;
}

.status-badge.warn {
  color: #9a5b00;
  background: #fff0cc;
}

.status-badge.bad {
  color: #b42318;
  background: #fee4e2;
}

.status-badge.inactive {
  color: var(--muted);
  background: var(--surface-soft);
}

.data-table tr.release-row-inactive td {
  background: var(--surface-soft);
  color: var(--muted);
}

.release-state-toggle {
  padding: 3px 8px;
  font-size: 11px;
}

.release-state-toggle.active {
  color: #047857;
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
  background: color-mix(in srgb, var(--green) 10%, var(--surface));
}

.release-state-toggle.inactive {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-soft);
}

.release-registration-panel { min-height: 0; padding: 0; overflow: hidden; }
.release-registration-summary {
  position: relative;
  padding: 14px 42px 14px 16px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.release-registration-summary::-webkit-details-marker { display: none; }
.release-registration-summary::after {
  content: "＋";
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--muted);
  font-size: 16px;
  transform: translateY(-50%);
}
.release-registration-panel[open] .release-registration-summary { border-bottom: 1px solid var(--line); }
.release-registration-panel[open] .release-registration-summary::after { content: "−"; }
.release-registration-body { padding: 20px; }
.release-tabs { margin-bottom: 16px; }
.release-stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.release-form-agent { max-width: 600px; }
.release-form-collector { max-width: 700px; }
.release-form select { width: 100%; }
.release-form-actions {
  display: flex;
  grid-column: 1 / -1;
  justify-content: flex-start;
  margin-top: 10px;
}
.release-form .release-form-actions button {
  width: auto;
  min-width: 90px;
  height: 32px;
  margin: 0;
  justify-self: auto;
}
.release-code-text,
.release-checksum,
.release-code-input {
  font-family: 'Fira Code', Consolas, "Courier New", monospace;
}
.release-code-input {
  width: 100%;
  min-height: 220px;
  padding: 10px;
  border: 1px solid #cfd8e3;
  border-radius: 2px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  line-height: 1.5;
  outline: none;
  resize: vertical;
}
.release-signer-input { min-height: 120px; }
.release-code-input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(21, 200, 187, 0.15);
}
.release-history { overflow: hidden; }
.release-history-filter {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: var(--bg);
}
.release-history-filter select { width: 120px; }
.release-table-link { font-size: 11px; }
.release-checksum {
  max-width: 250px;
  overflow: hidden;
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.release-modal-close { margin: 0; }
.release-state-message {
  padding: 20px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.release-state-message.error { color: var(--red); }

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

.panel {
  padding: 18px;
}

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

.panel h2 {
  margin: 0;
  font-size: 16px;
}

.panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.session-grid div {
  background: var(--surface-soft);
  border-radius: 2px;
  text-align: center;
  padding: 17px 10px;
}

.session-grid strong {
  display: block;
  font-size: 26px;
}

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

.evidence-box {
  margin-top: 12px;
  background: var(--surface-soft);
  border-radius: 2px;
  padding: 14px;
  color: #42526b;
  font-size: 13px;
  line-height: 1.7;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 10px;
}

.tabs button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 2px;
  padding: 8px;
  color: var(--muted);
}

.tabs button.active {
  background: #e6fffb;
  border-color: #a0eee7;
  color: #06756d;
  font-weight: 800;
}

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

.bar-row {
  display: grid;
  gap: 5px;
}

.bar-row-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #344054;
}

.bar-track {
  height: 6px;
  background: #edf0f3;
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.trend-grid,
.bottom-grid,
.plus-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.bottom-grid,
.plus-preview-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-panel {
  padding: 14px;
}

.mini-panel>div:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 9px;
}

.mini-panel strong {
  color: var(--text);
  font-size: 18px;
}

.spark-bars {
  height: 80px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 4px;
  position: relative;
}

.spark-bars>span:not([style]) {
  display: none;
}

.plus-preview {
  min-height: 176px;
  border-style: dashed;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px;
  color: #7a8492;
}

.plus-preview h2 {
  margin: 8px 0 4px;
  color: #4b5565;
  font-size: 16px;
}

.plus-preview p {
  margin: 0 0 14px;
  max-width: 440px;
  line-height: 1.6;
  font-size: 13px;
}

.plus-preview.locked {
  background: repeating-linear-gradient(-45deg, #fff, #fff 10px, #fafafa 10px, #fafafa 20px);
}

.lock-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e6f7f5;
  color: #08776f;
  font-weight: 900;
}

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

.table-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #eef1f4;
  font-size: 13px;
}

.table-row:last-child {
  border-bottom: 0;
}

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

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

  .content-grid,
  .bottom-grid,
  .plus-preview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .login-shell {
    grid-template-columns: 1fr;
    background: #07111f;
    padding: 32px 24px;
    gap: 24px;
  }

  .login-panel {
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
  }

  .login-brand {
    text-align: center;
  }

  .brand-category {
    margin: 6px 0 12px !important;
    font-size: 11px !important;
  }

  .login-brand h1 {
    font-size: 24px !important;
    margin-bottom: 8px !important;
    line-height: 1.1 !important;
  }

  .brand-value {
    font-size: 14px !important;
    margin-bottom: 6px !important;
  }

  .brand-copy {
    font-size: 11px !important;
    line-height: 1.4 !important;
    margin: 0 auto !important;
  }

  .signal-strip {
    display: none !important;
  }

  .sidebar {
    display: none !important;
  }

  .topbar {
    display: none !important;
  }

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

  .dashboard-shell:not(.hidden) {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .main-content {
    padding: 0px 16px 80px !important;
    margin: 0 !important;
    width: 100% !important;
  }

  .lock-overlay {
    inset: 0;
  }

  .main-content>section,
  .main-content>div {
    margin-top: 16px !important;
  }

  /* Mobile bottom navigation bar styling */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: #ffffff;
    border-top: 1px solid #eef1f6;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    z-index: 9999;
  }

  .mobile-tab-btn {
    flex: 1;
    border: 0;
    background: transparent;
    color: #8ea1b7;
    /* Subtle grey for inactive tab labels */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 6px 0;
  }

  .mobile-tab-btn svg {
    width: 20px;
    height: 20px;
    stroke: #8ea1b7;
    /* Match inactive icon color */
    stroke-width: 2;
    transition: all 0.2s ease;
  }

  .mobile-tab-btn.active {
    color: #06756d;
    /* Deep emerald-teal matching active brand color */
    background: #f7fcfb;
    /* Very soft cyan hue for selected background */
  }

  .mobile-tab-btn.active svg {
    stroke: #06756d;
    /* Active green/teal color for icon */
  }

  /* Mobile top submenu bar styling */
  .mobile-submenu-bar {
    display: flex;
    align-items: stretch;
    /* Stretch buttons to full height to align active indicators */
    gap: 20px;
    /* Generous gap for premium look */
    height: 48px;
    /* Slightly slimmer, more modern height */
    padding: 0 20px;
    background: #ffffff;
    border-bottom: 1px solid #eef1f6;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
  }

  /* Disable scrollbar visual track for premium flat appearance */
  .mobile-submenu-bar::-webkit-scrollbar {
    display: none;
  }

  .mobile-sub-btn {
    border: 0;
    /* Remove rigid button borders */
    background: transparent;
    /* Transparent base */
    color: #8ea1b7;
    /* Soft grey text matching inactive color scale */
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1.2;
    transition: all 0.2s ease;
    flex-shrink: 0;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 4px;
  }

  /* Modern clean underline indicator for active submenu */
  .mobile-sub-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #06756d;
    /* Brand active color */
    border-radius: 99px;
    transform: scaleX(0);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-sub-btn.active {
    color: #0b1422;
    /* High contrast dark grey for selected submenu */
  }

  .mobile-sub-btn.active::after {
    transform: scaleX(1);
  }

  .mobile-sub-btn.locked {
    opacity: 0.45;
    cursor: not-allowed;
  }

  /* Mobile Brand Header Bar styling */
  .mobile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--dark);
    /* #0b1422 */
    color: #ffffff;
    height: 56px;
    /* Absolute fixed height */
    padding: 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
  }

  .mobile-header .logo-block {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mobile-header .logo {
    font-size: 18px;
    font-weight: 800;
    color: #ffffff;
  }

  .mobile-header .logo span {
    color: var(--teal);
  }

  .mobile-header .logo-block p {
    margin: 0;
    font-size: 9px;
    color: #8ea1b7;
  }

  .mobile-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .mobile-customer-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }

  .mobile-customer-info span:first-child {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
  }

  .mobile-server-select {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    background: transparent;
    border: none;
    outline: none;
    text-align: right;
    appearance: none;
    -webkit-appearance: none;
    padding: 0 12px 0 0;
    margin: 0;
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 10px;
  }

  .mobile-server-select option {
    color: #1a1e23;
    font-weight: normal;
  }

  .mobile-plan-tag {
    font-size: 10px;
    color: #ffeb3b;
    /* Gold/yellow color for premium 'plus' tag */
    font-weight: 800;
    font-style: italic;
    text-transform: uppercase;
  }

  .mobile-logout-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 2px;
    color: #8ea1b7;
    padding: 6px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-logout-btn:hover {
    color: #ffffff;
    background: #7f1d1d;
    border-color: #ef4444;
  }
}

/* Fallback hiding for desktop layout */
@media (min-width: 821px) {
  .mobile-bottom-nav {
    display: none !important;
  }

  .mobile-submenu-bar {
    display: none !important;
  }

  .mobile-header {
    display: none !important;
  }
}


.three-columns {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.check-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  display: grid;
  gap: 10px;
  min-height: 150px;
}

.check-card span {
  width: fit-content;
  color: #047857;
  background: #dff8ef;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
}

.check-card strong {
  font-size: 15px;
}

.check-card p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0;
}

.check-card small {
  margin-top: auto;
  color: var(--teal);
  font-weight: 800;
}

.check-card.locked {
  border-style: dashed;
  background: #fbfbfc;
  opacity: .82;
}

.risk-summary {
  display: grid;
  gap: 10px;
  align-items: center;
  justify-items: start;
}

.risk-summary strong {
  font-size: 64px;
  line-height: 1;
  color: var(--teal);
}

.risk-summary span {
  color: #9a5b00;
  background: #fff0cc;
  padding: 5px 10px;
  border-radius: 999px;
  font-weight: 800;
}

.risk-summary p {
  color: var(--muted);
  margin: 0;
}

.score-bars {
  height: 260px;
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 20px 30px;
  position: relative;
  background: linear-gradient(to bottom, transparent, transparent calc(100% - 1px), #f0f4f8 calc(100% - 1px));
}

/* Horizontal Grid Line guides */
.score-bars::before {
  content: '';
  position: absolute;
  top: 20px;
  bottom: 50px;
  left: 20px;
  right: 20px;
  background-image:
    linear-gradient(to bottom, #f0f4f8 1px, transparent 1px),
    linear-gradient(to bottom, #f0f4f8 1px, transparent 1px),
    linear-gradient(to bottom, #f0f4f8 1px, transparent 1px),
    linear-gradient(to bottom, #f0f4f8 1px, transparent 1px);
  background-size: 100% 25%;
  pointer-events: none;
  z-index: 1;
}

.score-bars div {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: calc(100% - 30px);
  position: relative;
  z-index: 2;
}

.score-bars span {
  width: 100%;
  max-width: 32px;
  min-height: 8px;
  background: var(--teal);
  border-radius: 2px 6px 0 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 6px -1px rgba(8, 127, 119, 0.12), 0 2px 4px -1px rgba(8, 127, 119, 0.08);
  cursor: pointer;
}

.score-bars div:hover span {
  transform: translateY(-4px);
  background: #0ca49a;
  box-shadow: 0 10px 15px -3px rgba(8, 127, 119, 0.25);
}

.score-bars strong {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 6px;
}

.score-bars small {
  color: var(--muted);
  font-size: 11px;
  margin-top: 10px;
  white-space: nowrap;
}

.notice-box {
  background: var(--surface-soft);
  border-radius: 2px;
  padding: 18px;
  color: #42526b;
  line-height: 1.7;
}

.locked-page {
  min-height: 420px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 32px;
}

.locked-page h2 {
  margin: 0;
  font-size: 24px;
}

.locked-page p {
  margin: 0;
  color: var(--muted);
}

.locked-page button {
  border: 0;
  background: var(--dark);
  color: #fff;
  border-radius: 2px;
  padding: 11px 14px;
  font-weight: 800;
}

@media (max-width: 1180px) {

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

@media (max-width: 720px) {

  .three-columns,
  .check-grid {
    grid-template-columns: 1fr;
  }
}

.bottom-grid.single {
  grid-template-columns: 1fr;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.filter-row input[type="date"] {
  width: 140px;
}

.filter-row select {
  width: 120px;
}

.filter-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filter-row input,
.filter-row select {
  border: 1px solid #cfd8e3;
  border-radius: 2px;
  height: 32px;
  padding: 0 10px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.filter-row input:focus,
.filter-row select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(21, 200, 187, 0.15);
}

.filter-row button {
  border: 0;
  border-radius: 2px;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  height: 32px;
  padding: 0 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pager button {
  border: 0;
  border-radius: 2px;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  height: 28px;
  padding: 0 12px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.filter-row button:hover {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
  transform: translateY(-1px);
}

.pager button:hover:not(:disabled) {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
  transform: translateY(-1px);
}

.filter-row button:active,
.pager button:active:not(:disabled) {
  transform: translateY(0);
}

.data-table {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 2px;
}

.data-table table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #eef1f4;
  text-align: left;
  vertical-align: middle;
  line-height: 1.35;
}

.data-table th {
  background: var(--surface-soft);
  color: #475467;
  font-size: 12px;
}

.data-table td {
  color: #344054;
}

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

.data-table.scrollable {
  max-height: 290px;
  overflow-y: auto;
}

.data-table.scrollable th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  box-shadow: inset 0 -1px 0 #eef1f4;
}

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.pager button:disabled {
  opacity: .45;
  cursor: not-allowed;
}

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

  .alert-banner {
    flex-direction: column !important;
    gap: 8px !important;
    padding: 10px 12px !important;
  }
  
  .alert-item {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    white-space: normal;
  }

  /* Table style for KPI Cards on Mobile */
  .kpi-grid {
    grid-template-columns: 1fr !important;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
    gap: 0 !important;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .kpi-grid .kpi-card {
    display: grid !important;
    grid-template-areas: 
      "title value"
      "title desc" !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
    padding: 12px 16px !important;
    min-height: auto !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: var(--surface) !important;
    gap: 2px 10px !important;
  }

  .kpi-grid .kpi-card:last-child {
    border-bottom: 0 !important;
  }

  .kpi-grid .kpi-card .kpi-top {
    grid-area: title;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
  }

  .kpi-grid .kpi-card .kpi-value {
    grid-area: value;
    text-align: right;
    font-size: 17px !important;
    font-weight: 800;
  }

  .kpi-grid .kpi-card .kpi-desc {
    grid-area: desc;
    text-align: right;
    font-size: 10px !important;
    color: var(--muted);
    margin-top: 2px;
  }

  /* Status Colors for Values on Mobile */
  .kpi-grid .kpi-card.healthy .kpi-value {
    color: var(--green) !important;
  }
  .kpi-grid .kpi-card.caution .kpi-value {
    color: var(--amber) !important;
  }
  .kpi-grid .kpi-card.critical .kpi-value {
    color: var(--red) !important;
  }
}

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

.collection-log-layout .panel {
  display: flex;
  flex-direction: column;
  min-height: 700px;
}

.collection-log-layout .data-table {
  flex-grow: 1;
  max-height: 650px;
  overflow-y: auto;
}

.compact-table table {
  min-width: 560px;
}

@media (max-width: 1180px) {
  .collection-log-layout {
    grid-template-columns: 1fr;

    .collection-log-layout .panel {
      min-height: auto;
    }
  }
}



.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  border-radius: 2px;
  padding: 8px 10px;
  font-weight: 800;
}

.small-filter {
  grid-template-columns: minmax(180px, 240px) 100px;
}

.row-actions {
  display: flex;
  gap: 6px;
}

/* Form Submit Buttons (Save / Policy Save) */
.admin-form button,
.toggle-grid button,
.collection-policy-save {
  border: 0;
  border-radius: 2px;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 3px rgba(13, 148, 136, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.admin-form button:hover,
.toggle-grid button:hover,
.collection-policy-save:hover {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
  transform: translateY(-1px);
}

.admin-form button:active,
.toggle-grid button:active,
.collection-policy-save:active {
  transform: translateY(0);
}

.collection-policy-save:disabled {
  cursor: wait;
  opacity: 0.6;
  transform: none;
}

/* Compact Table & Row Action Buttons */
.row-actions button,
.data-table button {
  border: 0;
  border-radius: 2px;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(13, 148, 136, 0.1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
}

.row-actions button:hover,
.data-table button:hover {
  background: linear-gradient(135deg, #0d9488, #14b8a6);
  box-shadow: 0 3px 8px rgba(13, 148, 136, 0.2);
  transform: translateY(-0.5px);
}

.row-actions button:active,
.data-table button:active {
  transform: translateY(0);
}

.row-actions button+button {
  background: #dc2626;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.15);
}

.row-actions button+button:hover {
  background: #ef4444;
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
  transform: translateY(-1px);
}

.muted-text {
  color: var(--muted);
  font-size: 12px;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.admin-server-grid {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: 16px;
  align-items: start;
}
.admin-server-tabs { margin-bottom: 16px; }
.admin-server-details,
.admin-server-schedule-table {
  border-radius: 2px;
  font-family: inherit;
}
.admin-server-details-table {
  width: 100%;
  min-width: 0 !important;
}
.admin-license-table,
.admin-customers-table {
  border-radius: 2px;
  font-family: inherit;
}

.admin-span-2 {
  grid-column: 1 / -1;
}

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

.admin-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.admin-form input,
.admin-form select,
.data-table input,
.schedule-control input,
.schedule-control select {
  border: 1px solid #cfd8e3;
  border-radius: 2px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
  outline: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.admin-form input:focus,
.admin-form select:focus,
.data-table input:focus,
.schedule-control input:focus,
.schedule-control select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(21, 200, 187, 0.15);
}

.admin-form button,
.toggle-grid button {
  grid-column: 1 / -1;
  width: auto;
  min-width: 90px;
  height: 32px;
  margin: 10px 0 0 auto;
  justify-self: end;
}

.mfa-qr-box {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface-soft);
}

.mfa-qr-box canvas {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
}

.mfa-qr-box div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.mfa-qr-box span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.mfa-qr-box strong {
  overflow-wrap: anywhere;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

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

.toggle-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 10px;
  background: var(--surface-soft);
  font-size: 13px;
  color: #344054;
}

@media (max-width: 1180px) {

  .admin-summary-grid,
  .admin-server-grid,
  .toggle-grid {
    grid-template-columns: 1fr;
  }

  .admin-span-2 {
    grid-column: auto;
  }
}

@media (max-width: 720px) {

  .admin-form,
  .small-filter {
    grid-template-columns: 1fr;
  }
}


.checks-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding: 4px 0;
  color: #52637a;
  font-size: 12px;
}

.checks-history-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #dbe2ea;
  border-radius: 2px;
  padding: 2px 4px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
}

.checks-nav-btn {
  background: transparent;
  border: 0;
  padding: 4px 8px;
  color: #475467;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.checks-nav-btn:hover:not(:disabled) {
  background: #f2f4f7;
  color: #101828;
}

.checks-nav-btn:disabled {
  color: #d0d5dd;
  cursor: not-allowed;
}

.checks-nav-date {
  font-weight: 700;
  font-size: 12px;
  color: #344054;
  min-width: 140px;
  text-align: center;
}

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

.check-group-header {
  grid-column: 1 / -1;
  font-size: 15px;
  font-weight: 800;
  color: var(--dark-2);
  margin-top: 10px;
  margin-bottom: 0px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 8px;
}
.check-group-header svg {
  color: var(--teal);
}
.check-group-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: inherit;
  color: inherit;
}
.check-group-header.secondary {
  margin-top: 20px;
}

.daily-check-panel {
  min-width: 0;
  padding: 14px;
}

.daily-check-table-wrap {
  overflow: auto;
  max-height: 260px;
}

.daily-check-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.daily-check-table th,
.daily-check-table td {
  padding: 8px 7px;
  border-bottom: 1px solid #e4e9ef;
  text-align: left;
  white-space: nowrap;
}

.daily-check-table th {
  position: sticky;
  top: 0;
  background: #fff;
  color: #627086;
  font-weight: 600;
}

.daily-check-table td:first-child {
  font-weight: 600;
  color: #12233d;
}

.empty-checks {
  padding: 28px;
  text-align: center;
}

.empty-checks p {
  color: #718096;
}

@media (max-width: 1000px) {
  .daily-check-layout {
    grid-template-columns: 1fr;
  }
}

.login-error {
  margin: 0;
  padding: 9px 10px;
  border: 1px solid #f2b8b5;
  background: #fff1f0;
  color: #a61b1b;
  border-radius: 5px;
  font-size: 12px;
}

.login-panel .password-visibility {
  display: flex;
  grid-template-columns: 16px 1fr;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 500;
}

.login-panel .password-visibility input {
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
}

.login-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #cfd8e3;
  border-radius: 2px;
  padding: 3px;
  background: #f3f6f9;
}

.login-panel .login-mode button {
  padding: 8px;
  background: transparent;
  color: #637083;
  font-weight: 700;
}

/* SVG Line Chart styling */
.health-chart-wrapper {
  position: relative;
  background: #ffffff;
  padding: 16px 0;
  border-radius: 2px;
  box-shadow: inset 0 -1px 0 0 #f0f4f8;
  font-family: inherit;
}

.health-svg-container {
  width: 100%;
  height: 220px;
  display: block;
  overflow: visible;
  font-family: inherit;
}

.health-svg-grid-line {
  stroke: #e2e8f0;
  stroke-width: 1px;
}

.health-svg-grid-text {
  fill: #94a3b8;
  font-family: inherit;
  font-size: 11px;
  font-weight: 500;
}

.health-svg-line {
  fill: none;
  stroke: var(--teal);
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.health-svg-area {
  fill: url(#healthAreaGradient);
  opacity: 0.12;
}

.health-svg-point {
  fill: #ffffff;
  stroke: var(--teal);
  stroke-width: 3px;
  cursor: pointer;
  transition: r 0.2s ease, fill 0.2s ease;
}

.health-svg-point:hover {
  r: 7px;
  fill: var(--teal);
}

.health-svg-point-highlight {
  fill: var(--red);
  stroke: #ffffff;
  stroke-width: 2px;
}

.health-svg-point-highlight-ring {
  fill: var(--red);
  opacity: 0.15;
}

.chart-tooltip {
  position: absolute;
  background: #0f172a;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 2px;
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  z-index: 10;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none;
  transform: translate(-50%, -100%);
  font-family: inherit;
  margin-top: -12px;
}

.chart-tooltip::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 8px;
  height: 8px;
  background: #0f172a;
}

.login-panel .login-mode button.active {
  background: #fff;
  color: #087f77;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .12);
}

.check-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  border-bottom: 1px solid #dbe2ea;
}

.check-tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  padding: 9px 14px;
  font-weight: 700;
}

.check-tabs button.active {
  color: #087f77;
  border-bottom-color: #15c8bb;
}

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

.period-summary article {
  border: 1px solid #dbe2ea;
  background: #fff;
  padding: 10px 12px;
  border-radius: 2px;
}

.period-summary span {
  display: block;
  color: #64748b;
  font-size: 11px;
}

.period-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

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

.settings-sync {
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  margin-bottom: 8px;
  border-left: 3px solid #f59e0b;
  background: #fff8e8;
  font-size: 11px;
}

.settings-sync strong {
  font-size: 12px;
}

.settings-sync.success {
  border-color: #10b981;
  background: #ecfdf5;
}

.settings-sync.failed {
  border-color: #ef4444;
  background: #fef2f2;
}

.settings-sync span,
.settings-sync small,
.schedule-guide {
  color: #64748b;
}

.schedule-control {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
}

.schedule-control input[type="number"] {
  width: 64px;
}

.schedule-control input[type="time"] {
  width: 115px;
}

.schedule-control select {
  width: 78px;
}

.compact-table td:first-child small {
  display: block;
  color: #94a3b8;
  margin-top: 2px;
}

.schedule-guide {
  margin: 8px 0 0;
  font-size: 11px;
}

/* Modern Segmented Toggle Switch */
.toggle-group {
  display: inline-flex;
  background: var(--surface-soft);
  padding: 2px;
  border-radius: 2px;
  border: 1px solid #cfd8e3;
  height: 32px;
  align-items: center;
}

.toggle-group .toggle-btn {
  border: 0 !important;
  background: transparent !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  padding: 0 12px !important;
  height: 26px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: none !important;
  transform: none !important;
}

.toggle-group .toggle-btn.active {
  background: #ffffff !important;
  color: var(--teal) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

/* Custom Tab Switcher */
.tab-container {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-container::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
  position: relative;
  bottom: -1px;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--teal);
}

.tab-btn.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}

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

@media (max-width: 820px) {
  .wait-guide-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Risk Events Page Custom Styles */
.risk-events-layout {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.risk-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
}
.risk-summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.risk-summary-card.critical {
  border-left: 4px solid var(--red);
}
.risk-summary-card.warning {
  border-left: 4px solid var(--amber);
}
.risk-summary-card.resolved {
  border-left: 4px solid var(--green);
}
.risk-summary-card.accumulated {
  border-left: 4px solid var(--muted);
}
.risk-summary-card span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.risk-summary-card strong {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}
.risk-summary-card.critical strong { color: var(--red); }
.risk-summary-card.warning strong { color: var(--amber); }
.risk-summary-card.resolved strong { color: var(--green); }
.risk-summary-card.accumulated strong { color: var(--text); }
.risk-summary-card small {
  font-size: 12px;
  color: var(--muted);
}

.risk-filters-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.filter-btn-group {
  display: flex;
  gap: 6px;
}
.filter-btn {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--muted);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}
.filter-btn:hover {
  border-color: var(--text-muted);
  color: var(--text);
}
.filter-btn.active {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}
.risk-search-box {
  position: relative;
}
.risk-search-box input {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 8px 12px;
  font-size: 13px;
  width: 200px;
  color: var(--text);
  transition: width 0.3s ease;
}
.risk-search-box input:focus {
  width: 260px;
  border-color: var(--primary);
  outline: none;
}

.risk-events-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 15px;
}
.risk-events-list.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 820px) {
  .risk-events-list.two-cols {
    grid-template-columns: 1fr !important;
  }
}
.risk-event-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.risk-event-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.risk-event-card.critical { border-left: 4px solid var(--red); }
.risk-event-card.warning { border-left: 4px solid var(--amber); }
.risk-event-card.caution { border-left: 4px solid var(--blue); }
.risk-event-card.resolved { border-left: 4px solid var(--green); }

.risk-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.risk-card-title-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.risk-card-title-area h3 {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}
.risk-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.risk-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.risk-event-card.critical .risk-status-dot { background: var(--red); }
.risk-event-card.warning .risk-status-dot { background: var(--amber); }
.risk-event-card.caution .risk-status-dot { background: var(--blue); }
.risk-event-card.resolved .risk-status-dot { background: var(--green); }

.severity-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}
.severity-badge.critical { background: rgba(239, 68, 68, 0.15); color: var(--red); }
.severity-badge.warning { background: rgba(245, 158, 11, 0.15); color: var(--amber); }
.severity-badge.caution { background: rgba(59, 130, 246, 0.15); color: var(--blue); }
.severity-badge.resolved { background: rgba(16, 185, 129, 0.15); color: var(--green); }

.risk-card-body {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--muted);
  white-space: pre-line;
}

.risk-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 5px;
}
.risk-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.risk-tag {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
}
.risk-action-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  cursor: pointer;
}
.risk-action-link:hover {
  text-decoration: underline;
}
.risk-duration {
  font-size: 12px;
  color: var(--muted);
}

/* Premium Modal Popup */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-content {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  width: 100%;
  max-width: 800px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-soft);
}

.modal-header strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
}

.modal-body {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  background: var(--bg);
}

/* Monospace Codeblock for SQL script */
.sql-code-block {
  margin: 0;
  padding: 16px;
  background: #1e293b;
  color: #f1f5f9;
  border-radius: 8px;
  font-family: 'Fira Code', 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
  border: 1px solid #334155;
  overflow-x: auto;
}

/* Risk KPI Grid on Desktop */
.risk-score-layout {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: stretch;
  min-height: clamp(560px, calc(100vh - 180px), 720px);
}
.risk-score-overview {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
  padding: 20px;
}
.risk-score-intro { display: flex; align-items: center; gap: 18px; }
.risk-score-ring {
  display: flex;
  flex: 0 0 84px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border: 4px solid;
  border-radius: 50%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .05);
}
.risk-score-ring span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.risk-score-ring strong { color: var(--text); font-size: 26px; font-weight: 900; line-height: 1.1; }
.risk-score-copy h2 { margin: 0 0 6px; color: var(--text); font-size: 15px; }
.risk-score-info { color: var(--muted); font-size: 12px; font-weight: 700; cursor: help; }
.risk-score-copy p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.risk-score-status { margin-left: 2px; padding: 1px 6px; border: 1px solid; border-radius: 4px; font-size: 10px; font-weight: 800; white-space: nowrap; }
.risk-score-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.risk-score-summary > div { display: grid; gap: 4px; min-width: 0; padding: 14px 16px; }
.risk-score-summary > div:nth-child(odd) { border-right: 1px solid var(--line); }
.risk-score-summary > div:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
.risk-score-summary span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.risk-score-summary span::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--red); }
.risk-score-summary > div:nth-child(2) span::before { background: var(--violet); }
.risk-score-summary > div:nth-child(3) span::before { background: var(--amber); }
.risk-score-summary > div:nth-child(4) span::before { background: var(--blue); }
.risk-score-summary strong { color: var(--text); font-size: 18px; line-height: 1.1; }
.risk-score-breakdown { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.risk-score-breakdown-head,
.risk-score-deductions > div,
.risk-score-total { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.risk-score-breakdown-head strong { color: var(--text); font-size: 12px; }
.risk-score-breakdown-head span { color: var(--muted); font-size: 10px; }
.risk-score-deductions { display: grid; gap: 5px; }
.risk-score-deductions > div { display: grid; grid-template-columns: minmax(90px, 1fr) auto; padding: 6px 8px; border-left: 3px solid var(--red); background: color-mix(in srgb, var(--red) 5%, var(--surface)); }
.risk-score-deductions span { color: var(--text); font-size: 11px; }
.risk-score-deductions strong { color: var(--red); font-size: 12px; }
.risk-score-deductions > div.healthy { border-left-color: var(--green); background: color-mix(in srgb, var(--green) 5%, var(--surface)); }
.risk-score-deductions > div.healthy strong { color: var(--green); }
.risk-deduction-trend { min-height: 164px; padding: 11px 12px 9px; border-radius: 4px; background: var(--surface-soft); }
.risk-deduction-trend-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.risk-deduction-trend-label strong { color: var(--text); font-size: 12px; }
.risk-deduction-trend-label span { color: var(--muted); font-size: 10px; }
.risk-deduction-trend-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; margin-bottom: 4px; }
.risk-deduction-trend-head span { color: var(--muted); font-size: 11px; font-weight: 700; }
.risk-deduction-trend-head .risk-trend-metric::before { content: "△"; margin-right: 6px; color: var(--red); }
.risk-deduction-trend-head .risk-trend-current { color: var(--red); font-size: 12px; }
.risk-deduction-trend-head strong { color: var(--muted); font-size: 10px; }
.risk-deduction-trend-head strong.up { color: var(--red); }
.risk-deduction-trend-head strong.down { color: var(--green); }
.risk-trend-chart { position: relative; height: 72px; }
.risk-deduction-trend svg { display: block; width: 100%; height: 72px; overflow: visible; }
.risk-deduction-trend polyline { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.risk-deduction-trend circle { fill: var(--red); }
.risk-trend-threshold { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; opacity: .55; vector-effect: non-scaling-stroke; }
.risk-trend-threshold-label { position: absolute; right: 4px; padding-left: 5px; background: var(--surface-soft); color: var(--muted); font-size: 9px; transform: translateY(-50%); }
.risk-trend-axis { display: flex; justify-content: space-between; margin-top: 2px; color: var(--muted); font-size: 9px; }
.risk-score-total { padding-top: 7px; border-top: 1px dashed var(--line); }
.risk-score-total span { color: var(--muted); font-size: 11px; font-weight: 700; }
.risk-score-total strong { color: var(--text); font-size: 16px; }
.risk-score-total-values { display: grid; gap: 3px; text-align: right; }
.risk-score-total-values small { color: var(--muted); font-size: 10px; font-weight: 600; }
.risk-metric-table { display: flex; flex-direction: column; min-height: 100%; padding: 0; overflow: hidden; }
.risk-metric-table-head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.risk-metric-table-head strong { color: var(--text); font-size: 14px; }
.risk-metric-table-head span { color: var(--muted); font-size: 11px; }
.risk-metric-table-body { display: grid; flex: 1; align-content: start; }
.risk-metric-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) 110px 100px 48px;
  gap: 14px;
  align-items: center;
  min-height: 85px;
  padding: 14px 14px;
  border-bottom: 1px solid var(--line);
}
.risk-metric-row.disk-detail {
  grid-template-rows: auto auto;
  row-gap: 12px;
  align-items: start;
  min-height: 0;
  padding-top: 16px;
}
.risk-metric-row:last-child { border-bottom: 0; }
.risk-metric-name { display: grid; gap: 4px; min-width: 0; }
.risk-metric-name > strong { display: flex; align-items: center; gap: 7px; color: var(--text); font-size: 13px; }
.risk-metric-name > strong span { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--risk-color); }
.risk-metric-name small { overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.risk-metric-value { display: grid; gap: 3px; }
.risk-metric-value strong { color: var(--text); font-size: 16px; white-space: nowrap; }
.risk-metric-value small { color: var(--muted); font-size: 10px; }
.risk-metric-stability { display: grid; gap: 5px; }
.risk-metric-stability > span { color: var(--muted); font-size: 10px; font-weight: 700; text-align: right; }
.risk-metric-stability > div { height: 5px; overflow: hidden; border-radius: 3px; background: var(--surface-soft); }
.risk-metric-stability i { display: block; height: 100%; border-radius: inherit; background: var(--risk-color); }
.risk-metric-status { justify-self: end; padding: 2px 6px; border: 1px solid var(--risk-border); border-radius: 4px; background: var(--risk-bg); color: var(--risk-color); font-size: 9px; font-weight: 800; white-space: nowrap; }
.risk-disk-file-list {
  grid-column: 1 / -1;
  padding: 12px 0 4px 14px;
  border-top: 1px solid var(--line);
}
.risk-disk-file-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.risk-disk-file-scroll { overflow-x: auto; }
.risk-disk-file-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 10.5px;
}
.risk-disk-file-table th,
.risk-disk-file-table td {
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
}
.risk-disk-file-table th {
  color: var(--muted);
  font-weight: 800;
  text-align: left;
}
.risk-disk-file-table th:nth-child(n+3),
.risk-disk-file-table td:nth-child(n+3) { text-align: right; }
.risk-disk-file-table td { color: var(--text); }
.risk-disk-file-table td:nth-child(2) {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.risk-disk-file-table td:nth-child(3) { font-weight: 800; }
.risk-disk-file-table tr:last-child td { border-bottom: 0; }
@media (max-width: 1050px) {
  .risk-score-layout { grid-template-columns: 1fr; min-height: 0; }
  .risk-score-overview { min-height: 300px; }
  .risk-metric-table { min-height: 370px; }
}
@media (max-width: 650px) {
  .risk-score-layout > * { min-width: 0; }
  .risk-score-overview { min-height: 0; padding: 18px; gap: 20px; min-width: 0; }
  .risk-score-intro { align-items: flex-start; }
  .risk-metric-row { grid-template-columns: minmax(0, 1fr) auto auto; gap: 9px; }
  .risk-metric-row.disk-detail { grid-template-columns: minmax(0, 1fr) auto auto; }
  .risk-metric-name small, .risk-metric-stability { display: none; }
  .risk-metric-value { text-align: right; }
  .risk-disk-file-list { padding-left: 0; }
}

.risk-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}
.risk-kpi-grid .risk-kpi-card { grid-column: span 2; }
.risk-kpi-grid .risk-kpi-card:nth-last-child(-n + 2) { grid-column: span 3; }
.risk-kpi-card {
  min-height: 165px;
  font-family: inherit;
}
.risk-kpi-value {
  font-family: inherit;
  font-variant-numeric: tabular-nums;
}
.performance-data-table { border-radius: 2px; }

@media (max-width: 1200px) and (min-width: 821px) {
  .risk-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .risk-kpi-grid .risk-kpi-card { grid-column: auto; }
  .risk-kpi-grid .risk-kpi-card:last-child { grid-column: 1 / -1; }
}

/* Risk KPI Grid on Mobile (Table-like transformation) */
@media (max-width: 820px) {
  .risk-kpi-grid {
    grid-template-columns: 1fr !important;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
    gap: 0 !important;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .risk-kpi-grid .risk-kpi-card {
    grid-column: auto !important;
    display: grid !important;
    grid-template-areas: 
      "title value"
      "desc stability" !important;
    grid-template-columns: 1fr auto !important;
    align-items: center !important;
    padding: 12px 16px !important;
    min-height: auto !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: var(--surface) !important;
    gap: 6px 16px !important;
    box-shadow: none !important;
  }

  .risk-kpi-grid .risk-kpi-card:last-child {
    border-bottom: 0 !important;
  }

  .risk-kpi-grid .risk-kpi-card .risk-kpi-main {
    display: contents !important;
  }

  .risk-kpi-grid .risk-kpi-card .risk-kpi-title {
    grid-area: title;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 0 !important;
  }

  .risk-kpi-grid .risk-kpi-card .risk-kpi-value-row {
    grid-area: value;
    display: flex !important;
    align-items: baseline !important;
    justify-content: flex-end !important;
    gap: 6px !important;
    margin-bottom: 0 !important;
  }

  .risk-kpi-grid .risk-kpi-card .risk-kpi-value {
    font-size: 15px !important;
    font-weight: 800;
    color: #0f172a !important;
  }

  .risk-kpi-grid .risk-kpi-card .risk-kpi-deduction {
    font-size: 10px !important;
    color: var(--muted) !important;
  }

  .risk-kpi-grid .risk-kpi-card .risk-kpi-desc {
    grid-area: desc;
    font-size: 11px !important;
    color: var(--muted) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    text-align: left !important;
  }

  .risk-kpi-grid .risk-kpi-card .risk-kpi-stability {
    grid-area: stability;
    display: inline-block !important;
    text-align: right !important;
    font-size: 11px !important;
    color: var(--muted) !important;
    font-weight: 600 !important;
  }

  /* Hide desktop elements on mobile */
  .risk-kpi-grid .risk-kpi-card .desktop-progress {
    display: none !important;
  }
}

/* Risk summary grid/cards table transformation on mobile */
@media (max-width: 820px) {
  .risk-summary-grid {
    grid-template-columns: 1fr !important;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    overflow: hidden;
    gap: 0 !important;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  }

  .risk-summary-grid .risk-summary-card {
    display: grid !important;
    grid-template-areas: 
      "title value"
      "title desc" !important;
    grid-template-columns: auto 1fr !important;
    align-items: center !important;
    padding: 12px 16px !important;
    min-height: auto !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: var(--surface) !important;
    gap: 2px 10px !important;
    box-shadow: none !important;
  }

  .risk-summary-grid .risk-summary-card:last-child {
    border-bottom: 0 !important;
  }

  /* Specific color borders on the left side of rows */
  .risk-summary-grid .risk-summary-card.critical {
    border-left: 4px solid var(--red) !important;
  }
  .risk-summary-grid .risk-summary-card.warning {
    border-left: 4px solid var(--amber) !important;
  }
  .risk-summary-grid .risk-summary-card.resolved {
    border-left: 4px solid var(--green) !important;
  }
  .risk-summary-grid .risk-summary-card.accumulated {
    border-left: 4px solid var(--muted) !important;
  }

  .risk-summary-grid .risk-summary-card span {
    grid-area: title;
    display: flex;
    flex-direction: row;
    align-items: center;
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
    margin: 0 !important;
  }

  .risk-summary-grid .risk-summary-card strong {
    grid-area: value;
    text-align: right;
    font-size: 18px !important;
    font-weight: 800;
    margin: 0 !important;
  }

  .risk-summary-grid .risk-summary-card small {
    grid-area: desc;
    text-align: right;
    font-size: 10px !important;
    color: var(--muted);
    margin-top: 2px;
    display: block !important;
  }
}

/* Check Policy */
.check-policy-tabs { margin-bottom: 16px; }
.policy-section { margin-bottom: 16px; font-family: inherit; }
.policy-count { color: var(--muted); font-size: 13px; white-space: nowrap; }
.policy-count strong { color: var(--teal-dark); font-size: 18px; }
.policy-form { display: grid; gap: 14px; max-width: 980px; }
.policy-form label { display: grid; gap: 6px; color: var(--text); font-size: 12px; font-weight: 700; }
.policy-form input, .policy-form select, .policy-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); color: var(--text); padding: 9px 10px; font-family: inherit; font-size: 13px; font-weight: 400; }
.policy-form textarea[name="sql_script"] { font-family: 'Fira Code', Consolas, "Courier New", monospace; font-size: 12px; font-weight: 400; line-height: 1.5; }
.check-policy-data-table { border-radius: 2px; font-family: inherit; }
.collapsible-form-panel { min-height: 0; padding: 0; overflow: hidden; }
.collapsible-form-summary {
  position: relative;
  padding: 14px 42px 14px 16px;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}
.collapsible-form-summary::-webkit-details-marker { display: none; }
.collapsible-form-summary::after {
  content: "＋";
  position: absolute;
  top: 50%;
  right: 16px;
  color: var(--muted);
  font-size: 16px;
  transform: translateY(-50%);
}
.collapsible-form-panel[open] .collapsible-form-summary { border-bottom: 1px solid var(--line); }
.collapsible-form-panel[open] .collapsible-form-summary::after { content: "−"; }
.collapsible-form-body { padding: 20px; }
.collapsible-form-help { margin: 0 0 14px !important; color: var(--muted); font-size: 12px; }
.field-help { margin: -8px 0 0; color: var(--muted); font-size: 12px; }
.policy-option-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 8px 16px; }
.policy-form .policy-toggle { display: flex; align-items: center; gap: 8px; min-height: 32px; font-weight: 600; }
.policy-toggle input { width: 16px; height: 16px; }
.form-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(160px, 1fr)); gap: 12px; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; }
.form-actions button, .row-actions button { min-height: 34px; border: 1px solid var(--line); border-radius: 2px; padding: 7px 12px; font-size: 13px; cursor: pointer; }
.form-actions button[type="submit"]:not(.collection-policy-save) { border-color: var(--teal); background: var(--teal); color: #06201e; font-weight: 800; }
.custom-check-form .form-actions { justify-content: flex-start; }
.custom-check-form .form-actions .collection-policy-save {
  grid-column: auto;
  justify-self: auto;
  align-self: auto;
  min-height: 34px;
  margin: 0;
}
.custom-check-list { display: grid; }
.custom-check-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.custom-check-row:last-child { border-bottom: 0; }
.custom-check-row div:first-child { display: grid; gap: 3px; }
.custom-check-row strong { color: var(--text); font-size: 13px; }
.custom-check-row span { color: var(--muted); font-size: 12px; }
.row-actions { display: flex; gap: 6px; }
.row-actions .danger { color: var(--red); }
.check-policy-required { min-height: 220px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.check-policy-required h2 { margin: 0 0 8px; }
.check-policy-required p { margin: 0; color: var(--muted); }
@media (max-width: 800px) {
  .policy-option-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .check-policy-required, .custom-check-row { align-items: stretch; flex-direction: column; }
  .row-actions { justify-content: flex-end; }
}
.collection-database-field { grid-column: 1 / -1; margin: 8px 0 0; padding: 14px; display: grid; gap: 10px; border: 1px solid var(--line); border-radius: 2px; }
.collection-database-field legend { padding: 0 6px; color: var(--text); font-size: 13px; font-weight: 800; }
.collection-database-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.collection-database-options label { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface-soft); color: var(--text); font-size: 12px; cursor: pointer; }
.collection-database-options input { width: auto; margin: 0; accent-color: var(--teal); }
.collection-database-options p, .collection-database-field > span { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.collection-policy-form { display: grid; gap: 18px; }
.collection-policy-catalog { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.collection-period { min-width: 0; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; background: var(--surface); }
.collection-period-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 12px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.collection-period-head h3 { margin: 0; font-size: 14px; color: var(--text); }
.collection-period-head span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.collection-item-list { display: grid; }
.collection-item { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 9px; align-items: start; min-height: 58px; padding: 10px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.collection-item:last-child { border-bottom: 0; }
.collection-item.required { cursor: default; background: color-mix(in srgb, var(--surface-soft) 55%, transparent); }
.collection-item input { width: 15px; height: 15px; margin-top: 2px; accent-color: var(--teal); }
.collection-item-copy { min-width: 0; display: grid; gap: 4px; }
.collection-item-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.collection-item-title strong { min-width: 0; color: var(--text); font-size: 12px; line-height: 1.35; }
.collection-item-title em { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 2px; padding: 1px 5px; color: var(--muted); font-size: 10px; font-style: normal; font-weight: 700; }
.collection-item.optional .collection-item-title em { border-color: #8adbd3; color: #087c72; background: #e8fffc; }
.collection-item-copy small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.collection-policy-save {
  grid-column: 1 / -1;
  justify-self: start;
  align-self: end;
  min-height: 36px;
  margin: 0 auto 0 0;
  padding: 8px 16px;
}
@media (max-width: 1100px) { .collection-policy-catalog { grid-template-columns: 1fr; } }
/* Session Tree */
.session-tree-panel { min-height: auto; padding-bottom: 12px; }
.session-tree-head { align-items: center; }
.session-tree-summary { display: flex; gap: 8px; }
.session-tree-summary span { border: 1px solid var(--line); border-radius: 2px; padding: 5px 8px; color: var(--muted); font-size: 11px; }
.session-tree-summary strong { color: var(--text); font-size: 13px; }
.session-tree-table { margin-top: 10px; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; background: var(--surface); }
.session-tree-columns, .session-tree-row { display: grid; grid-template-columns: 110px minmax(170px, 1fr) 120px 100px 145px 150px 120px; gap: 10px; align-items: center; }
.session-tree-columns { padding: 9px 12px 9px 36px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: var(--muted); font-size: 11px; font-weight: 800; }
.session-tree-row { min-height: 40px; padding: 7px 12px 7px calc(12px + var(--tree-depth) * 22px); border-bottom: 1px solid var(--line); font-size: 11px; }
.session-tree-row:last-child { border-bottom: 0; }
.session-tree-row.root { background: var(--surface-soft); }
.session-tree-spid { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.session-tree-spid strong { color: var(--text); font-size: 12px; }
.session-tree-row.root .session-tree-spid strong { color: var(--red); }
.session-tree-spid em { border: 1px solid #f3a4a4; border-radius: 2px; padding: 1px 4px; color: var(--red); font-size: 9px; font-style: normal; }
.tree-branch { color: var(--muted); font-family: Consolas, monospace; }
.session-tree-client { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.session-tree-transaction { display: flex; flex-direction: column; gap: 2px; }
.session-tree-transaction strong { color: var(--text); font-weight: 700; }
.session-tree-client strong, .session-tree-client span, .session-tree-login, .session-tree-command { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.session-tree-client span, .session-tree-login, .session-tree-command, .session-tree-transaction { color: var(--muted); }
.session-tree-wait { color: var(--teal-dark); font-family: Consolas, monospace; font-weight: 700; }
.session-tree-time { text-align: right; color: var(--muted); font-weight: 700; }
.session-tree-resource, .session-tree-db { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) {
  .session-tree-table { overflow-x: auto; }
  .session-tree-columns, .session-tree-row { min-width: 820px; }
  .session-tree-head { align-items: flex-start; flex-direction: column; }
}
.session-tree-locked { min-height: 220px; display: flex; align-items: center; justify-content: center; text-align: center; }
.session-tree-locked strong { color: var(--text); font-size: 15px; }
.session-tree-locked p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
/* Check Center summary */
.check-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.check-summary-period { margin-bottom: 0; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; background: var(--surface); }
.check-summary-period-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-soft); }
.check-summary-period-head div { display: flex; align-items: baseline; gap: 10px; }
.check-summary-period-head span { color: var(--text); font-size: 14px; font-weight: 800; }
.check-summary-period-head small { color: var(--muted); font-size: 11px; }
.check-summary-period-head button { border: 1px solid var(--line); border-radius: 2px; background: var(--surface); color: var(--text); padding: 5px 9px; font-size: 11px; font-weight: 700; cursor: pointer; }
.check-summary-list { display: grid; }
.check-summary-row { display: grid; grid-template-columns: 10px minmax(0, 1fr) 58px; gap: 8px 10px; align-items: center; min-height: 104px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.check-summary-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.check-summary-row.healthy .check-summary-dot { background: var(--green); }
.check-summary-row.warn .check-summary-dot { background: var(--amber); }
.check-summary-row.critical .check-summary-dot { background: var(--red); }
.check-summary-copy { min-width: 0; }
.check-summary-copy strong { color: var(--text); font-size: 13px; }
.check-summary-copy p { margin: 4px 0 0; color: var(--muted); font-size: 11px; line-height: 1.4; }
.check-summary-result { grid-column: 2 / -1; color: var(--text); font-size: 11px; line-height: 1.45; }
.check-summary-score { grid-column: 2 / -1; display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; text-align: left; }
.check-summary-score strong { color: var(--text); }
.check-summary-row.warn .check-summary-score span:first-child strong { color: var(--amber); }
.check-summary-row.critical .check-summary-score span:first-child strong { color: var(--red); }
.check-summary-period-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 7px 14px; background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.check-summary-period-foot strong.healthy { color: var(--green); }
.check-summary-period-foot strong.warn { color: var(--amber); }
.check-summary-period-foot strong.critical { color: var(--red); }
@media (max-width: 900px) {
  .check-summary-grid { grid-template-columns: 1fr; }
  .check-summary-period-head div { align-items: flex-start; flex-direction: column; gap: 2px; }
}
/* Check Center detail tabs */
.check-detail-toolbar { margin-bottom: 14px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface-soft); }
.check-detail-toolbar .checks-history-nav { background: var(--surface); border-color: var(--line); box-shadow: none; }
.check-snapshot-badge { border: 1px solid var(--line); border-radius: 2px; background: var(--surface); color: var(--muted); padding: 5px 9px; font-size: 10px; font-weight: 700; }
.check-detail-content { display: grid; gap: 14px; }
.check-detail-content .period-summary { gap: 14px; margin-bottom: 0; }
.check-detail-content .period-summary article { border-color: var(--line); background: var(--surface); padding: 12px 14px; }
.check-detail-content .period-summary span { color: var(--muted); }
.check-detail-content .period-summary strong { color: var(--text); }
.check-detail-content .daily-check-layout { gap: 14px; }
.check-detail-content .daily-check-panel { padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,0.03); }
.check-detail-content .daily-check-panel .panel-head { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--teal); background: var(--surface); }
.check-detail-content .daily-check-panel .panel-head > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.check-detail-content .daily-check-panel .panel-head h2 { color: var(--text); font-size: 13px; display: flex; align-items: center; }
.check-detail-content .daily-check-panel .panel-head h2::before { content: "❖"; color: var(--teal); margin-right: 6px; font-size: 13px; }
.check-detail-content .daily-check-panel .panel-head p { display: inline-flex; margin: 0; color: var(--muted); font-size: 10px; font-weight: 700; white-space: nowrap; }
.check-detail-content .daily-check-table-wrap { max-height: 300px; }
.check-detail-content .daily-check-table th { background: var(--surface-soft); color: var(--muted); }
.check-detail-content .daily-check-table th, .check-detail-content .daily-check-table td { padding: 9px 14px; border-bottom-color: var(--line); }
@media (max-width: 700px) { .check-detail-toolbar { align-items: stretch; flex-direction: column; gap: 10px; } .check-detail-toolbar .checks-history-nav { justify-content: space-between; } .check-snapshot-badge { text-align: center; } }
/* AI Reports - A4 and email-friendly document */
.ai-report-controls { margin-bottom: 12px; padding: 4px 0 10px; border-bottom: 1px solid var(--line); }
.ai-report-controls .panel-head { margin: 0; flex-wrap: wrap; gap: 10px; }
.ai-report-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#reportContainer { padding: 24px; background: var(--surface-soft); border: 1px solid var(--line); }
.ai-report-sheet { display: grid; width: 210mm; max-width: 100%; margin: 0 auto; gap: 12mm; color: #111110; font-family: 'Noto Sans KR', Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; counter-reset: report-page; }
.ai-report-page { position: relative; width: 210mm; max-width: 100%; min-height: 297mm; padding: 16mm 15mm 18mm; background: #fff; box-shadow: 0 8px 30px rgba(15, 23, 42, 0.10); counter-increment: report-page; break-after: page; page-break-after: always; }
.ai-report-page:last-child { break-after: auto; page-break-after: auto; }
.ai-report-page::after { position: absolute; right: 15mm; bottom: 9mm; color: #9c9a92; font-size: 9px; content: counter(report-page); }
.ai-report-doc-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; padding-bottom: 14px; border-bottom: 2px solid #0c1524; }
.ai-report-brand { color: #0c1524; font-size: 18px; font-weight: 800; letter-spacing: -0.4px; }
.ai-report-brand span { color: var(--green); }
.ai-report-doc-header > div:last-child { display: grid; gap: 2px; text-align: right; }
.ai-report-doc-header strong { color: #111110; font-size: 13px; }
.ai-report-doc-header small { color: #9c9a92; font-size: 10px; }
.ai-report-sheet .panel { box-shadow: none !important; break-inside: avoid; }
.ai-report-sheet .panel:not(.ai-report-summary) { margin-bottom: 26px !important; padding: 0 0 24px !important; border: 0 !important; border-bottom: 0 !important; border-radius: 0 !important; background: #fff !important; }
.ai-report-sheet .panel:not(.ai-report-summary) h3 { padding-bottom: 7px; border-bottom: 1px solid #e5e5e2; color: #0c1524 !important; font-size: 12px !important; letter-spacing: 0.5px; }
.ai-report-summary { border-radius: 0 6px 6px 0 !important; box-shadow: none !important; }
.ai-report-summary-icon { display: none; }
.ai-report-summary-layout { display: flex; align-items: flex-start; gap: 24px; }
.ai-report-summary-content { display: flex; flex: 1; min-width: 0; align-items: center; gap: 16px; }
.ai-report-summary-copy { min-width: 0; }
.ai-report-summary-text { max-width: 620px; margin: 0; color: #0f172a; font-size: 14px; font-weight: 700; line-height: 1.65; word-break: keep-all; overflow-wrap: break-word; }
.ai-report-summary-date { min-width: 120px; margin-left: auto; flex-shrink: 0; text-align: right; }
.ai-report-doc-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 12px; border-top: 1px solid #e5e5e2; color: #9c9a92; font-size: 9px; }
@media screen and (max-width: 900px) {
  #reportContainer { padding: 10px; }
  .ai-report-sheet { gap: 10px; }
  .ai-report-page {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 0;
    padding: 24px 16px;
    box-sizing: border-box !important;
    overflow-x: hidden;
  }
  .ai-report-page::after { display: none; }
  
  /* 테이블 넘침 방지 및 모바일 내부 스크롤 허용 */
  .ai-report-sheet table,
  .ai-report-sheet .data-table {
    display: table !important;
    width: 100% !important;
    max-width: 100% !important;
    white-space: nowrap;
  }
  
  /* 텍스트 줄바꿈 강제 보장 */
  .ai-report-sheet p,
  .ai-report-sheet span,
  .ai-report-sheet div {
    word-break: break-all;
    overflow-wrap: break-word;
  }
}
@media screen and (max-width: 600px) { .ai-report-actions, .ai-report-actions select, .ai-report-actions button { width: 100%; } .ai-report-doc-header, .ai-report-doc-footer { align-items: flex-start; flex-direction: column; } .ai-report-doc-header > div:last-child { text-align: left; } }
@media screen and (max-width: 600px) { .ai-report-summary-layout { flex-direction: column; gap: 12px; } .ai-report-summary-date { min-width: 0; margin-left: 0; text-align: left; } }
@media print {
  @page { size: A4; margin: 12mm 15mm; }
  body { background: #fff !important; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sidebar, .mobile-header, .mobile-submenu-bar, .mobile-bottom-nav, .topbar, #alertBanner, .ai-report-tabs, .ai-report-controls { display: none !important; }
  .dashboard-shell:not(.hidden) { display: block !important; margin: 0 !important; padding: 0 !important; }
  .main-content, #pageRoot, .ai-report-workspace { display: block !important; margin: 0 !important; padding: 0 !important; }
  #reportContainer { padding: 0; border: 0; background: #fff; }
  .ai-report-sheet { display: block; width: auto; max-width: none; margin: 0; }
  .ai-report-page { width: auto; max-width: none; min-height: 0; margin: 0; padding: 0; box-shadow: none; }
  .ai-report-page::after { display: none; }
}
/* AI Reports split workspace */
.ai-report-workspace { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 14px; align-items: start; }
.ai-report-workspace .ai-report-controls { position: sticky; top: 12px; margin: 0; padding: 12px; border: 0; border-radius: 0; background: transparent; }
.ai-report-workspace .ai-report-controls .panel-head { display: grid; gap: 10px; min-height: 0; margin: 0; padding: 0; }
.ai-report-workspace .ai-report-controls .panel-head > div:first-child { display: grid; gap: 3px; }
.ai-report-workspace .ai-report-controls h2 { margin: 0; color: var(--text); font-size: 13px; line-height: 1.3; }
.ai-report-workspace .ai-report-controls p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.ai-report-workspace .ai-report-actions { display: grid; gap: 7px; margin: 0; }
.ai-report-workspace .ai-report-btn-group { display: flex; gap: 7px; width: 100%; flex-wrap: wrap; }
.ai-report-workspace .schedule-control { display: grid; align-items: stretch; gap: 4px; white-space: normal; }
.ai-report-workspace .schedule-control select { width: 100%; min-width: 0; }
.ai-report-workspace .checks-history-nav { width: 100%; gap: 2px; padding: 2px; box-shadow: none; }
.ai-report-workspace .checks-nav-date { flex: 1; min-width: 0; font-size: 11px; }
.ai-report-workspace .checks-nav-btn { padding: 4px 6px; }
.ai-report-workspace .collection-policy-save { width: 100%; min-height: 30px; padding: 6px 10px; font-size: 11px; }
.ai-report-workspace #reportContainer { min-width: 0; padding: 16px; }
@media screen and (max-width: 900px) { .ai-report-workspace { grid-template-columns: 1fr; } .ai-report-workspace .ai-report-controls { position: static; } .ai-report-workspace .ai-report-controls .panel-head { grid-template-columns: minmax(0, 1fr) auto; align-items: center; } .ai-report-workspace .ai-report-actions { grid-template-columns: minmax(190px, 1fr) auto; align-items: center; } .ai-report-workspace .collection-policy-save { width: auto; } }
@media screen and (max-width: 600px) { .ai-report-workspace .ai-report-controls .panel-head, .ai-report-workspace .ai-report-actions { grid-template-columns: 1fr; } .ai-report-workspace .collection-policy-save { width: 100%; } .ai-report-workspace .ai-report-btn-group { display: flex !important; flex-direction: row; flex-wrap: nowrap; gap: 4px; width: 100%; } .ai-report-workspace .ai-report-btn-group button { flex: 1 1 0; min-width: 0; padding: 6px 0 !important; font-size: 11px !important; white-space: nowrap; letter-spacing: -0.5px; overflow: hidden; text-overflow: ellipsis; } }
/* AI report document rows */
.ai-report-section { margin-bottom: 28px; break-inside: avoid; }
.ai-report-section > h3 { margin: 0 0 12px; padding-bottom: 7px; border-bottom: 1px solid #e5e5e2; color: #0c1524; font-size: 12px; letter-spacing: 0.4px; }
.ai-metric-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.ai-metric-table td { padding: 7px 4px; border-bottom: 1px solid #e5e5e2; font-size: 11px; }
.ai-metric-table tr:last-child td { border-bottom: 0; }
.ai-metric-table .ai-event-repeat-col { width: 52px; min-width: 52px; white-space: nowrap; text-align: center; }
.ai-metric-label { width: 31%; color: #555552; }
.ai-metric-value { width: 18%; color: #111110; font-weight: 700; }
.ai-metric-note { color: #9c9a92; text-align: right; }
.ai-metric-dot { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: #9c9a92; }
.ai-metric-dot.healthy { background: #1d9e75; }
.ai-metric-dot.warning { background: #d4840a; }
.ai-metric-dot.critical { background: #c0392b; }
.ai-metric-value.healthy { color: #1d9e75; }
.ai-metric-value.warning { color: #d4840a; }
.ai-metric-value.critical { color: #c0392b; }
.ai-finding-callout { margin-bottom: 14px; padding: 10px 14px; border-left: 3px solid #d4840a; border-radius: 0 6px 6px 0; background: #fff3dc; color: #7a4f00; }
.ai-finding-callout strong { font-size: 12px; }
.ai-finding-callout p { margin: 3px 0 0; font-size: 10px; line-height: 1.6; }
/* Monthly Report — document layout */
.mr-doc-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 2.5px solid #0c1524; }
.mr-doc-brand { display: flex; flex-direction: column; gap: 2px; }
.mr-doc-brand-name { color: #0c1524; font-size: 20px; font-weight: 900; letter-spacing: -0.5px; line-height: 1; }
.mr-doc-brand-name span { color: var(--green); }
.mr-doc-brand-sub { color: #64748b; font-size: 10px; font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; margin-top: 4px; }
.mr-doc-meta { text-align: right; display: grid; gap: 2px; }
.mr-doc-meta-title { font-size: 15px; font-weight: 800; color: #0c1524; }
.mr-doc-meta-period { font-size: 11px; color: #64748b; }
.mr-doc-meta-gen { font-size: 9px; color: #9c9a92; }
.mr-info-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; font-size: 11px; }
.mr-info-table td { padding: 5px 10px; border: 1px solid #dde1e7; color: #334155; }
.mr-info-table td:first-child { background: #f1f5f9; font-weight: 700; color: #0c1524; width: 22%; }
.mr-exec-box { margin-bottom: 22px; padding: 14px 18px; border: 1px solid #dde1e7; border-left: 4px solid #0c1524; background: #f8fafc; break-inside: avoid; }
.mr-exec-box.critical { border-left-color: #c0392b; background: #fff5f5; }
.mr-exec-box.warning  { border-left-color: #d4840a; background: #fffbf2; }
.mr-exec-box.healthy  { border-left-color: #1d9e75; background: #f0fdf8; }
.mr-exec-label { font-size: 9px; font-weight: 800; letter-spacing: 0.8px; text-transform: uppercase; color: #64748b; margin-bottom: 6px; }
.mr-exec-status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800; color: #0c1524; margin-bottom: 8px; }
.mr-exec-text { font-size: 12.5px; line-height: 1.75; color: #334155; word-break: keep-all; overflow-wrap: break-word; margin: 0; }
.mr-section { margin-bottom: 26px; break-inside: avoid; page-break-inside: avoid; }
.mr-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; padding-bottom: 7px; border-bottom: 1.5px solid #0c1524; }
.mr-section-num { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; background: #0c1524; color: #fff; font-size: 9px; font-weight: 800; border-radius: 3px; flex-shrink: 0; }
.mr-section-title { font-size: 12px; font-weight: 800; color: #0c1524; letter-spacing: 0.3px; }
.mr-subsection { margin-bottom: 18px; break-inside: avoid; }
.mr-subsection-head { font-size: 10.5px; font-weight: 800; color: #334155; margin: 0 0 8px; padding-bottom: 4px; border-bottom: 1px solid #e5e5e2; letter-spacing: 0.2px; }
.mr-kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid #dde1e7; margin-bottom: 16px; }
.mr-kpi-cell { padding: 10px 12px; border-right: 1px solid #dde1e7; }
.mr-kpi-cell:last-child { border-right: 0; }
.mr-kpi-label { font-size: 9px; font-weight: 700; color: #64748b; letter-spacing: 0.4px; text-transform: uppercase; margin-bottom: 4px; }
.mr-kpi-value { font-size: 17px; font-weight: 800; color: #0c1524; line-height: 1; }
.mr-kpi-value.healthy { color: #1d9e75; }
.mr-kpi-value.warning { color: #d4840a; }
.mr-kpi-value.critical { color: #c0392b; }
.mr-kpi-note { font-size: 9px; color: #9c9a92; margin-top: 3px; }
.mr-matrix { width: 100%; border-collapse: collapse; font-size: 11px; }
.mr-matrix th { padding: 5px 8px; background: #f1f5f9; border: 1px solid #dde1e7; font-weight: 700; color: #334155; text-align: left; font-size: 10px; }
.mr-matrix td { padding: 6px 8px; border: 1px solid #e5e5e2; color: #334155; vertical-align: top; }
.mr-matrix tr:nth-child(even) td { background: #f9fafb; }
.mr-badge { display: inline-block; padding: 1px 6px; border-radius: 3px; font-size: 9px; font-weight: 800; letter-spacing: 0.3px; }
.mr-badge.critical { background: rgba(192,57,43,0.1); color: #c0392b; border: 1px solid rgba(192,57,43,0.25); }
.mr-badge.warning  { background: rgba(212,132,10,0.1); color: #d4840a; border: 1px solid rgba(212,132,10,0.25); }
.mr-badge.healthy  { background: rgba(29,158,117,0.1); color: #1d9e75; border: 1px solid rgba(29,158,117,0.25); }
.mr-badge.normal   { background: rgba(100,116,139,0.1); color: #475569; border: 1px solid rgba(100,116,139,0.2); }
.mr-findings-list { display: flex; flex-direction: column; gap: 6px; }
.mr-finding-item { display: flex; align-items: flex-start; gap: 8px; padding: 8px 12px; border: 1px solid #e5e5e2; border-left-width: 3px; }
.mr-finding-item.critical { border-left-color: #c0392b; background: #fff5f5; }
.mr-finding-item.warning  { border-left-color: #d4840a; background: #fffbf2; }
.mr-finding-item.healthy  { border-left-color: #1d9e75; background: #f0fdf8; }
.mr-finding-title { font-size: 12px; font-weight: 700; color: #0c1524; }
.mr-finding-val   { font-size: 10px; color: #64748b; margin-top: 2px; }
.mr-actions-list { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.mr-actions-list li { font-size: 12px; color: #334155; line-height: 1.65; }
.mr-positives-list { padding-left: 20px; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.mr-positives-list li { font-size: 12px; color: #1d9e75; line-height: 1.65; }
.mr-data-note { padding: 8px 12px; background: #f8fafc; border: 1px solid #e5e5e2; font-size: 10px; color: #64748b; margin-bottom: 16px; }
.mr-doc-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 30px; padding-top: 10px; border-top: 1px solid #dde1e7; color: #9c9a92; font-size: 9px; }
.mr-page-break { break-before: page; page-break-before: always; }
@media screen and (max-width: 700px) { .mr-kpi-grid { grid-template-columns: repeat(2, 1fr); } .mr-kpi-cell:nth-child(2) { border-right: 0; } }
@media print {
  .mr-section { break-inside: avoid; page-break-inside: avoid; }
  .mr-matrix { font-size: 10px; }
  .mr-matrix th, .mr-matrix td { padding: 4px 6px; }
  .mr-kpi-grid { break-inside: avoid; }
  .mr-exec-box { break-inside: avoid; }
}
.ai-error-caption { margin-bottom: 8px; color: #9c9a92; font-size: 10px; }
.ai-error-list { display: grid; gap: 7px; }
.ai-error-row { display: grid; grid-template-columns: 58px minmax(0, 1fr) 28px; align-items: center; gap: 8px; color: #555552; font-size: 10px; }
.ai-error-row > div { height: 5px; overflow: hidden; border-radius: 3px; background: #e5e5e2; }
.ai-error-row i { display: block; height: 100%; border-radius: 3px; background: #d4840a; }
.ai-error-row strong { color: #111110; text-align: right; }
@media screen and (max-width: 600px) { .ai-metric-table { table-layout: auto; } .ai-metric-note { display: none; } .ai-metric-label { width: 65%; } .ai-metric-value { width: 35%; text-align: right; } }
/* Check Center compact history filter */
.check-detail-toolbar { padding: 0; border: 0; border-radius: 0; background: transparent; }
.check-detail-toolbar .checks-history-nav { gap: 0; padding: 0; overflow: hidden; border-color: var(--line); }
.check-detail-toolbar .checks-nav-btn { align-self: stretch; width: 34px; padding: 5px 8px; border-radius: 0; color: var(--green); background: var(--surface-soft); }
.check-detail-toolbar .checks-nav-btn:first-child { border-right: 1px solid var(--line); }
.check-detail-toolbar .checks-nav-btn:last-child { border-left: 1px solid var(--line); }
.check-detail-toolbar .checks-nav-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--green) 10%, var(--surface)); color: var(--green); }
.check-detail-toolbar .checks-nav-btn:disabled { background: var(--surface-soft); color: var(--line); }
.check-detail-toolbar .checks-nav-date { padding: 5px 12px; background: var(--surface); }
/* Shared history toggle appearance for AI Reports */
.ai-report-workspace .checks-history-nav { gap: 0; padding: 0; overflow: hidden; border-color: var(--line); }
.ai-report-workspace .checks-nav-btn { align-self: stretch; width: 34px; padding: 5px 8px; border-radius: 0; color: var(--green); background: var(--surface-soft); }
.ai-report-workspace .checks-nav-btn:first-child { border-right: 1px solid var(--line); }
.ai-report-workspace .checks-nav-btn:last-child { border-left: 1px solid var(--line); }
.ai-report-workspace .checks-nav-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--green) 10%, var(--surface)); color: var(--green); }
.ai-report-workspace .checks-nav-btn:disabled { background: var(--surface-soft); color: var(--line); }
.ai-report-workspace .checks-nav-date { padding: 5px 12px; background: var(--surface); }
/* Shared history toggle appearance for Health Trend */
.health-trend-toolbar { justify-content: flex-start; gap: 12px; margin-bottom: 16px; }
.health-trend-toolbar > span:last-child { margin-left: auto; }
.health-mode-toggle { display: inline-flex; overflow: hidden; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); }
.health-mode-toggle button { min-width: 58px; height: 32px; padding: 0 12px; border: 0; border-right: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; }
.health-mode-toggle button:last-child { border-right: 0; }
.health-mode-toggle button.active { background: color-mix(in srgb, var(--green) 10%, var(--surface)); color: var(--green); }
.health-daily-chart-panel { margin-bottom: 20px; }
.health-trend-toolbar .checks-history-nav { gap: 0; padding: 0; overflow: hidden; border-color: var(--line); }
.health-trend-toolbar .checks-nav-btn { align-self: stretch; width: 34px; padding: 5px 8px; border-radius: 0; color: var(--green); background: var(--surface-soft); }
.health-trend-toolbar .checks-nav-btn:first-child { border-right: 1px solid var(--line); }
.health-trend-toolbar .checks-nav-btn:last-child { border-left: 1px solid var(--line); }
.health-trend-toolbar .checks-nav-btn:hover:not(:disabled) { background: color-mix(in srgb, var(--green) 10%, var(--surface)); color: var(--green); }
.health-trend-toolbar .checks-nav-btn:disabled { background: var(--surface-soft); color: var(--line); }
.health-trend-toolbar .checks-nav-date { padding: 5px 12px; background: var(--surface); }
.health-trend-data-table { border-radius: 2px; font-family: inherit; }
/* Risk Events grouped timeline */
.risk-overview-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; }
.risk-overview-strip > div { display: flex; align-items: baseline; justify-content: center; gap: 9px; min-width: 0; padding: 2px 14px; border-right: 1px solid var(--line); }
.risk-overview-strip > div:last-child { border-right: 0; }
.risk-overview-strip span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.risk-overview-strip strong { color: var(--text); font-size: 19px; line-height: 1; }
.risk-overview-strip > div:nth-child(1) strong { color: var(--red); }
.risk-overview-strip > div:nth-child(2) strong { color: var(--amber); }
.risk-overview-strip > div:nth-child(3) strong { color: var(--green); }
.risk-filter-groups { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.risk-filter-groups .filter-btn-group + .filter-btn-group { padding-left: 10px; border-left: 1px solid var(--line); }
.risk-group-heading { grid-column: 1 / -1; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 4px; padding: 7px 2px; border-bottom: 1px solid var(--line); }
.risk-group-heading.resolved { margin-top: 12px; }
.risk-group-heading > div { display: flex; align-items: baseline; gap: 7px; }
.risk-group-heading strong { color: var(--text); font-size: 14px; }
.risk-group-heading span { color: var(--muted); font-size: 11px; font-weight: 700; }
.risk-group-heading small { color: var(--muted); font-size: 10px; }
@media (max-width: 800px) { .risk-overview-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .risk-overview-strip > div:nth-child(2) { border-right: 0; } .risk-overview-strip > div:nth-child(-n+2) { margin-bottom: 8px; } .risk-filters-bar { align-items: stretch; flex-direction: column; } .risk-search-box { width: 100%; } }
@media (max-width: 520px) { .risk-overview-strip { grid-template-columns: 1fr; } .risk-overview-strip > div { justify-content: space-between; border-right: 0; } .risk-group-heading { align-items: flex-start; flex-direction: column; gap: 2px; } }
/* Risk event compact list rows */
.risk-events-list, .risk-events-list.two-cols { display: grid; grid-template-columns: 1fr; gap: 0; }
.risk-event-card { position: relative; display: grid; grid-template-columns: minmax(230px, 0.9fr) minmax(280px, 1.4fr) minmax(180px, auto); grid-template-areas: "header body footer"; align-items: center; gap: 18px; min-height: 0; padding: 13px 8px 13px 20px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
.risk-event-card::before { content: ""; position: absolute; left: 3px; top: 23px; width: 7px; height: 7px; border-radius: 50%; background: var(--muted); transform: translateY(-50%); }
.risk-event-card.critical::before { background: var(--red); }
.risk-event-card.warning::before { background: var(--amber); }
.risk-event-card.caution::before { background: var(--blue); }
.risk-event-card.resolved::before { background: var(--green); }
.risk-event-card .risk-card-header { grid-area: header; align-items: center; gap: 8px; }
.risk-event-card .risk-card-title-area { min-width: 0; }
.risk-event-card .risk-card-title-area h3 { font-size: 14px; line-height: 1.4; }
.risk-event-card .risk-card-meta { margin-top: 3px; font-size: 12px; line-height: 1.5; white-space: normal; }
.risk-event-card .risk-card-body { grid-area: body; font-size: 13px; line-height: 1.55; }
.risk-event-card .risk-card-footer { grid-area: footer; justify-content: flex-end; gap: 8px; margin: 0; padding: 0; border-top: 0; }
.risk-event-card .risk-tags { justify-content: flex-end; }
.risk-event-card .risk-tag { padding: 2px 7px; border: 0; background: var(--surface-soft); font-size: 11px; }
.risk-event-card .risk-duration { font-size: 12px; white-space: nowrap; }
.risk-event-card .severity-badge { padding: 2px 6px; font-size: 10px; }
@media (max-width: 950px) { .risk-event-card { grid-template-columns: minmax(220px, 0.9fr) minmax(0, 1.2fr); grid-template-areas: "header body" "header footer"; gap: 6px 16px; } .risk-event-card .risk-card-footer { justify-content: space-between; } }
@media (max-width: 650px) { .risk-event-card { grid-template-columns: 1fr; grid-template-areas: "header" "body" "footer"; gap: 8px; padding-left: 18px; } .risk-event-card .risk-card-footer { justify-content: space-between; } .risk-event-card .risk-tags { justify-content: flex-start; } }
/* Risk Events mobile readability */
@media (max-width: 650px) {
  .risk-overview-strip span { font-size: 12px; }
  .risk-overview-strip strong { font-size: 21px; }
  .risk-group-heading strong { font-size: 15px; }
  .risk-group-heading span, .risk-group-heading small { font-size: 11px; }
  .risk-event-card .risk-card-title-area h3 { font-size: 14px; line-height: 1.4; }
  .risk-event-card .risk-card-meta { font-size: 12px; line-height: 1.5; }
  .risk-event-card .risk-card-body { font-size: 13px; line-height: 1.55; }
  .risk-event-card .risk-tag { font-size: 11px; }
  .risk-event-card .risk-duration { font-size: 12px; }
  .risk-event-card .severity-badge { font-size: 10px; }
}
/* Risk overview visual emphasis */
.risk-overview-strip { position: relative; padding: 12px 0 13px; }
.risk-overview-strip::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: linear-gradient(90deg, var(--red) 0 25%, var(--amber) 25% 50%, var(--green) 50% 75%, var(--blue) 75% 100%); opacity: 0.75; }
.risk-overview-strip > div { min-height: 38px; }
.risk-overview-strip span { display: inline-flex; align-items: center; gap: 6px; }
.risk-overview-strip span::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--muted); }
.risk-overview-strip > div:nth-child(1) span::before { background: var(--red); }
.risk-overview-strip > div:nth-child(2) span::before { background: var(--amber); }
.risk-overview-strip > div:nth-child(3) span::before { background: var(--green); }
.risk-overview-strip > div:nth-child(4) span::before { background: var(--blue); }
.risk-overview-strip strong { font-size: 23px; letter-spacing: -0.5px; }
@media (max-width: 650px) { .risk-overview-strip strong { font-size: 22px; } .risk-overview-strip > div { min-height: 34px; } }
/* Risk Events compact rectangular filters */
.risk-events-layout .risk-overview-strip { margin-bottom: 10px; }
.risk-events-layout .risk-filters-bar { margin-top: 0; padding-top: 0; }
.risk-events-layout .risk-filter-groups .filter-btn { min-height: 32px; padding: 6px 12px; border-radius: 2px; font-size: 12px; line-height: 1; }
.risk-events-layout .risk-filter-groups .filter-btn-group { gap: 4px; }
/* Risk Events joined filter segments */
.risk-events-layout .risk-filter-groups .filter-btn-group { gap: 0; }
.risk-events-layout .risk-filter-groups .filter-btn + .filter-btn { margin-left: -1px; }
.risk-events-layout .risk-filter-groups .filter-btn { border-radius: 0; }
.risk-events-layout .risk-filter-groups .filter-btn:first-child { border-radius: 2px 0 0 2px; }
.risk-events-layout .risk-filter-groups .filter-btn:last-child { border-radius: 0 2px 2px 0; }
.risk-events-layout .risk-filter-groups .filter-btn.active { position: relative; z-index: 1; }
/* Risk Events mobile filter row */
@media (max-width: 650px) {
  .risk-events-layout .risk-filter-groups { flex-wrap: nowrap; gap: 6px; width: 100%; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .risk-events-layout .risk-filter-groups::-webkit-scrollbar { display: none; }
  .risk-events-layout .risk-filter-groups .filter-btn-group { flex: 0 0 auto; }
  .risk-events-layout .risk-filter-groups .filter-btn-group + .filter-btn-group { padding-left: 0; border-left: 0; }
  .risk-events-layout .risk-filter-groups .filter-btn { min-height: 30px; padding: 5px 9px; font-size: 11px; white-space: nowrap; }
}
/* Session Tree SPID lookup interaction */
.session-tree-row[data-session-id] { cursor: pointer; transition: background 0.15s ease; }
.session-tree-row[data-session-id]:hover { background: color-mix(in srgb, var(--green) 5%, var(--surface)); }
.session-tree-row[data-session-id]:focus-visible { position: relative; z-index: 1; outline: 2px solid var(--green); outline-offset: -2px; }
/* Session SPID direct lookup */
.session-lookup-toolbar { display: flex; justify-content: flex-end; margin: 10px 0 0; }
.session-lookup-toolbar .collection-policy-save { padding: 7px 11px; font-size: 11px; }
.spid-input-modal { max-width: 420px; }
.spid-input-modal .modal-header button { border: 0; background: transparent; color: var(--muted); font-size: 20px; cursor: pointer; }
.spid-input-modal .modal-body { display: grid; gap: 8px; }
.spid-input-modal .modal-body label { color: var(--text); font-size: 12px; font-weight: 700; }
.spid-input-modal .modal-body input { width: 100%; box-sizing: border-box; padding: 9px 10px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); color: var(--text); font: inherit; }
.spid-input-modal .modal-body p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.spid-input-modal .modal-body small { min-height: 16px; color: var(--red); font-size: 10px; }
.spid-input-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface-soft); }
.spid-input-actions > button:first-child { padding: 7px 12px; border: 1px solid var(--line); border-radius: 2px; background: var(--surface); color: var(--muted); cursor: pointer; }
/* Dashboard session status matrix */
.session-status-matrix { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; min-height: 120px; }
.session-status-cell { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: 12px 16px; background: transparent; }
.session-status-cell:nth-child(1), .session-status-cell:nth-child(3) { border-right: 1px solid var(--line); }
.session-status-cell:nth-child(1), .session-status-cell:nth-child(2) { border-bottom: 1px solid var(--line); }
.session-status-cell > span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; vertical-align: 1px; background: var(--muted); }
.session-status-cell.sleeping > span::before { background: var(--teal); }
.session-status-cell.running > span::before { background: var(--blue); }
.session-status-cell.other > span::before { background: var(--violet); }
.session-status-cell.blocking > span::before { background: var(--red); }
.session-status-cell.deadlock > span::before { background: var(--violet); }
.session-status-cell > strong { margin-top: 5px !important; font-size: 24px !important; }
@media (max-width: 700px) { .session-status-matrix { min-height: 108px; } .session-status-cell { padding: 10px 12px; } .session-status-cell > strong { font-size: 21px !important; } }

/* Release history filter padding optimization */
.release-filter-body { padding: 0 !important; }
.release-filter-body .filter-row { margin: 0 !important; padding: 10px 16px !important; }

/* Risk Heatmap Calendar */
.heatmap-table {
  width: 100%;
  min-width: 750px;
  border-collapse: separate;
  border-spacing: 4px;
  margin-top: 16px;
  table-layout: fixed;
}
.heatmap-table th {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  font-weight: 500;
  padding: 4px;
}
.heatmap-table th:first-child {
  width: 90px;
  text-align: right;
  padding-right: 12px;
}
.heatmap-date-cell {
  font-size: 12px;
  color: var(--muted);
  text-align: right;
  padding-right: 12px;
  white-space: nowrap;
}
.heatmap-cell {
  padding: 0;
  height: 28px;
  cursor: pointer;
  border-radius: 4px;
}
.heatmap-cell-inner {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  transition: transform 0.1s ease, filter 0.1s ease;
}
.heatmap-cell:hover .heatmap-cell-inner {
  transform: scale(1.15);
  filter: brightness(1.1);
  z-index: 10;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Mobile Heatmap Optimization (No scroll, compact mode) */
@media (max-width: 700px) {
  .heatmap-table {
    min-width: 100% !important;
    border-spacing: 2px;
  }
  .heatmap-table th:first-child {
    width: 65px !important;
    padding-right: 4px;
  }
  .heatmap-date-cell {
    font-size: 10px;
    padding-right: 4px;
    letter-spacing: -0.5px;
  }
  .heatmap-table th .hour-label {
    display: none;
  }
  .heatmap-table th:nth-child(6n + 2) .hour-label {
    display: block;
    font-size: 9px;
  }
  .heatmap-cell {
    height: 18px !important;
  }
  .heatmap-cell-inner {
    border-radius: 2px !important;
  }
  .heatmap-cell-inner .cell-count {
    display: none;
  }
}
