body {
    margin: 0;
    background: #f0f2f5;
    color: #1f232b;
    font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
}

.top-nav {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 18px 28px;
    background: #ffffff;
    border-bottom: 1px solid #e6e2da;
    box-shadow: 0 2px 12px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 10;
    position: relative;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.logo-img {
    height: 44px;
    width: auto;
}
.logo-link {
    display: inline-flex;
    align-items: center;
}

.brand {
    font-size: 18px;
}

.nav-tabs {
    display: flex;
    gap: 18px;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-tabs .tab {
    text-decoration: none;
    color: #44505f;
    font-weight: 600;
    padding: 10px 0;
    border-bottom: 3px solid transparent;
}

.nav-tabs .tab.active {
    color: #1f232b;
    border-bottom-color: #354d63;
}

.nav-actions .ghost-btn {
    background: #edf0f4;
    border: 1px solid #d8dde4;
    border-radius: 12px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 16px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: end;
}

.icon-btn {
    background: #edf0f4;
    border: 1px solid #d8dde4;
    border-radius: 12px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
    color: #1f232b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f6f8a, #8fa7be);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.page-shell {
    max-width: 100%;
    margin: 0;
    padding: 20px 28px;
}

.card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e6e2da;
    box-shadow: 0 8px 24px rgba(0,0,0,0.04);
    padding: 16px 18px;
}

.hero-shell {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
}

.inline-form-row {
    grid-template-columns: auto auto;
    justify-content: start;
    align-items: center;
}

.form-header {
    align-items: center;
}

.header-form {
    justify-self: end;
    grid-template-columns: 1fr auto;
    width: 100%;
    max-width: 600px;
}

.smoking-form {
    grid-template-columns: 1fr auto;
    max-width: 720px;
    margin-top: 8px;
}

.htmx-indicator {
    display: none;
}
.htmx-request .htmx-indicator {
    display: block;
}

.inline-form input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid #d6d3cc;
    background: #f8f9fb;
    font-size: 15px;
}

.inline-form .short-input {
    max-width: 440px;
}

.primary-btn {
    background: #4f6f8a;
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 6px 14px rgba(79,111,138,0.25);
}

.primary-btn.outline {
    background: #e7eef5;
    color: #4f6f8a;
    box-shadow: none;
}

.primary-btn.ghost {
    background: #f4f6f8;
    color: #2f3c4d;
    box-shadow: none;
}

.grid {
    display: grid;
    gap: 14px;
}

.grid.dashboards {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.stat-card .card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.score-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-card .card-head h3 {
    position: relative;
    display: inline-block;
}

.stat-card .card-head h3::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    border-radius: 999px;
    margin-top: 6px;
    background: linear-gradient(90deg, #3b82f6, #22c55e, #f59e0b, #ef4444);
}

.big-score {
    font-size: 40px;
    font-weight: 800;
    margin-bottom: 6px;
}

.ring {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: conic-gradient(#4f6f8a 0 240deg, #e9edf1 0 360deg);
    display: grid;
    place-items: center;
}
.ring-inner {
    background: #fff;
    width: 74px;
    height: 74px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 24px;
    font-weight: 800;
    color: #2f3c4d;
}

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

.rec-num {
    font-size: 24px;
    font-weight: 700;
    margin-top: 6px;
}

.cta-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f7f9fb;
    border: 1px solid #e3e8ef;
    border-radius: 12px;
    padding: 12px;
}

.severity-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.severity-ring {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #f1f4f7;
}
.severity-ring .seg {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 16px solid transparent;
}
.severity-ring .high { border-top-color: #4f6f8a; transform: rotate(10deg); }
.severity-ring .med { border-right-color: #d9a441; transform: rotate(140deg); }
.severity-ring .low { border-left-color: #9ec7c9; transform: rotate(240deg); }
.severity-ring .center {
    position: absolute;
    inset: 28px;
    background: #fff;
    border-radius: 50%;
}

.legend { list-style: none; padding: 0; margin: 0; }
.legend li { display: flex; align-items: center; gap: 6px; color: #4a4f56; }
.legend .dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend .dot.high { background: #4f6f8a; }
.legend .dot.med { background: #d9a441; }
.legend .dot.low { background: #9ec7c9; }

.mt { margin-top: 12px; }

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

.simple-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 12px;
}

.simple-table th, .simple-table td {
    padding: 10px;
    border-bottom: 1px solid #e7dcca;
    text-align: left;
}

.simple-table th {
    background: #f4f2ef;
    font-weight: 700;
}

.pill {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 12px;
    background: #4f6f8a;
    color: #fff;
}
.pill-group { display: flex; gap: 6px; flex-wrap: wrap; }
.pill.status-pending { background: #a16c2f; }
.pill.status-running { background: #e3a635; }
.pill.status-completed { background: #2f9e44; }
.pill.status-failed { background: #c0392b; }
.pill.severity-high { background: #c0392b; }
.pill.severity-medium { background: #d8781e; }
.pill.severity-low { background: #4f6f8a; }

.muted { color: #5a5f65; }
.small { font-size: 12px; }

.actions a { margin-left: 8px; }

.stat-row {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-bottom: 14px;
}

.metric { text-align: left; }
.metric-label { color: #58606a; font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: 0.04em; }
.metric-value { font-size: 32px; font-weight: 800; margin: 6px 0; }
.metric-bar {
    background: #e2e8f0;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
    margin-bottom: 8px;
}
.metric-bar div {
    height: 100%;
}
.bar-seo div { background: linear-gradient(90deg, #3b82f6, #22d3ee); }
.bar-content div { background: linear-gradient(90deg, #10b981, #22c55e); }
.bar-performance div { background: linear-gradient(90deg, #f59e0b, #f97316); }
.bar-accessibility div { background: linear-gradient(90deg, #6366f1, #a855f7); }

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

.summary-block h4 { margin-bottom: 6px; }
.summary-block ul { margin-top: 0; padding-left: 18px; }

.page-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }

.error { border-left: 4px solid #c0392b; }
.success { border-left: 4px solid #2f9e44; }

.auth-shell {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    flex-direction: column;
    gap: 12px;
}

.auth-card {
    max-width: 420px;
    width: 100%;
    text-align: center;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-form input, .auth-form label {
    font-size: 14px;
}

.auth-form input {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #d6d3cc;
    background: #f8f9fb;
}

.auth-logo img {
    height: 60px;
    margin-bottom: 12px;
}

.auth-body .page-shell {
    max-width: 480px;
    margin: 0 auto;
    padding-top: 80px;
}

.copyright {
    text-align: center;
}

@media (max-width: 900px) {
    .content-row { grid-template-columns: 1fr; }
    .nav-tabs { display: none; }
}
