.login-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Enhanced Task Card Styles */
.task-card {
    transition: all 0.3s ease;
    border-left: 4px solid #e5e7eb;
    cursor: pointer;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1rem;
}

.task-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
    border-left-color: #3b82f6;
}

/* Enhanced Priority Colors */
.priority-high {
    border-left-color: #dc2626;
    background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}
.priority-medium {
    border-left-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}
.priority-low {
    border-left-color: #059669;
    background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

/* Enhanced Status Colors */
.status-pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fbbf24 100%);
    color: #92400e;
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-block;
    text-align: center;
    min-width: 70px;
}
.status-progress {
    background: linear-gradient(135deg, #dbeafe 0%, #3b82f6 100%);
    color: #ffffff;
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-block;
    text-align: center;
    min-width: 70px;
}
.status-completed {
    background: linear-gradient(135deg, #d1fae5 0%, #10b981 100%);
    color: #ffffff;
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-block;
    text-align: center;
    min-width: 70px;
}
.status-overdue {
    background: linear-gradient(135deg, #fee2e2 0%, #ef4444 100%);
    color: #ffffff;
    border-radius: 20px;
    padding: 4px 12px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-block;
    text-align: center;
    min-width: 70px;
}

/* Enhanced Animations */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Enhanced Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-content {
    max-width: 95vw;
    max-height: 90vh;
    margin: auto;
    text-align: left;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.25);
    overflow: hidden;
}

/* Enhanced Loading Spinner */
.loading-spinner {
    border: 4px solid #f1f5f9;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

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

/* Enhanced Notification */
.notification {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 2000;
    min-width: 320px;
    transform: translateX(400px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.notification.show {
    transform: translateX(0);
}

/* Enhanced Tab Styles */
.tab-button {
    padding: 0.875rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.tab-button.active {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.3);
    border-color: #4f46e5;
}

.tab-button:not(.active):hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #f3f4f6 100%);
    color: #4f46e5;
    border-color: #c7d2fe;
    transform: translateY(-2px);
}

/* **ENHANCED TABLE STYLES** */
.table-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin: 1.5rem 0;
    border: 1px solid #f1f5f9;
}

.table-wrapper {
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 #f8fafc;
}

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

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

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

.enhanced-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
    background: #ffffff;
}

.enhanced-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.enhanced-table th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
    position: relative;
}

.enhanced-table th:first-child {
    border-top-left-radius: 16px;
}

.enhanced-table th:last-child {
    border-top-right-radius: 16px;
}

.enhanced-table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f1f5f9;
}

.enhanced-table tbody tr:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.enhanced-table tbody tr:last-child {
    border-bottom: none;
}

.enhanced-table td {
    padding: 1rem 1.25rem;
    color: #475569;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.enhanced-table td:first-child {
    font-weight: 600;
    color: #1e293b;
}

/* Table Cell Types */
.table-cell-title {
    font-weight: 600;
    color: #1e293b;
    max-width: 250px;
}

.table-cell-status {
    text-align: center;
}

.table-cell-date {
    color: #64748b;
    font-size: 0.8125rem;
}

.table-cell-actions {
    text-align: center;
    white-space: nowrap;
}

.table-cell-priority {
    text-align: center;
}

