/* Tailwind-inspired CSS Variables and Base Styles */
:root {
    --primary: #2b4077;
    --primary-dark: #1f2f58;
    --primary-hover: #36549a;
    --secondary: #64748b;
    --accent: #e99d90;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --surface-alt: #f5f5f5;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
    --focus-ring: rgba(43, 64, 119, 0.15);
    --dev-banner-height: 36px;
}

/* Dark mode */
[data-theme="dark"] {
    --primary: #6b8fd4;
    --primary-dark: #4a6bb3;
    --primary-hover: #8ba8e0;
    --secondary: #8899aa;
    --accent: #e99d90;
    --success: #34d399;
    --error: #f87171;
    --warning: #fbbf24;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-alt: #283548;
    --text: #f1f5f9;
    --text-light: #94a3b8;
    --border: #334155;
    --focus-ring: rgba(107, 143, 212, 0.2);
}

/* Development Environment Banner */
#dev-environment-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--dev-banner-height);
    background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
    color: #000;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    line-height: var(--dev-banner-height);
    z-index: 9999;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.025em;
}

/* Offset body content when banner is present */
body.has-dev-banner {
    padding-top: var(--dev-banner-height);
}

/* Offset fixed elements when banner is present */
body.has-dev-banner .success-message {
    top: calc(2rem + var(--dev-banner-height));
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

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

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

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
}

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

/* Error Messages */
.error-message {
    color: var(--error);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Progress Indicator */
.progress-bar {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.progress-step {
    flex: 1;
    text-align: center;
    padding: 1rem;
    border-bottom: 3px solid var(--border);
}

.progress-step.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.progress-step.completed {
    border-bottom-color: var(--success);
}

/* Card */
.card {
    background: var(--surface);
    border-radius: 0.5rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 1rem;
    }
}

/* Checkbox Labels */
.checkbox-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    padding: 0.25rem 0;
    margin-bottom: 0 !important;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.checkbox-label span {
    font-size: 0.875rem;
    font-weight: normal;
}

/* Radio Button Labels */
.radio-label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    padding: 0.25rem 0;
    margin-bottom: 0 !important;
}

.radio-label input[type="radio"] {
    width: auto;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.radio-label span {
    font-size: 0.875rem;
    font-weight: normal;
}

/* ===== Dark mode input backgrounds ===== */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background-color: var(--surface-alt);
    color: var(--text);
}

/* ===== Login Page Wrapper ===== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f1b3d 0%, #1a2a54 50%, #1f2f58 100%);
    padding: 2rem 1rem;
}

[data-theme="dark"] .login-wrapper {
    background: linear-gradient(135deg, #060d1f 0%, #0a1128 50%, #0f1b3d 100%);
}

.login-wrapper .card {
    width: 100%;
    max-width: 400px;
}

.login-logo {
    max-width: 280px;
    width: 100%;
    height: auto;
}

/* ===== Theme Toggle Button ===== */
.theme-toggle-nav {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0.6rem 0.75rem;
    line-height: 1;
}

.theme-toggle-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Floating theme toggle for login/register pages */
.theme-toggle-floating {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--surface);
    color: var(--text);
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 1000;
}

.theme-toggle-floating:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===== Smooth transitions for theme change ===== */
body,
.card,
.admin-header,
.admin-main,
input, select, textarea {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
