/* CodePilot - Custom Styles — Light Theme (DP Brand) */

/* DP Brand Colors:
   --primary-blue: #2E7CE4
   --secondary-blue: #1E5BB8
   --light-blue: #E8F2FF
   --dark-blue: #1A4A8C
   --text-dark: #2C3E50
   --text-light: #6C7B7F
   --light-gray: #F8F9FA
   --accent-orange: #FF6B35
*/

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

/* Custom scrollbar (light) */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #E8F2FF;
}

::-webkit-scrollbar-thumb {
    background: #a8c8f0;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2E7CE4;
}

/* Focus styles */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(46, 124, 228, 0.4);
}

/* Transition defaults */
a, button {
    transition: all 0.15s ease;
}

/* ============================================
   LIGHT THEME OVERRIDES — DP Brand
   Override Tailwind dark-mode utility classes
   ============================================ */

/* --- Backgrounds --- */
.bg-gray-900 { background-color: #F3F7FC !important; }
.bg-gray-800 { background-color: #ffffff !important; }
.bg-gray-700 { background-color: #E8F2FF !important; }
.bg-gray-600 { background-color: #d4e6f9 !important; }
.bg-gray-500 { background-color: #b8d4f0 !important; }

/* Hover backgrounds */
.hover\:bg-gray-800:hover { background-color: #F3F7FC !important; }
.hover\:bg-gray-700:hover { background-color: #d4e6f9 !important; }
.hover\:bg-gray-600:hover { background-color: #b8d4f0 !important; }
.hover\:bg-gray-700\/50:hover, .hover\:bg-gray-800\/50:hover { background-color: #E8F2FF !important; }

/* Fractional opacity backgrounds */
.bg-gray-800\/50 { background-color: #F3F7FC !important; }
.bg-gray-800\/60 { background-color: #E8F2FF !important; }
.bg-gray-700\/50 { background-color: #E8F2FF !important; }
.bg-gray-900\/50 { background-color: rgba(232, 242, 255, 0.7) !important; }
.bg-gray-900\/80 { background-color: rgba(243, 247, 252, 0.9) !important; }

/* Mobile overlay stays dark */
.bg-black\/60 { background-color: rgba(26, 74, 140, 0.3) !important; }

/* --- Text colors (DP brand) --- */
.text-gray-100 { color: #2C3E50 !important; }
.text-gray-200 { color: #34495E !important; }
.text-gray-300 { color: #4A5568 !important; }
.text-gray-400 { color: #6C7B7F !important; }
.text-gray-500 { color: #8E9EAB !important; }
.text-gray-600 { color: #8E9EAB !important; }

/* Active text — prevent white-on-white in sidebar menu items and page headings.
   Scoped to sidebar and main content area, not buttons. */
#sidebar .text-white { color: #1E5BB8 !important; }
main .text-white, .flex-1 > .text-white { color: #2C3E50 !important; }
/* Preserve white text on colored buttons */
.bg-blue-600 .text-white, .bg-green-600 .text-white, .bg-red-500 .text-white,
.bg-blue-600.text-white, .bg-green-600.text-white, .bg-red-500.text-white,
.bg-blue-700.text-white, .bg-green-700.text-white, .bg-red-600.text-white,
.bg-red-700.text-white, .bg-purple-600.text-white, .bg-indigo-600.text-white { color: #ffffff !important; }
/* Pagination active page */
.bg-blue-600.text-white { color: #ffffff !important; }

/* Hover text */
.hover\:text-white:hover { color: #1A4A8C !important; }
.hover\:text-gray-200:hover { color: #2C3E50 !important; }
.hover\:text-gray-300:hover { color: #34495E !important; }

/* --- Borders (blue-tinted) --- */
.border-gray-700 { border-color: #d4e6f9 !important; }
.border-gray-600 { border-color: #b8d4f0 !important; }
.border-gray-800 { border-color: #E8F2FF !important; }
.border-gray-800\/60 { border-color: #E8F2FF !important; }
.divide-gray-700 > :not([hidden]) ~ :not([hidden]) { border-color: #d4e6f9 !important; }
.divide-gray-800 > :not([hidden]) ~ :not([hidden]) { border-color: #E8F2FF !important; }
.divide-gray-800\/60 > :not([hidden]) ~ :not([hidden]) { border-color: #E8F2FF !important; }

/* --- Form inputs --- */
.bg-gray-700 input, input.bg-gray-700, select.bg-gray-700, textarea.bg-gray-700 {
    background-color: #ffffff !important;
    border-color: #b8d4f0 !important;
    color: #2C3E50 !important;
}
input.bg-gray-700::placeholder, textarea.bg-gray-700::placeholder {
    color: #8E9EAB !important;
}
.placeholder-gray-500::placeholder { color: #8E9EAB !important; }
.placeholder-gray-400::placeholder { color: #8E9EAB !important; }

/* --- Ring / focus colors --- */
.ring-gray-700 { --tw-ring-color: #b8d4f0 !important; }
.focus\:ring-gray-700:focus { --tw-ring-color: #2E7CE4 !important; }
.focus\:ring-blue-500:focus { --tw-ring-color: #2E7CE4 !important; }

/* --- Badge backgrounds (DP palette, soft pastels) --- */
.bg-blue-900\/50, .bg-blue-900 { background-color: #E8F2FF !important; }
.bg-green-900\/50, .bg-green-900 { background-color: #E6F9ED !important; }
.bg-red-900\/50, .bg-red-900 { background-color: #FDE8E8 !important; }
.bg-yellow-900\/50, .bg-yellow-900 { background-color: #FFF8E1 !important; }
.bg-orange-900\/50, .bg-orange-900 { background-color: #FFF0E6 !important; }
.bg-purple-900\/50, .bg-purple-900 { background-color: #F3E8FF !important; }
.bg-pink-900\/50, .bg-pink-900 { background-color: #FCE7F3 !important; }
.bg-cyan-900\/50, .bg-cyan-900 { background-color: #E0F7FA !important; }
.bg-indigo-900\/50, .bg-indigo-900 { background-color: #E8EAF6 !important; }

/* Badge text (DP brand-aligned) */
.text-blue-400 { color: #2E7CE4 !important; }
.text-blue-300 { color: #4A90E2 !important; }
.text-green-400 { color: #28A745 !important; }
.text-green-300 { color: #34C759 !important; }
.text-red-400 { color: #E53E3E !important; }
.text-red-300 { color: #FC5656 !important; }
.text-yellow-400 { color: #D69E2E !important; }
.text-yellow-300 { color: #ECC94B !important; }
.text-orange-400 { color: #FF6B35 !important; }
.text-purple-400 { color: #805AD5 !important; }
.text-pink-400 { color: #D53F8C !important; }
.text-cyan-400 { color: #0891B2 !important; }
.text-indigo-400 { color: #5C6BC0 !important; }

/* Hover accent text */
.hover\:text-blue-400:hover { color: #1E5BB8 !important; }
.hover\:text-red-400:hover { color: #C53030 !important; }

/* --- Buttons (DP brand blue primary) --- */
.bg-blue-600 { background-color: #2E7CE4 !important; }
.bg-blue-700 { background-color: #1E5BB8 !important; }
.hover\:bg-blue-700:hover { background-color: #1E5BB8 !important; }
.hover\:bg-blue-600:hover { background-color: #2E7CE4 !important; }
.bg-blue-500 { background-color: #4A90E2 !important; }
.bg-green-600 { background-color: #28A745 !important; }
.bg-green-700 { background-color: #218838 !important; }
.hover\:bg-green-700:hover { background-color: #218838 !important; }
.bg-red-600 { background-color: #E53E3E !important; }
.bg-red-700 { background-color: #C53030 !important; }
.hover\:bg-red-700:hover { background-color: #C53030 !important; }
.hover\:bg-red-900\/30:hover { background-color: #FDE8E8 !important; }
.bg-red-500 { background-color: #FC5656 !important; }

/* --- Sidebar --- */
#sidebar {
    background-color: #ffffff !important;
    border-right-color: #d4e6f9 !important;
    box-shadow: 1px 0 4px rgba(46, 124, 228, 0.06);
}

/* Sidebar active state */
.bg-gray-700.text-white {
    background-color: #E8F2FF !important;
    color: #1E5BB8 !important;
}

/* Sidebar user footer area */
#sidebar .border-t { border-color: #d4e6f9 !important; }

/* Sidebar search input */
#sidebar input[type="text"] {
    background-color: #F3F7FC !important;
    border-color: #d4e6f9 !important;
    color: #2C3E50 !important;
}
#sidebar input[type="text"]::placeholder { color: #8E9EAB !important; }

/* User avatar */
.bg-blue-600.rounded-full { background-color: #2E7CE4 !important; }
.bg-green-600.rounded-full { background-color: #28A745 !important; }

/* --- Top bar (mobile) --- */
#top-bar {
    background-color: #ffffff !important;
    border-bottom-color: #d4e6f9 !important;
    box-shadow: 0 1px 3px rgba(46, 124, 228, 0.08);
}

/* --- Cards and context menus --- */
.shadow-xl, .shadow-2xl {
    box-shadow: 0 4px 12px rgba(46, 124, 228, 0.08), 0 1px 3px rgba(0,0,0,0.04) !important;
}

/* --- Tables --- */
.even\:bg-gray-800\/50:nth-child(even) { background-color: #F3F7FC !important; }

/* --- Checkboxes --- */
.bg-gray-700[type="checkbox"], input[type="checkbox"].bg-gray-700 {
    background-color: #ffffff !important;
    border-color: #b8d4f0 !important;
}
input[type="checkbox"]:checked {
    background-color: #2E7CE4 !important;
    border-color: #2E7CE4 !important;
}

/* --- Code/pre blocks --- */
pre, code {
    background-color: #E8F2FF !important;
    color: #2C3E50 !important;
}

/* --- Notification badge --- */
.bg-red-500 { background-color: #E53E3E !important; }

/* --- Selection/highlight --- */
::selection {
    background-color: #b8d4f0;
    color: #1A4A8C;
}

/* --- Login page styling --- */
body.bg-gray-900 {
    background: linear-gradient(135deg, #E8F2FF 0%, #ffffff 100%) !important;
}

/* --- Sidebar logo area --- */
.dp-logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

/* --- Menu section chevrons --- */
.menu-chevron {
    color: #8E9EAB !important;
}

/* --- Context menus (dropdown) --- */
.file-context-menu, [class*="context-menu"] {
    background-color: #ffffff !important;
    border-color: #d4e6f9 !important;
}

/* --- Subtle border-t and border-b dividers --- */
.border-t.border-gray-700, .border-b.border-gray-700 {
    border-color: #d4e6f9 !important;
}
