/* Customer Login Styles */
:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-secondary: #f1f5f9;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
}

.login-container {
    background: var(--surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 1000px;
    width: 100%;
    min-height: 600px;
    display: flex;
    position: relative;
}

/* Logo Section */
.logo-section {
    flex: 1;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.logo-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(-50%, -50%) rotate(0deg); }
    50% { transform: translate(-50%, -50%) rotate(180deg); }
}

.logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    z-index: 2;
}

.logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
}

.brand-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.brand-tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 400;
    position: relative;
    z-index: 2;
}

/* Form Section */
.form-section {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    min-width: 400px;
}

/* Tab Navigation */
.tab-container {
    position: relative;
    margin-bottom: 32px;
}

.tab-buttons {
    display: flex;
    background: var(--surface-secondary);
    border-radius: var(--border-radius);
    padding: 4px;
    position: relative;
}

.tab-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 24px;
    border-radius: calc(var(--border-radius) - 4px);
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-indicator {
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 4px);
    height: calc(100% - 8px);
    background: var(--surface);
    border-radius: calc(var(--border-radius) - 4px);
    box-shadow: var(--shadow);
    transition: var(--transition);
    z-index: 1;
}

/* Form Containers */
.form-container {
    display: none;
    flex-direction: column;
    flex: 1;
}

.form-container.active {
    display: flex;
}

.form-header {
    text-align: center;
    margin-bottom: 32px;
}

.form-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Alert Messages */
.alert {
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(34, 197, 94, 0.2);
}

/* Input Groups */
.input-group {
    margin-bottom: 24px;
}

.input-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 1.1rem;
    z-index: 2;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    font-size: 1rem;
    background: var(--surface);
    color: var(--text-primary);
    transition: var(--transition);
    outline: none;
}

.input-wrapper input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-wrapper input.error {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.toggle-password {
    position: absolute;
    right: 16px;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    z-index: 2;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--primary-color);
}

.field-error {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 4px;
    font-weight: 500;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 18px;
    width: 18px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 4px;
    margin-right: 8px;
    position: relative;
    transition: var(--transition);
}

.checkbox-container input:checked ~ .checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.forgot-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.form-footer p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.form-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Back to Kiosk Link */
.back-to-kiosk {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.back-link:hover {
    color: var(--primary-color);
    background: var(--surface);
    transform: translateX(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
        max-width: 100%;
        margin: 0;
        min-height: 100vh;
        border-radius: 0;
    }

    .logo-section {
        flex: none;
        padding: 32px 20px;
        min-height: 200px;
    }

    .logo {
        width: 80px;
        height: 80px;
    }

    .logo img {
        width: 60px;
        height: 60px;
    }

    .brand-name {
        font-size: 2rem;
    }

    .brand-tagline {
        font-size: 1rem;
    }

    .form-section {
        flex: 1;
        padding: 32px 20px;
        min-width: auto;
    }

    .tab-buttons {
        margin: 0 -4px;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .input-wrapper input {
        padding: 14px 14px 14px 44px;
        font-size: 0.95rem;
    }

    .input-icon {
        left: 14px;
        font-size: 1rem;
    }

    .toggle-password {
        right: 14px;
        font-size: 1rem;
    }

    .btn-primary {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .back-to-kiosk {
        top: 16px;
        left: 16px;
    }

    .back-link {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 0;
    }

    .login-container {
        border-radius: 0;
    }

    .logo-section {
        padding: 24px 16px;
    }

    .brand-name {
        font-size: 1.75rem;
    }

    .form-section {
        padding: 24px 16px;
    }

    .form-header {
        margin-bottom: 24px;
    }

    .form-header h2 {
        font-size: 1.25rem;
    }

    .input-group {
        margin-bottom: 20px;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .checkbox-container {
        font-size: 0.85rem;
    }

    .forgot-link {
        font-size: 0.85rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.5s ease forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Focus States for Accessibility */
.tab-btn:focus,
.input-wrapper input:focus,
.btn-primary:focus,
.checkbox-container:focus,
.forgot-link:focus,
.back-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading State */
.btn-primary.loading {
    pointer-events: none;
    position: relative;
}

.btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print Styles */
@media print {
    .login-container {
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .tab-buttons,
    .form-options,
    .back-to-kiosk {
        display: none;
    }
}
