/* ==========================================================================
   Uptime Monitor — UI theme
   A design layer on top of Bootstrap 5.3. Uses Bootstrap's own CSS variables
   where possible so existing utility classes keep working unchanged.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root,
[data-bs-theme="light"] {
    --app-bg: #f5f6f8;
    --app-bg-accent: radial-gradient(1200px 600px at 15% -10%, rgba(99, 102, 241, .10), transparent 60%),
                     radial-gradient(900px 500px at 100% 0%, rgba(14, 165, 233, .08), transparent 55%);
    --app-surface: #ffffff;
    --app-surface-2: #fafbfc;
    --app-border: #e6e8ec;
    --app-border-strong: #d7dae1;
    --app-text: #0f172a;
    --app-muted: #6b7280;
    --app-brand: #4f46e5;
    --app-brand-2: #7c3aed;
    --app-brand-soft: rgba(79, 70, 229, .10);
    --app-nav-bg: rgba(255, 255, 255, .82);
    --app-shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --app-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 8px 24px -12px rgba(16, 24, 40, .12);
    --app-shadow-lg: 0 24px 48px -24px rgba(16, 24, 40, .28);
    --app-radius: 14px;
    --app-radius-sm: 10px;

    --bs-primary: #4f46e5;
    --bs-primary-rgb: 79, 70, 229;
    --bs-body-bg: var(--app-bg);
    --bs-body-color: var(--app-text);
    --bs-border-color: var(--app-border);
    --bs-secondary-color: var(--app-muted);
    --bs-link-color: var(--app-brand);
    --bs-link-color-rgb: 79, 70, 229;
    --bs-link-hover-color: #4338ca;
}

[data-bs-theme="dark"] {
    --app-bg: #0b0e16;
    --app-bg-accent: radial-gradient(1200px 600px at 15% -10%, rgba(99, 102, 241, .16), transparent 60%),
                     radial-gradient(900px 500px at 100% 0%, rgba(14, 165, 233, .10), transparent 55%);
    --app-surface: #12161f;
    --app-surface-2: #161b26;
    --app-border: #232838;
    --app-border-strong: #2e3446;
    --app-text: #e7eaf0;
    --app-muted: #939bab;
    --app-brand: #818cf8;
    --app-brand-2: #a78bfa;
    --app-brand-soft: rgba(129, 140, 248, .14);
    --app-nav-bg: rgba(18, 22, 31, .82);
    --app-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
    --app-shadow: 0 1px 3px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --app-shadow-lg: 0 24px 48px -24px rgba(0, 0, 0, .8);

    --bs-primary: #6366f1;
    --bs-primary-rgb: 99, 102, 241;
    --bs-body-bg: var(--app-bg);
    --bs-body-color: var(--app-text);
    --bs-border-color: var(--app-border);
    --bs-secondary-color: var(--app-muted);
    --bs-emphasis-color: #ffffff;
    --bs-link-color: var(--app-brand);
    --bs-link-color-rgb: 129, 140, 248;
    --bs-link-hover-color: #a5b4fc;
}

/* ---------- Base ---------- */
* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--app-bg);
    background-image: var(--app-bg-accent);
    background-attachment: fixed;
    color: var(--app-text);
    font-size: .9375rem;
    line-height: 1.6;
    letter-spacing: -.006em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 650;
    letter-spacing: -.021em;
    color: var(--app-text);
}

a { text-decoration: none; transition: color .15s ease; }
a:hover { text-decoration: none; }

.text-muted { color: var(--app-muted) !important; }

::selection { background: var(--app-brand-soft); }

:focus-visible {
    outline: 2px solid var(--app-brand);
    outline-offset: 2px;
}

/* Numbers read better aligned */
.stat-value, .table td, .table th { font-variant-numeric: tabular-nums; }

/* ---------- Navbar ---------- */
.app-navbar {
    background: var(--app-nav-bg);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--app-border);
    padding-top: .5rem;
    padding-bottom: .5rem;
}

.app-navbar .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: .625rem;
    font-weight: 680;
    font-size: 1.0625rem;
    letter-spacing: -.02em;
    color: var(--app-text);
    padding-top: 0;
    padding-bottom: 0;
}
.app-navbar .navbar-brand:hover { color: var(--app-text); }

.brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: .8125rem;
    background: linear-gradient(135deg, var(--app-brand), var(--app-brand-2));
    box-shadow: 0 2px 8px -2px rgba(79, 70, 229, .55);
}

.app-navbar .navbar-nav .nav-link {
    color: var(--app-muted);
    font-weight: 550;
    font-size: .875rem;
    padding: .4rem .75rem;
    border-radius: 8px;
    transition: background-color .15s ease, color .15s ease;
}
.app-navbar .navbar-nav .nav-link:hover { color: var(--app-text); background: var(--app-brand-soft); }
.app-navbar .navbar-nav .nav-link.active { color: var(--app-brand); background: var(--app-brand-soft); }

.app-navbar .navbar-toggler {
    border-color: var(--app-border);
    color: var(--app-text);
    padding: .35rem .55rem;
}
.app-navbar .navbar-toggler:focus { box-shadow: none; }

/* Avatar / user menu */
.user-menu {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .3rem .6rem .3rem .3rem !important;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background: var(--app-surface);
    color: var(--app-text) !important;
    font-size: .875rem;
    font-weight: 550;
}
.user-menu:hover { border-color: var(--app-border-strong); background: var(--app-surface-2); }
.user-menu::after { margin-left: .1rem; opacity: .5; }

.avatar {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: .6875rem;
    font-weight: 650;
    letter-spacing: 0;
    color: #fff;
    background: linear-gradient(135deg, var(--app-brand), var(--app-brand-2));
    flex: 0 0 auto;
}

.theme-toggle {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    border: 1px solid var(--app-border);
    background: var(--app-surface);
    color: var(--app-muted);
    transition: color .15s ease, border-color .15s ease;
}
.theme-toggle:hover { color: var(--app-text); border-color: var(--app-border-strong); }
[data-bs-theme="light"] .theme-toggle .icon-dark,
[data-bs-theme="dark"] .theme-toggle .icon-light { display: none; }

.dropdown-menu {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    box-shadow: var(--app-shadow-lg);
    padding: .375rem;
    background: var(--app-surface);
    font-size: .875rem;
    --bs-dropdown-link-hover-bg: var(--app-brand-soft);
    --bs-dropdown-link-active-bg: var(--app-brand-soft);
    --bs-dropdown-link-active-color: var(--app-text);
}
.dropdown-item { border-radius: 8px; padding: .45rem .625rem; font-weight: 500; }
.dropdown-header { font-size: .75rem; }

/* ---------- Layout ---------- */
main { flex: 1 0 auto; }

.page-head {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}
.page-title {
    font-size: 1.5rem;
    font-weight: 680;
    letter-spacing: -.025em;
    margin: 0;
}
.page-subtitle {
    color: var(--app-muted);
    font-size: .875rem;
    margin: .2rem 0 0;
}
.eyebrow {
    font-size: .6875rem;
    font-weight: 620;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--app-muted);
}

.app-footer {
    border-top: 1px solid var(--app-border);
    color: var(--app-muted);
    font-size: .8125rem;
    padding: 1.25rem 0;
    margin-top: 3rem;
}

/* ---------- Cards ---------- */
.card {
    --bs-card-bg: var(--app-surface);
    --bs-card-border-color: var(--app-border);
    --bs-card-border-radius: var(--app-radius);
    --bs-card-inner-border-radius: calc(var(--app-radius) - 1px);
    --bs-card-cap-bg: transparent;
    --bs-card-spacer-x: 1.25rem;
    --bs-card-spacer-y: 1.25rem;
    box-shadow: var(--app-shadow-sm);
}

.card-header {
    border-bottom-color: var(--app-border);
    padding: .875rem 1.25rem;
    font-weight: 620;
}
.card-header h5, .card-header .h5 { font-size: .9375rem; font-weight: 620; letter-spacing: -.01em; }
.card-footer {
    background: transparent;
    border-top-color: var(--app-border);
    padding: .75rem 1.25rem;
}
.card-footer:empty { display: none; }

.shadow, .shadow-sm, .shadow-lg { box-shadow: var(--app-shadow) !important; }

