html {
    font-size: 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
}

/* =================================================================
   GLOBAL HEADING DARK MODE FIX - HIGH PRIORITY
   ================================================================= */
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #f8fafc !important;
}

body.dark-mode .page-title,
body.dark-mode .card-title,
body.dark-mode .modal-title,
body.dark-mode .section-title {
    color: #f8fafc !important;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

/* === LOGIN PAGE SPECIFIC STYLES === */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --white: #ffffff;
    --gray-200: #e2e8f0;
    --gray-600: #4b5563;
    --gray-700: #555555;
    --gray-900: #333333;
    --border-radius-md: 8px;
    --border-radius-lg: 15px;
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
    --transition-normal: 0.3s ease;
    
    /* Auth specific colors - Light theme */
    --auth-card-bg: #ffffff;
    --auth-text-primary: #17293b;
    --auth-text-secondary: #4b5563;
    --auth-text-tertiary: #6b7280;
    --auth-border-color: #e2e8f0;
    --auth-input-bg: #ffffff;
    --auth-alert-success-bg: #d4edda;
    --auth-alert-success-border: #c3e6cb;
    --auth-alert-success-text: #155724;
    --auth-alert-danger-bg: #f8d7da;
    --auth-alert-danger-border: #f5c6cb;
    --auth-alert-danger-text: #721c24;
    --auth-alert-warning-bg: #fff3cd;
    --auth-alert-warning-border: #ffeaa7;
    --auth-alert-warning-text: #856404;
    --auth-tab-border: #e1e5e9;
    --auth-link-color: #2563eb;
    --auth-link-hover: #3b82f6;
}

body.dark-mode {
    /* Auth specific colors - Dark theme */
    --auth-card-bg: #1e293b;
    --auth-text-primary: #f8fafc;
    --auth-text-secondary: #cbd5e1;
    --auth-text-tertiary: #94a3b8;
    --auth-border-color: #334155;
    --auth-input-bg: #334155;
    --auth-alert-success-bg: #065f46;
    --auth-alert-success-border: #047857;
    --auth-alert-success-text: #d1fae5;
    --auth-alert-danger-bg: #991b1b;
    --auth-alert-danger-border: #dc2626;
    --auth-alert-danger-text: #fecaca;
    --auth-alert-warning-bg: #92400e;
    --auth-alert-warning-border: #d97706;
    --auth-alert-warning-text: #fef3c7;
    --auth-tab-border: #475569;
    --auth-link-color: #60a5fa;
    --auth-link-hover: #93c5fd;
}

/* Gradient Background */
body.gradient-bg {
    background: var(--primary-gradient) !important;
    background-attachment: fixed !important;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Pattern Overlay */
body.pattern-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

/* Layout Utilities */
.min-h-screen {
    min-height: 100vh;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

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

.text-center {
    text-align: center;
}

.w-full {
    width: 100%;
}

.max-w-md {
    max-width: 28rem;
}

.p-4 {
    padding: 1rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.gap-3 {
    gap: 0.75rem;
}

/* Typography */
.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.text-5xl {
    font-size: 3rem;
    line-height: 1;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.font-bold {
    font-weight: 700;
}

.font-medium {
    font-weight: 500;
}

.text-white {
    color: rgb(255 255 255);
}

.text-gray-600 {
    color: var(--auth-text-tertiary);
}

.text-gray-700 {
    color: var(--auth-text-secondary);
}

.text-gray-900 {
    color: var(--auth-text-primary);
}

.text-white\/90 {
    color: rgb(255 255 255 / 0.9);
}

.text-white\/70 {
    color: rgb(255 255 255 / 0.7);
}

/* Card */
.card {
    background: var(--auth-card-bg);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    position: relative;
    z-index: 10;
    max-width: 100%;
    box-sizing: border-box;
}

/* Forms */
.form-input {
    width: 100%;
    max-width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--auth-border-color);
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    transition: all var(--transition-normal);
    background: var(--auth-input-bg);
    color: var(--auth-text-primary);
    box-sizing: border-box;
}

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

/* Buttons */
.btn-primary {
    width: 100%;
    background: var(--primary-gradient);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius-md);
    font-size: 1rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--border-radius-md);
    margin-bottom: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.alert-success {
    background: var(--auth-alert-success-bg);
    border: 1px solid var(--auth-alert-success-border);
    color: var(--auth-alert-success-text);
}

.alert-danger {
    background: var(--auth-alert-danger-bg);
    border: 1px solid var(--auth-alert-danger-border);
    color: var(--auth-alert-danger-text);
}

.alert-warning {
    background: var(--auth-alert-warning-bg);
    border: 1px solid var(--auth-alert-warning-border);
    color: var(--auth-alert-warning-text);
}

/* Tabs */
.tabs-container {
    display: flex;
    border-bottom: 2px solid var(--auth-tab-border);
    margin-bottom: 1.5rem;
}

.tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--gray-600);
    cursor: pointer;
    transition: all var(--transition-normal);
    border-bottom: 3px solid transparent;
}

.tab:hover {
    color: var(--primary-color);
}

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

/* Auth Forms */
.auth-form {
    transition: all var(--transition-normal);
}

.auth-form.hidden {
    display: none;
}

/* Spacing */
.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

/* Field Validation */
.field-validation-error {
    color: var(--auth-alert-danger-text);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Links */
.text-blue-600 {
    color: var(--auth-link-color);
}

.hover\:text-blue-500:hover {
    color: var(--auth-link-hover);
}

.underline {
    text-decoration-line: underline;
}

.transition-all {
    transition-property: all;
}

.duration-200 {
    transition-duration: 200ms;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-slide-up {
    animation: slideUp 0.6s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .card {
        padding: 1.5rem;
        margin: 0 1rem;
    }
    
    .text-4xl {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
    
    .text-5xl {
        font-size: 2.25rem;
        line-height: 2.5rem;
    }
    
    .form-input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
} 