/* Super Market Billing - Modern Login Page - White & Blue Theme */
:root {
    --pure-white: #ffffff;
    --blue-primary: #2563eb;
    --blue-light: #3b82f6;
    --blue-dark: #1d4ed8;
    --blue-ultralight: #eff6ff;
    --blue-border: #dbeafe;
    --blue-hover: #1e40af;
    --blue-text: #1e3a8a;
    --gray-light: #f8fafc;
    --gray-border: #e2e8f0;
    --gray-text: #475569;
    --gray-dark: #334155;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background - White & Blue */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 50%, #e0f2fe 100%);
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(59, 130, 246, 0.05) 100%);
    border: 1px solid rgba(219, 234, 254, 0.3);
    animation: float 25s infinite linear;
}

.circle:nth-child(1) {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-duration: 25s;
}

.circle:nth-child(2) {
    width: 200px;
    height: 200px;
    top: 20%;
    right: -50px;
    animation-duration: 20s;
    animation-delay: -5s;
}

.circle:nth-child(3) {
    width: 150px;
    height: 150px;
    bottom: 30%;
    left: -50px;
    animation-duration: 18s;
    animation-delay: -8s;
}

.circle:nth-child(4) {
    width: 100px;
    height: 100px;
    bottom: -30px;
    right: 20%;
    animation-duration: 15s;
    animation-delay: -3s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, 20px) rotate(90deg);
    }

    50% {
        transform: translate(0, 40px) rotate(180deg);
    }

    75% {
        transform: translate(-20px, 20px) rotate(270deg);
    }
}

/* Login Container */
.login-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Card - Pure White */
.login-card {
    background: var(--pure-white);
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--blue-border);
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--blue-primary) 0%, var(--blue-light) 100%);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 30px;
}

.logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
    position: relative;
    border: 3px solid var(--pure-white);
}

.logo-icon {
    font-size: 36px;
    color: var(--pure-white);
}

.logo-text {
    font-size: 2rem;
    font-weight: 700;
    color: var(--blue-text);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.logo-subtext {
    color: var(--gray-text);
    font-size: 0.9rem;
    font-weight: 400;
}

/* Messages */
.error-message,
.success-message {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
    font-size: 0.9rem;
    border-left: 4px solid;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    border-left-color: #dc2626;
}

.success-message {
    background: #f0fdf4;
    color: #16a34a;
    border-left-color: #16a34a;
}

.error-message i,
.success-message i {
    font-size: 1.1rem;
}

/* Form Styles */
.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--blue-text);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.form-label i {
    color: var(--blue-primary);
    font-size: 1rem;
}

.input-group {
    position: relative;
}

.input-group .form-control {
    width: 100%;
    padding: 14px 50px 14px 45px;
    border: 2px solid var(--blue-border);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--pure-white);
    color: var(--gray-dark);
}

.input-group .form-control:focus {
    border-color: var(--blue-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.input-group .form-control::placeholder {
    color: var(--gray-text);
    opacity: 0.6;
}

/* Email Input Icon */
.input-group .input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--blue-primary);
    font-size: 1.1rem;
    pointer-events: none;
    transition: color 0.3s ease;
}

.input-group .form-control:focus+.input-icon {
    color: var(--blue-dark);
}

/* Password Toggle Button */
.password-toggle-btn {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-text);
    cursor: pointer;
    padding: 5px;
    font-size: 1.1rem;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.password-toggle-btn:hover {
    background: var(--blue-ultralight);
    color: var(--blue-primary);
}

.password-toggle-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.password-toggle-btn i {
    transition: transform 0.2s ease;
}

.password-toggle-btn.active i.fa-eye {
    transform: scale(1.1);
}

.password-toggle-btn.active i.fa-eye-slash {
    transform: scale(1.1);
}

/* Remember Me Checkbox */
.form-check {
    margin-top: 15px;
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid var(--blue-border);
    border-radius: var(--radius-sm);
    margin-right: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background: var(--pure-white);
}

.form-check-input:checked {
    background: var(--blue-primary);
    border-color: var(--blue-primary);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-check-label {
    color: var(--blue-text);
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-dark) 100%);
    color: var(--pure-white);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.btn-login:hover {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-hover) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.2);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-login i {
    font-size: 1.1rem;
}