/* ---------- Stat tiles ---------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.stat {
    position: relative;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius);
    padding: 1.125rem 1.25rem;
    box-shadow: var(--app-shadow-sm);
    overflow: hidden;
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.stat:hover {
    border-color: var(--app-border-strong);
    transform: translateY(-2px);
    box-shadow: var(--app-shadow);
}
.stat::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--stat-accent, var(--app-brand));
    opacity: .9;
}
.stat-label {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    font-weight: 560;
    color: var(--app-muted);
    margin-bottom: .35rem;
}
.stat-label i { color: var(--stat-accent, var(--app-brand)); font-size: .75rem; }
.stat-value {
    font-size: 1.875rem;
    font-weight: 680;
    letter-spacing: -.03em;
    line-height: 1.15;
    color: var(--app-text);
}
.stat-meta { font-size: .75rem; color: var(--app-muted); margin-top: .15rem; }

.stat--indigo { --stat-accent: #6366f1; }
.stat--sky    { --stat-accent: #0ea5e9; }
.stat--slate  { --stat-accent: #64748b; }
.stat--green  { --stat-accent: #10b981; }
.stat--amber  { --stat-accent: #f59e0b; }
.stat--red    { --stat-accent: #ef4444; }

/* ---------- Tables ---------- */
.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--app-text);
    --bs-table-border-color: var(--app-border);
    --bs-table-hover-bg: var(--app-surface-2);
    --bs-table-hover-color: var(--app-text);
    margin-bottom: 0;
}

.table > thead th {
    background: var(--app-surface-2);
    color: var(--app-muted);
    font-size: .6875rem;
    font-weight: 620;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 1px solid var(--app-border);
    padding: .7rem 1rem;
}

.table > tbody td {
    padding: .8rem 1rem;
    vertical-align: middle;
    border-bottom-color: var(--app-border);
    font-size: .875rem;
}
.table > tbody tr:last-child td { border-bottom: 0; }
.table-sm > thead th { padding: .6rem 1rem; }
.table-sm > tbody td { padding: .625rem 1rem; }

.table-hover > tbody > tr { transition: background-color .12s ease; }

/* Cards clip their tables neatly */
.card > .table-responsive:first-child > .table > thead tr:first-child th:first-child { border-top-left-radius: calc(var(--app-radius) - 1px); }
.card > .table-responsive:first-child > .table > thead tr:first-child th:last-child { border-top-right-radius: calc(var(--app-radius) - 1px); }
.card > .table-responsive { border-radius: inherit; }

.cell-primary { font-weight: 600; color: var(--app-text); }
.cell-url {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
    font-size: .8125rem;
    color: var(--app-muted);
}
a.cell-url:hover { color: var(--app-brand); }

/* ---------- Badges & status ---------- */
.badge {
    font-weight: 580;
    font-size: .75rem;
    letter-spacing: .01em;
    padding: .3em .6em;
    border-radius: 7px;
    border: 1px solid transparent;
}

