:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;

    --radius: 12px;
    --max-width: 1120px;
}

* {
    box-sizing: border-box;
}

html {
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    color: var(--text);
    background: var(--bg);
}

body {
    margin: 0;
    line-height: 1.6;
}

a {
    color: inherit;
}

.container {
    width: min(100% - 40px, var(--max-width));
    margin-inline: auto;
}


/* Header */

.site-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-size: 1.25rem;
    font-weight: 750;
    letter-spacing: -0.03em;
    text-decoration: none;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-nav > a:not(.button) {
    color: var(--muted);
    font-weight: 500;
    text-decoration: none;
}

.site-nav > a:not(.button):hover {
    color: var(--text);
}


/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 20px;

    border: 1px solid var(--primary);
    border-radius: 8px;

    background: var(--primary);
    color: white;

    font-family: inherit;
    font-size: 1rem;
    font-weight: 650;
    text-decoration: none;

    transition:
        background 0.15s ease,
        border-color 0.15s ease;
}

.button:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.button-small {
    min-height: 40px;
    padding-inline: 16px;
}

.button-secondary {
    background: var(--surface);
    border-color: var(--border);
    color: var(--text);
}

.button-secondary:hover {
    background: var(--bg);
    border-color: #cbd5e1;
}


/* Hero */

