/* CSS Design System for JanitorTask Pro */

/* Variables & Themes */
:root {
    --font-heading: 'Outfit', 'Sarabun', sans-serif;
    --font-body: 'Inter', 'Sarabun', sans-serif;
    
    /* Elegant HSL Palette */
    --primary-h: 245;
    --primary-s: 75%;
    --primary-l: 60%;
    
    --primary: hsl(var(--primary-h), var(--primary-s), var(--primary-l));
    --primary-hover: hsl(var(--primary-h), var(--primary-s), calc(var(--primary-l) - 8%));
    --primary-light: hsl(var(--primary-h), var(--primary-s), 95%);
    --primary-glow: hsla(var(--primary-h), var(--primary-s), var(--primary-l), 0.15);
    
    /* Semantic Colors */
    --success: hsl(142, 70%, 45%);
    --success-light: hsl(142, 70%, 95%);
    --warning: hsl(35, 90%, 50%);
    --warning-light: hsl(35, 90%, 95%);
    --danger: hsl(350, 80%, 55%);
    --danger-light: hsl(350, 80%, 95%);
    --info: hsl(195, 85%, 45%);
    --info-light: hsl(195, 85%, 95%);
    
    /* Dark Slate Palette for Neutrals */
    --bg-app: hsl(220, 30%, 97%);
    --bg-card: hsl(0, 0%, 100%);
    --bg-header: rgba(255, 255, 255, 0.75);
    --border-color: hsl(220, 20%, 90%);
    --text-title: hsl(220, 40%, 18%);
    --text-body: hsl(220, 20%, 30%);
    --text-muted: hsl(220, 15%, 55%);
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 8px 16px -4px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 16px 24px -6px rgba(0, 0, 0, 0.08), 0 4px 8px -4px rgba(0, 0, 0, 0.04);
    --shadow-card: 0 4px 20px -2px rgba(99, 102, 241, 0.06);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Dark Mode Overrides */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-app: hsl(220, 25%, 10%);
        --bg-card: hsl(220, 25%, 14%);
        --bg-header: rgba(26, 31, 46, 0.8);
        --border-color: hsl(220, 20%, 20%);
        --text-title: hsl(220, 30%, 93%);
        --text-body: hsl(220, 15%, 80%);
        --text-muted: hsl(220, 10%, 60%);
        
        --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.15);
        --shadow-md: 0 8px 16px -4px rgba(0, 0, 0, 0.25);
        --shadow-lg: 0 16px 24px -6px rgba(0, 0, 0, 0.35);
        
        --primary-light: hsl(var(--primary-h), var(--primary-s), 18%);
        --success-light: hsl(142, 60%, 15%);
        --warning-light: hsl(35, 70%, 15%);
        --danger-light: hsl(350, 60%, 15%);
        --info-light: hsl(195, 70%, 15%);
        
        --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.2);
    }
}

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-app);
    color: var(--text-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-title);
    font-weight: 700;
}

/* Layout Utilities */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header Glassmorphism */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--bg-header);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-smooth);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-icon {
    background: linear-gradient(135deg, var(--primary), hsl(280, 80%, 60%));
    color: white;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.logo-text h1 {
    font-size: 1.4rem;
    letter-spacing: -0.5px;
}

.logo-text h1 span {
    color: var(--primary);
}

.logo-text p {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Actions in Header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.connection-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.connection-badge.mock {
    background: var(--warning-light);
    color: var(--warning);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--success);
}

.connection-badge.mock .status-dot {
    background-color: var(--warning);
}

.role-selector-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.role-selector-wrapper label {
    color: var(--text-muted);
}

.role-select {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-title);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-weight: 500;
    outline: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.role-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 0.4rem 1rem 0.4rem 0.4rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
}

.avatar-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-title);
}

.user-role {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* App Main Content */
.app-content {
    flex: 1;
    padding: 2rem;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
}

/* Dashboard Statistics */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: bold;
}

.total-tasks .stat-icon { background-color: var(--primary-light); color: var(--primary); }
.main-tasks .stat-icon { background-color: var(--success-light); color: var(--success); }
.special-tasks .stat-icon { background-color: var(--info-light); color: var(--info); }
.efficiency .stat-icon { background-color: var(--warning-light); color: var(--warning); }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text-title);
    margin: 0.1rem 0;
}

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

