:root {
  --brand: #1D3FCF;
  --brand-dark: #142C93;
  --brand-tint: #EEF1FD;
  --ink: #0E1525;
  --ink-2: #3A4352;
  --muted: #566074;
  --line: #D5DAE1;
  --line-soft: #E6E9EE;
  --control: #7B8596;
  --surface: #FFFFFF;
  --canvas: #F4F5F7;
  --danger: #B4361B;
  --danger-tint: #FDECE8;
  --ok: #146C2E;
  --ok-tint: #E6F4EA;
  --warn: #8A4B06;
  --sb-w: 252px;
  --shadow-1: 0 1px 2px rgba(20, 44, 147, 0.06), 0 2px 6px rgba(14, 21, 37, 0.05);
  --shadow-2: 0 2px 4px rgba(20, 44, 147, 0.08), 0 8px 20px rgba(14, 21, 37, 0.08);
  --shadow-3: 0 4px 8px rgba(20, 44, 147, 0.10), 0 24px 56px rgba(14, 21, 37, 0.18);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --slide: cubic-bezier(0.2, 0.8, 0.2, 1);
  --sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--ink);
  background:
    radial-gradient(900px 480px at 8% -8%, rgba(29, 63, 207, 0.08), transparent 60%),
    radial-gradient(700px 420px at 100% 0%, rgba(20, 108, 46, 0.05), transparent 60%),
    var(--canvas);
  background-attachment: fixed;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.grow { flex: 1; }
.title-xl { font-size: 28px; line-height: 1.15; font-weight: 600; letter-spacing: -0.03em; }
.lede { color: var(--ink-2); font-size: 14px; }
.err { color: var(--danger); font-size: 14px; font-weight: 500; }

