@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: #e9ecef;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    direction: rtl;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #fff;
    padding: 40px 35px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.login-card h1 {
    color: #1a3c5e;
    font-size: 26px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.login-card .subtitle {
    color: #6c757d;
    text-align: center;
    font-size: 14px;
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #343a40;
    font-size: 14px;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 16px;
    font-family: 'Cairo', sans-serif;
    transition: border-color 0.2s;
    background: #f8f9fa;
}

.form-group input:focus {
    border-color: #1a3c5e;
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 60, 94, 0.1);
}

.recaptcha-wrapper {
    display: flex;
    justify-content: center;
    margin: 10px 0 5px;
}

.remember-group {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1a3c5e;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: #1a3c5e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 5px;
}

.btn-primary:hover {
    background: #0f2a42;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.message-box {
    margin-top: 16px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.message-box.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-box.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* ========== Modal ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    padding: 20px;
}

.modal-box {
    background: #fff;
    max-width: 440px;
    width: 100%;
    padding: 35px 30px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-box h2 {
    color: #1a3c5e;
    text-align: center;
    font-size: 22px;
    margin-bottom: 6px;
}

.modal-box .modal-sub {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 25px;
}

.otp-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.otp-option-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: #f8f9fa;
    font-family: 'Cairo', sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: right;
}

.otp-option-btn:not(:disabled):hover {
    border-color: #1a3c5e;
    background: #e9ecef;
}

.otp-option-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.otp-option-btn .icon {
    font-size: 28px;
}

.otp-option-btn .label {
    font-weight: 600;
    color: #343a40;
}

.otp-option-btn .detail {
    font-size: 13px;
    color: #6c757d;
    margin-right: auto;
}

/* ========== OTP Page ========== */
.otp-card .otp-info {
    text-align: center;
    font-size: 15px;
    color: #343a40;
    margin-bottom: 25px;
}

.otp-card .otp-info strong {
    color: #1a3c5e;
}

.otp-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    direction: ltr;
    margin-bottom: 15px;
}

.otp-digit {
    width: 60px;
    height: 60px;
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
    border: 2px solid #dee2e6;
    border-radius: 10px;
    background: #f8f9fa;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #1a3c5e;
}

.otp-digit:focus {
    border-color: #1a3c5e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 60, 94, 0.15);
    background: #fff;
}

.otp-timer {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #28a745;
    margin: 5px 0 15px;
    font-variant-numeric: tabular-nums;
}

.otp-timer.timer-warning {
    color: #dc3545;
}

.btn-resend {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: transparent;
    color: #1a3c5e;
    border: 2px solid #1a3c5e;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-resend:hover {
    background: #1a3c5e;
    color: #fff;
}

/* ========== Dashboard ========== */
.dashboard-card h1 {
    margin-bottom: 20px;
}

.dashboard-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.dashboard-info p {
    font-size: 16px;
    color: #343a40;
    padding: 6px 0;
    border-bottom: 1px solid #e9ecef;
}

.dashboard-info p:last-child {
    border-bottom: none;
}

.dashboard-actions {
    text-align: center;
}

.btn-logout {
    display: inline-block;
    width: auto;
    padding: 12px 40px;
    background: #dc3545;
    text-decoration: none;
    font-size: 16px;
}

.btn-logout:hover {
    background: #bd2130;
}

.dashboard-card .note {
    text-align: center;
    color: #6c757d;
    font-size: 13px;
    margin-top: 20px;
}

/* ========== Responsive ========== */
@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
    }
    .otp-digit {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    .otp-inputs {
        gap: 8px;
    }
    .modal-box {
        padding: 25px 18px;
    }
    .otp-option-btn {
        font-size: 14px;
        padding: 14px 16px;
    }
}