.account-overlay-modals-host {
    position: relative;
    z-index: 5000;
}

.account-modal-root {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.account-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.account-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 28rem;
    background: linear-gradient(180deg, #1c1409 0%, #0c0905 100%);
    border: 1px solid rgba(110, 180, 95, 0.55);
    border-radius: 0.4rem;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.6),
        0 16px 48px rgba(0, 0, 0, 0.9),
        0 0 32px rgba(102, 173, 98, 0.12);
    color: #e8f0e6;
}

.account-modal-panel--wide {
    max-width: 42rem;
    max-height: min(90vh, 52rem);
    display: flex;
    flex-direction: column;
}

.account-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.15rem 0.75rem;
    border-bottom: 1px solid rgba(102, 173, 98, 0.28);
}

.account-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: #f0e6d4;
    letter-spacing: 0.02em;
}

.account-modal-close {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid rgba(102, 173, 98, 0.35);
    border-radius: 0.25rem;
    background: rgba(8, 6, 4, 0.85);
    color: #dbe8db;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.account-modal-close:hover {
    background: rgba(102, 173, 98, 0.18);
    color: #fff;
}

.account-modal-subtitle {
    color: #c8d4c6;
    font-size: 0.9rem;
    padding-top: 0.65rem;
}

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

.account-policy-scroll {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(52vh, 28rem);
    overflow-y: auto;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(102, 173, 98, 0.2);
}

.account-modal-policy-body h2 {
    font-size: 1rem;
    margin-top: 1.25rem;
    color: #f0e6d4;
}

.account-modal-policy-body p,
.account-modal-policy-body li {
    color: #dbe8db;
    font-size: 0.9rem;
    line-height: 1.5;
}

.account-policy-scroll-hint {
    margin: 0;
    font-size: 0.85rem;
    color: #c8b89a;
}

.account-modal-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.75rem 1.15rem 1.15rem;
    border-top: 1px solid rgba(102, 173, 98, 0.2);
}

.account-modal-footer--stacked {
    flex-direction: column;
    align-items: stretch;
}

.account-modal-panel .form-label {
    color: #e0d6c4;
    font-weight: 600;
}

.account-modal-panel .account-modal-input,
.account-modal-panel .account-modal-input:focus {
    background-color: rgba(6, 4, 2, 0.92);
    border-color: rgba(102, 173, 98, 0.45);
    color: #f5f8f4;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}

.account-modal-panel .account-modal-input:focus {
    border-color: rgba(140, 210, 120, 0.75);
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.45),
        0 0 0 0.2rem rgba(102, 173, 98, 0.2);
}

.account-modal-panel .form-check-label {
    color: #dbe8db;
}