.stat-progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--border-color);
}

.stat-progress-bar .progress {
    height: 100%;
    transition: width 0.8s ease-in-out;
}

.total-tasks .progress { background-color: var(--primary); }
.main-tasks .progress { background-color: var(--success); }
.special-tasks .progress { background-color: var(--info); }
.efficiency .progress { background-color: var(--warning); }

/* Control Bar (Navigation tabs and Filters) */
.control-bar {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.8rem 1.2rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1.2rem;
    box-shadow: var(--shadow-sm);
}

/* Tabs */
.tab-container {
    display: flex;
    background-color: var(--bg-app);
    padding: 0.3rem;
    border-radius: var(--radius-sm);
    gap: 0.2rem;
}

.tab-btn {
    border: none;
    background: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-body);
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    color: var(--primary);
}

.tab-btn.active {
    background-color: var(--bg-card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.individual-filter-wrapper {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.individual-filter-wrapper.hidden {
    display: none;
}

/* Filters & Search */
.filters-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper i {
    position: absolute;
    left: 0.9rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.search-input-wrapper input {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    color: var(--text-title);
    padding: 0.5rem 1rem 0.5rem 2.2rem;
    border-radius: var(--radius-md);
    outline: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    width: 220px;
    transition: var(--transition-fast);
}

.search-input-wrapper input:focus {
    border-color: var(--primary);
    background-color: var(--bg-card);
    width: 280px;
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.filter-select {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    color: var(--text-title);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    outline: none;
    font-family: var(--font-body);
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-select:focus {
    border-color: var(--primary);
    background-color: var(--bg-card);
}

/* Buttons */
.btn {
    border: none;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.55rem 1.2rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--border-color);
    color: var(--text-body);
}

.btn-secondary:hover {
    background-color: var(--text-muted);
    color: white;
}

/* Performance Overview Section */
.performance-overview-section {
    margin-bottom: 2rem;
}

.section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.badge {
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-info {
    background-color: var(--info-light);
    color: var(--info);
}

.janitors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.2rem;
}

/* Janitor Performance Card */
.janitor-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition-smooth);
    position: relative;
    cursor: pointer;
}

.janitor-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.janitor-card-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.janitor-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.janitor-meta h4 {
    font-size: 0.95rem;
    color: var(--text-title);
}

.janitor-meta span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Ring chart layout */
.perf-ring-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-app);
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
}

.perf-stats-mini {
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.stat-item-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 4px;
}

.stat-item-dot.completed { background-color: var(--success); }
.stat-item-dot.pending { background-color: var(--warning); }

.perf-radial-progress {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: conic-gradient(var(--primary) calc(var(--percent) * 1%), var(--border-color) 0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.perf-radial-progress::after {
    content: attr(data-percent) '%';
    position: absolute;
    width: 38px;
    height: 38px;
    background-color: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-title);
}

/* Kanban Board Columns */
.kanban-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
    align-items: start;
}

@media (max-width: 1024px) {
    .kanban-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .kanban-container {
        grid-template-columns: 1fr;
    }
}

.kanban-column {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition-fast);
}

.kanban-column.drag-over {
    background-color: var(--primary-glow);
    border-color: var(--primary);
    transform: scale(1.01);
}

.column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.column-title-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-full);
}

.column-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.column-title-badge.todo { background-color: hsl(220, 20%, 88%); color: hsl(220, 20%, 30%); }
.column-title-badge.todo .column-dot { background-color: hsl(220, 20%, 45%); }

.column-title-badge.in-progress { background-color: var(--info-light); color: var(--info); }
.column-title-badge.in-progress .column-dot { background-color: var(--info); }

.column-title-badge.review { background-color: var(--warning-light); color: var(--warning); }
.column-title-badge.review .column-dot { background-color: var(--warning); }

.column-title-badge.completed { background-color: var(--success-light); color: var(--success); }
.column-title-badge.completed .column-dot { background-color: var(--success); }

.task-count {
    font-size: 0.8rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-title);
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
}

.cards-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    min-height: 50vh;
}

/* Kanban Cards */
.task-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
    cursor: grab;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    position: relative;
    user-select: none;
}

.task-card:active {
    cursor: grabbing;
}