/* ---------- butoane și câmpuri ---------- */
.btn {
  min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--control); background: var(--surface);
  color: var(--ink); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; white-space: nowrap; box-shadow: var(--shadow-1);
}
.btn:hover { background: #F0F2F6; }
.btn:active { transform: translateY(1px) scale(0.98); box-shadow: none; }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn.lg { min-height: 46px; font-size: 15px; }
.btn.icon { padding: 0; min-width: 34px; }
.btn.sm.icon { min-width: 34px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.on { background: var(--brand-tint); border-color: var(--brand); color: var(--brand); }
.btn.danger { color: var(--danger); border-color: var(--danger); }
.btn.danger:hover { background: var(--danger-tint); }
.btn.ghost { border-color: transparent; box-shadow: none; background: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: rgba(14, 21, 37, 0.07); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn[disabled] { opacity: 0.55; cursor: default; }

input[type=text], input[type=email], input[type=search], input[type=date], select, textarea {
  width: 100%; min-height: 40px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--control); background: var(--surface);
}
textarea { resize: vertical; min-height: 96px; line-height: 1.45; }
input:hover, select:hover, textarea:hover { border-color: var(--ink-2); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; color: var(--ink-2); }
.link-btn { all: unset; cursor: pointer; color: var(--muted); font-size: 12.5px; text-decoration: underline; padding: 6px 4px; }
.link-btn:hover { color: var(--danger); }
.link-btn:focus-visible { outline: 3px solid var(--brand); }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check-row input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
.sec-h { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 8px; padding: 0; }

/* ---------- login ---------- */
.center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.card-box, .card.verify-card {
  width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 32px; box-shadow: var(--shadow-2); display: flex; flex-direction: column; gap: 18px;
}
body.verify { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.verify-card h1 { font-size: 24px; letter-spacing: -0.03em; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(145deg, #3157F0, var(--brand-dark)); color: #fff;
  display: grid; place-items: center; box-shadow: 0 2px 6px rgba(20, 44, 147, 0.4); flex: none;
}
.brand-mark svg { width: 17px; height: 17px; }

/* ---------- aplicație: bara laterală ---------- */
.shell { display: grid; grid-template-columns: var(--sb-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 16px 12px 12px; display: flex; flex-direction: column; gap: 4px;
  color: #C9D0DC;
  background:
    radial-gradient(260px 220px at 0% 0%, rgba(49, 87, 240, 0.28), transparent 70%),
    linear-gradient(180deg, #121B31 0%, #0B1120 100%);
}
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; color: #fff; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-link {
  display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 9px; color: #C9D0DC;
  text-decoration: none; font-size: 14.5px; font-weight: 500; border: 0; background: transparent; width: 100%; text-align: left;
}
.sb-link:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.sb-link:active { transform: scale(0.985); }
.sb-link[aria-current=page] { background: rgba(255, 255, 255, 0.15); color: #fff; }
.sb-link svg { width: 18px; height: 18px; flex: none; }
.sidebar :focus-visible { outline-color: #A9BBFF; }
.sb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.sb-sq { width: 12px; height: 12px; border-radius: 4px; flex: none; margin: 0 3px; }
.sb-sq.lg { width: 16px; height: 16px; border-radius: 5px; margin: 0 10px 0 0; vertical-align: -1px; display: inline-block; }
.sb-h { display: flex; align-items: center; justify-content: space-between; padding: 18px 10px 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: #8C97AB; }
.sb-ico { all: unset; cursor: pointer; width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: #C9D0DC; }
.sb-ico:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.sb-ico:focus-visible { outline: 3px solid #A9BBFF; }
.sb-ico svg { width: 16px; height: 16px; }
.sb-projects { flex: 1; min-height: 0; overflow-y: auto; }
.sb-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; gap: 2px; }
.sb-btn { cursor: pointer; font-family: inherit; }
.badge { margin-left: auto; min-width: 22px; padding: 0 7px; height: 20px; border-radius: 10px; background: #fff; color: var(--ink); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.scrim { display: none; }
.content { min-width: 0; }
.mobbar { display: none; align-items: center; gap: 8px; padding: 8px 10px; background: rgba(255, 255, 255, 0.92); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 4; backdrop-filter: blur(8px); }

@media (max-width: 899px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; z-index: 30; width: min(300px, 86vw); transform: translateX(-102%); transition: transform 0.28s var(--slide); box-shadow: var(--shadow-3); }
  .shell.nav-open .sidebar { transform: none; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 20; background: rgba(14, 21, 37, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.2s linear; }
  .shell.nav-open .scrim { opacity: 1; pointer-events: auto; }
  .mobbar { display: flex; }
}

/* ---------- antet proiect ---------- */
.ph { padding: 22px 24px 0; max-width: 1480px; margin: 0 auto; }
.ph-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ph-title { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; display: flex; align-items: center; }
.ph-bar { display: flex; align-items: center; gap: 10px 12px; flex-wrap: wrap; margin-top: 12px; border-bottom: 1px solid var(--line); }
.tabs { display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs a {
  display: inline-flex; align-items: center; gap: 7px; min-height: 42px; padding: 0 12px; color: var(--ink-2); text-decoration: none; font-weight: 500;
  font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
}
.tabs a:hover { color: var(--ink); background: rgba(14, 21, 37, 0.05); border-radius: 8px 8px 0 0; }
.tabs a[aria-current=page] { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tabs svg { width: 16px; height: 16px; }
.search-wrap { position: relative; display: flex; align-items: center; margin-bottom: 8px; }
.search-wrap svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.search { padding-left: 34px !important; width: 220px !important; min-height: 34px !important; }
.ph-bar > .btn { margin-bottom: 8px; }
.ph-body { max-width: 1480px; margin: 0 auto; padding: 16px 24px 64px; }
@media (max-width: 899px) { .ph { padding: 14px 14px 0; } .ph-body { padding: 12px 14px 64px; } .ph-title { font-size: 22px; } .search { width: 100% !important; } .search-wrap { flex: 1 1 100%; } }

/* ---------- chip-uri comune ---------- */
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.count { font-family: var(--mono); font-size: 12px; color: var(--muted); background: rgba(255, 255, 255, 0.85); padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); margin-left: 8px; }
.proj { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--ink-2); }
.due { font-family: var(--mono); font-size: 12px; display: inline-flex; padding: 1px 8px; border-radius: 999px; background: #F0F2F6; color: var(--ink-2); white-space: nowrap; }
.due.late { background: var(--danger-tint); color: var(--danger); font-weight: 500; }
.due.soon { background: #FFF3DD; color: var(--warn); font-weight: 500; }
.prio { font-size: 12px; font-weight: 600; padding: 1px 9px; border-radius: 999px; white-space: nowrap; }
.tag-chip { font-size: 12px; font-weight: 500; padding: 0 8px; border-radius: 6px; border: 1px solid; white-space: nowrap; line-height: 20px; }
.av { width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; font-size: 11px; font-weight: 600; color: #fff; letter-spacing: 0.02em; }
.av.sm { width: 24px; height: 24px; font-size: 10px; }
.av.empty { background: transparent; border: 1.5px dashed var(--control); }
.meta-i { display: inline-flex; gap: 10px; align-items: center; color: var(--muted); font-size: 12.5px; }
.meta-i .i { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); }
.meta-i svg, .meta svg { width: 14px; height: 14px; }

/* bifa de terminat */
.check {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative; width: 22px; height: 22px; border-radius: 50%; flex: none;
  border: 2px solid var(--control); display: grid; place-items: center; color: #fff; background: var(--surface);
}
.check::after { content: ''; position: absolute; inset: -11px; }
.check svg { width: 12px; height: 12px; opacity: 0; transform: scale(0.5); color: var(--ok); }
.check:hover { border-color: var(--ok); }
.check:hover svg { opacity: 0.7; transform: scale(1); }
.check:active { transform: scale(0.9); }
.check.on { background: var(--ok); border-color: var(--ok); }
.check.on svg { opacity: 1; transform: scale(1); color: #fff; transition: transform 0.3s var(--spring); }
.check:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.check.sm { width: 18px; height: 18px; }
.check.sm svg { width: 10px; height: 10px; }
.is-done .row-title, .is-done .card-title { color: var(--muted); text-decoration: line-through; }

/* ---------- vizualizarea Listă ---------- */
.list-view { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1); overflow: hidden; }
.lv-head, .lv-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px 120px 110px; gap: 12px; align-items: center; padding: 0 16px; }
.lv-head { min-height: 38px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); border-bottom: 1px solid var(--line); background: #FAFBFC; }
.lv-sec-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 6px 8px; background: #F7F8FA; border-bottom: 1px solid var(--line-soft); font-size: 14px; font-weight: 600; }
.sec-toggle { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 8px; border-radius: 8px; font-weight: 600; }
.sec-toggle:hover { background: rgba(14, 21, 37, 0.06); }
.sec-toggle:focus-visible { outline: 3px solid var(--brand); }
.chev { display: inline-grid; transition: transform 0.2s var(--slide); }
.chev svg { width: 16px; height: 16px; }
.chev.open { transform: rotate(90deg); }
.lv-sec + .lv-sec { border-top: 1px solid var(--line); }
.lv-row { min-height: 52px; padding-top: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--line-soft); }
.lv-row:hover { background: #F9FAFC; }
.lv-name { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.lv-name .check { margin-top: 2px; }
.lv-title { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-title { all: unset; cursor: pointer; font-weight: 500; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; letter-spacing: -0.005em; }
.row-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.row-title:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }
.lv-sub { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.lv-sub:empty, .lv-sub:has(> .meta-i:empty):not(:has(.proj, .tag-chip)) { display: none; }
.c-asg { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 14px; }
.asg-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lv-add { all: unset; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%; box-sizing: border-box; min-height: 40px; padding: 0 16px 0 22px; color: var(--muted); font-size: 14px; }
.lv-add:hover { background: #F4F6FA; color: var(--ink); }
.lv-add:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.lv-add svg { width: 15px; height: 15px; }
.lv-sec .quick { margin: 8px 12px 12px; }
@media (max-width: 899px) { .lv-head, .lv-row { grid-template-columns: minmax(0, 1fr) 90px 100px; } .c-asg .asg-name { display: none; } .lv-head .c-pri, .lv-row .c-pri { display: none; } }
@media (max-width: 599px) { .lv-head { display: none; } .lv-row { grid-template-columns: minmax(0, 1fr) auto; } .lv-row .c-asg { display: none; } }

/* ---------- Board ---------- */
.board { display: grid; gap: 14px; grid-auto-flow: column; grid-auto-columns: minmax(280px, 82vw); overflow-x: auto; scroll-snap-type: x proximity; align-items: start; padding-bottom: 8px; }
@media (min-width: 900px) { .board { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-columns: unset; overflow: visible; } }
.col { scroll-snap-align: start; background: rgba(233, 236, 241, 0.75); border: 1px solid var(--line); border-radius: 16px; padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 160px; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 4px 0 6px; }
.col-head h2 { font-size: 14px; font-weight: 600; }
.col-head .count { margin-left: 0; }
.col-head .btn { margin-left: auto; }
.list { display: flex; flex-direction: column; gap: 10px; min-height: 48px; border-radius: 12px; padding: 2px; }
.empty-col { color: var(--muted); font-size: 13px; text-align: center; padding: 14px 8px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 10px;
  box-shadow: var(--shadow-1); display: flex; flex-direction: column; gap: 8px; transition: transform 0.22s var(--spring);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.card[draggable=true] { cursor: grab; }
.card-main { display: flex; gap: 10px; align-items: flex-start; }
.card-main .check { margin-top: 1px; z-index: 1; }
.card-title { all: unset; box-sizing: border-box; cursor: pointer; font-weight: 600; font-size: 14.5px; line-height: 1.35; letter-spacing: -0.01em; overflow-wrap: anywhere; min-width: 0; }
.card-title::after { content: ''; position: absolute; inset: 0; border-radius: 12px; }
.card-title:focus-visible { outline: none; }
.card-title:focus-visible::after { outline: 3px solid var(--brand); outline-offset: 2px; }
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.meta .sp { flex: 1; }
.dragging { opacity: 0.4; }
.drop-over { background: var(--brand-tint) !important; outline: 2px dashed var(--brand); outline-offset: -2px; }
.drop-line { height: 4px; border-radius: 2px; background: var(--brand); margin: -2px 0; }
.quick { display: flex; flex-direction: column; gap: 8px; background: var(--surface); border: 1px solid var(--control); border-radius: 12px; padding: 10px; }
.quick .row { display: flex; gap: 8px; flex-wrap: wrap; }
.quick .row select { flex: 1 1 140px; width: auto; }

/* ---------- Calendar ---------- */
.cal-nav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; text-transform: capitalize; min-width: 150px; text-align: center; }
.cal-note { font-size: 13px; margin-left: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-1); }
.cal-wd { padding: 8px 10px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); background: #FAFBFC; border-bottom: 1px solid var(--line); }
.cal-cell { min-height: 124px; padding: 6px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.other { background: #FAFBFC; }
.cal-cell.other .cal-num { color: #5B6578; }
.cal-top { display: flex; align-items: center; justify-content: space-between; }
.cal-num { font-size: 13px; font-weight: 500; min-width: 24px; height: 24px; display: inline-grid; place-items: center; border-radius: 12px; }
.cal-cell.today .cal-num { background: var(--brand); color: #fff; font-weight: 700; }
.cal-add { all: unset; cursor: pointer; width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); opacity: 0; }
.cal-add svg { width: 14px; height: 14px; }
.cal-cell:hover .cal-add, .cal-add:focus-visible { opacity: 1; }
.cal-add:hover { background: var(--brand-tint); color: var(--brand); }
.cal-add:focus-visible { outline: 3px solid var(--brand); }
.cal-chip { border-left: 3px solid var(--pc); background: color-mix(in srgb, var(--pc) 10%, white); border-radius: 5px; min-width: 0; cursor: grab; }
.cal-chip:hover { background: color-mix(in srgb, var(--pc) 18%, white); }
.cal-chip button { all: unset; cursor: pointer; display: block; box-sizing: border-box; width: 100%; padding: 2px 6px; font-size: 12.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-chip button:focus-visible { outline: 3px solid var(--brand); outline-offset: 1px; }
.cal-chip.is-done button { text-decoration: line-through; color: var(--muted); }
.cal-more { all: unset; cursor: pointer; font-size: 12px; color: var(--brand); padding: 2px 6px; font-weight: 500; }
.cal-more:hover { text-decoration: underline; }
.cal-more:focus-visible { outline: 3px solid var(--brand); }
.cal-agenda { display: none; }
.ag-day { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; }
.ag-day.today { border-color: var(--brand); }
.ag-day h3 { font-size: 13px; font-weight: 600; text-transform: capitalize; color: var(--ink-2); margin-bottom: 6px; }
.ag-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
@media (max-width: 699px) { .cal-grid { display: none; } .cal-agenda { display: block; } .cal-cell .cal-add { opacity: 1; } }
@media (pointer: coarse) { .cal-add { opacity: 1; } }

/* ---------- Cronologie ---------- */
.tl-scroll { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-1); }
.tl-grid { min-width: calc(220px + var(--cols) * 30px); }
.tl-row { display: grid; grid-template-columns: 220px repeat(var(--cols), 30px); align-items: center; min-height: 40px; border-bottom: 1px solid var(--line-soft);
  background-image: linear-gradient(to right, transparent 29px, #EEF0F4 29px); background-size: 30px 100%; background-position: 220px 0; background-repeat: repeat-x; }
.tl-row > * { grid-row: 1; }
.tl-headrow { background-image: none; background: #FAFBFC; min-height: 32px; }
.tl-label { position: sticky; left: 0; z-index: 3; background: var(--surface); padding: 6px 12px; border-right: 1px solid var(--line); align-self: stretch; display: flex; align-items: center; min-width: 0; }
.tl-headrow .tl-label { background: #FAFBFC; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.tl-label .row-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; width: 100%; font-size: 14px; }
.tl-month { font-size: 12.5px; font-weight: 600; text-transform: capitalize; padding-left: 6px; color: var(--ink-2); white-space: nowrap; overflow: hidden; }
.tl-day { text-align: center; font-family: var(--mono); font-size: 11.5px; color: var(--muted); align-self: stretch; display: grid; place-items: center; }
.tl-day.we { background: rgba(14, 21, 37, 0.04); }
.tl-day.today { background: var(--brand); color: #fff; font-weight: 700; }
.tl-todaycol { align-self: stretch; background: rgba(29, 63, 207, 0.08); border-left: 1px solid rgba(29, 63, 207, 0.4); }
.tl-bar { all: unset; grid-row: 1; box-sizing: border-box; cursor: pointer; z-index: 1; height: 24px; margin: 0 1px; border-radius: 6px; background: var(--pc); color: #fff; font-size: 12px; font-weight: 500; padding: 0 8px; line-height: 24px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 0 1px 2px rgba(14, 21, 37, 0.25); }
.tl-bar:hover { filter: brightness(1.12); }
.tl-bar:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; }
.tl-bar.is-done { opacity: 0.45; }
.tl-bar.cut-l { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tl-bar.cut-r { border-top-right-radius: 0; border-bottom-right-radius: 0; }
@media (max-width: 599px) { .tl-grid { min-width: calc(140px + var(--cols) * 30px); } .tl-row { grid-template-columns: 140px repeat(var(--cols), 30px); background-position: 140px 0; } }

/* ---------- Acasă și Inbox ---------- */
.home { max-width: 900px; margin: 0 auto; padding: 28px 24px 72px; display: flex; flex-direction: column; gap: 22px; }
.home-head { display: flex; flex-direction: column; gap: 4px; }
.stats { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.stat { flex: 1 1 150px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow-1); display: flex; flex-direction: column; }
.stat strong { font-size: 30px; line-height: 1.1; letter-spacing: -0.03em; font-weight: 600; }
.stat span { font-size: 13px; color: var(--muted); }
.stat.bad strong { color: var(--danger); }
.stat.ok strong { color: var(--ok); }
.panel-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px 14px; box-shadow: var(--shadow-2); }
.card-h { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 8px; }
.hm-group { margin-top: 10px; }
.hm-h { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); display: flex; align-items: center; padding: 8px 0 4px; }
.hm-h.late { color: var(--danger); }
.hm-h.today { color: var(--brand); }
.hm-h .count { margin-left: 8px; }
.hm-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.hm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.hm-done { margin-top: 14px; }
.hm-done summary { cursor: pointer; font-size: 14px; color: var(--muted); min-height: 34px; display: flex; align-items: center; }
.nt { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 8px; border-bottom: 1px solid var(--line-soft); border-radius: 8px; }
.nt:hover { background: #F6F7FA; }
.nt:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.nt-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; flex: none; }
.nt.unread .nt-dot { background: var(--brand); }
.nt.unread .nt-text { font-weight: 600; }
.nt-body { display: flex; flex-direction: column; min-width: 0; }
.nt-time { font-size: 12.5px; }
.state { max-width: 520px; margin: 64px auto; padding: 0 16px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }

/* ---------- panoul de task ---------- */
.panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(540px, 100vw); background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3); display: flex; flex-direction: column; transform: translateX(104%); visibility: hidden;
  transition: transform 0.28s var(--slide), visibility 0s linear 0.28s;
}
.panel.open { transform: none; visibility: visible; transition-delay: 0s; }
.panel:focus { outline: none; }
.panel-scrim { display: none; }
@media (max-width: 899px) {
  .panel-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(14, 21, 37, 0.5); opacity: 0; pointer-events: none; transition: opacity 0.2s linear; }
  body.panel-open .panel-scrim { opacity: 1; pointer-events: auto; }
}
.pn-top { display: flex; align-items: center; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.pn-done.on { background: var(--ok-tint); border-color: var(--ok); color: var(--ok); }
.pn-body { padding: 14px 20px 32px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; flex: 1; }
.pn-title { font-size: 22px; line-height: 1.25; font-weight: 600; letter-spacing: -0.03em; border-color: transparent; resize: none; overflow: hidden; padding: 6px 8px; margin: 0 -8px; width: calc(100% + 16px); min-height: 0; }
.pn-title:hover { border-color: var(--line); }
.pn-body > * { flex-shrink: 0; }
.pn-fields { display: flex; flex-direction: column; gap: 6px; }
.pn-row { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 10px; align-items: start; min-height: 40px; }
.pn-label { font-size: 13px; color: var(--muted); font-weight: 500; padding-top: 10px; }
.pn-ctl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.pn-ctl select, .pn-ctl input[type=date], .pn-ctl input[type=text] { width: auto; flex: 1 1 150px; max-width: 280px; }
.pn-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-removable { display: inline-flex; align-items: center; gap: 2px; }
.tag-removable button { all: unset; cursor: pointer; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); }
.tag-removable button:hover { background: rgba(14, 21, 37, 0.1); color: var(--ink); }
.tag-removable button:focus-visible { outline: 3px solid var(--brand); }
.tag-removable svg { width: 12px; height: 12px; }
.pn-sec h3 { font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin-bottom: 8px; }
.sub { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.sub-title { border-color: transparent !important; min-height: 34px !important; }
.sub-title:hover { border-color: var(--line) !important; }
.sub.is-done .sub-title { color: var(--muted); text-decoration: line-through; }
.inline-form { display: flex; gap: 8px; margin-top: 6px; }
.inline-form input { flex: 1; }
.cm-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.cm-form textarea { min-height: 72px; }
.mention-wrap { position: relative; }
.mention-menu { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); background: var(--surface); border: 1px solid var(--control); border-radius: 12px; box-shadow: var(--shadow-3); padding: 4px; z-index: 5; max-height: 220px; overflow-y: auto; }
.mention-menu button { all: unset; cursor: pointer; display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.mention-menu button:hover, .mention-menu button.sel { background: var(--brand-tint); }
.mention { color: var(--brand); font-weight: 600; background: var(--brand-tint); border-radius: 4px; padding: 0 3px; }
.cm { display: flex; gap: 10px; padding: 8px 0; }
.cm + .cm { border-top: 1px solid var(--line-soft); }
.cm-body { flex: 1; min-width: 0; }
.cm-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cm-meta strong { color: var(--ink); font-weight: 600; }
.cm-text { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; }
.file { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.file a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.file .sz { font-family: var(--mono); font-size: 12px; color: var(--muted); }

/* ---------- dialoguri ---------- */
dialog { border: 1px solid var(--line); border-radius: 18px; padding: 0; width: min(680px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-3); }
dialog::backdrop { background: rgba(14, 21, 37, 0.5); }
dialog[open] { animation: pop 0.22s var(--spring); }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.dlg-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px 6px; }
.dlg-head h2 { font-size: 20px; letter-spacing: -0.03em; flex: 1; }
.dlg-body { padding: 8px 20px 20px; display: flex; flex-direction: column; gap: 16px; overflow-y: auto; max-height: calc(100vh - 110px); }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } }
.row-end { display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches label { position: relative; }
.swatches input { position: absolute; opacity: 0; inset: 0; }
.swatches span { display: block; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--control); }
.swatches input:checked + span { box-shadow: 0 0 0 3px var(--ink); }
.swatches input:focus-visible + span { outline: 3px solid var(--brand); outline-offset: 3px; }
.checks { display: flex; flex-direction: column; gap: 4px; }
.checks label { display: flex; align-items: center; gap: 10px; min-height: 40px; }
.checks input { width: 20px; height: 20px; accent-color: var(--brand); }
.rowitem { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.rowitem:first-child { border-top: 0; }
.rowitem .grow { min-width: 0; }
.rowitem small { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.tag { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--brand); background: var(--brand-tint); border-radius: 6px; padding: 2px 6px; }

.toast {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; display: flex; align-items: center; gap: 14px;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 60; max-width: calc(100vw - 32px);
  transition: transform 0.25s var(--spring), opacity 0.2s linear; box-shadow: var(--shadow-3);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast button { all: unset; cursor: pointer; font-weight: 700; color: #A9BBFF; padding: 6px 4px; }
.toast button:hover { text-decoration: underline; }
.toast button:focus-visible { outline: 3px solid #A9BBFF; }

@media (pointer: coarse) {
  .btn, input[type=text], input[type=email], input[type=search], input[type=date], select { min-height: 44px; }
  .btn.sm { min-height: 44px; }
  .btn.icon, .btn.sm.icon { min-width: 44px; }
  .sb-link { min-height: 44px; }
  .tabs a { min-height: 44px; }
  .link-btn { padding: 12px 6px; }
  .sec-toggle, .lv-add { min-height: 44px; }
  .tag-removable button { width: 32px; height: 32px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- vederea clientului (doar citire) ---------- */
.cl { max-width: 760px; margin: 0 auto; padding: 28px 24px 72px; display: flex; flex-direction: column; gap: 18px; }
.cl-head { display: flex; flex-direction: column; gap: 6px; }
.cl-head .title-xl { display: flex; align-items: center; }
.cl-progress { margin-top: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow-1); }
.cl-progress-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 10px; }
.mono { font-family: var(--mono); }
.cl-track { height: 10px; background: #E6E9EE; border-radius: 5px; overflow: hidden; }
.cl-fill { height: 100%; background: linear-gradient(90deg, #3157F0, var(--brand)); border-radius: 5px; }
.cl-sec .hm-h { padding-top: 0; }
.cl-item { border-bottom: 1px solid var(--line-soft); }
.cl-item:last-child { border-bottom: 0; }
.cl-sum { display: flex; align-items: center; gap: 12px; padding: 12px 4px; list-style: none; flex-wrap: wrap; border-radius: 8px; }
details.cl-item > summary { cursor: pointer; }
details.cl-item > summary::-webkit-details-marker { display: none; }
details.cl-item > summary:hover { background: #F6F7FA; }
details.cl-item > summary:focus-visible { outline: 3px solid var(--brand); outline-offset: -3px; }
.cl-mark { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--control); flex: none; display: grid; place-items: center; color: #fff; }
.cl-mark.on { background: var(--ok); border-color: var(--ok); }
.cl-mark svg { width: 11px; height: 11px; }
.cl-title { flex: 1; min-width: 160px; font-weight: 500; overflow-wrap: anywhere; }
.cl-state { font-size: 12.5px; color: var(--muted); }
.cl-chev { display: grid; color: var(--muted); }
.cl-chev svg { width: 16px; height: 16px; }
details[open] > summary .cl-chev { transform: rotate(180deg); }
.cl-body { padding: 0 8px 14px 36px; display: flex; flex-direction: column; gap: 6px; }
.cl-desc { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14.5px; color: var(--ink-2); }
.cl-foot { text-align: center; font-size: 13px; }
@media (max-width: 899px) { .cl { padding: 18px 14px 56px; } .cl-body { padding-left: 8px; } }
