:root {
    --palladian: #eee9df;
    --oatmeal: #c9c1b1;
    --burning-flame: #ffb162;
    --truffle: #a35139;
    --blue-fantastic: #2c3b4d;
    --abyssal: #1b2632;
    --slate: #637286;
    --white: #ffffff;
    --ink: #1b2632;
    --muted: #68727d;
    --line: #e2ded5;
    --surface: #ffffff;
    --surface-soft: #f7f5f0;
    --success: #24745c;
    --success-soft: #e5f4ee;
    --warning: #9a6428;
    --warning-soft: #fff3df;
    --danger: #a53d36;
    --danger-soft: #fbe9e7;
    --shadow-sm: 0 4px 16px rgba(27, 38, 50, 0.07);
    --shadow-md: 0 18px 45px rgba(27, 38, 50, 0.14);
    --radius-sm: 10px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --transition: 180ms ease;
}

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

html {
    color-scheme: light;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    margin: 0;
    color: var(--ink);
    font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    letter-spacing: -0.035em;
    line-height: 1.12;
}

h1 {
    margin-bottom: 0.45rem;
    font-size: clamp(2rem, 4vw, 3.15rem);
}

h2 {
    margin-bottom: 0.4rem;
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

button,
a,
input,
select {
    outline: none;
}

:focus-visible {
    outline: 3px solid rgba(255, 177, 98, 0.65);
    outline-offset: 3px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    z-index: 200;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    color: var(--abyssal);
    background: var(--burning-flame);
    font-weight: 700;
    transform: translateY(-150%);
    transition: transform var(--transition);
}

.skip-link:focus {
    transform: translateY(0);
}

.muted {
    color: var(--muted);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.6rem;
    color: var(--truffle);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.eyebrow--light {
    color: var(--burning-flame);
}

/* Buttons */

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.7rem 1.1rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 750;
    line-height: 1;
    transition:
        background-color var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.button:hover {
    transform: translateY(-1px);
}

.button:active {
    transform: translateY(0);
}

.button--primary {
    color: var(--abyssal);
    background: var(--burning-flame);
    box-shadow: 0 8px 18px rgba(255, 177, 98, 0.2);
}

.button--primary:hover {
    background: #ffa64d;
    box-shadow: 0 10px 22px rgba(255, 177, 98, 0.28);
}

.button--secondary {
    border-color: var(--line);
    color: var(--abyssal);
    background: var(--white);
}

.button--secondary:hover {
    border-color: var(--oatmeal);
    background: var(--surface-soft);
}

.button--ghost {
    border-color: rgba(238, 233, 223, 0.2);
    color: var(--palladian);
    background: rgba(255, 255, 255, 0.04);
}

.button--ghost:hover {
    border-color: rgba(255, 177, 98, 0.6);
    color: var(--burning-flame);
}

.button--small {
    min-height: 36px;
    padding: 0.55rem 0.8rem;
    font-size: 0.86rem;
}

.button--wide {
    width: 100%;
}

.button.is-loading {
    cursor: wait;
    opacity: 0.72;
}

/* Login */

.login-body {
    min-height: 100vh;
    background: var(--palladian);
}

.login-layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(430px, 1.05fr) minmax(400px, 0.95fr);
}

.login-brand-panel {
    position: relative;
    display: flex;
    min-height: 100vh;
    overflow: hidden;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2.2rem, 6vw, 6.5rem);
    color: var(--white);
    background:
        radial-gradient(circle at 86% 18%, rgba(99, 114, 134, 0.27), transparent 28%),
        linear-gradient(145deg, var(--abyssal), #223247 72%, var(--blue-fantastic));
}

.login-brand-panel::before {
    position: absolute;
    right: -15%;
    bottom: -18%;
    width: 540px;
    height: 540px;
    border: 1px solid rgba(255, 177, 98, 0.16);
    border-radius: 50%;
    content: "";
}

.login-brand-panel::after {
    position: absolute;
    right: -4%;
    bottom: -7%;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 177, 98, 0.2);
    border-radius: 50%;
    content: "";
}

.login-brand-panel__glow {
    position: absolute;
    top: 14%;
    left: 12%;
    width: 100px;
    height: 7px;
    border-radius: 99px;
    background: linear-gradient(90deg, var(--burning-flame), var(--truffle));
    box-shadow: 0 0 38px rgba(255, 177, 98, 0.42);
}

.login-logo {
    position: relative;
    z-index: 1;
    width: min(470px, 78%);
    height: auto;
    margin: 0 0 1.8rem;
    object-fit: contain;
}

.login-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 620px;
}

.login-brand-copy h1 {
    max-width: 590px;
    margin-bottom: 1rem;
    color: var(--palladian);
    font-size: clamp(2.25rem, 4.4vw, 4.5rem);
}

.login-brand-copy p {
    max-width: 560px;
    color: rgba(238, 233, 223, 0.72);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.login-brand-panel__footer {
    position: absolute;
    z-index: 1;
    bottom: clamp(2rem, 4vw, 4rem);
    left: clamp(2.2rem, 6vw, 6.5rem);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--oatmeal);
    font-size: 0.88rem;
}

.infinity-mark {
    color: var(--burning-flame);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.login-form-panel {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: clamp(1.25rem, 5vw, 5rem);
    background:
        linear-gradient(rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0.68)),
        var(--palladian);
}

.login-card {
    width: min(100%, 445px);
    padding: clamp(1.6rem, 4vw, 2.75rem);
    border: 1px solid rgba(201, 193, 177, 0.68);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(14px);
}

.login-card--registration {
    width: min(100%, 720px);
}

.login-card h2 {
    margin-bottom: 0.5rem;
    font-size: clamp(2rem, 3vw, 2.65rem);
}

.login-card > .muted {
    margin-bottom: 1.75rem;
}

.login-card__mobile-brand {
    display: none;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 1.5rem;
    color: var(--abyssal);
    font-weight: 800;
    font-size: 1.25rem;
}

.login-card__mobile-brand img {
    width: 64px;
    border-radius: 7px;
}

.login-help {
    margin: 1.5rem 0 0;
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

.account-prompt {
    margin: 1.3rem 0 0;
    color: var(--muted);
    font-size: 0.86rem;
    text-align: center;
}

.account-prompt a {
    color: var(--truffle);
    font-weight: 800;
}

.account-prompt a:hover {
    text-decoration: underline;
}

/* Forms */

.stack-form {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.account-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1rem;
}

.field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.4rem;
}

.field label,
.field .field-label,
.label-row label {
    color: var(--ink);
    font-size: 0.87rem;
    font-weight: 750;
}

.field label span {
    color: var(--truffle);
}

