/* ============================================
   HEATMAP VIEW STYLES - Modern Responsive Layout
   ============================================ */

/* View Toggle Wrapper - No longer used, button moved to view-controls */

/* View Controls - Modern 2026 Design */
.view-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 16px;
    background: var(--control-bg);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    gap: 20px;
    border: 1px solid var(--control-border);
}

/* Filter Controls - Enhanced Layout */
.filter-controls-left {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    flex: 1;
}

.filter-controls-right {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.filter-group label {
    font-weight: 500;
    font-size: 0.875rem;
    margin: 0;
    white-space: nowrap;
    color: var(--label-color);
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-group label i {
    font-size: 0.95em;
    color: var(--icon-color);
}

/* Screen reader only text for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Modern Input Styling */
.filter-group select,
.filter-group input[type="text"] {
    padding: 7px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.875rem;
    transition: all 0.2s ease;
    font-family: inherit;
}

.filter-group select:hover,
.filter-group input[type="text"]:hover {
    border-color: var(--border-hover);
}

.filter-group select:focus,
.filter-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.filter-group select {
    min-width: 160px;
    cursor: pointer;
}

.filter-group input[type="text"] {
    min-width: 200px;
}

/* Search Input Wrapper with Clear Button */
.search-input-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.search-input-wrapper input[type="text"] {
    padding-right: 38px; /* Make room for clear button */
}

.search-clear-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--text-muted, #6c757d);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    line-height: 1;
    z-index: 10;
}

.search-clear-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-color, #212529);
}

