/* Reset CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

/* Smooth Gradient Background */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #2d1b4e 0%, #4a2c5e 25%, #6b3d6b 50%, #3d5a8c 75%, #2b4c7e 100%);
    position: relative;
    overflow-x: hidden;
}

/* Gradient overlay animation */
body::before {
    content: '';
    position: fixed;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 50%, rgba(157, 78, 221, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(94, 114, 228, 0.3) 0%, transparent 50%);
    z-index: 0;
    pointer-events: none;
    animation: gradientMove 10s ease-in-out infinite;
}

@keyframes gradientMove {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.8; }
}

/* Particle Canvas Background */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    z-index: 1;
}

/* Hidden Header for Clean Look */
header {
    display: none;
}

/* Home Button - Fixed Position */
.home-button {
    position: fixed;
    top: 2rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.home-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: #fff;
}

.home-button:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.home-button svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.home-button:hover svg {
    transform: scale(1.1);
}

.login-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    min-height: 100vh;
}

/* Glassmorphism Login Container with Gradient */
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 3rem 2.5rem 2.5rem;
    background: linear-gradient(135deg, rgba(114, 63, 140, 0.4) 0%, rgba(75, 85, 160, 0.4) 100%);
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 
        0 25px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Shake Animation for Error */
.login-container.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes shake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