.field input,
.field select,
.field textarea,
.search-form input {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d8d4cc;
    border-radius: var(--radius-sm);
    color: var(--ink);
    background: var(--white);
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.field input,
.field select,
.field textarea {
    padding: 0.7rem 0.8rem;
}

.field input:hover,
.field select:hover,
.field textarea:hover,
.search-form input:hover {
    border-color: var(--oatmeal);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-form input:focus {
    border-color: var(--burning-flame);
    box-shadow: 0 0 0 4px rgba(255, 177, 98, 0.18);
}

.field textarea {
    min-height: 92px;
    resize: vertical;
}

.field-error {
    min-height: 0.9rem;
    color: var(--danger);
    font-size: 0.76rem;
}

.field-error:empty {
    display: none;
}

.label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.label-row a,
.label-row span {
    color: var(--truffle);
    font-size: 0.74rem;
}

.input-with-icon,
.input-with-action,
.input-with-prefix {
    position: relative;
}

.input-with-icon input {
    padding-left: 2.45rem;
}

.input-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 0.88rem;
    color: var(--slate);
    font-weight: 700;
    transform: translateY(-50%);
}

.input-with-action input {
    padding-right: 4.75rem;
}

.input-with-action button {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    min-width: 3.4rem;
    padding: 0.35rem 0.45rem;
    border: 0;
    border-radius: 6px;
    color: var(--truffle);
    background: transparent;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 750;
    transform: translateY(-50%);
}

.input-with-action button:hover {
    background: var(--surface-soft);
}

.input-with-prefix > span {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 0.85rem;
    color: var(--muted);
    transform: translateY(-50%);
}

.input-with-prefix input {
    padding-left: 1.8rem;
}

/* Alerts */

.flash-stack {
    position: fixed;
    z-index: 120;
    top: 5.6rem;
    right: 1.5rem;
    display: flex;
    width: min(390px, calc(100vw - 2rem));
    flex-direction: column;
    gap: 0.6rem;
}

.flash-stack--static {
    position: static;
    width: 100%;
    margin: 0 0 1.25rem;
}

.alert {
    display: grid;
    grid-template-columns: 12px 1fr auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 0.9rem;
    border: 1px solid;
    border-radius: var(--radius-sm);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    font-size: 0.88rem;
    animation: alert-in 240ms ease both;
}

.alert--static {
    margin-bottom: 1rem;
}

.alert__icon {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.45);
}

.alert--success {
    border-color: #b7ddce;
    color: var(--success);
    background: var(--success-soft);
}

.alert--error {
    border-color: #efc5c1;
    color: var(--danger);
    background: var(--danger-soft);
}

.alert--warning {
    border-color: #edd4a8;
    color: var(--warning);
    background: var(--warning-soft);
}

.alert--info {
    border-color: #cbd7e5;
    color: var(--blue-fantastic);
    background: #edf2f7;
}

.alert__close {
    display: grid;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font-size: 1.15rem;
    place-items: center;
}

.alert__close:hover {
    background: rgba(27, 38, 50, 0.08);
}

.alert.is-leaving {
    animation: alert-out 180ms ease both;
}

@keyframes alert-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
}

@keyframes alert-out {
    to {
        opacity: 0;
        transform: translateX(20px);
    }
}

/* App shell */

.app-body {
    min-height: 100vh;
    padding-top: 76px;
    background:
        radial-gradient(circle at 5% 0, rgba(255, 177, 98, 0.09), transparent 22rem),
        var(--surface-soft);
}

.topbar {
    position: fixed;
    z-index: 100;
    top: 0;
    right: 0;
    left: 0;
    display: grid;
    height: 76px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(1rem, 2.4vw, 2.25rem);
    padding: 0 3vw;
    color: var(--palladian);
    background: rgba(27, 38, 50, 0.98);
    box-shadow: 0 4px 18px rgba(27, 38, 50, 0.18);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 0.7rem;
}

.brand__mark {
    width: 68px;
    height: 36px;
    border-radius: 7px;
    object-fit: cover;
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand__text strong {
    color: var(--white);
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.brand__text small {
    margin-top: 0.18rem;
    color: var(--oatmeal);
    font-size: 0.67rem;
}

.primary-nav {
    display: flex;
    justify-self: center;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem;
    border: 1px solid rgba(238, 233, 223, 0.09);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
}

.primary-nav a {
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    color: rgba(238, 233, 223, 0.68);
    font-size: 0.86rem;
    font-weight: 650;
    white-space: nowrap;
    transition:
        color var(--transition),
        background var(--transition);
}

.primary-nav a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
}

.primary-nav a.is-active {
    color: var(--abyssal);
    background: var(--burning-flame);
}

.nav-group {
    position: relative;
}

.nav-group summary {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: 8px;
    color: rgba(238, 233, 223, 0.72);
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 700;
    list-style: none;
    white-space: nowrap;
    transition:
        color var(--transition),
        background var(--transition);
}

.nav-group summary::-webkit-details-marker {
    display: none;
}

.nav-group summary span {
    font-size: 0.75rem;
    transition: transform var(--transition);
}

.nav-group summary:hover,
.nav-group[open] summary {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
}

.nav-group.is-active > summary {
    color: var(--abyssal);
    background: var(--burning-flame);
}

.nav-group[open] summary span {
    transform: rotate(180deg);
}

.nav-group__menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 0.65rem);
    left: 0;
    display: grid;
    min-width: 245px;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    gap: 0.3rem;
    padding: 0.5rem;
    border: 1px solid rgba(238, 233, 223, 0.14);
    border-radius: 13px;
    background: #142b40;
    box-shadow: 0 16px 35px rgba(5, 15, 24, 0.32);
}

.nav-group__menu--wide {
    min-width: 270px;
}

.nav-group__menu--right {
    right: 0;
    left: auto;
}

.primary-nav .nav-group__menu a {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.72rem 0.8rem;
}

.nav-group__menu a strong {
    font-size: 0.82rem;
}

.nav-group__menu a small {
    color: rgba(238, 233, 223, 0.57);
    font-size: 0.68rem;
    font-weight: 500;
}

.nav-group__menu a.is-active small {
    color: rgba(27, 38, 50, 0.68);
}

.origin-badge {
    display: inline-flex;
    margin-top: 0.25rem;
    padding: 0.2rem 0.4rem;
    border-radius: 99px;
    color: #70431e;
    background: #fff0dd;
    font-size: 0.62rem;
    font-weight: 800;
}

.public-registration-cta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-top: 1rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid #d8e0e7;
    border-radius: 12px;
    color: var(--blue-fantastic);
    background: #f4f7f9;
    transition:
        border-color var(--transition),
        transform var(--transition);
}

.public-registration-cta:hover {
    border-color: var(--burning-flame);
    transform: translateY(-1px);
}

.public-registration-cta > span:nth-child(2) {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.public-registration-cta strong {
    font-size: 0.8rem;
}

.public-registration-cta small {
    margin-top: 0.08rem;
    color: var(--muted);
    font-size: 0.69rem;
}

/* Public event registration */

.public-registration-body {
    min-height: 100vh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 8% 12%, rgba(255, 177, 98, 0.18), transparent 24rem),
        linear-gradient(115deg, var(--abyssal) 0 41%, #edf1f4 41% 100%);
}

.public-registration-header {
    display: flex;
    width: min(1240px, calc(100% - 2rem));
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 auto;
}

.public-registration-shell {
    display: grid;
    width: min(1240px, calc(100% - 2rem));
    grid-template-columns: minmax(300px, 0.8fr) minmax(540px, 1.2fr);
    align-items: start;
    gap: clamp(2rem, 7vw, 6rem);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4.5rem) 0;
}

.public-registration-intro {
    position: sticky;
    top: 2rem;
    padding-top: clamp(2rem, 6vw, 6rem);
    color: var(--palladian);
}

.public-registration-intro h1 {
    margin: 0.55rem 0 1rem;
    color: var(--white);
    font-size: clamp(2.6rem, 6vw, 5.4rem);
    line-height: 0.98;
}

.public-registration-intro p {
    max-width: 520px;
    color: rgba(238, 233, 223, 0.72);
    font-size: 1rem;
}

.public-registration-benefits {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.8rem;
    padding: 0;
    list-style: none;
}

.public-registration-benefits li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: rgba(238, 233, 223, 0.84);
    font-size: 0.86rem;
}

.public-registration-benefits li::before {
    display: grid;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: var(--abyssal);
    background: var(--burning-flame);
    content: "✓";
    font-size: 0.72rem;
    font-weight: 900;
    place-items: center;
}

