:root {
  --ink: #172033;
  --muted: #68738a;
  --line: #e4e9f1;
  --canvas: #f4f6fa;
  --card: #ffffff;
  --navy: #111a2e;
  --navy-soft: #1b2741;
  --blue: #3563e9;
  --blue-dark: #254dc6;
  --green: #20a66a;
  --green-bg: #eaf8f1;
  --yellow: #d18b13;
  --yellow-bg: #fff6df;
  --red: #dc4c58;
  --red-bg: #fff0f1;
  --unknown: #8791a5;
  --sidebar-width: 252px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
a { color: var(--blue); }
.btn { border-radius: 9px; font-weight: 650; }
.btn-primary { background: var(--blue); border-color: var(--blue); box-shadow: 0 5px 12px rgba(53, 99, 233, .18); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.form-control, .form-select { border-color: #d9e0ea; border-radius: 9px; min-height: 46px; color: var(--ink); }
.form-control:focus, .form-select:focus { border-color: #89a4f4; box-shadow: 0 0 0 .22rem rgba(53, 99, 233, .12); }
.form-label { font-weight: 650; font-size: .88rem; }
.form-text { color: #7b8598; }

.app-sidebar { width: var(--sidebar-width) !important; background: var(--navy); color: #d9e2f3; border: 0; position: fixed; inset: 0 auto 0 0; z-index: 1035; }
.sidebar-brand { height: 92px; align-items: center; gap: 12px; padding: 0 25px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-brand strong { display: block; color: #fff; letter-spacing: -.01em; }
.sidebar-brand small { display: block; color: #8190ad; margin-top: 2px; font-size: .72rem; text-transform: uppercase; letter-spacing: .09em; }
.brand, .sidebar-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); font-weight: 750; }
.brand-mark { width: 36px; height: 36px; display: inline-grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #4a78ff, #2b55d1); color: #fff; font-size: .72rem; letter-spacing: .02em; box-shadow: 0 7px 18px rgba(53,99,233,.24); }
.sidebar-nav { padding: 22px 13px; }
.nav-item-link { color: #8f9db7; display: flex; gap: 12px; align-items: center; padding: 11px 13px; border-radius: 9px; margin: 3px 0; text-decoration: none; font-size: .91rem; font-weight: 600; }
.nav-item-link:hover { color: #fff; background: rgba(255,255,255,.05); }
.nav-item-link.active { color: #fff; background: var(--navy-soft); box-shadow: inset 3px 0 0 #5c83ff; }
.nav-symbol { width: 22px; text-align: center; font-size: 1.1rem; }
.sidebar-footer { padding: 18px; border-top: 1px solid rgba(255,255,255,.07); }
.scheduler-state { font-size: .73rem; color: #8795af; margin-bottom: 16px; display: flex; align-items: center; gap: 7px; }
.user-row { display: flex; align-items: center; gap: 9px; }
.user-avatar { width: 31px; height: 31px; border-radius: 50%; display: grid; place-items: center; background: #283652; color: #dfe7f6; font-weight: 700; font-size: .8rem; }
.user-name { font-size: .82rem; color: #dfe6f3; max-width: 115px; }
.logout-button { border: 0; color: #8997af; background: transparent; padding: 5px; }
.logout-button:hover { color: #fff; }
.mobile-nav { background: #fff; border-bottom: 1px solid var(--line); }

.app-main { margin-left: var(--sidebar-width); min-height: 100vh; padding: 35px clamp(22px, 3vw, 48px) 25px; }
.page-header { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-header h1 { margin: 0; font-size: clamp(1.6rem, 2.5vw, 2rem); letter-spacing: -.035em; font-weight: 760; }
.eyebrow { color: var(--blue); font-size: .68rem; letter-spacing: .13em; text-transform: uppercase; font-weight: 800; }
.app-footer { color: #9aa3b4; font-size: .72rem; text-align: center; padding: 34px 10px 8px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; }
.metric-card { position: relative; min-height: 148px; padding: 23px; border-radius: 13px; background: var(--card); border: 1px solid var(--line); overflow: hidden; box-shadow: 0 7px 20px rgba(20,32,55,.035); }
.metric-card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; }
.metric-card.accent-green::before { background: var(--green); }.metric-card.accent-yellow::before { background: var(--yellow); }.metric-card.accent-red::before { background: var(--red); }.metric-card.accent-blue::before { background: var(--blue); }
.metric-card > div { display: flex; flex-direction: column; }
.metric-card p { color: var(--muted); margin: 0 0 4px; font-size: .8rem; font-weight: 650; }
.metric-card strong { font-size: 2rem; line-height: 1.25; letter-spacing: -.05em; }
.metric-card small { position: absolute; bottom: 20px; color: #8d96a7; font-size: .7rem; }
.metric-icon { position: absolute; right: 20px; top: 22px; width: 33px; height: 33px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; }
.metric-icon.green { background: var(--green-bg); color: var(--green); }.metric-icon.yellow { background: var(--yellow-bg); color: var(--yellow); }.metric-icon.red { background: var(--red-bg); color: var(--red); }.metric-icon.blue { background: #edf2ff; color: var(--blue); }

.content-card { background: var(--card); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 7px 22px rgba(20,32,55,.035); overflow: hidden; }
.section-heading { padding: 21px 23px; display: flex; justify-content: space-between; gap: 20px; align-items: center; border-bottom: 1px solid var(--line); }
.section-heading.compact { padding: 0 0 20px; margin-bottom: 22px; }
.section-heading h2 { font-size: .98rem; margin: 0 0 4px; font-weight: 750; letter-spacing: -.01em; }
.section-heading p { color: var(--muted); font-size: .75rem; margin: 0; }
.incident-pill { text-decoration: none; background: var(--red-bg); color: var(--red); font-size: .72rem; border-radius: 999px; padding: 6px 10px; font-weight: 700; }
.text-link { text-decoration: none; font-size: .77rem; font-weight: 700; }

.monitor-table { font-size: .78rem; }
.monitor-table > :not(caption) > * > * { padding: 15px 18px; border-bottom-color: #edf0f5; }
.monitor-table thead th { color: #8992a4; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 750; background: #fafbfc; white-space: nowrap; }
.monitor-table tbody tr:last-child td { border-bottom: 0; }
.monitor-table tbody tr:hover { background: #fbfcff; }
.server-link { display: block; color: var(--ink); font-weight: 700; text-decoration: none; font-size: .84rem; }
.server-link:hover { color: var(--blue); }
.cell-subtitle { display: block; color: #9099aa; font-size: .68rem; margin-top: 2px; max-width: 310px; }
.status-badge { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 4px 8px; font-size: .68rem; line-height: 1; font-weight: 750; white-space: nowrap; }
.status-badge.green { background: var(--green-bg); color: var(--green); }.status-badge.yellow { background: var(--yellow-bg); color: var(--yellow); }.status-badge.red { background: var(--red-bg); color: var(--red); }.status-badge.unknown { background: #f0f2f6; color: var(--unknown); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--unknown); flex: none; }
.status-dot.green { background: var(--green); box-shadow: 0 0 0 3px rgba(32,166,106,.11); }.status-dot.yellow { background: var(--yellow); box-shadow: 0 0 0 3px rgba(209,139,19,.11); }.status-dot.red { background: var(--red); box-shadow: 0 0 0 3px rgba(220,76,88,.11); }.status-dot.unknown { background: var(--unknown); }
.provider-badge { color: #5f6b80; font-size: .7rem; font-weight: 650; }
.http-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--green); font-weight: 700; }
.row-arrow { color: #a6afbd; font-size: 1.45rem; line-height: 1; text-decoration: none; }
.mobile-server-list { display: none; }

.empty-state { padding: 55px 20px; text-align: center; }
.empty-icon { display: grid; place-items: center; width: 50px; height: 50px; margin: 0 auto 15px; border-radius: 14px; background: #edf2ff; color: var(--blue); font-size: 1.5rem; }
.empty-state h3 { font-size: 1rem; font-weight: 750; }.empty-state p { color: var(--muted); font-size: .8rem; margin-bottom: 19px; }
.quiet-state { min-height: 130px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #8b95a7; font-size: .8rem; }.quiet-state span { color: var(--green); font-weight: 800; }.quiet-state p { margin: 0; }
.incident-list { padding: 2px 20px; }
.incident-row { display: flex; align-items: center; gap: 13px; padding: 13px 4px; border-bottom: 1px solid #eff2f6; color: inherit; text-decoration: none; }
.incident-row:last-child { border-bottom: 0; }.incident-row:hover .incident-main strong { color: var(--blue); }
.incident-symbol { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; font-size: .75rem; font-weight: 800; }.incident-symbol.red { background: var(--red-bg); color: var(--red); }.incident-symbol.yellow { background: var(--yellow-bg); color: var(--yellow); }
.incident-main { display: flex; flex-direction: column; min-width: 0; }.incident-main strong { font-size: .78rem; }.incident-main small { font-size: .7rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 50vw; }
.incident-state { margin-left: auto; text-align: right; display: flex; flex-direction: column; }.incident-state strong { font-size: .72rem; }.incident-state small { font-size: .66rem; color: #929bac; }

.form-layout { max-width: 980px; margin: 0 auto; }
.form-card { padding: 24px; margin-bottom: 18px; overflow: visible; }
.step-number { color: #c8cfdb; font-size: .75rem; font-weight: 800; letter-spacing: .08em; }
.scheme-select { max-width: 112px; color: #59657a; background-color: #f8f9fb; }
.monitoring-switch { background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; width: 100%; min-height: 65px; padding: 11px 15px 11px 52px; display: flex; align-items: center; }
.monitoring-switch .form-check-input { margin-left: -37px; margin-right: 12px; }.monitoring-switch label { display: flex; flex-direction: column; font-size: .82rem; }.monitoring-switch label small { color: var(--muted); font-size: .7rem; margin-top: 2px; }
.credential-notice { display: flex; gap: 12px; padding: 13px 15px; border: 1px solid #dbe4fb; border-radius: 9px; background: #f5f8ff; color: #526078; font-size: .75rem; }.credential-notice > span { color: var(--blue); font-size: 1.1rem; }.credential-notice strong { color: #30415e; display: block; margin-bottom: 3px; }
.optional { color: #8f98a8; font-weight: 500; margin-left: 4px; font-size: .72rem; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 3px; }

.server-hero { border: 1px solid var(--line); border-radius: 14px; background: #fff; overflow: hidden; }
.server-hero.status-green { border-top: 3px solid var(--green); }.server-hero.status-yellow { border-top: 3px solid var(--yellow); }.server-hero.status-red { border-top: 3px solid var(--red); }.server-hero.status-unknown { border-top: 3px solid var(--unknown); }
.server-identity { display: flex; gap: 16px; align-items: center; padding: 25px; }.hero-status { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: #f6f8fb; }.hero-status .status-dot { width: 11px; height: 11px; }
.server-identity p { color: var(--muted); font-size: .7rem; margin: 0 0 3px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }.server-identity h2 { margin: 0; font-size: 1.25rem; font-weight: 760; }.server-identity div > span { color: #7e899c; font-size: .75rem; }
.hero-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); background: #fafbfc; }.hero-metrics > div { padding: 16px 23px; border-right: 1px solid var(--line); }.hero-metrics > div:last-child { border: 0; }.hero-metrics small { display: block; color: #8a94a5; font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }.hero-metrics strong { font-size: 1rem; }.hero-metrics em { font-size: .67rem; color: #7c8799; font-style: normal; font-weight: 600; }.hero-metrics .date-value { font-size: .67rem; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: 20px; align-items: start; }
.detail-side { min-width: 0; }.detail-side .content-card { padding: 20px; }.compact-table { font-size: .72rem; }.compact-table > :not(caption) > * > * { padding: 13px 12px; }
.record-count { color: #8a94a6; font-size: .68rem; }.attempt-count { display: block; color: #9aa2b0; font-size: .59rem; }.port-group { display: flex; gap: 4px; }.port-pill { font-family: ui-monospace, monospace; font-size: .6rem; padding: 2px 5px; border-radius: 4px; }.port-pill.up { background: var(--green-bg); color: var(--green); }.port-pill.down { background: var(--red-bg); color: var(--red); }.boolean-mark { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; }.boolean-mark.up { background: var(--green-bg); color: var(--green); }.boolean-mark.down { background: var(--red-bg); color: var(--red); }
.config-list { margin: 0; }.config-list > div { padding: 10px 0; border-bottom: 1px solid #edf0f5; }.config-list > div:last-child { border: 0; }.config-list dt { color: #8992a4; font-size: .65rem; font-weight: 650; margin-bottom: 3px; }.config-list dd { font-size: .76rem; font-weight: 650; margin: 0; word-break: break-word; }.config-list a { text-decoration: none; }.credential-stored { color: var(--green); }
.mini-timeline { position: relative; }.timeline-item { display: flex; gap: 11px; padding: 7px 0 15px; }.timeline-item .status-dot { margin-top: 5px; }.timeline-item strong { font-size: .73rem; }.timeline-item p { font-size: .69rem; color: #68738a; margin: 2px 0; line-height: 1.35; }.timeline-item small { color: #9aa3b2; font-size: .6rem; }
.danger-zone { border: 1px solid #f1ccd0; background: #fffafb; border-radius: 11px; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px; }.danger-zone strong { font-size: .74rem; color: #a33a44; }.danger-zone p { margin: 2px 0 0; color: #9d7278; font-size: .64rem; }

.filter-tabs { background: #f2f4f7; border-radius: 8px; padding: 3px; display: flex; }.filter-tabs a { color: #778195; text-decoration: none; border-radius: 6px; padding: 6px 12px; font-size: .7rem; font-weight: 700; }.filter-tabs a.active { color: var(--ink); background: #fff; box-shadow: 0 1px 5px rgba(20,32,55,.09); }.incident-table .reason-cell { max-width: 330px; }

.login-body { background: var(--navy); min-height: 100vh; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-intro { padding: clamp(35px, 6vw, 80px); color: #fff; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; background: radial-gradient(circle at 15% 75%, rgba(56,99,233,.3), transparent 31%), linear-gradient(145deg, #111a2e, #18233c); }
.login-intro::after { content: ""; width: 430px; height: 430px; border: 1px solid rgba(255,255,255,.055); border-radius: 50%; position: absolute; right: -160px; bottom: -130px; box-shadow: 0 0 0 70px rgba(255,255,255,.02), 0 0 0 140px rgba(255,255,255,.015); }
.light-brand { color: #fff; position: relative; z-index: 1; }.intro-copy { position: relative; z-index: 1; max-width: 550px; }.eyebrow.light { color: #6f91fa; }.intro-copy h1 { font-size: clamp(2.6rem, 5vw, 4.9rem); letter-spacing: -.06em; line-height: .98; margin: 13px 0 25px; }.intro-copy > p:last-child { color: #9eabc2; max-width: 470px; font-size: .98rem; line-height: 1.65; }
.signal-row { display: flex; gap: 25px; color: #9da9bf; font-size: .68rem; position: relative; z-index: 1; }.signal-row span { display: flex; align-items: center; gap: 8px; }.signal-row i { width: 6px; height: 6px; }
.login-panel { background: #f7f8fb; display: grid; place-items: center; padding: 30px; }.login-card { width: min(410px, 100%); }.login-card h2 { font-size: 2rem; letter-spacing: -.04em; font-weight: 760; margin: 4px 0 8px; }.login-help { color: var(--muted); font-size: .85rem; margin-bottom: 28px; }.login-form .form-control { background: #fff; font-size: .95rem; }.security-note { text-align: center; color: #979faf; font-size: .65rem; margin: 22px 0 0; }

@media (max-width: 1199.98px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .detail-grid { grid-template-columns: 1fr; }.detail-side { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }.detail-side > * { margin-top: 0 !important; }.danger-zone { grid-column: 1 / -1; }
}
@media (max-width: 991.98px) {
  .app-sidebar { position: fixed; }.app-main { margin-left: 0; padding-top: 26px; }.offcanvas-lg .offcanvas-body { min-height: 100%; }.login-shell { grid-template-columns: 1fr; }.login-intro { display: none; }.login-panel { min-height: 100vh; }.desktop-table { display: none; }.mobile-server-list { display: grid; gap: 10px; padding: 15px; }.mobile-server-card { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 12px; align-items: start; padding: 15px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: inherit; }.mobile-server-card strong,.mobile-server-card small { display: block; }.mobile-server-card small { color: var(--muted); font-size: .7rem; margin-top: 2px; }.mobile-server-meta { grid-column: 1 / -1; display: flex; gap: 15px; color: #818b9e; font-size: .67rem; }
}
@media (max-width: 767.98px) {
  .app-main { padding-inline: 15px; }.page-header { align-items: flex-end; }.metric-grid { gap: 10px; }.metric-card { min-height: 135px; padding: 18px; }.metric-card small { bottom: 17px; }.metric-icon { right: 16px; top: 17px; }.section-heading { padding: 18px; }.form-card { padding: 19px; }.hero-metrics { grid-template-columns: repeat(2, 1fr); }.hero-metrics > div:nth-child(2) { border-right: 0; }.hero-metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }.detail-side { grid-template-columns: 1fr; }.danger-zone { grid-column: auto; }.filter-heading { align-items: flex-start; flex-direction: column; }.incident-main small { max-width: 45vw; }.incident-state small { display: none; }
}
@media (max-width: 479.98px) {
  .metric-grid { grid-template-columns: 1fr; }.metric-card { min-height: 120px; }.page-header { flex-direction: column; align-items: stretch; }.page-header > .btn, .page-header > div:last-child { width: 100%; }.page-header > div:last-child .btn, .page-header > div:last-child form { flex: 1; }.page-header > div:last-child .btn, .page-header > div:last-child form button { width: 100%; }.server-identity { padding: 20px; align-items: flex-start; }.server-identity h2 { font-size: 1.05rem; word-break: break-word; }.form-actions { flex-direction: column-reverse; }.form-actions .btn { width: 100%; }
}

