/* Reports Page Styles */
.reports-container { 
    padding: 24px; 
    height: 100%; 
    overflow-y: auto; 
 background-color: var(--reports-bg); 
}

.reports-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 32px; 
    padding: 0 8px; 
}

/* Left and right regions inside header */
.reports-header-left { display: flex; align-items: center; }
.reports-header-right { display: flex; align-items: flex-start; justify-content: flex-end; }

.reports-title { 
    font-size: 2rem; 
    font-weight: 600; 
    color: var(--text-color-dark); 
    margin: 0; 
}

/* Report Grid Layout */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 8px;
}

.report-card {
    background: var(--card-bg);
    border: 2px solid var(--border-color-light);
    border-radius: 12px;
    padding: 32px 24px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
  flex-direction: column;
    align-items: center;
    gap: 16px;
    text-align: center;
    min-height: 200px;
}

.report-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    transform: translateY(-2px);
}

.report-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
 font-size: 2rem;
}

.report-card:hover .report-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.report-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color-dark);
}

.report-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-color-light);
    line-height: 1.5;
}

/* Report Back Header */
.report-back-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0 8px;
}

.report-back-header h2 {
    font-size: 1.75rem;
font-weight: 600;
    color: var(--text-color-dark);
    margin: 0;
}

.report-back-header .btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Report Content Area */
.report-content {
    width: 100%;
}

/* Coming Soon Placeholder */
.coming-soon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: var(--card-bg);
    border-radius: 12px;
    padding: 48px;
    text-align: center;
}

.coming-soon i {
    font-size: 4rem;
    color: var(--text-color-light);
    margin-bottom: 24px;
}

.coming-soon p {
    font-size: 1.25rem;
    color: var(--text-color-light);
    margin: 0;
}

/* Existing styles below */
.date-selectors { display: flex; gap: 16px; align-items: flex-start; }

.selector-group { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }

.selector-group label { font-size: 0.875rem; font-weight: 500; color: var(--text-color-muted); }

.month-select,
.year-select,
.user-select { padding: 8px 12px; border: 1px solid var(--input-border); border-radius: var(--border-radius); background-color: var(--input-bg); font-family: var(--font-family); font-size: 0.875rem; color: var(--text-color-dark); cursor: pointer; min-width: 120px; }

    .month-select:focus,
    .year-select:focus,
    .user-select:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }

.calendar-container { background-color: var(--card-bg); border-radius: 8px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); padding: 24px; margin-bottom: 24px; }

.calendar-header { margin-bottom: 24px; }

.calendar-nav { display: flex; align-items: center; justify-content: center; gap: 24px; }

.nav-btn { background: none; border: none; padding: 8px; border-radius: var(--border-radius); cursor: pointer; color: var(--text-color-dark); display: flex; align-items: center; justify-content: center; transition: background-color 0.2s; }

    .nav-btn:hover { background-color: var(--hover-bg); }

.current-month { font-size: 1.5rem; font-weight: 600; color: var(--text-color-dark); margin: 0; min-width: 200px; text-align: center; }

/* Make the calendar expand to the full width of its container and ensure equal-width day columns */
.calendar { width: 100%; max-width: 100%; margin: 0; }

/* Use a slightly larger gap to match month layout and allow visible rounded day cards */
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 12px; }

.weekday { padding: 12px 4px; text-align: center; font-weight: 600; font-size: 0.875rem; color: var(--text-color-muted); text-transform: uppercase; letter-spacing: 0.05em; box-sizing: border-box; }

/* Keep each day as its own card with a thin border; remove the grid background so empty cells render transparently */
.calendar-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; background-color: transparent; border: none; border-radius: var(--border-radius); overflow: visible; }

/* Normal day card */
.calendar-day {
    background-color: var(--calendar-day-bg);
    min-height: 100px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--calendar-day-border);
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
    box-sizing: border-box;
  min-width: 0;
    border-radius: 6px;
}

/* Empty day cells (used for leading/trailing placeholders) should be transparent and not interactive */
.calendar-day.empty {
    background: transparent;
    border: none;
 cursor: default;
}

.calendar-day:hover { background-color: var(--table-hover); }

    .calendar-day.other-month { background-color: var(--bg-tertiary); color: var(--text-color-light); opacity: 0.5; }

    /* Subtle today highlight without heavy border */
    .calendar-day.today { background: var(--calendar-today-bg); border-color: #3b82f6; }

    .calendar-day.has-entries { background-color: var(--calendar-entry-bg); }

.day-number { font-weight: 600; font-size: 0.875rem; color: var(--text-color-dark); margin-bottom: 4px; }

.other-month .day-number { color: var(--text-color-light); }

.day-hours { font-size: 0.625rem; }
}

