/* SmartPOS V1 - Login Page Styles */

/* Import Variables if available */
@import url('smart-variables.css');

/* Note: If smart-variables.css is not available, CSS variables are defined below as fallback */

/* CSS Variables (fallback if smart-variables.css not available) */
:root {
    --color-primary: #667eea;
    --color-primary-dark: #5568d3;
    --color-primary-light: #764ba2;
    --color-success: #10b981;
    --color-error: #ef4444;
    --color-warning: #f59e0b;
    --color-text: #1f2937;
    --color-text-muted: #6b7280;
    --color-bg: #ffffff;
    --color-bg-light: #f9fafb;
    --color-border: #e5e7eb;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
}

/* Reset and Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg-light);
    overflow-x: hidden;
}

/* Login Container */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
}

/* Background Image */
.login-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.login-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    opacity: 0.85;
}

/* Login Card */
.login-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

/* Header */
.login-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    padding: 40px 30px 30px;
    text-align: center;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.logo-img {
    max-width: 120px;
    max-height: 120px;
    object-fit: contain;
}

.logo-text h1 {
    color: white;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
}

.logo-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 400;
}

/* Body */
.login-body {
    padding: 40px 30px;
}

.login-body h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
    text-align: center;
}

.login-subtitle {
    color: var(--color-text-muted);
    font-size: 14px;
    text-align: center;
    margin-bottom: 30px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 8px;
}

.form-group label i {
    margin-right: 8px;
    color: var(--color-primary);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-bg);
    color: var(--color-text);
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: var(--color-text-muted);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    right: 12px;
    top: 38px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 5px;
    font-size: 16px;
    transition: color var(--transition-fast);
    outline: none;
}

.password-toggle:hover {
    color: var(--color-primary);
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.checkbox-label span {
    color: var(--color-text-muted);
}

.forgot-password-link {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.forgot-password-link:hover {
    color: var(--color-primary-dark);
    text-decoration: underline;
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    outline: none;
    position: relative;
    overflow: hidden;
}

.btn-login:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-login:active:not(:disabled) {
    transform: translateY(0);
}

.btn-login:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-loader i {
    font-size: 16px;
}

/* Messages */
.error-message,
.success-message {
    padding: 12px 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message {
    background: #fee2e2;
    color: var(--color-error);
    border-left: 4px solid var(--color-error);
}

.error-message::before {
    content: '\f06a';
    font-family: 'FontAwesome';
    font-weight: 900;
}

.success-message {
    background: #d1fae5;
    color: var(--color-success);
    border-left: 4px solid var(--color-success);
}

.success-message::before {
    content: '\f00c';
    font-family: 'FontAwesome';
    font-weight: 900;
}

/* Footer */
.login-footer {
    padding: 20px 30px;
    text-align: center;
    background: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
}

.login-footer p {
    font-size: 12px;
    color: var(--color-text-muted);
}

/* Responsive Design */
@media (max-width: 480px) {
    .login-container {
        padding: 10px;
    }
    
    .login-card {
        max-width: 100%;
    }
    
    .login-header {
        padding: 30px 20px 20px;
    }
    
    .login-body {
        padding: 30px 20px;
    }
    
    .logo-text h1 {
        font-size: 28px;
    }
    
    .login-body h2 {
        font-size: 20px;
    }
}

/* Loading State */
.login-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Animation for card entrance */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    animation: fadeInUp 0.5s ease;
}