.task-card:hover {
    transform: translateY(-2px) scale(1.01);
    box-shadow: var(--shadow-md);
    border-color: hsl(var(--primary-h), var(--primary-s), 80%);
}

.task-card.dragging {
    opacity: 0.4;
    border: 2px dashed var(--primary);
    transform: scale(0.96);
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
}

.task-type-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

/* Types */
.task-type-badge.main { background-color: var(--primary-light); color: var(--primary); }
.task-type-badge.special { background-color: var(--info-light); color: var(--info); }

.task-actions {
    display: flex;
    gap: 0.4rem;
    opacity: 0;
    transition: var(--transition-fast);
}

.task-card:hover .task-actions {
    opacity: 1;
}

.btn-icon {
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    cursor: pointer;
    width: 22px;
    height: 22px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background-color: var(--border-color);
}

.btn-icon.edit:hover { color: var(--primary); }
.btn-icon.delete:hover { color: var(--danger); }

.task-card-body h4 {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.2rem;
}

.task-card-body p {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.task-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 0.5rem;
    font-size: 0.7rem;
    font-weight: 500;
}

.assigned-user {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-body);
}

.assigned-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

.unassigned-text {
    color: var(--text-muted);
    font-style: italic;
}

.task-dates {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    color: var(--text-muted);
}

.due-date-badge {
    padding: 0.1rem 0.35rem;
    border-radius: var(--radius-sm);
    font-size: 0.65rem;
    font-weight: 600;
}

.due-date-badge.normal {
    background-color: var(--border-color);
    color: var(--text-body);
}

.due-date-badge.overdue {
    background-color: var(--danger-light);
    color: var(--danger);
    animation: pulse 1.5s infinite;
}

.due-date-badge.today {
    background-color: var(--warning-light);
    color: var(--warning);
}

/* Priority Indicator (Ribbon or Line on Card) */
.priority-indicator {
    position: absolute;
    top: 0;
    left: 10px;
    width: 24px;
    height: 3px;
    border-bottom-left-radius: 2px;
    border-bottom-right-radius: 2px;
}

.priority-indicator.high { background-color: var(--danger); }
.priority-indicator.medium { background-color: var(--warning); }
.priority-indicator.low { background-color: var(--success); }

/* Modals */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-backdrop.show {
    opacity: 1;
    pointer-events: all;
}

.modal-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.modal-card.modal-lg {
    max-width: 750px;
}

.modal-backdrop.show .modal-card {
    transform: translateY(0);
}

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

.modal-header h2 {
    font-size: 1.2rem;
}

.btn-close {
    border: none;
    background: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.btn-close:hover {
    background-color: var(--border-color);
    color: var(--text-title);
}

/* Forms */
#taskForm {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-title);
}

.form-group label .required {
    color: var(--danger);
}

.form-group input,
.form-group textarea,
.form-group select {
    background-color: var(--bg-app);
    border: 1px solid var(--border-color);
    color: var(--text-title);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.85rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary);
    background-color: var(--bg-card);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

/* Modal Performance body */
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: 75vh;
}

/* Footer Bar */
.app-footer-bar {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Performance Report Styles */
.perf-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.2rem;
    border-bottom: 1px solid var(--border-color);
}

.perf-header-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.perf-header-info h3 {
    font-size: 1.2rem;
}

.perf-grid {
    display: grid;
    grid-template-columns: 1.2fr 2fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .perf-grid {
        grid-template-columns: 1fr;
    }
}

.perf-score-card {
    background-color: var(--bg-app);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.8rem;
}

.perf-score-num {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.perf-stars {
    color: var(--warning);
    font-size: 1.1rem;
}

.perf-metrics-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.perf-metric-row {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-title);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metric-value {
    font-size: 0.9rem;
    font-weight: 700;
}

.metric-value.good { color: var(--success); }
.metric-value.warning { color: var(--warning); }
.metric-value.bad { color: var(--danger); }

.perf-tasks-summary h4 {
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.perf-task-item {
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--border-color);
    background-color: var(--bg-app);
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.perf-task-item.main { border-left-color: var(--primary); }
.perf-task-item.special { border-left-color: var(--info); }
.perf-task-item.overdue { border-left-color: var(--danger); }

.perf-task-title {
    font-weight: 600;
    color: var(--text-title);
}

.perf-task-time {
    color: var(--text-muted);
}
