/* NutriMove Modern Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Dark Theme Color Palette */
    --primary-color: #4a90e2;
    --primary-dark: #2c5aa0;
    --primary-light: #6bb6ff;
    --secondary-color: #7c3aed;
    --accent-color: #22d3ee;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --success-color: #10b981;
    --info-color: #3b82f6;
    
    /* Dark Theme Neutral Colors - Dark Blue Background */
    --white: #f8fafc;
    --gray-50: #0f172a;  /* Dark blue background for body */
    --gray-100: #1e293b;
    --gray-200: #334155;
    --gray-300: #475569;
    --gray-400: #64748b;
    --gray-500: #94a3b8;
    --gray-600: #cbd5e1;
    --gray-700: #e2e8f0;
    --gray-800: #f1f5f9;
    --gray-900: #ffffff;
    
    /* Dark Theme Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
}

/* Light Theme Variables */
[data-theme="light"] {
    /* Light Theme Color Palette */
    --primary-color: #0066ff;
    --primary-dark: #0052cc;
    --primary-light: #3385ff;
    --secondary-color: #6c5ce7;
    --accent-color: #00d4aa;
    --warning-color: #ff9f43;
    --danger-color: #ff6b6b;
    --success-color: #2ed8b6;
    --info-color: #74b9ff;
    
    /* Light Theme Neutral Colors - Corrected for proper contrast */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Light Theme Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Border Radius Variables */
:root {
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.25rem;
    --radius-2xl: 1.5rem;
    --radius-3xl: 2rem;
}
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
}

/* Prevent flash of unstyled content and color flashing */
html {
    background-color: #0f172a !important; /* Dark blue background */
    transition: background-color 0.1s ease-out; /* Smooth but fast transition */
}

html[data-theme="light"] {
    background-color: #f8fafc !important; /* Light background */
}

/* Ensure document element covers full height immediately */
html, body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Global Typography */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50) !important;
    padding-top: 0;
    letter-spacing: -0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

/* Force dark blue background in dark mode */
[data-theme="dark"] body {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

[data-theme="dark"] .container,
[data-theme="dark"] .container-fluid,
[data-theme="dark"] main {
    background-color: transparent !important;
}

/* Make footer same color as background in dark mode */
[data-theme="dark"] footer.bg-dark {
    background-color: #0f172a !important;
    border-top: 1px solid #1e293b !important;
}

/* Make navbar same color as background in dark mode */
[data-theme="dark"] .navbar {
    background-color: #0f172a !important;
    border-bottom: 1px solid #1e293b !important;
}

/* Ultimate fix for dark background - highest specificity */
html[data-theme="dark"] body,
html[data-theme="dark"] body.index-page,
html[data-theme="dark"] body:not(.index-page) {
    background-color: #0f172a !important;
    color: #ffffff !important;
}

/* Add padding to non-index pages that need space for fixed navbar */
body:not(.index-page) {
    padding-top: 80px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 600; }
h5 { font-size: 1.125rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 500; }

.display-1, .display-2, .display-3, .display-4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    letter-spacing: -0.03em;
}

p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-700);
}

/* Modern Link Styles */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

/* Modern Component Styles */

/* Navbar */
.navbar {
    background: var(--gray-100) !important;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
}

/* Light theme navbar should be white */
[data-theme="light"] .navbar {
    background: var(--white) !important;
    border-bottom: 1px solid var(--gray-200);
}

.navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--gray-900) !important;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--gray-700) !important;
    transition: all 0.2s ease;
    margin: 0 0.25rem;
    border-radius: var(--radius-md);
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(74, 144, 226, 0.15);
}

.navbar-brand-logo {
    height: 45px;
    width: auto;
    margin-right: var(--space-sm);
}

/* Modern Cards */
.card {
    border: none;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    background: var(--gray-100);
    overflow: hidden;
    margin-bottom: var(--space-md);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    color: var(--gray-900);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.card-body {
    padding: var(--space-md);
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

/* Compact card styling for dashboard sections */
.card.compact {
    margin-bottom: var(--space-sm);
}

.card.compact .card-body {
    padding: var(--space-sm);
}

.card.compact .card-header {
    padding: var(--space-xs) var(--space-sm);
}

/* Light theme cards should be white */
[data-theme="light"] .card {
    background: var(--white);
}

[data-theme="light"] .card-header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

/* Modern Buttons */
.btn {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border-radius: var(--radius-lg);
    border: none;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover:before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: var(--white);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #26d0ce);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #fd79a8);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #e84393);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary-color) !important;
    color: var(--white) !important;
    border-color: var(--primary-color) !important;
}

/* Light button styles - force dark text on light background */
.btn-light {
    background: var(--white) !important;
    color: var(--gray-800) !important;
    border: 2px solid var(--gray-200) !important;
}

.btn-light:hover {
    background: var(--gray-100) !important;
    color: var(--gray-800) !important;
    border-color: var(--gray-300) !important;
}

/* Override Bootstrap's default light button text color */
.btn-light,
.btn-light:hover,
.btn-light:focus,
.btn-light:active {
    color: var(--gray-800) !important;
}

/* Secondary button styles */
.btn-secondary {
    background: var(--gray-600) !important;
    color: var(--white) !important;
    border: 2px solid var(--gray-600) !important;
}

.btn-secondary:hover {
    background: var(--gray-700) !important;
    color: var(--white) !important;
    border-color: var(--gray-700) !important;
}

/* Light theme specific button overrides */
[data-theme="light"] .btn-light {
    background: var(--gray-100) !important;
    color: var(--gray-800) !important;
    border-color: var(--gray-200) !important;
}

[data-theme="light"] .btn-light:hover {
    background: var(--gray-200) !important;
    color: var(--gray-800) !important;
    border-color: var(--gray-300) !important;
}

/* Modern Forms */
.form-control, .form-select {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    font-size: 1rem;
    color: var(--gray-800) !important;
    background-color: var(--gray-100) !important;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
    outline: none;
    color: var(--gray-800);
}

.form-control::placeholder {
    color: var(--gray-500);
    opacity: 1;
}

.form-label {
    color: var(--gray-800);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Light theme form controls should be white */
[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background-color: var(--white) !important;
    border-color: var(--gray-200);
}

[data-theme="light"] .form-control:focus,
[data-theme="light"] .form-select:focus {
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* Modern Badges */
.badge {
    font-weight: 500;
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.bg-purple {
    background: var(--secondary-color) !important;
    color: var(--white);
}

/* Modern Alerts */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
    border-left-color: var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
    border-left-color: var(--danger-color);
    color: var(--danger-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    border-left-color: var(--warning-color);
    color: var(--warning-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: var(--space-2xl) 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 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%3Ccircle cx='30' cy='30' r='3'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
}

.hero-section * {
    position: relative;
    z-index: 1;
}

/* Modern Tables */
.table {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background: var(--gray-200);
    border: none;
    font-weight: 600;
    color: var(--gray-800);
    padding: 1rem;
}

.table tbody td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
    background: var(--gray-100);
    color: var(--gray-800);
}

.table tbody tr {
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background-color: var(--gray-200);
}

/* Light theme tables */
[data-theme="light"] .table thead th {
    background: var(--gray-100);
    color: var(--gray-800);
}

[data-theme="light"] .table tbody td {
    background: var(--white);
    color: var(--gray-800);
}

[data-theme="light"] .table tbody tr:hover {
    background-color: var(--gray-50);
}

/* Progress Bars */
.progress {
    height: 10px;
    border-radius: var(--radius-lg);
    background: var(--gray-200);
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-lg);
}

/* Interval Timer Enhancements */
#timer-display {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-color);
    font-weight: 700;
    font-size: 4rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#timer-phase {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.timer-settings-panel {
    background: linear-gradient(135deg, var(--gray-50), var(--white));
    border-radius: var(--radius-lg);
    border: 2px solid var(--gray-200);
    padding: var(--space-lg);
}

.interval-timer-card {
    background: linear-gradient(135deg, var(--white), var(--gray-50));
    border: none;
    box-shadow: var(--shadow-xl);
}

/* Phase-specific timer display colors */
.timer-prep #timer-display {
    color: var(--info-color);
}

.timer-work #timer-display {
    color: var(--success-color);
    font-size: 5rem;
    animation: workPulse 1s infinite;
}

.timer-rest #timer-display {
    color: var(--warning-color);
}

.timer-finished #timer-display {
    color: var(--primary-color);
    animation: celebration 2s infinite;
}

@keyframes workPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes celebration {
    0%, 100% { transform: scale(1) rotate(0deg); }
    25% { transform: scale(1.1) rotate(-5deg); }
    75% { transform: scale(1.1) rotate(5deg); }
}

/* Enhanced progress bar for interval timer */
.interval-progress {
    height: 12px;
    border-radius: var(--radius-lg);
    background: var(--gray-200);
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.interval-progress .progress-bar {
    transition: width 1s ease, background-color 0.3s ease;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-lg);
}

/* Timer controls enhancement */
.timer-controls .btn {
    min-width: 120px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.2s ease;
}

.timer-controls .btn:hover {
    transform: translateY(-2px);
}

/* Settings form styling */
.timer-settings .input-group {
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.timer-settings .input-group-text {
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    font-weight: 500;
    color: var(--gray-800);
}

.timer-settings .form-control {
    border: 2px solid var(--gray-200);
    text-align: center;
    font-weight: 600;
}

.timer-settings .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

/* Info badges styling */
.timer-info .badge {
    font-size: 1rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-lg);
    font-weight: 500;
}

/* Questionnaire Styles */
.questionnaire-hero {
    padding: 2rem 0;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    color: var(--white);
}

.questionnaire-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Questionnaire text visibility fixes */
.questionnaire-hero h1,
.questionnaire-hero .display-4 {
    color: var(--white) !important;
}

.questionnaire-hero .lead,
.questionnaire-hero p {
    color: var(--gray-200) !important;
}

.questionnaire-hero .text-primary {
    color: var(--info-color) !important;
}

/* Dark mode questionnaire step titles and help text */
[data-theme="dark"] .questionnaire-step h4,
[data-theme="dark"] .questionnaire-step .text-center h4 {
    color: var(--white) !important;
}

[data-theme="dark"] .questionnaire-step .text-muted,
[data-theme="dark"] .questionnaire-step small.text-muted {
    color: var(--gray-300) !important;
}

