:root {
    --accent: var(--maroon, #5b1724);
    --accent-dark: var(--green, #182a20);
    --soft: var(--cream, #f3e9d7);
    --ok: #e8f3ec;
    --bad: #fae8e8;
}

.register-admin *,
.register-admin *::before,
.register-admin *::after {
    box-sizing: border-box;
}

.register-public .register-main > h2,
.register-public .register-main > p,
.register-public .register-main > form,
.register-public .register-main > .notice,
.register-public .register-main > .grid,
.register-public .register-main > section:not(.hero) {
    width: min(1120px, calc(100% - 32px));
    margin-right: auto;
    margin-left: auto;
}

.register-public .register-main > h2:first-child {
    margin-top: 2.2rem;
}

.register-public .hero .content-wrap {
    padding-top: clamp(2.6rem, 6vw, 4.4rem);
    padding-bottom: clamp(2.6rem, 6vw, 4.4rem);
}

.register-public .hero.compact {
    max-width: none;
}

.register-public .grid.two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.5rem;
}

.register-public .grid.two article,
.register-public .entry-card,
.register-public fieldset {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(22, 20, 17, 0.08);
}

.register-public .grid.two article {
    padding: 1.15rem;
}

.register-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
    gap: 1rem;
    margin: 1.1rem 0 1.5rem;
}

.register-action-grid article {
    display: grid;
    align-content: start;
    gap: 0.65rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(22, 20, 17, 0.08);
}

.register-action-grid h4,
.register-action-grid p {
    margin: 0;
}

.register-action-grid .button {
    width: fit-content;
    max-width: 100%;
    margin-top: auto;
}

.register-public .grid.two article h3 {
    font-size: 1.16rem;
}

.register-public .actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.register-public .section-actions {
    margin-top: 1.2rem;
}

.form,
.admin-edit {
    display: grid;
    gap: 1.05rem;
}

.form.narrow {
    max-width: 560px;
}

fieldset {
    padding: 1.1rem;
}

legend {
    padding: 0 0.4rem;
    color: var(--green);
    font-weight: 700;
}

label {
    display: grid;
    gap: 0.35rem;
    margin: 0.65rem 0;
    font-family: Arial, sans-serif;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 0.6rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font: 1rem Arial, sans-serif;
}

button[type="submit"],
.register-public .form button,
.register-public .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 44px;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--maroon);
    border-radius: 6px;
    background: var(--maroon);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
}

button[type="submit"]:hover,
.register-public .form button:hover,
.register-public .button:hover {
    background: #4c141e;
    border-color: #4c141e;
}

.register-public .button.secondary {
    border-color: var(--line);
    background: rgba(255, 253, 248, 0.94);
    color: var(--maroon);
}

.register-public .button.secondary:hover {
    border-color: var(--gold);
    background: var(--cream);
    color: var(--maroon);
}

.register-public .hero .button.secondary {
    border-color: rgba(189, 145, 67, 0.9);
    background: rgba(255, 253, 248, 0.96);
    color: var(--maroon);
    box-shadow: 0 4px 14px rgba(22, 20, 17, 0.22);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem 1.25rem;
}

.checks label,
.filters label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.checks input,
.filters input[type="checkbox"] {
    width: auto;
    min-height: auto;
}

