/* ============================================
   LOGIN PAGE — COMPACT · FULL IMAGE VISIBLE
   Base font: 12px · Responsive to 320px
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary-color: #0729AD;
    --primary-dark: #031A85;
    --primary-soft: #4a6fc9;
    --primary-light: #b8d9ec;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --success: #28a745;
    --error: #dc3545;
    --google-blue: #4285f4;
    --accent-1: #6a11cb;
}

/* ============================================
   PAGE WRAPPER
   ============================================ */
.login-page-wrapper {
    min-height: calc(100vh - 70px);
    margin-top: 70px;
    padding: 1.5rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f5f7fa 0%, #eef2f7 100%);
    font-size: 12px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body.dark-mode .login-page-wrapper {
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
}

/* ============================================
   MAIN CARD
   ============================================ */
.login-main-card {
    width: 100%;
    max-width: 720px;
    background: var(--white);
    border-radius: 14px;
    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.08),
        0 3px 10px rgba(0, 0, 0, 0.04);
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    overflow: hidden;
    animation: fadeInUp 0.5s ease-out;
}

body.dark-mode .login-main-card {
    background: #1e293b;
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================
   LEFT: IMAGE PANEL (full image visible)
   ============================================ */
.login-left-banner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #0729AD 0%, #031A85 60%, #1e1b4b 100%);
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

/* Decorative glow inside panel */
.login-left-banner::before {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(106, 17, 203, 0.5), transparent 70%);
    filter: blur(60px);
    top: -80px;
    left: -80px;
    pointer-events: none;
}

.banner-full-image {
    width: 100%;
    height: 100%;
    max-height: 340px;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 10px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.03);
}

.login-left-banner:hover .banner-full-image {
    transform: scale(1.02);
}

/* ============================================
   RIGHT: FORM PANEL
   ============================================ */
.login-right-form {
    padding: 1.75rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Logo circle */
.login-logo-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5f7fa 0%, #e9ecef 100%);
    border: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.7rem;
    box-shadow:
        0 8px 20px rgba(7, 41, 173, 0.12),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    position: relative;
    flex-shrink: 0;
}

.login-logo-circle::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1px dashed rgba(7, 41, 173, 0.2);
    animation: rotateSlow 30s linear infinite;
}

@keyframes rotateSlow {
    to { transform: rotate(360deg); }
}