.search-clear-btn:focus-visible {
    outline: 2px solid var(--primary-color, #007bff);
    outline-offset: 2px;
}

.search-clear-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Search Counter - Left of Search Input */
.search-counter {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 10px;
    background: var(--control-bg, #f8f9fa);
    border: 1px solid var(--border-color, #dee2e6);
    white-space: nowrap;
    transition: all 0.25s ease;
    line-height: 1.4;
    margin-right: 8px;
    min-width: 120px;
    text-align: center;
}

/* Search input active state */
.filter-group input[type="text"]:not(:placeholder-shown) {
    border-color: var(--primary-color, #007bff);
    box-shadow: 0 0 0 1px var(--primary-color, #007bff);
}

/* Compare Button Styling */
#compare-columns-btn {
    padding: 7px 14px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    border: none;
    min-width: 200px;
    white-space: nowrap;
}

#compare-columns-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#compare-columns-btn:active:not(:disabled) {
    transform: translateY(0);
}

#compare-columns-btn .btn-text {
    font-weight: 500;
}

/* Date Range Display - Match Last Updated Styling */
.filter-group-date {
    background: rgba(59, 130, 246, 0.08);
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 3px solid #3b82f6;
}

.date-range-display {
    cursor: pointer;
    padding: 0;
    border: none;
    background: transparent;
    font-size: 1rem;
    min-width: 240px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--text-color);
}

.date-range-display:hover {
    color: var(--primary-color);
}

.date-range-display:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.date-range-display:focus:not(:focus-visible) {
    outline: none;
}

.date-range-text {
    flex: 1;
}

/* Dark mode date range styling */
.dark-mode .filter-group-date {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-left-color: #60a5fa;
}

.dark-mode .date-range-display:hover {
    color: #60a5fa;
}

/* Checkbox Styling - Modern Toggle-like Appearance */
.filter-group label.checkbox-label {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.filter-group label.checkbox-label:hover {
    background-color: var(--checkbox-hover-bg);
}

.filter-group label.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.checkbox-text {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Filter Note - Enhanced with Icon */
.filter-note {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0;
    align-items: center;
    padding: 4px 8px;
    background: var(--info-bg);
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 3px solid var(--primary-color);
    width: 100%;
    gap: 4px;
}

.filter-note i {
    color: var(--primary-color);
    font-size: 1em;
    align-items: center;
}

.dark-mode .filter-note {
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-left: 3px solid var(--primary-color);
    color: var(--info-primary);
}

.dark-mode .filter-note i {
    color: var(--primary-info);
}

/* Heatmap Table Container */
.heatmap-container {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: var(--table-bg);
    overflow-x: hidden; /* Desktop: no overflow, table should fit */
}

.heatmap-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed; /* Force columns to fit within container */
    border-collapse: collapse;
    background: var(--table-bg);
}

/* Table Headers */
.heatmap-table thead th {
    background: var(--header-bg);
    color: var(--header-text);
    padding: 12px;
    text-align: center;
    font-weight: 600;
    position: sticky;
    z-index: 10;
    white-space: nowrap;
    border: 1px solid var(--border-color);
}

/* Environment column headers - clickable */
.heatmap-table thead th.env-col {
    cursor: pointer;
    user-select: none;
}

.heatmap-table thead th.env-col:hover {
    background: var(--row-hover-bg);
}

/* First row headers (Application + Environment Groups) */
.heatmap-table thead tr:first-child th {
    top: 0;
    text-align: center;
    border-bottom: 1px solid rgba(119, 119, 119, 0.8);
    border-top: 2px solid var(--primary-color);
}

/* Second row headers (Individual environments) */
.heatmap-table thead tr:nth-child(2) th {
    top: 37px; /* Exact height of first header row with collapsed borders */
    border-bottom: 2px solid var(--primary-color);
    text-align: center;
}

/* Environment column header borders - only on group perimeter, not for first/last in entire table */
.heatmap-table thead tr:nth-child(2) th.group-first-col:not(:nth-child(2)) {
    border-left: 2px solid var(--primary-color);
}

.heatmap-table thead tr:nth-child(2) th.group-last-col:not(:last-child) {
    border-right: 2px solid var(--primary-color);
}

.heatmap-table thead th:first-child {
    text-align: left;
    min-width: 200px;
    background: var(--header-bg);
    border-left: 2px solid var(--primary-color) !important;
    border-top: 2px solid var(--primary-color) !important;
    border-bottom: 2px solid var(--primary-color) !important;
    border-right: 1px solid var(--border-color);
    position: sticky;
    left: 0;
    z-index: 11;
}

/* Last column header - primary border on right to complete perimeter */
.heatmap-table thead tr:first-child th:last-child {
    border-right: 2px solid var(--primary-color);
}

.heatmap-table thead tr:nth-child(2) th:last-child {
    border-right: 2px solid var(--primary-color);
}

/* Environment Group Headers */
.env-group-header {
    background: var(--group-header-bg) !important;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 12px !important;
    border: 2px solid var(--primary-color) !important;
}

/* Group Column Borders - Create perimeter around each group */
.group-first-col {
    border-left: 2px solid var(--primary-color) !important;
}

.group-last-col {
    border-right: 2px solid var(--primary-color) !important;
}

/* Top border for first row - only first column gets primary border for corner */
tbody tr:first-child td:first-child {
    border-top: 2px solid var(--primary-color);
}

/* Top border for first row in environment columns - primary border for group perimeter */
tbody tr:first-child td:not(:first-child) {
    border-top: 2px solid var(--primary-color);
}

/* Bottom border for last row - only first column gets primary border for corner */
tbody tr:last-child td:first-child {
    border-bottom: 2px solid var(--primary-color);
}

/* Bottom border for last row in environment columns - primary border for group perimeter */
tbody tr:last-child td:not(:first-child) {
    border-bottom: 2px solid var(--primary-color);
}

/* Table Body - Zebra Striping for Better Readability */
.heatmap-table tbody tr {
    transition: all 0.2s ease;
}

/* Alternating row background colors */
.heatmap-table tbody tr:nth-child(even) td {
    background: var(--table-row-even);
}

.heatmap-table tbody tr:nth-child(even) td:first-child {
    background: var(--cell-app-even);
}

/* Row hover effect - highlight entire row */
.heatmap-table tbody tr:hover {
    box-shadow: inset 0 0 0 2px var(--row-hover-border);
    position: relative;
    z-index: 10;
}

.heatmap-table tbody tr:hover td {
    background: var(--row-hover-bg) !important;
}

.heatmap-table tbody tr:hover td:first-child {
    background: var(--row-hover-app-bg) !important;
}

.heatmap-table tbody td {
    padding: 11px 5px 11px 5px;
    text-align: center;
    position: relative;
    background: var(--table-bg);
    border: 1px solid rgba(119, 119, 119, 0.8);
    border-bottom: 1px solid var(--border-color);
}

.heatmap-table tbody td:first-child {
    text-align: left;
    font-weight: 500;
    background: var(--cell-app-bg);
    position: sticky;
    left: 0;
    z-index: 5;
    border: none;
    border-left: 2px solid var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    min-width: 180px;
    max-width: 350px;
    padding: 8px 12px;
    white-space: nowrap;
}

.heatmap-table tbody td.app-name-cell a {
    color: inherit;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color 0.2s ease;
    cursor: pointer;
    font-size: 0.9em;
}

.heatmap-table tbody td.app-name-cell a:hover {
    color: var(--primary-color);
    text-decoration: none;
}

/* Deployment Cell Styling */
.deployment-cell {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 2px;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    text-overflow: clip;
    overflow: hidden;
}

.deployment-cell:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 20;
}

.deployment-cell.empty {
    opacity: 0.3;
    cursor: default;
}

.deployment-cell.empty:hover {
    transform: none;
    box-shadow: none;
}

/* Status-based Indicators - Accessible color-coded cells with icons */
.deployment-cell.status-succeeded {
    background: #dbeafe;
    color: #1e3a8a;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 3px solid #3b82f6;
}

.deployment-cell.status-failed {
    background: #fee2e2;
    color: #7f1d1d;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 3px solid #ef4444;
}

.deployment-cell.status-unknown {
    background: #f3f4f6;
    color: #1f2937;
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-left: 3px solid #6b7280;
}

.deployment-cell.status-pending {
    background: #fef3c7;
    color: #78350f;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-left: 3px solid #f59e0b;
}

.deployment-cell.empty {
    background: var(--empty-cell-bg);
    color: var(--text-muted);
}

/* Date range filter highlight */
.deployment-cell.date-highlight {
    border: 5px solid #60a5fa !important;
    border-radius: 6px !important;
    box-shadow: 0 0 10px rgba(37, 100, 235, 0.849) !important;
    outline: 2px solid rgba(37, 99, 235, 0.3);
    outline-offset: 1px;
}

/* Cell Content */
.version-text {
    font-weight: 600;
    font-size: 0.8em;
    margin-bottom: 4px;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

.status-icon {
    font-size: 1.25em;
    margin-right: 5px;
}

.status-text {
    color: var(--text-color);
    font-weight: 600;
}

.age-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    opacity: 0.95;
}

/* Stats Overview Button */
.stats-overview-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    flex: 1;
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-color);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 3px solid #3b82f6;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.stats-overview-btn > i {
    color: #3b82f6;
    font-size: 1.1em;
}

.stats-overview-btn:hover {
    background: rgba(59, 130, 246, 0.12);
    border-left-color: #2563eb;
}

.stats-overview-btn:hover > i {
    color: #2563eb;
}

.stats-overview-btn:active {
    background: rgba(59, 130, 246, 0.15);
}

.stats-mini-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.stats-mini-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    color: #3b82f6;
}

.stats-mini-badge i {
    font-size: 0.85em;
}

