:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --text: #15212f;
    --muted: #647386;
    --border: #d8e0e9;
    --primary: #b85a00;
    --primary-hover: #984600;
    --secondary-hover: #fff3e6;
    --success-bg: #edf8f2;
    --success-text: #11683c;
    --error-bg: #fff1f0;
    --error-text: #b42318;
    --info-bg: #fff7ed;
    --info-text: #8a4300;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    color: var(--text);
    background: var(--bg);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.6;
}

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

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100% - 32px, 1080px);
    min-height: 64px;
    margin: 0 auto;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: baseline;
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.brand-accent {
    color: var(--primary);
}

.page-shell {
    width: min(100% - 32px, 1080px);
    margin: 0 auto;
    padding: 28px 0 48px;
}

.panel {
    margin-bottom: 20px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.auth-panel,
.account-panel,
.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.auth-panel {
    min-height: 240px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
}

h1,
h2 {
    margin: 0;
    line-height: 1.25;
}

h1 {
    font-size: 30px;
}

h2 {
    font-size: 20px;
}

.lead,
.section-heading p {
    margin: 8px 0 0;
    color: var(--muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

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

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

.button-secondary {
    color: var(--primary);
    background: #fff;
    border-color: var(--border);
}

.button-secondary:hover:not(:disabled) {
    background: var(--secondary-hover);
}

.message {
    margin: 18px 0;
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 600;
}

.message.is-hidden {
    display: none;
}

.message.info {
    color: var(--info-text);
    background: var(--info-bg);
}

.message.success {
    color: var(--success-text);
    background: var(--success-bg);
}

.message.error {
    color: var(--error-text);
    background: var(--error-bg);
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
}

th,
td {
    padding: 13px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

tr:last-child td {
    border-bottom: 0;
}

code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow-wrap: anywhere;
}

@media (max-width: 720px) {
    .auth-panel,
    .account-panel,
    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    h1 {
        font-size: 26px;
    }
}
