@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    /* Light theme colors */
    --bg-color: #ffffff;
    --text-color: #000000;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --primary-color: #1b6ec2;
    --primary-hover: #1861ac;
    --secondary-color: #6c757d;
    --secondary-hover: #5c636a;
    --danger-color: #dc3545;
    --success-color: #26b050;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --card-bg: #ffffff;
    --input-bg: #ffffff;
    --navbar-bg: #ffffff;
    --sidebar-bg: #f8f9fa;
    --dropdown-bg: #ffffff;
    --modal-bg: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] {
    /* Dark theme colors */
    --bg-color: #1a1a1a;
    --text-color: #e0e0e0;
    --text-muted: #a0a0a0;
    --border-color: #404040;
    --primary-color: #4a9eff;
    --primary-hover: #3d8bdb;
    --secondary-color: #6c757d;
    --secondary-hover: #7a8288;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --card-bg: #2d2d2d;
    --input-bg: #333333;
    --navbar-bg: #2d2d2d;
    --sidebar-bg: #252525;
    --dropdown-bg: #2d2d2d;
    --modal-bg: #2d2d2d;
    --shadow: rgba(255, 255, 255, 0.1);
    --shadow-hover: rgba(255, 255, 255, 0.2);
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Force dark theme on all major Bootstrap elements */
[data-theme="dark"] body,
[data-theme="dark"] .bb-page,
[data-theme="dark"] .content,
[data-theme="dark"] main {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .bb-top-row {
    background-color: var(--navbar-bg) !important;
    color: var(--text-color) !important;
}

/* BlazorBootstrap Sidebar dark theme */
[data-theme="dark"] .bb-sidebar,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .bb-sidebar-nav,
[data-theme="dark"] .bb-navbar,
[data-theme="dark"] .bb-navbar-brand {
    background-color: var(--sidebar-bg) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .bb-sidebar .nav-link,
[data-theme="dark"] .sidebar .nav-link,
[data-theme="dark"] .bb-sidebar-nav-link,
[data-theme="dark"] .bb-nav-link,
[data-theme="dark"] .bb-sidebar-nav-item,
[data-theme="dark"] .bb-nav-item {
    color: var(--text-color) !important;
    background-color: transparent !important;
}

[data-theme="dark"] .bb-sidebar .nav-link:hover,
[data-theme="dark"] .sidebar .nav-link:hover,
[data-theme="dark"] .bb-sidebar-nav-link:hover,
[data-theme="dark"] .bb-nav-link:hover,
[data-theme="dark"] .bb-sidebar-nav-item:hover,
[data-theme="dark"] .bb-sidebar-nav-item-active {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* BlazorBootstrap Navigation Icons */
[data-theme="dark"] .bb-sidebar-nav-icon,
[data-theme="dark"] .bb-icon,
[data-theme="dark"] .bi {
    color: var(--text-color) !important;
}

/* BlazorBootstrap Brand and Header */
[data-theme="dark"] .bb-sidebar-brand,
[data-theme="dark"] .bb-sidebar-brand img,
[data-theme="dark"] .bb-sidebar-brand svg {
    background-color: var(--sidebar-bg) !important;
    color: var(--text-color) !important;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--primary-color);
}

.btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-hover);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem var(--bg-color), 0 0 0 0.25rem var(--primary-color);
}

.content {
    padding-top: 1.1rem;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success-color);
}

.invalid {
    outline: 1px solid var(--danger-color);
}

.validation-message {
    color: var(--danger-color);
}