.stats-mini-badge-warning {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.stats-overview-btn:hover .stats-mini-badge {
    background: rgba(59, 130, 246, 0.15);
}

.stats-overview-btn:hover .stats-mini-badge-warning {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(255, 91, 91, 0.747);
}

/* Stats Modal Styles */
.stats-modal-header {
    background: linear-gradient(135deg, #075985 0%, #0369a1 50%, #0ea5e9 100%);
    color: white;
    border-bottom: none;
}

.stats-modal-header .modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: white !important;
}

#stats-overview-modal .stats-modal-header .modal-title {
    color: white !important;
}

.stats-modal-header .modal-title i {
    color: #60a5fa !important;
}

.stats-modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.stats-modal-header .btn-close:hover {
    opacity: 1;
}

.stats-preview-summary {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 10px 16px;
    font-size: 1.1rem;
    font-weight: 500;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #3ebbff 0%, #c1ebff 100%);
    color: var(--text-color);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 3px solid #3b82f6;
    border-radius: 6px;    
}

.stats-preview-summary span {
    display: inline-block;
}

.stats-preview-summary #failed-count {
    color: rgb(194, 0, 0);
}

.stats-preview-summary #out-of-sync-count {
    color: rgb(255, 243, 72);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Add margin-top to app-success-section */
.app-success-section {
    margin-top: 24px;
}

/* Right-align the Application Success Rates header */
.app-success-section .collapsible-header {
    text-align: center;
    margin: 5px;
}

body.dark-mode .app-success-section .collapsible-header {
    color: #d1d5db;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--input-bg);
    border: 1px solid #3b82f6;
    border-radius: 6px;
    transition: all 0.2s ease;
    min-width: 0;
}

.stat-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.stat-item.stat-danger {
    border-color: #dc2626;
    background: rgba(239, 68, 68, 0.05);
}

.stat-item.stat-warning {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.05);
}

.stat-item.stat-success {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.05);
}

.stat-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    border-radius: 6px;
    color: white;
    font-size: 1.2em;
    flex-shrink: 0;
}

.stat-item.stat-danger .stat-icon {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.stat-item.stat-warning .stat-icon {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-item.stat-success .stat-icon {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-content {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================
   CONTROL PANELS - Grouped Action Controls
   ============================================ */

.control-panel {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 12px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.04) 0%, rgba(59, 130, 246, 0.02) 100%);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    transition: all 0.3s ease;
    height: fit-content;
}

.control-panel:hover {
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.08);
}

.control-panel-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-right: 8px;
    border-right: 1px solid var(--border-color);
}

.control-panel-icon {
    font-size: 0.8rem;
    color: var(--primary-color);
    opacity: 0.8;
}

.control-panel-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.control-panel-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Refresh Control Panel Specific */
.refresh-control-panel .control-panel-actions {
    gap: 6px;
}

.btn-icon-action {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: var(--input-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.btn-icon-action:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.btn-icon-action:active {
    transform: translateY(0) scale(0.95);
}

.btn-icon-action i.fa-sync-alt {
    transition: transform 0.4s ease;
}

.btn-icon-action:hover i.fa-sync-alt {
    transform: rotate(180deg);
}

.control-divider {
    width: 1px;
    height: 20px;
    background: var(--border-color);
    opacity: 0.4;
}

.form-select-inline {
    padding: 5px 10px;
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    background: var(--input-bg);
    color: var(--text-color);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 95px;
    height: 32px;
}

.form-select-inline:hover {
    border-color: var(--border-hover);
}

.form-select-inline:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.control-status {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: rgba(34, 197, 94, 0.08);
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    height: 32px;
}

/* Responsive Control Panels */
@media (max-width: 1200px) {
    .control-panel-title {
        font-size: 0.65rem;
    }
    
    .control-hint span {
        display: none;
    }
    
    .control-hint i {
        font-size: 1em;
    }
}

@media (max-width: 768px) {
    .control-panel {
        padding: 6px 10px;
        gap: 6px;
    }
    
    .control-panel-header {
        display: none;
    }
    
    .control-panel-title {
        display: none;
    }
    
    .control-panel-actions {
        gap: 4px;
    }
    
    .btn-action-primary .btn-text {
        display: none;
    }
    
    .form-select-inline {
        font-size: 0.75rem;
        min-width: 85px;
    }
    
    .control-status {
        font-size: 0.7rem;
    }
    
    .control-hint {
        display: none;
    }
}

/* Auto-refresh controls - Legacy support */
.last-refresh-time {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--input-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.refresh-label {
    font-weight: 500;
}

#refresh-time-text {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive adjustments for stats card */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
        gap: 10px;
    }
    
    .stat-item {
        padding: 10px;
        gap: 8px;
    }
    
    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1.1em;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.7rem;
    }
    
    .stats-preview {
        display: none;
    }
}

/* FAQ Modal Legend Styles */
.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin: 12px 0;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend-sample {
    width: 50px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    flex-shrink: 0;
}

.legend-sample.status-succeeded {
    background: #eff6ff;
    color: #1e3a8a;
    border-left: 3px solid #3b82f6;
}

.legend-sample.status-failed {
    background: #fef2f2;
    color: #7f1d1d;
    border-left: 3px solid #ef4444;
}

.legend-sample.status-unknown {
    background: #f9fafb;
    color: #1f2937;
    border-left: 3px solid #6b7280;
}

.legend-sample.status-pending {
    background: #fef3c7;
    color: #78350f;
    border-left: 3px solid #f59e0b;
}

body.dark-mode .legend-sample.status-succeeded {
    background: #1e3a8a;
    color: #93c5fd;
}

body.dark-mode .legend-sample.status-failed {
    background: #7f1d1d;
    color: #fecaca;
}

body.dark-mode .legend-sample.status-unknown {
    background: #374151;
    color: #e5e7eb;
}

