/* General Layout */
body {
  font-size: 0.6rem;
  background-color: #2b2e33;
  color: #e4e4e4;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Prevent body scrolling */
}

/* Coming Soon Overlay */
.coming-soon-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.coming-soon-modal {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.95) 100%);
  color: #e4e4e4;
  border: 1px solid rgba(89, 188, 194, 0.3);
  border-radius: 12px;
  padding: 24px 28px;
  text-align: center;
  box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.coming-soon-modal h2 {
  margin: 0 0 8px 0;
  font-size: 1.2rem;
}

.coming-soon-modal p {
  margin: 0 0 16px 0;
  color: #cbd5e1;
}

.dashboard-coming-soon {
  width: 100%;
  text-align: center;
  padding: 24px;
  font-size: 1.2rem;
  color: #94a3b8;
}

/* Handover Report Modern Styling */
.handover-report {
  font-size: 0.75rem;
  border-collapse: collapse;
  width: 100%;
  background-color: #2b2e33;
  color: #e4e4e4;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  /* Enhanced mobile table */
  -webkit-overflow-scrolling: touch;
  position: relative;
}

/* Add horizontal scroll indicator for mobile */
.handover-report::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 20px;
    height: 20px;
    background: linear-gradient(-45deg, transparent 30%, rgba(96, 165, 250, 0.3) 70%);
    border-radius: 50% 0 0 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.handover-report.scrollable::after {
    opacity: 1;
}

/* Maturity selector container - enhanced */
#maturityDropdownContainer {
    margin-bottom: 15px;
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 12px;
    border: 1px solid #475569;
    box-shadow: 0 8px 25px rgba(89, 188, 194, 0.15), 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

#maturityDropdownContainer:hover {
    box-shadow: 0 12px 35px rgba(89, 188, 194, 0.25), 0 6px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

#maturityDropdownContainer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #60a5fa, #34d399, #f59e0b, #ef4444);
    opacity: 0.8;
}

/* Maturity selector title */
.maturity-title {
    color: #f1f5f9;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* Maturity buttons container */
.maturity-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

/* Individual maturity buttons - enhanced */
.maturity-btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: 2px solid transparent;
    background: linear-gradient(135deg, #374151 0%, #4b5563 100%);
    color: #e2e8f0;
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 140px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.maturity-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.4s ease;
    opacity: 0;
}

.maturity-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 110%;
    height: 110%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.maturity-btn:hover::before {
    left: 100%;
}

.maturity-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 30px rgba(96, 165, 250, 0.4);
    border-color: rgba(96, 165, 250, 0.6);
    background: linear-gradient(135deg, #4b5563 0%, #64748b 100%);
}

.maturity-btn:hover::after {
    width: 120px;
    height: 120px;
    opacity: 1;
}

.maturity-btn.active {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    border-color: #60a5fa;
    color: #ffffff;
    box-shadow: 0 12px 30px rgba(96, 165, 250, 0.5);
    transform: translateY(-3px) scale(1.02);
    animation: activePulse 2s ease-in-out infinite;
}

@keyframes activePulse {
    0%, 100% {
        box-shadow: 0 12px 30px rgba(96, 165, 250, 0.5);
    }
    50% {
        box-shadow: 0 16px 40px rgba(96, 165, 250, 0.7);
    }
}

.maturity-btn:active {
    transform: translateY(0);
    transition: transform 0.1s ease;
}

/* Maturity button icons and text */
.maturity-icon {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.maturity-text {
    flex: 1;
    text-align: center;
}

/* Function buttons styling */
.function-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.function-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.function-btn:active {
    transform: translateY(0) scale(0.98);
    transition: transform 0.1s ease;
}

.function-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.function-btn:hover::before {
    left: 100%;
}

/* Specific function button colors */
#refreshBtn:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
}

#fullscreenBtn:hover {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

#printBtn:hover {
    background-color: #6c757d;
    border-color: #6c757d;
}

#settingsBtn:hover {
    background-color: #343a40;
    border-color: #343a40;
}

/* Maturity counter row - centralized below buttons */
.maturity-counter-row {
    display: flex;
    justify-content: center;
    margin-top: 4px;
    margin-bottom: 4px;
}

/* Maturity counter */
.maturity-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 6px;
    border: 1px solid #475569;
    transition: all 0.3s ease;
}

