:root {
    color-scheme: light;
    font-family:
        Inter, system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", sans-serif;
    background: #f4f6f8;
    color: #17212b;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    background: #f4f6f8;
}

a {
    color: inherit;
}

.site-header {
    min-height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 28px;
    border-bottom: 1px solid #d9e0e6;
    background: #ffffff;
}

.brand {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-decoration: none;
}

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

.site-nav a,
.nav-button {
    border: 0;
    background: transparent;
    color: #334455;
    font: inherit;
    cursor: pointer;
    text-decoration: none;
}

.inline-form {
    display: inline;
    margin: 0;
}

.page-shell {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 64px 0;
}

.status-card,
.auth-card,
.dashboard-header {
    width: min(620px, 100%);
    margin: 0 auto;
    padding: 48px;
    border: 1px solid #d9e0e6;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 16px 45px rgba(30, 45, 60, 0.08);
}

.dashboard-header {
    width: 100%;
    margin-bottom: 28px;
}

.eyebrow {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
}

h1 {
    margin: 0 0 20px;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.15;
}

h2 {
    margin-top: 0;
}

p {
    line-height: 1.7;
}

.status {
    margin: 28px 0;
    font-weight: 700;
}

.field {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.field label {
    font-weight: 700;
}

.field input {
    width: 100%;
    min-height: 48px;
    padding: 10px 13px;
    border: 1px solid #aebbc6;
    border-radius: 9px;
    background: #ffffff;
    color: #17212b;
    font: inherit;
}

.field input:focus {
    outline: 3px solid rgba(23, 80, 128, 0.2);
    border-color: #175080;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid #175080;
    border-radius: 9px;
    font: inherit;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

.primary-button {
    background: #175080;
    color: #ffffff;
}

.secondary-button {
    background: #ffffff;
    color: #175080;
}

.full-width {
    width: 100%;
}

.form-note,
.metadata,
.scope-label {
    color: #596775;
    font-size: 14px;
}

.alert {
    width: min(620px, 100%);
    margin: 0 auto 20px;
    padding: 12px 14px;
    border-radius: 8px;
}

.alert-error,
.field-error {
    color: #8a1c1c;
    background: #fff0f0;
}

.alert-success {
    color: #165a34;
    background: #edf9f2;
}

.field-error {
    padding: 10px;
    border-radius: 8px;
}

.card-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
}

.access-card {
    padding: 28px;
    border: 1px solid #d9e0e6;
    border-radius: 14px;
    background: #ffffff;
    text-decoration: none;
    transition:
        transform 120ms ease,
        box-shadow 120ms ease;
}

.access-card:hover,
.access-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(30, 45, 60, 0.1);
}

@media (max-width: 640px) {
    .site-header {
        padding: 0 18px;
    }

    .page-shell {
        padding: 32px 0;
    }

    .status-card,
    .auth-card,
    .dashboard-header {
        padding: 28px;
    }
}

.form-card,
.table-card {
    width: 100%;
    padding: 36px;
    border: 1px solid #d9e0e6;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 16px 45px rgba(30, 45, 60, 0.08);
}

.table-wrapper {
    overflow-x: auto;
}

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

th,
td {
    padding: 14px;
    border-bottom: 1px solid #e4e9ed;
    text-align: left;
    vertical-align: top;
}

th {
    font-size: 13px;
    letter-spacing: 0.04em;
}

fieldset {
    margin: 24px 0;
    padding: 18px;
    border: 1px solid #d9e0e6;
    border-radius: 10px;
}

legend {
    padding: 0 8px;
    font-weight: 700;
}

.checkbox-list {
    display: grid;
    gap: 10px;
    padding: 0;
    list-style: none;
}

.checkbox-list li {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 20px 0;
}

.sensitive-confirmation {
    margin-top: 30px;
    padding: 18px;
    border: 1px solid #e6c46d;
    border-radius: 10px;
    background: #fffaf0;
}

.status-enabled {
    color: #17623a;
    font-weight: 700;
}

.status-disabled {
    color: #8a1c1c;
    font-weight: 700;
}

.tag {
    display: inline-block;
    margin-left: 6px;
    padding: 3px 7px;
    border-radius: 999px;
    background: #fff2cc;
    font-size: 12px;
}

.action-cell {
    min-width: 190px;
}

.small-button {
    min-height: 36px;
    padding: 6px 11px;
    font-size: 13px;
}

.compact-form {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.compact-form input {
    width: 100%;
    padding: 8px;
}

details {
    margin-top: 10px;
}

summary {
    cursor: pointer;
    font-weight: 700;
}

.secret-display {
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    padding: 18px;
    border: 1px solid #aebbc6;
    border-radius: 10px;
    background: #f4f6f8;
    font-size: 16px;
    user-select: all;
}
