* {
    font-family: 'Outfit', sans-serif;
}

/* Dark mode variant support - matches index.css @custom-variant */
/* Tailwind CDN supports class-based dark mode by default */

/* Custom color variables from theme - matches docs/theme/src/index.css */
:root {
    /* Brand colors */
    --color-brand-25: #f2f7ff;
    --color-brand-50: #ecf3ff;
    --color-brand-100: #dde9ff;
    --color-brand-200: #c2d6ff;
    --color-brand-300: #9cb9ff;
    --color-brand-400: #7592ff;
    --color-brand-500: #465fff;
    --color-brand-600: #3641f5;
    --color-brand-700: #2a31d8;
    --color-brand-800: #252dae;
    --color-brand-900: #262e89;
    --color-brand-950: #161950;
    
    /* Gray colors */
    --color-gray-25: #fcfcfd;
    --color-gray-50: #f9fafb;
    --color-gray-100: #f2f4f7;
    --color-gray-200: #e4e7ec;
    --color-gray-300: #d0d5dd;
    --color-gray-400: #98a2b3;
    --color-gray-500: #667085;
    --color-gray-600: #475467;
    --color-gray-700: #344054;
    --color-gray-800: #1d2939;
    --color-gray-900: #101828;
    --color-gray-950: #0c111d;
    
    /* Error colors */
    --color-error-25: #fffbfa;
    --color-error-50: #fef3f2;
    --color-error-100: #fee4e2;
    --color-error-200: #fecdca;
    --color-error-300: #fda29b;
    --color-error-400: #f97066;
    --color-error-500: #f04438;
    --color-error-600: #d92d20;
    --color-error-700: #b42318;
    --color-error-800: #912018;
    --color-error-900: #7a271a;
    --color-error-950: #55160c;
}

/* Smooth transitions for theme changes */
html {
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    background-color: #f9fafb; /* gray-50 */
    transition: background-color 0.3s ease;
}

.dark body {
    background-color: #101828; /* gray-900 from theme */
}

/* Ensure bg-white stays white in light mode */
.bg-white {
    background-color: #ffffff !important;
}

/* Force dark mode gray-900 backgrounds when dark:bg-gray-900 is used */
.dark [class*="dark:bg-gray-900"],
html.dark [class*="dark:bg-gray-900"] {
    background-color: #101828 !important; /* gray-900 */
}

/* When both bg-white and dark:bg-gray-900 are on same element, dark mode should win */
.dark [class*="bg-white"][class*="dark:bg-gray-900"],
.dark .bg-white[class*="dark:bg-gray-900"] {
    background-color: #101828 !important;
}

/* Ensure form area background is white in light mode */
html:not(.dark) .bg-white,
html:not(.dark) [class*="bg-white"]:not([class*="dark:"]) {
    background-color: #ffffff !important;
}

/* Ensure form area background is gray-900 in dark mode */
html.dark [class*="dark:bg-gray-900"],
html.dark .dark\:bg-gray-900 {
    background-color: #101828 !important;
}

/* Specific overrides for form containers */
html:not(.dark) .flex.flex-col.flex-1[class*="bg-white"] {
    background-color: #ffffff !important;
}

html.dark .flex.flex-col.flex-1[class*="dark:bg-gray-900"] {
    background-color: #101828 !important;
}