/* Dark mode questionnaire progress and navigation text */
[data-theme="dark"] .progress-indicator small,
[data-theme="dark"] .progress-indicator .text-muted,
[data-theme="dark"] .questionnaire-step small,
[data-theme="dark"] .questionnaire-step .small {
    color: var(--white) !important;
}

/* Force white text for all questionnaire elements in dark mode */
html[data-theme="dark"] .questionnaire-hero,
html[data-theme="dark"] .questionnaire-step,
html[data-theme="dark"] .questionnaire-card,
html[data-theme="dark"] .progress-indicator {
    color: var(--white) !important;
}

html[data-theme="dark"] .questionnaire-hero *:not(.form-control):not(.btn):not(input):not(textarea):not(select),
html[data-theme="dark"] .questionnaire-step *:not(.form-control):not(.btn):not(input):not(textarea):not(select),
html[data-theme="dark"] .questionnaire-card *:not(.form-control):not(.btn):not(input):not(textarea):not(select),
html[data-theme="dark"] .progress-indicator *:not(.form-control):not(.btn):not(input):not(textarea):not(select) {
    color: var(--white) !important;
}

/* Override for form controls to keep them readable */
html[data-theme="dark"] .questionnaire-step .form-control,
html[data-theme="dark"] .questionnaire-step .form-select,
html[data-theme="dark"] .questionnaire-step textarea,
html[data-theme="dark"] .questionnaire-step input {
    color: var(--gray-800) !important;
    background: var(--white) !important;
}

/* Dark mode login form labels */
[data-theme="dark"] .card-body .form-label,
[data-theme="dark"] .login-form .form-label,
[data-theme="dark"] .login-container .form-label,
[data-theme="dark"] .auth-form .form-label {
    color: var(--white) !important;
}

/* General dark mode form labels for all pages */
html[data-theme="dark"] .form-label,
html[data-theme="dark"] label {
    color: var(--white) !important;
}

/* Specific override for login labels */
html[data-theme="dark"] .login-label {
    color: white !important;
}

.questionnaire-hero .text-muted {
    color: var(--gray-300) !important;
}

/* Card content visibility */
.questionnaire-step .card-title {
    color: var(--white) !important;
}

.questionnaire-step .text-muted {
    color: var(--gray-300) !important;
}

.questionnaire-step .card-body .text-dark {
    color: var(--white) !important;
}

.questionnaire-step .card-body h4 {
    color: var(--white) !important;
}

.questionnaire-step .card-body p {
    color: var(--white) !important;
}

/* Fixed card body labels to prevent white overlay */
.questionnaire-step .card-body label {
    color: var(--gray-700) !important;
}

/* Remove white overlay on form labels in questionnaire */
.questionnaire-step .form-label {
    color: var(--gray-700) !important;
}

/* Form floating labels */
.form-floating .form-control {
    background: var(--white);
    color: var(--gray-600);
}

.form-floating label {
    color: var(--gray-500) !important;
}

/* Fix questionnaire floating label overlay */
.questionnaire-step .form-floating label {
    color: var(--gray-600) !important;
    background: transparent !important;
}

/* Specifically fix goal textarea white text overlay */
#goal-textarea + label,
.questionnaire-step textarea + label {
    color: var(--gray-600) !important;
    background: var(--white) !important;
    z-index: 1;
}

/* Form placeholders */
.form-control::placeholder,
.form-select::placeholder,
textarea::placeholder,
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="number"]::placeholder {
    color: var(--gray-400) !important;
}

/* Global form input text color override - ensure all text inputs are readable */
input[type="text"],
input[type="email"], 
input[type="password"],
input[type="number"],
input[type="tel"],
textarea,
.form-control,
.form-select {
    color: var(--gray-800) !important;
    background-color: var(--white) !important;
}

/* Character count and helper text */
.questionnaire-step small {
    color: var(--gray-300) !important;
}

/* Progress text */
.questionnaire-step .text-center {
    color: var(--white) !important;
}

/* Step counter text */
.questionnaire-step .small {
    color: var(--gray-300) !important;
}

/* Comprehensive questionnaire white text - removed to fix overlay */

/* Exception for form inputs (keep readable) */
.questionnaire-step .form-control,
.questionnaire-step .form-select,
.questionnaire-step textarea,
.questionnaire-step input[type="text"],
.questionnaire-step input[type="email"],
.questionnaire-step input[type="number"] {
    color: var(--gray-800) !important;
    background-color: var(--white) !important;
}

/* Buttons should maintain their own styling */
.questionnaire-step .btn {
    color: var(--white) !important;
}

.questionnaire-step .btn-primary {
    color: var(--white) !important;
}

.questionnaire-step .btn-outline-primary {
    color: var(--white) !important;
    border-color: var(--white) !important;
}

.questionnaire-step .btn-outline-primary:hover {
    background-color: var(--white) !important;
    color: var(--primary-color) !important;
}

/* Progress bar text */
.questionnaire-step .progress-text {
    color: var(--white) !important;
}

/* Character counter */
.questionnaire-step .character-count {
    color: var(--gray-300) !important;
}

/* Experience level cards and goal cards */
.experience-card,
.goal-card {
    color: var(--white) !important;
}

.experience-card .card-title,
.goal-card .card-title {
    color: var(--white) !important;
}

.experience-card .card-text,
.goal-card .card-text {
    color: var(--gray-300) !important;
}

.experience-card h5,
.goal-card h5 {
    color: var(--white) !important;
}

.experience-card p,
.goal-card p {
    color: var(--gray-300) !important;
}

/* Step progress text */
.questionnaire-step .step-info {
    color: var(--white) !important;
}

/* All text elements in questionnaire */
.questionnaire-step h1,
.questionnaire-step h2,
.questionnaire-step h3,
.questionnaire-step h4,
.questionnaire-step h5,
.questionnaire-step h6 {
    color: var(--white) !important;
}

.questionnaire-step p,
.questionnaire-step span,
.questionnaire-step div:not(.form-control):not(.btn) {
    color: var(--white) !important;
}

/* Icons in questionnaire */
.questionnaire-step i {
    color: var(--white) !important;
}

/* Removed problematic white text override that was causing text overlay issues */

/* Override any Bootstrap text classes in questionnaire */
.questionnaire-step .text-primary,
.questionnaire-step .text-secondary,
.questionnaire-step .text-success,
.questionnaire-step .text-danger,
.questionnaire-step .text-warning,
.questionnaire-step .text-info,
.questionnaire-step .text-light,
.questionnaire-step .text-dark {
    color: var(--white) !important;
}

/* Registration form labels and text */
.questionnaire-step .form-label,
.questionnaire-step label {
    color: var(--white) !important;
}

.questionnaire-step .required {
    color: var(--white) !important;
}

.questionnaire-step .form-text {
    color: var(--gray-300) !important;
}

/* Step 3 specific styling */
.questionnaire-step .col-md-6 label,
.questionnaire-step .col-md-4 label,
.questionnaire-step .col-md-8 label {
    color: var(--white) !important;
}

/* Final step completion text */
.questionnaire-step .completion-text {
    color: var(--white) !important;
}

/* Form field labels with asterisks */
.questionnaire-step label:after {
    color: var(--white) !important;
}

/* Universal white text override for entire questionnaire section */
.questionnaire-hero,
.questionnaire-hero *,
.questionnaire-step,
.questionnaire-step *,
.step-content,
.step-content *,
.experience-option,
.experience-option *,
.goal-option,
.goal-option * {
    color: var(--white) !important;
}

/* Keep form inputs readable */
.questionnaire-step input,
.questionnaire-step textarea,
.questionnaire-step select,
.questionnaire-step .form-control,
.questionnaire-step .form-select {
    color: var(--gray-800) !important;
    background-color: var(--white) !important;
}

/* Keep buttons with their intended colors */
.questionnaire-step .btn-primary,

/* Gradient backgrounds for dashboard cards */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #00b894 100%) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e17055 100%) !important;
}

.bg-gradient-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #6c5ce7 100%) !important;
}

/* Hover effects for dashboard cards */
.hover-card {
    transition: all 0.3s ease;
    transform: translateY(0);
}

/* =================================
   GLOBAL TEXT VISIBILITY FIXES
   ================================= */

/* Default text colors for both themes */
/* Dark Theme (default) */
body {
    color: var(--gray-800);
    background-color: var(--gray-50);
}

/* Light Theme Override */
[data-theme="light"] body {
    color: var(--gray-800);
    background-color: var(--gray-50);
}

/* Card text visibility for both themes */
.card-body,
.card-header,
.card-footer {
    color: var(--gray-800) !important;
}

.card-body *,
.card-header *,
.card-footer * {
    color: var(--gray-800) !important;
}

/* Ensure proper contrast for different background colors */
.bg-white,
.bg-light,
.bg-gray-50,
.bg-gray-100 {
    color: var(--gray-800) !important;
}

.bg-white *,
.bg-light *,
.bg-gray-50 *,
.bg-gray-100 * {
    color: var(--gray-800) !important;
}

/* Dark backgrounds should have light text */
.bg-dark,
.bg-primary,
.bg-secondary,
.bg-success,
.bg-danger,
.bg-warning,
.bg-info,
.bg-gray-800,
.bg-gray-900 {
    color: var(--white) !important;
}

.bg-dark *,
.bg-primary *,
.bg-secondary *,
.bg-success *,
.bg-danger *,
.bg-warning *,
.bg-info *,
.bg-gray-800 *,
.bg-gray-900 * {
    color: var(--white) !important;
}

/* Table text visibility */
.table tbody td,
.table thead th {
    color: var(--gray-800) !important;
}

/* Form text visibility */
.form-label,
label {
    color: var(--gray-800) !important;
}

/* Button text visibility */
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info {
    color: var(--primary-color) !important;
}

/* Ensure all button text has proper contrast */
.btn-primary,
.btn-success,
.btn-warning,
.btn-danger,
.btn-info,
.btn-secondary {
    color: var(--white) !important;
}

.btn-light {
    color: var(--gray-800) !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
}

.btn-outline-secondary {
    color: var(--gray-600) !important;
}

.btn-outline-success {
    color: var(--success-color) !important;
}

.btn-outline-danger {
    color: var(--danger-color) !important;
}