.public-registration-card {
    min-width: 0;
    padding: clamp(1.4rem, 4vw, 2.4rem);
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 24px 55px rgba(13, 34, 53, 0.15);
}

.public-registration-card h2 {
    margin-bottom: 0.25rem;
}

.public-registration-form {
    margin-top: 1.3rem;
}

.public-registration-form .form-grid {
    margin-bottom: 1rem;
}

.public-registration-form .field {
    min-width: 0;
}

.registration-success {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.3rem;
    padding: 1rem;
    border: 1px solid #bcdcca;
    border-radius: 14px;
    color: #24563b;
    background: #edf8f1;
}

.registration-success > span {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--white);
    background: var(--success);
    font-weight: 900;
    place-items: center;
}

.registration-success p {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
}

.captcha-challenge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.7rem;
}

.captcha-challenge img {
    border: 1px solid #cbd5de;
    border-radius: 9px;
    background: #f3f6f8;
}

.captcha-challenge a {
    color: var(--blue-fantastic);
    font-size: 0.75rem;
    font-weight: 750;
    text-decoration: underline;
}

.captcha-field input {
    max-width: 260px;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.registration-privacy {
    margin: 0.8rem 0 0;
    color: var(--muted);
    font-size: 0.7rem;
    text-align: center;
}

.form-trap {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
}

.user-menu {
    display: flex;
    justify-self: end;
    align-items: center;
    gap: 1rem;
}

.user-menu__identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
    transition: background var(--transition);
}

.user-menu__identity:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-menu__identity > span:last-child {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.2;
}

.user-menu__identity strong {
    max-width: 150px;
    overflow: hidden;
    color: var(--white);
    font-size: 0.81rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu__identity small {
    margin-top: 0.16rem;
    color: var(--oatmeal);
    font-size: 0.68rem;
}

.avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border: 1px solid rgba(255, 177, 98, 0.5);
    border-radius: 50%;
    color: var(--burning-flame);
    background: rgba(255, 177, 98, 0.09);
    font-weight: 800;
    place-items: center;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    border: 1px solid rgba(238, 233, 223, 0.18);
    border-radius: 9px;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0;
    border-radius: 2px;
    background: var(--palladian);
    transition: opacity var(--transition), transform var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
    transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(4) {
    transform: translateY(-6px) rotate(-45deg);
}

.page-shell {
    width: min(1460px, calc(100% - 3rem));
    min-height: calc(100vh - 142px);
    margin: 0 auto;
    padding: clamp(2rem, 4vw, 3.6rem) 0;
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.7rem;
}

.page-heading p {
    margin-bottom: 0;
    color: var(--muted);
}

.page-heading__actions {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.inline-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inline-filter label {
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 750;
}

.inline-filter select {
    min-height: 40px;
    padding: 0.55rem 2.2rem 0.55rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
}

.report-filter-bar {
    display: flex;
    align-items: end;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
    padding: 1rem;
}

.report-filter-bar .field {
    min-width: 150px;
    flex: 1 1 160px;
}

.audit-filter-bar .field {
    min-width: 130px;
}

.audit-details summary {
    color: var(--blue-fantastic);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 800;
}

.audit-details pre {
    width: min(520px, 70vw);
    max-height: 260px;
    overflow: auto;
    padding: 0.7rem;
    border-radius: 8px;
    color: #e9f2f8;
    background: #142b40;
    font-size: 0.65rem;
    white-space: pre-wrap;
}

.site-footer {
    display: flex;
    width: min(1460px, calc(100% - 3rem));
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 auto;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
}

.content-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

/* Metrics */

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.metric-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.metric-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    padding: 1.35rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.metric-card::after {
    position: absolute;
    top: -18px;
    right: -18px;
    width: 70px;
    height: 70px;
    border: 14px solid rgba(201, 193, 177, 0.18);
    border-radius: 50%;
    content: "";
}

.metric-card--accent {
    border-color: var(--abyssal);
    color: var(--palladian);
    background: var(--abyssal);
}

.metric-card--accent::after {
    border-color: rgba(255, 177, 98, 0.25);
}

.metric-card__label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.metric-card--accent .metric-card__label {
    color: var(--burning-flame);
}

.metric-card strong {
    position: relative;
    z-index: 1;
    display: block;
    overflow: hidden;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    letter-spacing: -0.04em;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-card small {
    position: relative;
    z-index: 1;
    display: block;
    margin-top: 0.45rem;
    color: var(--muted);
    font-size: 0.77rem;
}

.metric-card--accent small {
    color: var(--oatmeal);
}

.metric-card strong.metric-card__text-value {
    font-size: clamp(1.4rem, 2.5vw, 1.85rem);
}

/* Financial modules */

.visibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 99px;
    color: var(--blue-fantastic);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    font-size: 0.75rem;
    font-weight: 750;
    white-space: nowrap;
}

.visibility-badge::before {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--success);
    content: "";
}

.finance-form-card {
    padding: clamp(1.2rem, 3vw, 1.7rem);
}

.finance-form-card__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 1.35rem;
    padding-bottom: 1.15rem;
    border-bottom: 1px solid var(--line);
}

.finance-form-card__heading h2 {
    margin-bottom: 0.25rem;
}

.finance-form-card__heading p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.finance-form {
    max-width: 980px;
}

.finance-form .form-error--general {
    max-width: 980px;
}

.capture-audit-note {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d6e0e8;
    border-radius: var(--radius-sm);
    color: var(--muted);
    background: #edf2f7;
    font-size: 0.76rem;
}

.capture-audit-note strong {
    color: var(--blue-fantastic);
}

.capture-audit-note small {
    color: var(--muted);
}

.receipt-field input[type="file"] {
    min-height: auto;
    padding: 0.65rem;
    border: 1px dashed #aebdca;
    background: #f8fafb;
}

.receipt-field input[type="file"]::file-selector-button {
    margin-right: 0.75rem;
    padding: 0.5rem 0.7rem;
    border: 0;
    border-radius: 7px;
    color: var(--white);
    background: var(--blue-fantastic);
    cursor: pointer;
    font: inherit;
    font-weight: 700;
}

.field-help,
.receipt-current,
.receipt-link {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.76rem;
}

.receipt-current,
.receipt-link {
    color: var(--blue-fantastic);
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.offering-export-card {
    margin-top: 1.2rem;
    padding: clamp(1.2rem, 3vw, 1.7rem);
}

.offering-export-card__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.offering-export-card__heading h2 {
    margin-bottom: 0.25rem;
}

.offering-export-card__heading p,
.export-status {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
}

.offering-export-table th:nth-child(2),
.offering-export-table td:nth-child(2) {
    text-align: right;
}

.export-status {
    min-height: 1.2em;
    margin-top: 0.7rem;
}

.finance-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
    margin-top: 0.6rem;
    padding-top: 1.15rem;
    border-top: 1px solid var(--line);
}

.finance-records-card {
    margin-top: 1.2rem;
}

.method-badge {
    display: inline-flex;
    padding: 0.34rem 0.55rem;
    border: 1px solid #d6e0e8;
    border-radius: 99px;
    color: var(--blue-fantastic);
    background: #edf2f7;
    font-size: 0.7rem;
    font-weight: 750;
    white-space: nowrap;
}