.counter-icon {
    font-size: 1rem;
    opacity: 0.8;
}

.counter-text {
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.counter-label {
    color: #94a3b8;
    font-weight: 400;
    font-size: 0.7rem;
}

/* Counter animation */
.counter-text.animate {
    animation: counterSpin 0.6s ease-in-out;
    transform: scale(1.1);
}

@keyframes counterSpin {
    0% {
        transform: scale(1) rotateY(0deg);
        opacity: 0.7;
    }
    25% {
        transform: scale(1.15) rotateY(90deg);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.2) rotateY(180deg);
        opacity: 1;
    }
    75% {
        transform: scale(1.15) rotateY(270deg);
        opacity: 0.9;
    }
    100% {
        transform: scale(1) rotateY(360deg);
        opacity: 1;
    }
}

/* Report header styling */
.handover-report-header {
    text-align: center;
    padding: 16px;
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-bottom: 1px solid #475569;
    margin-bottom: 15px;
    position: relative;
    overflow: hidden;
}

.handover-report-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #60a5fa, #34d399, #f59e0b, #ef4444);
    opacity: 0.8;
}

.handover-report-header h2 {
    margin: 0 0 15px 0;
    color: #f1f5f9;
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

/* Summary cards container */
.summary-cards {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

/* Individual summary card */
.summary-card {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.9) 0%, rgba(71, 85, 105, 0.9) 100%);
    border-radius: 12px;
    padding: 15px;
    min-width: 140px;
    text-align: center;
    border: 1px solid #475569;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.summary-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s;
}

.summary-card:hover::before {
    left: 100%;
}

.summary-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.summary-card-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
}

.summary-card-value {
    font-size: 1.4rem;
    font-weight: bold;
    color: #59bcc2;
    text-shadow: 0 0 10px rgba(89, 188, 194, 0.3);
    margin-bottom: 4px;
}

