/* EmailBadger - Consolidated Dark Mode CSS */ /* Light Mode Variables (default) */ :root { /* General */ --primary-bg: #ffffff; --secondary-bg: #f8f9fa; --card-bg: #ffffff; --text-color: #212529; --muted-text: #6c757d; --border-color: #dee2e6; --hover-bg: #f2f2f2; /* Specific components */ --navbar-bg: #ffffff; --sidebar-bg: #343a40; --input-bg: #ffffff; --input-text: #495057; --input-border: #ced4da; --table-stripe: #f2f2f2; --table-hover: #e9ecef; --pre-bg: #f8f9fa; --pre-color: #212529; } /* Dark Mode Variables */ body.dark-mode { /* General */ --primary-bg: #1a1a1a; --secondary-bg: #2c2c2c; --card-bg: #333333; --text-color: #e0e0e0; --muted-text: #aaaaaa; --border-color: #444444; --hover-bg: #3a3a3a; /* Specific components */ --navbar-bg: #0c0c0c; --sidebar-bg: #222222; --input-bg: #404040; --input-text: #e0e0e0; --input-border: #555555; --table-stripe: #2a2a2a; --table-hover: #3a3a3a; --pre-bg: #1f2d3d; --pre-color: #f0f0f0; } /* Base styles for both light and dark mode */ body { background-color: var(--primary-bg); color: var(--text-color); transition: background-color 0.3s ease, color 0.3s ease; } /* Explicitly add light-mode class for toggling */ body.light-mode { background-color: var(--primary-bg); color: var(--text-color); } /* Navbar */ .navbar { background-color: var(--navbar-bg) !important; border-bottom: 1px solid var(--border-color); } .navbar-light .navbar-nav .nav-link { color: var(--text-color); } /* Sidebar */ .main-sidebar { background-color: var(--sidebar-bg) !important; } .sidebar-dark-primary .nav-sidebar>.nav-item>.nav-link.active, .sidebar-light-primary .nav-sidebar>.nav-item>.nav-link.active { background-color: #007bff; } /* Content wrapper */ .content-wrapper { background-color: var(--primary-bg); width: 100%; overflow-x: hidden; } /* Cards */ .card { background-color: var(--card-bg); border: 1px solid var(--border-color); } .card-header { background-color: rgba(0, 0, 0, 0.03); border-bottom: 1px solid var(--border-color); } body.dark-mode .card-header { background-color: rgba(0, 0, 0, 0.2); } /* Forms */ .form-control { background-color: var(--input-bg); border-color: var(--input-border); color: var(--input-text); } .form-control:focus { background-color: var(--input-bg); color: var(--input-text); } .custom-file-label { background-color: var(--input-bg); color: var(--input-text); border-color: var(--input-border); } /* Tables */ .table { color: var(--text-color); } .table-striped tbody tr:nth-of-type(odd) { background-color: var(--table-stripe); } .table-hover tbody tr:hover { background-color: var(--table-hover); } .table thead th { border-bottom: 2px solid var(--border-color); } .table td, .table th { border-top: 1px solid var(--border-color); } /* Table Responsive Styling for Better Wrapping */ .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; } .table td { max-width: 300px; word-wrap: break-word; overflow-wrap: break-word; white-space: normal; } .table td:first-child { max-width: 250px; } .table td:nth-child(2) { max-width: 150px; } .table-sm td { font-size: 0.9rem; } /* Text */ .text-muted { color: var(--muted-text) !important; } .text-dark { color: var(--text-color) !important; } /* Alerts */ .alert-success { background-color: #d4edda; color: #155724; border-color: #c3e6cb; } .alert-danger { background-color: #f8d7da; color: #721c24; border-color: #f5c6cb; } .alert-warning { background-color: #fff3cd; color: #856404; border-color: #ffeeba; } .alert-info { background-color: #d1ecf1; color: #0c5460; border-color: #bee5eb; } body.dark-mode .alert-success { background-color: #0c4128; color: #d4edda; border-color: #175934; } body.dark-mode .alert-danger { background-color: #471a1a; color: #f8d7da; border-color: #6b2828; } body.dark-mode .alert-warning { background-color: #533d14; color: #fff3cd; border-color: #7d5f20; } body.dark-mode .alert-info { background-color: #0c3b43; color: #d1ecf1; border-color: #125864; } /* Pre and code blocks */ pre { background-color: var(--pre-bg); color: var(--pre-color); border: 1px solid var(--border-color); white-space: pre-wrap; word-wrap: break-word; } /* Match AdminLTE dark theme for Full Headers */ body.dark-mode pre { background-color: var(--pre-bg); color: var(--pre-color); border: 1px solid #4b545c; padding: 1rem; border-radius: 0.25rem; } /* Toggle switch styling */ .theme-switch-wrapper { display: flex; align-items: center; } .theme-switch { display: inline-block; height: 24px; position: relative; width: 48px; } .theme-switch input { display: none; } .slider { background-color: #ccc; bottom: 0; cursor: pointer; left: 0; position: absolute; right: 0; top: 0; transition: .4s; border-radius: 24px; } .slider:before { background-color: #fff; bottom: 4px; content: ""; height: 16px; left: 4px; position: absolute; transition: .4s; width: 16px; border-radius: 50%; } input:checked + .slider { background-color: #2196F3; } input:checked + .slider:before { transform: translateX(24px); } /* Dark mode icon */ .dark-mode-icon { margin-left: 10px; font-size: 1.2rem; } /* Drag and drop zone */ .drag-over { border: 2px dashed #17a2b8; background-color: rgba(23, 162, 184, 0.1); } /* Ensure the logo is vertically and horizontally centered */ .brand-link { display: flex; align-items: center; justify-content: center; } .brand-image { width: 200px; height: 200px; object-fit: contain; } /* Responsive adjustments for smaller screens */ @media (max-width: 768px) { .table td { max-width: 200px; } .table td:first-child { max-width: 150px; } .table td:nth-child(2) { max-width: 100px; } }