:root {
    --font-ui: 'Inter', system-ui, -apple-system, sans-serif;
    --font-mono: 'Space Grotesk', monospace;
    
    --primary-400: #6366f1;
    --primary-700: #4338ca;
    --text-high: #111827;
    --text-muted: #6b7280;
    --surface-50: #f9fafb;
    --surface-0: #ffffff;
    --radius-lg: 12px;
    --shadow-soft: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --success-400: #22c55e;
    --success-50: #f0fdf4;
    --error-400: #ef4444;
    --error-50: #fef2f2;
    --warning-400: #f59e0b;
    --warning-50: #fffbeb;
}

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

body {
    font-family: var(--font-ui);
    background: var(--surface-50);
    color: var(--text-high);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin: 2rem 1rem;
}

.logo-section {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    font-family: var(--font-mono);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-700);
    margin-bottom: 0.5rem;
}

.tagline {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.card {
    background: var(--surface-0);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-family: var(--font-mono);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--text-high);
}

.card-subtitle {
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--text-high);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: var(--font-ui);
    background: var(--surface-0);
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-400);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input.error {
    border-color: var(--error-400);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.password-input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s ease;
}

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

.form-error {
    font-size: 0.75rem;
    color: var(--error-400);
    margin-top: 0.25rem;
    display: none;
}

.form-helper {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.remember-forgot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox {
    width: 16px;
    height: 16px;
}

.checkbox-label {
    color: var(--text-high);
    cursor: pointer;
}

.forgot-password {
    color: var(--primary-400);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

.btn {
    width: 100%;
    padding: 0.875rem;
    border: none;
    border-radius: 8px;
    font-family: var(--font-ui);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn-primary {
    background: var(--primary-400);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-700);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: var(--surface-0);
    color: var(--text-high);
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background: #f9fafb;
    transform: translateY(-1px);
}

.loading-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.error-message {
    background: var(--error-50);
    border: 1px solid var(--error-400);
    color: var(--error-400);
    padding: 0.875rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    text-align: center;
    display: none;
}

.success-message {
    background: var(--success-50);
    border: 1px solid var(--success-400);
    color: var(--success-400);
    padding: 0.875rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    text-align: center;
    display: none;
}

.divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.divider span {
    padding: 0 1rem;
    background: var(--surface-0);
}

.alternative-login {
    text-align: center;
    margin-top: 1rem;
}

.whatsapp-login {
    color: var(--primary-400);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.whatsapp-login:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

.signup-link {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.signup-link a {
    color: var(--primary-400);
    text-decoration: none;
    font-weight: 500;
}

.signup-link a:hover {
    text-decoration: underline;
}

.demo-info {
    background: var(--warning-50);
    border: 1px solid var(--warning-400);
    color: #92400e;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    text-align: center;
}

@media (max-width: 480px) {
    .login-container {
        margin: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .remember-forgot {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .checkbox-group {
        justify-content: center;
    }
}