/* ==============================================
   IDENTITY / ACCOUNT PAGES
   Shared styling for Login, Register, ForgotPassword,
   ResetPassword, ExternalLogin and all confirmation
   / lockout / access-denied variants. Rides on top of
   downloads-redesign.css for the dl-hero + dl-section
   shell. Two-panel grid for desktop, stacked mobile.
   ============================================== */

.acc-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    max-width: 940px;
    margin: 0 auto;
    align-items: start;
}

@media (min-width: 780px) {
    .acc-grid.acc-grid-2col {
        /* minmax(0,·) so a wide child (the provider-button row) can't blow
           up its column's min-content and crush the other card. */
        grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    }
}

.acc-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.acc-card.acc-card-narrow {
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}

.acc-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    color: #1a1a2e;
}

.acc-card p {
    color: #555;
    margin: 0 0 1rem;
    font-size: 0.95rem;
    line-height: 1.55;
}

.acc-card .form-group {
    margin-bottom: 1rem;
}

.acc-card label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #333;
}

.acc-card .form-control {
    width: 100%;
    padding: 0.65rem 0.8rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    box-sizing: border-box;
    font-family: inherit;
}

.acc-card .form-control:focus {
    outline: none;
    border-color: #5B3EEE;
    box-shadow: 0 0 0 3px rgba(91,62,238,0.15);
}

.acc-btn {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    background: #5B3EEE;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-family: inherit;
}

.acc-btn:hover {
    background: #4B2FBB;
    color: #fff;
    text-decoration: none;
}

.acc-btn-outline {
    background: transparent;
    color: #5B3EEE;
    border: 2px solid #5B3EEE;
}

.acc-btn-outline:hover {
    background: rgba(91,62,238,0.06);
    color: #5B3EEE;
}

.acc-forgot {
    text-align: right;
    margin: 0 0 1rem;
    font-size: 0.85rem;
}

.acc-forgot a,
.acc-inline-link {
    color: #5B3EEE;
    font-weight: 600;
    text-decoration: none;
}

.acc-forgot a:hover,
.acc-inline-link:hover {
    text-decoration: underline;
}

.acc-remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    margin: 0;
}

.acc-remember input {
    margin: 0;
}

.acc-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0 1rem;
    color: #888;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.acc-divider::before,
.acc-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.acc-providers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.provider-btn {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 0.4rem 0.6rem;
    cursor: pointer;
    max-width: 100%;
}

.provider-btn:hover {
    border-color: #5B3EEE;
}

.provider-btn img {
    height: 42px;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

.password-wrap {
    position: relative;
}

.password-wrap .toggle-pw {
    position: absolute;
    right: 12px;
    top: 32px;
    cursor: pointer;
    color: #888;
}

.password-wrap .toggle-pw:hover {
    color: #5B3EEE;
}

.acc-alt-copy {
    color: #555;
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
}

.acc-state {
    text-align: center;
    max-width: 560px;
    margin: 0 auto;
}

.acc-state .acc-icon {
    font-size: 3rem;
    margin: 0 0 1rem;
}

.acc-state.acc-state-error .acc-icon,
.acc-state.acc-state-error h2 {
    color: #dc2626;
}

.acc-state.acc-state-ok .acc-icon,
.acc-state.acc-state-ok h2 {
    color: #10b981;
}

.acc-state h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.75rem;
}

.acc-state p {
    color: #555;
    font-size: 1rem;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.acc-state-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.acc-state-buttons .acc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 0.65rem 1.5rem;
}

.text-danger {
    color: #dc2626;
    font-size: 0.85rem;
}