.financial-description {
    display: block;
    max-width: 310px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.record-note {
    display: block;
    max-width: 220px;
    overflow: hidden;
    color: var(--blue-fantastic);
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* General balance */

.balance-page-title {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
}

.balance-inline-result {
    font-size: 1.12em;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.055em;
    white-space: nowrap;
}

.balance-inline-result.is-positive {
    color: var(--abyssal);
}

.balance-inline-result.is-negative {
    color: var(--danger);
}

.balance-scope-note {
    margin-bottom: 1.2rem;
    padding: 0.85rem 1rem;
    border: 1px solid #cbd7e5;
    border-radius: var(--radius-sm);
    color: var(--blue-fantastic);
    background: #edf2f7;
    font-size: 0.82rem;
}

.balance-scope-note strong {
    color: var(--abyssal);
}

.balance-layout {
    display: grid;
    grid-template-columns: minmax(420px, 1fr) minmax(480px, 1.1fr) minmax(260px, 0.55fr);
    align-items: start;
    gap: 1.2rem;
}

.balance-table-card,
.balance-summary-card {
    overflow: hidden;
}

.balance-table-card__header,
.balance-summary-card > header {
    display: flex;
    min-height: 90px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    color: var(--white);
    background:
        radial-gradient(circle at 100% 0, rgba(255, 177, 98, 0.18), transparent 45%),
        #28649a;
}

.balance-table-card__header--expenses {
    background:
        radial-gradient(circle at 100% 0, rgba(255, 177, 98, 0.2), transparent 45%),
        var(--blue-fantastic);
}

.balance-table-card__header h2,
.balance-summary-card > header h2 {
    margin-bottom: 0;
    color: var(--white);
}

.balance-table-card__header .eyebrow,
.balance-summary-card > header .eyebrow {
    margin-bottom: 0.25rem;
}

.balance-table-card__header > strong {
    font-size: clamp(1.15rem, 2vw, 1.55rem);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.balance-data-table {
    font-size: 0.8rem;
}

.balance-data-table th,
.balance-data-table td {
    padding: 0.78rem 0.82rem;
}

.balance-data-table tbody tr:nth-child(even):not(.empty-row) {
    background: #faf9f6;
}

.balance-data-table .balance-subtotal {
    color: var(--abyssal);
    font-weight: 800;
    white-space: nowrap;
}

.balance-data-table tfoot th,
.balance-data-table tfoot td {
    padding: 0.9rem 0.82rem;
    border-top: 2px solid var(--blue-fantastic);
    color: var(--abyssal);
    background: #e8eef4;
    font-size: 0.82rem;
    font-weight: 850;
    text-align: right;
}

.balance-empty {
    padding: 3rem 1rem;
    color: var(--muted);
    text-align: center;
}

.balance-summary-card > header {
    min-height: 90px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    background: var(--abyssal);
}

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

.balance-summary-table th,
.balance-summary-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--line);
}

.balance-summary-table th {
    width: 45%;
    color: var(--palladian);
    background: #28649a;
    font-size: 0.78rem;
    text-align: left;
}

.balance-summary-table td {
    color: var(--abyssal);
    background: var(--white);
    font-size: 0.95rem;
    font-variant-numeric: tabular-nums;
    font-weight: 750;
    text-align: right;
    white-space: nowrap;
}

.balance-summary-table__result th,
.balance-summary-table__result td {
    border-bottom: 0;
}

.balance-summary-table__result td {
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    font-weight: 850;
}

.balance-summary-table__result.is-positive td {
    color: var(--success);
    background: var(--success-soft);
}

.balance-summary-table__result.is-negative td {
    color: var(--danger);
    background: var(--danger-soft);
}

.balance-summary-card > p {
    margin: 0;
    padding: 0.75rem 1rem;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 0.72rem;
    text-align: right;
}

/* Records */

.records-card {
    overflow: hidden;
}

.records-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid var(--line);
}

.records-toolbar h2 {
    margin-bottom: 0.25rem;
    font-size: 1.15rem;
}

.records-toolbar p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.search-form {
    position: relative;
    width: min(100%, 360px);
}

.search-form input {
    padding: 0.65rem 2.5rem 0.65rem 2.35rem;
    font-size: 0.88rem;
}

.search-form__icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 0.85rem;
    width: 13px;
    height: 13px;
    border: 2px solid var(--slate);
    border-radius: 50%;
    transform: translateY(-58%);
}

.search-form__icon::after {
    position: absolute;
    right: -5px;
    bottom: -3px;
    width: 6px;
    height: 2px;
    border-radius: 2px;
    background: var(--slate);
    content: "";
    transform: rotate(45deg);
}

.search-form__clear {
    position: absolute;
    top: 50%;
    right: 0.55rem;
    display: grid;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--muted);
    font-size: 1.1rem;
    transform: translateY(-50%);
    place-items: center;
}

.search-form__clear:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.data-table th,
.data-table td {
    padding: 0.95rem 1rem;
    border-bottom: 1px solid #ece9e2;
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--muted);
    background: #faf9f6;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background var(--transition);
}

.data-table tbody tr:not(.empty-row):hover {
    background: #fcfaf6;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table .row-number {
    width: 1%;
    text-align: center;
    white-space: nowrap;
}

.data-table td > strong,
.data-table td > small {
    display: block;
}

.data-table td > strong {
    max-width: 260px;
    overflow: hidden;
    font-size: 0.82rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.data-table td > small {
    margin-top: 0.18rem;
    color: var(--muted);
    font-size: 0.72rem;
}

.numeric {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}

.person-cell {
    display: flex;
    min-width: 190px;
    align-items: center;
    gap: 0.65rem;
}

.person-cell__avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 10px;
    color: var(--truffle);
    background: #f5e6df;
    font-weight: 800;
    place-items: center;
}

.person-cell > span:last-child {
    min-width: 0;
}

.person-cell strong,
.person-cell small {
    display: block;
}

.person-cell strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.person-cell small {
    margin-top: 0.12rem;
    color: var(--muted);
    font-size: 0.69rem;
}

.size-badge {
    display: inline-grid;
    min-width: 34px;
    height: 30px;
    padding: 0 0.45rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--blue-fantastic);
    background: var(--surface-soft);
    font-size: 0.76rem;
    font-weight: 800;
    place-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.55rem;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 750;
    white-space: nowrap;
}

.status-badge::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.status-badge--success {
    color: var(--success);
    background: var(--success-soft);
}

.status-badge--pending {
    color: var(--warning);
    background: var(--warning-soft);
}

.status-badge--danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
}

.icon-button {
    min-height: 34px;
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--blue-fantastic);
    background: var(--white);
    cursor: pointer;
    font-size: 0.7rem;
    font-weight: 750;
    transition:
        border var(--transition),
        color var(--transition),
        background var(--transition);
}

.icon-button:hover {
    border-color: var(--slate);
    background: #f2f5f7;
}

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

.icon-button:disabled:hover {
    border-color: var(--line);
    background: var(--white);
}

.icon-button--danger {
    color: var(--danger);
}

.icon-button--danger:hover {
    border-color: #e4aaa5;
    background: var(--danger-soft);
}

.permission-summary {
    display: flex;
    min-width: 145px;
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
}

.permission-summary small {
    color: var(--muted);
    font-size: 0.72rem;
}

.area-badge {
    display: inline-flex;
    padding: 0.35rem 0.58rem;
    border: 1px solid #d6e0e8;
    border-radius: 99px;
    color: var(--blue-fantastic);
    background: #edf2f7;
    font-size: 0.72rem;
    font-weight: 750;
    white-space: nowrap;
}

.area-admin-card {
    margin-top: 1.2rem;
    overflow: hidden;
}

.area-admin-card__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
    border-bottom: 1px solid var(--line);
}

.area-admin-card__heading h2 {
    margin-bottom: 0.25rem;
}

.area-admin-card__heading p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.area-admin-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.55fr) minmax(420px, 1.45fr);
    align-items: start;
}

.area-form {
    padding: 1.25rem;
    border-right: 1px solid var(--line);
    background: var(--surface-soft);
}