.hero {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.hero-inner {
    padding-top: 110px;
    padding-bottom: 120px;
}

.eyebrow {
    margin: 0 0 16px;

    color: var(--primary);

    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1 {
    max-width: 800px;
    margin: 0;

    font-size: clamp(3rem, 7vw, 5.25rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.hero-copy {
    max-width: 650px;
    margin: 32px 0 0;

    color: var(--muted);

    font-size: 1.25rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 12px;
    margin-top: 36px;
}


/* Features */

.features {
    padding: 96px 0 110px;
}

.section-heading {
    max-width: 650px;
    margin-bottom: 44px;
}

.section-heading h2 {
    margin: 0;

    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    min-height: 230px;
    padding: 28px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.feature-number {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.feature-card h3 {
    margin: 48px 0 8px;

    font-size: 1.2rem;
    letter-spacing: -0.02em;
}

.feature-card p {
    margin: 0;
    color: var(--muted);
}


/* Footer */

.site-footer {
    padding: 32px 0;

    background: var(--surface);
    border-top: 1px solid var(--border);

    color: var(--muted);
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.site-footer .brand {
    color: var(--text);
}

/* Authentication */

.auth-section {
    min-height: calc(100vh - 72px - 89px);
    padding: 80px 20px;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    background: var(--bg);
}

.auth-card {
    width: 100%;
    max-width: 460px;
    padding: 40px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.auth-brand {
    display: inline-block;
    margin-bottom: 32px;

    color: var(--primary);
    font-weight: 750;
    text-decoration: none;
}

.auth-heading h1 {
    margin: 0;

    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: -0.04em;
}

.auth-heading p {
    margin: 12px 0 32px;
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 20px;
}

.form-group {
    display: grid;
    gap: 7px;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 650;
}

.form-group input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: var(--surface);
    color: var(--text);

    font: inherit;
}

.form-group input:focus {
    outline: 3px solid rgba(37, 99, 235, 0.12);
    border-color: var(--primary);
}

.button-full {
    width: 100%;
    margin-top: 4px;
    cursor: pointer;
    font: inherit;
}

.auth-footer {
    margin: 28px 0 0;

    color: var(--muted);
    text-align: center;
    font-size: 0.9rem;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 650;
    text-decoration: none;
}

.alert {
    margin-bottom: 24px;
    padding: 12px 14px;

    border-radius: 8px;

    font-size: 0.9rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.nav-form {
    margin: 0;
}

.nav-link {
    padding: 0;
    border: 0;
    background: none;

    color: var(--muted);

    font: inherit;
    font-weight: 500;

    cursor: pointer;
}

.nav-link:hover {
    color: var(--text);
}

/* Dashboard */

.dashboard-section {
    min-height: calc(100vh - 72px - 89px);
    padding: 72px 0 100px;
}

.dashboard-heading {
    margin-bottom: 36px;
}

.dashboard-heading h1 {
    margin: 0;

    font-size: clamp(2.25rem, 5vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.dashboard-user {
    margin: 12px 0 0;
    color: var(--muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 28px;
    align-items: start;
}

.dashboard-panel {
    padding: 28px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.dashboard-panel h2 {
    margin: 0;
    font-size: 1.25rem;
    letter-spacing: -0.025em;
}

.panel-description {
    margin: 8px 0 24px;
    color: var(--muted);
    font-size: 0.9rem;
}

.monitor-list {
    display: grid;
    gap: 14px;
}

.monitor-card {
    display: block;
    padding: 24px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);

    color: var(--text);
    text-decoration: none;

    transition:
        border-color 0.15s ease,
        transform 0.15s ease;
}

.monitor-card:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.monitor-card-up {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.monitor-card-warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.monitor-card-down {
    background: #fef2f2;
    border-color: #fecaca;
}

.monitor-card-paused {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.monitor-card-paused h2 {
    color: #64748b;
}

.monitor-card-pending {
    background: #f8fafc;
}

.monitor-card-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
}

.monitor-card h2 {
    margin: 0;

    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.monitor-url {
    margin: 5px 0 0;

    color: var(--muted);
    font-size: 0.9rem;

    overflow-wrap: anywhere;
}

.status-badge {
    flex-shrink: 0;

    padding: 5px 9px;
    border-radius: 999px;

    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.status-up {
    background: #ecfdf5;
    color: #047857;
}

.status-warning {
    background: #fffbeb;
    color: #b45309;
}

.status-down {
    background: #fef2f2;
    color: #b91c1c;
}

.status-pending {
    background: #f1f5f9;
    color: #64748b;
}

.status-paused {
    background: #f1f5f9;
    color: #475569;
}

.monitor-meta {
    margin-top: 22px;
    padding-top: 16px;

    border-top: 1px solid var(--border);

    color: var(--muted);
    font-size: 0.85rem;
}

.empty-state {
    padding: 60px 32px;

    background: var(--surface);
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);

    text-align: center;
}

.empty-state h2 {
    margin: 0;
}

.empty-state p {
    max-width: 420px;
    margin: 10px auto 0;
    color: var(--muted);
}

/* Monitor detail */

.monitor-detail-section {
    min-height: calc(100vh - 72px - 89px);
    padding: 64px 0 100px;
}

.back-link {
    display: inline-block;
    margin-bottom: 32px;

    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}

.back-link:hover {
    color: var(--text);
}

.monitor-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 32px;

    margin-bottom: 36px;
}

.monitor-detail-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.monitor-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.monitor-title-row h1 {
    margin: 0;

    font-size: clamp(2.25rem, 5vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.detail-url {
    display: inline-block;
    margin-top: 12px;

    color: var(--muted);
    text-decoration: none;

    overflow-wrap: anywhere;
}

.detail-url:hover {
    color: var(--primary);
}

.monitor-paused-message {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.health-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;

    margin-bottom: 56px;
}

.health-card {
    padding: 24px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.health-card-up {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.health-card-warning {
    background: #fffbeb;
    border-color: #fde68a;
}

.health-card-down {
    background: #fef2f2;
    border-color: #fecaca;
}

.health-card-paused {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.health-card-pending {
    background: #f8fafc;
}

.health-label {
    display: block;
    margin-bottom: 8px;

    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 650;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.health-card strong {
    font-size: 1rem;
}

.checks-section {
    margin-top: 8px;
}

.section-heading-small {
    margin-bottom: 20px;
}

.section-heading-small h2 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.section-heading-small p {
    margin: 6px 0 0;
    color: var(--muted);
}

.table-wrapper {
    overflow-x: auto;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.checks-table {
    width: 100%;
    border-collapse: collapse;
}

.checks-table th,
.checks-table td {
    padding: 16px 18px;
    text-align: left;
    vertical-align: middle;
}

.checks-table th {
    color: var(--muted);

    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.checks-table tbody tr {
    border-top: 1px solid var(--border);
}

.checks-table td {
    font-size: 0.9rem;
}

.check-row-up {
    background: #f0fdf4;
}

.check-row-warning {
    background: #fffbeb;
}

.check-row-down {
    background: #fef2f2;
}

.error-cell {
    max-width: 320px;
    overflow-wrap: anywhere;
}


/* Mobile */

@media (max-width: 700px) {
    .container {
        width: min(100% - 28px, var(--max-width));
    }

    .header-inner {
        min-height: 64px;
    }

    .site-nav {
        gap: 14px;
    }

    .site-nav > a:not(.button) {
        display: none;
    }

    .hero-inner {
        padding-top: 72px;
        padding-bottom: 80px;
    }

    .hero h1 {
        font-size: clamp(2.75rem, 15vw, 4rem);
    }

    .hero-copy {
        font-size: 1.1rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .features {
        padding: 70px 0 80px;
    }

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

    .feature-card {
        min-height: auto;
    }

    .feature-card h3 {
        margin-top: 28px;
    }

    .site-footer .container {
        flex-direction: column;
    }

    .dashboard-section {
    padding: 48px 0 70px;
    }

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

    .monitor-card-header {
        gap: 14px;
    }

    .dashboard-panel {
        padding: 22px;
    }

    .monitor-detail-section {
    padding: 44px 0 70px;
    }

    .monitor-detail-header {
        flex-direction: column;
    }

    .monitor-detail-actions {
        width: 100%;
        flex-direction: column;
    }

    .monitor-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .health-grid {
        grid-template-columns: 1fr;
        margin-bottom: 44px;
    }

    .monitor-detail-header .button {
        width: 100%;
    }
}