.btn-outline-warning {
    color: var(--warning-color) !important;
}

.btn-outline-info {
    color: var(--info-color) !important;
}

/* Force dark text on light buttons in all states and contexts */
.btn-light,
.btn-light:hover,
.btn-light:focus,
.btn-light:active,
.btn-light:visited,
.btn-light.active,
.btn-light.show,
span.btn-light,
span.btn-light:hover,
a .btn-light,
a .btn-light:hover,
.text-white .btn-light,
.text-white .btn-light:hover,
.card-body .btn-light,
.card-body .btn-light:hover,
div.card .btn-light,
div.card .btn-light:hover {
    color: var(--gray-800) !important;
    background-color: var(--white) !important;
}

/* Override any inherited text colors from parent elements */
.btn-light * {
    color: var(--gray-800) !important;
}

/* More specific selectors for dashboard buttons */
.card.bg-gradient-primary .btn-light,
.card.bg-gradient-success .btn-light,
.card.text-white .btn-light {
    color: var(--gray-800) !important;
    background-color: var(--white) !important;
}

/* Nuclear option - override ALL possible button light text colors */
.btn-light,
.btn-light:not([class*="btn-outline"]) {
    color: #212529 !important;
    background-color: #f8f9fa !important;
    border-color: #f8f9fa !important;
}

.btn-light:hover,
.btn-light:focus,
.btn-light:active {
    color: #212529 !important;
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
}

/* Override Bootstrap's default button styles completely */
.btn-light.btn-light.btn-light {
    color: #212529 !important;
    background-color: #f8f9fa !important;
}

/* Target all children of light buttons */
.btn-light i,
.btn-light span,
.btn-light *:not(.fa):not(.fas):not(.far):not(.fab) {
    color: #212529 !important;
}

/* Muted and small text */
.text-muted {
    color: var(--gray-600) !important;
}

small,
.small {
    color: var(--gray-600) !important;
}

/* Links */
a {
    color: var(--primary-color) !important;
}

a:hover {
    color: var(--primary-dark) !important;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900) !important;
}

/* Paragraph text */
p {
    color: var(--gray-700) !important;
}

/* Navbar text */
.navbar-nav .nav-link {
    color: var(--gray-700) !important;
}

.navbar-brand {
    color: var(--gray-900) !important;
}

/* Footer should always have light text on dark background */
footer {
    background-color: var(--gray-800) !important;
    color: var(--white) !important;
}

footer * {
    color: var(--white) !important;
}

/* Dashboard specific fixes for inline styles */
.card-title {
    color: var(--gray-900) !important;
}

.card-text {
    color: var(--gray-700) !important;
}

/* Dashboard sections styling */
.dashboard-section {
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

.dashboard-section h3,
.dashboard-section h4,
.dashboard-section h5 {
    margin-bottom: var(--space-sm);
    color: var(--gray-900);
}

/* Quick stats cards - more compact */
.quick-stats .card {
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-sm);
}

.quick-stats .card-body {
    padding: var(--space-sm);
    text-align: center;
}

.quick-stats .card-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.quick-stats .card-text {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Main action buttons - preserve current styling but add rounded corners */
.hover-card {
    border-radius: var(--radius-lg) !important;
    transition: all 0.2s ease;
}

.hover-card:hover {
    transform: translateY(-2px);
}

/* Light theme overrides for dashboard sections */
[data-theme="light"] .dashboard-section {
    background: var(--white);
    border-color: var(--gray-200);
}

/* Light theme text color fixes - ensure all text is dark */
[data-theme="light"] {
    color: var(--gray-800) !important;
}

[data-theme="light"] body {
    color: var(--gray-800) !important;
    background-color: var(--gray-50) !important;
}

[data-theme="light"] .card-body,
[data-theme="light"] .card-header,
[data-theme="light"] .card-footer {
    color: var(--gray-800) !important;
}

[data-theme="light"] .card-body *,
[data-theme="light"] .card-header *,
[data-theme="light"] .card-footer * {
    color: var(--gray-800) !important;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
    color: var(--gray-900) !important;
}

[data-theme="light"] p,
[data-theme="light"] .text-muted {
    color: var(--gray-700) !important;
}

[data-theme="light"] .form-check-label {
    color: var(--gray-800) !important;
}

[data-theme="light"] .small {
    color: var(--gray-600) !important;
}

[data-theme="light"] .fw-bold {
    color: var(--gray-900) !important;
}

[data-theme="light"] .text-primary {
    color: var(--primary-color) !important;
}

/* Settings page specific fixes */
[data-theme="light"] .theme-card .card-body {
    color: var(--gray-800) !important;
}

/* Dark theme text color fixes - ensure all text is light on dark backgrounds */
[data-theme="dark"] {
    color: var(--white) !important;
}

[data-theme="dark"] body {
    color: var(--white) !important;
    background-color: var(--gray-50) !important;
}

[data-theme="dark"] .card-body,
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-footer {
    color: var(--white) !important;
}

[data-theme="dark"] .card-body *,
[data-theme="dark"] .card-header *,
[data-theme="dark"] .card-footer * {
    color: var(--white) !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--white) !important;
}

[data-theme="dark"] p,
[data-theme="dark"] .card-text {
    color: var(--gray-200) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--gray-400) !important;
}

[data-theme="dark"] .form-check-label {
    color: var(--white) !important;
}

[data-theme="dark"] .small {
    color: var(--gray-300) !important;
}

[data-theme="dark"] .fw-bold {
    color: var(--white) !important;
}

/* Training dashboard specific dark theme fixes - more specific selectors */
[data-theme="dark"] .exercise-name,
[data-theme="dark"] .workout-name,
[data-theme="dark"] .card-title,
[data-theme="dark"] h4.card-title,
[data-theme="dark"] h5.card-title,
[data-theme="dark"] h6.card-title {
    color: var(--white) !important;
}

[data-theme="dark"] .exercise-description,
[data-theme="dark"] .workout-description,
[data-theme="dark"] .card-text,
[data-theme="dark"] p.card-text {
    color: var(--gray-200) !important;
}

[data-theme="dark"] .training-plan-header .card-title,
[data-theme="dark"] .training-plan-header h4 {
    color: var(--white) !important;
}

[data-theme="dark"] .exercise-card .card-body,
[data-theme="dark"] .exercise-card .card-body *:not(.btn):not(.btn *) {
    color: var(--white) !important;
}

[data-theme="dark"] .workout-card .card-body,
[data-theme="dark"] .workout-card .card-body *:not(.btn):not(.btn *) {
    color: var(--white) !important;
}

/* Workout card headers - dark theme */
[data-theme="dark"] .workout-card .card-header {
    background-color: var(--gray-100) !important;
    color: var(--gray-900) !important;
}

[data-theme="dark"] .workout-card .card-header *:not(.btn):not(.btn *) {
    color: var(--gray-900) !important;
}

/* Force dark mode text colors with highest specificity for training dashboard */
html[data-theme="dark"] .card .card-body h6,
html[data-theme="dark"] .card .card-header h5,
html[data-theme="dark"] .card .card-body p,
html[data-theme="dark"] .card .card-header p,
html[data-theme="dark"] .border-left-primary .card-body h6,
html[data-theme="dark"] .border-left-primary .card-body p,
html[data-theme="dark"] .exercise-card h6,
html[data-theme="dark"] .exercise-card p,
html[data-theme="dark"] .workout-card h5,
html[data-theme="dark"] .workout-card p {
    color: var(--white) !important;
}

[data-theme="light"] .theme-card .card-body * {
    color: var(--gray-800) !important;
}

/* =================================
   MICRO-ANIMATIONS
   ================================= */

