/*
 * Taiga Dark Theme - ULTRA AGGRESSIVE VERSION
 * Targets html.theme-dark AND body.theme-dark
 */

/* ============================================ */
/* TOGGLE BUTTON - Always Visible              */
/* ============================================ */
#theme-toggle-btn {
    position: fixed !important;
    bottom: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    padding: 12px 20px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 25px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

#theme-toggle-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4) !important;
}

/* ============================================ */
/* NUCLEAR OVERRIDE - Target EVERYTHING         */
/* Apply to BOTH html.theme-dark AND body.theme-dark */
/* ============================================ */

html.theme-dark,
html.theme-dark body,
body.theme-dark,
body.theme-dark html {
    background-color: #1a1a1a !important;
    background: #1a1a1a !important;
    color: #ccc !important;
}

/* Override ALL backgrounds with inline styles */
html.theme-dark [style*="background"],
body.theme-dark [style*="background"] {
    background-color: #2a2a2a !important;
    background: #2a2a2a !important;
}

/* Target specific Taiga light colors */
html.theme-dark [style*="f9f9fb"],
html.theme-dark [style*="F9F9FB"],
html.theme-dark [style*="#f9f9fb"],
html.theme-dark [style*="#F9F9FB"],
html.theme-dark [style*="rgb(249, 249, 251)"],
body.theme-dark [style*="f9f9fb"],
body.theme-dark [style*="F9F9FB"],
body.theme-dark [style*="#f9f9fb"],
body.theme-dark [style*="#F9F9FB"],
body.theme-dark [style*="rgb(249, 249, 251)"] {
    background-color: #2a2a2a !important;
    background: #2a2a2a !important;
}

/* Override white backgrounds */
html.theme-dark [style*="#fff"],
html.theme-dark [style*="white"],
html.theme-dark [style*="rgb(255"],
body.theme-dark [style*="#fff"],
body.theme-dark [style*="white"],
body.theme-dark [style*="rgb(255"] {
    background-color: #2a2a2a !important;
    background: #2a2a2a !important;
}

/* ============================================ */
/* ALL ELEMENTS - Dark by Default              */
/* ============================================ */

html.theme-dark *,
body.theme-dark * {
    background-image: none !important;
}

html.theme-dark div,
html.theme-dark section,
html.theme-dark article,
html.theme-dark main,
html.theme-dark aside,
html.theme-dark nav,
html.theme-dark header,
html.theme-dark footer,
html.theme-dark span:not([class*="icon"]),
body.theme-dark div,
body.theme-dark section,
body.theme-dark article,
body.theme-dark main,
body.theme-dark aside,
body.theme-dark nav,
body.theme-dark header,
body.theme-dark footer,
body.theme-dark span:not([class*="icon"]) {
    background-color: transparent !important;
    color: #ccc !important;
}

/* ============================================ */
/* TEXT COLORS                                  */
/* ============================================ */

html.theme-dark h1, html.theme-dark h2, html.theme-dark h3, 
html.theme-dark h4, html.theme-dark h5, html.theme-dark h6,
body.theme-dark h1, body.theme-dark h2, body.theme-dark h3, 
body.theme-dark h4, body.theme-dark h5, body.theme-dark h6 {
    color: #fcfcfc !important;
}

html.theme-dark a, html.theme-dark a:link, html.theme-dark a:visited,
body.theme-dark a, body.theme-dark a:link, body.theme-dark a:visited {
    color: #7aa2f7 !important;
}

html.theme-dark a:hover,
body.theme-dark a:hover {
    color: #89b4fa !important;
}

html.theme-dark p,
html.theme-dark span,
html.theme-dark label,
body.theme-dark p,
body.theme-dark span,
body.theme-dark label {
    color: #ccc !important;
}

/* ============================================ */
/* FORMS AND INPUTS                            */
/* ============================================ */

