/* Dark Mode Theme Stylesheet */

:root {
    /* Light Mode (Default) */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;
    --bg-hover: #e5e7eb;

    --text-primary: #000000;
    --text-secondary: #374151;
    --text-tertiary: #6b7280;
    --text-light: #9ca3af;

    --border-color: #e5e7eb;
    --border-light: #f3f4f6;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);

    --nav-pill-bg: rgba(255, 255, 255, 0.95);
    --nav-pill-border: rgba(229, 231, 235, 0.5);
    --nav-pill-text: #374151;

    --dropdown-bg: #ffffff;
    --dropdown-border: #e5e7eb;
    --dropdown-text: #374151;
    --dropdown-hover: #f9fafb;

    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-text: #111827;
    --input-placeholder: #9ca3af;

    --footer-bg: linear-gradient(to right, #1f2937, #111827);
    --footer-text: #ffffff;
    --footer-text-secondary: #d1d5db;
}

html[data-theme="dark"] {
    /* Dark Mode with Refined Orange Accent */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --bg-hover: #3a3a3a;

    --text-primary: #FF9F1C;
    --text-secondary: #FFB84D;
    --text-tertiary: #FFD580;
    --text-light: #FFDBAA;

    --border-color: #333333;
    --border-light: #1f1f1f;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.7);

    --nav-pill-bg: rgba(20, 20, 20, 0.95);
    --nav-pill-border: rgba(51, 51, 51, 0.5);
    --nav-pill-text: #FF9F1C;

    --dropdown-bg: #1a1a1a;
    --dropdown-border: #333333;
    --dropdown-text: #FF9F1C;
    --dropdown-hover: #2a2a2a;

    --input-bg: #1a1a1a;
    --input-border: #404040;
    --input-text: #e5e7eb;
    --input-placeholder: #6b7280;

    --footer-bg: #111111;
    --footer-text: #e5e7eb;
    --footer-text-secondary: #9ca3af;
}

/* Body and Main Elements */
html[data-theme="dark"] body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

html[data-theme="dark"] body {
    scrollbar-color: #FF9F1C #1a1a1a;
}

body {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navigation Bar */
html[data-theme="dark"] .nav-pill {
    background-color: var(--nav-pill-bg);
    border-color: var(--nav-pill-border);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
}

html[data-theme="dark"] .nav-pill:hover {
    box-shadow: 0 10px 15px -3px rgba(255, 159, 28, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .nav-center-pill {
    background-color: var(--nav-pill-bg);
    border-color: var(--nav-pill-border);
}

html[data-theme="dark"] .nav-center-pill a {
    color: #FF9F1C;
    transition: all 0.2s ease;
}

html[data-theme="dark"] .nav-center-pill a:hover {
    background-color: rgba(255, 159, 28, 0.1);
    color: #FFB84D;
}

html[data-theme="dark"] .user-pill {
    background-color: var(--nav-pill-bg);
    border-color: var(--nav-pill-border);
}

html[data-theme="dark"] .nav-pill a,
html[data-theme="dark"] .nav-center-pill a,
html[data-theme="dark"] .user-pill {
    color: var(--nav-pill-text);
}

/* Text Colors in Navigation */
html[data-theme="dark"] .nav-pill span,
html[data-theme="dark"] .nav-center-pill span,
html[data-theme="dark"] .user-pill span {
    color: var(--text-primary) !important;
}

/* Logo text color in dark mode */
html[data-theme="dark"] .nav-pill span.text-gray-900 {
    color: #FF9F1C !important;
}

html[data-theme="dark"] nav a {
    color: #FF9F1C;
    transition: all 0.2s ease;
}

html[data-theme="dark"] nav a:hover {
    color: #FFB84D;
}

/* Dropdown Menu */
html[data-theme="dark"] .dropdown-menu {
    background-color: var(--dropdown-bg);
    border-color: var(--dropdown-border);
}

html[data-theme="dark"] .dropdown-menu .p-4 {
    border-bottom-color: var(--border-color);
}

html[data-theme="dark"] .dropdown-menu .border-t {
    border-top-color: var(--border-color);
}

html[data-theme="dark"] .dropdown-menu a {
    color: var(--dropdown-text);
}

html[data-theme="dark"] .dropdown-menu a:hover {
    background-color: var(--dropdown-hover);
}

html[data-theme="dark"] .dropdown-menu .p-4 p {
    color: var(--text-primary);
}

html[data-theme="dark"] .dropdown-menu .p-4 p.text-xs {
    color: var(--text-tertiary);
}

/* Mobile Navigation */
html[data-theme="dark"] #mobileMenu {
    /* background-color: var(--bg-secondary) !important;
    border-bottom-color: var(--border-color) !important; */
}

html[data-theme="dark"] .md\\:hidden a {
    color: var(--text-secondary);
}

/* Mobile Navbar Header */
/* html[data-theme="dark"] nav.floating-nav {
    background-color: var(--bg-primary) !important;
}

html[data-theme="dark"] .md\\:hidden > div {
    background-color: var(--bg-primary) !important;
} */

/* Mobile navbar text */
html[data-theme="dark"] .md\\:hidden span.text-gray-900,
html[data-theme="dark"] .md\\:hidden span.font-light {
    color: #FF9F1C !important;
}

/* Mobile menu items */
html[data-theme="dark"] #mobileMenu a {
    color: var(--text-primary);
}

html[data-theme="dark"] #mobileMenu a:hover {
    background-color: var(--bg-tertiary);
}

html[data-theme="dark"] #mobileMenu i {
    color: #FF9F1C !important;
}