.area-form__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
    margin-top: 0.8rem;
}

.area-table td:first-child {
    min-width: 180px;
}

.empty-state {
    display: grid;
    min-height: 260px;
    padding: 2rem;
    color: var(--muted);
    text-align: center;
    place-content: center;
}

.empty-state > span {
    color: var(--burning-flame);
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 0.75;
}

.empty-state strong {
    margin-top: 1rem;
    color: var(--ink);
    font-size: 1.05rem;
}

.empty-state p {
    margin: 0.3rem 0 0;
    font-size: 0.85rem;
}

/* Modal */

.modal {
    position: fixed;
    z-index: 150;
    inset: 0;
    display: grid;
    visibility: hidden;
    padding: 1.2rem;
    opacity: 0;
    transition:
        opacity var(--transition),
        visibility var(--transition);
    place-items: center;
}

.modal.is-open {
    visibility: visible;
    opacity: 1;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 27, 36, 0.75);
    backdrop-filter: blur(5px);
}

.modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 760px);
    max-height: calc(100vh - 2.4rem);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: 0 28px 80px rgba(11, 17, 24, 0.35);
    transform: translateY(15px) scale(0.985);
    transition: transform var(--transition);
}

.modal.is-open .modal__panel {
    transform: translateY(0) scale(1);
}

.modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.6rem 1rem;
    border-bottom: 1px solid var(--line);
}

.modal__header h2 {
    margin-bottom: 0;
}

.modal__close {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--muted);
    background: var(--surface-soft);
    cursor: pointer;
    font-size: 1.5rem;
    place-items: center;
}

.modal__close:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

.record-form {
    padding: 1.4rem 1.6rem 1.6rem;
}

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

[data-user-password-label] {
    color: inherit !important;
}

.field--wide {
    grid-column: 1 / -1;
}

.kit-choice {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.kit-choice legend {
    margin-bottom: 0.55rem;
    color: var(--ink);
    font-size: 0.87rem;
    font-weight: 750;
}

.kit-choice legend span {
    color: var(--truffle);
}

.kit-choice__options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.kit-choice__option {
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.kit-choice__option:has(input:checked) {
    border-color: var(--burning-flame);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(255, 177, 98, 0.18);
}

.kit-choice__option input {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    accent-color: var(--burning-flame);
}

.kit-choice__option > span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 0.2rem;
}

.kit-choice__option strong {
    color: var(--ink);
    font-size: 0.88rem;
}

.kit-choice__option small {
    color: var(--muted);
    font-size: 0.76rem;
}

[data-shirt-size-field][hidden],
[data-shirt-delivery-field][hidden],
[data-payment-field][hidden] {
    display: none !important;
}

.form-error--general {
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    color: var(--danger);
    background: var(--danger-soft);
    font-size: 0.84rem;
}

.switch-field {
    display: flex;
    min-height: 70px;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    cursor: pointer;
}

.switch-field > span:first-child {
    display: flex;
    flex-direction: column;
}

.switch-field strong {
    font-size: 0.88rem;
}

.switch-field small {
    margin-top: 0.2rem;
    color: var(--muted);
    font-size: 0.74rem;
}

.switch {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 auto;
}

.switch input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.switch > span {
    position: absolute;
    inset: 0;
    border-radius: 99px;
    background: var(--oatmeal);
    transition: background var(--transition);
}

.switch > span::after {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 2px 4px rgba(27, 38, 50, 0.2);
    content: "";
    transition: transform var(--transition);
}

.switch input:checked + span {
    background: var(--success);
}

.switch input:checked + span::after {
    transform: translateX(20px);
}

.switch input:focus-visible + span {
    outline: 3px solid rgba(255, 177, 98, 0.6);
    outline-offset: 3px;
}

.modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 1px solid var(--line);
}

.modal-open {
    overflow: hidden;
}

/* Reports */

.charts-grid,
.summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
    margin-top: 1.2rem;
}

.chart-card,
.summary-card {
    min-width: 0;
    padding: 1.35rem;
}

.card-heading {
    display: flex;
    min-height: 58px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.card-heading h2 {
    margin-bottom: 0;
    font-size: 1.22rem;
}

.card-heading .eyebrow {
    margin-bottom: 0.35rem;
}

.card-heading__meta {
    padding: 0.38rem 0.6rem;
    border: 1px solid var(--line);
    border-radius: 99px;
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 0.69rem;
    font-weight: 700;
    white-space: nowrap;
}

.chart-box {
    position: relative;
    height: 315px;
    margin-top: 0.8rem;
}

.chart-box--donut {
    max-width: 350px;
    margin-right: auto;
    margin-left: auto;
}

.chart-empty {
    position: absolute;
    inset: 0;
    display: grid;
    padding: 2rem;
    color: var(--muted);
    text-align: center;
    place-items: center;
}

.chart-empty[hidden] {
    display: none;
}

.chart-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 0.6rem;
    color: var(--muted);
    font-size: 0.76rem;
}

.chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.legend-dot--orange {
    background: var(--burning-flame);
}

.legend-dot--navy {
    background: var(--blue-fantastic);
}

.summary-list {
    margin-top: 1rem;
}

.summary-row {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    min-height: 50px;
    border-bottom: 1px solid #ece9e2;
}

.summary-row:last-child {
    border-bottom: 0;
}

.summary-row__rank {
    display: grid;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    color: var(--truffle);
    background: #f5e6df;
    font-size: 0.7rem;
    font-weight: 800;
    place-items: center;
}

.summary-row__name {
    min-width: 0;
    overflow: hidden;
    font-size: 0.85rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.summary-row > strong {
    display: grid;
    min-width: 34px;
    height: 28px;
    border-radius: 8px;
    color: var(--palladian);
    background: var(--blue-fantastic);
    font-size: 0.75rem;
    place-items: center;
}

.summary-empty {
    padding: 2.3rem 1rem;
    color: var(--muted);
    text-align: center;
    font-size: 0.85rem;
}

/* Profile */

/* Database backups */

.backup-security-grid {
    display: grid;
    margin-bottom: 1.2rem;
    grid-template-columns: minmax(360px, 1.15fr) minmax(300px, 0.85fr);
    gap: 1.2rem;
}

.backup-access-card,
.backup-scope-card {
    padding: 1.4rem;
}

.backup-access-card .card-heading,
.backup-list-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.backup-access-card .card-heading h2,
.backup-scope-card h2,
.backup-list-header h2 {
    margin-bottom: 0;
}

.backup-access-card > .muted {
    margin: 0.8rem 0 1.1rem;
}

.backup-access-actions,
.backup-row-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.backup-auth-form {
    max-width: 520px;
}

.backup-auth-form .button {
    justify-self: start;
}

.backup-scope-card {
    background: linear-gradient(145deg, #fff 0%, #faf8f3 100%);
}

.backup-scope-list {
    display: grid;
    margin: 1rem 0;
    padding-left: 1.15rem;
    color: var(--muted);
    gap: 0.65rem;
}

.backup-scope-list strong {
    color: var(--ink);
}

.backup-sensitive-note {
    margin: 0;
    padding: 0.85rem;
    border: 1px solid #edd4a8;
    border-radius: var(--radius-sm);
    color: var(--warning);
    background: var(--warning-soft);
    font-size: 0.8rem;
}

.backup-list-card {
    overflow: hidden;
}

.backup-list-header {
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--line);
}

.backup-list-header small {
    color: var(--muted);
}

.backup-table td:last-child {
    min-width: 220px;
}

.backup-checksum {
    display: inline-block;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    color: var(--abyssal);
    background: var(--surface-soft);
    font-size: 0.72rem;
}

.backup-empty-state {
    min-height: 220px;
}

.profile-grid {
    display: grid;
    max-width: 980px;
    grid-template-columns: minmax(250px, 0.7fr) minmax(420px, 1.3fr);
    gap: 1.2rem;
}

.profile-card {
    position: relative;
    overflow: hidden;
    padding: 2rem 1.6rem;
    border-radius: var(--radius-md);
    color: var(--palladian);
    background:
        radial-gradient(circle at 100% 0, rgba(99, 114, 134, 0.4), transparent 43%),
        var(--abyssal);
    box-shadow: var(--shadow-md);
    text-align: center;
}

.profile-card__accent {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--burning-flame), var(--truffle));
}