/* Weekly Planning Report Styles */
.weekly-planning-report {
    width: 100%;
}

.planning-controls {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    align-items: center;
}

.planning-controls .filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: auto;
}

.planning-controls .filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color-dark);
    margin: 0;
    white-space: nowrap;
}

.planning-controls .filter-group select,
.planning-controls .filter-group input[type="date"] {
    padding: 6px 12px;
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    background-color: var(--input-bg);
    color: var(--text-color-dark);
    font-size: 0.875rem;
    cursor: pointer;
    font-family: var(--font-family);
    min-width: 150px;
}

.planning-controls .filter-group input[type="date"] {
    min-height: 34px;
}

.planning-controls .filter-group select:focus,
.planning-controls .filter-group input[type="date"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.planning-controls .filter-group .btn {
    min-width: auto;
    padding: 6px 16px;
    font-size: 0.875rem;
}

.planning-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

/* Gantt Chart Container */
.gantt-container {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.gantt-header {
    display: flex;
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.gantt-sidebar {
    width: 280px;
    min-width: 280px;
    --background: var(--card-bg);
    border-right: 2px solid var(--border-color);
    position: sticky;
    left: 0;
    z-index: 10;
}

.gantt-title {
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-color-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gantt-timeline {
    display: flex;
    flex: 1;
    min-width: 0;
}

.gantt-week-header {
    flex: 1;
    min-width: 80px;
    padding: 8px 4px;
    text-align: center;
    border-right: 1px solid var(--border-color-light);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.week-label {
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--text-color-dark);
}

.week-date {
    font-size: 0.65rem;
    color: var(--text-color-muted);
}

.week-total-header {
    font-size: 0.7rem;
    font-weight: 600;
    color: #3b82f6;
    margin-top: 4px;
    padding: 2px 6px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 3px;
}

/* Gantt Body */
.gantt-body {
    min-height: 200px;
}

.gantt-user-section {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .gantt-user-section {
    background: rgba(255, 255, 255, 0.06);
}

.user-header {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-color-dark);
}

.user-stats {
    font-size: 0.75rem;
    color: var(--text-color-muted);
}

.gantt-cell {
    flex: 1;
    min-width: 80px;
    min-height: 40px;
    border-right: 1px solid var(--border-color-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gantt-cell.has-allocation {
    background: rgba(59, 130, 246, 0.05);
}

.cell-hours {
    font-size: 0.7rem;
    font-weight: 600;
    color: #3b82f6;
    padding: 2px 6px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 3px;
}

/* Gantt Project Rows */
.gantt-project-row {
    display: flex;
    border-bottom: 1px solid var(--border-color-light);
    min-height: 44px;
}

.project-info-sidebar {
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.project-info-sidebar .project-name {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-color-dark);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-info-sidebar .project-customer {
    font-size: 0.7rem;
    color: var(--text-color-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Gantt Bar Container and Bar */
.gantt-bar-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
}

.gantt-bar {
    position: absolute;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.gantt-bar.normal {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.gantt-bar.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.gantt-bar.critical {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.gantt-bar.inactive {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    opacity: 0.6;
}

.gantt-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 50;
}

.bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    position: relative;
    z-index: 2;
}

.bar-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
}

.bar-trello-link {
    color: white;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 2px 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    transition: background-color 0.2s;
    font-size: 0.7rem;
}

.bar-trello-link:hover {
    background: rgba(255, 255, 255, 0.3);
}

.bar-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.3s ease;
    z-index: 1;
}

/* No Results */
.no-results {
    padding: 48px;
    text-align: center;
    color: var(--text-color-muted);
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.no-results p {
    font-size: 1rem;
    margin: 0;
}

/* Timesheet Report Styles */
.timesheet-report {
    width: 100%;
}

.timesheet-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.timesheet-controls .filter-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.timesheet-controls .filter-row.filter-checkboxes {
    padding-top: 12px;
    border-top: 1px solid var(--border-color-light);
    align-items: center;
}

.timesheet-controls .filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.timesheet-controls .filter-checkboxes .filter-group {
    flex-direction: row;
    align-items: center;
    min-width: auto;
}

.timesheet-controls .filter-checkboxes .filter-group label {
    margin: 0;
    cursor: pointer;
}

.timesheet-controls .filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-color-dark);
    margin: 0;
}

.timesheet-controls .filter-group select,
.timesheet-controls .filter-group input[type="date"] {
    padding: 8px 12px;
    border: 1px solid var(--input-border);
    border-radius: var(--border-radius);
    background-color: var(--input-bg);
    color: var(--text-color-dark);
    font-size: 0.875rem;
    cursor: pointer;
    font-family: var(--font-family);
    min-width: 150px;
}

.timesheet-controls .filter-group select:focus,
.timesheet-controls .filter-group input[type="date"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.timesheet-controls .filter-group .btn {
    padding: 8px 16px;
    font-size: 0.875rem;
}

.timesheet-summary {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.summary-label {
    font-size: 0.75rem;
    color: var(--text-color-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.summary-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-color-dark);
}

.timesheet-table-container {
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.timesheet-table {
    width: 100%;
    border-collapse: collapse;
}

.timesheet-table thead {
    background: var(--bg-secondary);
    border-bottom: 2px solid var(--border-color);
}

.timesheet-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-color-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.timesheet-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color-light);
    color: var(--text-color-dark);
    font-size: 0.875rem;
}

.timesheet-table tbody tr {
    transition: background-color 0.2s;
}

.timesheet-table tbody tr:hover {
    background-color: var(--table-hover);
}

.timesheet-table tbody tr.inactive-row {
    opacity: 0.6;
}

.project-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.members-list {
    font-size: 0.8rem;
    color: var(--text-color-muted);
}

.current-user-highlight {
    font-weight: 700;
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.12);
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-block;
    margin: 0 2px;
}

[data-theme="dark"] .current-user-highlight {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.15);
}

.progress-container {
    position: relative;
    width: 100%;
    min-width: 80px;
    height: 24px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    overflow: hidden;
}

[data-theme="dark"] .progress-container {
    background: rgba(255, 255, 255, 0.05);
}

.progress-bar {
    position: absolute !important;
    top: 0;
    left: 0;
    height: 100% !important;
    transition: width 0.3s ease;
    border-radius: 4px 0 0 4px;
    display: block !important;
    max-width: 100%;
}

.progress-bar.progress-low {
    background: #3b82f6 !important; /* Blue - under 80% */
}

.progress-bar.progress-medium {
    background: #3b82f6 !important; /* Blue - under 80% */
}

.progress-bar.progress-high {
    background: #f59e0b !important; /* Orange - 80-99% */
}

.progress-bar.progress-over {
    background: #ef4444 !important; /* Red - 99%+ */
    animation: pulse-over 2s ease-in-out infinite;
}

@keyframes pulse-over {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-color-dark);
    z-index: 2;
    pointer-events: none;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.status-badge.status-inactive {
    background: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

.trello-link {
    color: #3b82f6;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.trello-link:hover {
    color: #2563eb;
}

/* Responsive Design for Timesheet */
@media (max-width: 768px) {
    .timesheet-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .timesheet-controls .filter-group {
        min-width: 100%;
    }

    .timesheet-summary {
        flex-direction: column;
    }

    .timesheet-table-container {
        overflow-x: scroll;
    }
}

/* Responsive Design for Gantt Chart */
@media (max-width: 1200px) {
    .gantt-sidebar {
        width: 220px;
        min-width: 220px;
    }

    .gantt-week-header {
        min-width: 70px;
    }

    .gantt-cell {
        min-width: 70px;
    }
}

@media (max-width: 768px) {
    .planning-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .planning-controls .filter-group {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .planning-controls .filter-group select,
    .planning-controls .filter-group input[type="date"] {
        min-width: 100%;
    }

    .planning-summary {
        grid-template-columns: 1fr;
    }

    .gantt-container {
        border-radius: 0;
        margin: 0 -24px;
    }

    .gantt-sidebar {
        width: 180px;
        min-width: 180px;
    }

    .gantt-week-header {
        min-width: 60px;
    }

    .gantt-cell {
        min-width: 60px;
        min-height: 36px;
    }

    .gantt-bar {
        height: 24px;
        padding: 0 6px;
    }

    .bar-text {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .gantt-sidebar {
        width: 140px;
        min-width: 140px;
    }

    .gantt-week-header {
        min-width: 50px;
    }

    .gantt-cell {
        min-width: 50px;
    }

    .project-info-sidebar {
        padding: 6px 12px;
    }

    .gantt-bar {
        height: 20px;
        padding: 0 4px;
    }

    .bar-text {
        font-size: 0.65rem;
    }
}