/* Loading animation */
.btn-login.loading {
    color: transparent;
}

.btn-login.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--pure-white);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Forgot Password Link */
.forgot-password {
    text-align: center;
    margin: 20px 0;
}

.forgot-link {
    color: var(--blue-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.forgot-link:hover {
    color: var(--blue-dark);
    text-decoration: none;
}

.forgot-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--blue-primary);
    transition: width 0.3s ease;
}

.forgot-link:hover::after {
    width: 100%;
}

/* Create Account Link */
.create-account {
    text-align: center;
    margin: 20px 0;
}

.register-link {
    color: var(--blue-primary);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: 2px solid var(--blue-border);
    border-radius: var(--radius);
    transition: all 0.3s ease;
    background: var(--pure-white);
}

.register-link:hover {
    background: var(--blue-primary);
    color: var(--pure-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.15);
    text-decoration: none;
    border-color: var(--blue-primary);
}

.register-link:active {
    transform: translateY(0);
}

.register-link i {
    font-size: 1rem;
}

/* Login Footer */
.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--blue-border);
    text-align: center;
}

.login-footer p {
    color: var(--gray-text);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.login-footer p:last-child {
    font-weight: 600;
    color: var(--blue-primary);
    font-size: 0.9rem;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        max-width: 400px;
    }

    .login-card {
        padding: 30px 25px;
        border-radius: var(--radius-lg);
    }

    .logo-circle {
        width: 70px;
        height: 70px;
    }

    .logo-icon {
        font-size: 32px;
    }

    .logo-text {
        font-size: 1.75rem;
    }

    .logo-subtext {
        font-size: 0.85rem;
    }

    .btn-login {
        padding: 14px;
    }

    .register-link {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

@media (max-width: 576px) {
    body {
        padding: 15px;
        background: var(--pure-white);
    }

    .bg-animation {
        display: none;
    }

    .login-container {
        max-width: 100%;
    }

    .login-card {
        padding: 25px 20px;
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        border: 1px solid var(--blue-border);
    }

    .logo-circle {
        width: 60px;
        height: 60px;
    }

    .logo-icon {
        font-size: 28px;
    }

    .logo-text {
        font-size: 1.5rem;
    }

    .logo-subtext {
        font-size: 0.85rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .input-group .form-control {
        padding: 12px 45px 12px 40px;
        font-size: 0.95rem;
    }

    .input-group .input-icon {
        left: 14px;
        font-size: 1rem;
    }

    .password-toggle-btn {
        right: 14px;
        font-size: 1rem;
    }

    .btn-login {
        padding: 14px;
        font-size: 0.95rem;
    }

    .register-link {
        padding: 10px 18px;
        font-size: 0.9rem;
    }

    .login-footer p {
        font-size: 0.8rem;
    }
}

@media (max-width: 400px) {
    .login-card {
        padding: 20px 15px;
    }

    .logo-text {
        font-size: 1.3rem;
    }

    .logo-subtext {
        font-size: 0.8rem;
    }

    .input-group .form-control {
        padding: 12px 40px 12px 35px;
    }

    .btn-login span {
        font-size: 0.9rem;
    }

    .register-link span {
        font-size: 0.85rem;
    }
}

/* Tablet Optimization */
@media (min-width: 769px) and (max-width: 1024px) {
    .login-container {
        max-width: 420px;
    }

    .login-card {
        padding: 35px 30px;
    }
}

/* Animation for form inputs on load */
.form-label,
.input-group,
.form-check,
.btn-login,
.forgot-password,
.create-account {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-label {
    animation-delay: 0.1s;
}

.input-group {
    animation-delay: 0.2s;
}

.form-check {
    animation-delay: 0.3s;
}

.btn-login {
    animation-delay: 0.4s;
}

.forgot-password {
    animation-delay: 0.5s;
}

.create-account {
    animation-delay: 0.6s;
}

/* Focus states for accessibility */
.form-control:focus,
.btn-login:focus,
.register-link:focus,
.forgot-link:focus {
    outline: 2px solid var(--blue-primary);
    outline-offset: 2px;
}

/* Password field specific */
#passwordInput {
    padding-right: 50px !important;
}