body.dark-mode .legend-sample.status-pending {
    background: #78350f;
    color: #fef3c7;
}

/* FAQ Accordion Styles */
.faq-accordion {
    margin-top: 10px;
}

.faq-item {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.faq-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.faq-header {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    text-align: left;
    font-weight: 500;
    font-size: 0.95em;
    transition: background-color 0.2s ease;
}

.faq-header:hover {
    background: #e9ecef;
}

.faq-header i:first-child {
    width: 20px;
    text-align: center;
}

.faq-header span {
    flex: 1;
}

.faq-chevron {
    transition: transform 0.3s ease;
    color: #6c757d;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fff;
}

.faq-content > * {
    padding: 16px;
    margin: 0;
}

.faq-content ul,
.faq-content ol {
    padding-left: 36px;
    margin-bottom: 0;
}

.faq-content li {
    margin-bottom: 8px;
}

.faq-content li:last-child {
    margin-bottom: 0;
}

/* Dark mode FAQ accordion */
body.dark-mode .faq-item {
    border-color: #495057;
}

body.dark-mode .faq-header {
    background: #343a40;
    color: #e9ecef;
}

body.dark-mode .faq-header:hover {
    background: #495057;
}

body.dark-mode .faq-content {
    background: #212529;
    color: #e9ecef;
}

.deployment-cell.status-succeeded .status-icon {
    color: #3b82f6;
}

.deployment-cell.status-failed .status-icon {
    color: #ef4444;
}

.deployment-cell.status-unknown .status-icon {
    color: #6b7280;
}

.deployment-cell.status-pending .status-icon {
    color: #f59e0b;
}

body.dark-mode .deployment-cell.status-succeeded .status-icon {
    color: #60a5fa;
}

body.dark-mode .deployment-cell.status-failed .status-icon {
    color: #f87171;
}

body.dark-mode .deployment-cell.status-unknown .status-icon {
    color: #9ca3af;
}

body.dark-mode .deployment-cell.status-pending .status-icon {
    color: #fbbf24;
}

/* Compare Functionality Styles */
td.compare-mismatch {
    background-color: rgb(247, 251, 36) !important;
}

body.dark-mode td.compare-mismatch {
    background-color: rgba(251, 255, 0, 0.35) !important;
}

.compare-checkbox-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.compare-checkbox-container input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.compare-checkbox-container label {
    margin: 0;
    cursor: pointer;
    user-select: none;
    padding: 2px 4px;
    pointer-events: auto;
}

/* Date Range Highlighting styles moved to site.css for consistency */

/* Tooltip Styles */
.deployment-tooltip {
    position: absolute;
    background: var(--tooltip-bg);
    border: 1px solid var(--tooltip-border);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 280px;
    max-width: 400px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.deployment-tooltip.show {
    opacity: 1;
    pointer-events: auto;
    cursor: default;
}

.tooltip-header {
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.tooltip-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tooltip-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.tooltip-label {
    font-weight: 500;
    color: var(--text-muted);
}

.tooltip-value {
    font-weight: 600;
    color: var(--text-color);
}

.tooltip-link {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border-color);
}

.tooltip-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.tooltip-link a:hover {
    text-decoration: underline;
}

/* Details Modal */
.deployment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.deployment-modal.show {
    display: flex;
}

.modal-content-custom {
    background: var(--modal-bg);
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.4);
}

.modal-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--primary-color);
}

.modal-title {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: var(--text-muted);
    padding: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--danger-color);
    color: white;
    transform: rotate(90deg);
}

