:root {
    color: #1b1b1f;
    background: #f9f9ff;
    font-family: "Avenir Next", "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
}

.top-app-bar {
    align-items: center;
    background: #005cbb;
    box-shadow: 0 2px 6px rgb(0 0 0 / 22%);
    color: #fff;
    display: flex;
    height: 64px;
    justify-content: space-between;
    padding: 0 32px;
}

.brand {
    color: inherit;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 0;
    text-decoration: none;
}

.environment {
    font-size: 0.9rem;
    opacity: 0.9;
}

main {
    margin: 0 auto;
    max-width: 1000px;
    padding: 80px 32px;
}

.intro {
    border-bottom: 1px solid #c4c6d0;
    max-width: 680px;
    padding-bottom: 40px;
}

.eyebrow {
    color: #005cbb;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 0 12px;
}

h1,
h2,
p {
    letter-spacing: 0;
}

h1 {
    font-size: 2.75rem;
    line-height: 1.1;
    margin: 0;
}

.summary {
    color: #45464f;
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 18px 0 0;
}

.status-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 32px;
}

.status-card {
    align-items: flex-start;
    background: #fff;
    border: 1px solid #c4c6d0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 12%);
    display: grid;
    gap: 16px;
    grid-template-columns: auto 1fr;
    padding: 24px;
}

.status-icon {
    align-items: center;
    background: #d8e2ff;
    border-radius: 50%;
    color: #003f85;
    display: flex;
    font-size: 0.72rem;
    font-weight: 700;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.status-card h2 {
    font-size: 1.1rem;
    margin: 2px 0 8px;
}

.status-card p {
    color: #5d5e68;
    line-height: 1.5;
    margin: 0;
}

.badge {
    background: #e6f0ff;
    border-radius: 999px;
    color: #004785;
    font-size: 0.75rem;
    font-weight: 700;
    grid-column: 2;
    justify-self: start;
    padding: 6px 10px;
}

@media (max-width: 640px) {
    .top-app-bar {
        padding: 0 20px;
    }

    main {
        padding: 56px 20px;
    }

    h1 {
        font-size: 2.25rem;
    }

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

/* --- Admin / auth / OIDC UI --- */

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0.9;
    text-decoration: none;
}

.nav-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.panel {
    background: #fff;
    border: 1px solid #c4c6d0;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgb(0 0 0 / 12%);
    padding: 24px;
}

.panel + .panel {
    margin-top: 24px;
}

.toolbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

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

table.data-table th,
table.data-table td {
    border-bottom: 1px solid #e2e3ea;
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
}

table.data-table th {
    color: #45464f;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

code.mono, .mono {
    font-family: "SFMono-Regular", Consolas, Menlo, monospace;
    font-size: 0.85em;
}

.btn {
    background: #005cbb;
    border: none;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 10px 18px;
    text-decoration: none;
}

.btn.btn-secondary {
    background: #e6ebf5;
    color: #1b1b1f;
}

.btn.btn-danger {
    background: #b3261e;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

form .field {
    margin-bottom: 16px;
}

form label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

form input[type="text"],
form input[type="email"],
form input[type="password"],
form textarea,
form select {
    border: 1px solid #c4c6d0;
    border-radius: 6px;
    font-size: 0.95rem;
    padding: 10px 12px;
    width: 100%;
}

form small.help {
    color: #5d5e68;
    display: block;
    font-size: 0.78rem;
    margin-top: 4px;
}

.alert {
    border-radius: 6px;
    margin-bottom: 20px;
    padding: 12px 16px;
}

.alert-success {
    background: #dff5e1;
    color: #12521c;
}

.alert-error {
    background: #fbe2e0;
    color: #6e150f;
}

.scope-list {
    list-style: none;
    margin: 12px 0 24px;
    padding: 0;
}

.scope-list li {
    background: #f3f5fb;
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 10px 14px;
}

.consent-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.login-box {
    margin: 80px auto 0;
    max-width: 400px;
}