/* Smooth page transitions */
.page-transition {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Button hover animations */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Card hover animations */
.card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card:hover .card-body {
    animation: subtle-pulse 0.6s ease-out;
}

@keyframes subtle-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Form input animations */
.form-control,
.form-select {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus,
.form-select:focus {
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

/* Navbar animations */
.navbar {
    transition: all 0.3s ease;
}

.navbar-nav .nav-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
    left: 0;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-2px);
}

/* Loading spinner animation */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(74, 144, 226, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

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

/* Floating action button animation */
.fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(74, 144, 226, 0.4);
}

.fab:active {
    transform: scale(0.95);
}

/* Ripple effect for clickable elements */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::before {
    width: 300px;
    height: 300px;
}

/* Icon animations */
.icon-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-hover:hover {
    transform: scale(1.2) rotate(5deg);
    color: var(--primary-color);
}

/* Slide-in animations for dashboard cards */
.dashboard-card {
    animation: slideInRight 0.6s ease-out;
}

.dashboard-card:nth-child(2) {
    animation-delay: 0.1s;
}

.dashboard-card:nth-child(3) {
    animation-delay: 0.2s;
}

.dashboard-card:nth-child(4) {
    animation-delay: 0.3s;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Progress bar animation */
.progress-bar {
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% { background-position: 0 0; }
    100% { background-position: 40px 0; }
}

/* Modal animations */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: translate(0, 0);
}

/* Tooltip animations */
.tooltip {
    transition: opacity 0.3s ease;
}

.tooltip.show {
    animation: tooltipFadeIn 0.3s ease-out;
}

@keyframes tooltipFadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Stagger animation for lists */
.list-item {
    animation: fadeInUp 0.6s ease-out;
}

.list-item:nth-child(1) { animation-delay: 0.1s; }
.list-item:nth-child(2) { animation-delay: 0.2s; }
.list-item:nth-child(3) { animation-delay: 0.3s; }
.list-item:nth-child(4) { animation-delay: 0.4s; }
.list-item:nth-child(5) { animation-delay: 0.5s; }

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Alert animations */
.alert {
    animation: slideInDown 0.5s ease-out;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Theme switcher animation */
.theme-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.theme-preview {
    transition: all 0.3s ease;
}

.theme-card:hover .theme-preview {
    transform: scale(1.05);
}

/* Micro-interactions for form elements */
.form-check-input {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-check-input:checked {
    animation: checkboxPop 0.3s ease-out;
}

@keyframes checkboxPop {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Hover effects for interactive elements */
.interactive-element {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-element:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Breathing animation for important elements */
.breathing {
    animation: breathing 2s ease-in-out infinite;
}

@keyframes breathing {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Bounce animation for notifications */
.bounce {
    animation: bounce 0.6s ease-in-out;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Fade transitions for content changes */
.fade-transition {
    transition: opacity 0.3s ease-in-out;
}

.fade-transition.fade-out {
    opacity: 0;
}

.fade-transition.fade-in {
    opacity: 1;
}

/* =================================
   ROUNDED CORNERS SYSTEM
   ================================= */

/* Apply rounded corners to all major elements */
.card,
.card-header,
.card-body,
.card-footer {
    border-radius: var(--radius-lg) !important;
}

.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-warning,
.btn-danger,
.btn-info,
.btn-light,
.btn-dark,
.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-success,
.btn-outline-warning,
.btn-outline-danger,
.btn-outline-info,
.btn-outline-light,
.btn-outline-dark {
    border-radius: var(--radius-md) !important;
}

.btn-sm {
    border-radius: var(--radius-sm) !important;
}

.btn-lg {
    border-radius: var(--radius-lg) !important;
}

.form-control,
.form-select,
.form-check-input {
    border-radius: var(--radius-md) !important;
}

.input-group .form-control:first-child,
.input-group .form-select:first-child {
    border-top-left-radius: var(--radius-md) !important;
    border-bottom-left-radius: var(--radius-md) !important;
}

.input-group .form-control:last-child,
.input-group .form-select:last-child {
    border-top-right-radius: var(--radius-md) !important;
    border-bottom-right-radius: var(--radius-md) !important;
}

.modal-content {
    border-radius: var(--radius-xl) !important;
}

.modal-header {
    border-top-left-radius: var(--radius-xl) !important;
    border-top-right-radius: var(--radius-xl) !important;
}

.modal-footer {
    border-bottom-left-radius: var(--radius-xl) !important;
    border-bottom-right-radius: var(--radius-xl) !important;
}

.alert {
    border-radius: var(--radius-lg) !important;
}

.badge {
    border-radius: var(--radius-md) !important;
}

.breadcrumb {
    border-radius: var(--radius-md) !important;
}

.dropdown-menu {
    border-radius: var(--radius-lg) !important;
}

.nav-tabs .nav-link {
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.nav-pills .nav-link {
    border-radius: var(--radius-md) !important;
}

.navbar {
    border-radius: 0 !important;
}

.progress {
    border-radius: var(--radius-md) !important;
}

.progress-bar {
    border-radius: var(--radius-md) !important;
}

.table {
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
}

.table thead th:first-child {
    border-top-left-radius: var(--radius-lg) !important;
}

.table thead th:last-child {
    border-top-right-radius: var(--radius-lg) !important;
}

.table tbody tr:last-child td:first-child {
    border-bottom-left-radius: var(--radius-lg) !important;
}

.table tbody tr:last-child td:last-child {
    border-bottom-right-radius: var(--radius-lg) !important;
}

.toast {
    border-radius: var(--radius-lg) !important;
}

.tooltip .tooltip-inner {
    border-radius: var(--radius-md) !important;
}

.popover {
    border-radius: var(--radius-lg) !important;
}

.list-group {
    border-radius: var(--radius-lg) !important;
}

.list-group-item:first-child {
    border-top-left-radius: var(--radius-lg) !important;
    border-top-right-radius: var(--radius-lg) !important;
}

.list-group-item:last-child {
    border-bottom-left-radius: var(--radius-lg) !important;
    border-bottom-right-radius: var(--radius-lg) !important;
}

.pagination .page-link {
    border-radius: var(--radius-md) !important;
    margin: 0 2px;
}

.pagination .page-item:first-child .page-link {
    border-radius: var(--radius-md) !important;
}

.pagination .page-item:last-child .page-link {
    border-radius: var(--radius-md) !important;
}

/* Custom NutriMove elements with rounded corners */
.theme-card {
    border-radius: var(--radius-xl) !important;
}

.theme-preview {
    border-radius: var(--radius-md) !important;
}

.theme-navbar {
    border-radius: var(--radius-sm) !important;
}

.theme-content {
    border-radius: var(--radius-sm) !important;
}

.theme-card-preview {
    border-radius: var(--radius-sm) !important;
}

.dashboard-card {
    border-radius: var(--radius-lg) !important;
}

.stat-card {
    border-radius: var(--radius-lg) !important;
}

.workout-card {
    border-radius: var(--radius-lg) !important;
}

.nutrition-card {
    border-radius: var(--radius-lg) !important;
}

.product-card {
    border-radius: var(--radius-lg) !important;
}

.recipe-card {
    border-radius: var(--radius-lg) !important;
}

.content-card {
    border-radius: var(--radius-lg) !important;
}

.exercise-card {
    border-radius: var(--radius-lg) !important;
}

.timer-display {
    border-radius: var(--radius-2xl) !important;
}

.timer-controls {
    border-radius: var(--radius-lg) !important;
}

.settings-panel {
    border-radius: var(--radius-lg) !important;
}

.progress-circle {
    border-radius: 50% !important;
}

.avatar {
    border-radius: 50% !important;
}

.profile-image {
    border-radius: var(--radius-lg) !important;
}

.upload-area {
    border-radius: var(--radius-lg) !important;
}

.file-preview {
    border-radius: var(--radius-md) !important;
}

.search-input {
    border-radius: var(--radius-md) !important;
}

.filter-button {
    border-radius: var(--radius-md) !important;
}

.category-badge {
    border-radius: var(--radius-md) !important;
}

.price-tag {
    border-radius: var(--radius-md) !important;
}

.quantity-selector {
    border-radius: var(--radius-md) !important;
}

.cart-item {
    border-radius: var(--radius-lg) !important;
}

.checkout-section {
    border-radius: var(--radius-lg) !important;
}

.notification-card {
    border-radius: var(--radius-lg) !important;
}

.forum-post {
    border-radius: var(--radius-lg) !important;
}

.comment-card {
    border-radius: var(--radius-lg) !important;
}

.calendar-day {
    border-radius: var(--radius-md) !important;
}

.calendar-event {
    border-radius: var(--radius-sm) !important;
}

.booking-card {
    border-radius: var(--radius-lg) !important;
}

.user-profile-card {
    border-radius: var(--radius-lg) !important;
}

.admin-panel {
    border-radius: var(--radius-lg) !important;
}

.stats-widget {
    border-radius: var(--radius-lg) !important;
}

.chart-container {
    border-radius: var(--radius-lg) !important;
}

.data-table {
    border-radius: var(--radius-lg) !important;
}

.sidebar {
    border-radius: var(--radius-lg) !important;
}

.mobile-menu {
    border-radius: var(--radius-lg) !important;
}

.floating-action-button {
    border-radius: 50% !important;
}

.fab {
    border-radius: 50% !important;
}

.loading-spinner {
    border-radius: 50% !important;
}

.status-indicator {
    border-radius: 50% !important;
}

.icon-button {
    border-radius: var(--radius-md) !important;
}

.tag {
    border-radius: var(--radius-md) !important;
}

.chip {
    border-radius: var(--radius-2xl) !important;
}

.step-indicator {
    border-radius: 50% !important;
}

.progress-step {
    border-radius: 50% !important;
}

.questionnaire-card {
    border-radius: var(--radius-xl) !important;
}

.experience-option {
    border-radius: var(--radius-lg) !important;
}

.goal-input {
    border-radius: var(--radius-md) !important;
}

.subscription-card {
    border-radius: var(--radius-xl) !important;
}

.pricing-card {
    border-radius: var(--radius-xl) !important;
}

.feature-card {
    border-radius: var(--radius-lg) !important;
}

.testimonial-card {
    border-radius: var(--radius-lg) !important;
}

.hero-section {
    border-radius: var(--radius-2xl) !important;
}

.cta-button {
    border-radius: var(--radius-lg) !important;
}

.footer-section {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

/* Image elements with rounded corners */
img {
    border-radius: var(--radius-md) !important;
}

.img-thumbnail {
    border-radius: var(--radius-lg) !important;
}

.product-image {
    border-radius: var(--radius-lg) !important;
}

.recipe-image {
    border-radius: var(--radius-lg) !important;
}

.user-avatar {
    border-radius: 50% !important;
}

.logo {
    border-radius: var(--radius-md) !important;
}

.banner-image {
    border-radius: var(--radius-lg) !important;
}

.gallery-image {
    border-radius: var(--radius-lg) !important;
}

/* Special rounded corners for containers */
.container,
.container-fluid {
    border-radius: var(--radius-lg) !important;
}

.row {
    border-radius: var(--radius-lg) !important;
}

.col,
.col-1, .col-2, .col-3, .col-4, .col-5, .col-6,
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12,
.col-sm, .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6,
.col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12,
.col-md, .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6,
.col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12,
.col-lg, .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6,
.col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12,
.col-xl, .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6,
.col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12 {
    border-radius: var(--radius-md) !important;
}

/* Input groups with proper rounded corners */
.input-group {
    border-radius: var(--radius-md) !important;
}

.input-group-text {
    border-radius: var(--radius-md) !important;
}

.input-group .btn {
    border-radius: var(--radius-md) !important;
}

/* Navbar specific rounded corners */
.navbar-brand img {
    border-radius: var(--radius-md) !important;
}

.navbar-nav .nav-link {
    border-radius: var(--radius-md) !important;
}

.navbar-toggler {
    border-radius: var(--radius-md) !important;
}

/* Override Bootstrap's default border-radius for specific elements */
.rounded {
    border-radius: var(--radius-md) !important;
}

.rounded-sm {
    border-radius: var(--radius-sm) !important;
}

.rounded-lg {
    border-radius: var(--radius-lg) !important;
}

.rounded-xl {
    border-radius: var(--radius-xl) !important;
}

.rounded-2xl {
    border-radius: var(--radius-2xl) !important;
}

.rounded-3xl {
    border-radius: var(--radius-3xl) !important;
}

.rounded-circle {
    border-radius: 50% !important;
}

.rounded-pill {
    border-radius: var(--radius-2xl) !important;
}

/* Make sure all interactive elements have rounded corners */
button,
input[type="button"],
input[type="submit"],
input[type="reset"] {
    border-radius: var(--radius-md) !important;
}

select {
    border-radius: var(--radius-md) !important;
}

textarea {
    border-radius: var(--radius-md) !important;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="time"],
input[type="week"],
input[type="month"] {
    border-radius: var(--radius-md) !important;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .card,
    .modal-content,
    .alert {
        border-radius: var(--radius-md) !important;
    }
    
    .btn-lg {
        border-radius: var(--radius-md) !important;
    }
    
    .theme-card {
        border-radius: var(--radius-lg) !important;
    }
}

/* Ensure proper rounded corners in dark and light themes */
[data-theme="dark"] .card,
[data-theme="dark"] .btn,
[data-theme="dark"] .form-control,
[data-theme="dark"] .alert,
[data-theme="light"] .card,
[data-theme="light"] .btn,
[data-theme="light"] .form-control,
[data-theme="light"] .alert {
    border-radius: var(--radius-lg) !important;
}

/* Dark theme text overrides for home page sections */
[data-theme="dark"] .advantages-section h2,
[data-theme="dark"] .advantages-section .lead,
[data-theme="dark"] .advantages-section .card-title,
[data-theme="dark"] .advantages-section .card-text,
[data-theme="dark"] .advantages-section li,
[data-theme="dark"] .advantages-section h5,
[data-theme="dark"] .advantages-section p {
    color: #000000 !important;
}

[data-theme="dark"] .questionnaire-hero h1,
[data-theme="dark"] .questionnaire-hero .lead,
[data-theme="dark"] .questionnaire-hero h4,
[data-theme="dark"] .questionnaire-hero h5,
[data-theme="dark"] .questionnaire-hero p,
[data-theme="dark"] .questionnaire-hero .card-text,
[data-theme="dark"] .questionnaire-hero .card-title,
[data-theme="dark"] .questionnaire-hero label,
[data-theme="dark"] .questionnaire-hero small {
    color: #000000 !important;
}

/* Specific questionnaire section text overrides */
[data-theme="dark"] .questionnaire-hero .container h1,
[data-theme="dark"] .questionnaire-hero .container .lead,
[data-theme="dark"] .questionnaire-hero .text-center h1,
[data-theme="dark"] .questionnaire-hero .text-center .lead,
[data-theme="dark"] .questionnaire-hero .text-center p {
    color: #000000 !important;
}

/* Target the specific questionnaire title and description */
[data-theme="dark"] .questionnaire-hero h1.display-4,
[data-theme="dark"] .questionnaire-hero .display-4,
[data-theme="dark"] .questionnaire-hero .lead.text-muted {
    color: #000000 !important;
}

/* Make sure all text in questionnaire section is black */
[data-theme="dark"] .questionnaire-hero * {
    color: #000000 !important;
}

/* More specific targeting for questionnaire text */
[data-theme="dark"] .questionnaire-hero .text-dark {
    color: #000000 !important;
}

[data-theme="dark"] .questionnaire-hero .fw-bold {
    color: #000000 !important;
}

[data-theme="dark"] .questionnaire-hero .mb-4 {
    color: #000000 !important;
}

[data-theme="dark"] .questionnaire-hero .mb-5 {
    color: #000000 !important;
}

/* Force override for specific questionnaire elements */
[data-theme="dark"] .questionnaire-hero h1,
[data-theme="dark"] .questionnaire-hero h2,
[data-theme="dark"] .questionnaire-hero h3,
[data-theme="dark"] .questionnaire-hero h4,
[data-theme="dark"] .questionnaire-hero h5,
[data-theme="dark"] .questionnaire-hero h6,
[data-theme="dark"] .questionnaire-hero p,
[data-theme="dark"] .questionnaire-hero span,
[data-theme="dark"] .questionnaire-hero div {
    color: #000000 !important;
}

/* Ultra-specific override for questionnaire text - using higher specificity */
html[data-theme="dark"] body .questionnaire-hero .text-center h1.display-4.fw-bold.mb-4.text-dark {
    color: #000000 !important;
}

html[data-theme="dark"] body .questionnaire-hero .text-center p.lead.text-muted.mb-5 {
    color: #000000 !important;
}

/* Nuclear option - override all text in questionnaire section */
html[data-theme="dark"] .questionnaire-hero,
html[data-theme="dark"] .questionnaire-hero * {
    color: #000000 !important;
}

/* Target the specific classes from the template */
html[data-theme="dark"] .display-4.fw-bold.mb-4.text-dark {
    color: #000000 !important;
}

html[data-theme="dark"] .lead.text-muted.mb-5 {
    color: #000000 !important;
}

/* Make "objetivo" word the same black color as the rest of the title */
html[data-theme="dark"] .questionnaire-hero .text-primary {
    color: #000000 !important;
}

html[data-theme="dark"] .questionnaire-hero span.text-primary {
    color: #000000 !important;
}

html[data-theme="dark"] .questionnaire-hero h1 span.text-primary {
    color: #000000 !important;
}

html[data-theme="dark"] .questionnaire-hero .display-4 span.text-primary {
    color: #000000 !important;
}

/* Force override with maximum specificity */
html[data-theme="dark"] body .questionnaire-hero .display-4.fw-bold.mb-4.text-dark span.text-primary {
    color: #000000 !important;
}

/* Nuclear option for text-primary anywhere in questionnaire */
html[data-theme="dark"] .questionnaire-hero * .text-primary,
html[data-theme="dark"] .questionnaire-hero *.text-primary {
    color: #000000 !important;
}

/* Override Bootstrap's text-primary with even higher specificity */
html[data-theme="dark"] .questionnaire-hero .text-primary.text-primary {
    color: #000000 !important;
}

/* Force override using attribute selector */
html[data-theme="dark"] .questionnaire-hero span[class*="text-primary"] {
    color: #000000 !important;
}

/* Fix form input text color in dark theme */
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .form-control {
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* Fix form input placeholder text */
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #666666 !important;
}

/* Fix error messages and alerts text color in dark theme */
[data-theme="dark"] .alert,
[data-theme="dark"] .alert-danger,
[data-theme="dark"] .alert-warning,
[data-theme="dark"] .alert-success,
[data-theme="dark"] .alert-info,
[data-theme="dark"] .text-danger,
[data-theme="dark"] .text-warning,
[data-theme="dark"] .text-success,
[data-theme="dark"] .text-info {
    color: #000000 !important;
}

/* Fix flashed messages */
[data-theme="dark"] .flashes li,
[data-theme="dark"] .flash-message {
    color: #000000 !important;
}

/* Fix navbar toggler (hamburger menu) visibility */
/* Light theme - dark icon on light background */
[data-theme="light"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

[data-theme="light"] .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Dark theme - light icon on dark background */
[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

[data-theme="dark"] .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .navbar-toggler:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25) !important;
}

[data-theme="dark"] .questionnaire-hero .text-muted,
[data-theme="dark"] .advantages-section .text-muted {
    color: #333333 !important;
}

[data-theme="dark"] .questionnaire-hero .text-dark,
[data-theme="dark"] .advantages-section .text-dark {
    color: #000000 !important;
}

[data-theme="dark"] .questionnaire-hero .display-4,
[data-theme="dark"] .advantages-section .display-5 {
    color: #000000 !important;
}

/* Footer text in dark theme */
[data-theme="dark"] footer p,
[data-theme="dark"] footer h6,
[data-theme="dark"] footer .text-muted {
    color: #000000 !important;
}

/* Step indicator text in dark theme */
[data-theme="dark"] .step-indicator,
[data-theme="dark"] .progress-text {
    color: #000000 !important;
}

/* =================================
   ENHANCED PADDING SYSTEM
   ================================= */

/* Card padding improvements */
.card-body {
    padding: 1.5rem !important;
}

.card-header {
    padding: 1.25rem 1.5rem !important;
}

.card-footer {
    padding: 1rem 1.5rem !important;
}

/* Button padding improvements */
.btn {
    padding: 0.75rem 1.5rem !important;
}

.btn-sm {
    padding: 0.5rem 1rem !important;
}

.btn-lg {
    padding: 1rem 2rem !important;
}

/* Form element padding */
.form-control,
.form-select {
    padding: 0.75rem 1rem !important;
}

.form-control:focus,
.form-select:focus {
    padding: 0.75rem 1rem !important;
}

/* Input group padding */
.input-group-text {
    padding: 0.75rem 1rem !important;
}

/* Alert padding */
.alert {
    padding: 1rem 1.5rem !important;
}

/* Modal padding */
.modal-header {
    padding: 1.5rem 2rem !important;
}

.modal-body {
    padding: 1.5rem 2rem !important;
}

.modal-footer {
    padding: 1rem 2rem !important;
}

/* Navbar padding */
.navbar {
    padding: 1rem 1.5rem !important;
}

.navbar-brand {
    padding: 0.5rem 1rem !important;
}

.navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
}

/* List group padding */
.list-group-item {
    padding: 1rem 1.5rem !important;
}

/* Breadcrumb padding */
.breadcrumb {
    padding: 0.75rem 1.5rem !important;
}

/* Dropdown padding */
.dropdown-menu {
    padding: 0.5rem 0 !important;
}

.dropdown-item {
    padding: 0.75rem 1.5rem !important;
}

/* Table padding */
.table th,
.table td {
    padding: 1rem 1.5rem !important;
}

/* Badge padding */
.badge {
    padding: 0.5rem 0.75rem !important;
}

/* Pagination padding */
.pagination .page-link {
    padding: 0.75rem 1rem !important;
}

/* Toast padding */
.toast-body {
    padding: 1rem 1.5rem !important;
}

/* Tooltip padding */
.tooltip .tooltip-inner {
    padding: 0.5rem 0.75rem !important;
}

/* Popover padding */
.popover-body {
    padding: 1rem 1.5rem !important;
}

.popover-header {
    padding: 0.75rem 1.5rem !important;
}

/* Custom NutriMove component padding */
.dashboard-card .card-body {
    padding: 2rem !important;
}

.theme-card .card-body {
    padding: 1.5rem !important;
}

.stat-card .card-body {
    padding: 1.5rem !important;
}

.workout-card .card-body {
    padding: 1.5rem !important;
}

.nutrition-card .card-body {
    padding: 1.5rem !important;
}

.product-card .card-body {
    padding: 1.25rem !important;
}

.recipe-card .card-body {
    padding: 1.25rem !important;
}

.content-card .card-body {
    padding: 1.5rem !important;
}

.exercise-card .card-body {
    padding: 1.25rem !important;
}

.timer-display {
    padding: 2rem !important;
}

.timer-controls {
    padding: 1.5rem !important;
}

.settings-panel {
    padding: 1.5rem !important;
}

.upload-area {
    padding: 2rem !important;
}

.search-input {
    padding: 0.75rem 1rem !important;
}

.category-badge {
    padding: 0.5rem 1rem !important;
}

.price-tag {
    padding: 0.5rem 0.75rem !important;
}

.cart-item {
    padding: 1.5rem !important;
}

.checkout-section {
    padding: 2rem !important;
}

.notification-card {
    padding: 1.25rem !important;
}

.forum-post {
    padding: 1.5rem !important;
}

.comment-card {
    padding: 1rem !important;
}

.calendar-day {
    padding: 1rem !important;
}

.calendar-event {
    padding: 0.5rem !important;
}

.booking-card {
    padding: 1.5rem !important;
}

.user-profile-card {
    padding: 2rem !important;
}

.admin-panel {
    padding: 2rem !important;
}

.stats-widget {
    padding: 1.5rem !important;
}

.chart-container {
    padding: 1.5rem !important;
}

.questionnaire-card {
    padding: 2rem !important;
}

.experience-option {
    padding: 1.5rem !important;
}

.subscription-card {
    padding: 2rem !important;
}

.pricing-card {
    padding: 2rem !important;
}

.feature-card {
    padding: 1.5rem !important;
}

.testimonial-card {
    padding: 1.5rem !important;
}

/* Container padding improvements */
.container,
.container-fluid {
    padding: 1rem 1.5rem !important;
}

/* Form group spacing */
.form-group {
    margin-bottom: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 1.5rem !important;
}

.mb-4 {
    margin-bottom: 2rem !important;
}

.mb-5 {
    margin-bottom: 2.5rem !important;
}

/* Text area padding */
textarea.form-control {
    padding: 1rem !important;
}

/* Checkbox and radio padding */
.form-check {
    padding-left: 2rem !important;
}

.form-check-input {
    margin-left: -2rem !important;
}

/* Progress bar container padding */
.progress {
    padding: 0.25rem !important;
}

/* Responsive padding adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1.25rem !important;
    }
    
    .dashboard-card .card-body {
        padding: 1.5rem !important;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem 1.5rem !important;
    }
    
    .container,
    .container-fluid {
        padding: 0.75rem 1rem !important;
    }
    
    .btn {
        padding: 0.5rem 1rem !important;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem !important;
    }
    
    .navbar {
        padding: 0.75rem 1rem !important;
    }
    
    .questionnaire-card,
    .subscription-card,
    .pricing-card {
        padding: 1.5rem !important;
    }
    
    .upload-area {
        padding: 1.5rem !important;
    }
    
    .timer-display {
        padding: 1.5rem !important;
    }
}

/* Override inline styles in dashboard */
.card-body p[style*="color: #6c757d"] {
    color: var(--gray-600) !important;
}

.card-body .card-text[style*="color: #6c757d"] {
    color: var(--gray-600) !important;
}

/* Ensure dashboard card titles and content have proper contrast */
.card .card-title,
.card h5.card-title {
    color: var(--gray-900) !important;
}

.card .card-text,
.card p.card-text {
    color: var(--gray-700) !important;
}

/* Dashboard stats cards */
.card-body h5 {
    color: var(--gray-900) !important;
}

.card-body p {
    color: var(--gray-700) !important;
}

/* Navbar text visibility */
.navbar-nav .nav-link {
    color: var(--gray-700) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
}

/* Training plan text visibility */
.training-plan-card,
.workout-card,
.exercise-card {
    color: var(--gray-800) !important;
}

.training-plan-card *,
.workout-card *,
.exercise-card * {
    color: var(--gray-800) !important;
}

/* Admin panel text visibility */
.admin-panel,
.admin-card {
    color: var(--gray-800) !important;
}

.admin-panel *,
.admin-card * {
    color: var(--gray-800) !important;
}

/* Forum text visibility */
.forum-post,
.forum-card {
    color: var(--gray-800) !important;
}

.forum-post *,
.forum-card * {
    color: var(--gray-800) !important;
}

/* Store text visibility */
.store-card,
.product-card {
    color: var(--gray-800) !important;
}

.store-card *,
.product-card * {
    color: var(--gray-800) !important;
}

/* Nutrition text visibility */
.nutrition-card,
.recipe-card {
    color: var(--gray-800) !important;
}

.nutrition-card *,
.recipe-card * {
    color: var(--gray-800) !important;
}

/* Override Bootstrap text utility classes for visibility */
.text-primary {
    color: var(--primary-color) !important;
}

/* Specific overrides for nutrition/recipe pages in dark theme */
html[data-theme="dark"] .nutrition-page .text-primary,
html[data-theme="dark"] .recipe-detail .text-primary {
    color: var(--gray-800) !important;
}

/* Force card header titles to be dark in recipe pages */
html[data-theme="dark"] .card-header h6,
html[data-theme="dark"] .card-header .text-dark,
html[data-theme="dark"] .bg-light h6,
html[data-theme="dark"] .bg-light .text-dark {
    color: #212529 !important;
}

/* Force recipe page titles to be dark with highest specificity */
html[data-theme="dark"] .nutrition-page h5.text-body,
html[data-theme="dark"] .nutrition-page h6.text-dark,
html[data-theme="dark"] .card-body h6.text-dark {
    color: #212529 !important;
}

/* Force recipe main content titles to be white in dark mode */
html[data-theme="dark"] .nutrition-page .card-body h5.text-body,
html[data-theme="dark"] .nutrition-page h1.text-body,
html[data-theme="dark"] .nutrition-page h2.text-body,
html[data-theme="dark"] .nutrition-page h3.text-body {
    color: #ffffff !important;
}

/* Modal text color fixes for dark mode - force black text in modals */
html[data-theme="dark"] .modal-content {
    color: #212529 !important;
}

html[data-theme="dark"] .modal-header .modal-title,
html[data-theme="dark"] .modal-body label,
html[data-theme="dark"] .modal-body .form-label,
html[data-theme="dark"] .modal-body h5,
html[data-theme="dark"] .modal-body h6,
html[data-theme="dark"] .modal-body p {
    color: #212529 !important;
}

html[data-theme="dark"] .modal-body .form-control,
html[data-theme="dark"] .modal-body .form-select {
    color: #212529 !important;
    background-color: #ffffff !important;
}

.text-secondary {
    color: var(--gray-600) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.text-light {
    color: var(--gray-300) !important;
}

.text-dark {
    color: var(--gray-800) !important;
}

/* Ensure all headings are visible */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--gray-900) !important;
}

/* Ensure all paragraphs are visible */
p {
    color: var(--gray-700) !important;
}

/* Ensure all span elements are visible */
span:not(.badge):not(.btn) {
    color: var(--gray-700) !important;
}

/* Ensure all div text is visible */
div:not(.btn):not(.badge):not(.alert) {
    color: var(--gray-700) !important;
}

/* Exception for buttons - keep their intended colors */
.btn,
.btn * {
    color: inherit !important;
}

/* Exception for badges - keep their intended colors */
.badge,
.badge * {
    color: inherit !important;
}

/* Exception for alerts - keep their intended colors */
.alert,
.alert * {
    color: inherit !important;
}

.hover-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Dashboard action buttons enhancement */
.hover-card .card-body {
    transition: all 0.3s ease;
}

.hover-card:hover .card-body {
    transform: scale(1.02);
}
.questionnaire-step .btn-success,
.questionnaire-step .btn-warning,
.questionnaire-step .btn-danger,
.questionnaire-step .btn-info {
    color: var(--white) !important;
}

.questionnaire-step .btn-light {
    color: var(--gray-800) !important;
}

/* Remove duplicate - already defined above */

/* Override any white text forcing on buttons */
.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    color: var(--white) !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Progress bar background text */
.questionnaire-step .progress,
.questionnaire-step .progress-bar {
    color: var(--white) !important;
}

/* Pricing/Upsell section white text */
.pricing-section,
.pricing-section *,
.upsell-section,
.upsell-section *,
.subscription-benefits,
.subscription-benefits *,
.benefit-list,
.benefit-list *,
.pricing-card,
.pricing-card *,
.feature-list,
.feature-list *,
.premium-features,
.premium-features * {
    color: var(--white) !important;
}

/* Pricing specific elements */
.pricing-section .card-title,
.pricing-section .card-text,
.pricing-section .list-group-item,
.pricing-section .badge,
.pricing-section .small,
.pricing-section .text-muted,
.pricing-section p,
.pricing-section li,
.pricing-section span {
    color: var(--white) !important;
}

/* Upsell page styling */
.upsell-section .card-title,
.upsell-section .card-text,
.upsell-section .list-group-item,
.upsell-section .badge,
.upsell-section .small,
.upsell-section .text-muted,
.upsell-section p,
.upsell-section li,
.upsell-section span {
    color: var(--white) !important;
}

/* Keep pricing buttons readable */
.pricing-section .btn,
.upsell-section .btn {
    color: var(--white) !important;
}

/* Feature checkmarks and icons */
.pricing-section .fas,
.pricing-section .far,
.upsell-section .fas,
.upsell-section .far {
    color: var(--white) !important;
}

/* Universal dark background sections - ensure white text */
.bg-dark,
.bg-dark *,
.bg-primary,
.bg-primary *,
.bg-secondary,
.bg-secondary *,
.hero-section,
.hero-section *,
.dark-section,
.dark-section * {
    color: var(--white) !important;
}

/* Exception for form inputs in dark sections */
.bg-dark .form-control,
.bg-dark .form-select,
.bg-primary .form-control,
.bg-primary .form-select,
.bg-secondary .form-control,
.bg-secondary .form-select,
.hero-section .form-control,
.hero-section .form-select,
.dark-section .form-control,
.dark-section .form-select {
    color: var(--gray-800) !important;
    background-color: var(--white) !important;
}

/* Exception for outline buttons - maintain their intended colors */
.bg-dark .btn-outline-primary,
.bg-primary .btn-outline-primary,
.bg-secondary .btn-outline-primary,
.hero-section .btn-outline-primary,
.dark-section .btn-outline-primary,
.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    background-color: transparent !important;
}

.bg-dark .btn-outline-primary:hover,
.bg-primary .btn-outline-primary:hover,
.bg-secondary .btn-outline-primary:hover,
.hero-section .btn-outline-primary:hover,
.dark-section .btn-outline-primary:hover,
.btn-outline-primary:hover {
    color: var(--white) !important;
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

/* Login page styling */
.login-section,
.login-section *,
.login-form,
.login-form *,
.auth-section,
.auth-section *,
.register-section,
.register-section * {
    color: var(--white) !important;
}

.login-section .form-label,
.login-section label,
.auth-section .form-label,
.auth-section label,
.register-section .form-label,
.register-section label {
    color: var(--white) !important;
}

.login-section p,
.login-section a,
.login-section span,
.auth-section p,
.auth-section a,
.auth-section span,
.register-section p,
.register-section a,
.register-section span {
    color: var(--white) !important;
}

/* Keep login form inputs readable */
.login-section .form-control,
.login-section .form-select,
.auth-section .form-control,
.auth-section .form-select,
.register-section .form-control,
.register-section .form-select {
    color: var(--gray-800) !important;
    background-color: var(--white) !important;
}

/* Login page links */
.login-section a:hover,
.auth-section a:hover,
.register-section a:hover {
    color: var(--gray-200) !important;
}

/* Dashboard page styling */
.dashboard-section,
.dashboard-section *,
.dashboard-stats,
.dashboard-stats *,
.stats-row,
.stats-row *,
.welcome-card,
.welcome-card *,
.dashboard-card,
.dashboard-card *,
.stats-card,
.stats-card * {
    color: var(--white) !important;
}

/* Dashboard welcome card */
.bg-primary .card-title,
.bg-primary .card-text,
.bg-primary p,
.bg-primary span {
    color: var(--white) !important;
}

/* Dashboard stats cards */
.dashboard-stats .card-title,
.dashboard-stats .card-text,
.dashboard-stats h5,
.dashboard-stats p {
    color: var(--white) !important;
}

/* Override inline styles in dashboard */
[style*="color: #6c757d"] {
    color: var(--white) !important;
}

/* Stats numbers and descriptions */
.dashboard-stats .text-center h5,
.dashboard-stats .text-center p {
    color: var(--white) !important;
}

/* Dashboard objective text */
.dashboard .card-text,
.dashboard p,
.dashboard span {
    color: var(--white) !important;
}

/* Force override dashboard inline styles */
.card-text[style*="color: #6c757d"],
.card-text[style*="color:#6c757d"],
p[style*="color: #6c757d"],
p[style*="color:#6c757d"],
span[style*="color: #6c757d"],
span[style*="color:#6c757d"] {
    color: var(--white) !important;
}

/* Dashboard cards specifically */
.card .card-text {
    color: var(--white) !important;
}

.card .card-title {
    color: var(--white) !important;
}

/* Stats cards text center */
.text-center .card-text {
    color: var(--white) !important;
}

.text-center h5 {
    color: var(--white) !important;
}

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

.step-content {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
}

.step-content.active {
    display: block;
}

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

/* Goal and Experience Selection Cards */
.goal-card,
.experience-card {
    border: 2px solid var(--gray-200);
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.goal-card:hover,
.experience-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.15);
}

.goal-option.selected .goal-card,
.experience-option.selected .experience-card {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.25);
}

.goal-option.selected .goal-card .card-text,
.experience-option.selected .experience-card .card-text {
    color: rgba(255, 255, 255, 0.9);
}

.goal-option.selected .goal-card i,
.experience-option.selected .experience-card i {
    color: var(--white);
}

/* Progress Indicator */
.progress-indicator .progress {
    border-radius: var(--radius-lg);
    background: var(--gray-100);
}

.progress-indicator .progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: var(--radius-lg);
    transition: width 0.6s ease;
}

/* Enhanced Form Styling */
.modern-form .form-control-lg,
.modern-form .form-select-lg {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--gray-200);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.modern-form .form-control-lg:focus,
.modern-form .form-select-lg:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
}

.modern-form .form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.75rem;
}

/* Login Section */
.login-section {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

/* Responsive Design */
@media (max-width: 768px) {
    .questionnaire-hero {
        padding: 2rem 0;
        min-height: auto;
    }
    
    .questionnaire-hero h1 {
        font-size: 2.5rem;
    }
    
    .goal-card,
    .experience-card {
        margin-bottom: 1rem;
    }
    
    .timer-controls {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .timer-controls .btn {
        width: 100%;
        min-width: auto;
    }
    
    #timer-display {
        font-size: 3rem;
    }
}

/* Modern Form Enhancements */
.modern-form .form-group {
    margin-bottom: 2rem;
}

.modern-form .form-floating {
    margin-bottom: 1.5rem;
}

.modern-form .form-floating > .form-control {
    padding: 1rem 0.75rem;
    height: calc(3.5rem + 2px);
}

.modern-form .form-floating > label {
    padding: 1rem 0.75rem;
    font-weight: 500;
    color: var(--gray-600);
}

/* Custom floating labels */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

/* Enhanced buttons */
.btn-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    color: white;
}

/* Feature cards enhancement */
.feature-icon:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Content gallery enhancements */
.content-card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.content-card .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-card:hover .play-overlay {
    opacity: 1;
}

/* Dashboard cards */
.dashboard-card {
    background: linear-gradient(135deg, var(--white), var(--gray-50));
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    transition: all 0.3s ease;
}

.dashboard-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

/* Stats cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.stats-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.stats-card:hover::before {
    transform: scale(1.2);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.75rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: var(--space-md);
    }
    
    .hero-section {
        padding: var(--space-xl) 0;
    }
    
    .hero-section .display-3 {
        font-size: 2rem;
    }
    
    .feature-icon div {
        width: 60px !important;
        height: 60px !important;
    }
    
    .feature-icon i {
        font-size: 1.5rem !important;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}
    margin-right: 10px;
    border-radius: 8px;
}

.hero-logo {
    height: 120px;
    width: auto;
    margin-bottom: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
}

@media (max-width: 768px) {
    .navbar-brand-logo {
        height: 32px;
    }
    
    .hero-logo {
        height: 80px;
        margin-bottom: 15px;
    }
}

/* Table improvements */
.table th {
    border-top: none;
    font-weight: 600;
    background-color: var(--light-color);
}

/* Loading spinner */
.spinner-border {
    color: var(--primary-color);
}

/* Custom alerts */
.alert {
    border-radius: 15px;
    border: none;
}

/* Forum post styling */
.forum-post {
    border-left: 4px solid var(--primary-color);
    margin-bottom: 1.5rem;
}

/* Chart container */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Smooth animations */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

/* Touch-friendly buttons for mobile */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .btn-sm {
        min-height: 36px;
        min-width: 36px;
    }
}

/* Text contrast improvements */
.text-muted {
    color: var(--gray-700) !important;
}

.text-light {
    color: #f8f9fa !important;
}

.text-dark {
    color: #212529 !important;
}

/* Ensure proper contrast on colored backgrounds */
.bg-success .text-muted,
.bg-primary .text-muted,
.bg-info .text-muted,
.bg-warning .text-muted {
    color: rgba(255, 255, 255, 0.9) !important;
}

.bg-light .text-muted {
    color: var(--gray-800) !important;
}

/* Card text improvements */
.card-text {
    color: var(--gray-700);
}

.card .text-muted {
    color: var(--gray-700) !important;
}

/* Alert text improvements */
.alert .text-muted {
    color: var(--gray-800) !important;
}

/* Form text improvements */
.form-text {
    color: var(--gray-700) !important;
}

/* Badge text improvements */
.badge.bg-light {
    color: var(--gray-800) !important;
}

.badge.bg-secondary {
    color: #fff !important;
}

/* Table improvements */
.table td,
.table th {
    color: var(--gray-800);
}

.table .text-muted {
    color: var(--gray-700) !important;
}

/* Dark mode support (improved) */
@media (prefers-color-scheme: dark) {
    .card {
        background-color: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .card-text {
        color: #e2e8f0;
    }
    
    .table {
        color: #e2e8f0;
    }
    
    .table th {
        background-color: #4a5568;
        color: #e2e8f0;
    }
    
    .table td {
        color: #e2e8f0;
    }
    
    .text-muted {
        color: #a0aec0 !important;
    }
}

/* Accessibility improvements */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
    
    .card {
        border: 2px solid #000;
    }
}

/* 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;
    }
}

/* Additional text contrast improvements */
.small, small {
    color: var(--gray-700) !important;
}

/* Dashboard stats cards text */
.card-text {
    color: var(--gray-700) !important;
}

/* Override inline styles with better contrast */
[style*="color: #6c757d"] {
    color: var(--gray-700) !important;
}

[style*="color:#6c757d"] {
    color: var(--gray-700) !important;
}

/* Improve bootstrap utility classes */
.text-secondary {
    color: var(--gray-700) !important;
}

/* List items and bullets */
ul, ol {
    color: var(--gray-700);
}

li {
    color: var(--gray-700);
}

/* Improve dropdown text */
.dropdown-item {
    color: var(--gray-800);
}

.dropdown-item:hover {
    color: var(--gray-900);
}

/* Improve nav text */
.navbar-nav .nav-link {
    color: var(--gray-700) !important;
}

.navbar-nav .nav-link:hover {
    color: var(--gray-900) !important;
}

/* Improve button text contrast */
.btn-light {
    color: var(--gray-800) !important;
}

.btn-outline-secondary {
    color: var(--gray-800) !important;
    border-color: var(--gray-400) !important;
}

/* Force outline primary button text to be blue */
.btn-outline-primary,
.navbar .btn-outline-primary,
.header .btn-outline-primary,
nav .btn-outline-primary,
.container .btn-outline-primary {
    color: var(--primary-color) !important;
}

.btn-outline-primary:hover,
.navbar .btn-outline-primary:hover,
.header .btn-outline-primary:hover,
nav .btn-outline-primary:hover,
.container .btn-outline-primary:hover {
    color: var(--white) !important;
}

/* Calendar page styling */
.calendar-section,
.calendar-section *,
.booking-section,
.booking-section *,
.service-selection,
.service-selection *,
.calendar-form,
.calendar-form *,
.service-card,
.service-card *,
.calendar-table,
.calendar-table *,
.calendar-view,
.calendar-view * {
    color: var(--white) !important;
}

/* Calendar form labels and text */
.calendar-section .form-label,
.calendar-section label,
.booking-section .form-label,
.booking-section label {
    color: var(--white) !important;
}

.calendar-section p,
.calendar-section span,
.calendar-section div:not(.form-control):not(.btn),
.booking-section p,
.booking-section span,
.booking-section div:not(.form-control):not(.btn) {
    color: var(--white) !important;
}

/* Service cards */
.service-card .card-title,
.service-card .card-text,
.service-card h5,
.service-card p {
    color: var(--white) !important;
}

/* Calendar table headers */
.calendar-table th,
.calendar-table td {
    color: var(--white) !important;
}

/* Calendar notes and descriptions */
.calendar-section .text-muted,
.booking-section .text-muted,
.calendar-section small,
.booking-section small {
    color: var(--white) !important;
}

/* Force all calendar text to white */
.calendar-section .text-secondary,
.calendar-section .text-dark,
.calendar-section .text-muted,
.booking-section .text-secondary,
.booking-section .text-dark,
.booking-section .text-muted {
    color: var(--white) !important;
}

/* Calendar specific elements */
#calendar-view .text-muted,
#calendar-view small,
#calendar-view p {
    color: var(--white) !important;
}