html.theme-dark input, html.theme-dark textarea, html.theme-dark select,
body.theme-dark input, body.theme-dark textarea, body.theme-dark select {
    background-color: #111 !important;
    border-color: #444 !important;
    color: #bbb !important;
}

html.theme-dark input::placeholder, html.theme-dark textarea::placeholder,
body.theme-dark input::placeholder, body.theme-dark textarea::placeholder {
    color: #666 !important;
}

html.theme-dark input:focus, html.theme-dark textarea:focus, html.theme-dark select:focus,
body.theme-dark input:focus, body.theme-dark textarea:focus, body.theme-dark select:focus {
    border: 2px solid #88c0d0 !important;
}

/* ============================================ */
/* TABLES                                       */
/* ============================================ */

html.theme-dark table, html.theme-dark tr, html.theme-dark td, html.theme-dark th,
body.theme-dark table, body.theme-dark tr, body.theme-dark td, body.theme-dark th {
    border-color: #333 !important;
    background-color: transparent !important;
}

html.theme-dark thead th,
body.theme-dark thead th {
    background-color: #1a1a1a !important;
    color: #ccc !important;
}

html.theme-dark .row1,
body.theme-dark .row1 {
    background-color: #111 !important;
}

html.theme-dark .row2,
body.theme-dark .row2 {
    background-color: #1c1c1c !important;
}

/* ============================================ */
/* NAVIGATION                                   */
/* ============================================ */

html.theme-dark [tg-navigation-bar],
html.theme-dark tg-navigation-bar,
html.theme-dark .nav-url,
html.theme-dark .navbar-dropdown,
body.theme-dark [tg-navigation-bar],
body.theme-dark tg-navigation-bar,
body.theme-dark .nav-url,
body.theme-dark .navbar-dropdown {
    background-color: #1a1a1a !important;
}

/* ============================================ */
/* MENU SECONDARY AND TERTIARY                 */
/* ============================================ */

html.theme-dark .menu-secondary,
html.theme-dark .menu-secondary li,
html.theme-dark .ticket-data,
body.theme-dark .menu-secondary,
body.theme-dark .menu-secondary li,
body.theme-dark .ticket-data {
    background-color: #2a2a2a !important;
    color: #bbb !important;
}

html.theme-dark .menu-secondary li:hover,
body.theme-dark .menu-secondary li:hover {
    background-color: #333 !important;
}

html.theme-dark .menu-secondary li .active,
body.theme-dark .menu-secondary li .active {
    background-color: #3a3a3a !important;
}

html.theme-dark .menu-tertiary,
body.theme-dark .menu-tertiary {
    background-color: #252525 !important;
    border-color: #333 !important;
}

html.theme-dark .menu-tertiary ul li a,
body.theme-dark .menu-tertiary ul li a {
    color: #bbb !important;
}

html.theme-dark .menu-tertiary ul li:hover,
body.theme-dark .menu-tertiary ul li:hover {
    background-color: #333 !important;
}

/* ============================================ */
/* WRAPPER AND MAIN                            */
/* ============================================ */

html.theme-dark .wrapper,
html.theme-dark .main,
html.theme-dark .master,
body.theme-dark .wrapper,
body.theme-dark .main,
body.theme-dark .master {
    background-color: #222 !important;
}

html.theme-dark .centered,
body.theme-dark .centered {
    background-color: transparent !important;
}

/* ============================================ */
/* PROJECTS                                     */
/* ============================================ */

html.theme-dark .project-list,
html.theme-dark .project-list-item,
html.theme-dark .projects-wrapper,
html.theme-dark .project-list-wrapper .project-list-title,
html.theme-dark .project-list-wrapper .list-itemtype-project,
body.theme-dark .project-list,
body.theme-dark .project-list-item,
body.theme-dark .projects-wrapper,
body.theme-dark .project-list-wrapper .project-list-title,
body.theme-dark .project-list-wrapper .list-itemtype-project {
    background-color: #2a2a2a !important;
    color: #bbb !important;
}