.profile-avatar {
    display: grid;
    width: 86px;
    height: 86px;
    margin: 0 auto 1.2rem;
    border: 2px solid rgba(255, 177, 98, 0.68);
    border-radius: 50%;
    color: var(--burning-flame);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 7px rgba(255, 177, 98, 0.06);
    font-size: 2.1rem;
    font-weight: 800;
    place-items: center;
}

.profile-card h2 {
    margin-bottom: 0.25rem;
    color: var(--white);
}

.profile-card > p {
    color: var(--oatmeal);
    font-size: 0.85rem;
}

.profile-details {
    margin: 1.7rem 0 0;
    border-top: 1px solid rgba(238, 233, 223, 0.12);
    text-align: left;
}

.profile-details > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 0;
    border-bottom: 1px solid rgba(238, 233, 223, 0.1);
}

.profile-details dt {
    color: var(--oatmeal);
    font-size: 0.73rem;
}

.profile-details dd {
    margin: 0;
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 700;
    text-align: right;
}

.password-card {
    padding: clamp(1.4rem, 3vw, 2rem);
}

.password-card > .muted {
    margin-bottom: 1.35rem;
    font-size: 0.86rem;
}

.security-icon {
    position: relative;
    display: grid;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    color: var(--burning-flame);
    background: var(--abyssal);
    font-size: 0.55rem;
    place-items: center;
}

.security-icon::before {
    position: absolute;
    top: 9px;
    width: 15px;
    height: 13px;
    border: 3px solid var(--burning-flame);
    border-bottom: 0;
    border-radius: 9px 9px 0 0;
    content: "";
}

.security-icon::after {
    position: absolute;
    top: 19px;
    width: 20px;
    height: 15px;
    border-radius: 4px;
    background: var(--burning-flame);
    content: "";
}

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

.password-rules {
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--muted);
    background: var(--surface-soft);
    font-size: 0.76rem;
}

.password-rules strong {
    color: var(--ink);
}

.password-rules ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1.2rem;
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
}

.password-rules > small {
    display: block;
    margin-top: 0.55rem;
    color: var(--muted);
}

/* Responsive */

@media (max-width: 1380px) {
    .login-brand-panel {
        padding: 3.5rem;
    }

    .login-brand-panel__footer {
        left: 3.5rem;
    }

    .balance-layout {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .balance-summary-card {
        width: min(100%, 520px);
        grid-column: 1 / -1;
        justify-self: end;
    }
}

@media (max-width: 1120px) {
    .topbar {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }

    .primary-nav {
        position: absolute;
        top: calc(100% + 0.55rem);
        right: max(1rem, 3vw);
        display: none;
        width: min(320px, calc(100vw - 2rem));
        max-height: calc(100vh - 96px);
        overflow-y: auto;
        flex-direction: column;
        align-items: stretch;
        padding: 0.6rem;
        border-color: rgba(238, 233, 223, 0.15);
        background: var(--abyssal);
        box-shadow: 0 18px 45px rgba(5, 15, 24, 0.35);
    }

    .primary-nav.is-open {
        display: flex;
    }

    .nav-group,
    .nav-group summary {
        width: 100%;
    }

    .nav-group summary {
        justify-content: space-between;
    }

    .nav-group__menu,
    .nav-group__menu--right {
        position: static;
        min-width: 0;
        max-height: none;
        margin-top: 0.25rem;
        border-color: rgba(238, 233, 223, 0.08);
        background: rgba(255, 255, 255, 0.035);
        box-shadow: none;
    }

    .nav-toggle {
        display: flex;
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .user-menu {
        grid-column: 3;
        grid-row: 1;
    }
}

@media (max-width: 900px) {
    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        display: none;
    }

    .login-form-panel {
        background:
            radial-gradient(circle at 90% 5%, rgba(255, 177, 98, 0.24), transparent 16rem),
            linear-gradient(160deg, var(--abyssal) 0 30%, var(--palladian) 30% 100%);
    }

    .login-card__mobile-brand {
        display: flex;
    }

    .public-registration-body {
        background:
            radial-gradient(circle at 10% 4%, rgba(255, 177, 98, 0.2), transparent 20rem),
            #edf1f4;
    }

    .public-registration-header {
        width: 100%;
        padding: 0.65rem 1rem;
        background: var(--abyssal);
    }

    .public-registration-shell {
        grid-template-columns: 1fr;
        gap: 1.2rem;
        padding-top: 1rem;
    }

    .public-registration-intro {
        position: static;
        padding: 1.5rem;
        border-radius: 20px;
        background: var(--abyssal);
    }

    .public-registration-intro h1 {
        font-size: clamp(2.3rem, 10vw, 4rem);
    }

    .metric-grid,
    .metric-grid--compact,
    .metric-grid--two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .charts-grid,
    .summary-grid {
        grid-template-columns: 1fr;
    }

    .balance-layout {
        grid-template-columns: 1fr;
    }

    .balance-summary-card {
        width: 100%;
        grid-column: auto;
    }

    .area-admin-layout {
        grid-template-columns: 1fr;
    }

    .area-form {
        border-right: 0;
        border-bottom: 1px solid var(--line);
    }
}

@media (max-width: 760px) {
    .app-body {
        padding-top: 68px;
    }

    .topbar {
        height: 68px;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 0.7rem;
        padding: 0 1rem;
    }

    .brand__text small {
        display: none;
    }

    .brand__mark {
        width: 58px;
        height: 32px;
    }

    .nav-toggle {
        margin-right: 0;
    }

    .user-menu__identity {
        display: none;
    }

    .user-menu .button {
        min-width: 42px;
        padding: 0.55rem;
        font-size: 0;
    }

    .user-menu .button::before {
        content: "↪";
        font-size: 1.1rem;
        transform: rotate(180deg);
    }

    .page-shell,
    .site-footer {
        width: min(100% - 1.5rem, 1460px);
    }

    .page-shell {
        padding: 1.65rem 0 2.5rem;
    }

    .page-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }

    .page-heading .button {
        width: 100%;
    }

    .visibility-badge {
        align-self: flex-start;
    }

    .finance-form-card__heading {
        flex-direction: column;
    }

    .finance-form-card__heading .button {
        width: 100%;
    }

    .offering-export-card__heading {
        flex-direction: column;
    }

    .offering-export-card__heading .button {
        width: 100%;
    }

    .capture-audit-note {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

    .records-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .search-form {
        width: 100%;
    }

    .table-wrap {
        overflow: visible;
    }

    .data-table,
    .data-table tbody {
        display: block;
    }

    .data-table thead {
        display: none;
    }

    .data-table tr {
        display: block;
        margin: 0.75rem;
        padding: 0.85rem;
        border: 1px solid var(--line);
        border-radius: 14px;
        background: var(--white);
        box-shadow: 0 3px 10px rgba(27, 38, 50, 0.04);
    }

    .data-table td {
        display: grid;
        grid-template-columns: minmax(105px, 0.65fr) minmax(0, 1.35fr);
        align-items: center;
        gap: 0.8rem;
        padding: 0.6rem 0;
        border-bottom: 1px solid #efede8;
        text-align: right;
    }

    .data-table td::before {
        color: var(--muted);
        content: attr(data-label);
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-align: left;
        text-transform: uppercase;
    }

    .data-table td.person-column {
        display: block;
        padding-top: 0;
        text-align: left;
    }

    .data-table td.person-column::before {
        display: none;
    }

    .data-table td:last-child {
        border-bottom: 0;
    }

    .balance-data-table tfoot {
        display: block;
    }

    .balance-data-table tfoot tr {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        margin: 0.75rem;
        padding: 0.9rem;
        border: 0;
        border-radius: 12px;
        background: #e8eef4;
        box-shadow: none;
    }

    .balance-data-table tfoot th,
    .balance-data-table tfoot td {
        display: block;
        width: auto;
        padding: 0;
        border: 0;
        background: transparent;
        text-align: left;
    }

    .balance-data-table tfoot td::before {
        display: none;
    }

    .data-table td > strong {
        max-width: none;
        white-space: normal;
    }

    .person-cell {
        min-width: 0;
    }

    .row-actions {
        justify-content: flex-end;
    }

    .empty-row td {
        display: block;
    }

    .empty-row td::before {
        display: none;
    }

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

    .backup-security-grid {
        grid-template-columns: 1fr;
    }

    .backup-access-actions,
    .backup-access-actions form,
    .backup-access-actions .button {
        width: 100%;
    }

    .backup-row-actions {
        justify-content: flex-end;
    }

    .profile-card {
        padding: 1.7rem 1.4rem;
    }

    .flash-stack {
        top: 4.8rem;
        right: 0.75rem;
    }
}

@media (max-width: 560px) {
    .login-form-panel {
        padding: 0.75rem;
    }

    .login-card {
        padding: 1.45rem;
        border-radius: 22px;
    }

    .metric-grid,
    .metric-grid--compact,
    .metric-grid--two {
        grid-template-columns: 1fr;
    }

    .metric-card {
        padding: 1.15rem;
    }

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

    .account-form-grid {
        grid-template-columns: 1fr;
    }

    .field--wide {
        grid-column: auto;
    }

    .kit-choice__options {
        grid-template-columns: 1fr;
    }

    .public-registration-header .brand__text {
        display: none;
    }

    .public-registration-header .button {
        min-height: 40px;
        padding: 0.6rem 0.8rem;
        font-size: 0.72rem;
    }

    .public-registration-shell {
        width: min(100% - 1rem, 1240px);
    }

    .public-registration-intro,
    .public-registration-card {
        border-radius: 16px;
    }

    .captcha-challenge {
        align-items: flex-start;
        flex-direction: column;
    }

    .captcha-field input {
        max-width: none;
    }

    .modal {
        align-items: end;
        padding: 0;
    }

    .modal__panel {
        width: 100%;
        max-height: 94vh;
        border-radius: 22px 22px 0 0;
    }

    .modal__header,
    .record-form {
        padding-right: 1rem;
        padding-left: 1rem;
    }

    .modal__actions {
        position: sticky;
        z-index: 2;
        bottom: -1.6rem;
        margin-right: -1rem;
        margin-left: -1rem;
        padding: 1rem;
        background: var(--white);
    }

    .modal__actions .button {
        flex: 1;
    }

    .chart-card,
    .summary-card,
    .password-card {
        padding: 1rem;
    }

    .chart-box {
        height: 270px;
    }

    .password-rules ul {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

@media print {
    .topbar,
    .page-heading .button,
    .site-footer,
    .flash-stack {
        display: none !important;
    }

    .app-body {
        padding-top: 0;
        background: var(--white);
    }

    .page-shell {
        width: 100%;
        padding: 0;
    }

    .content-card,
    .metric-card {
        box-shadow: none;
        break-inside: avoid;
    }
}


/* Branding */
.branding-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1.3fr);
    align-items: start;
    gap: 1.25rem;
}

.branding-preview,
.branding-form {
    padding: 1.35rem;
}

.branding-preview {
    position: sticky;
    top: 92px;
}

.branding-preview__topbar {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-top: 0.8rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--palladian);
    background: var(--abyssal);
}

