:root{font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#172033;background:#f4f7fb}*{box-sizing:border-box}body{margin:0;min-height:100vh;background:linear-gradient(180deg,#eef3ff 0,#f8fafc 220px)}button,input,textarea,select{font:inherit}.topbar{display:flex;justify-content:space-between;align-items:center;padding:26px 34px;background:rgba(255,255,255,.9);border-bottom:1px solid #dfe7f2;position:sticky;top:0;z-index:20;backdrop-filter:blur(12px)}.topbar h1{margin:2px 0 0;font-size:25px}.eyebrow{font-size:11px;letter-spacing:.18em;font-weight:800;color:#6366f1}.topbar-actions,.modal-actions,.board-header{display:flex;align-items:center;gap:10px}.select,.btn,input,textarea,select{border:1px solid #d8e1ed;border-radius:10px;background:white}.select,input,textarea,select{padding:10px 12px;color:#243047;outline:none}.select:focus,input:focus,textarea:focus,select:focus{border-color:#7c83f7;box-shadow:0 0 0 3px rgba(99,102,241,.12)}.btn{padding:10px 14px;font-weight:700;cursor:pointer;transition:.2s}.btn:hover{transform:translateY(-1px)}.btn-primary{background:#5b5ce2;color:white;border-color:#5b5ce2}.btn-dark{background:#172033;color:white;border-color:#172033}.btn-light{background:white}.btn-danger{background:#dc2626;color:white;border-color:#dc2626}.hidden{display:none!important}main{padding:28px 34px}.board-header{justify-content:space-between;margin-bottom:22px}.board-header h2{margin:0 0 4px;font-size:28px}.board-header p{margin:0;color:#6b7280}.kanban{display:flex;align-items:flex-start;gap:18px;overflow-x:auto;padding-bottom:24px;min-height:65vh}.column{width:320px;min-width:320px;background:#eef2f7;border:1px solid #dce4ee;border-radius:16px;padding:13px}.column-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;padding:2px 2px 8px}.column-title{display:flex;align-items:center;gap:9px;font-weight:800}.column-dot{width:11px;height:11px;border-radius:999px}.count{font-size:12px;color:#667085;background:#fff;border:1px solid #dbe3ec;padding:2px 7px;border-radius:999px}.icon-btn{border:0;background:transparent;font-size:20px;cursor:pointer;color:#667085}.task-list{min-height:70px}.task-card{background:#fff;border:1px solid #dce4ee;border-radius:13px;padding:14px;margin-bottom:10px;box-shadow:0 5px 16px rgba(30,41,59,.05);cursor:grab}.task-card.dragging{opacity:.45}.task-title{font-weight:800;margin:0 0 8px}.task-description{font-size:13px;color:#667085;line-height:1.45;margin:0 0 12px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.task-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:12px;color:#667085}.badge{font-weight:800;text-transform:capitalize;padding:4px 8px;border-radius:999px}.priority-low{background:#ecfdf3;color:#067647}.priority-medium{background:#eff6ff;color:#1d4ed8}.priority-high{background:#fff7ed;color:#c2410c}.priority-urgent{background:#fef2f2;color:#b91c1c}.add-task{width:100%;border:1px dashed #bac5d4;background:transparent;border-radius:10px;padding:10px;color:#58657a;font-weight:700;cursor:pointer}.modal{position:fixed;inset:0;background:rgba(15,23,42,.55);display:none;align-items:center;justify-content:center;padding:20px;z-index:50}.modal.open{display:flex}.modal-card{width:min(560px,100%);background:white;border-radius:18px;padding:24px;position:relative;box-shadow:0 24px 80px rgba(15,23,42,.25)}.modal-card.small{width:min(420px,100%)}.modal-card h3{margin:0 0 20px}.modal-close{position:absolute;top:13px;right:16px;border:0;background:transparent;font-size:28px;color:#7a8495;cursor:pointer}.modal-card label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:800;color:#39445a;margin-bottom:14px}.modal-actions{justify-content:flex-end;margin-top:18px}.modal-actions .btn-danger{margin-right:auto}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.toast{position:fixed;right:22px;bottom:22px;z-index:100;background:#172033;color:white;padding:12px 16px;border-radius:10px;opacity:0;transform:translateY(15px);pointer-events:none;transition:.2s}.toast.show{opacity:1;transform:translateY(0)}.empty{padding:50px;text-align:center;color:#6b7280;width:100%}@media(max-width:760px){.topbar{align-items:flex-start;gap:16px;padding:20px;flex-direction:column}.topbar-actions{width:100%;flex-wrap:wrap}.select{flex:1}main{padding:20px}.board-header{align-items:flex-start}.form-grid{grid-template-columns:1fr}.column{min-width:86vw;width:86vw}}

.board-tabs{display:flex;gap:10px;overflow-x:auto;padding:12px 34px;background:rgba(255,255,255,.72);border-bottom:1px solid #dfe7f2}.board-tab{display:flex;align-items:center;gap:10px;white-space:nowrap;text-decoration:none;color:#344054;background:#fff;border:1px solid #d8e1ed;border-radius:12px;padding:9px 12px;font-weight:800}.board-tab small{font-size:11px;color:#667085;background:#f2f4f7;padding:3px 7px;border-radius:999px}.board-tab.active{border-color:#6366f1;color:#4f46e5;box-shadow:0 0 0 3px rgba(99,102,241,.1)}.task-dates{display:flex;flex-direction:column;gap:4px;margin-top:10px;padding-top:9px;border-top:1px solid #edf1f5;font-size:11px;color:#667085}.task-dates .action-date{color:#067647;font-weight:800}@media(max-width:760px){.board-tabs{padding:10px 20px}}

/* Authentication */
.user-menu{display:flex;align-items:center;gap:10px;padding-left:8px;border-left:1px solid rgba(148,163,184,.35)}
.user-avatar{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;background:#0f172a;color:#fff;font-weight:800}
.user-details{display:flex;flex-direction:column;line-height:1.15;min-width:100px}
.user-details strong{font-size:13px;color:#0f172a}
.user-details small{font-size:11px;color:#64748b;margin-top:3px}
.login-page{min-height:100vh;background:radial-gradient(circle at top left,#dbeafe 0,transparent 38%),radial-gradient(circle at bottom right,#ede9fe 0,transparent 42%),#f8fafc}
.login-shell{min-height:100vh;display:grid;place-items:center;padding:24px}
.login-card{width:min(100%,430px);background:#fff;border:1px solid #e2e8f0;border-radius:24px;padding:34px;box-shadow:0 24px 70px rgba(15,23,42,.13)}
.login-brand{display:flex;align-items:center;gap:14px;margin-bottom:14px}
.login-brand h1{margin:2px 0 0;font-size:27px;color:#0f172a}
.login-logo{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;background:#2563eb;color:#fff;font-size:24px;font-weight:900;box-shadow:0 10px 25px rgba(37,99,235,.25)}
.login-subtitle{margin:0 0 22px;color:#64748b;font-size:14px}
.login-form{display:grid;gap:17px}
.login-form label{display:grid;gap:7px;font-size:13px;font-weight:700;color:#334155}
.login-form input{width:100%;box-sizing:border-box;border:1px solid #cbd5e1;border-radius:12px;padding:13px 14px;font-size:15px;outline:none;background:#fff}
.login-form input:focus{border-color:#2563eb;box-shadow:0 0 0 4px rgba(37,99,235,.12)}
.login-submit{width:100%;justify-content:center;padding:13px;margin-top:3px}
.login-error{border:1px solid #fecaca;background:#fef2f2;color:#b91c1c;border-radius:12px;padding:11px 13px;font-size:13px;margin-bottom:18px}
@media(max-width:900px){.topbar-actions{flex-wrap:wrap}.user-menu{width:100%;border-left:0;padding-left:0;justify-content:flex-end}.user-details{margin-right:auto}.login-card{padding:26px}}

/* Role-based read-only mode */
.btn:disabled,.add-task:disabled,.icon-btn:disabled{opacity:.52;cursor:not-allowed;transform:none!important}
.readonly-banner{display:flex;align-items:center;gap:12px;margin:0 0 20px;padding:13px 16px;border:1px solid #fde68a;background:#fffbeb;color:#92400e;border-radius:13px;font-size:13px}
.readonly-banner strong{white-space:nowrap}
.task-card.readonly{cursor:default}
.task-card.readonly:hover{border-color:#dce4ee;box-shadow:0 5px 16px rgba(30,41,59,.05)}
@media(max-width:760px){.readonly-banner{align-items:flex-start;flex-direction:column;gap:4px}}


/* Task checklists */
.checklist-editor{margin-top:6px;border:1px solid #e2e8f0;border-radius:14px;padding:14px;background:#f8fafc}.checklist-editor-header{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:12px}.checklist-editor-header>div{display:flex;flex-direction:column;gap:3px}.checklist-editor-header strong{font-size:13px;color:#334155}.checklist-editor-header small{font-size:11px;color:#64748b}.btn-small{padding:7px 10px;font-size:12px}.checklist-editor-items{display:grid;gap:8px}.checklist-editor-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:9px}.checklist-editor-row input[type=checkbox]{width:17px;height:17px;accent-color:#4f46e5}.checklist-editor-row .checklist-editor-text{width:100%;padding:9px 10px}.remove-checklist-item{font-size:22px;line-height:1;color:#dc2626}.card-checklist{margin:0 0 12px;padding:10px;background:#f8fafc;border:1px solid #e8edf4;border-radius:10px}.checklist-progress-row{display:flex;justify-content:space-between;align-items:center;font-size:11px;color:#64748b;font-weight:800;margin-bottom:6px}.checklist-progress{height:6px;background:#e2e8f0;border-radius:999px;overflow:hidden;margin-bottom:8px}.checklist-progress span{display:block;height:100%;background:#22c55e;border-radius:999px;transition:width .2s}.card-checklist-items{display:grid;gap:5px}.card-checklist-item{display:grid;grid-template-columns:auto 1fr;align-items:start;gap:7px;margin:0!important;font-size:11px!important;font-weight:600!important;color:#475569!important;cursor:pointer}.card-checklist-item input{width:14px;height:14px;margin:1px 0 0;accent-color:#22c55e}.card-checklist-item.completed span{text-decoration:line-through;color:#94a3b8}.checklist-more{display:block;margin-top:7px;color:#64748b;font-size:10px}@media(max-width:560px){.checklist-editor-header{align-items:flex-start;flex-direction:column}.checklist-editor-header .btn{width:100%}}

.task-dates .finished-date{color:#166534;font-weight:900}.logs-card{background:#fff;border:1px solid #dfe7f2;border-radius:16px;overflow:hidden}.logs-summary{display:flex;justify-content:space-between;padding:18px 20px;border-bottom:1px solid #e5e7eb;color:#64748b}.logs-summary strong{color:#172033}.logs-table-wrap{overflow:auto}.logs-table{width:100%;border-collapse:collapse;min-width:900px}.logs-table th,.logs-table td{padding:12px 14px;text-align:left;border-bottom:1px solid #eef2f7;font-size:13px;vertical-align:top}.logs-table th{background:#f8fafc;color:#475569;font-size:11px;text-transform:uppercase;letter-spacing:.06em}.log-action{display:inline-block;padding:4px 7px;border-radius:999px;background:#eef2ff;color:#4338ca;font-size:11px;font-weight:800}.pagination{display:flex;align-items:center;justify-content:center;gap:14px;padding:16px}.pagination span{font-size:13px;color:#64748b}

/* Gantt and analytics */
.analytics-main{max-width:1600px;margin:auto}.gantt-controls{display:flex;gap:8px}.metric-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;margin-bottom:18px}.metric-card{background:#fff;border:1px solid #dfe7f2;border-radius:16px;padding:18px;box-shadow:0 8px 24px rgba(15,23,42,.05);display:flex;flex-direction:column;gap:6px}.metric-card small{font-weight:800;color:#64748b;text-transform:uppercase;font-size:10px;letter-spacing:.08em}.metric-card strong{font-size:27px;color:#0f172a}.metric-card span{font-size:11px;color:#64748b}.metric-card.metric-danger{border-color:#fecaca;background:#fff7f7}.metric-card.metric-danger strong{color:#b91c1c}.analytics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.analytics-card{background:#fff;border:1px solid #dfe7f2;border-radius:18px;padding:20px;box-shadow:0 8px 24px rgba(15,23,42,.045);min-width:0}.analytics-card-wide{grid-column:1/-1}.card-heading{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;margin-bottom:18px}.card-heading h3{margin:0 0 4px}.card-heading p,.card-heading small{margin:0;color:#64748b;font-size:12px}.gantt-shell{border:1px solid #e2e8f0;border-radius:14px;overflow:auto;max-height:620px}.gantt-header,.gantt-row{display:flex;min-width:max-content}.gantt-header{position:sticky;top:0;z-index:4;background:#f8fafc;border-bottom:1px solid #dfe7f2}.gantt-task-heading,.gantt-task-info{position:sticky;left:0;z-index:3;width:260px;min-width:260px;background:#fff;border-right:1px solid #dfe7f2}.gantt-task-heading{padding:14px;font-size:11px;font-weight:900;text-transform:uppercase;color:#64748b;background:#f8fafc}.gantt-timeline-header{display:flex}.gantt-date-cell{padding:14px 5px;text-align:center;border-right:1px solid #e8edf4;font-size:10px;font-weight:800;color:#64748b}.gantt-row{border-bottom:1px solid #eef2f7;min-height:60px}.gantt-task-info{padding:12px 14px;display:flex;flex-direction:column;justify-content:center}.gantt-task-info strong{font-size:13px;max-width:225px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gantt-task-info small{font-size:10px;color:#64748b;margin-top:4px}.gantt-track{position:relative;min-height:60px;background-image:linear-gradient(to right,#edf1f5 1px,transparent 1px)}.gantt-bar{position:absolute;top:14px;height:32px;border-radius:8px;background:#94a3b8;color:#fff;overflow:hidden;cursor:grab;box-shadow:0 4px 12px rgba(15,23,42,.16);user-select:none}.gantt-bar span{position:absolute;inset:0 auto 0 0;background:rgba(15,23,42,.25)}.gantt-bar b{position:relative;z-index:1;display:block;text-align:center;font-size:10px;line-height:32px;text-shadow:0 1px 2px rgba(0,0,0,.3)}.gantt-bar.active{background:#3b82f6}.gantt-bar.done{background:#16a34a}.gantt-bar.overdue{background:#dc2626}.gantt-bar.dragging{cursor:grabbing;opacity:.85}.bar-row{margin-bottom:15px}.bar-row>div:first-child{display:flex;justify-content:space-between;font-size:12px;margin-bottom:6px}.bar-track{height:10px;border-radius:999px;background:#edf2f7;overflow:hidden}.bar-track span{display:block;height:100%;border-radius:999px;background:#6366f1}.trend-legend{display:flex;gap:16px;font-size:11px;color:#64748b}.trend-legend span{display:flex;align-items:center;gap:6px}.trend-legend i{width:9px;height:9px;border-radius:3px}.trend-legend .created,.trend-columns .created{background:#6366f1}.trend-legend .completed,.trend-columns .completed{background:#22c55e}.trend-bars{height:190px;display:flex;align-items:flex-end;justify-content:space-around;gap:10px;margin-top:12px}.trend-group{height:100%;flex:1;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:8px}.trend-columns{height:155px;display:flex;align-items:flex-end;gap:4px}.trend-columns span{display:block;width:16px;border-radius:5px 5px 0 0}.trend-group small{font-size:9px;color:#64748b;text-align:center}.analytics-table-wrap{overflow:auto}.analytics-table{width:100%;border-collapse:collapse;min-width:600px}.analytics-table th,.analytics-table td{padding:11px 10px;border-bottom:1px solid #eef2f7;text-align:left;font-size:12px}.analytics-table th{font-size:10px;text-transform:uppercase;color:#64748b;letter-spacing:.06em}.danger-text{color:#b91c1c;font-weight:800}.risk-badge{display:inline-flex;padding:4px 7px;border-radius:999px;font-size:10px;font-weight:900}.risk-overdue,.risk-high{background:#fef2f2;color:#b91c1c}.risk-medium{background:#fff7ed;color:#c2410c}.risk-normal{background:#ecfdf3;color:#047857}@media(max-width:1200px){.metric-grid{grid-template-columns:repeat(3,1fr)}}@media(max-width:800px){.metric-grid{grid-template-columns:repeat(2,1fr)}.analytics-grid{grid-template-columns:1fr}.analytics-card-wide{grid-column:auto}.gantt-task-heading,.gantt-task-info{width:200px;min-width:200px}}

/* Independent project progress matrix */
.progress-main{max-width:1800px;margin:auto}.progress-toolbar{display:flex;align-items:end;justify-content:space-between;gap:16px;margin-bottom:16px}.progress-toolbar>div:first-child{display:grid;gap:7px;min-width:min(520px,100%)}.progress-toolbar label{font-size:11px;font-weight:900;text-transform:uppercase;color:#64748b;letter-spacing:.06em}.progress-toolbar-actions{display:flex;gap:8px;flex-wrap:wrap}.progress-summary{display:grid;grid-template-columns:2fr 1fr 1.2fr;gap:14px;margin-bottom:16px}.progress-summary>div{background:#fff;border:1px solid #dfe7f2;border-radius:16px;padding:17px 18px;display:flex;flex-direction:column;gap:5px}.progress-summary small{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#64748b;font-weight:900}.progress-summary strong{font-size:16px;color:#0f172a}.progress-summary a{font-size:12px;color:#2563eb}.overall-progress strong{font-size:27px}.progress-meter,.mini-progress{height:7px;background:#e2e8f0;border-radius:999px;overflow:hidden}.progress-meter span,.mini-progress span{display:block;height:100%;background:#16a34a;border-radius:999px}.matrix-card{background:#fff;border:1px solid #dfe7f2;border-radius:18px;overflow:hidden;box-shadow:0 8px 24px rgba(15,23,42,.045)}.matrix-table-wrap{overflow:auto;max-height:72vh}.progress-matrix{width:100%;border-collapse:separate;border-spacing:0;min-width:1500px}.progress-matrix th,.progress-matrix td{padding:11px 10px;border-right:1px solid #e8edf4;border-bottom:1px solid #e8edf4;font-size:12px;vertical-align:middle}.progress-matrix th{position:sticky;top:0;z-index:3;background:#166534;color:#fff;text-transform:uppercase;font-size:10px;letter-spacing:.04em;text-align:center}.progress-matrix th:nth-child(2),.progress-matrix td:nth-child(2){position:sticky;left:0;z-index:2;background:#fff;min-width:280px}.progress-matrix th:nth-child(2){z-index:4;background:#166534}.progress-matrix td{text-align:center}.progress-matrix .matrix-name{text-align:left;font-weight:700;color:#1e293b}.matrix-section td{background:#dcfce7!important;color:#166534;font-weight:900;text-transform:uppercase}.matrix-section td:nth-child(2){text-align:left}.matrix-status{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:10px;font-weight:900;white-space:nowrap}.status-pending{background:#f1f5f9;color:#64748b}.status-in-progress{background:#dbeafe;color:#1d4ed8}.status-done{background:#dcfce7;color:#15803d}.status-na{background:#f3e8ff;color:#7e22ce}.mini-progress{margin-top:5px;height:5px;min-width:80px}.empty-state{padding:35px!important;text-align:center!important;color:#64748b}.toast.error{background:#b91c1c}@media(max-width:900px){.progress-toolbar{align-items:stretch;flex-direction:column}.progress-summary{grid-template-columns:1fr}.progress-toolbar-actions .btn{flex:1}}
