:root {
    --primary: #2563eb;
    /* Strong, clear blue */
    --primary-dark: #1d4ed8;
    --text-main: #111827;
    /* High contrast dark text */
    --text-muted: #4b5563;
    /* Readable dark gray */
    --card-bg: #ffffff;
    /* Clean white */
    --card-border: #e5e7eb;
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    /* Clear border */
    --input-focus: #3b82f6;
    --error: #dc2626;
    /* High contrast red */
    --body-bg: #f9fafb;
}

* {
    box-sizing: border-box;
}

body.premium-login-page {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: var(--body-bg);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    color: var(--text-main);
}

/* Light Dynamic Background */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
    transition: transform 0.5s ease-out;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, #bfdbfe 0%, transparent 70%);
    animation-delay: 0s;
    transform: translate(calc(var(--mouse-x, 0.5) * -30px), calc(var(--mouse-y, 0.5) * -30px));
}

.blob-2 {
    bottom: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, #e0e7ff 0%, transparent 70%);
    animation-delay: -5s;
    transform: translate(calc(var(--mouse-x, 0.5) * 30px), calc(var(--mouse-y, 0.5) * 30px));
}

.blob-3 {
    top: 40%;
    left: 60%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, #bae6fd 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(5%, 10%) scale(1.05);
    }
}

/* Clean Card */
.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 600px;
    /* Increased width to make it wider */
    padding: 20px;
    margin: auto;
}

.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    /* Standard rounded corners */
    padding: 36px 40px;
    /* Reduced padding */
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.08);
    /* Soft, grounded shadow */
    animation: cardAppear 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header */
.card-header {
    text-align: center;
    margin-bottom: 24px;
    /* Reduced from 35px */
}
.logo-wrapper {
    width: 100%;
    height: auto;
    margin: 0 auto 8px;
    background: transparent;
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: none;
}

.logo-wrapper .logo-img {
    display: block;
    width: 360px;
    max-width: 90%;
    max-height: 95px;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
}

.logo-wrapper svg {
    width: 36px;
    /* Reduced from 46px */
    height: 36px;
    stroke: var(--primary);
}

.system-title {
    font-size: 28px;
    /* Slightly smaller */
    font-weight: 700;
    margin: 0 0 6px;
    color: #1e3a8a;
    /* Deep, readable blue */
    letter-spacing: 0.5px;
}

.system-subtitle {
    font-size: 16px;
    /* Larger subtitle */
    color: var(--text-muted);
    margin: 0;
    font-weight: 500;
    text-transform: uppercase;
}

/* Body */
.form-title {
    font-size: 22px;
    /* Reduced from 24px */
    font-weight: 600;
    margin: 0 0 20px;
    /* Reduced from 25px */
    text-align: center;
    color: var(--text-main);
}

/* Alerts */
.alert {
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 15px;
    /* Readable text */
    margin-bottom: 24px;
    border: 1px solid transparent;
}

.premium-alert-danger {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.premium-alert-warning {
    background: #fefce8;
    border-color: #fde047;
    color: #854d0e;
}

/* Form Elements */
.form-group {
    margin-bottom: 18px;
    /* Reduced from 24px */
}

.form-group label {
    display: block;
    font-size: 15px;
    /* Slightly smaller */
    font-weight: 600;
    /* Bold labels for readability */
    color: var(--text-main);
    margin-bottom: 6px;
    /* Reduced from 10px */
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 18px;
    color: #6b7280;
    font-size: 22px;
    transition: color 0.2s ease;
    z-index: 2;
}

.glass-input {
    width: 100%;
    background: var(--input-bg);
    border: 2px solid var(--input-border);
    /* Thicker border for clarity */
    border-radius: 10px;
    padding: 13px 16px 13px 46px;
    /* Reduced padding */
    color: var(--text-main);
    font-size: 16px;
    /* Reduced from 17px but still accessible */
    font-family: 'Roboto', sans-serif;
    transition: all 0.2s ease;
}

.glass-input::placeholder {
    color: #9ca3af;
    /* Standard, accessible placeholder */
}

.glass-input:focus {
    outline: none;
    border-color: var(--input-focus);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
    /* Strong focus ring */
    background: #ffffff;
}

.glass-input:focus~.input-icon,
.input-wrapper:focus-within .input-icon {
    color: var(--primary);
}

.toggle-password {
    position: absolute;
    right: 14px;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    /* Larger hit area */
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.toggle-password:hover {
    color: var(--primary);
}

.error-text {
    display: block;
    font-size: 14px;
    /* Readable error text */
    font-weight: 500;
    color: var(--error);
    margin-top: 8px;
}

/* Checkbox */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    /* Reduced from 30px */
}

.custom-checkbox {
    display: flex;
    align-items: center;
}

.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.custom-checkbox label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 16px;
    /* Larger clickable text */
    font-weight: 500;
    color: var(--text-main);
    /* High contrast */
    user-select: none;
}

