:root {
  --bg: #f5f5f3;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --text: #1c1c1a;
  --muted: #66665f;
  --faint: #9a9a92;
  --border: #e4e4df;
  --border-strong: #cfcfc8;
  --accent: #0e7c66;
  --accent-hover: #0a6553;
  --accent-weak: #e2f1ec;
  --danger: #c0392b;
  --danger-weak: #fbeae7;
  --warn: #9a6200;
  --warn-weak: #fdf1dc;
  --p1: #c0392b;
  --p2: #c77700;
  --p3: #2f6fd0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 4px 16px rgba(0,0,0,.06);
  --sidebar: 248px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0 0 10px; }
h3 { font-size: 13px; margin: 0 0 8px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
button, input, select, textarea { font: inherit; color: inherit; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.hidden { display: none !important; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 12px; }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--surface-2); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 14px 10px;
}
.brand-mark { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; }
.brand-mark .logo { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 14px; }
.brand-mark .t1 { font-weight: 650; font-size: 14px; }
.brand-mark .t2 { font-size: 10.5px; color: var(--muted); letter-spacing: .06em; }
.nav a, .nav button.navbtn {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; color: var(--text);
  font-weight: 500; text-decoration: none; width: 100%; border: 0; background: none; cursor: pointer; text-align: left;
}
.nav a:hover, .nav button.navbtn:hover { background: #ececE8; }
.nav a.active { background: var(--accent-weak); color: var(--accent-hover); }
.ico { width: 15px; height: 15px; flex: none; vertical-align: -3px; }
.nav .ico { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav .count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 500; }
.nav .count.alert { color: var(--danger); }
.nav .dot { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); }
.nav-section { margin: 18px 10px 6px; font-size: 11px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; }
.sidebar-foot { margin-top: auto; padding: 12px 10px 4px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; }
.sidebar-foot .who { font-size: 13px; font-weight: 550; line-height: 1.2; }
.sidebar-foot .role { font-size: 11.5px; color: var(--muted); }

.main-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 24px; background: rgba(245,245,243,.92); backdrop-filter: blur(8px); border-bottom: 1px solid transparent;
}
.topbar .menu-btn { display: none; }
.topbar .crumb { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
main { padding: 8px 24px 80px; max-width: 1180px; width: 100%; }
.page-head { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin: 6px 0 18px; }
.page-head .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 550; white-space: nowrap; text-decoration: none !important; color: var(--text);
}
.btn:hover { background: #f0f0ec; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: #ecece8; }
.btn.sm { height: 28px; padding: 0 9px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; display: grid; place-items: center; cursor: pointer; color: var(--muted); flex: none; }
.icon-btn:hover { background: #ecece8; color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field > span, .label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--faint); font-weight: 400; }
.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface);
}
textarea.input { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; line-height: 1.45; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-weak); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 420px; }
.search input { padding-left: 32px; }
.search svg { position: absolute; left: 10px; top: 10px; color: var(--faint); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 550; font-size: 13px; }
.chip.on { background: var(--text); border-color: var(--text); color: #fff; }
.checkchip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 600; font-size: 13px; user-select: none; }
.checkchip input { accent-color: var(--accent); margin: 0; }
.checkchip:has(input:checked) { border-color: var(--accent); background: var(--accent-weak); color: var(--accent-hover); }

.seg { display: inline-flex; background: #ebebe6; border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; height: 28px; padding: 0 12px; border-radius: 7px; cursor: pointer; font-weight: 550; color: var(--muted); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------- pills / badges ---------- */
.pill { display: inline-flex; align-items: center; height: 17px; padding: 0 5px; border-radius: 4px; font-size: 9.5px; font-weight: 600; letter-spacing: .04em; border: 1px solid var(--border); color: var(--faint); background: transparent; white-space: nowrap; vertical-align: 1px; }
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eeeeea; color: var(--muted); white-space: nowrap; }
.badge.accent { background: var(--accent-weak); color: var(--accent-hover); }
.badge.warn { background: var(--warn-weak); color: var(--warn); }
.badge.danger { background: var(--danger-weak); color: var(--danger); }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: #dfe7e4; color: #2b4a42; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: none; }
.avatar.lg { width: 30px; height: 30px; font-size: 12px; }
.avatar.empty { background: transparent; border: 1.5px dashed var(--border-strong); color: var(--faint); }

