/* --- Reset & Base Styling --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette (Light Theme) */
    --bg-main: #f1f5f9;        /* Soft light blue-grey */
    --bg-surface: #ffffff;     /* Card/Panel clean white */
    --bg-surface-glass: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-primary: #0f172a;   /* Slate 900 (Dark text) */
    --text-secondary: #475569; /* Slate 600 */
    --text-muted: #94a3b8;     /* Slate 400 */
    
    /* Accents */
    --color-primary: #4f46e5;   /* Indigo 600 */
    --color-primary-hover: #4338ca;
    --color-todo: #6d28d9;      /* Violet 700 */
    --color-doing: #d97706;     /* Amber 600 */
    --color-done: #047857;      /* Emerald 700 */
    --color-overdue: #dc2626;   /* Red 600 */
    --color-low: #1d4ed8;       /* Blue 700 */
    
    /* Visual Effects */
    --glow-primary: rgba(79, 70, 229, 0.15);
    --glow-danger: rgba(220, 38, 38, 0.1);
    --glow-success: rgba(4, 120, 87, 0.1);
    --border-radius-lg: 16px;
    --border-radius-md: 12px;
    --border-radius-sm: 8px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Kanit', 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.06) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(139, 92, 246, 0.06) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(16, 185, 129, 0.04) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* --- Typography & Buttons --- */
h1, h2, h3, h4 {
    font-weight: 600;
    letter-spacing: 0.5px;
}

p {
    font-weight: 400;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #4338ca);
    color: #ffffff;
    box-shadow: 0 4px 14px var(--glow-primary);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.3);
    filter: brightness(1.1);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background-color: rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.btn-danger {
    background-color: rgba(220, 38, 38, 0.08);
    color: var(--color-overdue);
    border: 1px solid rgba(220, 38, 38, 0.2);
}
.btn-danger:hover {
    background-color: var(--color-overdue);
    color: #ffffff;
    box-shadow: 0 4px 12px var(--glow-danger);
}