/* Action Buttons in Tables */
.table-action-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0 0.25rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.table-action-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.table-action-btn.view {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.table-action-btn.edit {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.table-action-btn.delete {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.table-action-btn.complete {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

/* **CORRECTED LIST VIEW STYLES - CRITICAL FIX** */
.list-view-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    margin: 1.5rem 0;
    border: 1px solid #f1f5f9;
}

/* LIST HEADER - Working correctly */
.list-header {
    display: grid !important;
    grid-template-columns: 2.5fr 1fr 1.2fr 1fr 1.5fr !important;
    gap: 1.5rem !important;
    padding: 1.25rem 2rem !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-bottom: 2px solid #e2e8f0;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* LIST ITEM - CRITICAL FIX */
.list-item {
    display: grid !important;
    grid-template-columns: 2.5fr 1fr 1.2fr 1fr 1.5fr !important;
    gap: 1.5rem !important;
    padding: 1.5rem 2rem !important;
    border-bottom: 1px solid #f1f5f9;
    align-items: center !important;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    min-height: 60px;
}

.list-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateX(4px);
}

.list-item:last-child {
    border-bottom: none;
}

/* FORCE GRID LAYOUT FOR ALL LIST ITEMS */
.list-item > * {
    display: block !important;
    align-self: center !important;
}

/* List item content styling - SPECIFIC TARGETING */
.list-item > .task-title,
.list-item > div:nth-child(1) {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    grid-column: 1;
}

.list-item > .branch-id,
.list-item > div:nth-child(2) {
    font-weight: 500;
    color: #3b82f6;
    font-size: 0.85rem;
    grid-column: 2;
}

.list-item > .due-date,
.list-item > div:nth-child(3) {
    color: #64748b;
    font-size: 0.85rem;
    grid-column: 3;
}

.list-item > .status-badge,
.list-item > div:nth-child(4) {
    display: inline-block;
    text-align: center;
    grid-column: 4;
}

.list-item > .action-buttons,
.list-item > div:nth-child(5) {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
    grid-column: 5;
}

/* ALTERNATIVE APPROACH - TABLE-LIKE STRUCTURE */
.list-view-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #f1f5f9;
}

.list-view-table thead {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    position: sticky;
    top: 0;
    z-index: 10;
}

.list-view-table th {
    padding: 1.25rem 2rem;
    text-align: left;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.list-view-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.list-view-table tbody tr:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateX(4px);
}

.list-view-table td {
    padding: 1.5rem 2rem;
    color: #475569;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-view-table td:first-child {
    font-weight: 600;
    color: #1e293b;
    max-width: 300px;
}

.list-view-table td:nth-child(2) {
    font-weight: 500;
    color: #3b82f6;
}

.list-view-table td:nth-child(3) {
    color: #64748b;
    font-size: 0.85rem;
}

.list-view-table td:nth-child(4) {
    text-align: center;
}

.list-view-table td:nth-child(5) {
    text-align: left;
}

/* Enhanced Admin Summary Styles */
.admin-summary-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 2fr 1fr;
    gap: 2rem;
    padding: 1.25rem 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 12px;
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    border: 2px solid #e2e8f0;
    align-items: center;
    justify-items: start;
}

.admin-summary-item {
    display: grid;
    grid-template-columns: 3fr 1fr 1fr 2fr 1fr;
    gap: 2rem;
    padding: 2rem;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
    justify-items: start;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    margin-bottom: 1rem;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.admin-summary-item:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-color: #cbd5e1;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

/* Enhanced Progress Bars */
.progress-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.progress-bar {
    width: 5rem;
    height: 0.75rem;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-radius: 9999px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    border-radius: 9999px;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* **BRANCH DETAILS MODAL - PROPER TABLE FORMAT** */
.branch-details-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    max-width: 800px;
    width: 100%;
}

/* Branch Details Grid Layout */
.branch-details-header {
    display: grid !important;
    grid-template-columns: 1.5fr 1fr 1.2fr 2fr !important;
    gap: 1.5rem !important;
    padding: 1.25rem 2rem !important;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    font-weight: 700;
    color: #334155;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #cbd5e1;
    align-items: center;
}

.branch-details-item {
    display: grid !important;
    grid-template-columns: 1.5fr 1fr 1.2fr 2fr !important;
    gap: 1.5rem !important;
    padding: 1.25rem 2rem !important;
    border-bottom: 1px solid #f1f5f9;
    align-items: center !important;
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.branch-details-item:hover {
    background-color: #f8fafc;
}

.branch-details-item:last-child {
    border-bottom: none;
}

/* Branch column styling */
.branch-col-branch {
    font-weight: 600;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    grid-column: 1;
}

.branch-col-status {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    grid-column: 2;
}

.branch-col-assignee {
    color: #3b82f6;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    grid-column: 3;
}

.branch-col-note {
    color: #64748b;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    grid-column: 4;
}

/* Modal Header for Branch Details */
.branch-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
}

.branch-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .list-header,
    .list-item {
        grid-template-columns: 2fr 0.8fr 1fr 0.8fr 1.2fr !important;
        gap: 1rem !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
    
    .admin-summary-header,
    .admin-summary-item {
        grid-template-columns: 2.5fr 0.8fr 0.8fr 1.5fr 0.8fr;
        gap: 1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .branch-details-header,
    .branch-details-item {
        grid-template-columns: 1.2fr 0.8fr 1fr 1.5fr !important;
        gap: 1rem !important;
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .list-header {
        display: none !important;
    }
    
    .list-item {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0.5rem !important;
        padding: 1.5rem !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        margin-bottom: 1rem !important;
        background: #f8fafc !important;
    }
    
    .list-item > * {
        display: block !important;
        margin-bottom: 0.5rem !important;
    }
    
    .list-item .task-title::before { content: "Task: "; font-weight: 700; color: #334155; }
    .list-item .branch-id::before { content: "Branch: "; font-weight: 700; color: #334155; }
    .list-item .due-date::before { content: "Due: "; font-weight: 700; color: #334155; }
    .list-item .status-badge::before { content: "Status: "; font-weight: 700; color: #334155; }
    .list-item .action-buttons::before { content: "Actions: "; font-weight: 700; color: #334155; display: block; margin-bottom: 0.5rem; }
    
    .branch-details-header {
        display: none !important;
    }
    
    .branch-details-item {
        display: block !important;
        grid-template-columns: none !important;
        gap: 0.5rem !important;
        padding: 1.25rem !important;
        border: 1px solid #e2e8f0 !important;
        border-radius: 8px !important;
        margin-bottom: 1rem !important;
        background: #f8fafc !important;
    }
    
    .branch-col-branch::before { content: "Branch: "; font-weight: 700; color: #334155; }
    .branch-col-status::before { content: "Status: "; font-weight: 700; color: #334155; }
    .branch-col-assignee::before { content: "Assignee: "; font-weight: 700; color: #334155; }
    .branch-col-note::before { content: "Note: "; font-weight: 700; color: #334155; }
}
