/* Weekly Review View - READY Tasks Completed */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: radial-gradient(1200px 600px at 50% -10%, #f8fafc 10%, #eef2f7 55%, #e9eef5 100%);
    min-height: 100vh;
}

.weekly-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Header */
.weekly-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 12px;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.header-left h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
}

.subtitle {
    color: #6c757d;
    font-size: 0.9rem;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.week-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-nav {
    padding: 6px 12px;
    background: #f8f9fa;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.85rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-nav:hover {
    background: #e9ecef;
    color: #212529;
}

.week-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #212529;
    min-width: 120px;
    text-align: center;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.btn-view {
    padding: 6px 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.15s;
}

.btn-view:hover {
    opacity: 0.9;
}

.btn-secondary {
    padding: 6px 14px;
    background: #fff;
    color: #495057;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s;
}

.btn-secondary:hover {
    background: #f8f9fa;
    color: #212529;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 40px;
    text-align: center;
    color: #6c757d;
}

.empty-state h2 {
    margin: 16px 0 8px;
    color: #495057;
}

.empty-state p {
    margin: 0;
    line-height: 1.6;
}

/* Main Grid */
.weekly-grid {
    flex: 1;
    overflow: auto;
    padding: 20px;
}

.grid-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Table Headers */
.grid-table th {
    padding: 12px 8px;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
    font-size: 0.85rem;
    color: #495057;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.grid-table th.user-header {
    width: 140px;
    min-width: 140px;
    text-align: left;
    padding-left: 16px;
}

.grid-table th.day-header {
    min-width: 150px;
}

.grid-table th.weekend-header {
    min-width: 120px;
    background: #fff5f5;
}

.day-name {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #868e96;
}

.day-date {
    display: block;
    font-size: 0.95rem;
    color: #212529;
    margin-top: 2px;
}

/* Table Rows */
.grid-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.grid-table tr:last-child td {
    border-bottom: none;
}

/* User Cell */
.user-cell {
    font-weight: 500;
    font-size: 0.85rem;
    color: #212529;
    padding-left: 16px !important;
}

/* Alternating row colors - using same pattern as timeline */
.grid-table tbody tr:nth-child(8n+1) { background: rgba(102, 126, 234, 0.06); }
.grid-table tbody tr:nth-child(8n+1) .user-cell { background: rgba(102, 126, 234, 0.12); }

.grid-table tbody tr:nth-child(8n+2) { background: rgba(67, 233, 123, 0.06); }
.grid-table tbody tr:nth-child(8n+2) .user-cell { background: rgba(67, 233, 123, 0.12); }

.grid-table tbody tr:nth-child(8n+3) { background: rgba(79, 172, 254, 0.06); }
.grid-table tbody tr:nth-child(8n+3) .user-cell { background: rgba(79, 172, 254, 0.12); }

.grid-table tbody tr:nth-child(8n+4) { background: rgba(250, 112, 154, 0.06); }
.grid-table tbody tr:nth-child(8n+4) .user-cell { background: rgba(250, 112, 154, 0.12); }

.grid-table tbody tr:nth-child(8n+5) { background: rgba(168, 237, 234, 0.06); }
.grid-table tbody tr:nth-child(8n+5) .user-cell { background: rgba(168, 237, 234, 0.15); }

.grid-table tbody tr:nth-child(8n+6) { background: rgba(255, 236, 210, 0.08); }
.grid-table tbody tr:nth-child(8n+6) .user-cell { background: rgba(255, 236, 210, 0.18); }

.grid-table tbody tr:nth-child(8n+7) { background: rgba(240, 147, 251, 0.06); }
.grid-table tbody tr:nth-child(8n+7) .user-cell { background: rgba(240, 147, 251, 0.12); }

.grid-table tbody tr:nth-child(8n+0) { background: rgba(254, 214, 227, 0.08); }
.grid-table tbody tr:nth-child(8n+0) .user-cell { background: rgba(254, 214, 227, 0.15); }

/* Weekend column */
.weekend-cell {
    background: rgba(224, 49, 49, 0.04) !important;
}

/* Day Cells */
.day-cell {
    min-height: 50px;
}

.task-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Task Item */
.task-item {
    display: block;
}

.task-link {
    display: block;
    padding: 6px 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.15), rgba(118, 75, 162, 0.15));
    border-radius: 6px;
    text-decoration: none;
    color: #212529;
    font-size: 0.8rem;
    line-height: 1.3;
    transition: all 0.15s;
    border-left: 3px solid #667eea;
}

.task-link:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.25), rgba(118, 75, 162, 0.25));
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.task-title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-num {
    display: none;
}

/* Empty day */
.empty-day {
    color: #ced4da;
    text-align: center;
    font-size: 1.2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .weekly-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-controls {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
    }

    .grid-table th.day-header {
        min-width: 120px;
    }
}

@media (max-width: 768px) {
    .weekly-grid {
        padding: 10px;
    }

    .grid-table th.user-header {
        width: 100px;
        min-width: 100px;
    }

    .grid-table th.day-header {
        min-width: 100px;
    }

    .task-title {
        font-size: 0.75rem;
    }
}