/* Service information section */
.card-body h6,
.card-body small,
.card-body .text-muted {
    color: var(--white) !important;
}

/* Calendar days headers */
.row.text-center .col small {
    color: var(--white) !important;
}

/* Calendar view text */
.mt-3.text-center.text-muted p,
.mt-3.text-center.text-muted small {
    color: var(--white) !important;
}

/* Calendar form labels - more specific selectors */
.card .card-body .form-label,
.card .card-body label,
.card-body .form-label,
.card-body label {
    color: var(--white) !important;
}

/* Keep table text dark for readability on white background */
.table,
.table th,
.table td,
.table tbody,
.table thead {
    color: var(--gray-800) !important;
}

.table .text-muted {
    color: var(--gray-600) !important;
}

/* Dashboard recent activity sections */
.card-body .border-bottom p,
.card-body .border-bottom .mb-1 {
    color: var(--white) !important;
}

/* Recent workouts and meals text */
.card-body .border-bottom,
.card-body .border-bottom * {
    color: var(--white) !important;
}

/* Keep small text readable but still white */
.card-body .border-bottom small {
    color: var(--gray-300) !important;
}

/* Remove gradients from calendar page cards - target the page containing form fields */
.calendar-page .card:not(.bg-warning),
.calendar-page .card-body,
.calendar-page .card-header {
    background: var(--white) !important;
    background-image: none !important;
}

