/* Professional Business Theme CSS Variables - Default to Dark Mode */
:root {
    /* Dark theme as default */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #333333;
    --text-primary: #ffffff;
    --text-secondary: #e9ecef;
    --text-muted: #adb5bd;
    --border-color: #495057;
    --accent-primary: #4da3e0;
    --accent-secondary: #6c757d;
    --shadow: rgba(0,0,0,0.3);
    --shadow-light: rgba(0,0,0,0.15);
    --error-bg: rgba(248, 215, 218, 0.1);
    --error-border: rgba(245, 198, 203, 0.3);
    --error-text: #f5c6cb;
    --success-bg: rgba(212, 237, 218, 0.1);
    --success-border: rgba(195, 230, 203, 0.3);
    --success-text: #c3e6cb;
}

[data-theme="light"] {
    /* Light theme */
    --bg-primary: #f8f9fa;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #495057;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --accent-primary: #0066cc;
    --accent-secondary: #6c757d;
    --shadow: rgba(0,0,0,0.1);
    --shadow-light: rgba(0,0,0,0.04);
    --error-bg: #f8d7da;
    --error-border: #f5c6cb;
    --error-text: #721c24;
    --success-bg: #d4edda;
    --success-border: #c3e6cb;
    --success-text: #155724;
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

code {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* App Container */
.App {
    text-align: center;
}

/* Login Container */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-primary);
}

/* Login Card */
.login-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.3s ease;
}

.login-card:hover {
    box-shadow: 0 8px 30px var(--shadow);
}

/* Typography */
.login-card h1 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    text-align: center;
}

.login-card h2 {
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--text-muted);
    margin: 0 0 2rem 0;
    text-align: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(77, 163, 224, 0.25);
}

.form-group input:disabled {
    background: var(--bg-tertiary);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

/* Button Styles */
button[type="submit"] {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--accent-primary);
    color: white;
    border: 2px solid var(--accent-primary);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

button[type="submit"]:hover:not(:disabled) {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-1px);
}

button[type="submit"]:active:not(:disabled) {
    transform: translateY(0);
}

button[type="submit"]:disabled {
    background: var(--text-muted);
    border-color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
    transform: none;
}

/* Login Links */
.login-links {
    text-align: center;
    margin-top: 1.5rem;
}

.login-links a {
    display: block;
    color: var(--accent-primary);
    text-decoration: none;
    margin: 0.75rem 0;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.login-links a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Message Styles */
.error-message {
    background: var(--error-bg);
    border: 1px solid var(--error-border);
    color: var(--error-text);
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: left;
}

.success-message {
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    color: var(--success-text);
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    text-align: left;
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 1000;
}

.theme-toggle:hover {
    background: var(--accent-primary);
    color: white;
    transform: scale(1.1);
}

/* Loading States */
.form-group input:disabled,
button[type="submit"]:disabled {
    position: relative;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem;
        margin: 0;
    }
    
    .login-card h1 {
        font-size: 1.75rem;
    }
    
    .theme-toggle {
        top: 0.5rem;
        right: 0.5rem;
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 0.5rem;
    }
    
    .login-card {
        padding: 1.5rem;
    }
    
    .login-card h1 {
        font-size: 1.5rem;
    }
    
    .form-group input,
    button[type="submit"] {
        padding: 0.6rem;
    }
}

/* Focus Styles for Accessibility */
button:focus-visible,
input:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .theme-toggle {
        display: none;
    }
    
    .login-container {
        background: white;
    }
    
    .login-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .form-group input {
        border-width: 2px;
    }
    
    button[type="submit"] {
        border-width: 3px;
    }
    
    .login-links a {
        text-decoration: underline;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Legacy App.css styles for compatibility */
.App-logo {
    height: 40vmin;
    pointer-events: none;
}

.App-header {
    background-color: var(--bg-secondary);
    padding: 20px;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: calc(10px + 2vmin);
}

.App-link {
    color: var(--accent-primary);
}

@keyframes App-logo-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .App-logo {
        animation: App-logo-spin infinite 20s linear;
    }
}
