/* login.css - Login Page Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    animation: fadeInUp 0.5s ease;
    flex-shrink: 0;
}

.login-box {
    background: #ffffff;
    border-radius: 15px;
    padding: 40px 35px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
    flex-shrink: 0;
}

.login-logo img {
    max-width: 200px;
    height: auto;
    margin-bottom: 10px;
  
}

.login-logo h2 {
    color: #333;
    font-weight: 700;
    font-size: 28px;
    margin: 10px 0 5px;
}

.login-logo p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.login-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.login-form .form-group {
    margin-bottom: 20px;
    width: 100%;
}

.login-form label {
    font-weight: 600;
    color: #444;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.login-form label i {
    margin-right: 5px;
    color: #667eea;
}

.login-form .input-group {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    width: 100%;
    display: flex;
    flex-wrap: nowrap;
}

.login-form .input-group-prepend,
.login-form .input-group-append {
    display: flex;
    flex-shrink: 0;
}

.login-form .input-group-text {
    background: #f8f9fa;
    border: 1px solid #dce1e8;
    color: #667eea;
    padding: 12px 15px;
    min-width: 46px;
    justify-content: center;
    display: flex;
    align-items: center;
    font-size: 16px;
    height: 100%;
    border-radius: 0;
}

.login-form .input-group-prepend .input-group-text {
    border-radius: 8px 0 0 8px;
}

.login-form .input-group-append .input-group-text {
    border-radius: 0 8px 8px 0;
}

.login-form .form-control {
    border: 1px solid #dce1e8;
    padding: 12px 15px;
    font-size: 15px;
    transition: all 0.3s ease;
    width: 100%;
    height: auto;
    min-height: 48px;
    flex: 1;
    border-radius: 0;
}

.login-form .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    z-index: 3;
}

.login-form .input-group-append .input-group-text {
    background: #f8f9fa;
    border: 1px solid #dce1e8;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 46px;
    justify-content: center;
}

.login-form .input-group-append .input-group-text:hover {
    background: #e9ecef;
}

.login-form .custom-control {
    padding-left: 30px;
    min-height: 24px;
}

.login-form .custom-control-label {
    color: #555;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    padding-left: 5px;
}

.login-form .custom-control-label::before {
    border-radius: 4px;
    border-color: #dce1e8;
    width: 18px;
    height: 18px;
    top: 2px;
}

.login-form .custom-control-label::after {
    top: 2px;
    width: 18px;
    height: 18px;
}

.login-form .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #667eea;
    border-color: #667eea;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 14px;
    font-weight: 600;
    font-size: 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    width: 100%;
    min-height: 52px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    color: #fff;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    flex-shrink: 0;
}

.forgot-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

.login-divider {
    position: relative;
    text-align: center;
    margin: 25px 0 20px;
    flex-shrink: 0;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.login-divider span {
    background: #ffffff;
    padding: 0 15px;
    position: relative;
    color: #999;
    font-size: 14px;
}

.login-options {
    margin-top: 20px;
    flex-shrink: 0;
}

.login-options .badge {
    margin: 0 5px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 500;
}

.login-footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.login-footer-bottom p {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.login-footer-bottom .text-muted {
    font-size: 12px;
    margin-top: 5px;
}

.login-footer-bottom i {
    color: #28a745;
}

/* Alert styles */
.alert {
    border-radius: 8px;
    padding: 12px 20px;
    margin-bottom: 20px;
    border: none;
    width: 100%;
}

.alert-danger {
    background: #fee8e8;
    color: #dc3545;
}

.alert-success {
    background: #e8f5e9;
    color: #28a745;
}

.alert i {
    margin-right: 8px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-box {
        padding: 30px 20px;
        min-height: auto;
    }
    
    .login-logo h2 {
        font-size: 24px;
    }
    
    .login-logo img {
        max-width: 60px;
    }
    
    .btn-primary {
        padding: 12px;
        font-size: 15px;
        min-height: 46px;
    }
    
    .login-form .form-control {
        padding: 10px 12px;
        font-size: 14px;
        min-height: 44px;
    }
    
    .login-form .input-group-text {
        padding: 10px 12px;
        min-width: 40px;
        font-size: 14px;
    }
    
    .login-options .badge {
        display: inline-block;
        margin: 3px;
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .login-container {
        padding: 10px;
    }
}

@media (max-width: 400px) {
    .login-box {
        padding: 20px 15px;
    }
    
    .login-logo h2 {
        font-size: 20px;
    }
    
    .login-form .form-group {
        margin-bottom: 15px;
    }
    
    .login-footer-bottom p {
        font-size: 11px;
    }
    
    .login-options .badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .login-box {
        padding: 35px 30px;
    }
}

/* Height-based responsiveness */
@media (max-height: 700px) {
    .login-box {
        padding: 25px 20px;
        min-height: auto;
    }
    
    .login-logo {
        margin-bottom: 20px;
    }
    
    .login-logo img {
        max-width: 50px;
    }
    
    .login-logo h2 {
        font-size: 22px;
        margin: 5px 0;
    }
    
    .login-form .form-group {
        margin-bottom: 15px;
    }
    
    .login-divider {
        margin: 15px 0;
    }
    
    .login-footer-bottom {
        margin-top: 15px;
        padding-top: 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body.login-page {
        background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    }
    
    .login-box {
        background: #2d2d44;
    }
    
    .login-logo h2 {
        color: #e8e8e8;
    }
    
    .login-logo p {
        color: #a0a0b0;
    }
    
    .login-form label {
        color: #d0d0d0;
    }
    
    .login-form .input-group-text {
        background: #3a3a55;
        border-color: #4a4a66;
        color: #8a8ae0;
    }
    
    .login-form .form-control {
        background: #3a3a55;
        border-color: #4a4a66;
        color: #e8e8e8;
    }
    
    .login-form .form-control:focus {
        border-color: #667eea;
        background: #3a3a55;
    }
    
    .login-form .input-group-append .input-group-text {
        background: #3a3a55;
        border-color: #4a4a66;
        color: #a0a0b0;
    }
    
    .login-form .custom-control-label {
        color: #c0c0c0;
    }
    
    .login-divider::before {
        background: #4a4a66;
    }
    
    .login-divider span {
        background: #2d2d44;
        color: #a0a0b0;
    }
    
    .login-footer-bottom {
        border-top-color: #4a4a66;
    }
    
    .login-footer-bottom p {
        color: #a0a0b0;
    }
    
    .alert-danger {
        background: #3d2020;
        color: #ff6b6b;
    }
    
    .alert-success {
        background: #1a3d2a;
        color: #51cf66;
    }
}

/* Accessibility - Focus styles */
input:focus, button:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .login-box {
        border: 2px solid #000;
    }
    
    .form-control {
        border-width: 2px;
    }
}

/* Print styles */
@media print {
    .login-page {
        background: white !important;
    }
    
    .login-box {
        box-shadow: none !important;
        border: 1px solid #ddd;
    }
    
    .btn-primary {
        background: #333 !important;
        color: white !important;
    }
}