/* ---------- cards / sections ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.card.pad { padding: 16px; }
.section { margin-bottom: 26px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; margin: 0 0 6px; padding: 0 2px; }
.section-title .n { color: var(--faint); font-weight: 500; }
.section-title.overdue { color: var(--danger); }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }
.empty .big { font-size: 15px; color: var(--text); font-weight: 600; margin-bottom: 4px; }
.banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--warn-weak); color: #5c3b00; margin-bottom: 16px; font-size: 13.5px; }
.banner.info { background: var(--accent-weak); color: #0b4d40; }
.banner a { color: inherit; text-decoration: underline; font-weight: 600; }

/* ---------- task rows ---------- */
.task-list { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.task-row { display: flex; align-items: flex-start; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); cursor: pointer; }
.task-row:first-child { border-top: 0; }
.task-row:hover { background: var(--surface-2); }
.check { width: 19px; height: 19px; border-radius: 50%; border: 1.75px solid var(--border-strong); background: var(--surface); flex: none; margin-top: 1px; cursor: pointer; display: grid; place-items: center; padding: 0; }
.check:hover { background: var(--accent-weak); border-color: var(--accent); }
.check.p1 { border-color: var(--p1); background: #fdf0ee; }
.check.p2 { border-color: var(--p2); background: #fdf5e8; }
.check.p3 { border-color: var(--p3); background: #eef4fd; }
.check.done { background: var(--accent); border-color: var(--accent); }
.check svg { opacity: 0; color: #fff; }
.check:hover svg, .check.done svg { opacity: 1; }
.check:hover svg { color: var(--accent); }
.check.done:hover svg { color: #fff; }
.task-main { flex: 1; min-width: 0; }
.task-title { font-weight: 500; overflow-wrap: anywhere; }
.task-row.is-done .task-title { color: var(--muted); text-decoration: line-through; }
.task-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.task-meta span { display: inline-flex; align-items: center; gap: 4px; }
.due-overdue { color: var(--danger) !important; font-weight: 600; }
.due-today { color: var(--accent) !important; font-weight: 600; }
.flag { font-weight: 700; font-size: 11.5px; }
.flag.p1 { color: var(--p1); } .flag.p2 { color: var(--p2); } .flag.p3 { color: var(--p3); }
.add-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border); color: var(--muted); cursor: pointer; background: none; border-left: 0; border-right: 0; border-bottom: 0; width: 100%; text-align: left; font-weight: 500; }
.add-row:hover { color: var(--accent); background: var(--surface-2); }

/* ---------- board ---------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 4px; }
.board.four { grid-template-columns: repeat(4, minmax(200px, 1fr)); }
.pcard .pc-top { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-bottom: 3px; }
.pcard .pc-top .code { margin-right: 4px; font-size: 11.5px; }
.col-done { background: transparent; border: 1.5px dashed var(--border-strong); }
.done-hint { font-size: 12.5px; color: var(--muted); padding: 6px 4px; line-height: 1.4; }
.seg.pstatus button { font-size: 12px; letter-spacing: .03em; }
.seg.pstatus button.on[data-s=done] { color: var(--muted); }
.col { background: #ededE9; border-radius: 12px; padding: 10px; min-height: 120px; }
.col.drop { outline: 2px dashed var(--accent); outline-offset: -2px; background: var(--accent-weak); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-weight: 650; }
.col-head .n { color: var(--muted); font-weight: 500; }
.cards { display: flex; flex-direction: column; gap: 8px; min-height: 20px; }
.tcard { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; box-shadow: 0 1px 1px rgba(0,0,0,.03); }
.tcard:hover { border-color: var(--border-strong); }
.tcard.dragging { opacity: .45; }
.tcard .tt { font-weight: 550; overflow-wrap: anywhere; }
.tcard .tm { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.tcard .tm .avatar { margin-left: auto; }
.tcard .card-status { display: none; margin-top: 8px; }
.tcard .card-status select { height: 30px; font-size: 13px; }
.col .add-row { border: 0; border-radius: 8px; margin-top: 6px; padding: 8px 6px; background: transparent; }
.col .add-row:hover { background: rgba(255,255,255,.6); }
.drop-marker { height: 3px; border-radius: 2px; background: var(--accent); margin: -2px 0; }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 9px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.table tr:first-child td { border-top: 0; }
.table tbody tr.click { cursor: pointer; }
.table tbody tr.click:hover td { background: var(--surface-2); }
.table .actions { text-align: right; white-space: nowrap; }
.code { font-family: var(--mono); font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.cell-title { font-weight: 550; }

/* ---------- project head ---------- */
.proj-head { margin: 4px 0 16px; }
.proj-head .code { font-size: 13px; }
.proj-head h1 { margin: 2px 0 8px; }
.proj-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); font-size: 13px; align-items: center; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; align-items: flex-end; flex-wrap: wrap; }
.tabs button, .tabs a { border: 0; background: none; padding: 9px 12px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.tabs .on { color: var(--text); border-bottom-color: var(--accent); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters select { width: auto; min-width: 150px; }

/* ---------- dates editor ---------- */
.dates-ed { display: flex; flex-direction: column; gap: 8px; }
.date-row { display: grid; grid-template-columns: 1.3fr 1fr 1fr .7fr .7fr auto; gap: 6px; align-items: center; }
.date-row.amb .input { border-color: var(--warn); background: #fffaf0; }
.date-row-head { display: grid; grid-template-columns: 1.3fr 1fr 1fr .7fr .7fr 34px; gap: 6px; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.date-list { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.form-section { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 16px; }
.form-section:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.private-box { border: 1px dashed #c9b88f; background: #fffcf4; border-radius: var(--radius); padding: 14px; }
.private-box .label-lock { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--warn); margin-bottom: 10px; }

/* ---------- panel & modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(20,20,18,.28); z-index: 40; animation: fade .12s ease; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); z-index: 41; box-shadow: -8px 0 32px rgba(0,0,0,.12); display: flex; flex-direction: column; animation: slide .16s ease; }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.panel-body { flex: 1; overflow-y: auto; padding: 18px 20px 40px; }
.title-input { width: 100%; border: 0; font-size: 19px; font-weight: 650; padding: 4px 6px; margin: 0 -6px; border-radius: 6px; resize: none; background: transparent; line-height: 1.3; }
.title-input:hover { background: var(--surface-2); }
.title-input:focus { outline: none; background: var(--surface-2); box-shadow: 0 0 0 2px var(--accent-weak); }
.props { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; align-items: center; margin: 14px 0 20px; }
.props .label { font-weight: 550; }
.cl-item { display: flex; align-items: center; gap: 10px; padding: 5px 0; }
.cl-item input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--accent); flex: none; }
.cl-item.done span { text-decoration: line-through; color: var(--muted); }
.cl-item span { flex: 1; overflow-wrap: anywhere; }
.cl-item .icon-btn { width: 26px; height: 26px; opacity: 0; }
.cl-item:hover .icon-btn { opacity: 1; }
.progress { height: 4px; background: #ebebe6; border-radius: 2px; overflow: hidden; margin: 2px 0 8px; }
.progress > i { display: block; height: 100%; background: var(--accent); }
.comment { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); }
.comment:first-child { border-top: 0; }
.comment .body { white-space: pre-wrap; overflow-wrap: anywhere; }
.comment .when { font-size: 12px; color: var(--faint); }
.link-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.link-item a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }

.modal-wrap { position: fixed; inset: 0; z-index: 50; display: grid; place-items: start center; padding: 8vh 16px 16px; overflow-y: auto; background: rgba(20,20,18,.32); animation: fade .12s ease; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); width: min(560px, 100%); animation: pop .14s ease; }
.modal.wide { width: min(820px, 100%); }
.modal-head { display: flex; align-items: center; padding: 14px 18px 0; }
.modal-head h2 { margin: 0; font-size: 16px; }
.modal-body { padding: 16px 18px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 12px 18px 16px; border-top: 1px solid var(--border); }
.error-msg { color: var(--danger); font-size: 13px; font-weight: 550; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: #1f1f1d; color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 550; opacity: 0; pointer-events: none; transition: all .18s ease; z-index: 60; display: flex; gap: 12px; align-items: center; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto; }
#toast button { background: none; border: 0; color: #7fe0c8; font-weight: 700; cursor: pointer; }

@keyframes fade { from { opacity: 0 } }
@keyframes slide { from { transform: translateX(24px); opacity: .4 } }
@keyframes pop { from { transform: scale(.98); opacity: 0 } }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth .card { width: min(400px, 100%); padding: 28px; }
.auth h1 { font-size: 20px; margin-bottom: 4px; }
.auth .sub { color: var(--muted); margin-bottom: 20px; }

/* ---------- availability ---------- */
.avail { display: flex; flex-direction: column; gap: 6px; }
.avail-row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; align-items: center; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.avail-row.now { border-color: var(--accent); background: var(--accent-weak); }
.kv { margin: 0; display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.email-msg { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--surface-2); }
.email-msg pre { white-space: pre-wrap; font: inherit; margin: 8px 0 0; max-height: 260px; overflow-y: auto; font-size: 13px; }
.copybox { display: flex; gap: 6px; }
.copybox input { font-family: var(--mono); font-size: 12px; }

/* ---------- touch / mobile ---------- */
@media (hover: none) {
  .tcard .card-status { display: block; }
  .cl-item .icon-btn { opacity: 1; }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 45; transform: translateX(-100%); transition: transform .18s ease; box-shadow: 8px 0 32px rgba(0,0,0,.14); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open .nav-scrim { display: block; }
  .nav-scrim { display: none; position: fixed; inset: 0; z-index: 44; background: rgba(20,20,18,.28); }
  .topbar { padding: 8px 12px; }
  .topbar .menu-btn { display: grid; }
  main { padding: 4px 16px 90px; }
  .board, .board.four { grid-template-columns: 1fr; }
  .proj-head .seg.pstatus { width: 100%; }
  .proj-head .seg.pstatus button { flex: 1; padding: 0 4px; }
  .tcard .card-status { display: block; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .panel { width: 100vw; animation: none; }
  .panel-body { padding: 16px; }
  .props { grid-template-columns: 96px 1fr; }
  .date-row-head { display: none; }
  .date-row { grid-template-columns: 1fr 1fr; padding: 8px; border: 1px solid var(--border); border-radius: 8px; }
  .date-row .label-in { grid-column: 1 / -1; }
  .date-row .rm { grid-column: 2; justify-self: end; }
  .modal-wrap { padding: 0; place-items: stretch; }
  .modal, .modal.wide { width: 100%; min-height: 100%; border-radius: 0; }
  .kv { grid-template-columns: 1fr; gap: 0 0; }
  .kv dd { margin-bottom: 8px; }
  .avail-row { grid-template-columns: 1fr; gap: 2px; }
  .search { max-width: none; }
  /* tabelas tornam-se listas */
  .table.resp, .table.resp tbody, .table.resp tr, .table.resp td { display: block; width: 100%; }
  .table.resp thead { display: none; }
  .table.resp tr { border-top: 1px solid var(--border); padding: 10px 14px; }
  .table.resp tr:first-child { border-top: 0; }
  .table.resp td { border: 0; padding: 2px 0; }
  .table.resp td[data-l]:not(:empty)::before { content: attr(data-l) " · "; color: var(--faint); font-size: 12px; }
  .table.resp td.actions { text-align: left; padding-top: 8px; }
  .hide-m { display: none !important; }
}

/* =====================================================================
   Tema "digital" — destaque #0000DD, menu escuro, quadros ao estilo
   kanban (fundo de cor, colunas claras, cartões brancos com sombra).
   ===================================================================== */
:root {
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-2: #f8f9fc;
  --text: #0b0b1a;
  --muted: #565a70;
  --faint: #9295a8;
  --border: #e3e4ec;
  --border-strong: #cbcdd9;
  --accent: #0000dd;
  --accent-hover: #0000b0;
  --accent-weak: #ebebff;
  --ink: #0a0a1f;
  --ink-2: #15153a;
  --ink-text: #c6c8e0;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(10,10,40,.06), 0 8px 24px rgba(10,10,40,.08);
  --card-shadow: 0 1px 0 rgba(10,10,40,.16), 0 1px 3px rgba(10,10,40,.06);
}
body {
  background-color: var(--bg);
  background-image: radial-gradient(rgba(10,10,60,.07) 1px, transparent 1px);
  background-size: 18px 18px;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: #c9c9ff; }

/* menu lateral escuro */
.sidebar { background: var(--ink); border-right: 0; color: var(--ink-text); }
.brand-mark .logo { background: var(--accent); border-radius: 7px; font-family: var(--mono); font-size: 12px; letter-spacing: -.02em; box-shadow: 0 0 0 3px rgba(0,0,221,.25); }
.brand-mark .t1 { color: #fff; letter-spacing: -.01em; }
.brand-mark .t2 { color: #7f82a3; font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; }
.nav a, .nav button.navbtn { color: var(--ink-text); border-radius: 7px; }
.nav a:hover, .nav button.navbtn:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(0,0,221,.45); }
.nav a.active .count { color: #d8d8ff; }
.nav .count { color: #7f82a3; font-family: var(--mono); font-size: 11.5px; }
.nav .count.alert { color: #ff8f86; }
.nav-section { color: #63668a; font-family: var(--mono); font-size: 10px; letter-spacing: .12em; }
.sidebar-foot { border-top-color: rgba(255,255,255,.08); }
.sidebar-foot .who { color: #fff; }
.sidebar-foot .role { color: #7f82a3; }
.sidebar-foot .icon-btn { color: #7f82a3; }
.sidebar-foot .icon-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar .avatar { background: var(--ink-2); color: #b9bbff; }

/* topo e títulos */
.topbar { background: rgba(243,244,248,.85); border-bottom: 1px solid var(--border); }
h1 { font-size: 26px; font-weight: 760; letter-spacing: -.025em; }
.page-head h1::before { content: "//\00a0"; color: var(--accent); font-family: var(--mono); font-weight: 600; font-size: .7em; vertical-align: .12em; }
.page-head .sub, .proj-head .proj-meta { font-size: 13px; }
h2 { font-weight: 700; letter-spacing: -.01em; }
h3, .section-title { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; }
.section-title { color: var(--muted); }
.section-title.overdue { color: var(--danger); }
.eyebrow { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.code { font-family: var(--mono); color: var(--accent); font-weight: 600; }

/* botões, campos e segmentos */
.btn { border-radius: 7px; border-color: var(--border-strong); font-weight: 600; }
.btn.primary { background: var(--accent); border-color: var(--accent); box-shadow: 0 2px 8px rgba(0,0,221,.28); }
.btn.primary:hover { background: var(--accent-hover); }
.input, select.input, textarea.input { border-radius: 7px; border-color: var(--border-strong); }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,0,221,.15); }
.seg { background: #e6e7ef; border-radius: 8px; }
.seg button { border-radius: 6px; }
.seg button.on { color: var(--accent); box-shadow: 0 1px 3px rgba(10,10,40,.14); }
.chip.on { background: var(--accent); border-color: var(--accent); }
.checkchip:has(input:checked) { border-color: var(--accent); background: var(--accent-weak); color: var(--accent); }

/* etiquetas */
.badge { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase; border-radius: 5px; height: 21px; }
.badge.accent { background: var(--accent-weak); color: var(--accent); }
.kind { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 5px; font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.kind-ferias { background: var(--accent-weak); color: var(--accent); }
.kind-folga { background: #e4f6ec; color: #0a7040; }
.avatar { background: var(--accent-weak); color: var(--accent); }

/* cartões e listas */
.card, .task-list, .table { border-color: var(--border); box-shadow: 0 1px 2px rgba(10,10,40,.04); }
.task-row:hover, .table tbody tr.click:hover td { background: #f6f6ff; }
.table th { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); background: var(--surface-2); }

/* quadros ao estilo kanban */
.board {
  background: linear-gradient(135deg, #0000dd 0%, #1f1ff0 50%, #4b4bff 100%);
  padding: 14px; border-radius: 14px; gap: 12px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 10px 30px rgba(0,0,221,.18);
}
.col { background: #f1f2f7; border-radius: 12px; padding: 8px; box-shadow: 0 1px 0 rgba(10,10,40,.2); }
.col.drop { outline: 2px dashed #fff; outline-offset: -3px; background: #e3e4ff; }
.col-head { font-family: var(--mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 6px 10px; }
.col-head .n { font-family: var(--mono); background: #e2e3ee; color: var(--muted); border-radius: 10px; padding: 0 7px; font-size: 10.5px; letter-spacing: 0; }
.tcard { border: 0; border-radius: 9px; box-shadow: var(--card-shadow); padding: 10px 12px; transition: box-shadow .12s ease, transform .12s ease; }
.tcard:hover { box-shadow: 0 0 0 2px var(--accent), var(--card-shadow); }
.tcard.dragging { transform: rotate(2deg); }
.col .add-row { color: var(--muted); border-radius: 8px; }
.col .add-row:hover { background: #e2e3ee; color: var(--text); }
.col-done { background: rgba(255,255,255,.12); border: 1.5px dashed rgba(255,255,255,.55); box-shadow: none; }
.col-done .col-head, .col-done .done-hint, .col-done .add-row { color: #fff; }
.col-done .add-row:hover { background: rgba(255,255,255,.15); color: #fff; }
.drop-marker { background: var(--accent); height: 4px; }

/* painel, modais, avisos */
.modal { border-radius: 14px; box-shadow: 0 20px 60px rgba(10,10,40,.28); }
.banner.info { background: var(--accent-weak); color: #10107a; }
#toast { background: var(--ink); box-shadow: 0 10px 30px rgba(10,10,40,.3); }
#toast button { color: #a8a9ff; }
.private-box { border-color: #c5c5f0; background: #f7f7ff; }
.private-box .label-lock { color: var(--accent); font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; }

/* páginas de entrada */
.auth { background: linear-gradient(135deg, #0000dd 0%, #2525f2 55%, #5b5bff 100%); }
.auth .card { box-shadow: 0 30px 80px rgba(0,0,60,.35); border: 0; border-radius: 16px; }

/* férias e folgas */
.leave-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.balance { display: grid; grid-template-columns: minmax(200px, 260px) 1fr; gap: 24px; padding: 20px 22px; margin-bottom: 28px; align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f6f6ff 100%); border-color: #dcdcf5; }
.bal-big { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; }
.bal-big span { font-family: var(--mono); font-size: 48px; font-weight: 700; letter-spacing: -.04em; color: var(--accent); line-height: 1; }
.bal-big small { font-family: var(--mono); color: var(--muted); font-size: 13px; }
.bal-side { display: flex; flex-direction: column; gap: 10px; }
.bal-bar { height: 12px; border-radius: 6px; background: #e6e7f2; overflow: hidden; display: flex; }
.bal-bar i { display: block; height: 100%; }
.bal-bar i.u { background: var(--accent); }
.bal-bar i.p { background: repeating-linear-gradient(-45deg, #7d7dff 0 6px, #a9a9ff 6px 12px); }
.bal-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.bal-legend b { font-family: var(--mono); color: var(--text); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: 0; }
.dot.u { background: var(--accent); } .dot.p { background: #8d8dff; } .dot.a { background: #e6e7f2; border: 1px solid var(--border-strong); }
.count-box { border: 1px dashed #b7b7f5; background: #f7f7ff; border-radius: 9px; padding: 10px 12px; font-size: 13px; }
.count-n { font-size: 14px; margin-bottom: 2px; }
.count-n b { font-family: var(--mono); font-size: 20px; color: var(--accent); }
.avail-row.now { border-color: var(--accent); background: var(--accent-weak); }

@media (max-width: 860px) {
  .board { padding: 10px; border-radius: 12px; }
  .balance { grid-template-columns: 1fr; gap: 14px; }
  .page-head h1::before { font-size: .65em; }
}

.seg button { white-space: nowrap; }
#per { align-self: flex-start; }
