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

.account-body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #1e293b;
    background: #f8fafc;
}

/* ─── Shell ─────────────────────────────────────────────────────── */

.account-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

@media (min-width: 1024px) {
    .account-shell {
        flex-direction: row;
    }
}

/* ─── Brand panel ────────────────────────────────────────────────── */

.account-brand {
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 2rem 1.5rem;
    min-height: 12rem;
    display: none;
    align-items: center;
    overflow: hidden;
}

.account-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(10, 20, 50, .82) 0%,
        rgba(15, 30, 80, .55) 55%,
        rgba(0, 0, 0, .72) 100%
    );
}

/* subtle animated particles overlay */
.account-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,.04) 1px, transparent 1px),
        radial-gradient(circle at 60% 70%, rgba(255,255,255,.03) 1px, transparent 1px),
        radial-gradient(circle at 80% 20%, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 120px 120px, 80px 80px, 100px 100px;
    animation: brandShimmer 12s linear infinite;
    pointer-events: none;
}

@keyframes brandShimmer {
    0%   { background-position: 0 0, 0 0, 0 0; }
    100% { background-position: 120px 120px, -80px 80px, 100px -100px; }
}

.account-brand-inner {
    position: relative;
    z-index: 1;
    max-width: 36rem;
    padding-bottom: 0;
}

@media (min-width: 1024px) {
    .account-brand {
        display: flex;
        width: 60%;
        min-height: 100vh;
        padding: 3.5rem;
        align-items: center;
    }
}

.account-brand-logo {
    max-width: 320px;
    max-height: 110px;
    object-fit: contain;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
    opacity: .95;
}

.account-brand-desc {
    font-size: 1.2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, .88);
    margin: 0 0 2rem;
    font-weight: 400;
}

.account-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 2rem;
    padding: .4rem .9rem;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: rgba(255,255,255,.85);
    backdrop-filter: blur(6px);
}

.account-brand-badge i {
    font-size: .7rem;
    opacity: .75;
}

/* ─── Form panel ─────────────────────────────────────────────────── */

.account-form-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #ffffff; /* Changed to pure white as card background is gone */
}

@media (min-width: 1024px) {
    .account-form-panel {
        padding: 3.5rem 5rem;
    }
}

.account-form-inner {
    width: 100%;
    max-width: 420px;
    margin: 8vh auto 0;
}

.account-mobile-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.account-mobile-logo img {
    max-height: 52px;
    max-width: 180px;
    object-fit: contain;
}

/* ─── Login Content ─────────────────────────────────────────────────── */

.account-login-card {
    background: transparent;
    border: none;
    padding: 1.75rem 0;
    box-shadow: none;
}

@media (min-width: 640px) {
    .account-login-card {
        padding: 2rem 0;
    }
}

.account-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 .5rem;
    letter-spacing: -.02em;
}

.account-subtitle {
    font-size: .875rem;
    color: #64748b;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

/* ─── Fields ─────────────────────────────────────────────────────── */

.account-field {
    margin-bottom: 1rem;
}

.account-field label {
    display: block;
    font-size: .8125rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: .4rem;
}

.account-input-wrap {
    position: relative;
}

.account-input-icon {
    position: absolute;
    left: .8rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: .85rem;
    pointer-events: none;
    transition: color .15s;
}

.account-input-action {
    position: absolute;
    right: .75rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    padding: .25rem;
    font-size: .85rem;
    line-height: 1;
    border-radius: .25rem;
    transition: color .15s;
}

.account-input-action:hover {
    color: #475569;
}

.account-input {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    padding: .625rem .75rem .625rem 2.35rem;
    font-size: .9375rem;
    font-family: inherit;
    border: 1.5px solid #e2e8f0;
    border-radius: .625rem;
    background: #fff;
    color: #0f172a;
    transition: border-color .15s, box-shadow .15s;
}

.account-input:focus {
    outline: none;
    border-color: var(--account-accent, #2563eb);
    box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--account-accent, #2563eb) 14%, transparent);
}

.account-input:focus + .account-input-icon,
.account-input-wrap:focus-within .account-input-icon {
    color: var(--account-accent, #2563eb);
}

.account-input:disabled {
    background: #f8fafc;
    color: #64748b;
    cursor: not-allowed;
}

/* password input has right padding for toggle button */
.account-input--password {
    padding-right: 2.75rem;
}

/* ─── Options row ────────────────────────────────────────────────── */

.account-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin: .5rem 0 1.25rem;
    font-size: .8125rem;
    flex-wrap: wrap;
}

.account-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
}

.account-check-group label {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    cursor: pointer;
    color: #475569;
    font-weight: 500;
    user-select: none;
}

.account-check-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--account-accent, #2563eb);
    cursor: pointer;
    flex-shrink: 0;
}