/* Specific override for calendar form container */
body .card .form-label + .form-select,
body .card .form-label + .form-control {
    background-color: var(--white) !important;
}

/* Remove any gradient backgrounds from calendar cards */
.calendar-section .card,
.booking-section .card,
.calendar-section .card-body,
.booking-section .card-body,
.calendar-section .card-header,
.booking-section .card-header {
    background: var(--white) !important;
    background-image: none !important;
}

/* Force calendar page cards to have white background - override any theme defaults */
body[class*="calendar"] .card:not(.bg-warning):not(.bg-primary):not(.bg-success):not(.bg-danger),
body[class*="calendar"] .card:not(.bg-warning):not(.bg-primary):not(.bg-success):not(.bg-danger) .card-body,
body[class*="calendar"] .card:not(.bg-warning):not(.bg-primary):not(.bg-success):not(.bg-danger) .card-header {
    background: var(--white) !important;
    background-image: none !important;
}

/* Calendar page form labels - force black text in dark mode with maximum specificity */
html[data-theme="dark"] .card .form-label,
html[data-theme="dark"] .card-body .form-label,
html[data-theme="dark"] .col-md-6 .form-label,
html[data-theme="dark"] label.form-label,
html[data-theme="dark"] body label.form-label {
    color: #212529 !important;
}