.login-logo-circle i {
    font-size: 1.4rem;
    background: linear-gradient(135deg, #0729AD, #6a11cb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .login-logo-circle {
    background: linear-gradient(135deg, #334155, #1e293b);
    border-color: #475569;
}

/* Title & Brand */
.login-welcome {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.1rem;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

body.dark-mode .login-welcome { color: var(--primary-light); }

.login-brand {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 1rem;
    letter-spacing: 0.3px;
}

body.dark-mode .login-brand { color: #cbd5e1; }

/* Alert */
.alert {
    width: 100%;
    max-width: 320px;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.4;
    text-align: left;
    word-wrap: break-word;
}

.alert-error {
    background: #fef2f2;
    color: var(--error);
    border-left: 3px solid var(--error);
}

.alert-error a {
    color: var(--error);
    text-decoration: underline;
    font-weight: 600;
}

body.dark-mode .alert-error {
    background: #450a0a;
    color: #fca5a5;
}

/* ============================================
   FORM
   ============================================ */
.login-form-compact {
    width: 100%;
    max-width: 320px;
}

.icon-input {
    position: relative;
    width: 100%;
    margin-bottom: 0.65rem;
}

.icon-input > i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: var(--gray-500);
    pointer-events: none;
    transition: color 0.3s;
    z-index: 2;
}

.icon-input input {
    width: 100%;
    padding: 0.7rem 2.4rem 0.7rem 2.4rem;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.78rem;
    font-family: inherit;
    background: white;
    transition: all 0.3s;
    color: var(--gray-900);
}

body.dark-mode .icon-input input {
    background: #0f172a;
    border-color: #334155;
    color: #e5e5e5;
}

.icon-input input::placeholder {
    color: var(--gray-500);
    font-weight: 500;
}

.icon-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(7, 41, 173, 0.08);
}

.icon-input input:focus ~ i {
    color: var(--primary-color);
}

/* Password toggle button */
.toggle-pass-btn {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--gray-500);
    font-size: 0.75rem;
    padding: 0.3rem;
    transition: color 0.3s;
    z-index: 2;
    border-radius: 5px;
}

.toggle-pass-btn:hover {
    color: var(--primary-color);
    background: rgba(7, 41, 173, 0.05);
}

/* Remember / Forgot row */
.login-options-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
    font-size: 0.7rem;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.compact-checkbox {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
    color: var(--gray-600);
    font-weight: 500;
    user-select: none;
    font-size: 0.7rem;
}

body.dark-mode .compact-checkbox { color: #94a3b8; }

.compact-checkbox input {
    width: 13px;
    height: 13px;
    cursor: pointer;
    accent-color: var(--primary-color);
    flex-shrink: 0;
}

.compact-forgot {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.7rem;
    white-space: nowrap;
}

.compact-forgot:hover { text-decoration: underline; }

body.dark-mode .compact-forgot { color: var(--primary-light); }

/* Login button */
.btn-login-compact {
    width: 100%;
    padding: 0.7rem;
    background: linear-gradient(135deg, #4a6fc9 0%, #0729AD 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    font-family: inherit;
}

.btn-login-compact::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.6s;
}

.btn-login-compact:hover::before { left: 100%; }

.btn-login-compact:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(7, 41, 173, 0.35);
    background: linear-gradient(135deg, #0729AD 0%, #031A85 100%);
}

.btn-login-compact:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Divider */
.compact-divider {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 320px;
    margin: 0.85rem 0;
    color: var(--gray-500);
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.compact-divider::before,
.compact-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-200);
}

body.dark-mode .compact-divider::before,
body.dark-mode .compact-divider::after {
    border-bottom-color: #334155;
}

.compact-divider::before { margin-right: 0.6rem; }
.compact-divider::after  { margin-left: 0.6rem; }

/* Google button */
.btn-google-compact {
    width: 100%;
    max-width: 320px;
    padding: 0.7rem;
    background: white;
    border: 1.5px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    color: var(--gray-700);
    font-family: inherit;
}

body.dark-mode .btn-google-compact {
    background: #0f172a;
    border-color: #334155;
    color: #e5e5e5;
}

.btn-google-compact:hover {
    background: #f8f9fa;
    border-color: var(--google-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(66, 133, 244, 0.18);
}

body.dark-mode .btn-google-compact:hover { background: #1e293b; }

.btn-google-compact:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-google-compact i.fa-google {
    font-size: 0.95rem;
    background: conic-gradient(from -45deg, #ea4335 110deg, #4285f4 190deg, #34a853 270deg, #fbbc05 360deg);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    flex-shrink: 0;
}

/* Register link */
.compact-register {
    margin-top: 0.9rem;
    font-size: 0.72rem;
    color: var(--gray-600);
    text-align: center;
}

body.dark-mode .compact-register { color: #94a3b8; }

.compact-register a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}

.compact-register a:hover { text-decoration: underline; }

/* Back home */
.compact-back-home {
    margin-top: 0.7rem;
    padding-top: 0.7rem;
    border-top: 1px solid var(--gray-200);
    width: 100%;
    max-width: 320px;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: color 0.3s;
}

.compact-back-home:hover { color: var(--primary-color); }

body.dark-mode .compact-back-home {
    color: #94a3b8;
    border-top-color: #334155;
}

body.dark-mode .compact-back-home:hover { color: var(--primary-light); }

/* ============================================
   FOOTER
   ============================================ */
.login-page-footer {
    margin-top: 1.5rem;
    padding-top: 0.9rem;
    border-top: 2px solid var(--primary-color);
    width: 100%;
    max-width: 720px;
    text-align: center;
}

.login-page-footer p {
    font-size: 0.7rem;
    color: var(--gray-600);
    font-weight: 500;
    line-height: 1.5;
    padding: 0 0.5rem;
}

body.dark-mode .login-page-footer p { color: #94a3b8; }
body.dark-mode .login-page-footer { border-top-color: var(--primary-light); }

/* ============================================
   TOASTS & LOADER
   ============================================ */
.toast-message-logout {
    position: fixed;
    top: 90px;
    right: 20px;
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.78rem;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    animation: slideInRight 0.4s ease;
    overflow: hidden;
    max-width: calc(100vw - 40px);
}

.toast-message-logout .progress-bar {
    position: absolute;
    bottom: 0; left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.7);
    width: 100%;
    animation: progress 3s linear forwards;
}

.error-toast {
    position: fixed;
    top: 90px;
    right: 20px;
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
    color: white;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-size: 0.78rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    animation: slideInRight 0.4s ease;
    max-width: 380px;
}

.error-toast .close-toast {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    margin-left: auto;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.error-toast .close-toast:hover { opacity: 1; }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes progress {
    from { width: 100%; }
    to   { width: 0%; }
}

.form-loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    z-index: 9999;
    backdrop-filter: blur(6px);
}

.spinner {
    width: 42px;
    height: 42px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.form-loader-overlay span {
    color: white;
    font-size: 0.82rem;
    font-weight: 500;
}

/* ============================================
   RESPONSIVE — 5 BREAKPOINTS
   ============================================ */

/* ---------- LARGE DESKTOP (1200px+) ---------- */
@media (min-width: 1200px) {
    .login-main-card { max-width: 800px; }
    .login-page-footer { max-width: 800px; }
    .login-left-banner { min-height: 380px; }
    .banner-full-image { max-height: 360px; }
}

/* ---------- TABLET LANDSCAPE (901px - 1100px) ---------- */
@media (max-width: 1100px) and (min-width: 901px) {
    .login-main-card { max-width: 660px; }
    .login-page-footer { max-width: 660px; }
    .login-left-banner { min-height: 340px; padding: 1.25rem; }
    .banner-full-image { max-height: 320px; }
    .login-right-form { padding: 1.5rem; }
}

/* ---------- TABLET / SMALL LAPTOP (≤ 900px) ---------- */
/* Image HIDDEN — form only, centered */
@media (max-width: 900px) {
    .login-main-card {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .login-page-footer { max-width: 420px; }

    /* Hide the image panel */
    .login-left-banner { display: none; }

    .login-right-form {
        padding: 2rem 1.75rem;
    }

    .login-welcome { font-size: 1.2rem; }
}

/* ---------- MOBILE LANDSCAPE (≤ 700px) ---------- */
@media (max-width: 700px) {
    .login-page-wrapper {
        padding: 1.25rem 0.9rem 1rem;
    }

    .login-main-card { max-width: 100%; }
    .login-page-footer { max-width: 100%; }

    .login-right-form { padding: 1.75rem 1.4rem; }

    .login-logo-circle { width: 58px; height: 58px; }
    .login-logo-circle i { font-size: 1.3rem; }

    .login-welcome { font-size: 1.1rem; }
    .login-brand { font-size: 0.72rem; }

    .login-form-compact,
    .btn-google-compact,
    .compact-divider,
    .compact-back-home { max-width: 100%; }

    .alert { max-width: 100%; }
}

/* ---------- MOBILE PORTRAIT (≤ 500px) ---------- */
@media (max-width: 500px) {
    .login-page-wrapper {
        padding: 1rem 0.75rem 0.85rem;
        min-height: calc(100vh - 60px);
        margin-top: 60px;
    }

    .login-main-card {
        border-radius: 12px;
    }

    .login-right-form {
        padding: 1.5rem 1.15rem;
    }

    .login-logo-circle {
        width: 52px;
        height: 52px;
        margin-bottom: 0.55rem;
    }

    .login-logo-circle i { font-size: 1.2rem; }

    .login-welcome { font-size: 1.05rem; }
    .login-brand { font-size: 0.68rem; margin-bottom: 0.85rem; }

    .icon-input input {
        padding: 0.65rem 2.3rem 0.65rem 2.3rem;
        font-size: 0.78rem;
    }

    .icon-input > i { left: 0.8rem; font-size: 0.72rem; }
    .toggle-pass-btn { right: 0.5rem; font-size: 0.72rem; }

    .login-options-row {
        font-size: 0.68rem;
        gap: 0.3rem;
    }

    .compact-checkbox { font-size: 0.68rem; }
    .compact-forgot { font-size: 0.68rem; }

    .btn-login-compact {
        padding: 0.65rem;
        font-size: 0.75rem;
    }

    .btn-google-compact {
        padding: 0.65rem;
        font-size: 0.73rem;
        gap: 0.45rem;
    }

    .compact-register { font-size: 0.68rem; }
    .compact-back-home { font-size: 0.68rem; }

    .login-page-footer p { font-size: 0.65rem; }

    .toast-message-logout,
    .error-toast {
        left: 12px;
        right: 12px;
        top: 78px;
        max-width: none;
        font-size: 0.72rem;
        padding: 0.6rem 0.85rem;
    }
}

/* ---------- SMALL PHONES (≤ 380px, iPhone SE / Galaxy A) ---------- */
@media (max-width: 380px) {
    .login-page-wrapper {
        padding: 0.85rem 0.6rem 0.7rem;
    }

    .login-main-card {
        border-radius: 10px;
    }

    .login-right-form {
        padding: 1.25rem 0.95rem;
    }

    .login-logo-circle {
        width: 48px;
        height: 48px;
    }

    .login-logo-circle i { font-size: 1.1rem; }

    .login-welcome { font-size: 0.98rem; }
    .login-brand { font-size: 0.65rem; margin-bottom: 0.75rem; }

    .icon-input { margin-bottom: 0.55rem; }

    .icon-input input {
        padding: 0.6rem 2.2rem 0.6rem 2.2rem;
        font-size: 0.75rem;
        border-radius: 7px;
    }

    .icon-input > i { left: 0.75rem; font-size: 0.7rem; }
    .toggle-pass-btn { right: 0.4rem; padding: 0.25rem; }

    .login-options-row {
        margin-bottom: 0.7rem;
        font-size: 0.65rem;
    }

    .compact-checkbox input {
        width: 12px;
        height: 12px;
    }

    .btn-login-compact {
        padding: 0.6rem;
        font-size: 0.72rem;
        border-radius: 22px;
    }

    .btn-google-compact {
        padding: 0.6rem;
        font-size: 0.7rem;
        border-radius: 7px;
    }

    .btn-google-compact i.fa-google { font-size: 0.85rem; }

    .compact-divider { margin: 0.7rem 0; font-size: 0.6rem; }

    .compact-register { font-size: 0.65rem; margin-top: 0.75rem; }
    .compact-back-home { font-size: 0.65rem; padding-top: 0.6rem; margin-top: 0.6rem; }

    .login-page-footer {
        margin-top: 1.25rem;
        padding-top: 0.75rem;
    }
    .login-page-footer p { font-size: 0.6rem; }
}

/* ---------- VERY SMALL (≤ 320px, iPhone 5/SE) ---------- */
@media (max-width: 320px) {
    .login-right-form { padding: 1rem 0.8rem; }

    .login-logo-circle {
        width: 44px;
        height: 44px;
    }

    .login-logo-circle i { font-size: 1rem; }

    .login-welcome { font-size: 0.9rem; }

    .icon-input input {
        padding: 0.55rem 2rem 0.55rem 2rem;
        font-size: 0.72rem;
    }

    .btn-login-compact { font-size: 0.7rem; }
    .btn-google-compact { font-size: 0.68rem; }

    .login-page-footer p { font-size: 0.58rem; line-height: 1.4; }
}

/* ============================================
   LANDSCAPE ORIENTATION ON SHORT SCREENS
   ============================================ */
@media (max-height: 600px) and (orientation: landscape) {
    .login-page-wrapper {
        padding: 1rem 0.75rem;
        min-height: auto;
        margin-top: 70px;
    }

    .login-right-form { padding: 1rem 1.25rem; }

    .login-logo-circle {
        width: 45px;
        height: 45px;
        margin-bottom: 0.4rem;
    }

    .login-logo-circle i { font-size: 1.05rem; }

    .login-welcome { font-size: 0.95rem; }
    .login-brand { margin-bottom: 0.6rem; }

    .icon-input { margin-bottom: 0.5rem; }
    .icon-input input { padding: 0.55rem 2.2rem; }

    .login-options-row { margin-bottom: 0.6rem; }

    .compact-divider { margin: 0.6rem 0; }
    .compact-register { margin-top: 0.6rem; }
    .compact-back-home { margin-top: 0.5rem; padding-top: 0.5rem; }

    .login-page-footer { margin-top: 0.9rem; padding-top: 0.6rem; }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    .icon-input input { font-size: 16px; }
    .btn-login-compact { padding: 0.85rem; }
    .btn-google-compact { padding: 0.85rem; }
    .toggle-pass-btn { padding: 0.5rem; }
}

/* ============================================
   PRINT — hide login card
   ============================================ */
@media print {
    .login-page-wrapper,
    .form-loader-overlay,
    .toast-message-logout,
    .error-toast { display: none !important; }
}

/* ============================================
   ACCESSIBILITY — reduce motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   DARK MODE
   ============================================ */
body.dark-mode .compact-checkbox { color: #94a3b8; }
body.dark-mode .compact-register { color: #94a3b8; }
body.dark-mode .login-page-footer p { color: #94a3b8; }

/* ============================================
   FORGOT PASSWORD — EXTRA RULES
   (reuses login page layout)
   ============================================ */

/* Account info box under the title */
.security-questions-compact {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    background: rgba(7, 41, 173, 0.05);
    border: 1px solid rgba(7, 41, 173, 0.1);
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    margin-bottom: 1rem;
    width: 100%;
    max-width: 320px;
    font-size: 0.7rem;
}

.security-questions-compact p {
    margin: 0;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.security-questions-compact p i {
    color: var(--primary-color);
    width: 14px;
    font-size: 0.7rem;
    flex-shrink: 0;
}

body.dark-mode .security-questions-compact {
    background: rgba(135, 188, 212, 0.08);
    border-color: rgba(135, 188, 212, 0.15);
}

body.dark-mode .security-questions-compact p { color: #cbd5e1; }

/* Password strength / match messages */
.password-strength,
.password-match {
    font-size: 0.68rem;
    margin-top: -0.4rem;
    margin-bottom: 0.6rem;
    padding-left: 0.25rem;
    min-height: 14px;
    line-height: 1.3;
}

.password-strength span,
.password-match span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Reduce spacing when strength message is shown */
.icon-input + .password-strength + .icon-input {
    margin-top: 0;
}

/* Small screens adjustments */
@media (max-width: 500px) {
    .security-questions-compact {
        max-width: 100%;
        font-size: 0.68rem;
        padding: 0.5rem 0.65rem;
    }
}

@media (max-width: 380px) {
    .security-questions-compact {
        font-size: 0.65rem;
        padding: 0.45rem 0.6rem;
    }

    .password-strength,
    .password-match {
        font-size: 0.62rem;
    }
}