.hp {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.register-public .notice {
    max-width: 760px;
    background: var(--ok);
}

.review-notice,
.caution {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.caution {
    background: #fff8e8;
}

.notice.error {
    background: var(--bad);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
    gap: 0.85rem;
    margin: 1.35rem 0;
}

.stat {
    display: grid;
    align-content: start;
    gap: 0.25rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 10px 24px rgba(22, 20, 17, 0.08);
    overflow-wrap: anywhere;
}

.stat span {
    display: block;
    color: var(--green);
    font-size: 2rem;
    font-weight: 800;
}

.stat .stat-label {
    color: #4d453b;
    font: 700 0.9rem/1.25 Arial, sans-serif;
}

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

td,
th {
    padding: 0.5rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.entry-card {
    margin: 1.1rem 0;
    padding: 1rem;
}

.register-admin .entry-card {
    border: 1px solid #d7c6a6;
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.88);
    box-shadow: 0 10px 24px rgba(22, 20, 17, 0.08);
}

.register-admin .grid.two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.review-help-panel h3,
.review-help-panel p,
.form-helper,
.entry-secondary-actions p {
    margin: 0;
}

.review-help-panel {
    display: grid;
    gap: 0.75rem;
}

.form-helper {
    padding: 0.65rem 0.75rem;
    border-left: 4px solid #bd9143;
    background: #fff8e8;
    color: #5b1724;
    font-family: Arial, sans-serif;
    font-weight: 700;
}

.entry-secondary-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
    gap: 0.85rem;
}

.entry-secondary-actions > div {
    display: grid;
    align-content: start;
    gap: 0.4rem;
    padding: 0.8rem;
    border: 1px solid #d7c6a6;
    border-radius: 8px;
    background: #fffdf8;
}

.entry-secondary-actions .danger-zone {
    border-color: #d7a6a6;
    background: #fff5f5;
}

.entry-secondary-actions p {
    color: #675e52;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
}

.report {
    min-height: 360px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.reference {
    font-family: Arial, sans-serif;
}

.register-admin {
    margin: 0;
    color: #1b1a17;
    background: #f6efe3;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.06rem;
    line-height: 1.65;
}

.register-admin a {
    color: #722130;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    z-index: 1000;
    width: auto;
    height: auto;
    padding: 0.55rem 0.8rem;
    border: 2px solid #bd9143;
    border-radius: 6px;
    background: #fffdf8;
    color: #5b1724;
    font: 700 0.95rem Arial, sans-serif;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(22, 20, 17, 0.22);
}

.wrap {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
}

.register-admin-header {
    background: #201a16;
    color: #fff;
    border-bottom: 5px solid #5b1724;
    box-shadow: 0 8px 24px rgba(22, 20, 17, 0.16);
}

.register-admin-header-inner {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    padding: 22px 0;
}

.register-admin .eyebrow {
    margin: 0 0 4px;
    color: #d6c3a1;
    font: 700 0.82rem Arial, sans-serif;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.register-admin h1 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 2rem);
    line-height: 1.14;
}

.admin-badge {
    display: inline-flex;
    width: fit-content;
    margin: 0.55rem 0 0;
    padding: 0.18rem 0.5rem;
    border: 1px solid rgba(214, 195, 161, 0.55);
    border-radius: 999px;
    color: #f4ead6;
    font: 700 0.78rem Arial, sans-serif;
    text-transform: uppercase;
}

.register-admin h2 {
    margin-top: 2rem;
    font-size: clamp(1.22rem, 1.8vw, 1.55rem);
    font-weight: 700;
    line-height: 1.2;
}

.register-admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    max-width: 560px;
}

.register-admin .register-admin-nav a {
    padding: 0.25rem 0.45rem;
    border-radius: 5px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    font: 700 0.9rem Arial, sans-serif;
}

.register-admin .register-admin-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
}

.register-admin .register-admin-nav a[aria-current="page"] {
    background: #5b1724;
    color: #fff;
}

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

.tabs a {
    padding: 0.42rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
    font: 700 0.9rem Arial, sans-serif;
    text-decoration: none;
}

.tabs a.active {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}

.register-admin main {
    padding: 32px 0 48px;
}

.register-admin .button,
.register-admin button,
.register-public .form button,
.register-public .button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.55rem 0.9rem;
    border: 1px solid var(--accent);
    border-radius: 6px;
    background: var(--accent);
    color: #fff;
    font: 700 0.95rem Arial, sans-serif;
    text-decoration: none;
    cursor: pointer;
}

.register-admin .button.secondary {
    background: transparent;
    color: var(--accent);
}

.register-admin button.danger {
    background: #8f2a2a;
    border-color: #8f2a2a;
}

.register-admin .notice {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--ok);
}

.register-admin .notice.error {
    background: var(--bad);
}

.admin-intro {
    max-width: 760px;
    color: #4d453b;
}

.admin-panel,
.needs-attention {
    margin: 1.1rem 0;
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.82);
}

.needs-attention {
    background: #fff8e8;
}

.status-summary {
    margin: 1rem 0;
}

.status-summary summary {
    cursor: pointer;
    color: var(--accent-dark);
    font-weight: 700;
}

.action-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
    gap: 0.85rem;
}

.action-card {
    display: grid;
    align-content: start;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.9rem;
    border: 1px solid #d7c6a6;
    border-radius: 8px;
    background: #fffdf8;
}

