/* ===== BACKEND INFO STYLES ===== */

/* Light mode - subtle blue/gray theme */
.backend-info {
    font-size: 12px;
    color: #555;
    margin-bottom: 15px;
    padding: 10px 14px;
    background: linear-gradient(to right, #e3f2fd 0%, #f5f5f5 100%);
    border: 1px solid #bbdefb;
    border-left: 4px solid #2196f3;
    border-radius: 4px;
}

.backend-info-label {
    font-weight: 600;
    color: #1976d2;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
}

.backend-info code {
    font-size: 11px;
    padding: 3px 7px;
    background-color: #fff;
    border: 1px solid #cfd8dc;
    border-radius: 3px;
    color: #1565c0;
    font-weight: 500;
}

.backend-info-description {
    color: #757575;
    font-style: italic;
}

/* Dark mode - vibrant teal/cyan theme */
@media (prefers-color-scheme: dark) {
    .backend-info {
        background: linear-gradient(to right, #0d3d4d 0%, #1a1a1a 100%);
        border: 1px solid #1e5a6d;
        border-left: 4px solid #26c6da;
        color: #b0bec5;
    }
    
    .backend-info-label {
        color: #4dd0e1;
    }
    
    .backend-info code {
        background-color: #263238;
        border: 1px solid #37474f;
        color: #80deea;
    }
    
    .backend-info-description {
        color: #90a4ae;
    }
}

/* ===== KEY SEARCH PAGE STYLES ===== */

.key-search-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.key-search-page-header h1 {
    margin: 0;
    flex: 1;
}

.key-search-flush-form {
    margin: 0;
    flex-shrink: 0;
}

.flush-button {
    background-color: #ba2121 !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.flush-button:hover:not(:disabled) {
    background-color: #a41e1e !important;
}

.flush-button:disabled {
    background-color: #ccc !important;
    color: #666 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

/* Dark mode support for flush button */
@media (prefers-color-scheme: dark) {
    .flush-button {
        background-color: #cc2936 !important;
    }

    .flush-button:hover:not(:disabled) {
        background-color: #b02329 !important;
    }

    .flush-button:disabled {
        background-color: #555 !important;
        color: #999 !important;
    }
}

/* Table styles */
#result_list {
    width: 100%;
}

/* Icon styles */
.icon-yes img,
.icon-no img {
    width: 13px;
    height: 13px;
    margin-right: 4px;
    vertical-align: text-bottom;
}

.icon-yes {
    color: #30a030;
}

.icon-no {
    color: #ba2121;
}

/* Message list styles */
.messagelist {
    margin: 0 0 20px 0;
}

.messagelist .success,
.messagelist .error {
    border-radius: 4px;
    margin-bottom: 10px;
    border: 1px solid;
}

.messagelist .success {
    background-color: var(--message-success-bg, #d4edda);
    color: var(--body-fg, #155724);
    border-color: var(--message-success-border, #c3e6cb);
}

.messagelist .error {
    background-color: var(--message-error-bg, #f8d7da);
    color: var(--message-error-fg, #721c24);
    border-color: var(--message-error-border, #f5c6cb);
}

.messagelist .warning  {
    background-color: var(--message-warning-bg, #fff3cd);
    color: var(--message-warning-fg, #856404);
    border-color: var(--message-warning-border, #ffeeba);
}

/* Dark mode support for messages */
@media (prefers-color-scheme: dark) {
    .messagelist .success {
        background-color: rgba(40, 167, 69, 0.2);
        color: #4caf50;
        border-color: rgba(40, 167, 69, 0.4);
    }

    .messagelist .error {
        background-color: rgba(220, 53, 69, 0.2);
        color: #ef5350;
        border-color: rgba(220, 53, 69, 0.4);
    }

    .messagelist .warning {
        background-color: rgba(255, 193, 7, 0.2);
        color: #ffc107;
        border-color: rgba(255, 193, 7, 0.4);
    }
}

/* ===== OVERVIEW PAGE STYLES ===== */

.overview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.overview-card {
    background: var(--body-bg, #fff);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
    transition: all 0.3s ease;
}

.overview-card:hover {
    border-color: var(--link-fg, #417690);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.overview-card-icon {
    font-size: 2.5em;
    flex-shrink: 0;
}

.overview-card-content {
    flex: 1;
    min-width: 0;
}

.overview-card-label {
    font-size: 0.85em;
    color: var(--body-quiet-color, #666);
    margin-bottom: 5px;
    font-weight: 500;
}

.overview-card-value {
    font-size: 2em;
    font-weight: bold;
    color: var(--link-fg, #417690);
    margin-bottom: 5px;
}

.overview-card-value-small {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--link-fg, #417690);
    margin-bottom: 5px;
}

.overview-card-link {
    font-size: 0.85em;
    color: var(--link-fg, #417690);
    text-decoration: none;
    display: inline-block;
}

.overview-card-link:hover {
    text-decoration: underline;
}

.config-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 10px 0;
}

.config-summary-item {
    padding: 10px;
    border-left: 3px solid var(--link-fg, #417690);
    background: var(--darkened-bg, #f8f8f8);
    border-radius: 3px;
}

.config-summary-item strong {
    display: block;
    margin-bottom: 5px;
    font-size: 0.85em;
    color: var(--body-quiet-color, #666);
}

.config-summary-item span {
    font-size: 0.95em;
    color: var(--body-fg, #333);
}

.config-link {
    color: var(--link-fg, #417690);
    text-decoration: none;
    font-weight: 500;
}

.config-link:hover {
    text-decoration: underline;
}

/* Dark mode support for overview */
@media (prefers-color-scheme: dark) {
    .overview-card {
        background: var(--body-bg, #121212);
        border-color: var(--border-color, #444);
    }

    .overview-card:hover {
        border-color: var(--link-fg, #79aec8);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    }

    .overview-card-label {
        color: var(--body-quiet-color, #999);
    }

    .overview-card-value,
    .overview-card-value-small {
        color: var(--link-fg, #79aec8);
    }

    .overview-card-link {
        color: var(--link-fg, #79aec8);
    }

    .config-summary-item {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        border-left-color: var(--link-fg, #79aec8);
    }

    .config-summary-item strong {
        color: var(--body-quiet-color, #999);
    }

    .config-summary-item span {
        color: var(--body-fg, #e0e0e0);
    }

    .config-link {
        color: var(--link-fg, #79aec8);
    }
}

/* ===== TAB NAVIGATION STYLES ===== */

.celery-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-color, #ddd);
    margin-bottom: 20px;
    margin-top: 10px;
}

.celery-tab {
    padding: 12px 20px;
    text-decoration: none;
    color: var(--body-quiet-color, #666);
    font-weight: 500;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.celery-tab:hover {
    color: var(--link-fg, #417690);
    background: var(--darkened-bg, rgba(0, 0, 0, 0.03));
}

.celery-tab-active {
    color: var(--link-fg, #417690);
    border-bottom-color: var(--link-fg, #417690);
    font-weight: 600;
}

.celery-tab-content {
    margin-top: 20px;
}

/* Dark mode support for tabs */
@media (prefers-color-scheme: dark) {
    .celery-tabs {
        border-bottom-color: var(--border-color, #444);
    }

    .celery-tab {
        color: var(--body-quiet-color, #999);
    }

    .celery-tab:hover {
        color: var(--link-fg, #79aec8);
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
    }

    .celery-tab-active {
        color: var(--link-fg, #79aec8);
        border-bottom-color: var(--link-fg, #79aec8);
    }
}

/* ===== INSTANCE OVERVIEW STYLES ===== */

.instance-stats {
    padding-top: 15px;
    padding-bottom: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    margin-top: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    border-radius: 3px;
    border: 1px solid var(--border-color, #ddd);
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--link-fg, #417690);
}

.stat-value.stat-success {
    color: #30a030;
}

.stat-value.stat-warning {
    color: #e47911;
}

.stat-value.stat-disabled {
    color: #999;
}

.default-badge {
    background: var(--link-fg, #417690);
    color: var(--body-bg, white);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    margin-left: 5px;
}

.ttl-value {
    font-weight: bold;
    color: var(--link-fg, #417690);
}

/* ===== KEY SEARCH STYLES ===== */

.search-form {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color, #ddd);
}

.search-form .form-row {
    margin: 0;
}

.search-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.search-form .help {
    font-size: 11px;
    margin-top: 3px;
    opacity: 0.7;
}

/* Key type badges - used in both search and detail views */
.key-type {
    font-size: 10px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    color: white;
}

.key-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: bold;
    color: white;
}

/* Key type colors - consistent across templates */
.key-type-string {
    background-color: #28a745;
}

.key-type-list {
    background-color: #007bff;
}

.key-type-set {
    background-color: #ffc107;
}

.key-type-zset {
    background-color: #17a2b8;
}

.key-type-hash {
    background-color: #6f42c1;
}

.key-type-stream {
    background-color: #059669;
}

/* Alternative key type colors used in search view */
.key-search .key-type-string {
    background: #417690;
}

.key-search .key-type-list {
    background: #30a030;
}

.key-search .key-type-set {
    background: #e47911;
}

.key-search .key-type-zset {
    background: #7b68ee;
}

.key-search .key-type-hash {
    background: #dc2626;
}

/* ===== KEY DETAIL STYLES ===== */

.key-value-table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
}

.key-value-table th,
.key-value-table td {
    padding: 8px 12px;
    border: 1px solid var(--border-color, #ddd);
    text-align: left;
}

.key-value-table th {
    font-weight: bold;
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
}

.key-value-table tbody tr:nth-child(even) {
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.02));
}

.key-value-table code {
    padding: 2px 4px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
}

.string-value-field {
    width: 100%;
}

.readonly {
    padding: 8px 0;
}

.readonly code {
    padding: 4px 8px;
    border-radius: 3px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    background-color: var(--darkened-bg, rgba(0, 0, 0, 0.05));
}

.danger-zone {
    border: 2px solid #dc3545;
    border-radius: 4px;
    background-color: var(--error-bg, rgba(220, 53, 69, 0.1));
}

.danger-zone h2 {
    color: #dc3545;
}

.field-box {
    margin-bottom: 15px;
}

.submit-row {
    margin-top: 10px;
}

.key-value-display h3 {
    margin: 0 0 15px 0;
    opacity: 0.8;
}

/* Key Detail Page Styles */
.key-detail-delete-form {
    margin: 0;
}

.key-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.key-detail-header h1 {
    margin: 0;
}

/* Delete button styling to match Django admin */
.delete-button {
    background-color: #ba2121 !important;
    color: white !important;
    border-color: #ba2121 !important;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    border: none;
    font-size: 14px;
}

.delete-button:hover,
.delete-button:focus {
    background-color: #a41e1e !important;
    border-color: #a41e1e !important;
    color: white !important;
}

/* Disabled delete button styling */
.delete-button:disabled {
    background-color: #ba2121 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border-color: #ba2121 !important;
    opacity: 0.6 !important;
    cursor: not-allowed !important;
}

.delete-button:disabled:hover,
.delete-button:disabled:focus {
    background-color: #ba2121 !important;
    border-color: #ba2121 !important;
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 0.6 !important;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .delete-button {
        background-color: #cc2936 !important;
        border-color: #cc2936 !important;
    }

    .delete-button:hover,
    .delete-button:focus {
        background-color: #b02329 !important;
        border-color: #b02329 !important;
    }

    .delete-button:disabled {
        background-color: #cc2936 !important;
        border-color: #cc2936 !important;
        color: rgba(255, 255, 255, 0.6) !important;
        opacity: 0.6 !important;
    }

    .delete-button:disabled:hover,
    .delete-button:disabled:focus {
        background-color: #cc2936 !important;
        border-color: #cc2936 !important;
        color: rgba(255, 255, 255, 0.6) !important;
        opacity: 0.6 !important;
    }
}

/* Pagination Mode Indicator Styles */
.pagination-mode-indicator {
    margin-bottom: 10px;
}

.pagination-mode-indicator .badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pagination-mode-indicator .badge.cursor-mode {
    background-color: #2196F3;
    color: white;
}

.pagination-mode-indicator .badge.page-mode {
    background-color: #4CAF50;
    color: white;
}

/* Dark mode support for badges */
@media (prefers-color-scheme: dark) {
    .pagination-mode-indicator .badge.cursor-mode {
        background-color: #1976D2;
    }

    .pagination-mode-indicator .badge.page-mode {
        background-color: #388E3C;
    }

    /* Inline edit styles for dark mode */
    .inline-edit-input {
        border-color: #555;
        background-color: var(--darkened-bg, #2d2d2d);
        color: var(--body-fg, #fff);
    }

    .inline-edit-input:focus {
        border-color: #79aec8;
    }
}

/* Search Form Alignment Styles */
.search-form-row {
    margin-bottom: 15px;
}

.search-form-fields {
    display: flex;
    gap: 15px;
    align-items: end;
    margin-bottom: 5px;
}

.search-field-group {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.search-field-group label {
    font-weight: bold;
    color: #666;
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 3px;
    white-space: nowrap;
}

.search-field-group input[type="text"],
.search-field-group select {
    height: 32px;
    box-sizing: border-box;
}

.search-field-group select {
    min-width: 80px;
    padding: 6px 8px;
}

.search-field-group input[type="submit"] {
    height: 32px;
    padding: 6px 15px;
    box-sizing: border-box;
}

.search-help {
    margin-left: 0;
    margin-top: 5px;
}

.search-help .help {
    margin: 0;
    color: #666;
    font-size: 11px;
    font-style: italic;
}

/* ===== INDEX PAGE ABILITIES STYLES ===== */

/* Ability indicators (checkmarks and dashes) */
.ability-indicator {
    font-size: 1.2em;
    display: inline-block;
}

.ability-supported {
    color: var(--link-fg, #417690);
}

.ability-unsupported {
    color: var(--border-color, #ccc);
}

/* Backend name display */
.backend-name {
    font-size: 0.9em;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.backend-error {
    color: #ba2121;
    font-size: 0.85em;
}

/* Abilities legend section */
.abilities-legend {
    margin-top: 20px;
    padding: 10px;
    background: var(--darkened-bg, #f8f8f8);
    border-left: 3px solid var(--link-fg, #417690);
    border-radius: 4px;
}

.abilities-legend-title {
    margin: 0 0 10px 0;
    font-weight: bold;
    color: var(--body-fg, #333);
}

.abilities-legend-list {
    margin: 0;
    padding-left: 20px;
    list-style: none;
    color: var(--body-fg, #333);
}

.abilities-legend-list li {
    margin-bottom: 5px;
}

.abilities-legend-list strong {
    color: var(--body-fg, #333);
}

/* Configuration section styles */
.config-section-title {
    margin: 15px 0 5px 0;
    font-weight: 600;
    font-size: 0.95em;
    color: var(--body-quiet-color, #666);
}

.config-value-muted {
    opacity: 0.6;
}

.config-value-enabled {
    color: var(--link-fg, #417690);
}

.config-value-disabled {
    color: var(--link-fg, #417690);
}

.config-value-warning {
    color: #ba2121;
}

.config-url-code {
    font-size: 0.9em;
    opacity: 0.8;
}

.config-help-text {
    font-size: 0.85em;
    color: var(--body-quiet-color, #666);
    margin-top: 4px;
    margin-left: 0;
    line-height: 1.4;
    font-style: italic;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .ability-supported {
        color: var(--link-fg, #79aec8);
    }

    .ability-unsupported {
        color: var(--border-color, #555);
    }

    .abilities-legend {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        border-left-color: var(--link-fg, #79aec8);
    }

    .backend-error {
        color: #cc2936;
    }

    .config-section-title {
        color: var(--body-quiet-color, #999);
    }

    .config-value-enabled {
        color: var(--link-fg, #79aec8);
    }

    .config-value-disabled {
        color: var(--link-fg, #79aec8);
    }

    .config-value-warning {
        color: #cc2936;
    }

    .config-help-text {
        color: var(--body-quiet-color, #999);
    }
}

/* ===== COLLECTION MEMBER DELETE STYLES ===== */

.delete-member-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    border-radius: 3px;
    color: #dc3545;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.delete-member-btn:hover:not(:disabled) {
    background-color: #dc3545;
    color: white;
    transform: scale(1.1);
}

.delete-member-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.delete-member-btn:disabled:hover {
    background: none;
    transform: none;
}

/* ===== INLINE EDIT STYLES ===== */

.inline-edit-input {
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 4px 8px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    background-color: var(--body-bg, #fff);
    color: var(--body-fg, #333);
    min-width: 100px;
}

.inline-edit-input:focus {
    outline: none;
    border-color: #79aec8;
    box-shadow: 0 0 0 2px rgba(121, 174, 200, 0.2);
}

.inline-edit-btn {
    background: #79aec8;
    border: none;
    border-radius: 3px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
}

.inline-edit-btn:hover:not(:disabled) {
    background-color: #5b9bd5;
    transform: scale(1.05);
}

.inline-edit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.inline-edit-btn:disabled:hover {
    background-color: #ccc;
    transform: none;
}

/* ===== TASK ELEMENT STYLES ===== */

.task-name {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    background: var(--darkened-bg, #f5f5f5);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--link-fg, #417690);
}

.task-id {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8em;
    background: var(--darkened-bg, #f5f5f5);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--body-quiet-color, #666);
}

.task-id-full {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.75em;
    background: var(--darkened-bg, #f5f5f5);
    padding: 3px 6px;
    border-radius: 3px;
    color: var(--body-quiet-color, #666);
    word-break: break-all;
}

.task-args {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8em;
    background: var(--darkened-bg, #f5f5f5);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--body-fg, #333);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
    display: inline-block;
}

.task-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.task-status-active {
    background-color: var(--message-success-bg, #d4edda);
    color: var(--message-success-fg, #155724);
}

.task-status-reserved {
    background-color: var(--message-warning-bg, #fff3cd);
    color: var(--message-warning-fg, #856404);
}

.task-status-success {
    background-color: #d4edda;
    color: #155724;
}

.task-status-failure {
    background-color: #f8d7da;
    color: #721c24;
}

.task-status-retry {
    background-color: #fff3cd;
    color: #856404;
}

.task-status-revoked {
    background-color: #e2e3e5;
    color: #383d41;
}

.task-result-plain {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8em;
    background: var(--darkened-bg, #f5f5f5);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--body-fg, #333);
}

/* Dark mode support for task elements */
@media (prefers-color-scheme: dark) {
    .task-mode-badge {
        background-color: var(--link-fg, #79aec8);
    }

    .task-count-badge {
        background-color: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        color: var(--body-fg, #e0e0e0);
        border-color: var(--border-color, #444);
    }

    .task-name {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        color: var(--link-fg, #79aec8);
    }

    a .task-name {
        color: var(--link-fg, #79aec8);
    }

    .task-id {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        color: var(--body-quiet-color, #999);
    }

    .task-id-full {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        color: var(--body-quiet-color, #999);
    }

    .task-args {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        color: var(--body-fg, #e0e0e0);
    }

    .task-status-active {
        background-color: rgba(40, 167, 69, 0.2);
        color: #4caf50;
    }

    .task-status-reserved {
        background-color: rgba(255, 193, 7, 0.2);
        color: #ffc107;
    }

    .task-status-success {
        background-color: rgba(40, 167, 69, 0.2);
        color: #4caf50;
    }

    .task-status-failure {
        background-color: rgba(220, 53, 69, 0.2);
        color: #ef5350;
    }

    .task-status-retry {
        background-color: rgba(255, 193, 7, 0.2);
        color: #ffc107;
    }

    .task-status-revoked {
        background-color: rgba(128, 128, 128, 0.2);
        color: #999;
    }

    .task-result-plain {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        color: var(--body-fg, #e0e0e0);
    }
}

/* ===== QUEUE ELEMENT STYLES ===== */

.queue-name {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    background: var(--darkened-bg, #f5f5f5);
    padding: 3px 8px;
    border-radius: 3px;
    color: var(--link-fg, #417690);
    font-weight: 600;
}

.routing-key {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    background: var(--darkened-bg, #f5f5f5);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--body-fg, #333);
}

.worker-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.worker-badge {
    display: inline-block;
    padding: 3px 8px;
    background: var(--message-success-bg, #d4edda);
    color: var(--message-success-fg, #155724);
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

/* Dark mode support for queues */
@media (prefers-color-scheme: dark) {
    .queue-name {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        color: var(--link-fg, #79aec8);
    }

    .routing-key {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        color: var(--body-fg, #e0e0e0);
    }

    .worker-badge {
        background-color: rgba(40, 167, 69, 0.2);
        color: #4caf50;
    }
}

/* ===== WORKER ELEMENT STYLES ===== */

.worker-name {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
    background: var(--darkened-bg, #f5f5f5);
    padding: 2px 6px;
    border-radius: 3px;
    color: var(--link-fg, #417690);
}

.worker-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    text-transform: uppercase;
}

.worker-status-online {
    background-color: var(--message-success-bg, #d4edda);
    color: var(--message-success-fg, #155724);
}

.worker-status-offline {
    background-color: var(--message-error-bg, #f8d7da);
    color: var(--message-error-fg, #721c24);
}

/* Empty state styling */
.empty-state-row {
    background: transparent !important;
}

.empty-state-message {
    padding: 40px 20px !important;
    text-align: center;
    border: none !important;
}

.empty-state-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.empty-state-icon {
    font-size: 3em;
    opacity: 0.5;
}

.empty-state-title {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--body-fg, #333);
}

.empty-state-text {
    margin: 0;
    color: var(--body-quiet-color, #666);
    font-size: 0.95em;
}

/* Dark mode support for worker elements */
@media (prefers-color-scheme: dark) {
    .worker-name {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
        color: var(--link-fg, #79aec8);
    }

    .worker-status-online {
        background-color: rgba(40, 167, 69, 0.2);
        color: #4caf50;
    }

    .worker-status-offline {
        background-color: rgba(220, 53, 69, 0.2);
        color: #ef5350;
    }

    .empty-state-title {
        color: var(--body-fg, #e0e0e0);
    }

    .empty-state-text {
        color: var(--body-quiet-color, #999);
    }
}

/* ===== FILTER DROPDOWN STYLES ===== */

#filter-select {
    min-width: 180px;
    padding: 7px 30px 7px 10px;
    font-size: 13px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 4px;
    background-color: var(--body-bg, #fff);
    color: var(--body-fg, #333);
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%23333' d='M6 9L1 4h10z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
}

#filter-select:hover {
    border-color: var(--link-fg, #417690);
    box-shadow: 0 0 0 1px rgba(65, 118, 144, 0.1);
}

#filter-select:focus {
    outline: none;
    border-color: var(--link-fg, #417690);
    box-shadow: 0 0 0 3px rgba(65, 118, 144, 0.1);
}

/* Dark mode support for filter dropdown */
@media (prefers-color-scheme: dark) {
    #filter-select {
        background-color: var(--body-bg, #1a1a1a);
        border-color: var(--border-color, #444);
        color: var(--body-fg, #e0e0e0);
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3e%3cpath fill='%23e0e0e0' d='M6 9L1 4h10z'/%3e%3c/svg%3e");
    }

    #filter-select:hover {
        border-color: var(--link-fg, #79aec8);
        box-shadow: 0 0 0 1px rgba(121, 174, 200, 0.2);
    }

    #filter-select:focus {
        border-color: var(--link-fg, #79aec8);
        box-shadow: 0 0 0 3px rgba(121, 174, 200, 0.15);
    }
}

/* ===== TASK DETAIL PAGE STYLES ===== */

/* Custom width for detail table headers */
#result_list th {
    width: 200px;
}

/* Styles for code blocks in detail view */
#result_list pre {
    margin: 0;
    padding: 10px;
    background: var(--darkened-bg, #f5f5f5);
    border-radius: 4px;
    overflow-x: auto;
    max-height: 400px;
}

#result_list pre code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
    color: var(--body-fg, #333);
}

.task-traceback {
    color: var(--message-error-fg, #721c24);
    background: var(--message-error-bg, #f8d7da);
    border: 1px solid #f5c6cb;
}

.task-detail-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color, #ddd);
    display: flex;
    gap: 10px;
}

/* Dark mode support for task detail page */
@media (prefers-color-scheme: dark) {
    #result_list pre {
        background: var(--darkened-bg, rgba(255, 255, 255, 0.05));
    }

    #result_list pre code {
        color: var(--body-fg, #e0e0e0);
    }

    .task-traceback {
        color: #ef5350;
        background: rgba(220, 53, 69, 0.2);
        border-color: rgba(220, 53, 69, 0.3);
    }

    .task-detail-actions {
        border-top-color: var(--border-color, #444);
    }
}
