/* Dark Mode Styles - Common for all pages */
/* Add this file to all HTML pages: <link rel="stylesheet" href="dark-mode.css"> */

/* Dark mode color scheme */
.dark {
    color-scheme: dark;
}

/* Body and main backgrounds */
.dark body {
    background-color: #0f172a !important;
    color: #e2e8f0 !important;
}

.dark .bg-white {
    background-color: #1e293b !important;
    color: #e2e8f0 !important;
}

.dark .bg-gray-50 {
    background-color: #0f172a !important;
}

.dark .bg-gray-100 {
    background-color: #1e293b !important;
}

.dark .bg-card {
    background-color: #1e293b !important;
}

.dark .bg-popover {
    background-color: #1e293b !important;
}

/* Borders */
.dark .border-gray-200,
.dark .border-gray-300,
.dark .border {
    border-color: #334155 !important;
}

.dark .border-input {
    border-color: #334155 !important;
}

/* Text colors */
.dark .text-gray-900,
.dark .text-gray-800,
.dark h1, .dark h2, .dark h3, .dark h4, .dark h5, .dark h6 {
    color: #f1f5f9 !important;
}

.dark .text-gray-700 {
    color: #cbd5e1 !important;
}

.dark .text-gray-600,
.dark .text-gray-500 {
    color: #94a3b8 !important;
}

.dark .text-gray-400 {
    color: #64748b !important;
}

.dark .text-muted-foreground {
    color: #94a3b8 !important;
}

.dark .text-card-foreground,
.dark .text-foreground {
    color: #e2e8f0 !important;
}

.dark .text-popover-foreground {
    color: #e2e8f0 !important;
}

/* Form elements */
.dark input,
.dark select,
.dark textarea {
    background-color: #0f172a !important;
    border-color: #334155 !important;
    color: #f1f5f9 !important;
}

.dark input:focus,
.dark select:focus,
.dark textarea:focus {
    border-color: #3b82f6 !important;
    background-color: #1e293b !important;
}

.dark input::placeholder,
.dark textarea::placeholder {
    color: #64748b !important;
}

.dark input[type="file"] {
    color: #94a3b8 !important;
}

.dark input[type="checkbox"],
.dark input[type="radio"] {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* Buttons */
.dark button {
    color: #f1f5f9 !important;
}

.dark .bg-primary {
    background-color: hsl(var(--primary)) !important;
}

.dark .text-primary-foreground {
    color: hsl(var(--primary-foreground)) !important;
}

.dark .bg-secondary {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

.dark .hover\:bg-accent:hover,
.dark .hover\:bg-gray-100:hover,
.dark .hover\:bg-gray-50:hover {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

.dark .hover\:text-accent-foreground:hover {
    color: #f1f5f9 !important;
}

/* Sidebar and navigation */
.dark nav,
.dark aside,
.dark header {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

.dark .bg-blue-50 {
    background-color: #1e3a5f !important;
}

.dark .bg-blue-100 {
    background-color: #1e3a8a !important;
}

.dark .text-blue-600 {
    color: #60a5fa !important;
}

.dark .text-blue-700 {
    color: #3b82f6 !important;
}

/* Cards and containers */
.dark .rounded-xl,
.dark .rounded-lg,
.dark .rounded-md {
    background-color: #1e293b;
}

.dark .bg-muted\/25,
.dark .bg-muted {
    background-color: rgba(30, 41, 59, 0.5) !important;
}

.dark .bg-background {
    background-color: #0f172a !important;
}

/* Shadows */
.dark .shadow,
.dark .shadow-sm {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.5) !important;
}

.dark .shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5) !important;
}

.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5) !important;
}

/* Tabs */
.dark [role="tab"][data-state="active"],
.dark [data-state="active"] {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
}

.dark [role="tab"]:not([data-state="active"]) {
    color: #94a3b8 !important;
}

.dark [role="tab"]:hover {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

/* Dropdown menus */
.dark .absolute.z-50 {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* Tables */
.dark table {
    background-color: #1e293b !important;
}

.dark thead {
    background-color: #0f172a !important;
}

.dark tbody tr {
    border-color: #334155 !important;
}

.dark tbody tr:hover {
    background-color: #334155 !important;
}

/* Color picker previews */
.dark .w-8.h-8.rounded,
.dark .w-10.h-10.rounded-lg {
    border-color: #334155 !important;
}

/* Preview section */
.dark .font-mono {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

/* Labels */
.dark label {
    color: #e2e8f0 !important;
}

/* SVG icons */
.dark svg {
    color: #f1f5f9 !important;
    stroke: #f1f5f9 !important;
}

.dark svg path,
.dark svg circle,
.dark svg line,
.dark svg rect,
.dark svg polyline,
.dark svg polygon {
    stroke: #f1f5f9 !important;
}

/* Disabled states */
.dark button:disabled,
.dark input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Scrollbar */
.dark ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

.dark ::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 5px;
}

.dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Dividers */
.dark hr {
    border-color: #334155 !important;
}

/* Required asterisk */
.dark .text-red-500 {
    color: #f87171 !important;
}

.dark .text-red-600 {
    color: #ef4444 !important;
}

/* Links */
.dark a {
    color: #60a5fa !important;
}

.dark a:hover {
    color: #93c5fd !important;
}

/* Notification badge */
.dark .bg-blue-500 {
    background-color: #3b82f6 !important;
}

.dark .bg-green-500 {
    background-color: #22c55e !important;
}

.dark .bg-green-100 {
    background-color: #065f46 !important;
}

.dark .bg-red-500 {
    background-color: #ef4444 !important;
}

.dark .bg-red-100 {
    background-color: #7f1d1d !important;
}

.dark .bg-yellow-500 {
    background-color: #eab308 !important;
}

.dark .bg-yellow-100 {
    background-color: #713f12 !important;
}

/* Focus rings */
.dark *:focus-visible {
    outline-color: #3b82f6 !important;
}

/* Modal/Dialog */
.dark .modal,
.dark .dialog {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* Badges */
.dark .badge {
    background-color: #334155 !important;
    color: #f1f5f9 !important;
}

/* Tooltips */
.dark .tooltip {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

/* Accordion */
.dark .accordion {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* Alerts */
.dark .alert {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

/* Code blocks */
.dark code,
.dark pre {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
    border-color: #334155 !important;
}

/* Smooth transitions */
.dark * {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