/* Exception: "Notas (opcional)" should stay white */
html[data-theme="dark"] .mb-3 label[for="notes"],
html[data-theme="dark"] label[for="notes"].form-label {
    color: #ffffff !important;
}

/* Keep form inputs readable */
.calendar-section .form-control,
.calendar-section .form-select,
.booking-section .form-control,
.booking-section .form-select {
    color: var(--gray-800) !important;
    background-color: var(--white) !important;
}

/* Gallery page styling */
.gallery-section,
.gallery-section *,
.content-gallery,
.content-gallery *,
.gallery-grid,
.gallery-grid *,
.empty-state,
.empty-state *,
.no-content,
.no-content * {
    color: var(--white) !important;
}

/* Gallery empty state messages */
.gallery-section .text-center,
.gallery-section .text-muted,
.content-gallery .text-center,
.content-gallery .text-muted {
    color: var(--white) !important;
}

.gallery-section p,
.gallery-section h1,
.gallery-section h2,
.gallery-section h3,
.gallery-section h4,
.gallery-section h5,
.gallery-section h6,
.content-gallery p,
.content-gallery h1,
.content-gallery h2,
.content-gallery h3,
.content-gallery h4,
.content-gallery h5,
.content-gallery h6 {
    color: var(--white) !important;
}