/* ─── Submit button ──────────────────────────────────────────────── */

.account-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    width: 100%;
    min-height: 2.875rem;
    padding: .7rem 1rem;
    font-size: .9375rem;
    font-weight: 600;
    font-family: inherit;
    border: 0;
    border-radius: .625rem;
    cursor: pointer;
    background: var(--account-accent, #2563eb);
    color: #fff;
    transition: filter .15s, opacity .15s, transform .1s;
    letter-spacing: .01em;
}

.account-btn:hover:not(:disabled) {
    filter: brightness(.93);
    transform: translateY(-1px);
}

.account-btn:active:not(:disabled) {
    transform: translateY(0);
    filter: brightness(.88);
}

.account-btn:disabled {
    opacity: .65;
    cursor: wait;
}

.account-btn-spinner {
    display: none;
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .65s linear infinite;
}

.account-btn.is-loading .account-btn-spinner { display: block; }
.account-btn.is-loading .account-btn-label   { display: none; }

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ─── Quick links ────────────────────────────────────────────────── */

.account-links {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .75rem;
    margin-top: 1.25rem;
    padding-top: 1.125rem;
    border-top: 1px solid #f1f5f9;
    justify-content: center;
}

.account-link {
    font-size: .8125rem;
    color: var(--account-accent, #2563eb);
    text-decoration: none;
    font-weight: 500;
    padding: .2rem .1rem;
    border-radius: .25rem;
    transition: opacity .12s;
}

.account-link:hover {
    opacity: .75;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ─── Alert (validation) ─────────────────────────────────────────── */

.account-alert {
    display: flex;
    gap: .65rem;
    padding: .875rem 1rem;
    margin-bottom: 1.25rem;
    font-size: .8375rem;
    color: #991b1b;
    background-color: #fff5f5;
    border: 1.5px solid #fca5a5;
    border-radius: .625rem;
}

.account-alert::before {
    content: '\f071';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: .85rem;
    flex-shrink: 0;
    margin-top: .05rem;
}

.account-alert.validation-summary-valid {
    display: none;
}

.account-alert ul {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.account-alert li {
    margin-bottom: 0.2rem;
}

.account-alert li:last-child {
    margin-bottom: 0;
}

.account-field-error {
    display: block;
    margin-top: .3rem;
    font-size: .75rem;
    color: #dc2626;
}

/* ─── Footer ─────────────────────────────────────────────────────── */

.account-footer {
    margin-top: auto;
    padding-top: 1.75rem;
    text-align: center;
    font-size: .75rem;
    color: #94a3b8;
}

/* ─── Modal ──────────────────────────────────────────────────────── */

.account-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(3px);
}

.account-modal.is-open {
    display: flex;
}

.account-modal-box {
    background: #fff;
    border-radius: .75rem;
    max-width: 26rem;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, .16);
    animation: modalIn .2s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(.97) translateY(6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.account-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .875rem 1rem;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: .9375rem;
}

.account-modal-close {
    border: 0;
    background: transparent;
    font-size: 1.25rem;
    line-height: 1;
    color: #94a3b8;
    cursor: pointer;
    padding: .25rem;
    border-radius: .375rem;
    transition: color .12s, background .12s;
}

.account-modal-close:hover {
    color: #475569;
    background: #f1f5f9;
}

.account-modal-body {
    padding: 1rem;
}

.account-modal-foot {
    display: flex;
    gap: .5rem;
    justify-content: flex-end;
    padding: .75rem 1rem;
    border-top: 1px solid #e2e8f0;
}

.account-modal-btn {
    padding: .5rem .9rem;
    font-size: .8125rem;
    font-weight: 600;
    border-radius: .5rem;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    color: #475569;
    cursor: pointer;
    text-decoration: none;
    transition: background .12s, border-color .12s;
}

.account-modal-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.account-modal-btn-primary {
    background: #16a34a;
    border-color: #16a34a;
    color: #fff;
}

.account-modal-btn-primary:hover {
    background: #15803d;
    border-color: #15803d;
}

/* ─── Legacy compat ──────────────────────────────────────────────── */

.account-legacy .form-control,
.account-legacy select {
    display: block;
    width: 100%;
    min-height: 2.75rem;
    padding: .625rem .75rem;
    font-size: .9375rem;
    border: 1.5px solid #e2e8f0;
    border-radius: .625rem;
    background: #fff;
}

.account-legacy .form-group {
    margin-bottom: .875rem;
}