/* Auth Pages — Login & Register */

.auth-wrapper {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background-color: #f2f9f6;
}

.auth-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(61, 115, 92, 0.13);
    padding: 2.5rem 2.2rem 2rem;
    width: 100%;
    max-width: 480px;
    border: 1.5px solid #B2D7C7;
}

.auth-card h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    color: #3D735C;
    text-align: center;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

/* Flash messages */
.flash-messages { margin-bottom: 1.2rem; }

.flash {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.93rem;
    margin-bottom: 0.5rem;
}

.flash-success {
    background: #e6f9f0;
    color: #1a7a47;
    border: 1px solid #b2e5cc;
}

.flash-danger {
    background: #fdecea;
    color: #b71c1c;
    border: 1px solid #f5c6c2;
}

.flash-warning {
    background: #fff8e1;
    color: #7a5c00;
    border: 1px solid #ffe082;
}

.flash-info {
    background: #D0E6DD;
    color: #3D735C;
    border: 1px solid #B2D7C7;
}

/* Form fields */
.auth-form .form-group { margin-bottom: 1.2rem; }

.auth-form label {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #3D735C;
    margin-bottom: 0.4rem;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #B2D7C7;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Montserrat', sans-serif;
    color: #333;
    background: #f9fcfb;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
    border-color: #3D735C;
    box-shadow: 0 0 0 3px rgba(61, 115, 92, 0.12);
}

.auth-form input.input-error { border-color: #e84a5f; }

.auth-form .field-errors {
    margin-top: 0.3rem;
    list-style: none;
    padding: 0;
}

.auth-form .field-errors li {
    font-size: 0.85rem;
    color: #e84a5f;
}

/* Remember me checkbox */
.auth-form .checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.5rem;
}

.auth-form .checkbox-group input[type="checkbox"] {
    accent-color: #3D735C;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.auth-form .checkbox-group label {
    margin-bottom: 0;
    font-weight: 400;
    color: #444;
    cursor: pointer;
}

/* Submit button */
.auth-form .auth-btn {
    width: 100%;
    background: #3D735C;
    color: #fff;
    padding: 0.85rem;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 3px 12px rgba(61, 115, 92, 0.15);
    margin-top: 0.5rem;
}

.auth-form .auth-btn:hover {
    background: #4a8a6e;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(61, 115, 92, 0.25);
}

/* Footer link */
.auth-footer-link {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.93rem;
    color: #666;
}

.auth-footer-link a {
    color: #3D735C;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.auth-footer-link a:hover {
    color: #4a8a6e;
    text-decoration: underline;
}

/* Role selector (Patient / Doctor) */
.role-options {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.3rem;
}

.role-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #B2D7C7;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    color: #444;
    background: #f9fcfb;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    user-select: none;
}

.role-option input[type="radio"] {
    accent-color: #3D735C;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.role-option:has(input:checked) {
    border-color: #3D735C;
    background: #e8f4ef;
    color: #3D735C;
    font-weight: 600;
}

.role-option-icon { font-size: 1.1rem; }

/* Doctor select dropdown */
.doctor-select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #B2D7C7;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    color: #333;
    background: #f9fcfb;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%233D735C' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    padding-right: 2.5rem;
}

.doctor-select:focus {
    border-color: #3D735C;
    box-shadow: 0 0 0 3px rgba(61, 115, 92, 0.12);
}

.doctor-select.input-error { border-color: #e84a5f; }

html[dir="rtl"] .doctor-select {
    background-position: left 0.9rem center;
    padding-right: 0.9rem;
    padding-left: 2.5rem;
}

html[dir="rtl"] .role-options { flex-direction: row-reverse; }

/* Pending approval page */
.pending-card {
    text-align: center;
}

.pending-icon {
    font-size: 3rem;
    margin-bottom: 0.75rem;
    animation: pending-pulse 2s ease-in-out infinite;
}

@keyframes pending-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.6; transform: scale(0.92); }
}

.pending-body {
    background: #f2f9f6;
    border: 1.5px solid #B2D7C7;
    border-radius: 12px;
    padding: 1.2rem 1.4rem;
    margin: 1.4rem 0;
    text-align: start;
}

.pending-body p {
    font-size: 0.93rem;
    color: #444;
    margin-bottom: 0.6rem;
    line-height: 1.6;
}

.pending-body p:last-child { margin-bottom: 0; }

.pending-note {
    color: #7a5c00 !important;
    font-size: 0.88rem !important;
    padding-top: 0.4rem;
    border-top: 1px solid #ffe082;
}

.pending-back-btn {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.7rem 2rem;
    background: #3D735C;
    color: #fff;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    box-shadow: 0 3px 12px rgba(61, 115, 92, 0.15);
}

.pending-back-btn:hover {
    background: #4a8a6e;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(61, 115, 92, 0.25);
}

/* RTL support */
html[dir="rtl"] .auth-form .checkbox-group {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

/* Responsive */
@media (max-width: 520px) {
    .auth-card {
        padding: 1.5rem 1rem;
        border-radius: 16px;
    }
    .auth-card h2 { font-size: 1.5rem; }
}


/* ── Admin-reset notice on change-password page ── */
.change-pwd-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-left: 3px solid #f59e0b;
    border-radius: 8px;
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
    color: #7a5c00;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}