/* ============================================ */
/* ISSUES                                       */
/* ============================================ */

html.theme-dark .issues-table,
html.theme-dark .issues-list,
html.theme-dark .issue-row,
html.theme-dark .issues-options,
body.theme-dark .issues-table,
body.theme-dark .issues-list,
body.theme-dark .issue-row,
body.theme-dark .issues-options {
    background-color: #2a2a2a !important;
}

html.theme-dark .issue-row:hover,
body.theme-dark .issue-row:hover {
    background-color: #333 !important;
}

html.theme-dark .issue-data,
html.theme-dark .detail-wrapper,
html.theme-dark .issue-detail,
html.theme-dark .detail,
html.theme-dark .detail .detail-content,
html.theme-dark .detail .detail-header-container,
body.theme-dark .issue-data,
body.theme-dark .detail-wrapper,
body.theme-dark .issue-detail,
body.theme-dark .detail,
body.theme-dark .detail .detail-content,
body.theme-dark .detail .detail-header-container {
    background-color: #2a2a2a !important;
    color: #ccc !important;
}

/* ============================================ */
/* KANBAN                                       */
/* ============================================ */

html.theme-dark .taskboard,
html.theme-dark .taskboard-table,
body.theme-dark .taskboard,
body.theme-dark .taskboard-table {
    background-color: #1a1a1a !important;
}

html.theme-dark .taskboard-column,
html.theme-dark .column,
html.theme-dark .kanban-table-body .kanban-uses-box,
html.theme-dark .taskboard-table-body .taskboard-cards-box,
body.theme-dark .taskboard-column,
body.theme-dark .column,
body.theme-dark .kanban-table-body .kanban-uses-box,
body.theme-dark .taskboard-table-body .taskboard-cards-box {
    background-color: #2a2a2a !important;
    color: #bbb !important;
}

html.theme-dark .card-inner,
html.theme-dark .task,
html.theme-dark .task-card,
html.theme-dark .us-card,
body.theme-dark .card-inner,
body.theme-dark .task,
body.theme-dark .task-card,
body.theme-dark .us-card {
    background-color: #333 !important;
}

/* ============================================ */
/* BUTTONS                                      */
/* ============================================ */

html.theme-dark button,
html.theme-dark .btn,
html.theme-dark .button,
body.theme-dark button,
body.theme-dark .btn,
body.theme-dark .button {
    background-color: #3a3a3a !important;
    border-color: #555 !important;
    color: #ccc !important;
}

html.theme-dark button:hover,
html.theme-dark .btn:hover,
html.theme-dark .button:hover,
body.theme-dark button:hover,
body.theme-dark .btn:hover,
body.theme-dark .button:hover {
    background-color: #4a4a4a !important;
}

/* ============================================ */
/* SCROLLBARS                                   */
/* ============================================ */

html.theme-dark ::-webkit-scrollbar,
body.theme-dark ::-webkit-scrollbar {
    background: #1a1a1a !important;
}

html.theme-dark ::-webkit-scrollbar-thumb,
body.theme-dark ::-webkit-scrollbar-thumb {
    background: #444 !important;
}

html.theme-dark ::-webkit-scrollbar-thumb:hover,
body.theme-dark ::-webkit-scrollbar-thumb:hover {
    background: #555 !important;
}

/* ============================================ */
/* CODE BLOCKS                                  */
/* ============================================ */

html.theme-dark pre,
html.theme-dark code,
body.theme-dark pre,
body.theme-dark code {
    background-color: #1a1a1a !important;
    color: #88c0d0 !important;
}

/* ============================================ */
/* ADMIN SWIMLANES                              */
/* ============================================ */

html.theme-dark .admin-swimlane-item,
body.theme-dark .admin-swimlane-item {
    background: #2a2a2a !important;
    background-color: #2a2a2a !important;
    color: #bbb !important;
}