.modal-body-custom {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-section {
    background: var(--section-bg);
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.detail-section h4 {
    margin: 0 0 12px 0;
    font-size: 1.1em;
    color: var(--primary-color);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item-label {
    font-size: 0.85em;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-item-value {
    font-weight: 600;
    color: var(--text-color);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 600;
    border-left: 3px solid transparent;
}

.status-badge.succeeded {
    background: #dbeafe;
    color: #1e3a8a;
    border-left-color: #3b82f6;
}

.status-badge.succeeded i {
    color: #3b82f6;
}

.status-badge.failed {
    background: #fee2e2;
    color: #7f1d1d;
    border-left-color: #ef4444;
}

.status-badge.failed i {
    color: #ef4444;
}

.status-badge.pending {
    background: #fef3c7;
    color: #78350f;
    border-left-color: #f59e0b;
}

.status-badge.pending i {
    color: #f59e0b;
}

.status-badge.unknown {
    background: #f3f4f6;
    color: #1f2937;
    border-left-color: #6b7280;
}

.status-badge.unknown i {
    color: #6b7280;
}

body.dark-mode .status-badge.succeeded {
    background: #1e3a8a;
    color: #93c5fd;
    border-left-color: #60a5fa;
}

body.dark-mode .status-badge.succeeded i {
    color: #60a5fa;
}

body.dark-mode .status-badge.failed {
    background: #7f1d1d;
    color: #fecaca;
    border-left-color: #f87171;
}

body.dark-mode .status-badge.failed i {
    color: #f87171;
}

body.dark-mode .status-badge.pending {
    background: #78350f;
    color: #fef3c7;
    border-left-color: #f59e0b;
}

body.dark-mode .status-badge.pending i {
    color: #fbbf24;
}

body.dark-mode .status-badge.unknown {
    background: #374151;
    color: #e5e7eb;
    border-left-color: #9ca3af;
}

body.dark-mode .status-badge.unknown i {
    color: #9ca3af;
}

/* App Info Modal */
.app-info-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 3000;
    align-items: center;
    justify-content: center;
}

.app-info-modal.show {
    display: flex;
}

.app-info-modal .modal-content-custom {
    max-width: 700px;
}

.app-info-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.app-info-link:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* App Name Tooltip */
.app-name-tooltip {
    position: absolute;
    background: var(--tooltip-bg);
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 2500;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
    font-size: 0.9em;
    color: var(--text-color);
    font-weight: 500;
}

.app-name-tooltip.show {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .heatmap-table thead th:first-child {
        min-width: 150px;
    }
    
    .deployment-cell {
        min-height: 50px;
        padding: 6px;
    }
    
    .version-text {
        font-size: 0.8em;
    }
}

/* Mobile table adjustments */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 1rem;
    }
    
    .heatmap-table {
        min-width: 800px;
        font-size: 0.85rem;
    }
    
    .heatmap-table thead th {
        padding: 8px 4px;
        font-size: 0.75rem;
    }
    
    .heatmap-table thead th:first-child {
        min-width: 120px;
        position: sticky;
        left: 0;
        z-index: 10;
        background: var(--control-bg);
    }
    
    .deployment-cell {
        min-height: 44px;
        padding: 4px;
    }
    
    .version-text {
        font-size: 0.7em;
    }
    
    .status-icon {
        font-size: 0.9em;
    }
}

@media (max-width: 768px) {
    /* View Controls - Stack vertically for mobile */
    .view-controls {
        flex-direction: column;
        padding: 12px;
        gap: 12px;
        margin-bottom: 16px;
    }
    
    /* Filter Controls - Better mobile layout */
    .filter-controls-left,
    .filter-controls-right {
        flex-direction: column;
        width: 100%;
        gap: 12px;
        margin-left: 0;
        align-items: stretch;
    }
    
    .filter-group {
        width: 100%;
        min-width: 100%;
        display: inline-grid;
        align-items: stretch;
        gap: 6px;
    }
    
    .filter-group label {
        width: 100%;
        font-size: 0.9rem;
        flex-shrink: 0;
        font-weight: 600;
    }
    
    .filter-group label i {
        display: none !important;
    }
    
    .filter-group select,
    .filter-group input[type="text"] {
        width: 100%;
        min-width: 100%;
        padding: 10px 12px;
        font-size: 1rem;
        min-height: 44px;
    }
    
    /* Date Range Display - Full width on mobile */
    .filter-group-date {
        width: 100%;
    }
    
    .date-range-display {
        width: 100%;
        min-width: 100%;
        justify-content: space-between;
    }
    
    /* Compare Button - Full width */
    #compare-columns-btn {
        width: 100%;
        min-width: 100%;
        min-height: 44px;
        padding: 12px 16px;
        font-size: 1rem;
        font-weight: 600;
    }
    
    /* Action Buttons - Adequate touch targets */
    .btn-action-primary,
    .btn-action-secondary {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 1rem;
    }
    
    /* Icon buttons need proper touch area */
    .btn-icon-action {
        min-width: 44px;
        min-height: 44px;
        width: 44px;
        height: 44px;
    }
    
    /* Filter Note - Better mobile visibility */
    .filter-note {
        font-size: 0.75rem;
        padding: 8px 8px;
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Filter Note Wrapper - Stack vertically on mobile */
    .filter-note-wrapper {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .filter-last-updated {
        width: 100%;
        justify-content: flex-start;
    }

    /* Date Range Container - Single line with icon and note */
    .date-range-note-container {
        display: flex;
        align-items: flex-start;
        gap: 4px;
    }

    .date-range-note-container .filter-group-date {
        flex-shrink: 0;
        width: 100%;
        padding: 0;
        display: flex;
        justify-content: flex-start;
    }

    .date-range-note-container .date-range-display {
        display: none !important; /* Hide the date range display div on mobile */
    }

    .calendar-picker-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 10px;
        width: 44px;
        height: 44px;
        cursor: pointer;
        background: var(--date-pill-bg);
        border: 1.5px solid var(--date-pill-border);
        border-radius: 6px;
        position: relative;
        z-index: 1;
        gap: 0;
    }
    .calendar-picker-btn:hover {
        background: var(--date-hover-bg);
    }
    .calendar-picker-btn i {
        font-size: 1.5rem;
        color: var(--primary-color);
    }

    .date-range-note-container .filter-group-date label:hover {
        background: var(--date-hover-bg);
    }

    .date-range-note-container .filter-group-date label span {
        display: none !important; /* Hide label text on mobile */
    }

    .date-range-note-container .filter-group-date label i {
        display: inline-block !important;
        visibility: visible !important;
        font-size: 1.5rem !important;
        color: var(--primary-color) !important;
        margin: 0 !important;
    }

    .date-range-note-container .date-range-text {
        display: none !important; /* Hide date text on mobile */
    }
    
    .date-range-note-container .date-range-display i,
    .date-range-note-container .date-range-display .fa,
    .date-range-note-container .date-range-display .fa-calendar-alt {
        margin: 0 !important;
        padding: 0 !important;
        font-size: 1.5rem !important;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        color: var(--primary-color) !important;
        position: relative;
        z-index: 2;
        line-height: 1 !important;
        width: auto !important;
        height: auto !important;
    }

    .date-range-note-container .date-range-display i::before,
    .date-range-note-container .date-range-display .fa::before,
    .date-range-note-container .date-range-display .fa-calendar-alt::before {
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        content: attr(data-icon) !important;
    }

    .date-range-note-container .filter-note {
        flex: 1;
        margin: 0;
        max-width: 100%;
        box-sizing: border-box;
        font-size: 0.7rem;
        padding: 6px 12px;
        overflow: hidden;
    }

    /* Table Container - Enable horizontal scroll */
    .heatmap-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 6px;
    }
    
    /* Table - Minimum readable width */
    .heatmap-table {
        min-width: 800px; /* Ensures table doesn't compress too much */
    }
    
    /* Application Column - Sticky and readable */
    .heatmap-table thead th:first-child {
        min-width: 120px;
        font-size: 0.8rem;
        padding: 8px 6px;
        position: sticky;
        left: 0;
        z-index: 12;
        background: var(--header-bg);
    }
    
    .heatmap-table tbody td:first-child {
        min-width: 120px;
        font-size: 0.8rem;
        padding: 8px 6px;
        position: sticky;
        left: 0;
        z-index: 6;
        background: var(--cell-app-bg);
    }
    
    /* Environment Headers - More compact */
    .heatmap-table thead th {
        font-size: 0.75rem;
        padding: 8px 4px;
        min-width: 80px;
    }
    
    /* Environment Group Headers - Compact */
    .env-group-header {
        font-size: 0.7rem;
        padding: 6px 8px !important;
    }
    
    /* Deployment Cells - Better mobile sizing */
    .heatmap-table tbody td {
        padding: 8px 4px;
        min-width: 80px;
    }
    
    .deployment-cell {
        min-height: 65px;
        padding: 6px 4px;
    }
    
    .version-text {
        font-size: 0.6rem;
        line-height: 1.2;
    }
    
    .age-indicator {
        font-size: 0.65rem;
    }
    
    /* Checkbox Container - Smaller */
    .compare-checkbox-container {
        padding: 2px;
        gap: 1px;
    }
    
    .compare-checkbox-container input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
    
    .compare-checkbox-container label {
        font-size: 0.7rem;
    }
    
    /* Tooltips - Smaller for mobile */
    .deployment-tooltip {
        min-width: 240px;
        max-width: 90vw;
        font-size: 0.85rem;
        padding: 12px;
    }
    
    .tooltip-header {
        font-size: 0.95rem;
    }
    
    /* Modals - Full screen on mobile */
    .modal-content-custom {
        width: 95%;
        max-width: 95%;
        margin: 10px;
        padding: 16px;
    }
    
    .modal-title {
        font-size: 1.2rem;
    }
    
    /* Header Controls - Better mobile spacing */
    .header-controls {
        width: auto;
        padding-right: 8px;
        gap: 8px;
    }
    
    .header-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    /* Navbar heading - Mobile responsive */
    .navbar_heading {
        font-size: 1.3rem;
        text-align: center;
    }
    
    .navbar_heading a {
        display: block;
        line-height: 1.2;
    }

    /* Current date - Smaller on mobile */
    #current-date {
        font-size: 0.75rem;
        text-align: center;
        padding: 0 10px;
    }

    /* Navbar brand - Better mobile sizing */
    .navbar-brand {
        width: auto;
    }

    .navbar-brand img {
        height: 50px;
        width: auto;
    }

    /* Main navbar - Better mobile layout */
    .navbar {
        padding: 8px 10px;
    }
    
    .navbar .d-flex {
        padding: 0 10px;
    }
}

