/* Modern Login Page Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


body.login-page-body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8f9fa;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

body.login-page-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.login-wrapper {
    display: flex;
    width: 100%;
    max-width: 800px;
    min-height: 450px;
    background: rgba(255, 255, 255, 0.40);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Left Panel - Visual Section */
.login-visual {
    flex: 1;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    position: relative;
    display: none; /* Hidden on mobile, shown on desktop */
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.login-visual::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,154.7C960,171,1056,181,1152,165.3C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.login-visual-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.logo-visual-container {
    text-align: center;
    margin-bottom: 0;
}

.logo-visual-container img {
    max-width: 120px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.1);
    padding: 8px;
}

.login-visual-title {
    font-size: 42px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.login-visual-subtitle {
    font-size: 18px;
    opacity: 0.95;
    line-height: 1.6;
}

/* Right Panel - Login Form */
.login-form-panel {
    flex: 1;
    padding: 28px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: transparent;
    position: relative;
}

.login-form-header {
    margin-bottom: 18px;
}

.logo-name-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.login-welcome-title {
    font-size: 24px;
    font-weight: 700;
    color: #1e40af;
    margin: 0;
    text-align: center;
}

.login-subtitle {
    font-size: 13px;
    color: #1e293b;
    font-weight: 600;
    margin-top: 8px;
}

/* Form Styles */
.login-form-container {
    width: 100%;
}

.form-group-modern {
    margin-bottom: 14px;
    position: relative;
}

.form-label-modern {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 6px;
}

.form-label-modern i {
    margin-right: 6px;
    color: #2563eb;
}

.form-input-modern {
    width: 100%;
    padding: 10px 12px;
    padding-left: 38px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
    color: #2d3748;
}

.form-input-modern:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input-modern.error {
    border-color: #dc2626;
    background-color: #fef2f2;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-input-modern::placeholder {
    color: #a0aec0;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 14px;
}

.form-input-modern:focus + .input-icon {
    color: #2563eb;
}

.error-message-modern {
    color: #dc2626;
    font-size: 12px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    background: #fef2f2;
    border-left: 3px solid #dc2626;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
    animation: slideInError 0.3s ease;
}

.error-message-modern i {
    margin-right: 8px;
    font-size: 14px;
    color: #dc2626;
}

@keyframes slideInError {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* OTP Field */
.otp-group-modern {
    animation: slideIn 0.3s ease;
    margin-bottom: 14px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.otp-actions-modern {
    margin-top: 10px;
    text-align: center;
}

.timer-modern {
    color: #2563eb;
    font-size: 13px;
    font-weight: 500;
}

.resend-btn-modern {
    background: #2563eb;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.resend-btn-modern:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* Help Text */
.help-text-modern {
    margin-top: 20px;
    text-align: center;
    color: #64748b;
    font-size: 12px;
    margin-bottom: 14px;
    padding: 8px;
    background: #f1f5f9;
    border-radius: 6px;
}

.help-text-modern i {
    margin-right: 5px;
    color: #2563eb;
}

/* Session Warning */
.session-warning-modern {
    background: #dbeafe;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 12px;
    text-align: center;
    color: #1e40af;
    font-size: 12px;
}

.session-warning-modern i {
    margin-right: 8px;
}

/* Buttons */
.btn-modern {
    width: 100%;
    padding: 11px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    position: relative;
    min-height: 42px;
}

.btn-modern:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary-modern {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.btn-primary-modern:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
}

.btn-primary-modern:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary-modern {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary-modern:hover:not(:disabled) {
    background: #cbd5e0;
    transform: translateY(-1px);
}

.btn-reg-modern {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4);
}

.btn-reg-modern:hover:not(:disabled) {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.5);
    transform: translateY(-2px);
}

.btn-reg-modern:active:not(:disabled) {
    background: linear-gradient(135deg, #bd2130 0%, #a71e2a 100%);
    transform: translateY(0);
}

.button-group-modern {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn-loader-modern {
    display: none;
}

.btn-modern.loading .btn-text-modern {
    display: none;
}

.btn-modern.loading .btn-loader-modern {
    display: inline-flex;
}

/* Browser Warning */
.browser-warning-modern {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    color: #c33;
    text-align: center;
    font-size: 14px;
    display: none;
}

.browser-warning-modern.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Offline Indicator */
.offline-indicator-modern {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 20px;
    color: #c33;
    text-align: center;
    font-size: 14px;
    display: none;
}

.offline-indicator-modern.show {
    display: block;
}

/* Loader Overlay - Centered with Transparent Background */
.loader-overlay-modern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-overlay-modern.show {
    display: flex;
}

.loader-container-modern {
    text-align: center;
}

.loader-spinner-modern {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(37, 99, 235, 0.2);
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-text-modern {
    margin-top: 15px;
    color: #2563eb;
    font-weight: 600;
    font-size: 14px;
}

/* Logo */
.logo-container-modern {
    text-align: center;
    margin-bottom: 0;
}

.logo-container-modern img {
    max-width: 80px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (min-width: 992px) {
    .login-visual {
        display: flex;
    }
}

@media (max-width: 991px) {
    .login-wrapper {
        flex-direction: column;
        max-width: 400px;
        min-height: auto;
    }

    .login-visual {
        display: none;
    }

    .login-form-panel {
        padding: 25px 20px;
    }
}

@media (max-width: 576px) {
    body.login-page-body {
        padding: 10px;
    }

    .login-wrapper {
        max-width: 100%;
        min-height: auto;
    }
 
    .login-form-panel {
        padding: 20px 18px;
    }

    .login-welcome-title {
        font-size: 22px;
    }

    .login-subtitle {
        font-size: 12px;
    }

    .form-input-modern {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 9px 11px;
        padding-left: 36px;
    }

    .btn-modern {
        padding: 10px 14px;
        font-size: 13px;
        min-height: 40px;
    }

    .logo-container-modern img {
        max-width: 85px;
    }

    .form-group-modern {
        margin-bottom: 12px;
    }
}

@media (max-width: 400px) {
    .login-form-panel {
        padding: 18px 15px;
    }

    .login-welcome-title {
        font-size: 20px;
    }

    .form-input-modern {
        padding: 8px 10px;
        padding-left: 34px;
    }

    .logo-container-modern img {
        max-width: 80px;
    }

    .form-group-modern {
        margin-bottom: 11px;
    }
}

/* Input focus improvements for mobile */
@media (max-width: 768px) {
    .form-input-modern:focus {
        transform: none;
    }
}

/* Message/Alert Styles */
.alert-modern {
    padding: 12px 14px !important;
    border-radius: 8px !important;
    margin-bottom: 14px !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    animation: slideInAlert 0.3s ease;
    position: relative !important;
    border: none !important;
}

.alert-modern span {
    flex: 1;
    padding-right: 30px;
    word-wrap: break-word;
}

.container-fluid .alert-modern,
.animated .alert-modern {
    width: 100%;
    max-width: 100%;
}

.alert-modern .close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.alert-modern .close:hover {
    opacity: 1;
}

@keyframes slideInAlert {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-success-modern {
    background: #f0fdf4;
    border-left: 4px solid #22c55e;
    border-top: 1px solid #bbf7d0;
    border-right: 1px solid #bbf7d0;
    border-bottom: 1px solid #bbf7d0;
    color: #166534;
}

.alert-success-modern i {
    color: #22c55e;
    margin-right: 10px;
    font-size: 16px;
}

.alert-danger-modern {
    background: #fef2f2 !important;
    border-left: 4px solid #dc2626 !important;
    border-top: 1px solid #fecaca !important;
    border-right: 1px solid #fecaca !important;
    border-bottom: 1px solid #fecaca !important;
    color: #991b1b !important;
}

.alert-danger-modern i {
    color: #dc2626 !important;
    margin-right: 10px;
    font-size: 16px;
    flex-shrink: 0;
}

.alert-warning-modern {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    border-top: 1px solid #fde68a;
    border-right: 1px solid #fde68a;
    border-bottom: 1px solid #fde68a;
    color: #92400e;
}

.alert-warning-modern i {
    color: #f59e0b;
    margin-right: 10px;
    font-size: 16px;
}

.alert-info-modern {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    border-top: 1px solid #bfdbfe;
    border-right: 1px solid #bfdbfe;
    border-bottom: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert-info-modern i {
    color: #3b82f6;
    margin-right: 10px;
    font-size: 16px;
}

