﻿* {
    box-sizing: border-box;
}

.login-bg {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow-x: hidden;
    background: linear-gradient( to bottom right, #7FABE0, #5992D7, #3379CE );
    margin: 0;
}

.login-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 24px 48px -12px rgba(10, 13, 18, 0.18);
    padding: 2rem;
    width: 420px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.logo {
    width: auto !important;
    height: auto !important;
}

.logo-image {
    width: 280px;
    height: auto;
    object-fit: contain;
}

.welcome-text {
    text-align: center;
    margin-bottom: 2rem;
}

.welcome-text h4 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #004FAF;
    margin-bottom: 0.5rem;
}

.welcome-text h6 {
    color: #000000;
    font-size: 0.85rem;
    font-weight: 400;
    margin: 0;
}

.login-form {
    width: 100%;
}

.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.input-with-icon {
    position: relative;
    width: 100%;
}

input, .form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: white;
}

.form-input.with-left-icon {
    padding-left: 3rem !important;
}

.form-input.with-icons {
    padding-left: 3rem !important;
    padding-right: 3rem !important;
}

input:focus, .form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

input::placeholder, .form-input::placeholder {
    color: #9ca3af;
}

.input-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    transition: color 0.2s ease;
    z-index: 10;
    pointer-events: none;
}

.left-icon {
    left: 1rem;
}

.right-icon {
    right: 1rem;
    pointer-events: auto;
}

.input-icon i {
    color: inherit;
    transition: color 0.2s ease;
}

.custom-rectangle-ellipsis {
    color: inherit;
    transition: color 0.2s ease;
}

.password-toggle {
    cursor: pointer;
    transition: all 0.2s ease;
}

.password-toggle:hover {
    color: #6366f1;
}

.form-input:focus ~ .input-icon {
    color: #3b82f6;
}

.hidden {
    display: none !important;
}

.md-input-danger {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.md-input-danger ~ .input-icon {
    color: #ef4444;
}

.validation-summary-valid {
    display: none !important;
}

.validation-summary-errors, .validation-summary {
    color: #dc2626;
    font-size: 0.813rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #fee2e2;
    border-left: 3px solid #dc2626;
    border-radius: 0.375rem;
}

.error-message {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
    position: absolute;
    bottom: -1.25rem;
    left: 0;
    width: 100%;
    height: 1rem;
}

.error-message:not(:empty) {
    display: block;
    opacity: 1;
}

.form-actions {
    margin: 1.5rem 0;
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    font-size: 1rem;
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
    transform: translateY(-2px);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.forgot-password-area {
    text-align: center;
    margin-top: 1.5rem;
}

.forgot-password {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: #6366f1;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 3px;
    transition: all 0.2s ease;
    background: white;
}

.forgot-password:hover {
    border-color: #6366f1;
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
    text-decoration: none;
}

.lock-icon {
    color: #6366f1;
    flex-shrink: 0;
}

.dark .input-icon {
    color: #6b7280;
}

.dark .form-input:focus ~ .input-icon {
    color: #60a5fa;
}

@media (max-width: 768px) {
    .login-card {
        width: 380px;
        padding: 1.75rem;
    }
}

@media (max-width: 640px) {
    body, .login-bg {
        padding: 0.75rem;
    }

    .login-card {
        width: 100%;
        max-width: 360px;
        padding: 1.5rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    }

    input, .form-input {
        font-size: 0.938rem;
        padding: 0.688rem 0.875rem;
    }

    .form-input.with-left-icon {
        padding-left: 2.75rem !important;
    }

    .form-input.with-icons {
        padding-left: 2.75rem !important;
        padding-right: 2.75rem !important;
    }

    .input-icon {
        width: 20px;
        height: 20px;
    }

    .input-icon i {
        width: 18px;
        height: 18px;
    }

    .left-icon {
        left: 0.875rem;
    }

    .right-icon {
        right: 0.875rem;
    }

    .error-message {
        bottom: -1.1rem;
        font-size: 0.7rem;
        height: 0.9rem;
    }

    .submit-btn {
        padding: 0.813rem 1.25rem;
        font-size: 0.938rem;
    }

    .forgot-password {
        padding: 0.563rem 1rem;
        font-size: 0.813rem;
    }

    .lock-icon {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 375px) {
    .login-card {
        max-width: 320px;
        padding: 1.25rem;
    }

    .logo-image {
        width: 240px;
    }

    .form-input.with-left-icon {
        padding-left: 2.5rem !important;
    }

    .form-input.with-icons {
        padding-left: 2.5rem !important;
        padding-right: 2.5rem !important;
    }

    .input-icon {
        width: 18px;
        height: 18px;
    }

    .input-icon i {
        width: 16px;
        height: 16px;
    }

    .left-icon {
        left: 0.75rem;
    }

    .right-icon {
        right: 0.75rem;
    }

    .error-message {
        bottom: -1rem;
        font-size: 0.65rem;
        height: 0.8rem;
    }
}

.border-red-500 {
    border-color: #ef4444 !important;
}

.text-red-500 {
    color: #ef4444;
}

.error-message {
    color: #dc2626;
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.login-error-message {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    animation: fadeIn 0.3s ease-out;
}

.error-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dark .login-error-message {
    background-color: #450a0a;
    border-color: #7f1d1d;
    color: #fca5a5;
}

.simple-error-message {
    color: #dc2626;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.dark .simple-error-message {
    color: #fca5a5;
}