/* Dark Mode Support - VS Code Dark Modern Theme */
body.dark-mode {
    --control-bg: #2d2d2d;
    --control-border: #454545;
    --table-bg: #1e1e1e;
    --header-bg: #2d2d2d;
    --header-text: #cccccc;
    --group-header-bg: #2d2d2d;
    --row-hover-bg: #2a2d2e;
    --row-hover-app-bg: #2a2d2e;
    --row-hover-border: #007acc;
    --table-row-even: #252526;
    --cell-app-even: #2d2d2d;
    --cell-app-bg: #2d2d2d;
    --border-color: #3e3e3e;
    --border-hover: #565656;
    --text-color: #cccccc;
    --text-muted: #858585;
    --label-color: #cccccc;
    --icon-color: #858585;
    --input-bg: #3c3c3c;
    --empty-cell-bg: #2d2d2d;
    --tooltip-bg: #252526;
    --tooltip-border: #454545;
    --modal-bg: #252526;
    --section-bg: #1e1e1e;
    --primary-color: #007acc;
    --danger-color: #f48771;
    --focus-ring: rgba(0, 122, 204, 0.4);
    --date-pill-bg: rgba(0, 122, 204, 0.15);
    --date-pill-border: rgba(0, 122, 204, 0.4);
    --date-hover-bg: rgba(0, 122, 204, 0.2);
    --checkbox-hover-bg: rgba(255, 255, 255, 0.1);
    --info-bg: rgba(0, 122, 204, 0.15);
    --info-text: #858585;
}

/* Dark Mode Search Clear Button */
body.dark-mode .search-clear-btn {
    color: #858585;
}

body.dark-mode .search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #cccccc;
}

body.dark-mode .search-counter {
    background: #2d2d2d;
    border-color: #454545;
}

/* Dark Mode Stats Modal */
body.dark-mode .stat-item {
    background: #2d2d2d;
    border-color: #707070;
}

body.dark-mode .stat-item.stat-danger {
    border-color: #dc2626;
    background: rgba(239, 68, 68, 0.15);
}

body.dark-mode .stat-item.stat-warning {
    border-color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
}

body.dark-mode .stat-item.stat-success {
    border-color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

body.dark-mode .stat-value {
    color: #cccccc;
}

body.dark-mode .stat-label {
    color: #858585;
}

body.dark-mode .stats-preview-summary {
    background: linear-gradient(135deg, #004368 0%, #002231 100%);
    border: none;
    border-radius: 6px;
    border-left: 3px solid #3b82f6;    
    color: #cccccc;
}

body.dark-mode .stats-preview-summary #failed-count {
    color: #ff3939;
}

/* Dark Mode - Control Panels */
body.dark-mode .control-panel {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08) 0%, rgba(59, 130, 246, 0.04) 100%);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .control-panel:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