/* Soft, tinted badges rather than solid blocks of color */
.badge.bg-success   { background: rgba(16, 185, 129, .12) !important; color: #047857 !important; border-color: rgba(16, 185, 129, .25); }
.badge.bg-danger    { background: rgba(239, 68, 68, .12) !important;  color: #b91c1c !important; border-color: rgba(239, 68, 68, .25); }
.badge.bg-warning   { background: rgba(245, 158, 11, .14) !important; color: #b45309 !important; border-color: rgba(245, 158, 11, .28); }
.badge.bg-secondary { background: rgba(100, 116, 139, .12) !important; color: #475569 !important; border-color: rgba(100, 116, 139, .24); }
.badge.bg-primary   { background: rgba(79, 70, 229, .12) !important;  color: #4338ca !important; border-color: rgba(79, 70, 229, .25); }
.badge.bg-info      { background: rgba(14, 165, 233, .12) !important; color: #0369a1 !important; border-color: rgba(14, 165, 233, .25); }
.badge.bg-dark      { background: rgba(15, 23, 42, .10) !important;   color: #1e293b !important; border-color: rgba(15, 23, 42, .2); }
.badge.text-dark    { color: inherit !important; }

[data-bs-theme="dark"] .badge.bg-success   { color: #34d399 !important; border-color: rgba(16, 185, 129, .3); }
[data-bs-theme="dark"] .badge.bg-danger    { color: #f87171 !important; border-color: rgba(239, 68, 68, .3); }
[data-bs-theme="dark"] .badge.bg-warning   { color: #fbbf24 !important; border-color: rgba(245, 158, 11, .32); }
[data-bs-theme="dark"] .badge.bg-secondary { color: #94a3b8 !important; border-color: rgba(148, 163, 184, .28); }
[data-bs-theme="dark"] .badge.bg-primary   { color: #a5b4fc !important; border-color: rgba(129, 140, 248, .3); }
[data-bs-theme="dark"] .badge.bg-info      { color: #38bdf8 !important; border-color: rgba(14, 165, 233, .3); }
[data-bs-theme="dark"] .badge.bg-dark      { color: #cbd5e1 !important; border-color: rgba(203, 213, 225, .2); }

/* Status pill with a live dot */
.status {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    font-weight: 580;
    padding: .28em .6em;
    border-radius: 999px;
    border: 1px solid transparent;
    white-space: nowrap;
}
.status .dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: currentColor;
    flex: 0 0 auto;
}
.status--up     { background: rgba(16, 185, 129, .12); color: #047857; border-color: rgba(16, 185, 129, .25); }
.status--down   { background: rgba(239, 68, 68, .12);  color: #b91c1c; border-color: rgba(239, 68, 68, .25); }
.status--paused { background: rgba(245, 158, 11, .14); color: #b45309; border-color: rgba(245, 158, 11, .28); }
.status--idle   { background: rgba(100, 116, 139, .12); color: #475569; border-color: rgba(100, 116, 139, .24); }

[data-bs-theme="dark"] .status--up     { color: #34d399; }
[data-bs-theme="dark"] .status--down   { color: #f87171; }
[data-bs-theme="dark"] .status--paused { color: #fbbf24; }
[data-bs-theme="dark"] .status--idle   { color: #94a3b8; }

.status--up .dot { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .5); }
    50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0); }
}
@media (prefers-reduced-motion: reduce) {
    .status--up .dot { animation: none; }
    * { transition-duration: .01ms !important; }
}

.method-tag {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
    font-size: .6875rem;
    font-weight: 620;
    letter-spacing: .03em;
    padding: .2em .45em;
    border-radius: 6px;
    background: var(--app-brand-soft);
    color: var(--app-brand);
    border: 1px solid transparent;
}

/* ---------- Buttons ---------- */
.btn {
    --bs-btn-focus-box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .25);
    font-weight: 560;
    font-size: .875rem;
    border-radius: var(--app-radius-sm);
    padding: .45rem .875rem;
    transition: transform .12s ease, box-shadow .15s ease, background-color .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-lg { font-size: .9375rem; padding: .65rem 1.25rem; border-radius: 12px; }
.btn-sm { font-size: .8125rem; padding: .3rem .6rem; border-radius: 8px; }

.btn-primary {
    --bs-btn-bg: var(--app-brand);
    --bs-btn-border-color: var(--app-brand);
    --bs-btn-hover-bg: #4338ca;
    --bs-btn-hover-border-color: #4338ca;
    --bs-btn-active-bg: #3730a3;
    --bs-btn-active-border-color: #3730a3;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .1);
}
.btn-primary:hover { box-shadow: 0 4px 12px -4px rgba(79, 70, 229, .6); }

.btn-success {
    --bs-btn-bg: #059669;
    --bs-btn-border-color: #059669;
    --bs-btn-hover-bg: #047857;
    --bs-btn-hover-border-color: #047857;
}

.btn-outline-secondary {
    --bs-btn-color: var(--app-text);
    --bs-btn-border-color: var(--app-border-strong);
    --bs-btn-hover-bg: var(--app-surface-2);
    --bs-btn-hover-border-color: var(--app-muted);
    --bs-btn-hover-color: var(--app-text);
    --bs-btn-active-bg: var(--app-surface-2);
    --bs-btn-active-border-color: var(--app-muted);
    --bs-btn-active-color: var(--app-text);
    background: var(--app-surface);
}
.btn-outline-primary {
    --bs-btn-color: var(--app-brand);
    --bs-btn-border-color: rgba(var(--bs-primary-rgb), .4);
    --bs-btn-hover-bg: var(--app-brand);
    --bs-btn-hover-border-color: var(--app-brand);
}
.btn-outline-danger  { --bs-btn-border-color: rgba(239, 68, 68, .4); }
.btn-outline-warning { --bs-btn-border-color: rgba(245, 158, 11, .45); --bs-btn-color: #b45309; }
[data-bs-theme="dark"] .btn-outline-warning { --bs-btn-color: #fbbf24; }

/* Compact square icon action buttons */
.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    line-height: 1;
}

.actions { display: flex; gap: .375rem; align-items: center; }
.actions form { margin: 0; }

/* ---------- Forms ---------- */
.form-label {
    font-size: .8125rem;
    font-weight: 580;
    color: var(--app-text);
    margin-bottom: .375rem;
}

.form-control, .form-select {
    background-color: var(--app-surface);
    border-color: var(--app-border-strong);
    border-radius: var(--app-radius-sm);
    color: var(--app-text);
    padding: .5rem .75rem;
    font-size: .875rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-control::placeholder { color: var(--app-muted); opacity: .7; }
.form-control:focus, .form-select:focus {
    background-color: var(--app-surface);
    border-color: var(--app-brand);
    color: var(--app-text);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .16);
}
textarea.form-control {
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, monospace;
    font-size: .8125rem;
}
.form-text { font-size: .75rem; color: var(--app-muted); }

.input-group-text {
    background: var(--app-surface-2);
    border-color: var(--app-border-strong);
    color: var(--app-muted);
    border-radius: var(--app-radius-sm);
}

/* Our global control radius overrides Bootstrap's group-corner rules, so restore them */
.input-group > :not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.input-group > :not(:last-child) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}
.input-group > .form-control { border-left: 0; }

/* Ring the whole group, not just the field inside it */
.input-group:focus-within {
    border-radius: var(--app-radius-sm);
    box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .16);
}
.input-group > .form-control:focus,
.input-group > .form-select:focus { box-shadow: none; }
.input-group:focus-within .input-group-text {
    border-color: var(--app-brand);
    color: var(--app-brand);
}

.form-check-input { border-color: var(--app-border-strong); }
.form-check-input:checked { background-color: var(--app-brand); border-color: var(--app-brand); }
.form-check-input:focus { border-color: var(--app-brand); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .16); }
.form-switch .form-check-input { width: 2.25rem; height: 1.25rem; }
.form-check-label { font-size: .875rem; }

.is-invalid ~ .invalid-feedback, .invalid-feedback { font-size: .75rem; }

/* A framed row for toggles so switches don't float in space */
.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface-2);
}
.switch-row .form-check { margin: 0; min-height: auto; }

/* ---------- Alerts ---------- */
.alert {
    border-radius: var(--app-radius-sm);
    border: 1px solid transparent;
    font-size: .875rem;
    padding: .75rem 1rem;
    display: flex;
    align-items: center;
    gap: .625rem;
    box-shadow: var(--app-shadow-sm);
}
.alert .btn-close { margin-left: auto; padding: .75rem; }
.alert-success { background: rgba(16, 185, 129, .10); border-color: rgba(16, 185, 129, .25); color: #047857; }
.alert-danger  { background: rgba(239, 68, 68, .10);  border-color: rgba(239, 68, 68, .25);  color: #b91c1c; }
.alert-warning { background: rgba(245, 158, 11, .10); border-color: rgba(245, 158, 11, .28); color: #b45309; }
.alert-info    { background: rgba(14, 165, 233, .10); border-color: rgba(14, 165, 233, .25); color: #0369a1; }
[data-bs-theme="dark"] .alert-success { color: #34d399; }
[data-bs-theme="dark"] .alert-danger  { color: #f87171; }
[data-bs-theme="dark"] .alert-warning { color: #fbbf24; }
[data-bs-theme="dark"] .alert-info    { color: #38bdf8; }

/* ---------- Empty states ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--app-muted);
}
.empty-state .empty-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    color: var(--app-brand);
    background: var(--app-brand-soft);
}
.empty-state h6, .empty-state .empty-title {
    color: var(--app-text);
    font-weight: 620;
    font-size: .9375rem;
    margin-bottom: .25rem;
}
.empty-state p { font-size: .875rem; margin-bottom: 0; }

/* ---------- Pagination ---------- */
.pagination {
    --bs-pagination-border-color: var(--app-border);
    --bs-pagination-bg: var(--app-surface);
    --bs-pagination-color: var(--app-text);
    --bs-pagination-hover-bg: var(--app-surface-2);
    --bs-pagination-hover-color: var(--app-brand);
    --bs-pagination-hover-border-color: var(--app-border-strong);
    --bs-pagination-active-bg: var(--app-brand);
    --bs-pagination-active-border-color: var(--app-brand);
    --bs-pagination-disabled-bg: var(--app-surface);
    --bs-pagination-disabled-border-color: var(--app-border);
    --bs-pagination-disabled-color: var(--app-muted);
    --bs-pagination-focus-box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .2);
    --bs-pagination-font-size: .8125rem;
    --bs-pagination-border-radius: 8px;
    gap: .25rem;
    margin-bottom: 0;
}
.pagination .page-link { border-radius: 8px; }
.page-item:first-child .page-link, .page-item:last-child .page-link { border-radius: 8px; }

/* ---------- Landing page ---------- */
.hero { padding: 3.5rem 0 2rem; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .75rem;
    font-weight: 560;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: var(--app-brand-soft);
    color: var(--app-brand);
    border: 1px solid rgba(var(--bs-primary-rgb), .2);
    margin-bottom: 1.25rem;
}
.hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 700;
    letter-spacing: -.035em;
    line-height: 1.1;
    margin-bottom: 1rem;
}
.hero-gradient {
    background: linear-gradient(120deg, var(--app-brand), var(--app-brand-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p.lead {
    font-size: 1.0625rem;
    color: var(--app-muted);
    max-width: 34rem;
    margin-bottom: 1.75rem;
}

.feature {
    display: flex;
    gap: .875rem;
    align-items: flex-start;
    padding: 1rem;
    border-radius: var(--app-radius-sm);
    transition: background-color .15s ease;
}
.feature:hover { background: var(--app-surface-2); }
.feature-icon {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: .875rem;
    color: var(--app-brand);
    background: var(--app-brand-soft);
}
.feature h6 { font-size: .875rem; font-weight: 620; margin-bottom: .15rem; }
.feature p { font-size: .8125rem; color: var(--app-muted); margin: 0; }

/* Fake monitor preview panel on the landing page */
.preview-panel {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 18px;
    box-shadow: var(--app-shadow-lg);
    overflow: hidden;
}
.preview-bar {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--app-border);
    background: var(--app-surface-2);
}
.preview-bar .dot { width: 10px; height: 10px; border-radius: 999px; background: var(--app-border-strong); }
.preview-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .75rem 1rem;
    border-bottom: 1px solid var(--app-border);
    font-size: .8125rem;
}
.preview-row:last-child { border-bottom: 0; }

/* Uptime sparkline bars */
.bars { display: flex; gap: 3px; align-items: flex-end; height: 26px; }
.bars i {
    width: 5px;
    border-radius: 2px;
    background: #10b981;
    opacity: .85;
    display: block;
}
.bars i.bad { background: #ef4444; }

/* ---------- Auth pages ---------- */
.auth-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 0;
}
.auth-card {
    width: 100%;
    max-width: 26rem;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 18px;
    box-shadow: var(--app-shadow-lg);
    padding: 2rem;
}
.auth-head { text-align: center; margin-bottom: 1.5rem; }
.auth-head .brand-mark { width: 44px; height: 44px; border-radius: 12px; font-size: 1.0625rem; margin: 0 auto .875rem; }
.auth-head h1 { font-size: 1.375rem; margin-bottom: .25rem; }
.auth-head p { color: var(--app-muted); font-size: .875rem; margin: 0; }

/* ---------- Misc ---------- */
hr { border-color: var(--app-border); opacity: 1; }
.border { border-color: var(--app-border) !important; }
.rounded { border-radius: var(--app-radius-sm) !important; }

.divider-text {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: var(--app-muted);
    font-size: .75rem;
    margin: 1.25rem 0;
}
.divider-text::before, .divider-text::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--app-border);
}

.table-responsive::-webkit-scrollbar { height: 8px; }
.table-responsive::-webkit-scrollbar-thumb { background: var(--app-border-strong); border-radius: 999px; }

@media (max-width: 767.98px) {
    .page-head { align-items: flex-start; }
    .stat-value { font-size: 1.5rem; }
    .app-navbar .navbar-nav .nav-link { padding-left: .5rem; }
}