.dark [class*="dark:bg-white/5"] {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Force dark mode text colors */
.dark [class*="dark:text-white/90"] {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dark [class*="dark:text-white/60"] {
    color: rgba(255, 255, 255, 0.6) !important;
}

.dark [class*="dark:text-gray-400"] {
    color: #98a2b3 !important; /* gray-400 */
}

/* Force dark mode error colors */
.dark [class*="dark:bg-error-500/10"] {
    background-color: rgba(240, 68, 56, 0.1) !important;
}

.dark [class*="dark:border-error-500/20"] {
    border-color: rgba(240, 68, 56, 0.2) !important;
}

.dark [class*="dark:text-error-400"] {
    color: #f97066 !important; /* error-400 */
}

/* Custom color classes - fallback if Tailwind CDN doesn't recognize custom colors */
.bg-brand-950 {
    background-color: #161950 !important;
}

.bg-error-50 {
    background-color: #fef3f2 !important;
}

.border-error-200 {
    border-color: #fecdca !important;
}

.text-error-600 {
    color: #d92d20 !important;
}

/* Light mode text colors - force correct colors from theme */
html:not(.dark) .text-gray-800,
html:not(.dark) [class*="text-gray-800"] {
    color: #1d2939 !important; /* gray-800 from theme */
}

html:not(.dark) .text-gray-900,
html:not(.dark) [class*="text-gray-900"]:not([class*="bg-gray-900"]) {
    color: #101828 !important; /* gray-900 from theme - very dark, almost black */
}

html:not(.dark) .text-gray-950,
html:not(.dark) [class*="text-gray-950"]:not([class*="bg-gray-950"]) {
    color: #0c111d !important; /* gray-950 from theme - darkest, almost black */
}

html:not(.dark) .text-gray-700,
html:not(.dark) [class*="text-gray-700"] {
    color: #344054 !important; /* gray-700 from theme */
}

html:not(.dark) .text-gray-500,
html:not(.dark) [class*="text-gray-500"] {
    color: #667085 !important; /* gray-500 from theme */
}

html:not(.dark) .text-gray-600,
html:not(.dark) [class*="text-gray-600"] {
    color: #475467 !important; /* gray-600 from theme - darker than gray-500 */
}

html:not(.dark) .text-gray-400,
html:not(.dark) [class*="text-gray-400"] {
    color: #98a2b3 !important; /* gray-400 from theme */
}

html:not(.dark) .text-error-600,
html:not(.dark) [class*="text-error-600"] {
    color: #d92d20 !important; /* error-600 from theme */
}

/* Light mode hover text colors */
html:not(.dark) .hover\:text-gray-800:hover,
html:not(.dark) [class*="hover:text-gray-800"]:hover {
    color: #1d2939 !important; /* gray-800 */
}

html:not(.dark) .hover\:text-gray-700:hover,
html:not(.dark) [class*="hover:text-gray-700"]:hover {
    color: #344054 !important; /* gray-700 */
}

/* Light mode button background colors */
html:not(.dark) .bg-gray-100,
html:not(.dark) [class*="bg-gray-100"]:not([class*="dark:"]) {
    background-color: #f2f4f7 !important; /* gray-100 from theme */
}

html:not(.dark) .hover\:bg-gray-200:hover,
html:not(.dark) [class*="hover:bg-gray-200"]:hover {
    background-color: #e4e7ec !important; /* gray-200 from theme */
}

/* Dark mode custom color classes */
.dark .bg-gray-900,
.dark [class*="bg-gray-900"] {
    background-color: #101828 !important;
}

/* Ensure light mode backgrounds stay white */
.bg-white,
[class*="bg-white"]:not([class*="dark:bg-white"]) {
    background-color: #ffffff !important;
}

.dark .bg-white\/5,
.dark [class*="bg-white/5"] {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

.dark .text-white\/90,
.dark [class*="text-white/90"] {
    color: rgba(255, 255, 255, 0.9) !important;
}

.dark .text-white\/60,
.dark [class*="text-white/60"] {
    color: rgba(255, 255, 255, 0.6) !important;
}

.dark .text-gray-400 {
    color: #98a2b3 !important;
}

.dark .bg-error-500\/10,
.dark [class*="bg-error-500/10"] {
    background-color: rgba(240, 68, 56, 0.1) !important;
}

.dark .border-error-500\/20,
.dark [class*="border-error-500/20"] {
    border-color: rgba(240, 68, 56, 0.2) !important;
}

.dark .text-error-400,
.dark [class*="text-error-400"] {
    color: #f97066 !important;
}

/* Custom scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #e4e7ec;
    border-radius: 9999px;
}

.dark .custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #344054;
}

/* Checkbox styles */
.custom-checkbox {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
}

.dark .custom-checkbox {
    border-color: #374151;
}

.custom-checkbox:checked {
    background-color: #465fff;
    border-color: #465fff;
}

.custom-checkbox:checked::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M11.6666 3.5L5.24992 9.91667L2.33325 7' stroke='white' stroke-width='1.94437' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
}

/* Input focus styles are handled by Tailwind classes */

/* Smooth transitions for theme-aware elements */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Override for specific elements that shouldn't transition */
input, textarea, select, button {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
}

/* Theme toggle button smooth transition */
#themeToggle {
    transition: background-color 0.2s ease, transform 0.1s ease;
}

#themeToggle:hover {
    transform: scale(1.05);
}