body.dark-mode .btn-icon-action {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .btn-icon-action:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

body.dark-mode .control-divider {
    background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .form-select-inline option {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

body.dark-mode .control-status {
    background: rgba(34, 197, 94, 0.12);
}

body.dark-mode .control-hint {
    color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .last-refresh-time {
    background: #3c3c3c;
    border-color: #454545;
    color: #858585;
}

body.dark-mode #refresh-time-text {
    color: #ffffff;
}

/* Dark Mode Status Cell Colors - Accessible with Blue/Red Distinction */
body.dark-mode .deployment-cell.status-succeeded {
    background: #1e40af;
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 3px solid #3b82f6;
}

body.dark-mode .deployment-cell.status-failed {
    background: #991b1b;
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-left: 3px solid #ef4444;
}

body.dark-mode .deployment-cell.status-unknown {
    background: #4b5563;
    color: #e5e7eb;
    border: 1px solid rgba(107, 114, 128, 0.3);
    border-left: 3px solid #6b7280;
}

body.dark-mode .deployment-cell.status-pending {
    background: #78350f;
    color: #fef3c7;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-left: 3px solid #f59e0b;
}

/* Dark mode date range filter highlight */
body.dark-mode .deployment-cell.date-highlight {
    border: 5px solid #60a5fa !important;
    border-radius: 6px !important;
    box-shadow: 0 0 8px rgb(96, 165, 250) !important;
    outline: 2px solid rgba(96, 165, 250, 0.4);
    outline-offset: 1px;
}

body.dark-mode .heatmap-table tbody td:first-child {
    background: var(--cell-app-bg);
    border-left: 2px solid var(--primary-color);
}

body.dark-mode .heatmap-table {
    background: var(--table-bg);
    border-color: var(--border-color);
}

body.dark-mode th {
    background: var(--header-bg);
    color: var(--header-text);
}

/* Row hover handled by general tbody tr:hover rules above */

/* Light Mode Variables - VS Code Quiet Light Theme */
body:not(.dark-mode) {
    --control-bg: #f5f5f5;
    --control-border: #d4d4d4;
    --table-bg: #fefefe;
    --header-bg: #e5e7eb;
    --header-text: #333333;
    --group-header-bg: #d1d5db;
    --row-hover-bg: #d6ecf2;
    --row-hover-app-bg: #c0dfe6;
    --row-hover-border: #0066bf;
    --table-row-even: #f8f9fa;
    --cell-app-even: #e5e7eb;
    --cell-app-bg: #e5e7eb;
    --border-color: #b0b0b0;
    --border-hover: #b0b0b0;
    --text-color: #333333;
    --text-muted: #6a737d;
    --label-color: #333333;
    --icon-color: #6a737d;
    --input-bg: #ffffff;
    --empty-cell-bg: #f0f0f0;
    --tooltip-bg: #f5f5f5;
    --tooltip-border: #d4d4d4;
    --modal-bg: #ffffff;
    --section-bg: #f9f9f9;
    --primary-color: #0066bf;
    --danger-color: #cd3131;
    --focus-ring: rgba(0, 102, 191, 0.3);
    --date-pill-bg: rgba(0, 102, 191, 0.08);
    --date-pill-border: rgba(0, 102, 191, 0.25);
    --date-hover-bg: rgba(0, 102, 191, 0.12);
    --checkbox-hover-bg: rgba(0, 0, 0, 0.05);
    --info-bg: rgba(0, 102, 191, 0.08);
    --info-text: #6a737d;
}

/* Animation for view transitions */
.view-transition-enter {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   HEADER CONTROLS - Modern Icon Buttons
   ============================================ */
.header-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-end;
    width: 200px;
    flex-shrink: 0;
    padding-right: 16px;
}

.header-btn {
    font-size: 1.5rem;
    color: #3b82f6;
    padding: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    text-decoration: none;
}

.header-btn:hover {
    background: rgba(59, 130, 246, 0.1);
    transform: scale(1.1);
    text-decoration: none;
}

/* FAQ button - black background like theme toggle in light mode */
#faq_button {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #60a5fa;
}

#faq_button:hover {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}

/* Floating Feedback Button */
.floating-feedback-btn {
    position: fixed;
    bottom: 30px;
    right: 40px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #60a5fa;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-feedback-btn:hover {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    box-shadow: 0 0 25px rgba(96, 165, 250, 0.5);
    transform: scale(1.1);
}

.floating-feedback-btn:active {
    transform: scale(0.95);
}

/* Feedback Chat Popover */
.feedback-popover {
    position: fixed;
    bottom: 100px;
    right: 45px;
    width: 475px;
    max-height: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 999;
    display: flex;
    flex-direction: column;
    animation: slideInFromRight 0.3s ease-out;
    border: 1px solid #e5e7eb;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px) translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

.feedback-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #334c74 0%, #a0c9ff 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.feedback-popover-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    align-items: center;
}

.feedback-close-btn {
    background: transparent;
    border: none;
    color: #696464;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.feedback-close-btn:hover {
    background: rgba(96, 165, 250, 0.2);
    transform: scale(1.1);
}

.feedback-popover-body {
    padding: 20px;
    overflow-y: auto;
    max-height: 450px;
    flex: 1;
}

.feedback-popover-body::-webkit-scrollbar {
    width: 8px;
}

.feedback-popover-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.feedback-popover-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.feedback-popover-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.feedback-popover-footer {
    padding: 15px 20px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
}

.feedback-popover .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: #374151;
}

.feedback-popover .form-control,
.feedback-popover .form-select {
    font-size: 0.875rem;
}

.feedback-popover .text-muted {
    color: #6b7280 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .feedback-popover {
        width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);
        right: 16px;
        bottom: 100px;
        max-height: 70vh;
    }
    
    .feedback-popover-body {
        max-height: calc(70vh - 120px);
        overflow-y: auto;
    }
    
    .floating-feedback-btn {
        bottom: 24px;
        right: 24px;
        width: 56px;
        height: 56px;
        font-size: 1.4rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    }
    
    .feedback-popover .form-control,
    .feedback-popover .form-select {
        font-size: 1rem;
        min-height: 44px;
        padding: 10px 12px;
    }
    
    .feedback-popover textarea.form-control {
        min-height: 120px;
    }
}

