/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(-45deg, #10b981, #0ea5e9, #6366f1, #8b5cf6);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    overflow: hidden;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.login-wrapper {
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Dark Glassmorphism */
.login-card {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 45px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-card:hover {
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

.login-header {
    text-align: center;
    margin-bottom: 35px;
}

.login-header .logo {
    max-height: 80px;
    margin-bottom: 25px;
    object-fit: contain;
    transition: transform 0.3s ease;
    border-radius: 8px; /* Smooths the logo edges */
}

.login-header .logo:hover {
    transform: scale(1.05);
}

.login-header h2 {
    color: #f8fafc;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    letter-spacing: -0.025em;
}

.login-header p {
    color: #94a3b8;
    font-size: 0.95rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    color: #64748b;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    z-index: 10;
}

.input-group input {
    width: 100%;
    padding: 15px 16px 15px 48px;
    border: 2px solid #334155;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.7);
    font-size: 1rem;
    color: #f8fafc;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-group input::placeholder {
    color: #64748b;
    font-weight: 400;
}

.input-group input:focus {
    outline: none;
    border-color: #6366f1;
    background: rgba(30, 41, 59, 0.9);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.input-group input:focus + .input-icon,
.input-group input:not(:placeholder-shown) + .input-icon {
    color: #818cf8;
}

/* Fix browser autofill styling */
.input-group input:-webkit-autofill,
.input-group input:-webkit-autofill:hover,
.input-group input:-webkit-autofill:focus,
.input-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1e293b inset !important;
    -webkit-text-fill-color: #f8fafc !important;
    transition: background-color 5000s ease-in-out 0s;
    border-color: #334155;
}
.input-group input:-webkit-autofill:focus {
    border-color: #6366f1;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -5px;
    margin-bottom: 5px;
}

/* Custom Checkbox */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #cbd5e1;
    font-weight: 500;
    user-select: none;
    transition: color 0.2s;
}

.checkbox-container:hover {
    color: #f8fafc;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 18px;
    width: 18px;
    background-color: #1e293b;
    border: 2px solid #475569;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #334155;
    border-color: #64748b;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #6366f1;
    border-color: #6366f1;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 5px;
    top: 2px;
    width: 4px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.forgot-password {
    color: #818cf8;
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.forgot-password:hover {
    color: #a5b4fc;
    text-decoration: underline;
}

.btn-login {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 14px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.25);
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 20px rgba(99, 102, 241, 0.4);
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.btn-login:active {
    transform: translateY(1px);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.25);
}

.error-message {
    background: rgba(239, 68, 68, 0.15);
    border-left: 4px solid #ef4444;
    padding: 14px 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fca5a5;
    font-size: 0.9rem;
    font-weight: 500;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* SweetAlert customization */
.swal-custom-popup {
    border-radius: 20px !important;
    padding: 2em !important;
}

.swal-custom-title {
    color: #f8fafc !important;
    font-family: 'Inter', sans-serif !important;
}

.swal-custom-button {
    border-radius: 12px !important;
    padding: 12px 28px !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
    background: #6366f1 !important;
}