.branding-preview__topbar img {
    width: 58px;
    height: 32px;
    border-radius: 6px;
    object-fit: cover;
}

.branding-preview__topbar div,
.branding-preview__login {
    display: flex;
    flex-direction: column;
}

.branding-preview__topbar strong { color: var(--white); font-size: 0.84rem; }
.branding-preview__topbar small { color: var(--oatmeal); font-size: 0.68rem; }

.branding-preview__login {
    gap: 0.55rem;
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    color: var(--palladian);
    background: var(--blue-fantastic);
}

.branding-preview__login img {
    width: 100%;
    max-height: 150px;
    margin-bottom: 0.35rem;
    border-radius: 8px;
    object-fit: contain;
}

.branding-preview__login span { color: var(--burning-flame); font-size: 0.7rem; font-weight: 700; text-transform: uppercase; }
.branding-preview__login strong { color: var(--white); font-size: 1.08rem; line-height: 1.2; }
.branding-preview__login small { color: var(--palladian); font-size: 0.76rem; }

.branding-preview__palette {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.35rem;
    margin-top: 1rem;
}

.branding-preview__palette input {
    display: block;
    width: 100%;
    height: 24px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: default;
}

.branding-fieldset {
    margin: 1.3rem 0;
    padding: 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.branding-fieldset legend {
    padding: 0 0.4rem;
    color: var(--abyssal);
    font-weight: 750;
}

.branding-color-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.branding-color-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 40px;
    gap: 0.35rem 0.55rem;
    align-items: center;
}

.branding-color-field label,
.branding-color-field .field-error { grid-column: 1 / -1; }
.branding-color-field label { font-size: 0.78rem; font-weight: 700; }
.branding-color-field input { width: 100%; height: 38px; padding: 3px; border-radius: 7px; cursor: pointer; }
.branding-color-field output { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 0.68rem; }

@media (max-width: 920px) {
    .branding-layout { grid-template-columns: 1fr; }
    .branding-preview { position: static; }
}

@media (max-width: 620px) {
    .branding-color-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* Payment method selector */
.payment-method-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.6rem;
}