.btn-icon-only {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.03);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    transition: var(--transition-smooth);
}
.btn-icon-only:hover {
    background-color: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
    transform: scale(1.08);
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-low { background-color: rgba(29, 78, 216, 0.08); color: #1d4ed8; border: 1px solid rgba(29, 78, 216, 0.15); }
.badge-medium { background-color: rgba(217, 119, 6, 0.08); color: #b45309; border: 1px solid rgba(217, 119, 6, 0.15); }
.badge-high { background-color: rgba(220, 38, 38, 0.08); color: #b91c1c; border: 1px solid rgba(220, 38, 38, 0.15); }

.badge-todo { background-color: rgba(109, 40, 217, 0.08); color: #6d28d9; border: 1px solid rgba(109, 40, 217, 0.15); }
.badge-doing { background-color: rgba(217, 119, 6, 0.08); color: #b45309; border: 1px solid rgba(217, 119, 6, 0.15); }
.badge-done { background-color: rgba(4, 120, 87, 0.08); color: #047857; border: 1px solid rgba(4, 120, 87, 0.15); }
.badge-overdue { background-color: rgba(220, 38, 38, 0.12); color: #b91c1c; border: 1px solid rgba(220, 38, 38, 0.25); animation: pulse-red 2s infinite; }

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.2); }
    70% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* --- Main Layout --- */
.app-container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* --- Header / Navigation --- */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: var(--border-radius-lg);
    padding: 16px 28px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-icon {
    font-size: 2.2rem;
    background: linear-gradient(135deg, var(--color-primary), #6d28d9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 4px var(--glow-primary));
}

.logo-text h1 {
    font-size: 1.6rem;
    line-height: 1.2;
    color: var(--text-primary);
}

.logo-text span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

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

.role-selector-container {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: rgba(0, 0, 0, 0.03);
    padding: 6px 16px;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--border-color);
}

.role-selector-container label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.role-dropdown {
    background-color: transparent;
    color: var(--text-primary);
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    padding-right: 8px;
}

.role-dropdown option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

/* --- Main Content Layout --- */
.main-content {
    flex: 1;
}

.view-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

.view-section.active {
    display: block;
}

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

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

.section-header h2 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- STATS GRID (SUPERVISOR) --- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--border-radius-md);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.8rem;
    line-height: 1.1;
    margin-bottom: 2px;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Colors for stats card */
.total-tasks .stat-icon { background-color: rgba(79, 70, 229, 0.08); color: var(--color-primary); }
.total-tasks:hover { box-shadow: 0 8px 20px rgba(79, 70, 229, 0.08); }

.todo-tasks .stat-icon { background-color: rgba(109, 40, 217, 0.08); color: var(--color-todo); }
.todo-tasks:hover { box-shadow: 0 8px 20px rgba(109, 40, 217, 0.08); }

.doing-tasks .stat-icon { background-color: rgba(217, 119, 6, 0.08); color: var(--color-doing); }
.doing-tasks:hover { box-shadow: 0 8px 20px rgba(217, 119, 6, 0.08); }
.fa-spin-hover:hover { animation: fa-spin 2s linear infinite; }

.done-tasks .stat-icon { background-color: rgba(4, 120, 87, 0.08); color: var(--color-done); }
.done-tasks:hover { box-shadow: 0 8px 20px rgba(4, 120, 87, 0.08); }

.overdue-tasks .stat-icon { background-color: rgba(220, 38, 38, 0.08); color: var(--color-overdue); }
.overdue-tasks:hover { box-shadow: 0 8px 20px rgba(220, 38, 38, 0.08); }

/* --- DASHBOARD GRID --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 24px;
}

.panel {
    background-color: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.panel-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.panel-header h3 {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-body {
    padding: 24px;
    flex: 1;
}

/* Team Workload & Performance Panel */
.team-progress-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.member-progress-item {
    background-color: rgba(0, 0, 0, 0.01);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    transition: var(--transition-smooth);
}

.member-progress-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.member-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.member-name {
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.member-avatar {
    width: 28px;
    height: 28px;
    background-color: var(--color-primary);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.member-stats-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.progress-track {
    width: 100%;
    height: 8px;
    background-color: rgba(0, 0, 0, 0.06);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-done));
    border-radius: 4px;
    width: 0%;
    transition: width 0.8s ease-in-out;
}

.member-substats {
    display: flex;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.substat {
    display: flex;
    align-items: center;
    gap: 4px;
}

.substat.overdue { color: #dc2626; }
.substat.done { color: #047857; }

/* Filters row */
.filters-row {
    display: flex;
    gap: 12px;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.search-box input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-smooth);
}

.search-box input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 8px var(--glow-primary);
    background-color: #ffffff;
}

.filters-row select {
    padding: 8px 12px;
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.filters-row select:focus {
    border-color: var(--color-primary);
}

.filters-row select option {
    background-color: var(--bg-surface);
    color: var(--text-primary);
}

/* Master Tasks Table */
.table-responsive {
    overflow-x: auto;
}

.tasks-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.tasks-table th, .tasks-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
}

.tasks-table th {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

.tasks-table tbody tr {
    transition: var(--transition-smooth);
}

.tasks-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.01);
}

.task-cell-title {
    font-weight: 500;
    color: var(--text-primary);
}

.task-cell-desc {
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 3px;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.table-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-muted);
    text-align: center;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.hidden {
    display: none !important;
}

/* --- KANBAN BOARD (MEMBERS) --- */
.member-welcome .subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 4px;
}

.highlight-text {
    background: linear-gradient(135deg, var(--color-primary), #6d28d9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: bold;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

.kanban-column {
    background-color: var(--bg-surface-glass);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

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

.col-title {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bullet {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.bullet.todo { background-color: var(--color-todo); }
.bullet.doing { background-color: var(--color-doing); }
.bullet.done { background-color: var(--color-done); }

.task-count {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.column-cards-container {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: background-color 0.2s ease;
}

/* Drag over style */
.column-cards-container.dragover {
    background-color: rgba(79, 70, 229, 0.03);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* Kanban Cards styling */
.task-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: 16px;
    cursor: grab;
    transition: var(--transition-smooth);
    user-select: none;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

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

.task-card:hover {
    transform: translateY(-4px);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.task-card.dragging {
    opacity: 0.4;
    border: 2px dashed var(--color-primary);
    background-color: transparent;
    box-shadow: none;
    transform: scale(0.95);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
}

.card-body-text {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(0, 0, 0, 0.04);
    padding-top: 10px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
}

.meta-item.overdue {
    color: #dc2626;
    font-weight: 500;
}

.meta-item.overdue i {
    animation: flash 1s infinite alternate;
}

@keyframes flash {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
}

.card-actions {
    display: flex;
    gap: 6px;
}

.btn-card {
    padding: 6px 10px;
    font-size: 0.75rem;
    border-radius: var(--border-radius-sm);
}

/* Quick move controller inside card (for mobile/no drag-and-drop support) */
.quick-status-selector {
    display: flex;
    gap: 4px;
}

.quick-status-btn {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.7rem;
    color: #ffffff;
    transition: var(--transition-smooth);
}

.quick-status-btn.todo { background-color: rgba(109, 40, 217, 0.2); color: #6d28d9; }
.quick-status-btn.todo:hover { background-color: var(--color-todo); color: #ffffff; }
.quick-status-btn.doing { background-color: rgba(217, 119, 6, 0.2); color: #b45309; }
.quick-status-btn.doing:hover { background-color: var(--color-doing); color: #ffffff; }
.quick-status-btn.done { background-color: rgba(4, 120, 87, 0.2); color: #047857; }
.quick-status-btn.done:hover { background-color: var(--color-done); color: #ffffff; }

/* --- MODAL DIALOGS --- */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background-color: var(--bg-surface);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-lg);
    width: 550px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-backdrop.active .modal-box {
    transform: scale(1) translateY(0);
}

.modal-box.small {
    width: 400px;
}

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

.modal-header h3 {
    font-size: 1.2rem;
    color: var(--text-primary);
}

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

.close-modal-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.modal-box form {
    padding: 24px;
}

/* Forms styling */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.form-group input[type="text"],
.form-group textarea,
.form-group select,
.form-group input[type="date"] {
    width: 100%;
    padding: 10px 14px;
    background-color: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input[type="text"]:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-group input[type="date"]:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--glow-primary);
    background-color: #ffffff;
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-row .col {
    flex: 1;
}

.required {
    color: var(--color-overdue);
    margin-left: 2px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
}

/* --- FOOTER --- */
.app-footer {
    text-align: center;
    padding: 30px 20px 10px 20px;
    color: var(--text-muted);
    font-size: 0.8rem;
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .kanban-board {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .kanban-column {
        max-height: 60vh;
    }
}

@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
        padding: 16px;
    }
    
    .header-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .role-selector-container {
        justify-content: space-between;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .section-header {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }
    
    .section-header button {
        width: 100%;
    }
}
