/* ==========================================================================
   Modern UI Redesign for Login Page (POS Retail System)
   Theme: Premium Glassmorphism, Deep Hues, Mesh Gradient, Smooth Micro-animations
   ========================================================================== */

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

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --dark-bg: #0b0f19;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --radius-lg: 16px;
    --radius-xl: 24px;
    --font-cairo: 'Cairo', 'Outfit', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-cairo);
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background-color: var(--slate-100);
    color: var(--text-main);
    overflow-x: hidden;
}

.login-wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ==========================================================================
   Left Panel - Premium Mesh Background & Glassmorphic Slider
   ========================================================================== */
.login-brand-panel {
    flex: 1.2;
    background: radial-gradient(circle at 0% 0%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 100% 100%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
                linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #2e1065 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 50px;
    position: relative;
    overflow: hidden;
    color: white;
}

/* Glowing background blobs */
.login-brand-panel::before,
.login-brand-panel::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 1;
    pointer-events: none;
}

.login-brand-panel::before {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    top: 10%;
    right: 15%;
    opacity: 0.3;
    animation: floatBlob 10s infinite alternate ease-in-out;
}

.login-brand-panel::after {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, var(--secondary-color) 0%, transparent 70%);
    bottom: 15%;
    left: 10%;
    opacity: 0.25;
    animation: floatBlob 8s infinite alternate-reverse ease-in-out 2s;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(25px, -35px) scale(1.15); }
}

.brand-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 440px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Floating Logo */
.brand-icon-circle {
    width: 96px;
    height: 96px;
    background: var(--glass-bg);
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 1px 2px rgba(255, 255, 255, 0.2);
    animation: floatLogo 4s ease-in-out infinite;
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.brand-icon-circle i {
    font-size: 38px;
    color: white;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.brand-icon-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    background: white;
    border-radius: var(--radius-xl);
}

.brand-title {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.brand-subtitle {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 8px 20px;
    border-radius: 99px;
    display: inline-block;
    margin-bottom: 40px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Glassmorphic Feature Slider */
.feature-slider {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    padding: 30px 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.feature-slides-track {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%;
}

.feature-slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.5s, transform 0.5s;
}

.feature-slide.active {
    opacity: 1;
    transform: scale(1);
}

.feature-slide-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.02) 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.feature-slide-icon i {
    font-size: 26px;
    color: white;
}

.feature-slide-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.feature-slide-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    max-width: 330px;
}

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    padding: 0;
}

.slider-dot.active {
    background: white;
    width: 24px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Floating Shapes background */
.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.02);
    animation: drift 25s infinite linear;
    z-index: 2;
    pointer-events: none;
}

.shape-1 { width: 100px; height: 100px; top: 12%; left: 8%; animation-duration: 20s; }
.shape-2 { width: 60px; height: 60px; top: 65%; right: 12%; animation-duration: 24s; }
.shape-3 { width: 140px; height: 140px; bottom: 8%; left: 25%; animation-duration: 28s; }
.shape-4 { width: 40px; height: 40px; top: 40%; right: 20%; animation-duration: 16s; }

@keyframes drift {
    0% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(20px, -40px) rotate(180deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}


/* ==========================================================================
   Right Panel - Modern Form Panel
   ========================================================================== */
.login-form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #ffffff;
    position: relative;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.02);
}

.login-form-container {
    width: 100%;
    max-width: 380px;
    display: flex;
    flex-direction: column;
}

.form-header {
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--slate-900);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.form-header p {
    font-size: 14px;
    color: var(--text-muted);
}

/* Input Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-800);
    margin-bottom: 6px;
}

.input-icon-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 13px 44px;
    background: var(--slate-100);
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 14px;
    color: var(--slate-900);
    transition: var(--transition);
    outline: none;
    font-weight: 500;
}

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

.form-control:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.08);
}

.input-icon-wrapper .field-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 16px;
    transition: var(--transition);
    pointer-events: none;
}

.input-icon-wrapper input:focus ~ .field-icon {
    color: var(--primary-color);
}

.toggle-password {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
    z-index: 3;
}

.toggle-password:hover {
    color: var(--primary-color);
}

/* Mobile Toggle Custom Design */
.mobile-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--slate-100);
    border: 1px solid var(--slate-200);
    cursor: pointer;
    transition: var(--transition);
}

.mobile-toggle-wrapper:hover {
    background: #f8fafc;
    border-color: var(--slate-300);
}

.mobile-toggle-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.mobile-toggle-wrapper i {
    font-size: 18px;
    color: var(--primary-color);
}

.mobile-toggle-text {
    display: flex;
    flex-direction: column;
}

.mobile-toggle-text .title {
    font-size: 13px;
    font-weight: 700;
    color: var(--slate-900);
}

.mobile-toggle-text .subtitle {
    font-size: 11px;
    color: var(--text-muted);
}

/* Premium Login Button */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
    opacity: 0.95;
}

.btn-login:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.btn-login i {
    font-size: 14px;
    transition: transform 0.3s;
}

.btn-login:hover i {
    transform: translateX(-4px);
}

/* Alert Styling */
.alert-error {
    background: #fef2f2;
    color: #ef4444;
    border: 1px solid #fee2e2;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    animation: shake 0.4s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.login-footer {
    margin-top: 30px;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
}

/* Mobile logo (shown only on mobile screens) */
.mobile-logo {
    display: none;
    text-align: center;
    margin-bottom: 30px;
}

.mobile-logo-circle {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.2);
    overflow: hidden;
}

.mobile-logo-circle i {
    font-size: 32px;
    color: white;
}

.mobile-logo-circle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    background: white;
    border-radius: 20px;
}

.mobile-company-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--slate-900);
}


/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 900px) {
    .login-wrapper {
        flex-direction: column;
    }

    .login-brand-panel {
        display: none;
    }

    .mobile-logo {
        display: block;
    }

    .login-form-panel {
        flex: 1;
        padding: 30px 24px;
        background: var(--slate-100);
    }

    .login-form-container {
        max-width: 400px;
        background: white;
        padding: 32px 24px;
        border-radius: var(--radius-xl);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
        border: 1px solid var(--slate-200);
    }
}

@media (max-width: 480px) {
    .login-form-panel {
        padding: 15px;
    }

    .login-form-container {
        padding: 24px 16px;
    }

    .form-header h2 {
        font-size: 24px;
    }

    .form-control {
        font-size: 16px; /* Prevents auto zoom on iOS */
    }
}
