/* ============================================================
   PASSWORD & ACCESS RECOVERY (css/password-reset.css)
   Styles for the policy card mounted by js/admin-users-password.js
   and for the shared password reset modal.
   ============================================================ */

.pw-card {
    background: var(--bg-card, #141d2b);
    border: 1px solid var(--border, #263349);
    border-radius: 8px;
    padding: 16px 18px;
    margin: 20px 0 0;
}

.pw-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}

.pw-card h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: var(--text-main, #e6edf6);
}

.pw-muted {
    color: var(--text-muted, #8fa3bd);
    font-size: 0.8rem;
    line-height: 1.45;
    margin: 0;
}

.pw-strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-main, #e6edf6);
    margin: 0 0 6px;
}

.pw-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border, #263349);
}

.pw-row-tight {
    margin-top: 10px;
    padding-top: 10px;
}

.pw-row-tight label {
    font-size: 0.78rem;
    color: var(--text-muted, #8fa3bd);
}

.pw-row-tight select {
    background: var(--bg-inset, #0f1724);
    color: var(--text-main, #e6edf6);
    border: 1px solid var(--border, #263349);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.8rem;
}

.pw-switch {
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-main, #e6edf6);
}

.pw-switch input[type="checkbox"] {
    width: 17px;
    height: 17px;
    accent-color: var(--accent-blue, #2563eb);
    cursor: pointer;
}

.pw-switch-sm {
    font-size: 0.78rem;
    font-weight: 600;
    margin: 10px 0 12px;
    color: var(--text-muted, #8fa3bd);
}

.pw-warn {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.78rem;
    line-height: 1.45;
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #fcd34d;
}

.pw-status {
    margin-top: 10px;
    font-size: 0.78rem;
    min-height: 1em;
}

.pw-status.is-err { color: var(--danger-fg, #fca5a5); }
.pw-status.is-ok  { color: #6ee7b7; }

/* ---- modal ---- */
.pw-block {
    display: block;
    width: 100%;
    text-align: left;
    margin: 6px 0;
}

.pw-hint { margin: 0 0 10px; }

.pw-hr {
    border: 0;
    border-top: 1px solid var(--border, #263349);
    margin: 16px 0;
}

.pw-input {
    width: 100%;
    margin-bottom: 4px;
    background: var(--bg-inset, #0f1724);
    border: 1px solid var(--border, #263349);
    border-radius: 6px;
    color: var(--text-main, #e6edf6);
    padding: 9px 10px;
    font-size: 0.85rem;
}

/* ============================================================
   LOGIN GATE WIDGET (js/password-reset-gate.js)
   Used by templates/auth/login_gate.php and superadmin_gate.php.
   ============================================================ */
.pw-gate-anchor {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 0.82rem;
    color: #7dd3fc;
    text-decoration: none;
}
.pw-gate-anchor:hover { text-decoration: underline; }

.pw-gate-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(3, 8, 16, 0.82);
    padding: 20px;
}
.pw-gate-overlay.is-open { display: flex; }

.pw-gate-card {
    width: 100%;
    max-width: 380px;
    background: #141d2b;
    border: 1px solid #263349;
    border-radius: 12px;
    padding: 24px 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    color: #e6edf6;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}
.pw-gate-card h2 { margin: 0 0 6px; font-size: 1.05rem; }
.pw-gate-muted { margin: 0 0 16px; font-size: 0.82rem; line-height: 1.45; color: #8fa3bd; }
.pw-gate-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9fb2ca;
    margin-bottom: 6px;
}
.pw-gate-input {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #2c3b53;
    background: #0f1724;
    color: #e6edf6;
    font-size: 0.9rem;
}
.pw-gate-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}
.pw-gate-btn {
    width: 100%;
    margin-top: 14px;
    padding: 11px;
    border: 0;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
}
.pw-gate-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.pw-gate-msg { margin-top: 10px; font-size: 0.78rem; line-height: 1.4; min-height: 1em; }
.pw-gate-msg.is-err { color: #fca5a5; }
.pw-gate-msg.is-ok { color: #6ee7b7; }
.pw-gate-back {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 9px;
    border: 1px solid #2c3b53;
    border-radius: 8px;
    background: transparent;
    color: #9fb2ca;
    font-size: 0.82rem;
    cursor: pointer;
}

/* ---- super-admin messaging stack (platform SMTP + driver cards) ---- */
.sa-messaging-stack {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0 0 20px;
}
.sa-messaging-stack > div { min-width: 0; }
.sa-messaging-stack .pw-card { margin: 0; }

/* ---- super-admin platform SMTP card (js/superadmin-mail-settings.js) ---- */
.sa-mail-grid {
    display: grid;
    grid-template-columns: 120px minmax(180px, 1fr);
    gap: 8px 12px;
    align-items: center;
}
.sa-mail-grid label {
    font-size: 0.78rem;
    color: var(--text-muted, #8fa3bd);
}
.sa-mail-grid .pw-input { margin-bottom: 0; }

@media (max-width: 620px) {
    .sa-mail-grid { grid-template-columns: 1fr; }
    .sa-messaging-stack { gap: 14px; margin-bottom: 16px; }
    .sa-messaging-stack .pw-card { padding: 14px; }
}
