:root {
    --identity-brown: #2f1e13;
    --identity-brown-deep: #1d110b;
    --identity-gold: #d4a23f;
    --identity-gold-dark: #9b6b20;
    --identity-cream: #fffaf0;
    --identity-paper: #fffdf8;
    --identity-muted: #715744;
}

.identity-body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    color: var(--identity-brown);
    background: #f4ead8;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

.identity-skip-link {
    position: fixed;
    top: -100px;
    left: 1rem;
    z-index: 100;
    padding: .7rem 1rem;
    border-radius: 0 0 8px 8px;
    color: #201309;
    background: var(--identity-gold);
    font-weight: 800;
}

.identity-skip-link:focus { top: 0; }

.identity-shell {
    display: grid;
    grid-template-columns: minmax(360px, .8fr) minmax(500px, 1.2fr);
    min-height: 100vh;
}

.identity-brand-panel {
    position: relative;
    display: flex;
    align-items: flex-start;
    overflow: hidden;
    padding: 2rem clamp(2.5rem, 6vw, 6rem);
    color: #fff8e9;
    background:
        radial-gradient(circle at 18% 8%, rgba(212,162,63,.28), transparent 25%),
        radial-gradient(circle at 90% 88%, rgba(212,162,63,.14), transparent 30%),
        linear-gradient(145deg, #382216, var(--identity-brown-deep));
    border-right: 4px solid var(--identity-gold);
}

.identity-brand-panel::before,
.identity-brand-panel::after {
    position: absolute;
    border: 1px solid rgba(227,188,105,.17);
    border-radius: 50%;
    content: "";
}

.identity-brand-panel::before { width: 420px; height: 420px; top: -190px; right: -220px; }
.identity-brand-panel::after { width: 300px; height: 300px; right: -135px; bottom: -135px; }

.identity-brand-content { position: relative; z-index: 1; width: 100%; max-width: 570px; }
.identity-logo { display: inline-block; width: min(360px, 82%); margin: 0 0 1.75rem; }
.identity-logo img { display: block; width: 100%; height: auto; filter: drop-shadow(0 14px 22px rgba(0,0,0,.28)); }

.identity-eyebrow,
.identity-manage-kicker {
    color: var(--identity-gold);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.identity-brand-content h2 {
    max-width: 520px;
    margin: .8rem 0 1.1rem;
    color: #fff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.4rem, 4.5vw, 4.8rem);
    font-weight: 900;
    line-height: .98;
    letter-spacing: -.035em;
}

.identity-brand-content > p { max-width: 520px; color: rgba(255,248,233,.76); font-size: 1.02rem; line-height: 1.7; }
.identity-benefits { display: grid; gap: .8rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.identity-benefits li { display: flex; align-items: center; gap: .8rem; color: rgba(255,248,233,.9); font-weight: 700; }
.identity-benefits i { display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(212,162,63,.38); border-radius: 9px; color: var(--identity-gold); background: rgba(212,162,63,.09); }

.identity-main { display: flex; min-width: 0; flex-direction: column; background: radial-gradient(circle at 100% 0, rgba(212,162,63,.12), transparent 28%), #f7efdf; }
.identity-topbar { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem clamp(1.5rem, 4vw, 4rem); border-bottom: 1px solid rgba(74,46,29,.12); color: var(--identity-muted); background: rgba(255,253,248,.8); }
.identity-topbar a { display: inline-flex; align-items: center; gap: .5rem; color: var(--identity-brown); font-weight: 800; text-decoration: none; }
.identity-topbar a:hover { color: var(--identity-gold-dark); }
.identity-topbar span { display: inline-flex; align-items: center; gap: .45rem; font-size: .78rem; font-weight: 700; }
.identity-topbar span i { color: #4f7e3d; }

.identity-content { display: flex; width: 100%; max-width: 860px; flex: 1; flex-direction: column; justify-content: center; margin: auto; padding: clamp(2rem, 6vw, 5rem); }
.identity-card { width: 100%; padding: clamp(1.8rem, 4vw, 3.25rem); border: 1px solid rgba(126,82,31,.2); border-radius: 18px; background: rgba(255,253,248,.98); box-shadow: 0 24px 60px rgba(71,42,19,.14); }
.identity-card > h1,
.identity-card header h1 { margin: 0 0 .7rem; color: var(--identity-brown); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 900; line-height: 1; letter-spacing: -.025em; }
.identity-card h2 { margin: 0 0 1.4rem; color: var(--identity-muted); font-size: 1rem; font-weight: 600; line-height: 1.55; }
.identity-card h3 { color: var(--identity-brown); font-family: Georgia, "Times New Roman", serif; font-weight: 800; }
.identity-card-kicker { margin-bottom: .55rem; color: var(--identity-gold-dark); font-size: .7rem; font-weight: 900; letter-spacing: .15em; text-transform: uppercase; }
.identity-card hr { margin: 1.25rem 0 1.6rem; border-color: rgba(126,82,31,.2); opacity: 1; }
.identity-card > .row { display: block; margin: 0; }
.identity-card > .row > [class*="col-"] { width: 100%; padding: 0; }
.identity-card section { width: 100%; }
.identity-card p { color: var(--identity-muted); line-height: 1.65; }
.identity-card a { color: var(--identity-gold-dark); font-weight: 750; text-underline-offset: 3px; }
.identity-card form + p,
.identity-card form div + div > p:first-child { margin-top: 1.25rem; }

.identity-card .form-floating { margin-bottom: 1rem !important; }
.identity-card .form-control,
.identity-card .form-select { min-height: 58px; border-color: rgba(91,57,34,.25); border-radius: 10px; color: var(--identity-brown); background-color: #fff; }
.identity-card .form-control:focus,
.identity-card .form-select:focus { border-color: var(--identity-gold-dark); box-shadow: 0 0 0 .22rem rgba(212,162,63,.2); }
.identity-card .form-control:disabled { color: #76685d; background: #eee7db; }
.identity-card .form-check-input:checked { border-color: var(--identity-gold-dark); background-color: var(--identity-gold-dark); }
.identity-card .checkbox label { display: flex; align-items: center; gap: .55rem; color: var(--identity-muted); }
.identity-card .btn-primary,
.identity-card button[type="submit"] { min-height: 50px; border-color: #9a671b; border-radius: 10px; color: #24150c; background: linear-gradient(180deg, #e5b452, #c98d2b); font-weight: 900; box-shadow: 0 9px 20px rgba(155,107,32,.18); }
.identity-card .btn-primary:hover,
.identity-card button[type="submit"]:hover { border-color: #805314; color: #fff; background: #9b6b20; }
.identity-card .btn-danger { color: #fff; background: #9b2730; border-color: #7f1d25; }
.identity-card [asp-validation-summary],
.identity-card .validation-summary-errors { margin-bottom: 1rem; padding: .8rem 1rem; border: 1px solid rgba(155,39,48,.25); border-radius: 9px; color: #8d2029 !important; background: #fff0f1; }
.identity-card .validation-summary-valid { display: none; }
.identity-card .text-danger { color: #9b2730 !important; font-size: .82rem; }
.identity-card .alert { border-radius: 10px; }
.identity-account-links { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(126,82,31,.16); }
.identity-account-links p { margin: .45rem 0; }
.identity-form-alternate { margin: 1.1rem 0 0 !important; text-align: center; font-size: .86rem; }
.identity-message-icon { display: grid; width: 58px; height: 58px; margin-bottom: 1.25rem; place-items: center; border: 1px solid rgba(79,126,61,.24); border-radius: 16px; color: #4f7e3d; background: #eef6e9; font-size: 1.65rem; }
.identity-message-icon--danger { border-color: rgba(155,39,48,.2); color: #9b2730; background: #fff0f1; }
.identity-message-header form { width: 100%; }
.identity-human-verification { margin: 1.15rem 0; padding: 1rem; border: 1px solid rgba(126,82,31,.18); border-radius: 11px; background: #faf4e8; }
.identity-human-verification__heading { display: flex; align-items: center; gap: .7rem; margin-bottom: .85rem; color: var(--identity-brown); }
.identity-human-verification__heading > i { display: grid; width: 36px; height: 36px; flex: 0 0 36px; place-items: center; border-radius: 9px; color: #4f7e3d; background: #eaf3e5; font-size: 1.1rem; }
.identity-human-verification__heading strong,
.identity-human-verification__heading span { display: block; }
.identity-human-verification__heading strong { font-size: .82rem; }
.identity-human-verification__heading span { margin-top: .12rem; color: var(--identity-muted); font-size: .72rem; }
.identity-human-verification .cf-turnstile { min-height: 65px; }
.identity-footer { display: flex; justify-content: center; gap: 1rem; padding: 1.5rem 0 0; color: #806c5d; font-size: .76rem; }
.identity-footer a { color: inherit; }

/* Signed-in account management pages */
.identity-manage { width: 100%; }
.identity-manage-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.5rem; padding: 1.7rem 2rem; border: 1px solid rgba(154,106,36,.25); border-radius: 16px; color: #fff8e9; background: radial-gradient(circle at 90% 0, rgba(212,162,63,.22), transparent 30%), linear-gradient(135deg, #382216, #24150d); box-shadow: 0 16px 35px rgba(71,42,19,.14); }
.identity-manage-header h1 { margin: .35rem 0 .4rem; color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4vw, 3.3rem); font-weight: 900; line-height: 1; }
.identity-manage-header p { margin: 0; color: rgba(255,248,233,.72); }
.identity-security-badge { display: flex; align-items: center; gap: .55rem; padding: .7rem .9rem; border: 1px solid rgba(212,162,63,.32); border-radius: 999px; color: #f4d28a; background: rgba(212,162,63,.09); font-size: .75rem; font-weight: 850; white-space: nowrap; }
.identity-manage-grid { display: grid; grid-template-columns: minmax(210px, 260px) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.identity-manage-nav,
.identity-manage-card { border: 1px solid rgba(126,82,31,.18); border-radius: 14px; background: #fffdf8; box-shadow: 0 12px 30px rgba(71,42,19,.08); }
.identity-manage-nav { position: sticky; top: calc(var(--bs-topbar-height, 78px) + 1rem); padding: .75rem; }
.identity-manage-nav .nav { gap: .3rem; }
.identity-manage-nav .nav-link { padding: .75rem .85rem; border-radius: 9px; color: #5f4938; font-size: .83rem; font-weight: 800; }
.identity-manage-nav .nav-link:hover { color: #352116; background: #f6ead2; }
.identity-manage-nav .nav-link.active { color: #24150c; background: linear-gradient(180deg, #e4b04b, #cf9130); box-shadow: 0 7px 15px rgba(155,107,32,.16); }
.identity-manage-card { min-width: 0; padding: clamp(1.4rem, 3vw, 2.25rem); }
.identity-manage-card > h3 { margin: 0 0 1.25rem; color: #352116; font-family: Georgia, "Times New Roman", serif; font-size: 1.75rem; font-weight: 850; }
.identity-manage-card > .row { margin: 0; }
.identity-manage-card > .row > [class*="col-"] { width: min(100%, 650px); padding: 0; }
.identity-manage-card .form-control { min-height: 54px; border-radius: 9px; }
.identity-manage-card .btn { border-radius: 8px; font-weight: 800; }

@media (max-width: 1050px) {
    .identity-shell { grid-template-columns: minmax(310px, .65fr) minmax(450px, 1.35fr); }
    .identity-brand-panel { padding: 2.5rem; }
    .identity-brand-content h2 { font-size: 2.8rem; }
}

@media (max-width: 820px) {
    .identity-shell { display: block; }
    .identity-brand-panel { min-height: 220px; padding: 1.5rem 2rem; border-right: 0; border-bottom: 3px solid var(--identity-gold); }
    .identity-brand-content { display: grid; grid-template-columns: minmax(150px, 240px) 1fr; gap: .5rem 1.5rem; align-items: center; max-width: none; }
    .identity-logo { grid-row: 1 / span 3; width: 100%; margin: 0; }
    .identity-brand-content h2 { margin: 0; font-size: 2.2rem; }
    .identity-brand-content > p { margin: 0; font-size: .9rem; line-height: 1.45; }
    .identity-benefits { display: none; }
    .identity-content { padding: 2rem 1.25rem; }
    .identity-manage-grid { grid-template-columns: 1fr; }
    .identity-manage-nav { position: static; }
    .identity-manage-nav .nav { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 560px) {
    .identity-brand-panel { min-height: 150px; padding: 1rem 1.25rem; }
    .identity-brand-content { grid-template-columns: 130px 1fr; }
    .identity-eyebrow,
    .identity-brand-content > p { display: none; }
    .identity-brand-content h2 { font-size: 1.7rem; }
    .identity-topbar { min-height: 58px; padding: .8rem 1rem; }
    .identity-topbar > span { display: none; }
    .identity-card { padding: 1.4rem; border-radius: 13px; }
    .identity-manage-header { align-items: flex-start; flex-direction: column; padding: 1.35rem; }
    .identity-manage-nav .nav { grid-template-columns: 1fr; }
}
