/* EXTENDED/task-manager/public/css/live-dashboard.css - Live Dashboard Styles v1.0 */

/* ===== NAVIGATION ENHANCEMENTS ===== */

.nav-badge {
    transition: all 0.3s ease;
}

.nav-badge.badge-updated {
    animation: badge-bounce 0.5s ease;
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
}

@keyframes badge-bounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.2); }
    75% { transform: scale(0.9); }
}

.nav-badge.live-badge {
    background: linear-gradient(45deg, #ff6b6b, #ee5a24);
    animation: pulse-live 2s infinite;
}

@keyframes pulse-live {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

/* ===== LIVE DASHBOARD MAIN ===== */

.live-dashboard-view,
.tenant-dashboard-view {
    padding: 0;
    max-width: 100%;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.dashboard-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
}

.dashboard-header h1 i {
    margin-right: 12px;
    color: #ffd700;
}

.dashboard-controls {
    display: flex;
    gap: 12px;
}

.dashboard-controls .btn-primary,
.dashboard-controls .btn-secondary,
.dashboard-controls .btn-info {
    border: 2px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    color: white;
    font-weight: 500;
}

.dashboard-controls .btn-primary:hover,
.dashboard-controls .btn-secondary:hover,
.dashboard-controls .btn-info:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.notification-count {
    background: #ff4757;
    color: white;
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: bold;
    margin-left: 6px;
    display: inline-block;
    min-width: 20px;
    text-align: center;
}

/* ===== LIVE STATISTICS CARDS ===== */

.live-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.live-stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.live-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.live-stat-card.urgent::before {
    background: linear-gradient(90deg, #ff6b6b, #ee5a24);
}

.live-stat-card.active::before {
    background: linear-gradient(90deg, #5f27cd, #00d2d3);
}

.live-stat-card.team::before {
    background: linear-gradient(90deg, #00c6ff, #0072ff);
}

.live-stat-card.productivity::before {
    background: linear-gradient(90deg, #11998e, #38ef7d);
}

.live-stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 48px rgba(0,0,0,0.15);
}

.live-stat-card .stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.live-stat-card.urgent .stat-icon {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.live-stat-card.active .stat-icon {
    background: linear-gradient(135deg, #5f27cd, #00d2d3);
    color: white;
}

.live-stat-card.team .stat-icon {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    color: white;
}

.live-stat-card.productivity .stat-icon {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
}

.live-stat-card .stat-content {
    flex: 1;
}

.live-stat-card .stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    display: block;
    margin-bottom: 4px;
}

.live-stat-card .stat-label {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
}

.live-stat-card .stat-trend {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 12px;
    color: #27ae60;
    font-weight: 600;
}

/* ===== DASHBOARD SECTIONS ===== */

.dashboard-main-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.dashboard-section {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
}

/* ===== NEW SIMPLE DASHBOARD LAYOUT ===== */

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .dashboard-main-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.dashboard-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
}

.dashboard-summary-card {
    flex: 1 1 180px;
    min-width: 160px;
    background: #f9fafb;
    border-radius: 12px;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
}

.summary-label {
    font-size: 11px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.summary-value {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.test-project-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    background: #fefce8;
    border: 1px solid #fde68a;
}

.test-project-card.test-project-empty {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.test-project-main {
    flex: 1 1 auto;
}

.test-project-name {
    font-weight: 600;
    color: #111827;
    margin: 4px 0;
}

.test-project-meta {
    font-size: 13px;
    color: #6b7280;
}

.test-project-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .test-project-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .test-project-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

.dashboard-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dashboard-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
}

/* Zeilen mit Click-Handler klar als klickbar kennzeichnen */
.dashboard-list-item[onclick] {
    cursor: pointer;
}

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

.dashboard-list-main {
    flex: 1 1 auto;
    min-width: 0;
}

.dashboard-list-title {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-list-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.dashboard-list-right {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    flex-shrink: 0;
}

.dashboard-list-time {
    font-size: 12px;
    color: #9ca3af;
}

.dashboard-empty {
    padding: 10px 0 4px;
    font-size: 13px;
    color: #6b7280;
}

.dashboard-list-comment {
    margin-top: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: #fef3c7; /* soft amber */
    color: #92400e;
    font-size: 12px;
    line-height: 1.4;
}

.dashboard-list-comment .comment-more-toggle {
    display: inline-block;
    margin-left: 4px;
    color: #c05621;
    font-weight: 500;
    cursor: pointer;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.section-header h2,
.section-header h3 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.section-header h2 {
    font-size: 22px;
}

.section-header h3 {
    font-size: 18px;
}

.section-header i {
    margin-right: 10px;
    color: #667eea;
}

.section-controls .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 8px 12px;
    background: white;
    font-size: 14px;
    min-width: 150px;
}

/* ===== ACTIVE TASKS ===== */

.active-tasks-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.task-card {
    background: white;
    border: 2px solid #f1f3f4;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.task-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    border-radius: 4px 0 0 4px;
    background: #28a745;
}

.task-card.urgent::before,
.task-card.overdue::before {
    background: #dc3545;
}

.task-card.normal::before {
    background: #007bff;
}

.task-card:hover {
    border-color: #667eea;
    transform: translateX(8px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.task-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.task-urgency .fas {
    font-size: 20px;
}

/* ===== WORKFLOW VISUALIZATION ===== */

.task-workflow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.workflow-step {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.workflow-step.completed {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.workflow-step.active {
    background: #cce7ff;
    color: #004085;
    border: 2px solid #a6d8ff;
    animation: pulse-active 2s infinite;
}

.workflow-step.pending {
    background: #fff3cd;
    color: #856404;
    border: 2px solid #ffeaa7;
}

.workflow-step small {
    display: block;
    font-size: 11px;
    margin-top: 4px;
    opacity: 0.8;
}

.workflow-arrow {
    font-size: 18px;
    color: #6c757d;
    margin: 0 8px;
}

@keyframes pulse-active {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===== PROGRESS BAR ===== */

.task-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 4px;
    transition: width 0.8s ease;
}

.progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    min-width: 40px;
}

/* ===== TASK METADATA ===== */

.task-meta {
    margin-bottom: 16px;
}

.task-timing {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #6c757d;
}

.deadline-time.text-danger {
    color: #dc3545 !important;
    font-weight: 600;
}

/* ===== TASK ACTIONS ===== */

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

.task-actions .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.task-actions .btn-primary {
    background: #007bff;
    color: white;
}

.task-actions .btn-info {
    background: #17a2b8;
    color: white;
}

.task-actions .btn-warning {
    background: #ffc107;
    color: #212529;
}

.task-actions .btn-danger {
    background: #dc3545;
    color: white;
}

.task-actions .btn-sm:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ===== DASHBOARD COLUMNS ===== */

.dashboard-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.dashboard-column {
    display: flex;
    flex-direction: column;
}

/* ===== TEAM ACTIVITY ===== */

.team-activity-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.team-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #28a745;
    transition: all 0.3s ease;
}

.team-member.offline {
    border-left-color: #6c757d;
    opacity: 0.7;
}

.team-member.busy {
    border-left-color: #ffc107;
}

.team-member:hover {
    background: #e9ecef;
    transform: translateX(4px);
}

.member-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.member-avatar {
    position: relative;
}

.member-avatar .fas {
    font-size: 28px;
    color: #6c757d;
}

.status-indicator {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-indicator.status-online {
    background: #28a745;
}

.status-indicator.status-busy {
    background: #ffc107;
}

.status-indicator.status-offline {
    background: #6c757d;
}

.member-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.member-name {
    font-weight: 600;
    color: #2c3e50;
}

.member-activity {
    font-size: 12px;
    color: #495057;
}

.member-last-seen {
    font-size: 11px;
    color: #6c757d;
}

.member-productivity {
    text-align: center;
}

.productivity-score {
    font-size: 18px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
}

.productivity-score.good {
    background: #d4edda;
    color: #155724;
}

.productivity-score.average {
    background: #fff3cd;
    color: #856404;
}

.productivity-score.low {
    background: #f8d7da;
    color: #721c24;
}

/* ===== NOTIFICATION TOASTS ===== */

.notification-toasts {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.notification-toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    border-left: 4px solid #007bff;
    padding: 16px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-width: 100%;
}

.notification-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-toast.removing {
    transform: translateX(100%);
    opacity: 0;
}

.notification-toast.success {
    border-left-color: #28a745;
}

.notification-toast.warning {
    border-left-color: #ffc107;
}

.notification-toast.error,
.notification-toast.urgent {
    border-left-color: #dc3545;
}

.toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.toast-icon {
    font-size: 18px;
    margin-top: 2px;
}

.toast-icon .fas {
    color: #007bff;
}

.notification-toast.success .toast-icon .fas {
    color: #28a745;
}

.notification-toast.warning .toast-icon .fas {
    color: #ffc107;
}

.notification-toast.error .toast-icon .fas,
.notification-toast.urgent .toast-icon .fas {
    color: #dc3545;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #2c3e50;
    line-height: 1.4;
}

.toast-timestamp {
    font-size: 11px;
    color: #6c757d;
    margin-top: 4px;
}

.toast-close {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0;
    margin-left: 12px;
    font-size: 14px;
}

.toast-close:hover {
    color: #495057;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1200px) {
    .dashboard-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .live-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    
    .dashboard-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .live-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .task-workflow {
        flex-direction: column;
        gap: 8px;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
    
    .task-actions {
        justify-content: center;
    }
    
    .notification-toasts {
        left: 10px;
        right: 10px;
        max-width: none;
    }
}

/* ===== LOADING STATES ===== */

.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

.loading-placeholder .fas {
    margin-right: 10px;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ===== UTILITY CLASSES ===== */

.text-success { color: #28a745 !important; }
.text-danger { color: #dc3545 !important; }
.text-warning { color: #ffc107 !important; }
.text-info { color: #17a2b8 !important; }

.pulse {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ===== DARK MODE STYLES ===== */

[data-theme="dark"] .live-dashboard-view {
    background: #1a1a1a;
    color: #e0e0e0;
}

/* Dashboard Header - Dark Mode */
[data-theme="dark"] .dashboard-header {
    background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
    border-bottom: 1px solid #4a5568;
}

[data-theme="dark"] .dashboard-header h1 {
    color: #ffffff;
}

/* Dashboard Summary Cards - Dark Mode */
[data-theme="dark"] .dashboard-summary-card {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .summary-label {
    color: #a0aec0;
}

[data-theme="dark"] .summary-value {
    color: #ffffff;
}

[data-theme="dark"] .dashboard-controls .btn-primary,
[data-theme="dark"] .dashboard-controls .btn-secondary,
[data-theme="dark"] .dashboard-controls .btn-info {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

[data-theme="dark"] .dashboard-controls .btn-primary:hover,
[data-theme="dark"] .dashboard-controls .btn-secondary:hover,
[data-theme="dark"] .dashboard-controls .btn-info:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.3);
}

/* Live Stats Cards - Dark Mode */
[data-theme="dark"] .live-stat-card {
    background: #2d3748;
    border: 1px solid #4a5568;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

[data-theme="dark"] .live-stat-card:hover {
    background: #374151;
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
}

[data-theme="dark"] .live-stat-card .stat-number {
    color: #ffffff;
}

[data-theme="dark"] .live-stat-card .stat-label {
    color: #a0aec0;
}

[data-theme="dark"] .live-stat-card .stat-trend {
    color: #68d391;
}

/* Dashboard lists - Dark Mode: improve contrast on dark background */
[data-theme="dark"] .dashboard-list-item {
    border-bottom-color: #4b5563;
}

[data-theme="dark"] .dashboard-list-title {
    color: #f9fafb;
}

[data-theme="dark"] .dashboard-list-meta {
    color: #e5e7eb;
}

[data-theme="dark"] .dashboard-list-time {
    color: #9ca3af;
}

[data-theme="dark"] .dashboard-empty {
    color: #e5e7eb;
}

[data-theme="dark"] .dashboard-list-comment {
    background: rgba(251, 191, 36, 0.18);
    color: #fef3c7;
}

/* Section titles inside dashboard cards (e.g. "Open tasks", "Recent tasks") */
[data-theme="dark"] .dashboard-section h4 {
    color: #f9fafb;
}

/* Dashboard Sections - Dark Mode */
[data-theme="dark"] .dashboard-section {
    background: #2d3748;
    border: 1px solid #4a5568;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

[data-theme="dark"] .section-header {
    border-bottom: 2px solid #4a5568;
}

[data-theme="dark"] .section-header h2,
[data-theme="dark"] .section-header h3 {
    color: #ffffff;
}

[data-theme="dark"] .section-header i {
    color: #81e6d9;
}

[data-theme="dark"] .form-select {
    background: #374151;
    border-color: #4a5568;
    color: #e0e0e0;
}

[data-theme="dark"] .form-select:focus {
    border-color: #81e6d9;
    box-shadow: 0 0 0 2px rgba(129, 230, 217, 0.2);
}

/* Task Cards - Dark Mode */
[data-theme="dark"] .task-card {
    background: #374151;
    border-color: #4a5568;
}

[data-theme="dark"] .task-card:hover {
    background: #4a5568;
    border-color: #81e6d9;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

[data-theme="dark"] .task-title {
    color: #ffffff;
}

[data-theme="dark"] .task-title i {
    color: #81e6d9;
}

/* Workflow Steps - Dark Mode */
[data-theme="dark"] .task-workflow {
    background: #2d3748;
    border: 1px solid #4a5568;
}

[data-theme="dark"] .workflow-step.completed {
    background: #22543d;
    color: #68d391;
    border-color: #38a169;
}

[data-theme="dark"] .workflow-step.active {
    background: #2a4a6b;
    color: #63b3ed;
    border-color: #4299e1;
}

[data-theme="dark"] .workflow-step.pending {
    background: #744210;
    color: #f6e05e;
    border-color: #d69e2e;
}

[data-theme="dark"] .workflow-arrow {
    color: #a0aec0;
}

/* Progress Bar - Dark Mode */
[data-theme="dark"] .progress-bar {
    background: #4a5568;
}

[data-theme="dark"] .progress-fill {
    background: linear-gradient(90deg, #81e6d9, #4fd1c7);
}

[data-theme="dark"] .progress-text {
    color: #e0e0e0;
}

/* Task Meta - Dark Mode */
[data-theme="dark"] .task-timing {
    color: #a0aec0;
}

[data-theme="dark"] .assigned-time {
    color: #cbd5e0;
}

[data-theme="dark"] .deadline-time {
    color: #a0aec0;
}

[data-theme="dark"] .deadline-time.text-danger {
    color: #fc8181 !important;
}

/* Task Actions - Dark Mode */
[data-theme="dark"] .task-actions .btn-primary {
    background: #3182ce;
    border: 1px solid #4299e1;
}

[data-theme="dark"] .task-actions .btn-primary:hover {
    background: #2c5aa0;
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.4);
}

[data-theme="dark"] .task-actions .btn-info {
    background: #319795;
    border: 1px solid #4fd1c7;
}

[data-theme="dark"] .task-actions .btn-info:hover {
    background: #2c7a7b;
    box-shadow: 0 4px 12px rgba(49, 151, 149, 0.4);
}

[data-theme="dark"] .task-actions .btn-warning {
    background: #d69e2e;
    border: 1px solid #f6e05e;
    color: #1a202c;
}

[data-theme="dark"] .task-actions .btn-warning:hover {
    background: #b7791f;
    box-shadow: 0 4px 12px rgba(214, 158, 46, 0.4);
}

[data-theme="dark"] .task-actions .btn-danger {
    background: #e53e3e;
    border: 1px solid #fc8181;
}

[data-theme="dark"] .task-actions .btn-danger:hover {
    background: #c53030;
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4);
}

/* Team Activity - Dark Mode */
[data-theme="dark"] .team-member {
    background: #374151;
    border-left-color: #68d391;
}

[data-theme="dark"] .team-member:hover {
    background: #4a5568;
}

[data-theme="dark"] .team-member.offline {
    border-left-color: #718096;
    opacity: 0.7;
}

[data-theme="dark"] .team-member.busy {
    border-left-color: #f6e05e;
}

[data-theme="dark"] .member-avatar .fas {
    color: #a0aec0;
}

[data-theme="dark"] .member-name {
    color: #ffffff;
}

[data-theme="dark"] .member-activity {
    color: #cbd5e0;
}

[data-theme="dark"] .member-last-seen {
    color: #a0aec0;
}

[data-theme="dark"] .productivity-score.good {
    background: #22543d;
    color: #68d391;
}

[data-theme="dark"] .productivity-score.average {
    background: #744210;
    color: #f6e05e;
}

[data-theme="dark"] .productivity-score.low {
    background: #742a2a;
    color: #fc8181;
}

/* Notification Toasts - Dark Mode */
[data-theme="dark"] .notification-toast {
    background: #2d3748;
    border: 1px solid #4a5568;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

[data-theme="dark"] .notification-toast.success {
    border-left-color: #68d391;
    background: #22543d;
}

[data-theme="dark"] .notification-toast.warning {
    border-left-color: #f6e05e;
    background: #744210;
}

[data-theme="dark"] .notification-toast.error,
[data-theme="dark"] .notification-toast.urgent {
    border-left-color: #fc8181;
    background: #742a2a;
}

[data-theme="dark"] .toast-message {
    color: #ffffff;
}

[data-theme="dark"] .toast-timestamp {
    color: #a0aec0;
}

[data-theme="dark"] .toast-close {
    color: #a0aec0;
}

[data-theme="dark"] .toast-close:hover {
    color: #ffffff;
}

[data-theme="dark"] .notification-toast.success .toast-icon .fas {
    color: #68d391;
}

[data-theme="dark"] .notification-toast.warning .toast-icon .fas {
    color: #f6e05e;
}

[data-theme="dark"] .notification-toast.error .toast-icon .fas,
[data-theme="dark"] .notification-toast.urgent .toast-icon .fas {
    color: #fc8181;
}

/* Loading States - Dark Mode */
[data-theme="dark"] .loading-placeholder {
    color: #a0aec0;
    background: #374151;
    border-radius: 8px;
}

[data-theme="dark"] .empty-state {
    color: #a0aec0;
    background: #374151;
}

/* Status Indicators - Dark Mode */
[data-theme="dark"] .status-indicator.status-online {
    background: #68d391;
    box-shadow: 0 0 6px rgba(104, 211, 145, 0.5);
}

[data-theme="dark"] .status-indicator.status-busy {
    background: #f6e05e;
    box-shadow: 0 0 6px rgba(246, 224, 94, 0.5);
}

[data-theme="dark"] .status-indicator.status-offline {
    background: #718096;
}

/* Task Card Urgency Colors - Dark Mode */
[data-theme="dark"] .task-card.overdue::before {
    background: linear-gradient(135deg, #fc8181, #e53e3e);
}

[data-theme="dark"] .task-card.urgent::before {
    background: linear-gradient(135deg, #f6ad55, #ed8936);
}

[data-theme="dark"] .task-card.normal::before {
    background: linear-gradient(135deg, #81e6d9, #4fd1c7);
}

/* Badge Styling - Dark Mode */
[data-theme="dark"] .nav-badge.live-badge {
    background: linear-gradient(45deg, #fc8181, #f56565);
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

[data-theme="dark"] .notification-count {
    background: #e53e3e;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(229, 62, 62, 0.3);
}

/* Scrollbar - Dark Mode */
[data-theme="dark"] .live-dashboard-view ::-webkit-scrollbar {
    width: 8px;
}

[data-theme="dark"] .live-dashboard-view ::-webkit-scrollbar-track {
    background: #2d3748;
}

[data-theme="dark"] .live-dashboard-view ::-webkit-scrollbar-thumb {
    background: #4a5568;
    border-radius: 4px;
}

[data-theme="dark"] .live-dashboard-view ::-webkit-scrollbar-thumb:hover {
    background: #718096;
}

/* Enhanced Hover Effects - Dark Mode */
[data-theme="dark"] .live-stat-card:hover .stat-icon {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

[data-theme="dark"] .task-card:hover .task-title i {
    color: #4fd1c7;
    transition: color 0.2s ease;
}

[data-theme="dark"] .team-member:hover .member-avatar .fas {
    color: #81e6d9;
    transition: color 0.2s ease;
}

/* Focus States - Dark Mode */
[data-theme="dark"] .dashboard-controls button:focus,
[data-theme="dark"] .task-actions button:focus {
    outline: 2px solid #81e6d9;
    outline-offset: 2px;
}

/* Animation Improvements - Dark Mode */
[data-theme="dark"] .live-stat-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .task-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .team-member {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .notification-toast {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* ===== PROJECT LIST STYLES ===== */

.tenant-projects-section {
    margin-top: 30px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 5px;
}

.section-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.search-filters {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-input {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-width: 250px;
    font-size: 14px;
}

.filter-select {
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-width: 150px;
    font-size: 14px;
    cursor: pointer;
}

.tenant-project-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 10px;
}

.tenant-project-warning {
    margin: 0 5px 10px 5px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 13px;
    background: rgba(248, 180, 0, 0.12);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.45);
}

[data-theme="dark"] .tenant-project-warning {
    background: rgba(251, 191, 36, 0.14);
    color: #facc15;
    border-color: rgba(250, 204, 21, 0.55);
}

.project-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    cursor: pointer;
}

.project-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.project-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.access-level {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.access-owner {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
}

.access-writer {
    background: linear-gradient(45deg, #4fd1c7, #38b2ac);
    color: white;
}

.access-reader {
    background: linear-gradient(45deg, #63b3ed, #4299e1);
    color: white;
}

.access-viewer {
    background: linear-gradient(45deg, #cbd5e0, #a0aec0);
    color: #2d3748;
}

.project-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
    font-size: 13px;
    color: var(--text-secondary);
}

.project-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.project-meta .owner {
    color: var(--primary-color);
    font-weight: 500;
}

.project-meta .language {
    background: var(--bg-secondary);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}


.project-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.project-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
}

.load-project {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
}

.load-project:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.share-project {
    background: linear-gradient(45deg, #4299e1, #3182ce);
    color: white;
}

.share-project:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 153, 225, 0.3);
}

.project-item .description {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

.no-projects {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin: 20px;
}

/* Modal Styles for Tenant Projects */
.tenant-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.tenant-modal .modal-content {
    background: var(--bg-primary);
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.tenant-modal .modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tenant-modal .modal-header h2 {
    margin: 0;
    font-size: 20px;
    color: var(--text-primary);
}

.tenant-modal .close-modal {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.tenant-modal .close-modal:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.tenant-modal .modal-body {
    padding: 20px;
}

.tenant-modal label {
    display: block;
    margin-bottom: 15px;
    color: var(--text-primary);
    font-weight: 500;
}

.tenant-modal input,
.tenant-modal textarea,
.tenant-modal select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
}

.tenant-modal textarea {
    min-height: 80px;
    resize: vertical;
}

.tenant-modal .modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.tenant-modal .modal-footer button {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.tenant-modal .cancel-create,
.tenant-modal .cancel-share {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.tenant-modal .confirm-create,
.tenant-modal .confirm-share {
    background: linear-gradient(45deg, #48bb78, #38a169);
    color: white;
}

.tenant-modal .confirm-create:hover,
.tenant-modal .confirm-share:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.3);
}

.permissions-info {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.permissions-info h4 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 14px;
}

.permissions-info ul {
    margin: 0;
    padding-left: 20px;
    color: var(--text-secondary);
    font-size: 13px;
}

.permissions-info li {
    margin-bottom: 5px;
}

.permissions-info strong {
    color: var(--text-primary);
}

/* Dark Mode Support for Project List */
[data-theme="dark"] .project-item {
    background: #2d3748;
    border-color: #4a5568;
}

[data-theme="dark"] .project-item:hover {
    border-color: #81e6d9;
}

[data-theme="dark"] .search-input,
[data-theme="dark"] .filter-select {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] .tenant-modal .modal-content {
    background: #1a202c;
}

[data-theme="dark"] .tenant-modal input,
[data-theme="dark"] .tenant-modal textarea,
[data-theme="dark"] .tenant-modal select {
    background: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] .permissions-info {
    background: #2d3748;
}

/* User Selection in Share Modal */
.user-select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.divider-text {
    text-align: center;
    color: var(--text-secondary);
    margin: 15px 0;
    font-size: 13px;
    font-style: italic;
    position: relative;
}

.divider-text::before,
.divider-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-color);
}

.divider-text::before {
    left: 0;
}

.divider-text::after {
    right: 0;
}

/* Existing Shares List */
.existing-shares {
    margin-top: 20px;
    padding: 15px;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.existing-shares h4 {
    margin: 0 0 10px 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

.shared-users-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.shared-users-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: var(--bg-primary);
    border-radius: 6px;
    transition: all 0.2s;
}

.shared-users-list li:hover {
    background: var(--bg-hover);
    transform: translateX(2px);
}

.shared-user-name {
    font-weight: 500;
    color: var(--text-primary);
    flex: 1;
}

.shared-user-role {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 10px;
}

.remove-share-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.remove-share-btn:hover {
    background: var(--danger-color);
    color: white;
}

.remove-share-btn i {
    font-size: 14px;
}

/* Dark Mode Support for New Elements */
[data-theme="dark"] .modal-backdrop {
    background: rgba(0, 0, 0, 0.8);
}

[data-theme="dark"] .modal-content {
    background: #2d3748;
    color: #e2e8f0;
    border: 1px solid #4a5568;
}

[data-theme="dark"] .modal-header {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border-bottom: 1px solid #4a5568;
}

[data-theme="dark"] .modal-header h2 {
    color: #e2e8f0;
}

[data-theme="dark"] .modal-body {
    background: #2d3748;
}

[data-theme="dark"] .modal-footer {
    background: #1a202c;
    border-top: 1px solid #4a5568;
}

[data-theme="dark"] .user-select {
    background: #1a202c;
    border-color: #4a5568;
    color: #e2e8f0;
}

[data-theme="dark"] .user-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102,126,234,0.2);
}

[data-theme="dark"] .user-select option {
    background: #1a202c;
    color: #e2e8f0;
}

[data-theme="dark"] .existing-shares {
    background: #1a202c;
    border-color: #4a5568;
}

[data-theme="dark"] .shared-users-list li {
    background: #2d3748;
    border: 1px solid #4a5568;
}

[data-theme="dark"] .shared-users-list li:hover {
    background: #374151;
}

[data-theme="dark"] .divider-text {
    color: #a0aec0;
}

[data-theme="dark"] .divider-text::before,
[data-theme="dark"] .divider-text::after {
    background: #4a5568;
}

[data-theme="dark"] .close-modal {
    color: #a0aec0;
}

[data-theme="dark"] .close-modal:hover {
    color: #e2e8f0;
}

[data-theme="dark"] .btn-share {
    background: #667eea;
    border-color: #667eea;
}

[data-theme="dark"] .btn-share:hover {
    background: #5a67d8;
    border-color: #5a67d8;
}

[data-theme="dark"] .btn-share:disabled {
    background: #4a5568;
    border-color: #4a5568;
    opacity: 0.5;
}

[data-theme="dark"] .remove-share-btn {
    color: #a0aec0;
}

[data-theme="dark"] .remove-share-btn:hover {
    background: #e53e3e;
    color: white;
}

/* All Projects View */
.all-projects-view {
    padding: 0;
    max-width: 100%;
}

.info-message, .error-message {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    margin: 20px;
    border-radius: 10px;
    font-size: 14px;
}

.info-message {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.info-message i {
    font-size: 20px;
    flex-shrink: 0;
}

.error-message {
    background: linear-gradient(135deg, #f56565 0%, #ed8936 100%);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.error-message i {
    font-size: 20px;
    flex-shrink: 0;
}

/* Dark mode support */
[data-theme="dark"] .info-message {
    background: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    border-color: #718096;
}

[data-theme="dark"] .error-message {
    background: linear-gradient(135deg, #742a2a 0%, #9b2c2c 100%);
    border-color: #fc8181;
}


/* Dark Mode - Recent Activity Section */
[data-theme="dark"] .recent-activity-section {
    background-color: #1f2937;
    border: 1px solid #374151;
}

[data-theme="dark"] .no-activity-message {
    color: #9ca3af;
}

[data-theme="dark"] .no-activity-message p {
    color: #e5e7eb;
}

[data-theme="dark"] .no-activity-message small {
    color: #9ca3af;
}

[data-theme="dark"] .no-activity-message i {
    color: #60a5fa;
}