#themeToggle:active {
    transform: scale(0.95);
}

/* ============================================
   Professional Card Styles - Theme Referenced
   ============================================ */

/* Card Container - Theme shadow values */
.group.rounded-2xl.border.border-gray-200 {
    /* shadow-sm from theme */
    box-shadow: 0px 1px 3px 0px rgba(16, 24, 40, 0.1),
                0px 1px 2px 0px rgba(16, 24, 40, 0.06);
}

.group.rounded-2xl.border.border-gray-200:hover {
    /* shadow-md from theme */
    box-shadow: 0px 4px 8px -2px rgba(16, 24, 40, 0.1),
                0px 2px 4px -2px rgba(16, 24, 40, 0.06);
}

/* Dark mode card backgrounds */
.dark .group.rounded-2xl.border.border-gray-800 {
    background-color: #101828 !important; /* gray-900 */
    border-color: #1d2939 !important; /* gray-800 */
}

.dark .group.rounded-2xl.border.border-gray-800:hover {
    border-color: rgba(70, 95, 255, 0.5) !important; /* brand-500/50 */
}

/* Light mode card backgrounds */
html:not(.dark) .group.rounded-2xl.border.border-gray-200 {
    background-color: #ffffff !important;
    border-color: #e4e7ec !important; /* gray-200 */
}

html:not(.dark) .group.rounded-2xl.border.border-gray-200:hover {
    border-color: rgba(0, 186, 236, 0.6) !important; /* blue-light-500/60 */
}

/* Card hover border colors - Light mode */
html:not(.dark) .group.rounded-2xl.border.border-gray-200:hover.border-blue-light-300 {
    border-color: #7cd4fd !important; /* blue-light-300 */
}

html:not(.dark) .group.rounded-2xl.border.border-gray-200:hover.border-success-300 {
    border-color: #6ce9a6 !important; /* success-300 */
}

html:not(.dark) .group.rounded-2xl.border.border-gray-200:hover.border-orange-300 {
    border-color: #feb273 !important; /* orange-300 */
}

/* Card hover border colors - Dark mode */
.dark .group.rounded-2xl.border.border-gray-800:hover.border-blue-light-500\/50 {
    border-color: rgba(11, 165, 236, 0.5) !important; /* blue-light-500/50 */
}

.dark .group.rounded-2xl.border.border-gray-800:hover.border-success-500\/50 {
    border-color: rgba(18, 183, 106, 0.5) !important; /* success-500/50 */
}

.dark .group.rounded-2xl.border.border-gray-800:hover.border-orange-500\/50 {
    border-color: rgba(251, 101, 20, 0.5) !important; /* orange-500/50 */
}

/* Icon container backgrounds - Light mode */
html:not(.dark) .bg-blue-light-50 {
    background-color: #f0f9ff !important; /* blue-light-50 */
}

html:not(.dark) .bg-blue-light-100 {
    background-color: #e0f2fe !important; /* blue-light-100 */
}

html:not(.dark) .bg-success-50 {
    background-color: #ecfdf3 !important; /* success-50 */
}

html:not(.dark) .bg-success-100 {
    background-color: #d1fadf !important; /* success-100 */
}

html:not(.dark) .bg-orange-50 {
    background-color: #fff6ed !important; /* orange-50 */
}

html:not(.dark) .bg-orange-100 {
    background-color: #ffead5 !important; /* orange-100 */
}

/* Icon container backgrounds - Dark mode */
.dark .bg-blue-light-500\/10 {
    background-color: rgba(11, 165, 236, 0.1) !important;
}

.dark .bg-blue-light-500\/20 {
    background-color: rgba(11, 165, 236, 0.2) !important;
}

.dark .bg-success-500\/10 {
    background-color: rgba(18, 183, 106, 0.1) !important;
}

