@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a202c;
    overflow-x: hidden;
}

/* Background Container */
.login-container {
    min-height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-image: linear-gradient(
        135deg,
        rgba(15, 23, 42, 0.35) 0%,
        rgba(30, 41, 59, 0.15) 50%,
        rgba(15, 23, 42, 0.3) 100%
    ), url('../images/bg_optometry.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 24px 16px;
}

/* Soft lighting overlay */
.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.25), transparent 75%);
    pointer-events: none;
}

/* Glassmorphism Login Card */
.glass-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.7);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 1px 3px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    padding: 40px 36px;
    position: relative;
    z-index: 10;
    animation: fadeInScale 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Brand Header */
.brand-header {
    text-align: center;
    margin-bottom: 28px;
}

.brand-logo-icon {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(2, 132, 199, 0.3);
    margin-bottom: 12px;
    transition: transform 0.3s ease;
}

.brand-logo-icon:hover {
    transform: scale(1.05) rotate(-3deg);
}

.brand-logo-icon svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.brand-title {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
    margin-bottom: 4px;
}

.brand-subtitle {
    font-size: 13.5px;
    color: #475569;
    font-weight: 500;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
    letter-spacing: 0.01em;
}

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

.input-icon {
    position: absolute;
    left: 14px;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: color 0.2s ease;
}

.input-icon svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

.form-input {
    width: 100%;
    height: 46px;
    padding: 0 16px 0 44px;
    font-size: 14.5px;
    font-family: inherit;
    color: #0f172a;
    background: rgba(255, 255, 255, 0.7);
    border: 1.5px solid rgba(203, 213, 225, 0.9);
    border-radius: 12px;
    outline: none;
    transition: all 0.2s ease;
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.95);
    border-color: #0284c7;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.15);
}

.form-input:focus + .input-icon,
.input-wrapper:focus-within .input-icon {
    color: #0284c7;
}

/* Password Toggle Button */
.toggle-password {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.toggle-password:hover {
    color: #0f172a;
    background: rgba(0, 0, 0, 0.05);
}

.toggle-password svg {
    width: 19px;
    height: 19px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
}

/* Options Row (Remember Me & Forgot Password) */
.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 13px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: pointer;
    user-select: none;
    color: #475569;
    font-weight: 500;
}

.remember-me input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #0284c7;
    border-radius: 4px;
    cursor: pointer;
}

.forgot-link {
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #0369a1;
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 15.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

.btn-submit svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    transition: transform 0.2s ease;
}

.btn-submit:hover svg {
    transform: translateX(3px);
}

/* Footer / Extra Links */
.card-footer {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    color: #64748b;
}

.card-footer a {
    color: #0284c7;
    font-weight: 600;
    text-decoration: none;
}

.card-footer a:hover {
    text-decoration: underline;
}

/* Mobile & Small Screen Optimizations */
@media (max-width: 640px) {
    .login-container {
        padding: 16px 12px;
        background-position: center center;
        background-size: cover;
        align-items: center; /* Center card vertically on all screen sizes */
    }

    .glass-card {
        max-width: 100%;
        padding: 22px 20px;
        border-radius: 20px;
        /* Increased glass transparency so background optical tools remain visible right through the card */
        background: rgba(255, 255, 255, 0.62);
        backdrop-filter: blur(12px) saturate(160%);
        -webkit-backdrop-filter: blur(12px) saturate(160%);
    }

    .brand-header {
        margin-bottom: 16px;
        display: flex;
        align-items: center;
        text-align: left;
        gap: 12px;
    }

    .brand-logo-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .brand-logo-icon svg {
        width: 24px;
        height: 24px;
    }

    .brand-title {
        font-size: 20px;
        margin-bottom: 2px;
    }

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

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

    .form-label {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .form-input {
        height: 42px;
        font-size: 14px;
        padding-left: 40px;
        background: rgba(255, 255, 255, 0.65);
    }

    .input-icon {
        left: 12px;
    }

    .input-icon svg {
        width: 17px;
        height: 17px;
    }

    .form-options {
        margin-bottom: 16px;
        font-size: 12px;
    }

    .btn-submit {
        height: 44px;
        font-size: 14.5px;
    }

    .card-footer {
        margin-top: 14px;
        font-size: 12px;
    }
}

/* Very Small Mobile Displays (< 380px) */
@media (max-width: 380px) {
    .glass-card {
        padding: 18px 16px;
    }
    .brand-title {
        font-size: 18px;
    }
}