/* Bootstrap Form controls dark theme */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .form-check-input {
    background-color: var(--input-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus,
[data-theme="dark"] .form-check-input:focus {
    background-color: var(--input-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(74, 158, 255, 0.25) !important;
}

/* Bootstrap Cards dark theme */
[data-theme="dark"] .card {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .card-header,
[data-theme="dark"] .card-footer {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

/* Bootstrap Tables dark theme */
[data-theme="dark"] .table {
    color: var(--text-color) !important;
}

[data-theme="dark"] .table th,
[data-theme="dark"] .table td {
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > td,
[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > th {
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* Bootstrap Dropdowns dark theme */
[data-theme="dark"] .dropdown-menu {
    background-color: var(--dropdown-bg) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-color) !important;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Bootstrap Buttons dark theme */
[data-theme="dark"] .btn-outline-secondary {
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: white !important;
}

/* Bootstrap Modals dark theme */
[data-theme="dark"] .modal-content {
    background-color: var(--modal-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: var(--border-color) !important;
    background-color: var(--modal-bg) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .modal-title {
    color: var(--text-color) !important;
}

/* Bootstrap Nav tabs dark theme */
[data-theme="dark"] .nav-tabs {
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .nav-tabs .nav-link {
    color: var(--text-color) !important;
    border-color: transparent !important;
}

[data-theme="dark"] .nav-tabs .nav-link:hover {
    border-color: var(--border-color) var(--border-color) var(--border-color) !important;
}

[data-theme="dark"] .nav-tabs .nav-link.active {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) var(--border-color) var(--bg-color) !important;
}

/* Bootstrap List groups dark theme */
[data-theme="dark"] .list-group-item {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .list-group-item:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* Additional BlazorBootstrap Components dark theme */
[data-theme="dark"] .bb-main,
[data-theme="dark"] .bb-main-content,
[data-theme="dark"] .bb-content-wrapper,
[data-theme="dark"] .bb-page-wrapper {
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .bb-preload,
[data-theme="dark"] .bb-modal,
[data-theme="dark"] .bb-toast,
[data-theme="dark"] .bb-alert {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .bb-modal .modal-header,
[data-theme="dark"] .bb-modal .modal-content .modal-header,
[data-theme="dark"] .modal.bb-modal .modal-dialog .modal-content .modal-header,
[data-theme="dark"] .modal-header {
    background-color: var(--modal-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

/* Even more aggressive targeting for stubborn Bootstrap styles */
[data-theme="dark"] .modal .modal-header {
    background-color: #2d2d2d !important;
    color: #e0e0e0 !important;
    border-color: #404040 !important;
}

[data-theme="dark"] .bb-modal .modal-title,
[data-theme="dark"] .bb-modal .modal-header .modal-title,
[data-theme="dark"] .bb-modal .modal-header h5,
[data-theme="dark"] .bb-modal .modal-header h4,
[data-theme="dark"] .bb-modal .modal-header h3,
[data-theme="dark"] .bb-modal .modal-header h2,
[data-theme="dark"] .bb-modal .modal-header h1 {
    color: var(--text-color) !important;
}

[data-theme="dark"] .bb-dropdown-menu {
    background-color: var(--dropdown-bg) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .bb-dropdown-item {
    color: var(--text-color) !important;
}

[data-theme="dark"] .bb-dropdown-item:hover {
    background-color: var(--primary-color) !important;
    color: white !important;
}

/* BlazorBootstrap Navigation Toggler */
[data-theme="dark"] .bb-sidebar-toggler,
[data-theme="dark"] .bb-navbar-toggler {
    background-color: var(--input-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

/* BlazorBootstrap Breadcrumb */
[data-theme="dark"] .bb-breadcrumb {
    background-color: var(--card-bg) !important;
}

[data-theme="dark"] .bb-breadcrumb-item,
[data-theme="dark"] .breadcrumb-item {
    color: var(--text-color) !important;
}

[data-theme="dark"] .bb-breadcrumb-item a,
[data-theme="dark"] .breadcrumb-item a {
    color: var(--primary-color) !important;
}

/* BlazorBootstrap Badges and Labels */
[data-theme="dark"] .bb-badge,
[data-theme="dark"] .badge {
    background-color: var(--secondary-color) !important;
    color: white !important;
}

/* Ensure all text elements inherit dark theme colors */
[data-theme="dark"] p,
[data-theme="dark"] span,
[data-theme="dark"] div,
[data-theme="dark"] label,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    color: var(--text-color) !important;
}

/* Specific fixes for BlazorBootstrap Sidebar component */
[data-theme="dark"] .sidebar-brand,
[data-theme="dark"] .sidebar-brand-text,
[data-theme="dark"] .sidebar-brand-icon {
    color: var(--text-color) !important;
    background-color: var(--sidebar-bg) !important;
}

/* Force all nested elements in sidebar to use dark theme */
[data-theme="dark"] .bb-sidebar *,
[data-theme="dark"] .sidebar * {
    color: var(--text-color) !important;
}

[data-theme="dark"] .bb-sidebar a,
[data-theme="dark"] .sidebar a {
    color: var(--text-color) !important;
    text-decoration: none !important;
}

[data-theme="dark"] .bb-sidebar a:hover,
[data-theme="dark"] .sidebar a:hover {
    color: white !important;
    background-color: var(--primary-color) !important;
}

/* Additional top bar specifics */
[data-theme="dark"] .bb-top-row * {
    color: var(--text-color) !important;
}

/* Override any remaining white backgrounds */
[data-theme="dark"] .bg-white {
    background-color: var(--bg-color) !important;
}

[data-theme="dark"] .bg-light {
    background-color: var(--card-bg) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .text-dark {
    color: var(--text-color) !important;
}

[data-theme="dark"] .text-muted {
    color: var(--text-muted) !important;
}

/* Bootstrap colored table backgrounds dark mode fixes */
[data-theme="dark"] .table-success,
[data-theme="dark"] .table-success > th,
[data-theme="dark"] .table-success > td {
    background-color: rgba(40, 167, 69, 0.3) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .table-warning,
[data-theme="dark"] .table-warning > th,
[data-theme="dark"] .table-warning > td {
    background-color: rgba(255, 193, 7, 0.3) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .table-danger,
[data-theme="dark"] .table-danger > th,
[data-theme="dark"] .table-danger > td {
    background-color: rgba(220, 53, 69, 0.3) !important;
    color: var(--text-color) !important;
}

[data-theme="dark"] .table-info,
[data-theme="dark"] .table-info > th,
[data-theme="dark"] .table-info > td {
    background-color: rgba(23, 162, 184, 0.3) !important;
    color: var(--text-color) !important;
}

/* Custom table-very-danger class dark mode fix */
[data-theme="dark"] .table-very-danger,
[data-theme="dark"] .table-very-danger > th,
[data-theme="dark"] .table-very-danger > td {
    --bs-table-color: var(--text-color) !important;
    --bs-table-bg: rgba(220, 53, 69, 0.4) !important;
    --bs-table-border-color: rgba(220, 53, 69, 0.6) !important;
    --bs-table-striped-bg: rgba(220, 53, 69, 0.5) !important;
    --bs-table-striped-color: var(--text-color) !important;
    --bs-table-active-bg: rgba(220, 53, 69, 0.5) !important;
    --bs-table-active-color: var(--text-color) !important;
    --bs-table-hover-bg: rgba(220, 53, 69, 0.5) !important;
    --bs-table-hover-color: var(--text-color) !important;
    color: var(--text-color) !important;
}

/* Team Metrics Visualization Styles */
.metric-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.metric-value {
    font-weight: bold;
    font-size: 1.1em;
    color: var(--text-color);
}

/* Grade banner for TaskDetailsModal */
.grade-banner {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
}

.grade-letter {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
    min-width: 3rem;
    text-align: center;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 28px;
    background-color: var(--border-color);
    border-radius: 14px;
    overflow: visible;
    display: flex;
    align-items: center;
}

.progress-bar-fill {
    height: 100%;
    border-radius: 14px;
    transition: width 0.3s ease, background-color 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 8px;
}

.progress-bar-success {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.progress-bar-warning {
    background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
}

.progress-bar-loading {
    background: linear-gradient(90deg, #6c757d 0%, #adb5bd 100%);
}

.progress-bar-danger {
    background: linear-gradient(90deg, #dc3545 0%, #c82333 100%);
}

.progress-bar-text {
    font-weight: bold;
    font-size: 0.85em;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    z-index: 2;
}

/* Add cursor pointer to indicate hover functionality for tooltip */
.cycle-time-bar {
    cursor: help;
}

.progress-bar-target {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #dc3545;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.target-label {
    position: absolute;
    top: -22px;
    font-size: 0.75em;
    font-weight: bold;
    color: #dc3545;
    background-color: var(--card-bg);
    padding: 2px 4px;
    border-radius: 3px;
    white-space: nowrap;
    border: 1px solid #dc3545;
}

.progress-bar-background-text {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.max-label {
    font-size: 0.85em;
    color: var(--text-color);
    font-weight: normal;
}

.metric-label {
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Dark mode specific overrides */
[data-theme="dark"] .progress-bar-container {
    background-color: #3a3a3a;
}

[data-theme="dark"] .target-label {
    background-color: var(--card-bg);
    box-shadow: 0 0 3px rgba(220, 53, 69, 0.3);
}

/* Percentile Selector Styles */
.percentile-selector {
    padding: 2px 6px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 0.9em;
    font-weight: normal;
    margin-right: 4px;
    cursor: pointer;
}

.percentile-selector:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
}

[data-theme="dark"] .percentile-selector {
    border-color: #555;
}

[data-theme="dark"] .percentile-selector option {
    background-color: var(--input-bg);
    color: var(--text-color);
}

/* Weekly Chart Styles */
.weekly-chart {
    margin: 8px 0 16px 0;
}

.chart-area {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
    padding: 0 4px;
    border-bottom: 1px solid var(--border-color);
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.chart-bar-group:hover {
    transform: scale(1.05);
}

.chart-bar-group.selected .chart-bar-label {
    font-weight: 600;
    color: var(--text-color);
}

.chart-bar-value {
    font-size: 0.7em;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 2px;
    min-height: 14px;
}

.chart-bar {
    width: 100%;
    min-width: 20px;
    max-width: 36px;
    border-radius: 3px 3px 0 0;
    transition: height 0.3s ease;
    min-height: 4px;
}

.bar-good {
    background: linear-gradient(180deg, #28a745 0%, #20c997 100%);
}

.bar-below {
    background: linear-gradient(180deg, #ffc107 0%, #fd7e14 100%);
}

.bar-current {
    opacity: 0.6;
    border: 1px dashed var(--text-muted);
}

.chart-bar-label {
    font-size: 0.65em;
    color: var(--text-muted);
    margin-top: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    text-align: center;
}

.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.9em;
    font-style: italic;
}

/* Trend Indicator */
.trend-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85em;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
}

.trend-up {
    color: #28a745;
    background-color: rgba(40, 167, 69, 0.1);
}

.trend-down {
    color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.trend-flat {
    color: var(--text-muted);
    background-color: rgba(108, 117, 125, 0.1);
}

/* Team Metrics Panel Section Headers */
.team-metrics-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.team-metrics-section-title {
    font-weight: 600;
    font-size: 0.95em;
}

/* Dark mode overrides for weekly chart */
[data-theme="dark"] .chart-area {
    border-bottom-color: #555;
}

[data-theme="dark"] .bar-good {
    background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%);
}

[data-theme="dark"] .bar-below {
    background: linear-gradient(180deg, #f39c12 0%, #e67e22 100%);
}

[data-theme="dark"] .trend-up {
    color: #2ecc71;
    background-color: rgba(46, 204, 113, 0.15);
}

[data-theme="dark"] .trend-down {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.15);
}

[data-theme="dark"] .trend-flat {
    color: #95a5a6;
    background-color: rgba(149, 165, 166, 0.15);
}

/* Selected bar styling */
.bar-selected {
    box-shadow: 0 0 0 2px var(--text-color);
}

/* Member breakdown panel */
.member-breakdown {
    margin-top: 12px;
    padding: 12px;
    background-color: var(--bg-color, #f8f9fa);
    border: 1px solid var(--border-color, #dee2e6);
    border-radius: 6px;
}

.member-breakdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.member-breakdown-title {
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-color);
}

.btn-close-breakdown {
    background: none;
    border: none;
    padding: 2px 6px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.1em;
    line-height: 1;
    border-radius: 4px;
    transition: background-color 0.15s ease;
}

.btn-close-breakdown:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--text-color);
}

.member-breakdown-table {
    margin-bottom: 0;
    font-size: 0.9em;
}

.member-breakdown-table thead th {
    border-top: none;
    font-weight: 600;
    color: var(--text-muted);
    padding: 4px 8px;
}

.member-breakdown-table tbody td {
    padding: 4px 8px;
    color: var(--text-color);
}

/* Dark mode overrides for member breakdown */
[data-theme="dark"] .member-breakdown {
    background-color: #2d2d2d;
    border-color: #444;
}

[data-theme="dark"] .btn-close-breakdown:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .member-breakdown-table thead th {
    border-bottom-color: #444;
}

[data-theme="dark"] .member-breakdown-table tbody tr {
    border-color: #444;
}

/* DateFormatter span classes for better dark mode support */
.date-overdue {
    color: black;
    background-color: red;
    padding: 2px 4px;
    border-radius: 3px;
}

.date-due-soon {
    color: black;
    background-color: orange;
    padding: 2px 4px;
    border-radius: 3px;
}

.date-due-medium {
    color: black;
    background-color: yellow;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Dark mode overrides for DateFormatter spans */
[data-theme="dark"] .date-overdue {
    color: var(--text-color) !important;
    background-color: rgba(220, 53, 69, 0.6) !important;
}

[data-theme="dark"] .date-due-soon {
    color: var(--text-color) !important;
    background-color: rgba(255, 165, 0, 0.6) !important;
}

[data-theme="dark"] .date-due-medium {
    color: var(--text-color) !important;
    background-color: rgba(255, 193, 7, 0.6) !important;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

/* Task Dashboard Specific Styles */
.table-very-danger {
    --bs-table-color: #ffffff;
    --bs-table-bg: #dc3545;
    --bs-table-border-color: #842029;
    --bs-table-striped-bg: #b02a37;
    --bs-table-striped-color: #ffffff;
    --bs-table-active-bg: #b02a37;
    --bs-table-active-color: #ffffff;
    --bs-table-hover-bg: #b02a37;
    --bs-table-hover-color: #ffffff;
    color: var(--bs-table-color);
    border-color: var(--bs-table-border-color);
}

.text-small {
    font-size: 0.9rem;
}

/* Service Status Banner */
.service-status-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 16px;
    border-radius: 6px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-status-banner.banner-warning {
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.service-status-banner.banner-error {
    background-color: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
}

.banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.banner-content i {
    font-size: 1.2em;
}

.banner-message {
    font-weight: 500;
}

.banner-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.banner-dismiss {
    padding: 4px 8px;
    color: inherit;
    opacity: 0.7;
}

.banner-dismiss:hover {
    opacity: 1;
    color: inherit;
}

.banner-warning .btn-outline-warning {
    color: #856404;
    border-color: #856404;
}

.banner-warning .btn-outline-warning:hover {
    background-color: #856404;
    color: #fff;
}

.banner-error .btn-outline-light {
    color: #721c24;
    border-color: #721c24;
}

.banner-error .btn-outline-light:hover {
    background-color: #721c24;
    color: #fff;
}

/* Dark mode overrides for Service Status Banner */
[data-theme="dark"] .service-status-banner.banner-warning {
    background-color: rgba(255, 193, 7, 0.15);
    border-color: #ffc107;
    color: #ffc107;
}

[data-theme="dark"] .service-status-banner.banner-error {
    background-color: rgba(220, 53, 69, 0.15);
    border-color: #dc3545;
    color: #f8d7da;
}

[data-theme="dark"] .banner-warning .btn-outline-warning {
    color: #ffc107;
    border-color: #ffc107;
}

[data-theme="dark"] .banner-warning .btn-outline-warning:hover {
    background-color: #ffc107;
    color: #000;
}

[data-theme="dark"] .banner-error .btn-outline-light {
    color: #f8d7da;
    border-color: #f8d7da;
}

[data-theme="dark"] .banner-error .btn-outline-light:hover {
    background-color: #dc3545;
    color: #fff;
}

/* ── Action Center Hero Card ── */
.action-hero-card {
    border: 2px solid #198754;
    border-radius: 10px;
    padding: 16px;
    background: linear-gradient(135deg, #f0fff4, #fff);
    transition: border-color 0.3s ease, background 0.3s ease;
}

.action-hero-card.hero-danger {
    border-color: #dc3545;
    background: linear-gradient(135deg, #fff5f5, #fff);
}

.action-hero-card.hero-warning {
    border-color: #fd7e14;
    background: linear-gradient(135deg, #fff8f0, #fff);
}

.action-hero-card.hero-success {
    border-color: #198754;
    background: linear-gradient(135deg, #f0fff4, #fff);
}

.hero-metrics {
    display: flex;
    justify-content: space-around;
    text-align: center;
}

.hero-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.hero-metric-value {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
}

.hero-metric-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.hero-metric-value.text-overdue { color: #dc3545; }
.hero-metric-value.text-this-week { color: #fd7e14; }
.hero-metric-value.text-in-progress { color: #0d6efd; }
.hero-metric-value.text-closed { color: #198754; }

.hero-metric-label.text-overdue { color: #dc3545; }
.hero-metric-label.text-this-week { color: #fd7e14; }
.hero-metric-label.text-in-progress { color: #0d6efd; }
.hero-metric-label.text-closed { color: #198754; }

.hero-divider {
    width: 1px;
    background-color: #dee2e6;
    align-self: stretch;
}

.hero-secondary-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding-top: 8px;
    margin-top: 8px;
    border-top: 1px solid #e9ecef;
    opacity: 0.7;
}

.hero-secondary-stat {
    text-align: center;
    font-size: 0.8rem;
}

.hero-secondary-stat .value {
    font-weight: 700;
}

.hero-secondary-stat .label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.hero-needs-attention {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.action-task-row {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.action-task-row:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.action-task-title {
    max-width: 25rem;
}

.priority-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.priority-dot-critical {
    background-color: #dc3545;
}

.priority-dot-high {
    background-color: #fd7e14;
}

.priority-dot-medium {
    background-color: #ffc107;
}

.priority-dot-low {
    background-color: #adb5bd;
}

/* Dark theme overrides for hero card */
[data-theme="dark"] .action-hero-card.hero-danger {
    border-color: #f8a0a8;
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15), var(--card-bg));
}

[data-theme="dark"] .action-hero-card.hero-warning {
    border-color: #ffe066;
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), var(--card-bg));
}

[data-theme="dark"] .action-hero-card.hero-success {
    border-color: #75d5a3;
    background: linear-gradient(135deg, rgba(25, 135, 84, 0.1), var(--card-bg));
}

[data-theme="dark"] .hero-divider {
    background-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .hero-secondary-stats {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .hero-needs-attention {
    border-top-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .action-task-row:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* ── Visual Weight Tiers ── */

/* Tier 1: Loud (Due Tasks) */
.tier-loud > .card {
    border: 2px solid #dc3545;
}

.tier-loud .table > tbody > tr > td {
    background-color: #fff5f5;
}

.tier-loud .table > tbody > tr:hover > td {
    background-color: #ffe8e8;
}

/* Tier-loud softens the row bg to light pink, but .table-very-danger's
   hover/active/striped state vars still paint a dark-red accent layer on top
   (via Bootstrap's inset box-shadow), which makes the overdue text unreadable.
   Re-point all state variables to tier-loud-consistent pink + dark-red text. */
.tier-loud .table > tbody > tr > td.table-very-danger,
.tier-loud .table > tbody > tr:hover > td.table-very-danger {
    --bs-table-color: #842029;
    --bs-table-hover-bg: #ffe8e8;
    --bs-table-hover-color: #842029;
    --bs-table-active-bg: #ffe8e8;
    --bs-table-active-color: #842029;
    --bs-table-striped-bg: #ffe8e8;
    --bs-table-striped-color: #842029;
    color: #842029;
}

/* Tier 2: Normal (In Progress) — default card styling, no overrides needed */

/* Tier 3: Quiet (Weekly + Closed) */
.tier-quiet > .card {
    border: 1px solid #e9ecef;
}

.tier-quiet .card-title,
.tier-quiet .card-body > div > .card-title {
    color: #6c757d;
}

.tier-quiet .table {
    font-size: 0.9em;
}

/* Tier 3 collapsible section */
.tier-collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    user-select: none;
}

.tier-collapsible-header:hover {
    opacity: 1;
}

.tier-collapsible-header .section-title {
    color: #6c757d;
    font-weight: 600;
    font-size: 0.9rem;
}

.tier-collapsible-header .section-toggle {
    font-size: 0.75rem;
    color: #adb5bd;
}

.tier-collapsible-body {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.tier-collapsible-body.expanded {
    max-height: 5000px;
    opacity: 1;
}

/* Dark theme overrides for tiers */
[data-theme="dark"] .tier-loud > .card {
    border-color: #f8a0a8;
}

[data-theme="dark"] .tier-loud .table > tbody > tr > td {
    background-color: rgba(220, 53, 69, 0.1);
}

[data-theme="dark"] .tier-loud .table > tbody > tr:hover > td {
    background-color: rgba(220, 53, 69, 0.2);
}

[data-theme="dark"] .tier-collapsible-header {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .tier-collapsible-header .section-title {
    color: #adb5bd;
}

/* Member Overview Table Styles */
.member-overview-table {
    font-size: 0.95rem;
}

.member-overview-table .clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.member-overview-table .clickable-row:hover {
    background-color: var(--shadow);
}

.member-overview-table .sortable-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.member-overview-table .sortable-header:hover {
    background-color: var(--shadow);
}

[data-theme="dark"] .member-overview-table .clickable-row:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .member-overview-table .clickable-row:hover td {
    color: #ffffff !important;
}

[data-theme="dark"] .member-overview-table .clickable-row:hover td.table-success {
    background-color: rgba(40, 167, 69, 0.5) !important;
}

[data-theme="dark"] .member-overview-table .clickable-row:hover td.table-warning {
    background-color: rgba(255, 193, 7, 0.5) !important;
}

[data-theme="dark"] .member-overview-table .sortable-header:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Side panel overlays — shared backdrop behavior */
.standup-overlay,
.task-side-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.standup-overlay.open,
.task-side-panel-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.standup-overlay { z-index: 1040; }
.task-side-panel-overlay { z-index: 1039; }

/* Task Side Panel — mirrors .standup-panel pattern */
.task-side-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    max-width: 95vw;
    background: var(--card-bg);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 24px var(--shadow);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.task-side-panel.open {
    transform: translateX(0);
}

.task-side-panel-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    background: var(--card-bg);
}

.task-side-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 1rem;
}

.task-side-panel-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
    flex-shrink: 0;
}

.task-side-panel-resize-handle {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    cursor: ew-resize;
    background: transparent;
    z-index: 10;
    transition: background 0.15s ease;
}
.task-side-panel-resize-handle:hover {
    background: rgba(74, 158, 255, 0.3);
}
.task-side-panel-resize-handle::after {
    content: '';
    position: absolute;
    left: 2px; top: 50%;
    transform: translateY(-50%);
    width: 2px; height: 32px;
    background: var(--border-color);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.task-side-panel-resize-handle:hover::after {
    opacity: 1;
}

.standup-panel {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 440px;
    max-width: 95vw;
    background: var(--card-bg);
    border-left: 1px solid var(--border-color);
    box-shadow: -4px 0 24px var(--shadow);
    z-index: 1045;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.standup-panel.open {
    transform: translateX(0);
}

.standup-panel-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    background: var(--card-bg);
}

.standup-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
}

.standup-panel-footer {
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
    flex-shrink: 0;
}

.standup-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.standup-task-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0;
    border-radius: 4px;
}

.standup-task-item:hover {
    background: rgba(128, 128, 128, 0.07);
}

.standup-preview-box {
    background: var(--sidebar-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    font-size: 0.82rem;
    max-height: 220px;
    overflow-y: auto;
    color: var(--text-color);
}

.standup-resize-handle {
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    cursor: ew-resize;
    background: transparent;
    z-index: 10;
    transition: background 0.15s ease;
}
.standup-resize-handle:hover {
    background: rgba(74, 158, 255, 0.3);
}
.standup-resize-handle::after {
    content: '';
    position: absolute;
    left: 2px; top: 50%;
    transform: translateY(-50%);
    width: 2px; height: 32px;
    background: var(--border-color);
    border-radius: 2px;
    opacity: 0;
    transition: opacity 0.15s ease;
}
.standup-resize-handle:hover::after {
    opacity: 1;
}

/* Skeleton loading shimmer */
@keyframes skeleton-shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: calc(400px + 100%) 0; }
}

.skeleton-cell {
    background: linear-gradient(90deg, #e8e8e8 25%, #d0d0d0 50%, #e8e8e8 75%);
    background-size: 600px 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
}

[data-theme="dark"] .skeleton-cell {
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
}

.skeleton-tab-placeholder {
    display: inline-block;
    width: 72px;
    height: 16px;
    background: linear-gradient(90deg, #e8e8e8 25%, #d0d0d0 50%, #e8e8e8 75%);
    background-size: 600px 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
    border: none !important;
    pointer-events: none;
}

[data-theme="dark"] .skeleton-tab-placeholder {
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
}

/* Shared bordered content box — used for task description, comment history, etc. */
.content-box {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.375rem;
    padding: 0.75rem;
    background: var(--bs-tertiary-bg);
    color: var(--bs-body-color);
}

/* Quill editor overrides for compact side panel layout */
.task-side-panel .ql-toolbar {
    padding: 4px 8px;
    border-color: var(--bs-border-color);
    border-radius: 0.375rem 0.375rem 0 0;
}
.task-side-panel .ql-container {
    border-color: var(--bs-border-color);
    border-radius: 0 0 0.375rem 0.375rem;
    font-size: 0.8rem;
}
.task-side-panel .ql-editor {
    min-height: 50px;
    max-height: 120px;
    padding: 6px 10px;
    overflow-y: auto;
}
.task-side-panel .ql-editor.ql-blank::before {
    font-style: normal;
    color: var(--bs-secondary-color);
}

/* Rich text comment/description display */
.rich-comment p { margin: 0; }
.rich-comment ul, .rich-comment ol { margin: 0.25rem 0; padding-left: 1.25rem; }
.rich-comment li > ul, .rich-comment li > ol { margin-top: 0; margin-bottom: 0; }
.rich-comment li { margin: 0; }
.rich-comment a { color: var(--bs-link-color); text-decoration: underline; }

/* ── Status Popover ── */
.status-popover-anchor {
    position: relative;
    display: inline-block;
}

.status-popover {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1050;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px;
    width: 260px;
    margin-top: 4px;
}

.status-popover-title {
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 10px;
}

.status-pill {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    cursor: pointer;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    color: var(--text-color);
    transition: all 0.15s ease;
    white-space: nowrap;
}

.status-pill:hover {
    background: #e9ecef;
}

.status-pill.active {
    background: #e7f1ff;
    border-color: #0d6efd;
    color: #0d6efd;
    font-weight: 600;
}

.status-pill.selected {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
    font-weight: 600;
}

.status-popover input[type="date"],
.status-popover input[type="text"] {
    width: 100%;
    font-size: 0.75rem;
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 8px;
}

.status-popover-label {
    font-size: 0.7rem;
    font-weight: 600;
    display: block;
    margin-bottom: 2px;
}

.due-date-shortcuts {
    display: flex;
    gap: 4px;
    margin-bottom: 6px;
}

.due-date-shortcut {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.65rem;
    cursor: pointer;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    color: var(--text-color);
    transition: all 0.15s ease;
    font-weight: 600;
}

.due-date-shortcut:hover {
    background: #e7f1ff;
    border-color: #0d6efd;
    color: #0d6efd;
}

.status-popover-select {
    width: 100%;
    font-size: 0.75rem;
    padding: 4px 8px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 8px;
    background: #fff;
    color: var(--text-color);
}

.status-popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.status-popover-actions .btn {
    font-size: 0.75rem;
    padding: 3px 12px;
}

.status-popover-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1049;
}

.status-popover .text-danger {
    font-size: 0.7rem;
    margin-bottom: 6px;
}

/* Dark theme */
[data-theme="dark"] .status-popover {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .status-pill {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .status-pill:hover {
    background: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .status-pill.active {
    background: rgba(13, 110, 253, 0.2);
    border-color: #6ea8fe;
    color: #6ea8fe;
}

[data-theme="dark"] .status-pill.selected {
    background: #0d6efd;
    color: #fff;
}

[data-theme="dark"] .status-popover input[type="date"],
[data-theme="dark"] .status-popover input[type="text"] {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-color);
}

[data-theme="dark"] .due-date-shortcut {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .due-date-shortcut:hover {
    background: rgba(13, 110, 253, 0.2);
    border-color: #6ea8fe;
    color: #6ea8fe;
}

[data-theme="dark"] .status-popover-select {
    background: var(--card-bg);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-color);
}

.task-title-cell:hover .task-title-text { text-decoration: underline; }
.task-external-link { opacity: 0.6; }
.task-external-link:hover { opacity: 1; }

/* GitHub Viewer content styles */
.github-content img { max-width: 100%; height: auto; }

.github-content pre {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.875rem;
}

.github-content code {
    font-size: 0.875em;
    padding: 0.15em 0.4em;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 3px;
}

.github-content pre code {
    padding: 0;
    background: transparent;
}

.github-content table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1rem;
}

.github-content th, .github-content td {
    border: 1px solid rgba(128, 128, 128, 0.3);
    padding: 6px 13px;
}

.github-content tr:nth-child(even) { background: rgba(0, 0, 0, 0.03); }

.github-content h1, .github-content h2 {
    border-bottom: 1px solid rgba(128, 128, 128, 0.3);
    padding-bottom: 0.3em;
}

.github-content a { color: inherit; text-decoration: underline; }
.github-content a:hover { opacity: 0.8; }

.github-content ul.contains-task-list {
    list-style: none;
    padding-left: 0.5em;
}

.github-content blockquote {
    border-left: 4px solid rgba(128, 128, 128, 0.4);
    padding: 0.5em 1em;
    margin-left: 0;
    color: rgba(128, 128, 128, 0.85);
}

.bg-purple { background-color: #8957e5 !important; color: #fff; }

[data-theme="dark"] .github-content code {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .github-content tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.04);
}
