:root {
    --bg: #f4f6f8;
    --panel: #ffffff;
    --ink: #17202a;
    --muted: #667085;
    --line: #d9e0e7;
    --brand: #0f766e;
    --brand-dark: #115e59;
    --warn: #a15c00;
    --ok: #1f7a4d;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: var(--brand-dark);
}

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

.sidebar {
    background: #18212b;
    color: #fff;
    padding: 22px 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
    margin-bottom: 28px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 8px;
    background: var(--brand);
    font-weight: 700;
}

.brand small {
    display: block;
    color: #a9b4c0;
    margin-top: 2px;
}

.nav {
    display: grid;
    gap: 4px;
}

.nav a {
    color: #d7dee7;
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 6px;
}

.nav a:hover,
.nav a.active {
    background: #263241;
    color: #fff;
}

.logout-form {
    display: grid;
    gap: 8px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    color: #b8c4cf;
    font-size: 13px;
}

.logout-form button {
    width: 100%;
    min-height: 36px;
    border: 0;
    border-radius: 6px;
    background: #344255;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.main {
    padding: 34px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 34px;
}

h2 {
    margin: 0;
    font-size: 18px;
}

.lede {
    max-width: 760px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
}

.status-band {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
}

.status-band.is-ok strong,
.text-ok {
    color: var(--ok);
}

.status-band.is-warn strong,
.text-warn {
    color: var(--warn);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.module-card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px;
}

.module-card-header,
.panel-header,
.setup-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.module-card-header span,
.panel-header span,
.module-source {
    color: var(--muted);
    font-size: 13px;
}

.module-card p {
    min-height: 72px;
    color: var(--muted);
    line-height: 1.45;
}

.module-source {
    margin-bottom: 14px;
}

.panel {
    margin-bottom: 18px;
}

.panel.muted {
    background: #f9fbfc;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.feature-list div {
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 12px;
    background: #fbfcfd;
}

.setup-row {
    border-bottom: 1px solid var(--line);
    padding: 12px 0;
}

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

pre {
    overflow: auto;
    padding: 14px;
    border-radius: 6px;
    background: #101820;
    color: #f8fafc;
}

.auth-body {
    min-height: 100vh;
    background: #18212b;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.auth-panel {
    width: min(100%, 430px);
    border-radius: 8px;
    background: #fff;
    padding: 28px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--ink);
    text-decoration: none;
    margin-bottom: 26px;
}

.auth-brand small {
    display: block;
    color: var(--muted);
    margin-top: 2px;
}

.auth-panel h1 {
    font-size: 28px;
}

.auth-copy {
    margin: 8px 0 20px;
    color: var(--muted);
    line-height: 1.45;
}

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

.auth-form label {
    display: grid;
    gap: 6px;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

.auth-form input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 8px 10px;
    font: inherit;
}

.auth-form button {
    min-height: 44px;
    border: 0;
    border-radius: 6px;
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
}

.auth-alert {
    margin-bottom: 14px;
    border: 1px solid #ffd29b;
    border-radius: 6px;
    background: #fff8ed;
    color: #804600;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.45;
}

@media (max-width: 860px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

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

    .main {
        padding: 22px;
    }

    .page-header {
        display: grid;
    }
}