html[data-theme="dark"] #mobileMenu .text-xs {
    color: var(--text-tertiary);
}

html[data-theme="dark"] #mobileMenu .border-t {
    border-top-color: var(--border-color);
}

/* Mobile Bottom Navigation */
html[data-theme="dark"] .fixed.bottom-0 {
    background-color: var(--bg-secondary) !important;
    border-top-color: var(--border-color) !important;
}

html[data-theme="dark"] .fixed.bottom-0 a {
    color: var(--text-secondary);
}

html[data-theme="dark"] .fixed.bottom-0 a:hover {
    background-color: var(--bg-tertiary);
}

html[data-theme="dark"] .fixed.bottom-0 i {
    color: #FF9F1C !important;
}

html[data-theme="dark"] .fixed.bottom-0 span {
    color: var(--text-secondary) !important;
}

/* Hamburger menu icon */
html[data-theme="dark"] #hamburger-icon,
html[data-theme="dark"] #close-icon {
    color: #FF9F1C !important;
}

/* Main Content */
html[data-theme="dark"] main {
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

/* Cards and Containers */
html[data-theme="dark"] .bg-white {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .bg-white.rounded-2xl,
html[data-theme="dark"] .bg-white.rounded-xl {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .bg-gray-50,
html[data-theme="dark"] .bg-gray-100 {
    background-color: var(--bg-tertiary);
}

/* Override gradient backgrounds in dark mode */
html[data-theme="dark"] .bg-gradient-to-br {
    background: linear-gradient(to bottom right, var(--bg-primary), var(--bg-secondary)) !important;
}

/* Override specific light gradient colors used in templates */
html[data-theme="dark"] .from-slate-50,
html[data-theme="dark"] .via-blue-50,
html[data-theme="dark"] .to-indigo-50 {
    --tw-gradient-from: var(--bg-primary) !important;
    --tw-gradient-via: var(--bg-primary) !important;
    --tw-gradient-to: var(--bg-secondary) !important;
}

html[data-theme="dark"] .border {
    border-color: var(--border-color);
}

html[data-theme="dark"] .border-gray-200,
html[data-theme="dark"] .border-gray-300 {
    border-color: var(--border-color);
}

/* Forms and Inputs */
html[data-theme="dark"] input,
html[data-theme="dark"] textarea,
html[data-theme="dark"] select {
    background-color: var(--input-bg);
    color: var(--input-text);
    border-color: var(--input-border);
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: var(--input-placeholder);
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] select:focus {
    background-color: var(--input-bg);
    border-color: #FF9F1C;
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.1);
}

/* Text Styling */
html[data-theme="dark"] .text-gray-900,
html[data-theme="dark"] .text-gray-800,
html[data-theme="dark"] .text-gray-700 {
    color: var(--text-primary) !important;
}

html[data-theme="dark"] .text-gray-600,
html[data-theme="dark"] .text-gray-500 {
    color: var(--text-secondary);
}

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

/* Buttons */
html[data-theme="dark"] button {
    transition: background-color 0.2s ease, color 0.2s ease;
}

html[data-theme="dark"] .bg-ocean,
html[data-theme="dark"] .bg-navy {
    background-color: #2a2a2a;
    color: #FF9F1C;
    border: 1px solid #404040;
}

html[data-theme="dark"] .bg-ocean:hover,
html[data-theme="dark"] .bg-navy:hover {
    background-color: #3a3a3a;
    color: #FFB84D;
    border-color: #505050;
}

/* Footer */
html[data-theme="dark"] footer {
    background-color: var(--footer-bg) !important;
    background-image: none !important;
    background: var(--footer-bg) !important;
    color: var(--footer-text) !important;
}

html[data-theme="dark"] footer.bg-gradient-to-r {
    background-color: var(--footer-bg) !important;
    background-image: none !important;
    background: var(--footer-bg) !important;
}

html[data-theme="dark"] footer.from-gray-800,
html[data-theme="dark"] footer.to-gray-900 {
    --tw-gradient-from: transparent !important;
    --tw-gradient-to: transparent !important;
    --tw-gradient-stops: transparent !important;
}

html[data-theme="dark"] footer h3,
html[data-theme="dark"] footer h4 {
    color: #ffffff;
}

html[data-theme="dark"] footer p {
    color: var(--footer-text);
}

html[data-theme="dark"] footer .text-white {
    color: #ffffff;
}

html[data-theme="dark"] footer .text-gray-300,
html[data-theme="dark"] footer .text-gray-400 {
    color: var(--footer-text);
}

html[data-theme="dark"] footer a {
    color: var(--footer-text);
    transition: color 0.2s ease;
}

html[data-theme="dark"] footer a:hover {
    color: #FF9F1C;
}

html[data-theme="dark"] footer .text-ocean {
    color: #FF9F1C;
}

html[data-theme="dark"] footer .border-gray-700 {
    border-color: #333333;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background-color: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-tertiary);
    box-shadow: var(--shadow-md);
}

html[data-theme="dark"] .theme-toggle-btn {
    border-color: var(--nav-pill-border);
    background-color: transparent;
}

html[data-theme="dark"] .theme-toggle-btn:hover {
    background-color: var(--bg-tertiary);
    box-shadow: 0 4px 6px -1px rgba(255, 159, 28, 0.1);
}

/* Active States */
 html[data-theme="dark"] .nav-link-active {
        background-color: transparent !important;
}
@media (max-width: 768px) {
    html[data-theme="dark"] .nav-link-active {
        background-color: #FF9F1C;
        color: #000000;
    }
}

html[data-theme="dark"] .bg-gray-200 {
    background-color: #2a2a2a;
}

/* Custom Scrollbar */
html[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

html[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1a1a1a;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #FF9F1C;
    border-radius: 4px;
}

html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #FFB84D;
}

/* Toasts and Alerts */
html[data-theme="dark"] .bg-blue-500 {
    background-color: #FF9F1C;
}

html[data-theme="dark"] .bg-green-500 {
    background-color: #00d084;
}

html[data-theme="dark"] .bg-red-500 {
    background-color: #ff6b6b;
}

html[data-theme="dark"] .bg-yellow-500 {
    background-color: #ffd93d;
}

/* Subtle Colors */
html[data-theme="dark"] .bg-sky {
    background-color: rgba(255, 159, 28, 0.1);
}

html[data-theme="dark"] .text-sky {
    color: #FF9F1C;
}

/* Tab Highlight on Mobile */
html[data-theme="dark"] * {
    -webkit-tap-highlight-color: rgba(255, 159, 28, 0.1);
}

/* Transition Smoothness */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Make sure dark mode works with existing Tailwind classes - exclude footer */
/* html[data-theme="dark"] .bg-gradient-to-r:not(a) {
    background-image: linear-gradient(to right, #FF9F1C, #FF8C1A);
} */

html[data-theme="dark"] .bg-gradient-to-r {
    background-image: linear-gradient(to right, #2a2a2a, #1a1a1a);
}


html[data-theme="dark"] span.bg-gradient-to-r{
	background-image: none !important;
}

/* Override gradient on footer specifically */
html[data-theme="dark"] footer.bg-gradient-to-r {
    background-image: none !important;
    background: var(--footer-bg) !important;
}

html[data-theme="dark"] .hover\\:bg-gray-50:hover {
    background-color: var(--bg-tertiary);
}

html[data-theme="dark"] .hover\\:bg-gray-100:hover {
    background-color: var(--bg-hover);
}

/* Links */
html[data-theme="dark"] a:not(.bg-gradient-to-r) {
    color: #FF9F1C;
    transition: color 0.2s ease;
}

html[data-theme="dark"] a:hover {
    color: #FFB84D;
}

/* FOOTER FIX - Override all gradient styles on footer */
html[data-theme="dark"] footer {
    background-color: var(--footer-bg) !important;
    background-image: none !important;
}

html[data-theme="dark"] footer.bg-gradient-to-r {
    background-color: var(--footer-bg) !important;
    background-image: none !important;
    --tw-gradient-from: transparent !important;
    --tw-gradient-to: transparent !important;
}

/* IPM Schedule - Day Cards */
html[data-theme="dark"] .day-card {
    transition: all 0.3s ease;
}

html[data-theme="dark"] .day-card.bg-amber-50 {
    background-color: rgba(245, 158, 11, 0.15) !important;
}

html[data-theme="dark"] .day-card.border-amber-200 {
    border-color: rgba(245, 158, 11, 0.4);
}

html[data-theme="dark"] .day-card:hover.border-amber-300 {
    border-color: rgba(245, 158, 11, 0.6);
}

html[data-theme="dark"] .bg-amber-100 {
    background-color: rgba(245, 158, 11, 0.25);
}

html[data-theme="dark"] .text-amber-800 {
    color: #fcd34d;
}

html[data-theme="dark"] .border-amber-300 {
    border-color: rgba(245, 158, 11, 0.4);
}

html[data-theme="dark"] .bg-red-900\/20 {
    background-color: rgba(220, 38, 38, 0.15) !important;
}

html[data-theme="dark"] .border-red-700 {
    border-color: rgba(220, 38, 38, 0.4);
}

html[data-theme="dark"] .text-red-200 {
    color: #fca5a5;
}

html[data-theme="dark"] .border-red-600 {
    border-color: rgba(220, 38, 38, 0.5);
}

/* Amber colors for IPM warnings */
html[data-theme="dark"] .bg-amber-50 {
    background-color: rgba(251, 191, 36, 0.1);
}

html[data-theme="dark"] .bg-amber-100 {
    background-color: rgba(251, 191, 36, 0.2);
}

html[data-theme="dark"] .border-amber-200 {
    border-color: rgba(251, 191, 36, 0.3);
}

html[data-theme="dark"] .text-amber-600 {
    color: #fbbf24;
}

html[data-theme="dark"] .text-amber-700 {
    color: #fbbf24;
}

html[data-theme="dark"] .text-amber-800 {
    color: #fcd34d;
}

html[data-theme="dark"] .bg-amber-500 {
    background-color: #f59e0b;
}

html[data-theme="dark"] .bg-amber-600 {
    background-color: #d97706;
}

html[data-theme="dark"] .bg-amber-800 {
    background-color: rgba(251, 191, 36, 0.3);
}

html[data-theme="dark"] .text-amber-300 {
    color: #fcd34d;
}

html[data-theme="dark"] .text-amber-400 {
    color: #fbbf24;
}

html[data-theme="dark"] .border-amber-700 {
    border-color: rgba(251, 191, 36, 0.4);
}

html[data-theme="dark"] .bg-amber-900\/20 {
    background-color: rgba(251, 191, 36, 0.1);
}

/* Blue colors for info */
html[data-theme="dark"] .bg-blue-50 {
    background-color: rgba(59, 130, 246, 0.1);
}

html[data-theme="dark"] .bg-blue-100 {
    background-color: rgba(59, 130, 246, 0.2);
}

html[data-theme="dark"] .border-blue-200 {
    border-color: rgba(59, 130, 246, 0.3);
}

html[data-theme="dark"] .text-blue-600 {
    color: #60a5fa;
}

html[data-theme="dark"] .text-blue-700 {
    color: #60a5fa;
}

html[data-theme="dark"] .text-blue-800 {
    color: #93c5fd;
}

html[data-theme="dark"] .bg-blue-800 {
    background-color: rgba(59, 130, 246, 0.3);
}

html[data-theme="dark"] .text-blue-300 {
    color: #93c5fd;
}

html[data-theme="dark"] .text-blue-400 {
    color: #60a5fa;
}

html[data-theme="dark"] .border-blue-700 {
    border-color: rgba(59, 130, 246, 0.4);
}

html[data-theme="dark"] .bg-blue-900\/20 {
    background-color: rgba(59, 130, 246, 0.1);
}

/* Green colors for success */
html[data-theme="dark"] .text-green-600 {
    color: #4ade80;
}

html[data-theme="dark"] .text-green-400 {
    color: #4ade80;
}

/* Form Labels */
html[data-theme="dark"] label {
    color: var(--text-primary);
}

html[data-theme="dark"] .form-label {
    color: var(--text-primary);
}

/* Crispy Forms styling */
html[data-theme="dark"] .form-control {
    background-color: var(--input-bg) !important;
    color: var(--input-text) !important;
    border-color: var(--input-border) !important;
}

html[data-theme="dark"] .form-control:focus {
    background-color: var(--input-bg) !important;
    border-color: #FF9F1C !important;
    box-shadow: 0 0 0 3px rgba(255, 159, 28, 0.1) !important;
}

html[data-theme="dark"] .form-select {
    background-color: var(--input-bg) !important;
    color: var(--input-text) !important;
    border-color: var(--input-border) !important;
}

/* Card hover states */
html[data-theme="dark"] .hover\\:shadow-lg:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* Modal dialogs */
html[data-theme="dark"] .modal-content {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
}

/* Pill badges */
html[data-theme="dark"] .rounded-full.bg-gray-100 {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Secondary buttons */
html[data-theme="dark"] .bg-gray-100,
html[data-theme="dark"] .bg-gray-200 {
    background-color: var(--bg-tertiary);
}

html[data-theme="dark"] .hover\\:bg-gray-200:hover {
    background-color: var(--bg-hover);
}

/* Primary text colors - ensure readability */
html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] h5,
html[data-theme="dark"] h6 {
    color: var(--text-primary);
}

/* Table styling */
html[data-theme="dark"] table {
    border-color: var(--border-color);
}

html[data-theme="dark"] th {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

html[data-theme="dark"] td {
    border-color: var(--border-color);
    color: var(--text-secondary);
}

html[data-theme="dark"] tr:hover {
    background-color: var(--bg-hover);
}

/* Shadow adjustments for dark mode */
html[data-theme="dark"] .shadow,
html[data-theme="dark"] .shadow-md,
html[data-theme="dark"] .shadow-lg {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
}

/* Text on colored backgrounds */
html[data-theme="dark"] .text-white {
    color: #ffffff !important;
}

/* Fix for indigo/purple colored elements */
html[data-theme="dark"] .bg-indigo-50 {
    background-color: rgba(99, 102, 241, 0.1);
}

html[data-theme="dark"] .bg-purple-50 {
    background-color: rgba(168, 85, 247, 0.1);
}

html[data-theme="dark"] .text-indigo-600 {
    color: #818cf8;
}

html[data-theme="dark"] .text-purple-600 {
    color: #c084fc;
}

/* Pink colored elements (marketplace) */
html[data-theme="dark"] .bg-pink-50 {
    background-color: rgba(236, 72, 153, 0.1);
}

html[data-theme="dark"] .text-pink-600 {
    color: #f472b6;
}

/* Cyan colored elements */
html[data-theme="dark"] .bg-cyan-50 {
    background-color: rgba(34, 211, 238, 0.1);
}

html[data-theme="dark"] .text-cyan-600 {
    color: #22d3ee;
}