.action-card strong {
    color: var(--accent-dark);
    font-size: 2rem;
    line-height: 1;
}

.action-card h4,
.action-card p {
    margin: 0;
}

.action-card .button {
    margin-top: auto;
}

.action-card.muted {
    background: #f7f0e5;
}

.status-guide {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 0.55rem 1rem;
    margin: 0.85rem 0 0;
}

.status-guide div {
    padding: 0.65rem;
    border-left: 4px solid #bd9143;
    background: #fffdf8;
}

.status-guide dt {
    color: var(--accent);
    font: 700 0.95rem Arial, sans-serif;
}

.status-guide dd {
    margin: 0.15rem 0 0;
}

.safe-label {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.6rem;
    padding: 0.22rem 0.5rem;
    border: 1px solid #bd9143;
    border-radius: 999px;
    background: #fff8e8;
    color: #5b1724;
    font: 700 0.8rem Arial, sans-serif;
}

.checkline {
    display: flex;
    grid-template-columns: none;
    align-items: flex-start;
    gap: 0.5rem;
    font-weight: 700;
}

.checkline input {
    width: auto;
    min-height: auto;
    margin-top: 0.32rem;
}

.request-card-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.request-card-header h3,
.request-card-header p,
.next-action-line,
.request-text-block p {
    margin: 0;
}

.request-card-header p,
.request-detail-grid small,
.request-detail-grid span,
.request-text-block span {
    color: #675e52;
}

.status-badge {
    display: inline-flex;
    max-width: 100%;
    padding: 0.25rem 0.58rem;
    border: 1px solid #bd9143;
    border-radius: 999px;
    background: #fff8e8;
    color: var(--accent);
    font: 700 0.82rem Arial, sans-serif;
}

.next-action-line {
    padding: 0.55rem 0.7rem;
    border: 1px solid #d7c6a6;
    border-radius: 8px;
    background: #fffdf8;
}

.request-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    gap: 0.7rem;
    margin: 0.85rem 0;
}

.request-detail-grid div,
.request-text-block {
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid #e1d2b8;
    border-radius: 8px;
    background: rgba(255, 253, 248, 0.72);
}

.request-detail-grid span,
.request-text-block span {
    display: block;
    margin-bottom: 0.18rem;
    font: 700 0.76rem Arial, sans-serif;
    text-transform: uppercase;
}

.request-detail-grid strong,
.request-detail-grid small {
    display: block;
    overflow-wrap: anywhere;
}

.request-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    align-items: center;
    margin: 0.95rem 0;
}

.request-action-bar button {
    min-height: 38px;
    padding: 0.46rem 0.72rem;
    font-size: 0.9rem;
}

.compose-panel {
    display: grid;
    gap: 0.85rem;
    margin: 0.95rem 0;
    padding: 1rem;
    border: 1px solid #bd9143;
    border-radius: 8px;
    background: #fffdf8;
}

.compose-panel[hidden],
.consent-fields[hidden],
[data-requester-recipient][hidden] {
    display: none;
}

.compose-panel h4,
.compose-panel p {
    margin: 0;
}

.consent-fields {
    display: grid;
    gap: 0.75rem;
    padding: 0.8rem;
    border: 1px solid #d7c6a6;
    border-radius: 8px;
    background: #fff8e8;
}

.privacy-reminder {
    padding: 0.65rem 0.75rem;
    border-left: 4px solid #bd9143;
    background: #fff8e8;
    color: #5b1724;
    font-weight: 700;
}

.table-scroll {
    max-width: 100%;
    overflow-x: auto;
}

.button.compact {
    min-height: 34px;
    padding: 0.34rem 0.6rem;
    font-size: 0.85rem;
}

.register-admin .site-footer {
    color: #5f574d;
    border-top: 1px solid #d7c6a6;
}

.site-footer .wrap {
    padding: 1.3rem 0;
}

@media (max-width: 760px) {
    .register-public .grid.two,
    .register-admin .grid.two,
    .checks {
        grid-template-columns: 1fr;
    }

    .register-admin-header-inner {
        display: grid;
        grid-template-columns: 1fr;
    }

    .register-admin-nav {
        justify-content: flex-start;
        max-width: none;
    }

}