.dark .bg-success-500\/20 {
    background-color: rgba(18, 183, 106, 0.2) !important;
}

.dark .bg-orange-500\/10 {
    background-color: rgba(251, 101, 20, 0.1) !important;
}

.dark .bg-orange-500\/20 {
    background-color: rgba(251, 101, 20, 0.2) !important;
}

/* Icon colors - Light mode */
html:not(.dark) .text-blue-light-600 {
    color: #0ba5ec !important; /* blue-light-600 */
}

html:not(.dark) .text-blue-light-700 {
    color: #026aa2 !important; /* blue-light-700 */
}

html:not(.dark) .text-success-600 {
    color: #039855 !important; /* success-600 */
}

html:not(.dark) .text-success-700 {
    color: #027a48 !important; /* success-700 */
}

html:not(.dark) .text-orange-600 {
    color: #ec4a0a !important; /* orange-600 */
}

html:not(.dark) .text-orange-700 {
    color: #c4320a !important; /* orange-700 */
}

/* Icon colors - Dark mode */
.dark .text-blue-light-400 {
    color: #36bffa !important; /* blue-light-400 */
}

.dark .text-blue-light-300 {
    color: #7cd4fd !important; /* blue-light-300 */
}

.dark .text-success-400 {
    color: #32d583 !important; /* success-400 */
}

.dark .text-success-300 {
    color: #6ce9a6 !important; /* success-300 */
}

.dark .text-orange-400 {
    color: #fd853a !important; /* orange-400 */
}

.dark .text-orange-300 {
    color: #feb273 !important; /* orange-300 */
}

/* Card title hover colors - Light mode */
html:not(.dark) .group:hover .text-blue-light-600 {
    color: #0ba5ec !important; /* blue-light-600 */
}

html:not(.dark) .group:hover .text-success-600 {
    color: #039855 !important; /* success-600 */
}

html:not(.dark) .group:hover .text-orange-600 {
    color: #ec4a0a !important; /* orange-600 */
}

/* Card title hover colors - Dark mode */
.dark .group:hover .text-blue-light-400 {
    color: #36bffa !important; /* blue-light-400 */
}

.dark .group:hover .text-success-400 {
    color: #32d583 !important; /* success-400 */
}

.dark .group:hover .text-orange-400 {
    color: #fd853a !important; /* orange-400 */
}

/* Arrow icon hover colors - Light mode */
html:not(.dark) .group:hover .text-blue-light-600 svg {
    color: #0ba5ec !important;
}

html:not(.dark) .group:hover .text-success-600 svg {
    color: #039855 !important;
}

html:not(.dark) .group:hover .text-orange-600 svg {
    color: #ec4a0a !important;
}

/* Arrow icon hover colors - Dark mode */
.dark .group:hover .text-blue-light-400 svg {
    color: #36bffa !important;
}

.dark .group:hover .text-success-400 svg {
    color: #32d583 !important;
}

.dark .group:hover .text-orange-400 svg {
    color: #fd853a !important;
}

/* Smooth card transitions */
.group.rounded-2xl {
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

/* Card hover transform - subtle lift */
.group.rounded-2xl:hover {
    transform: translateY(-2px);
}

/* Focus ring styles */
.group.rounded-2xl:focus {
    outline: none;
    box-shadow: 0px 0px 0px 4px rgba(70, 95, 255, 0.12) !important; /* shadow-focus-ring */
}

/* Dark mode focus ring */
.dark .group.rounded-2xl:focus {
    box-shadow: 0px 0px 0px 4px rgba(70, 95, 255, 0.2) !important;
}

/* ============================================
   Theme Toggle Button Icon Visibility
   ============================================ */

/* Sun icon - visible in dark mode */
#themeToggle .sun-icon {
    display: none;
}

.dark #themeToggle .sun-icon {
    display: block !important;
}

.dark #themeToggle .moon-icon {
    display: none !important;
}

/* Moon icon - visible in light mode */
#themeToggle .moon-icon {
    display: block;
}

html:not(.dark) #themeToggle .moon-icon {
    display: block !important;
}

html:not(.dark) #themeToggle .sun-icon {
    display: none !important;
}