.payment-method-option {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.payment-method-option:hover {
    border-color: var(--burning-flame);
    background: var(--surface-soft);
}

.payment-method-option:has(input:checked) {
    border-color: var(--burning-flame);
    background: color-mix(in srgb, var(--burning-flame) 8%, var(--surface));
}

.payment-method-option input {
    margin: 0;
    accent-color: var(--burning-flame);
}

.payment-method-option span {
    display: flex;
    flex-direction: column;
}

.payment-method-option strong {
    font-size: 0.88rem;
}

.payment-method-option small {
    color: var(--muted);
    font-size: 0.72rem;
}

/* Payment result page */
.public-registration-shell--centered {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 2rem;
}

.payment-result-card {
    max-width: 560px;
    width: 100%;
}

.payment-result {
    text-align: center;
    padding: 1.5rem 0;
}

.payment-result__icon {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    font-size: 2rem;
    font-weight: 800;
    place-items: center;
}

.payment-result__icon--success {
    color: var(--success);
    background: var(--success-soft);
}

.payment-result__icon--danger {
    color: var(--danger);
    background: var(--danger-soft);
}

.payment-result__icon--warning {
    color: var(--warning);
    background: var(--warning-soft);
}

.payment-result__icon--info {
    color: var(--blue-fantastic);
    background: var(--surface-soft);
}

.payment-result h1 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.payment-result p {
    color: var(--muted);
    font-size: 0.88rem;
}

.payment-result__details {
    display: grid;
    gap: 0.4rem;
    margin-top: 1.2rem;
    padding: 1rem;
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
    text-align: left;
}

.payment-result__details div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.payment-result__details dt {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 600;
}

.payment-result__details dd {
    font-size: 0.8rem;
    font-weight: 700;
    text-align: right;
    word-break: break-all;
}

.payment-result__details--bank {
    text-align: left;
}

.payment-result__message {
    margin-top: 1rem;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    color: var(--ink);
    background: var(--surface-soft);
    font-size: 0.82rem;
    line-height: 1.55;
    text-align: left;
}


/* Bank details inline card */
.payment-bank-card {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.payment-bank-card strong {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.84rem;
}

.payment-bank-list {
    display: grid;
    gap: 0.35rem;
}

.payment-bank-list div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.payment-bank-list dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 600;
}

.payment-bank-list dd {
    font-size: 0.78rem;
    font-weight: 700;
    text-align: right;
    word-break: break-all;
}

.payment-bank-message {
    margin-top: 0.75rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
}


.payment-bank-details[hidden] {
    display: none !important;
}


/* Dark mode */
[data-theme="dark"] {
    --palladian: #0d1520;
    --oatmeal: #2a3544;
    --burning-flame: #ff9f40;
    --truffle: #e06530;
    --blue-fantastic: #1a2a3a;
    --abyssal: #0a1018;
    --white: #111a24;
    --ink: #f0f3f6;
    --muted: #8fa3b6;
    --line: #1e2e3e;
    --surface: #0f1a26;
    --surface-soft: #080f18;
    --success: #2dd4a0;
    --success-soft: rgba(45, 212, 160, 0.15);
    --warning: #facc15;
    --warning-soft: rgba(250, 204, 21, 0.15);
    --danger: #fb7185;
    --danger-soft: rgba(251, 113, 133, 0.15);
    --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
}

[data-theme="dark"] body,
[data-theme="dark"] .app-body {
    background: #080f18;
}

[data-theme="dark"] .topbar {
    background: #050a10;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .content-card,
[data-theme="dark"] .metric-card {
    border-color: #1e2e3e;
    background: #0f1a26;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .metric-card--accent {
    background: #0a1018;
    border-color: #1e2e3e;
}

[data-theme="dark"] .data-table th {
    background: #050a10;
    color: #f0f3f6;
}

[data-theme="dark"] .data-table td {
    border-color: #1e2e3e;
}

[data-theme="dark"] .data-table tr:hover td {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    color: #f0f3f6;
    background: #0a1220;
    border-color: #1e2e3e;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    border-color: #ff9f40;
    box-shadow: 0 0 0 3px rgba(255, 159, 64, 0.2);
}

[data-theme="dark"] .nav-group__menu {
    background: #050a10;
    border-color: #1e2e3e;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .nav-group__menu a {
    color: #c0cdd8;
}

[data-theme="dark"] .nav-group__menu a:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .page-heading {
    color: #f0f3f6;
}

[data-theme="dark"] .alert--static {
    border-color: #1e2e3e;
}

[data-theme="dark"] .button--secondary {
    background: #0f1a26;
    border-color: #1e2e3e;
    color: #c0cdd8;
}

[data-theme="dark"] .button--secondary:hover {
    background: #162436;
    border-color: #2a3e52;
}

[data-theme="dark"] .site-footer {
    border-color: #1e2e3e;
    color: #5a7088;
}

[data-theme="dark"] .profile-card,
[data-theme="dark"] .password-card {
    background: #0f1a26;
    border-color: #1e2e3e;
}

[data-theme="dark"] .quick-result-card {
    background: #0f1a26;
    border-color: #1e2e3e;
}

[data-theme="dark"] .progress-bar {
    background: #0a1220;
    border-color: #1e2e3e;
}

[data-theme="dark"] .eyebrow {
    color: #ff9f40;
}

[data-theme="dark"] .muted {
    color: #6b8299;
}

.theme-toggle {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(238, 233, 223, 0.15);
    border-radius: 8px;
    color: var(--palladian);
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    transition: background 180ms ease;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Progress bar */
.progress-bar {
    position: relative;
    height: 22px;
    min-width: 80px;
    border-radius: 11px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
    overflow: hidden;
}

.progress-bar__fill {
    height: 100%;
    border-radius: 11px;
    background: var(--success);
    transition: width 400ms ease;
}

.progress-bar__label {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--ink);
}

/* Quick register */
.quick-register-card {
    padding: 1.5rem;
}

.quick-search-form {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.quick-search-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-size: 1rem;
}

.quick-search-form input:focus {
    border-color: var(--burning-flame);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 177, 98, 0.18);
}

.quick-results {
    display: grid;
    gap: 0.65rem;
}

.quick-result-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface-soft);
}

.quick-result-card__info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.quick-result-card__info strong {
    font-size: 0.95rem;
}

.quick-result-card__info small {
    color: var(--muted);
    font-size: 0.76rem;
}

.quick-empty {
    text-align: center;
    padding: 2rem;
    color: var(--muted);
}

.records-export-actions {
    display: flex;
    gap: 0.4rem;
}

@media (max-width: 768px) {
    .quick-search-form {
        flex-direction: column;
    }

    .quick-result-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .records-export-actions {
        width: 100%;
        justify-content: flex-end;
    }
}


/* Enhanced responsive */
@media (max-width: 480px) {
    .page-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .page-heading h1 {
        font-size: 1.5rem;
    }

    .page-heading__actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .metric-grid,
    .metric-grid--compact,
    .metric-grid--two {
        grid-template-columns: 1fr;
    }

    .balance-layout {
        grid-template-columns: 1fr;
    }

    .inline-filter {
        width: 100%;
    }

    .inline-filter select {
        width: 100%;
    }

    .button--small {
        padding: 0.5rem 0.7rem;
        font-size: 0.72rem;
    }

    .records-toolbar {
        flex-direction: column;
        gap: 0.75rem;
    }

    .records-toolbar .search-form {
        width: 100%;
    }

    .user-menu__identity strong,
    .user-menu__identity small {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .branding-layout {
        grid-template-columns: 1fr;
    }

    .branding-color-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .field--wide {
        grid-column: auto;
    }

    .balance-export-actions {
        flex-wrap: wrap;
    }

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

    .backup-security-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 360px) {
    body {
        font-size: 14px;
    }

    .topbar {
        padding: 0 2vw;
        height: 64px;
    }

    .page-shell {
        padding-top: 64px;
    }

    .brand__mark {
        width: 50px;
        height: 28px;
    }
}


/* Permisos matrix */
.permisos-form {
    padding: 1.2rem;
}

.permisos-table {
    font-size: 0.8rem;
}

.permisos-table__permiso {
    min-width: 200px;
}

.permisos-table__rol {
    text-align: center;
    min-width: 90px;
    white-space: nowrap;
}

.permisos-table__grupo td {
    padding: 0.7rem 0.6rem 0.4rem;
    border-bottom: 2px solid var(--abyssal);
    background: var(--surface-soft);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.permisos-table__permiso-cell {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.permisos-table__permiso-cell strong {
    font-size: 0.78rem;
}

.permisos-table__permiso-cell small {
    color: var(--muted);
    font-size: 0.68rem;
}

.permisos-table__check {
    text-align: center;
    vertical-align: middle;
}

.permisos-table__check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--burning-flame);
    cursor: pointer;
}

.permisos-table__check input[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.permisos-form__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0 0;
    border-top: 1px solid var(--line);
    margin-top: 1rem;
}