/* Gallery content cards when they exist */
.gallery-section .card-title,
.gallery-section .card-text,
.content-gallery .card-title,
.content-gallery .card-text {
    color: var(--white) !important;
}

/* Forum page styling */
.forum-section,
.forum-section *,
.forum-posts,
.forum-posts *,
.forum-form,
.forum-form *,
.forum-post,
.forum-post *,
.post-meta,
.post-meta *,
.forum-content,
.forum-content * {
    color: var(--white) !important;
}

/* Forum form labels */
.forum-section .form-label,
.forum-section label,
.forum-form .form-label,
.forum-form label {
    color: var(--white) !important;
}

/* Forum post elements */
.forum-post .card-title,
.forum-post .card-text,
.forum-post .post-author,
.forum-post .post-date,
.forum-section .post-meta,
.forum-section .text-muted {
    color: var(--white) !important;
}

/* Forum post metadata (author and date) */
.forum-post .small,
.forum-section small,
.post-meta small,
.author-date,
.post-timestamp {
    color: var(--gray-300) !important;
}

/* Forum headings and content */
.forum-section h1,
.forum-section h2,
.forum-section h3,
.forum-section h4,
.forum-section h5,
.forum-section h6,
.forum-section p {
    color: var(--white) !important;
}

/* Keep forum form inputs readable */
.forum-section .form-control,
.forum-section textarea,
.forum-form .form-control,
.forum-form textarea {
    color: var(--gray-600) !important;
    background-color: var(--white) !important;
}

/* Login page styling */
.login-section,
.login-section *,
.login-form,
.login-form *,
.auth-form,
.auth-form *,
.login-container,
.login-container * {
    color: var(--white) !important;
}

/* Login form labels */
.login-section .form-label,
.login-section label,
.login-form .form-label,
.login-form label,
.auth-form .form-label,
.auth-form label {
    color: var(--white) !important;
}

/* Login page headings and text */
.login-section h1,
.login-section h2,
.login-section h3,
.login-section h4,
.login-section h5,
.login-section h6,
.login-section p {
    color: var(--white) !important;
}

/* Keep login form inputs readable */
.login-section .form-control,
.login-form .form-control,
.auth-form .form-control {
    color: var(--gray-800) !important;
    background-color: var(--white) !important;
}

/* Improve lead text */
.lead {
    color: var(--gray-700);
}

/* Improve description text */
.description, .desc {
    color: var(--gray-700);
}

/* Improve help text */
.help-text, .help-block {
    color: var(--gray-700) !important;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Print styles */
@media print {
    .navbar, .btn, .footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* Store-specific styles */
.store-section {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-900) 100%);
    color: var(--white);
    min-height: 100vh;
    padding: 2rem 0;
}

.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15) !important;
}

.product-image {
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-image:hover {
    transform: scale(1.05);
}

.product-image-placeholder {
    height: 250px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.cart-indicator {
    position: relative;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.price-tag {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--primary-color);
}

.category-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Store admin styles */
.admin-stats-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    border: none;
    transition: transform 0.2s ease;
}

.admin-stats-card:hover {
    transform: translateY(-2px);
}

.product-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 0.375rem;
}

.order-status-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
}

/* Cart floating button */
.cart-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    border-radius: 50px;
    padding: 15px 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.cart-floating:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0,0,0,0.3);
}

/* Payment security indicator */
.payment-security {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Success animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.success-icon {
    animation: bounce 1s ease-in-out;
}

/* Mobile store responsiveness */
@media (max-width: 768px) {
    .cart-floating {
        bottom: 10px;
        right: 10px;
        padding: 10px 15px;
    }
    
    .product-image {
        height: 200px;
    }
    
    .product-image-placeholder {
        height: 200px;
    }
}

/* Advantages section styling */
.advantages-section {
    position: relative;
    overflow: hidden;
}

.advantages-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.03)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}

.advantages-section .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
}

.advantages-section .card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.05) 100%);
    pointer-events: none;
}

.advantages-section .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3) !important;
}

.advantages-section .card-body {
    position: relative;
    z-index: 1;
}

.advantages-section .card-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.advantages-section .card-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.advantages-section .list-unstyled li {
    font-size: 0.95rem;
    line-height: 1.5;
    padding: 0.3rem 0;
    transition: color 0.2s ease;
}

.advantages-section .list-unstyled li:hover {
    color: var(--white) !important;
}

.advantages-section .fa-check {
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

/* Call to action styling */
.advantages-section .btn {
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.advantages-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.advantages-section .btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-color: var(--primary-color);
}

.advantages-section .btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.3);
    color: var(--white);
}

/* Responsive adjustments for advantages */
@media (max-width: 768px) {
    .advantages-section .card-body {
        padding: 2rem 1.5rem;
    }
    
    .advantages-section .card-title {
        font-size: 1.2rem;
    }
    
    .advantages-section .card-text {
        font-size: 0.9rem;
    }
    
    .advantages-section .btn-lg {
        font-size: 1rem;
        padding: 0.75rem 2rem;
    }
}

/* Product price styling */
.product-price {
    color: white !important;
    font-weight: bold;
}