.custom-checkbox label:hover {
    color: var(--primary);
}

.checkbox-box {
    width: 24px;
    /* Larger checkbox */
    height: 24px;
    border: 2px solid var(--input-border);
    border-radius: 6px;
    /* Standard square */
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    transition: all 0.2s ease;
}

.checkbox-box i {
    font-size: 14px;
    color: transparent;
    transition: transform 0.2s ease;
    transform: scale(0.5);
}

.custom-checkbox input[type="checkbox"]:checked+label .checkbox-box {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox input[type="checkbox"]:checked+label .checkbox-box i {
    color: #fff;
    transform: scale(1);
}

.custom-checkbox input[type="checkbox"]:focus-visible+label .checkbox-box {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.3);
}

/* Button */
.premium-btn {
    width: 100%;
    background: var(--primary);
    /* Solid color, better for older eyes */
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    /* Reduced padding */
    font-size: 16px;
    /* Large readable text */
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.premium-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}

.premium-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.premium-btn i {
    font-size: 20px;
    transition: transform 0.2s ease;
}

.premium-btn:hover i {
    transform: translateX(4px);
}

/* Footer */
.card-footer {
    text-align: center;
    margin-top: 24px;
    /* Reduced from 35px */
    padding-top: 16px;
    /* Reduced from 25px */
    border-top: 1px solid var(--card-border);
}

.card-footer p {
    margin: 0;
    font-size: 15px;
    /* Readable footer text */
    color: var(--text-muted);
}

/* Responsive */
@media (max-width: 992px) {
    .login-container {
        padding: 15px;
    }

    .glass-card {
        padding: 30px 32px;
    }
}

@media (max-width: 768px) {
    .glass-card {
        padding: 28px 24px;
    }

    .system-title {
        font-size: 26px;
    }

    .system-subtitle {
        font-size: 15px;
    }

    .form-title {
        font-size: 20px;
    }

    .blob {
        filter: blur(60px);
        /* Reduce blur size on smaller screens */
    }
}

@media (max-width: 576px) {
    .login-container {
        padding: 10px;
    }

    .glass-card {
        padding: 24px 16px;
        border-radius: 12px;
        /* Slightly smaller radius for small screens */
    }

    .system-title {
        font-size: 22px;
    }

    .system-subtitle {
        font-size: 13px;
        line-height: 1.4;
    }

    .logo-wrapper .logo-img {
        width: 260px;
        max-height: 70px;
    }
    .logo-wrapper svg {
        width: 28px;
        height: 28px;
    }

    .glass-input {
        font-size: 15px;
        padding: 12px 16px 12px 42px;
    }

    .input-icon {
        font-size: 20px;
        left: 14px;
    }

    .toggle-password {
        font-size: 20px;
        right: 10px;
    }

    .form-group label {
        font-size: 14px;
    }

    .custom-checkbox label {
        font-size: 15px;
    }

    .checkbox-box {
        width: 22px;
        height: 22px;
    }

    .premium-btn {
        font-size: 16px;
        padding: 12px;
    }

    .card-footer {
        margin-top: 20px;
        padding-top: 12px;
    }

    .card-footer p {
        font-size: 13px;
    }

    /* Make blobs smaller and adjust positioning for mobile */
    .blob-1 {
        width: 70vw;
        height: 70vw;
        top: -5%;
        left: -10%;
    }

    .blob-2 {
        width: 80vw;
        height: 80vw;
        bottom: -10%;
        right: -20%;
    }

    .blob-3 {
        display: none;
        /* Hide one blob on mobile to improve performance and look */
    }
}