:root {
    color-scheme: light;
    --blue: #3b5998;
    --blue-hover: #2c457a;
    --blue-soft: #edf1f8;
    --ink: #22304a;
    --text: #334155;
    --muted: #5f6c7f;
    --line: #d8dfe9;
    --surface: #fff;
    --page: #f4f6f9;
    --error: #983131;
    font-family: "Lucida Grande", Tahoma, Verdana, Arial, sans-serif;
    font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); line-height: 1.55; min-width: 280px; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-hover); }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
::selection { background: #d5e0f4; color: var(--ink); }
:focus-visible { outline: 3px solid #597bbd; outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { color: var(--ink); font-size: 1.7rem; line-height: 1.3; letter-spacing: -.025em; }
h2 { color: var(--ink); font-size: 1.15rem; line-height: 1.4; }
.sr-only { width: 1px; height: 1px; padding: 0; border: 0; overflow: hidden; position: absolute; clip-path: inset(50%); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -70px; z-index: 10; padding: 10px 16px; background: var(--surface); }
.skip-link:focus { top: 10px; }
.site-header { background: var(--surface); border-top: 4px solid var(--blue); border-bottom: 1px solid var(--line); }
.header-inner { max-width: 1040px; min-height: 87px; padding: 8px 28px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { flex-shrink: 0; }
.brand img { width: 134px; height: auto; }
.header-nav { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 8px 24px; }
.header-nav a, .nav-button { font-size: .93rem; font-weight: 700; text-decoration: none; padding: 8px 0; }
.header-nav a:hover, .nav-button:hover { text-decoration: underline; }
.header-nav [aria-current="page"] { color: var(--ink); text-decoration: underline; }
.nav-button { border: 0; background: transparent; color: var(--blue); }
.account-name { max-width: 200px; overflow-wrap: anywhere; color: var(--muted); font-size: .9rem; }
.auth-main { max-width: 480px; margin: 52px auto 40px; padding: 0 20px; }
.auth-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 30px; }
.auth-heading { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.heading-character { width: 52px; height: 54px; object-fit: contain; flex-shrink: 0; }
.auth-heading h1 { font-size: 1.5rem; }
.auth-heading p, .page-heading p { margin-top: 7px; color: var(--muted); font-size: .93rem; }
.account-form { display: grid; gap: 18px; }
.form-field { display: grid; gap: 6px; min-width: 0; }
label { color: var(--ink); font-weight: 700; font-size: .93rem; }
input:not([type="hidden"]) { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #aebacc; border-radius: 5px; background: var(--surface); color: var(--ink); padding: 10px 12px; caret-color: var(--blue); transition: border-color 150ms; }
input:not([type="hidden"]):hover { border-color: #7285a4; }
input:not([type="hidden"]):focus { border-color: var(--blue); }
.field-hint { display: block; color: var(--muted); font-size: .85rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; border: 1px solid transparent; border-radius: 5px; font-size: .93rem; font-weight: 700; line-height: 1.35; text-decoration: none; transition: background-color 150ms, border-color 150ms; }
.button:hover { text-decoration: none; }
.button-primary { background: var(--blue); color: white; }
.button-primary:hover { background: var(--blue-hover); color: white; }
.button-primary:active { background: #20365f; }
.button-secondary { background: var(--surface); border-color: #b8c3d3; color: var(--text); }
.button-secondary:hover { background: var(--blue-soft); border-color: #8092af; color: var(--ink); }
.button-secondary:active { background: #dfe6f1; }
.button:disabled { opacity: .55; cursor: not-allowed; }
.button-wide { width: 100%; margin-top: 2px; }
.button-small { min-height: 36px; padding: 8px 12px; font-size: .85rem; }
.auth-switch { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); text-align: center; font-size: .9rem; }
.auth-switch a { display: inline-block; font-weight: 700; }
.messages { margin-bottom: 20px; }
.notice { padding: 13px 15px; border-radius: 5px; background: var(--blue-soft); color: #2c467a; font-size: .93rem; overflow-wrap: anywhere; }
.notice + .notice { margin-top: 10px; }
.notice-error, .notice-danger { background: #fff0ef; color: var(--error); }
.notice-success { background: #edf5ed; color: #2b6034; }
.notice-warning { background: #fff6e4; color: #765211; }
.auth-panel > .notice { margin-bottom: 22px; }
.site-footer { margin: 0 auto; padding: 0 20px 28px; text-align: center; font-size: .8rem; color: var(--muted); }
.site-footer span { margin: 0 6px; }
.admin-main { max-width: 1040px; margin: 40px auto; padding: 0 28px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.page-heading .pending-summary { color: var(--text); font-size: .9rem; margin-top: 0; text-align: right; max-width: 240px; }
.filter-nav { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.filter-nav a { display: flex; align-items: center; gap: 8px; padding: 10px 0 12px; color: var(--muted); font-size: .93rem; text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.filter-nav a:hover { color: var(--blue); }
.filter-nav [aria-current="page"] { color: var(--blue); border-bottom-color: var(--blue); font-weight: 700; }
.filter-count { padding: 1px 6px; background: #e5eaf2; color: #425675; border-radius: 4px; font-size: .8rem; font-variant-numeric: tabular-nums; }
.accounts-table-wrap { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.accounts-table { width: 100%; border-collapse: collapse; background: var(--surface); text-align: left; }
.accounts-table th { background: #edf1f6; color: #506079; font-size: .8rem; font-weight: 700; padding: 12px 20px; }
.accounts-table td { padding: 19px 20px; border-top: 1px solid var(--line); vertical-align: middle; }
.account-cell { width: 45%; overflow-wrap: anywhere; }
.account-cell strong { display: block; font-weight: 700; color: var(--ink); }
.account-email { display: block; color: var(--muted); font-size: .9rem; margin-top: 3px; overflow-wrap: anywhere; }
.admin-label { display: block; color: var(--muted); font-size: .8rem; margin-top: 5px; }
.status { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: .8rem; white-space: nowrap; background: #edf1f6; color: #506079; }
.status-pending { background: #fff4d9; color: #765211; }
.status-approved { background: #edf5ed; color: #2b6034; }
.status-rejected, .status-suspended { background: #fff0ef; color: var(--error); }
.actions-heading, .account-actions { text-align: right; }
.actions-form { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.empty-state { padding: 54px 28px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.empty-state p { max-width: 58ch; margin: 10px auto 16px; color: var(--muted); font-size: .93rem; }
.error-panel h1 { font-size: 1.5rem; }
.error-panel p { margin-top: 14px; color: var(--muted); }
.error-panel .button { margin-top: 24px; }
@media (max-width: 680px) {
    .header-inner { padding-inline: 20px; gap: 16px; }
    .header-nav { gap: 4px 16px; }
    .account-name { display: none; }
    .admin-main { padding-inline: 20px; margin-top: 28px; }
    .page-heading { display: block; margin-bottom: 24px; }
    .page-heading .pending-summary { text-align: left; margin-top: 12px; max-width: none; }
    .filter-nav { gap: 20px; }
    .filter-nav a { font-size: .85rem; gap: 5px; }
    .accounts-table-wrap { overflow: visible; }
    .accounts-table, .accounts-table tbody, .accounts-table tr, .accounts-table td { display: block; }
    .accounts-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
    .accounts-table tr { padding: 18px 20px; border-top: 1px solid var(--line); }
    .accounts-table tr:first-child { border-top: 0; }
    .accounts-table td { padding: 0; border: 0; width: 100%; text-align: left; }
    .accounts-table td + td { margin-top: 12px; }
    .accounts-table .account-actions { margin-top: 16px; }
    .actions-form { justify-content: flex-start; }
}
@media (max-width: 400px) {
    .auth-main { margin-top: 28px; padding-inline: 14px; }
    .auth-panel { padding: 24px 20px; }
    .auth-heading { gap: 12px; }
    .auth-heading h1 { font-size: 1.35rem; }
    .auth-heading p { font-size: .85rem; }
    .heading-character { width: 44px; }
    .header-inner { padding-inline: 16px; }
    .brand img { width: 118px; }
    .header-nav { gap: 4px 12px; }
    .header-nav a, .nav-button { font-size: .85rem; }
    .filter-nav { gap: 14px; }
    .filter-count { padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