.summary-card-label {
    font-size: 0.8rem;
    color: #94a3b8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card type specific colors */
.summary-card.total .summary-card-icon { color: #60a5fa; }
.summary-card.total .summary-card-value { color: #60a5fa; }

.summary-card.complete .summary-card-icon { color: #34d399; }
.summary-card.complete .summary-card-value { color: #34d399; }

.summary-card.outstanding .summary-card-icon { color: #f59e0b; }
.summary-card.outstanding .summary-card-value { color: #f59e0b; }

.summary-card.percentage .summary-card-icon { color: #ef4444; }
.summary-card.percentage .summary-card-value { color: #ef4444; }

/* Modern gridlines and cells */
.handover-report th, .handover-report td {
  border: 1px solid #475569;
  padding: 6px 8px;
  text-align: center;
  transition: all 0.2s ease;
  position: relative;
}

.handover-report th {
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
  color: #59bcc2;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #60a5fa;
}

/* Sub-header styling */
.handover-report thead tr:nth-child(2) th {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #cbd5e1;
    font-weight: 600;
    font-size: 0.85rem;
    border-bottom: 1px solid #64748b;
    padding: 8px 6px;
}

/* Row hover effects - enhanced */
.handover-report tbody tr:hover {
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.12) 0%, rgba(96, 165, 250, 0.06) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(96, 165, 250, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 10;
}

.handover-report tbody tr:hover td {
    border-color: rgba(96, 165, 250, 0.4);
    position: relative;
    z-index: 10;
}

.handover-report tbody tr:hover::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #60a5fa, #3b82f6, #1d4ed8);
    border-radius: 0 2px 2px 0;
}

/* Cell hover effects - enhanced */
.handover-report tbody td:hover {
    background: rgba(96, 165, 250, 0.15);
    transform: scale(1.03);
    z-index: 15;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.handover-report tbody td:hover::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, transparent, rgba(96, 165, 250, 0.1), transparent);
    border-radius: 4px;
    z-index: -1;
}

/* Enhanced loading indicator */
.loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 41, 59, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.loading-indicator.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(89, 188, 194, 0.2);
    border-left: 4px solid #59bcc2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
    position: relative;
}

.loading-spinner::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid transparent;
    border-top: 2px solid rgba(96, 165, 250, 0.4);
    border-radius: 50%;
    animation: spin 2s linear infinite reverse;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #59bcc2;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 10px;
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-subtitle {
    color: #94a3b8;
    font-size: 0.9rem;
    text-align: center;
    opacity: 0.8;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Skeleton loading for table */
.skeleton-table {
    width: 100%;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.skeleton-header {
    background: linear-gradient(135deg, #334155 0%, #475569 100%);
    padding: 12px;
    display: flex;
    gap: 8px;
}

.skeleton-cell {
    height: 20px;
    background: linear-gradient(90deg, #374151 0%, #4b5563 50%, #374151 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton-row {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid #374151;
}

/* Tooltip styling */
.cell-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.2s ease;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cell-tooltip.show {
    opacity: 1;
    transform: translateY(0);
}

.cell-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Row selection styling */
.handover-report tbody tr.selected {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.15) 0%, rgba(34, 197, 94, 0.08) 100%);
    border-left: 4px solid #22c55e;
}

.handover-report tbody tr.selected td {
    color: #f0fdf4;
}

/* Column selection styling */
.handover-report th.selected-column,
.handover-report td.selected-column {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border-left: 3px solid #59bcc2;
    border-right: 3px solid #59bcc2;
}

/* Digital clock styling - enhanced */
.digital-clock {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(51, 65, 85, 0.95) 100%);
    border-radius: 10px;
    padding: 10px 16px;
    border: 1px solid #475569;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.digital-clock::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(89, 188, 194, 0.1), transparent);
    transition: left 3s ease-in-out;
    animation: clockShimmer 3s ease-in-out infinite;
}

@keyframes clockShimmer {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: -100%; }
}

.clock-time {
    font-size: 1.2rem;
    font-weight: bold;
    color: #59bcc2;
    text-shadow: 0 0 15px rgba(89, 188, 194, 0.7), 0 0 30px rgba(89, 188, 194, 0.3);
    letter-spacing: 1.5px;
    animation: timeGlow 2s ease-in-out infinite alternate;
    position: relative;
    z-index: 2;
}

.clock-date {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-top: 3px;
    opacity: 0.9;
    font-weight: 500;
    position: relative;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clock-timezone {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 1px;
    opacity: 0.7;
    font-weight: 400;
    position: relative;
    z-index: 2;
}

@keyframes timeGlow {
    0% {
        text-shadow: 0 0 5px rgba(89, 188, 194, 0.3);
    }
    100% {
        text-shadow: 0 0 15px rgba(89, 188, 194, 0.8);
    }
}

/* DAC Ready animation */
@keyframes readyGlow {
    0% {
        box-shadow: 0 0 5px rgba(23, 162, 184, 0.4), 0 0 10px rgba(23, 162, 184, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px rgba(23, 162, 184, 0.8), 0 0 30px rgba(32, 201, 151, 0.6), 0 0 40px rgba(40, 167, 69, 0.4);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 25px rgba(23, 162, 184, 0.9), 0 0 35px rgba(32, 201, 151, 0.7), 0 0 45px rgba(40, 167, 69, 0.5);
        transform: scale(1.08);
    }
}

.dac-ready {
    animation: readyGlow 2s ease-in-out infinite alternate;
    position: relative;
    z-index: 5;
}

.dac-complete {
    position: relative;
    z-index: 5;
}

.mc1-ready, .pc1-ready {
    animation: readyGlow 2s ease-in-out infinite alternate;
    position: relative;
    z-index: 5;
}

.mc1-complete, .pc1-complete, .dac-complete {
    position: relative;
    z-index: 5;
}

.dac-exists, .mc1-exists, .pc1-exists {
    position: relative;
    z-index: 5;
}

/* Punchlist styling - last two columns are always A Open and B Open */
.handover-report td:nth-last-child(1),
.handover-report td:nth-last-child(2) {
    background: #ffb3ba !important; /* Baby pink */
    color: #8b4513 !important; /* Brown text */
    font-weight: bold;
}

.dac-standalone {
    position: relative;
    z-index: 5;
    animation: standalonePulse 2s ease-in-out infinite;
}

@keyframes standalonePulse {
    0% {
        box-shadow: 0 0 3px rgba(255, 193, 7, 0.3);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 8px rgba(255, 193, 7, 0.6);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 3px rgba(255, 193, 7, 0.3);
        transform: scale(1);
    }
}

/* Rotated headers for sections 2-5 - modernized */
.handover-report .rotated-headers th {
  writing-mode: sideways-lr;
  text-orientation: mixed;
  width: 45px;
  min-width: 45px;
  min-height: 160px;
  vertical-align: bottom;
  padding: 4px 6px;
  font-size: 0.7rem;
  white-space: nowrap;
  transform-origin: center;
  background: linear-gradient(135deg, #334155 0%, #475569 100%);
  border-left: 1px solid #64748b;
  border-right: 1px solid #64748b;
}

.handover-report .rotated-headers th:hover {
    background: linear-gradient(135deg, #475569 0%, #64748b 100%);
}

/* Fallback for browsers that don't support writing-mode */
@supports not (writing-mode: vertical-rl) {
  .handover-report .rotated-headers th {
    transform: rotate(-90deg);
    width: 85px;
    height: 45px;
    white-space: nowrap;
  }
}

/* Data cell styling */
.handover-report tbody td {
    background-color: rgba(30, 41, 59, 0.7);
    color: #e2e8f0;
    font-weight: 500;
    border-bottom: 1px solid #374151;
}

/* Number cells with special styling */
.handover-report tbody td:nth-child(n+5) {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 600;
    color: #60a5fa;
}

/* Empty sub-header cells */
.handover-report thead tr:nth-child(2) th[colspan="4"] {
    background: transparent;
    border: none;
}

/* Completion percentage styling */
.handover-report tbody td:last-child {
    font-weight: 700;
    color: #34d399;
}

/* Enhanced responsive design */
@media (max-width: 1200px) {
    .handover-report {
        font-size: 0.7rem;
    }

    .handover-report .rotated-headers th {
        width: 35px;
        height: 70px;
        font-size: 0.65rem;
    }

    .summary-cards {
        gap: 10px;
    }

    .summary-card {
        min-width: 120px;
        padding: 12px;
    }

    .summary-card-value {
        font-size: 1.2rem;
    }

    .maturity-buttons {
        gap: 6px;
    }

    .maturity-btn {
        min-width: 120px;
        padding: 8px 14px;
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .handover-report {
        font-size: 0.65rem;
    }

    .handover-report .rotated-headers th {
        width: 30px;
        height: 60px;
        font-size: 0.6rem;
    }

    .summary-cards {
        gap: 8px;
        justify-content: center;
    }

    .summary-card {
        min-width: 100px;
        padding: 10px 8px;
        flex: 1;
        max-width: 140px;
    }

    .summary-card-icon {
        font-size: 1.4rem;
    }

    .summary-card-value {
        font-size: 1.1rem;
    }

    .summary-card-label {
        font-size: 0.7rem;
    }

    .maturity-buttons {
        gap: 4px;
        flex-wrap: wrap;
    }

    .maturity-btn {
        min-width: 100px;
        padding: 8px 12px;
        font-size: 0.65rem;
        gap: 4px;
    }

    .maturity-icon {
        font-size: 0.7rem;
    }

    .digital-clock {
        padding: 8px 12px;
    }

    .clock-time {
        font-size: 1rem;
    }

    .clock-date {
        font-size: 0.75rem;
    }

    .clock-timezone {
        font-size: 0.65rem;
    }

    .function-btn {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    /* Enhanced touch interactions */
    .handover-report tbody tr {
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(96, 165, 250, 0.2);
    }

    .handover-report tbody tr:active {
        background: linear-gradient(90deg, rgba(96, 165, 250, 0.2) 0%, rgba(96, 165, 250, 0.1) 100%);
        transform: scale(0.98);
    }

    .maturity-btn:active {
        transform: scale(0.95);
    }

    .summary-card:active {
        transform: scale(0.95);
    }

    .function-btn:active {
        transform: scale(0.95);
    }
}

@media (max-width: 480px) {
    .summary-cards {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .summary-card {
        width: 100%;
        max-width: 200px;
    }

    .maturity-buttons {
        flex-direction: column;
        align-items: center;
        gap: 6px;
    }

    .maturity-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .handover-report-header {
        padding: 12px;
    }

    .handover-report-header h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .buttons-bar {
        flex-wrap: wrap;
        gap: 8px;
    }

    .buttons-bar > div {
        flex: 1;
        min-width: 100%;
        justify-content: center;
    }

    /* Stack function buttons on very small screens */
    #refreshBtn, #fullscreenBtn, #printBtn, #settingsBtn {
        flex: 1;
        min-width: 80px;
    }
}


/* Ensure basic information headers remain horizontal in the rotated-headers row */
.handover-report .rotated-headers th:nth-child(-n+4) {
  writing-mode: horizontal-tb !important;
  text-orientation: mixed !important;
  transform: none !important;
  width: auto !important;
  min-width: 80px !important;

  padding: 8px !important;
}


.d-flex.flex-column {
  height: 100vh; /* Full viewport height */
  display: flex;
  flex-direction: column;
}

button {
  font-size: 0.9rem !important;
  width: 76px;
  height: 30px;
}

.form-select {
  font-size: 1rem !important;
  background-color: #4a4d50;
  color: white;
  border: none;
}

/* Handover specific modern UI tweaks */
.maturity-buttons .maturity-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid #d0d5dd;
  background: #ffffff;
  color: #111827;
  height: 36px;
  width: 180px; /* make all maturity buttons the same width */
  justify-content: center;
}
.maturity-buttons .maturity-btn .maturity-text {
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.maturity-buttons .maturity-btn.active {
  background: #e6f4ea;
  border-color: #34a853;
}

/* Controls row for maturity + label filters */
.handover-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Modern select styling (no external libs) */
.modern-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-color: #fff;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  padding: 6px 28px 6px 10px;
  font-size: 12px;
  line-height: 1.2;
  color: #111827;
  min-width: 140px;
  max-width: 200px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5 7l5 5 5-5' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.modern-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
  border-color: #6366f1;
}
.modern-select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Toggle button aesthetics */
.toggle-btn {
  border-radius: 8px;
}
.toggle-btn.on {
  background: #f0fff4;
}
.toggle-btn.off {
  background: #f8fafc;
}

/* Pure CSS toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}
.switch input { display: none; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 9999px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; top: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 9999px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.25);
}
input:checked + .slider { background-color: #34a853; }
input:checked + .slider:before { transform: translateX(22px); }

/* Header and Button Bar */
.bg-header {
  background-color: #375a7f;
  color: white;
  position: sticky;
  top: 0;
  z-index: 20;
}

header {
  padding: 15px;
}

.buttons-bar {
  background-color: #375a7f;
  padding: 10px 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 55px; /* Adjust based on header height */
  z-index: 15;
  flex-shrink: 0; /* Prevent the buttons bar from shrinking */
}

/* Main content area */
.d-flex {
  display: flex;
  overflow: hidden;
}

.d-flex > .flex-grow-1 {
  flex: 1;
  overflow: hidden;
}

/* Filter Section */
.filter-section {
  background-color: #3c3f42;
  color: #e4e4e4;
  padding: 20px;
  flex-basis: 180px; /* Consistent width */
  min-width: 180px; /* Prevent squashing */
  height: calc(100vh - 110px); /* Adjust based on header and buttons bar height */
  overflow-y: auto; /* Allow vertical scrolling if needed */
  position: sticky;
  top: 110px; /* Adjust based on header and buttons bar height */
}

.filter-section select,
.filter-section input {
  width: 100%;
  margin-bottom: 10px;
  background-color: #4a4d50;
  color: white;
  border: none;
  padding: 8px;
}

/* Table container */
.flex-grow-1 {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-top: 4px;
}

.table-container {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-top: 4px;
}

.table-wrapper {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

/* Compact controls styling */
.compact-controls .stat-chip {
  background: #1f2937;
  color: #e5e7eb;
  border: 1px solid #374151;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
}
.stat-chip.stat-lg {
  padding: 6px 10px;
  font-size: 13px;
}

/* Square style for stats inside clock row */
.digital-clock + .compact-stats .stat-chip,
.compact-stats .stat-chip {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-weight: 600;
}

/* Handover action bar (full width) */
.handover-action-bar {
  background: linear-gradient(180deg, rgba(31,41,55,0.95), rgba(31,41,55,0.85));
  border: 1px solid #374151;
  border-radius: 10px;
  padding: 6px 12px;
  margin: 6px 0 8px 0;
}
.handover-action-bar .maturity-counter .counter-text { font-weight: 700; color: #e5e7eb; }
.handover-action-bar .maturity-counter .counter-label { color: #cbd5e1; }

/* Pagination look without external lib */
.handover-pagination {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.handover-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #4b5563;
  color: #e5e7eb;
  background: #111827;
}
.handover-page-btn:hover { background: #1f2937; }
.handover-page-btn.active { background: #374151; border-color: #6b7280; }

/* Table styles */
.table {
  width: 100%;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: #2e3236;
}

.table thead th {
  background-color: #2e3236;
  color: white;
  padding: 10px;
  border-bottom: 1px solid #4a4d50;
  text-align: left;
}

.table tbody {
  background-color: #2b2e33;
}

.table tbody tr:nth-child(odd) {
  background-color: #3e4145;
}

.table tbody tr:nth-child(even) {
  background-color: #33363a;
}

.table th,
.table td {
  padding: 8px;
  color: white;
  border: 1px solid #4a4d50;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/*////////DASHBOARD/////////////////////// */

.dashboard-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 20px;
}

.tile {
  background-color: #4a4d50;
  color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.tile:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

.tile h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.tile p {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.tile small {
  font-size: 0.8rem;
  opacity: 0.7;
}

.wide {
  grid-column: span 2;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 5px;
}

.error-message {
  color: #ff6b6b;
  text-align: center;
  padding: 20px;
  font-size: 1.2rem;
}


/* Column Sizing */
.table th:nth-child(1), /* Row index */
.table td:nth-child(1) {
  width: 35px;
  max-width: 35px;
  min-width: 35px;
}

.table th:nth-child(2), /* Status */
.table td:nth-child(2) {
  width: 35px;
  max-width: 35px;
  min-width: 35px;
}

.table th:nth-child(3), /* Maturity */
.table td:nth-child(3) {
  width: 120px;
  max-width: 120px;
  min-width: 120px;
}

.table th:nth-child(5), /* Action Type */
.table td:nth-child(5) {
  width: 80px;
  max-width: 80px;
  min-width: 80px;
}

.table th:nth-child(10), /* Completed On */
.table td:nth-child(10),
.table th:nth-child(11), /* Expected Completion Date */
.table td:nth-child(11) {
  width: 100px;
  max-width: 100px;
  min-width: 100px;
}

/* Flexible columns */
.table th:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(5)):not(:nth-child(10)):not(:nth-child(11)),
.table td:not(:nth-child(1)):not(:nth-child(2)):not(:nth-child(3)):not(:nth-child(5)):not(:nth-child(10)):not(:nth-child(11)) {
  min-width: 100px;
  max-width: none;
  width: auto;
}

/* Table Row Hover */
.table td:hover {
  overflow: visible;
  white-space: normal;
  z-index: 10;
  position: relative;
  background-color: #11c091;
}

/* Scroll Sync - Removed as it's conflicting and not needed with the new structure */


/* Status Circle */
.status-circle {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.status-complete {
  background-color: green;
}

.status-incomplete {
  background-color: red;
}

/* Loading Indicator */
.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.column-visibility-dropdown {
  position: absolute;
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  z-index: 1000;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.column-visibility-dropdown label {
  display: block;
  margin-bottom: 5px;
  color: #333;
}

.column-visibility-dropdown input[type="checkbox"] {
  margin-right: 5px;
}

/* Adjust table layout for column visibility */
.table {
  table-layout: auto;
}

.table-wrapper {
  overflow-x: auto;
}

/* Custom Scrollbar Styles */
.table-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #20B2AA #f1f1f1;
}

.table-wrapper::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background-color: #20B2AA;
  border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background-color: #1a8e8a;
}

/* Add these styles for the interactive filter items */
.filter-item {
  display: inline-flex;
  align-items: center;
  background-color: #20b2aa;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  margin: 0.2rem;
  font-size: 0.8rem;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  max-width: 100%; /* Prevent single item from exceeding column width */
}

/* Ensure long filter values break to prevent overflowing and column expansion */
.filter-val {
  overflow-wrap: break-word;
  hyphens: auto;
  word-break: break-all; /* Stronger breaking for long words */
}

.filters-stats-row {
  padding: 6px 10px;
  min-height: auto;
  height: auto;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid #475569;
  border-radius: 6px;
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column; /* Stack vertically: breadcrumbs then stats */
  gap: 12px;
}

/* Remove visual divider since no columns */
.filters-stats-row::before {
  content: none;
}

.stats-info {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 0; /* No offset needed */
}

.stat-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.7rem;
  background-color: rgba(255,255,255,0.1);
  color: #fff;
}

.stat-chip.primary { background-color: #3b82f6; }
.stat-chip.success { background-color: #22c55e; }
.stat-chip.danger  { background-color: #ef4444; }

/* Stats panel with donut chart */
.stats-panel { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 8px; /* Smaller gap between title and chart */
  width: 100%; /* Allow full width for responsiveness */
}

.stats-chart-row {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  justify-content: center; /* Center on smaller screens */
}

.stats-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0;
  margin: 0;
}

.stats-main-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 12px;
  text-align: center;
  width: 100%;
  border-bottom: 1px solid rgba(255,255,255,0.15);
  padding-bottom: 8px;
}

.stats-panel-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-bottom: 8px;
  text-align: center;
}

.stats-panel-group {
  display: flex;
  flex-direction: row; /* Explicit row for desktop */
  align-items: flex-start;
  justify-content: flex-start;
  gap: 24px;
  padding-left: 16px;
  width: 100%;
  flex-wrap: nowrap; /* Prevent wrapping on desktop */
}

/* Mobile: add scroll, keep row */
@media (max-width: 768px) {
  .stats-panel-group {
    overflow-x: auto; /* Horizontal scroll if needed */
    flex-wrap: nowrap; /* Keep single row */
    gap: 16px;
    padding: 0 8px;
  }
  /* No flex-direction change */
}

.stats-panel-group .stats-panel:not(:last-child) {
  position: relative;
}

.stats-panel-group .stats-panel:not(:last-child)::after {
  content: '';
  position: absolute;
  right: -12px; /* Center the divider in the gap */
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.15);
}

/* Final divider after last panel */
.stats-panel-group::after {
  content: '';
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255,255,255,0.15);
}

.stats-pie {
  position: relative;
  width: 75px; 
  height: 75px; 
  border-radius: 50%; 
  box-shadow: inset 0 0 0 10px rgba(255,255,255,0.06);
  aspect-ratio: 1 / 1; /* Enforce circular shape */
  background: conic-gradient(#20b2aa 0%, #ce4848 100%); /* Initial state for animation */
  transition: background 1.5s ease-in-out; /* Smooth for hover too */
}

.stats-pie-center {
  position: absolute; inset: 6px; border-radius: 50%; background: #1f2937;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #e5e7eb;
}
.stats-total { font-size: 1.4rem; font-weight: 700; }
.stats-total-label { font-size: 0.8rem; opacity: 0.85; }
.stats-legend { display: flex; flex-direction: column; gap: 6px; }
.legend-row { display: flex; align-items: center; gap: 8px; color: #e5e7eb; font-size: 0.9rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.legend-dot.success { background: #20b2aa; }
.legend-dot.danger  { background: #ce4848; }
.legend-value { margin-left: 6px; font-weight: 600; }

/* Ensure pies stay circular with aspect ratio (fallback) */
.stats-pie::before {
  display: none; /* Use aspect-ratio instead for modern browsers */
}

/* Skeleton styles */
.skeleton {
  opacity: 0.5;
  filter: grayscale(1); /* Grayed out look */
}

.skeleton-legend {
  color: #94a3b8; /* Muted text */
}

/* Fill animation */
@keyframes pie-fill {
  from { background: conic-gradient(#20b2aa 0%, #ce4848 100%); }
  to { /* Real gradient set inline */ }
}

.animate-fill {
  animation: pie-fill 2s ease-in-out forwards;
}

/* Pulse animation for center */
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.6; }
  50% { transform: scale(1.1); opacity: 1; } /* Stronger scale for noticeability */
  100% { transform: scale(1); opacity: 1; }
}

.animate-pulse {
  animation: pulse 0.7s ease-in-out 3; /* Repeat 3 times, faster per pulse to fit 2s total */
}

/* Breadcrumb column ensures wrap to next line as needed */
#filterInfo {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-start;
  max-width: 100%;
}

/* Fancy empty state for filters */
.filters-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-size: 0.9rem;
}
.filters-empty .empty-icon { filter: drop-shadow(0 0 4px rgba(255,255,255,0.2)); }

.filter-item:hover { background-color: #1a8e8a; }

.filter-item .close-btn {
  width: 14px;
  height: 14px;
  margin-left: 0.35rem;
  font-size: 0.9rem;
  font-weight: bold;
  color: #ffffff;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}

.filter-item .close-btn:hover { color: #e2e8f0; }

.filter-btn {
    width: 76px;
    height: 30px;
    font-size: 0.8rem !important;
}

.clear-btn {
    background-color: rgba(220, 53, 69, 0.8);
    border-color: rgba(220, 53, 69, 0.8);
}

.clear-btn:hover {
    background-color: rgba(220, 53, 69, 1);
    border-color: rgba(220, 53, 69, 1);
}

#prevPageBtn,
#nextPageBtn,
#columnVisibilityBtn {
  background-color: #20b2aa;
  border-color: #20b2aa;
  color: #ffffff;
}

@media (max-width: 768px) { /* Mobile breakpoint */
  .stats-panel-group {
    flex-direction: row; /* Keep row layout */
    overflow-x: auto; /* Scroll horizontally if needed */
    flex-wrap: nowrap; /* Prevent wrapping */
    gap: 16px; /* Smaller gap */
    padding: 0 8px;
  }

  /* Adjust other elements if needed, but keep row */

  .stats-panel-group {
    align-items: flex-start; /* Left-align stacked items */
    padding-left: 8px;
  }

  .stats-panel-group .stats-panel:not(:last-child)::after {
    /* Horizontal dividers for stacked layout */
    content: '';
    position: absolute;
    bottom: -8px; /* Smaller divider spacing */
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(255,255,255,0.15);
  }

  /* No final divider needed */
  .stats-panel-group::after {
    display: none;
  }

  .stats-pie {
    width: 60px; /* Smaller pies on mobile */
    height: 60px;
  }

  .stats-pie-center {
    inset: 4px; /* Adjust inset for smaller size */
  }

  .stats-panel {
    
    max-width: 300px; /* Limit width for better mobile fit */
    gap: 4px; /* Smaller internal gap */
  }

  .stats-chart-row {
    flex-direction: row; /* Default horizontal */
    gap: 8px; /* Smaller gap */
  }

  /* Extra small screens: stack pie and legend vertically */
  @media (max-width: 480px) {
    .stats-chart-row {
      flex-direction: column;
      gap: 4px;
    }
  }

  .stats-panel.hover .stats-pie {
    transform: scale(1.05); /* Smaller scale for mobile */
  }
}

.stats-content {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
  gap: 24px;
}

.stats-panel-group {
  flex: 3; /* More space for pies */
  display: flex;
  justify-content: flex-start;
  gap: 24px;
}

.completion-stats {
  display: flex;
  flex-direction: row;
  gap: 24px;
  align-items: center;
  min-width: auto;
  position: relative; /* For divider positioning */
}

/* Enhance divider */
.completion-stats::before {
  content: '';
  width: 1px;
  height: 100%; /* Full height */
  background: rgba(255,255,255,0.3); /* Higher opacity */
  position: absolute;
  left: -12px; /* Position to left of stats */
}

/* Circle for stats */
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.stat-circle {
  width: 75px;
  height: 75px;
  border-radius: 50%;
  background: #1f2937; /* Like pie center */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 6px rgba(255,255,255,0.06);
  position: relative; /* For tooltip positioning */
}

.stat-tooltip {
  position: fixed; /* Relative to viewport */
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  display: none; /* Hidden by default */
  pointer-events: none;
  z-index: 1000;
}

/* Remove fixed positioning and arrow */
.stat-circle:hover .stat-tooltip { outline: none; }

/* Remove ::after */
.stat-tooltip::after {
  display: none;
}

/* Mobile: same */
@media (max-width: 768px) {
  .stat-tooltip { font-size: inherit; }
}

.stat-value {
  font-size: 1.8rem; /* Increased */
  font-weight: bold;
  color: #e5e7eb;
}

.stat-arrow {
  font-size: 1.6rem; /* Increased */
  font-weight: bold;
}

/* Ensure colors apply */
.arrow-up { color: #20b2aa !important; }
.arrow-down { color: #ce4848 !important; }
.arrow-equal { color: #94a3b8 !important; }

/* Mobile adjustments */
@media (max-width: 768px) {
  .completion-stats {
    flex-direction: column;
    gap: 16px;
  }
  .completion-stats::before {
    display: none;
  }
  .stat-circle {
    width: 60px;
    height: 60px;
  }
  .stat-value { font-size: 1.4rem; }
  .stat-arrow { font-size: 1.2rem; }
}