:root {
  --bg: #0c0c0f; --surface: #16161a; --surface-2: #1e1e24; --surface-3: #26262e;
  --border: #2a2a35; --text: #e8e6e3; --text-dim: #8a8a96; --text-muted: #5a5a68;
  --accent: #6c5ce7; --accent-light: #a29bfe; --accent-dim: rgba(108,92,231,0.15);
  --green: #00b894; --red: #e17055;
  --radius: 12px; --radius-sm: 8px;
  --font: 'DM Sans', sans-serif; --mono: 'JetBrains Mono', monospace;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:var(--font); background:var(--bg); color:var(--text); min-height:100vh; line-height:1.5; }
.header { padding:32px 40px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:24px; flex-wrap:wrap; }
.header-left { display:flex; align-items:center; gap:16px; }
.logo { width:40px; height:40px; background:var(--accent); border-radius:10px; display:grid; place-items:center; font-weight:700; font-size:18px; letter-spacing:-1px; }
.header h1 { font-size:22px; font-weight:600; letter-spacing:-0.5px; }
.auth-panel { padding:24px 40px; border-bottom:1px solid var(--border); display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; }
.field { display:flex; flex-direction:column; gap:6px; }
.field.grow { flex:1; min-width:240px; }
.field label { font-size:11px; font-weight:500; color:var(--text-dim); text-transform:uppercase; letter-spacing:1px; }
.field input, .field select { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); padding:10px 14px; color:var(--text); font-family:var(--mono); font-size:13px; outline:none; transition:border-color 0.2s; }
.field select { font-family:var(--font); cursor:pointer; }
.field input:focus, .field select:focus { border-color:var(--accent); }
.field input[type="date"] { min-width:140px; }
.field input[type="date"]::-webkit-calendar-picker-indicator { filter:invert(0.7); cursor:pointer; }
.btn { background:var(--accent); color:#fff; border:none; border-radius:var(--radius-sm); padding:10px 24px; font-family:var(--font); font-size:14px; font-weight:600; cursor:pointer; transition:all 0.2s; white-space:nowrap; }
.btn:hover { background:#7c6ef0; transform:translateY(-1px); }
.btn:active { transform:translateY(0); }
.btn:disabled { opacity:0.5; cursor:not-allowed; transform:none; }
.btn-outline { background:transparent; border:1px solid var(--border); color:var(--text-dim); }
.btn-outline:hover { border-color:var(--accent); color:var(--accent-light); background:var(--accent-dim); }
.btn-sm { padding:6px 14px; font-size:12px; }
.status-bar { padding:14px 40px; border-bottom:1px solid var(--border); font-size:13px; color:var(--text-dim); display:flex; align-items:center; gap:10px; min-height:48px; overflow-x:auto; }
.status-bar .spinner { width:14px; height:14px; border:2px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:spin 0.8s linear infinite; flex-shrink:0; }
@keyframes spin { to { transform:rotate(360deg); } }
.status-bar.error { color:var(--red); white-space:normal; word-break:break-all; }
.status-bar.success { color:var(--green); }
.tabs-container { padding:0 40px; border-bottom:1px solid var(--border); display:none; }
.tabs-container.visible { display:block; }
.tabs { display:flex; }
.tab { padding:14px 20px; font-size:14px; font-weight:500; color:var(--text-dim); cursor:pointer; border-bottom:2px solid transparent; transition:all 0.2s; user-select:none; }
.tab:hover { color:var(--text); }
.tab.active { color:var(--accent-light); border-bottom-color:var(--accent); }
.content { padding:28px 40px; display:none; }
.content.visible { display:block; }
.project-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); margin-bottom:14px; overflow:hidden; }
.project-header { padding:18px 22px; display:flex; align-items:center; justify-content:space-between; gap:14px; }
.project-header h2 { font-size:15px; font-weight:600; display:flex; align-items:center; gap:10px; }
.project-header h2 .dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; }
.hours-badge { font-family:var(--mono); font-size:13px; font-weight:500; padding:4px 12px; border-radius:20px; background:var(--accent-dim); color:var(--accent-light); white-space:nowrap; }
.project-metrics{display:flex; gap:14px; align-items:center; justify-content:flex-end; flex-wrap:wrap;}
.project-metric{background:transparent; border:none; border-radius:0; padding:0; min-width:110px;}
.project-metric .lbl{font-size:10px; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.6px; margin-bottom:4px;}
.project-metric .val{font-family:var(--mono); font-size:14px; font-weight:700; line-height:1.1;}
.project-metric .plan-budget{font-family:var(--mono); font-size:12px; font-weight:600; color:var(--text-dim); margin-top:3px;}
.summary-card .plan-budget{font-family:var(--mono); font-size:14px; font-weight:600; color:var(--text-dim); margin-top:6px;}
.board-section { border-top:1px solid var(--border); }
.board-header { padding:12px 22px 12px 42px; display:flex; align-items:center; justify-content:space-between; gap:14px; background:var(--surface-2); cursor:pointer; user-select:none; transition:background 0.15s; }
.board-header:hover { background:var(--surface-3); }
.board-header h3 { font-size:13px; font-weight:500; color:var(--text-dim); display:flex; align-items:center; gap:8px; }
.board-header h3 .chevron { transition:transform 0.2s; font-size:10px; color:var(--text-muted); }
.board-header h3 .chevron.collapsed { transform:rotate(-90deg); }
.board-hours { font-family:var(--mono); font-size:12px; color:var(--text-muted); }
.task-list { border-top:1px solid var(--border); overflow:hidden; }
.task-list.collapsed { max-height:0 !important; border-top:none; overflow:hidden; }
.task-row { padding:9px 22px 9px 60px; display:flex; align-items:center; justify-content:space-between; gap:14px; font-size:13px; border-bottom:1px solid rgba(42,42,53,0.5); transition:background 0.1s; }
.task-row:last-child { border-bottom:none; }
.task-row:hover { background:rgba(108,92,231,0.04); }
.task-title { color:var(--text); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.task-title-link { display:inline-block; color:var(--text); flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; text-decoration:none; }
.task-title-link:hover { color:var(--accent-light); text-decoration:underline; }
.task-user { color:var(--text-muted); font-size:12px; flex-shrink:0; }
.task-hours { font-family:var(--mono); font-size:12px; color:var(--text-dim); flex-shrink:0; min-width:72px; text-align:right; white-space:nowrap; }
.task-hours-fact-over { color:var(--red); font-weight:600; }
.task-hours-sep { color:var(--text-muted); margin:0 1px; }
.board-hours { font-family:var(--mono); font-size:13px; color:var(--text-dim); flex-shrink:0; white-space:nowrap; }
.dual-metric { font-size:15px; white-space:nowrap; }
.dual-metric-sep { color:var(--text-muted); margin:0 2px; font-weight:400; }
.dual-metric-part { font-weight:700; }
.employee-table .dual-fact-cap { font-size:11px; letter-spacing:-0.02em; }
.employee-table-wrap { overflow-x:auto; border:1px solid var(--border); border-radius:var(--radius); background:var(--surface); }
.employee-table { width:100%; border-collapse:collapse; font-size:13px; }
.employee-table th { background:var(--surface-2); padding:12px 10px; text-align:left; font-weight:600; font-size:11px; color:var(--text-dim); text-transform:uppercase; letter-spacing:0.6px; border-bottom:1px solid var(--border); white-space:nowrap; position:sticky; top:0; z-index:2; }
.employee-table th:first-child { position:sticky; left:0; z-index:3; background:var(--surface-2); box-shadow:4px 0 8px -4px rgba(0,0,0,0.25); }
.employee-table th.total-col { left:160px; z-index:4; background:var(--surface-2); color:var(--accent-light); box-shadow:4px 0 8px -4px rgba(0,0,0,0.22); position:sticky; top:0; }
.employee-table td { padding:10px 10px; border-bottom:1px solid rgba(42,42,53,0.5); white-space:nowrap; }
.employee-table td:first-child { position:sticky; left:0; background:var(--surface); z-index:1; font-weight:500; box-shadow:4px 0 8px -4px rgba(0,0,0,0.2); }
.employee-table tr:hover td { background:rgba(108,92,231,0.04); }
.employee-table tr:hover td:first-child { background:var(--surface-2); }
.employee-table tr:hover td.total-cell { background:rgba(108,92,231,0.06); }
.employee-table td.num { font-family:var(--mono); font-size:12px; text-align:center; color:var(--text-dim); }
.employee-table td.num.has-value { color:var(--text); }
.employee-table td.total-cell { position:sticky; left:160px; z-index:2; font-family:var(--mono); font-size:13px; font-weight:600; text-align:center; color:var(--accent-light); background:var(--surface); box-shadow:4px 0 8px -4px rgba(0,0,0,0.2); }
.employee-table tfoot td { background:var(--surface-2) !important; font-weight:600; border-top:2px solid var(--border); font-family:var(--mono); font-size:12px; text-align:center; color:var(--text-dim); }
.employee-table tfoot td:first-child { position:sticky; left:0; z-index:2; background:var(--surface-2) !important; text-align:left; font-family:var(--font); font-size:13px; box-shadow:4px 0 8px -4px rgba(0,0,0,0.25); }
.employee-table tfoot td.has-value { color:var(--text); }
.employee-table tfoot td.total-cell { position:sticky; left:160px; z-index:3; background:var(--surface-2) !important; }
.employee-table td.total-cell .emp-total-stack { white-space:normal; line-height:1.35; text-align:center; }
.employee-table .emp-total-dual-line { white-space:nowrap; }
.week-group-header { text-align:center !important; font-size:10px !important; color:var(--text-muted) !important; padding:6px !important; background:var(--surface-3) !important; }
.chart-container { display:flex; align-items:center; justify-content:center; gap:50px; padding:36px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); flex-wrap:wrap; }
.chart-svg-wrap { position:relative; flex-shrink:0; }
.chart-center-label { position:absolute; top:50%; left:50%; transform:translate(-50%,-50%); text-align:center; }
.chart-center-label .val { font-family:var(--mono); font-size:26px; font-weight:700; line-height:1.1; }
.chart-center-label .lbl { font-size:12px; color:var(--text-muted); margin-top:2px; }
.chart-legend { display:flex; flex-direction:column; gap:10px; min-width:200px; }
.legend-item { display:flex; align-items:center; gap:10px; padding:8px 14px; border-radius:var(--radius-sm); transition:background 0.15s; }
.legend-item:hover { background:var(--surface-2); }
.legend-color { width:12px; height:12px; border-radius:4px; flex-shrink:0; }
.legend-name { flex:1; font-size:13px; font-weight:500; }
.legend-value { font-family:var(--mono); font-size:12px; color:var(--text-dim); }
.legend-pct { font-size:11px; color:var(--text-muted); min-width:38px; text-align:right; }
.day-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); margin-bottom:18px; overflow:hidden; }
.day-header { padding:16px 22px; display:flex; align-items:center; justify-content:space-between; gap:14px; background:var(--surface-2); border-bottom:1px solid var(--border); }
.day-title { font-size:17px; font-weight:700; letter-spacing:-0.3px; display:flex; align-items:baseline; gap:10px; text-transform:capitalize; }
.day-title-weekend { color:var(--red); }
.day-dow { font-size:12px; font-weight:500; color:var(--text-muted); text-transform:capitalize; }
.day-total { font-family:var(--mono); font-size:15px; font-weight:700; color:var(--accent-light); white-space:nowrap; }
.day-total-unit, .day-emp-unit, .day-task-unit { font-size:11px; color:var(--text-muted); margin-left:2px; font-weight:500; }
.day-emp { border-top:1px solid var(--border); }
.day-emp:first-of-type { border-top:none; }
.day-emp-head { padding:11px 22px; display:flex; align-items:center; justify-content:space-between; gap:14px; background:rgba(108,92,231,0.04); }
.day-emp-name { font-size:14px; font-weight:600; color:var(--text); }
.day-emp-total { font-family:var(--mono); font-size:13px; font-weight:600; color:var(--text-dim); white-space:nowrap; }
.day-task-list { border-top:1px solid rgba(42,42,53,0.5); }
.day-task-row { padding:9px 22px 9px 32px; display:flex; align-items:center; gap:14px; font-size:13px; border-bottom:1px solid rgba(42,42,53,0.5); transition:background 0.1s; }
.day-task-row:last-child { border-bottom:none; }
.day-task-row:hover { background:rgba(108,92,231,0.04); }
.day-task-proj { display:flex; align-items:center; gap:8px; flex-shrink:0; min-width:150px; max-width:220px; color:var(--text-dim); font-size:12px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.day-task-proj .dot { width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.day-task-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--text); }
.day-task-hours { font-family:var(--mono); font-size:12px; color:var(--text-dim); flex-shrink:0; min-width:60px; text-align:right; white-space:nowrap; }
.wl-status { flex-shrink:0; font-size:10px; font-weight:600; text-transform:uppercase; letter-spacing:0.4px; padding:3px 9px; border-radius:20px; white-space:nowrap; }
.wl-status-backlog { background:rgba(116,185,255,0.14); color:#74b9ff; }
.wl-status-week { background:rgba(0,184,148,0.14); color:#00b894; }
@media(max-width:600px) {
  .day-task-row { flex-wrap:wrap; gap:4px 12px; }
  .day-task-proj { min-width:0; max-width:none; order:1; }
  .wl-status { order:2; }
  .day-task-hours { order:3; margin-left:auto; }
  .day-task-title { order:4; flex-basis:100%; }
}
.summary-row { display:grid; grid-template-columns:repeat(auto-fit,minmax(160px,1fr)); gap:12px; margin-bottom:24px; }
.summary-card { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius); padding:18px; }
.summary-card .label { font-size:11px; color:var(--text-muted); text-transform:uppercase; letter-spacing:0.8px; margin-bottom:4px; }
.summary-card .value { font-family:var(--mono); font-size:22px; font-weight:700; }
.summary-card .value small { font-size:13px; font-weight:400; color:var(--text-dim); margin-left:4px; }
::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:var(--surface-3); border-radius:3px; }
.header,.auth-panel,.status-bar,.tabs-container,.content{max-width:800px; margin-left:auto; margin-right:auto; box-sizing:border-box;}
@media(max-width:768px) { .header,.auth-panel,.status-bar,.tabs-container,.content { padding-left:16px; padding-right:16px; } }
#tab-employees{max-width:1600px !important; width:100%; margin-left:auto; margin-right:auto;}
.modal-overlay{position:fixed;inset:0;background:rgba(0,0,0,0.55);z-index:1000;display:none;align-items:center;justify-content:center;padding:20px;}
.modal-overlay.open{display:flex;}
.modal-box{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);max-width:560px;width:100%;max-height:90vh;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 50px rgba(0,0,0,0.4);}
.modal-head{padding:18px 22px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px;}
.modal-head h2{font-size:16px;font-weight:600;}
.modal-body{padding:18px 22px;overflow-y:auto;flex:1;}
.modal-foot{padding:14px 22px;border-top:1px solid var(--border);display:flex;flex-wrap:wrap;gap:10px;justify-content:flex-end;}
.plan-row{display:grid;grid-template-columns:1fr 100px 130px;gap:10px;align-items:center;margin-bottom:10px;font-size:13px;}
.plan-row label{color:var(--text-dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.plan-row input{width:100%;padding:8px 10px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font-family:var(--mono);font-size:13px;}
.plan-row .budget-inline{font-family:var(--mono);font-size:12px;color:var(--text-dim);text-align:right;white-space:nowrap;}
.modal-hint{font-size:12px;color:var(--text-muted);margin-bottom:14px;line-height:1.45;}