/* User Avatar */
.user-avatar {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.user-avatar svg {
    filter: drop-shadow(0 4px 15px rgba(0, 0, 0, 0.2));
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

h2 {
    display: none;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

/* Floating Label Effect (Optional) */
.form-group.has-value input,
.form-group input:focus {
    padding-top: 1.3rem;
    padding-bottom: 0.7rem;
}

/* Input Background Gradient on Focus */
input[type="text"]:focus,
input[type="password"]:focus {
    background: linear-gradient(135deg, rgba(255, 255, 255, 1), rgba(252, 251, 255, 1));
}

/* Add shimmer effect to inputs */
input[type="text"],
input[type="password"] {
    position: relative;
    overflow: hidden;
}

input[type="text"]::before,
input[type="password"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    margin-left: 0.3rem;
}

/* Input Fields with Icon - Modern Design */
.input-with-icon {
    position: relative;
    z-index: 1;
    margin-bottom: 1.5rem;
}

.input-icon {
    position: absolute;
    left: 1rem;
    bottom: 1rem;
    color: rgba(94, 71, 161, 0.8);
    z-index: 2;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 1rem 3rem 1rem 3rem;
    border: 1.5px solid rgba(255, 255, 255, 0.4);
    border-radius: 50px;
    font-size: 0.95rem;
    color: rgba(30, 30, 50, 0.95);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 0 0 1px rgba(255, 255, 255, 0.2);
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: rgba(94, 71, 161, 0.6);
    font-weight: 400;
    transition: all 0.3s ease;
}

/* Hover State */
input[type="text"]:hover,
input[type="password"]:hover {
    border-color: rgba(94, 71, 161, 0.5);
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 6px 20px rgba(94, 71, 161, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* Focus State */
input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: rgba(94, 71, 161, 0.6);
    background: rgba(255, 255, 255, 1);
    box-shadow: 
        0 8px 25px rgba(94, 71, 161, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 0 0 3px rgba(94, 71, 161, 0.15);
    transform: translateY(-2px);
}

/* Keep brightness when input has value (after blur) - HIGH PRIORITY */
input[type="text"]:not(:placeholder-shown),
input[type="password"]:not(:placeholder-shown) {
    background: rgba(255, 255, 255, 1) !important;
    border-color: rgba(94, 71, 161, 0.6) !important;
    color: rgba(30, 30, 50, 1) !important;
    font-weight: 600 !important;
    box-shadow: 
        0 6px 20px rgba(94, 71, 161, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 0 0 2px rgba(94, 71, 161, 0.2) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Also for valid inputs */
input[type="text"]:valid:not(:placeholder-shown),
input[type="password"]:valid:not(:placeholder-shown) {
    background: rgba(255, 255, 255, 1) !important;
    border-color: rgba(94, 71, 161, 0.6) !important;
    opacity: 1 !important;
}

/* Ensure icons are visible when input has value */
.input-with-icon:has(input:not(:placeholder-shown)) .input-icon,
input[type="text"]:not(:placeholder-shown) ~ .input-icon,
input[type="password"]:not(:placeholder-shown) ~ .input-icon {
    color: rgba(94, 71, 161, 1) !important;
    opacity: 1 !important;
}

input[type="text"]:focus::placeholder,
input[type="password"]:focus::placeholder {
    color: rgba(94, 71, 161, 0.3);
    transform: translateX(5px);
}

/* Icon Animation on Focus */
input[type="text"]:focus ~ .input-icon,
input[type="password"]:focus ~ .input-icon {
    color: rgba(94, 71, 161, 1);
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(94, 71, 161, 0.3));
}

/* Input Glow Effect on Focus */
input[type="text"]:focus,
input[type="password"]:focus {
    animation: inputGlow 2s ease-in-out infinite;
}

@keyframes inputGlow {
    0%, 100% {
        box-shadow: 
            0 8px 25px rgba(94, 71, 161, 0.25),
            inset 0 1px 0 rgba(255, 255, 255, 1),
            0 0 0 3px rgba(94, 71, 161, 0.15);
    }
    50% {
        box-shadow: 
            0 8px 30px rgba(94, 71, 161, 0.35),
            inset 0 1px 0 rgba(255, 255, 255, 1),
            0 0 0 3px rgba(94, 71, 161, 0.25);
    }
}

/* Input Validation States */
input.error {
    border-color: rgba(244, 67, 54, 0.6) !important;
    background: rgba(244, 67, 54, 0.1) !important;
    animation: inputShake 0.4s ease-in-out;
    box-shadow: 
        0 0 0 3px rgba(244, 67, 54, 0.15),
        0 4px 15px rgba(244, 67, 54, 0.2) !important;
}

input.error ~ .input-icon {
    color: #e53935;
    filter: drop-shadow(0 2px 4px rgba(244, 67, 54, 0.3));
}

input.success {
    border-color: rgba(76, 175, 80, 0.6) !important;
    background: rgba(76, 175, 80, 0.1) !important;
    box-shadow: 
        0 0 0 3px rgba(76, 175, 80, 0.15),
        0 4px 15px rgba(76, 175, 80, 0.2) !important;
}

input.success ~ .input-icon {
    color: #43a047;
    filter: drop-shadow(0 2px 4px rgba(76, 175, 80, 0.3));
}

@keyframes inputShake {
    0%, 100% { transform: translateX(0) translateY(0); }
    25% { transform: translateX(-8px) translateY(0); }
    50% { transform: translateX(8px) translateY(0); }
    75% { transform: translateX(-8px) translateY(0); }
}

/* Password Field with Toggle */
.password-field {
    position: relative;
}

.password-field input {
    padding-right: 3.5rem;
}

/* Toggle Password Button */
.toggle-password {
    position: absolute;
    right: 1rem;
    bottom: 0.8rem;
    background: rgba(94, 71, 161, 0.15);
    border: 1px solid rgba(94, 71, 161, 0.3);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
    cursor: pointer;
    color: rgba(94, 71, 161, 0.9);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.toggle-password:hover {
    color: rgba(94, 71, 161, 1);
    background: rgba(94, 71, 161, 0.25);
    border-color: rgba(94, 71, 161, 0.5);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(94, 71, 161, 0.3);
}

.toggle-password:active {
    transform: scale(0.95);
}

.toggle-password .eye-slash {
    display: none;
}

.toggle-password.active .eye-open {
    display: none;
}

.toggle-password.active .eye-slash {
    display: block;
}

/* Password Strength Indicator - DISABLED */
.password-strength {
    display: none !important;
}

/* Login Attempts Warning */
.login-attempts-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem;
    margin-bottom: 1.2rem;
    background: rgba(255, 152, 0, 0.2);
    border: 1px solid rgba(255, 152, 0, 0.4);
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.85rem;
    animation: slideDown 0.4s ease-out;
    position: relative;
    z-index: 1;
}

.login-attempts-warning svg {
    color: rgba(255, 152, 0, 0.9);
    flex-shrink: 0;
}

.login-attempts-warning strong {
    color: #fff;
    font-weight: 600;
}

/* Form Options Row (Remember & Forgot) */
.form-options {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.forgot-password {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
    font-style: italic;
}

.forgot-password:hover {
    color: rgba(255, 255, 255, 1);
}

/* Checkbox Styling */
.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.form-check-input {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    position: relative;
    appearance: none;
    -webkit-appearance: none;
}

.form-check-input:hover {
    border-color: rgba(255, 255, 255, 0.8);
}

.form-check-input:checked {
    background-color: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
}

.form-check-input:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #5e47a1;
    font-size: 12px;
    font-weight: bold;
}

.form-check-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    font-weight: 400;
    cursor: pointer;
    user-select: none;
}

/* Modern Gradient Button with Ripple Effect */
button {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    background: linear-gradient(90deg, #5e3a8c 0%, #3d5a9e 50%, #5e72be 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

button:hover::before {
    left: 100%;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    background: linear-gradient(90deg, #6d4a9b 0%, #4a67ad 50%, #6d80cd 100%);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Ripple Effect */
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s ease-out;
    pointer-events: none;
}

@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Loading State for Button */
button.loading {
    pointer-events: none;
    opacity: 0.8;
}

button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Styling */
.alert {
    border-radius: 12px;
    padding: 0.9rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
    border: 1px solid rgba(244, 67, 54, 0.4);
    animation: slideDown 0.4s ease-out;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: rgba(244, 67, 54, 0.2);
    color: #fff;
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.25);
    font-size: 0.85rem;
}

.error {
    background: rgba(244, 67, 54, 0.2);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 0.9rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(244, 67, 54, 0.4);
    box-shadow: 0 4px 15px rgba(244, 67, 54, 0.25);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.error.show {
    opacity: 1;
    transform: translateY(0);
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    padding: 1rem 1.2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: toastSlideIn 0.3s ease-out;
    pointer-events: all;
    border-left: 4px solid;
}

.toast.success {
    border-left-color: #4caf50;
}

.toast.error {
    border-left-color: #f44336;
}

.toast.warning {
    border-left-color: #ff9800;
}

.toast.info {
    border-left-color: #2196f3;
}

.toast-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.2rem;
}

.toast-message {
    font-size: 0.9rem;
    color: #666;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    padding: 0.2rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.toast-close:hover {
    color: #333;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.removing {
    animation: toastSlideOut 0.3s ease-out forwards;
}

@keyframes toastSlideOut {
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Success Animation Overlay */
#success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.success-checkmark {
    text-align: center;
    animation: scaleUp 0.5s ease-out;
}

@keyframes scaleUp {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.checkmark-circle {
    stroke-dasharray: 220;
    stroke-dashoffset: 220;
    animation: drawCircle 0.6s ease-out forwards;
}

@keyframes drawCircle {
    to {
        stroke-dashoffset: 0;
    }
}

.checkmark-check {
    stroke-dasharray: 50;
    stroke-dashoffset: 50;
    animation: drawCheck 0.4s 0.6s ease-out forwards;
}

@keyframes drawCheck {
    to {
        stroke-dashoffset: 0;
    }
}

.success-checkmark p {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 1.5rem;
    animation: fadeIn 0.3s 0.8s ease-out forwards;
    opacity: 0;
}

/* Loading Overlay */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(45, 27, 78, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.loading-spinner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.spinner-ring {
    width: 70px;
    height: 70px;
    border: 4px solid rgba(255, 255, 255, 0.15);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-right-color: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    box-shadow: 
        0 0 20px rgba(255, 255, 255, 0.2),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
}

.loading-spinner p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Hidden Footer for Clean Look */
footer {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        max-width: 85%;
        padding: 2.5rem 2rem;
    }

    .user-avatar svg {
        width: 70px;
        height: 70px;
    }

    #toast-container {
        right: 10px;
        top: 10px;
    }

    .toast {
        min-width: 280px;
    }
}

@media (max-width: 480px) {
    .login-section {
        padding: 1rem;
    }

    .login-container {
        padding: 2rem 1.8rem;
        max-width: 92%;
        border-radius: 25px;
    }

    .user-avatar {
        margin-bottom: 2rem;
    }

    .user-avatar svg {
        width: 60px;
        height: 60px;
    }

    input[type="text"],
    input[type="password"] {
        padding: 0.9rem 3rem 0.9rem 2.8rem;
        font-size: 0.9rem;
        border-radius: 40px;
        background: rgba(255, 255, 255, 1) !important;
        -webkit-appearance: none;
        appearance: none;
    }

    /* Mobile: Force visibility when has value */
    input[type="text"]:not(:placeholder-shown),
    input[type="password"]:not(:placeholder-shown) {
        background: rgba(255, 255, 255, 1) !important;
        border-color: rgba(94, 71, 161, 0.7) !important;
        color: rgba(30, 30, 50, 1) !important;
        font-weight: 600 !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        box-shadow: 
            0 6px 20px rgba(94, 71, 161, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 1),
            0 0 0 2px rgba(94, 71, 161, 0.25) !important;
    }

    .input-icon {
        width: 18px;
        height: 18px;
        left: 0.8rem;
    }

    input[type="text"]:not(:placeholder-shown) ~ .input-icon,
    input[type="password"]:not(:placeholder-shown) ~ .input-icon {
        color: rgba(94, 71, 161, 1) !important;
        opacity: 1 !important;
    }
    
    .toggle-password {
        width: 32px;
        height: 32px;
        right: 0.8rem;
    }
    
    .toggle-password svg {
        width: 16px;
        height: 16px;
    }

    button {
        padding: 0.9rem;
        font-size: 0.9rem;
    }

    .form-group {
        margin-bottom: 1.6rem;
    }

    .form-options {
        margin-bottom: 1.6rem;
    }

    .forgot-password {
        font-size: 0.8rem;
    }

    .form-check-label {
        font-size: 0.8rem;
    }

    .alert,
    .error {
        font-size: 0.8rem;
        padding: 0.8rem;
    }

    #toast-container {
        width: calc(100% - 20px);
        left: 10px;
        right: 10px;
    }

    .toast {
        min-width: auto;
        width: 100%;
    }

    /* Home Button Mobile */
    .home-button {
        top: 1rem;
        right: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .home-button svg {
        width: 18px;
        height: 18px;
    }

    .home-button span {
        display: none;
    }
}

/* Accessibility - Focus Styles */
input:focus-visible,
button:focus-visible,
.toggle-password:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