/* Theme toggle button - moon (dark mode) in light theme */
#theme_toggle {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #60a5fa;
}

#theme_toggle:hover {
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.3);
}

.header-btn:active {
    transform: scale(0.95);
}

.header-btn:focus-visible {
    outline: 2px solid var(--primary-color, #3b82f6);
    outline-offset: 2px;
}

.header-btn:focus:not(:focus-visible) {
    outline: none;
}

/* Dark mode adjustments for header buttons */
.dark-mode .header-btn {
    color: #60a5fa;
}

.dark-mode .header-btn:hover {
    background: rgba(96, 165, 250, 0.15);
}

/* Dark mode - FAQ button blue background like theme toggle */
.dark-mode #faq_button {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #000000;
}

.dark-mode #faq_button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
}

/* Dark mode - Floating Feedback Button */
.dark-mode .floating-feedback-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #000000;
}

.dark-mode .floating-feedback-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.6);
}

/* Dark mode - Feedback Popover */
.dark-mode .feedback-popover {
    background: #1e1e1e;
    border-color: #454545;
}

.dark-mode .feedback-popover-header {
    background: linear-gradient(135deg, #2e3d57 0%, #195bac 100%);
}

.dark-mode .feedback-close-btn {
    color: #000000;
}

.dark-mode .feedback-close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
}

.dark-mode .feedback-popover-body {
    background: #1e1e1e;
}

.dark-mode .feedback-popover-body::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.dark-mode .feedback-popover-body::-webkit-scrollbar-thumb {
    background: #454545;
}

.dark-mode .feedback-popover-body::-webkit-scrollbar-thumb:hover {
    background: #565656;
}

.dark-mode .feedback-popover-footer {
    background: #252526;
    border-top-color: #454545;
}

.dark-mode .feedback-popover .form-label {
    color: #cccccc;
}

.dark-mode .feedback-popover .form-control,
.dark-mode .feedback-popover .form-select {
    background: #2d2d2d;
    color: #cccccc;
    border-color: #454545;
}

.dark-mode .feedback-popover .form-control:focus,
.dark-mode .feedback-popover .form-select:focus {
    background: #3e3e3e;
    border-color: #3b82f6;
    color: #cccccc;
}

.dark-mode .feedback-popover .text-muted {
    color: #999999 !important;
}

/* Dark mode - Theme toggle button becomes sun (light mode icon) with blue sky */
.dark-mode #theme_toggle {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    color: #000000;
}

.dark-mode #theme_toggle:hover {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.4);
}

/* ============================================
   FILTER NOTE WRAPPER WITH LAST UPDATED
   ============================================ */
.filter-note-wrapper {
    display: flex;
    align-items: stretch;
    margin-bottom: 12px;
    gap: 12px;
}

.filter-last-updated {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 3px solid #3b82f6;
    white-space: nowrap;
}

.filter-last-updated .last-updated-label {
    font-size: .9rem;
    font-weight: 600;
}

.filter-last-updated .last-updated-time {
    font-size: .9rem;
    font-weight: 500;
}

.dark-mode .filter-last-updated {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-left: 3px solid #60a5fa;
}

.dark-mode .filter-last-updated .last-updated-label {
    color: #94a3b8;
}

.date-range-note-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
}

.date-range-note-container .filter-group-date {
    margin: 0;
}

.date-range-note-container .filter-note {
    margin: 0;
    white-space: normal;
    min-height: 44px;
    display: flex;
    align-items: center;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.calendar-picker-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 10px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: var(--date-pill-bg);
  border: 1.5px solid var(--date-pill-border);
  border-radius: 6px;
  position: relative;
  z-index: 1;
  gap: 0;
}

.calendar-picker-btn:hover {
  background: var(--date-hover-bg);
}

.calendar-picker-btn i {
  font-size: 1.25rem;
  color: var(--primary-color);
}

/* ============================================
   LIVE CLOCK DISPLAY
   ============================================ */
.live-clock {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(59, 130, 246, 0.08);
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-left: 3px solid #3b82f6;
    white-space: nowrap;
}

.live-clock:hover {
    background: rgba(59, 130, 246, 0.12);
}

.clock-calendar {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    min-width: 50px;
}

.calendar-month {
    background: #3b83f688;
    color: black;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    width: 100%;
    text-align: center;
    letter-spacing: 0.05em;
}

.calendar-day {
    color: #1f2937;
    font-size: 1rem;
    font-weight: 700;
    padding: 4px 8px;
    line-height: 1;
}

.clock-time {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-shadow: 0 0 10px rgba(59, 130, 246, 0.3);
}

.dark-mode .live-clock {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.25);
    border-left-color: #60a5fa;
}

.dark-mode .live-clock:hover {
    background: rgba(96, 165, 250, 0.15);
}

.dark-mode .clock-calendar {
    background: #f9fafb;
}

.dark-mode .calendar-month {
    background: rgb(96, 165, 250);
}

.dark-mode .calendar-day {
    color: #111827;
}

.dark-mode .clock-time {
    color: #60a5fa;
    text-shadow: 0 0 10px rgba(96, 165, 250, 0.4);
}

/* Modal behavior is now controlled by site.css - removed conflicting rules */
