/* Lab Tarefas — visual na identidade da Lab (preto profundo, verde-limão, Articulat) */
@font-face { font-family: "Articulat"; src: url("fonts/articulat-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Articulat"; src: url("fonts/articulat-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #070a08;
  --side: #0b0f0c;
  --panel: #0e130f;
  --card: #121812;
  --card-2: #171e17;
  --hover: rgba(255,255,255,.045);
  --line: rgba(255,255,255,.09);
  --line-2: rgba(255,255,255,.14);
  --text: #eef7f1;
  --muted: #93a89c;
  --dim: #6f8478;
  --accent: #abff13;
  --accent-soft: #d9ffa0;
  --accent-text: #abff13;
  --ink: #0a1102;
  --danger: #ff5c6c;
  --warn: #fdab3d;
  --shadow: 0 18px 50px rgba(0,0,0,.55);
  --row: 38px;
  --radius: 10px;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --bg: #f4f6f3;
  --side: #ffffff;
  --panel: #ffffff;
  --card: #ffffff;
  --card-2: #f1f4f0;
  --hover: rgba(0,0,0,.035);
  --line: rgba(10,17,2,.10);
  --line-2: rgba(10,17,2,.16);
  --text: #101410;
  --muted: #56645b;
  --dim: #7b887f;
  --accent-text: #3f6b00;
  --shadow: 0 18px 50px rgba(10,17,2,.16);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 14px/1.45 "Articulat", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
kbd { font: inherit; font-size: 11px; padding: 1px 6px; border: 1px solid var(--line-2); border-radius: 5px; color: var(--dim); }

/* ---------- botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); color: var(--text);
  font-weight: 400; white-space: nowrap; transition: background .15s, border-color .15s;
}
.btn:hover { background: var(--card-2); border-color: var(--line-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 700; }
.btn-primary:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-danger { color: var(--danger); }
.btn-sm { height: 28px; padding: 0 10px; font-size: 13px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 7px;
  border: 0; background: transparent; color: var(--muted);
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=number],
input[type=date], input[type=time], input[type=url], input:not([type]), select, textarea {
  width: 100%; height: 36px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--bg); outline: none;
}
textarea { height: auto; min-height: 120px; padding: 10px 11px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus, [contenteditable]:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(171,255,19,.15); }
label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.muted { color: var(--muted); }
.dim { color: var(--dim); }

/* ---------- telas de entrada ---------- */
body.auth { display: grid; place-items: center; min-height: 100vh; padding: 24px;
  background: radial-gradient(900px 500px at 85% -10%, rgba(171,255,19,.07), transparent 60%), var(--bg); }
.auth-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 32px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-size: 15px; margin-bottom: 28px; }
.auth-card h1 { font-size: 30px; font-weight: 400; letter-spacing: -.02em; margin: 0 0 6px; }
.auth-intro { color: var(--muted); margin: 0 0 22px; }
.auth-form { display: grid; gap: 14px; }
.auth-form .btn { height: 42px; justify-content: center; margin-top: 4px; }
.auth-alt { color: var(--dim); font-size: 13px; margin: 18px 0 0; }
.auth-msg { padding: 10px 12px; border-radius: 8px; font-size: 13px; margin: 0 0 16px; }
.auth-error { background: rgba(255,92,108,.12); color: #ffb3bb; }
.auth-ok { background: rgba(171,255,19,.12); color: var(--accent-text); }
.lab-symbol { fill: var(--accent); flex: none; }

/* ---------- estrutura ---------- */
.shell { display: grid; grid-template-columns: 252px 1fr; height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side-top { display: flex; align-items: center; justify-content: space-between; padding: 16px 14px 10px 16px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 15px; }
.side-close { display: none; }
.side-main { display: grid; gap: 1px; padding: 4px 8px 8px; }
.side-main a, .side-main button, .side-foot a {
  display: flex; align-items: center; gap: 9px; height: 34px; padding: 0 10px; border-radius: 8px;
  text-decoration: none; color: var(--muted); border: 0; background: none; text-align: left; width: 100%;
}
.side-main a:hover, .side-main button:hover, .side-foot a:hover { background: var(--hover); color: var(--text); }
.side-main a.on, .side-foot a.on { background: var(--card-2); color: var(--text); }
.side-main kbd { margin-left: auto; }
.ico { width: 18px; text-align: center; opacity: .8; }
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--ink); font-size: 11px; display: grid; place-items: center; }
.side-filter { padding: 6px 12px 8px; border-top: 1px solid var(--line); }
.side-filter input { height: 30px; font-size: 13px; }
.side-tree { flex: 1; overflow: auto; padding: 0 8px 12px; min-height: 0; }
.side-foot { border-top: 1px solid var(--line); padding: 8px; display: grid; gap: 1px; }
.ws { margin-top: 6px; }
.ws-head, .fd-head {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 8px; border-radius: 7px;
  color: var(--dim); font-size: 12px; letter-spacing: .02em; text-transform: uppercase; cursor: pointer; user-select: none;
}
.fd-head { text-transform: none; letter-spacing: 0; font-size: 13px; color: var(--muted); padding-left: 14px; }
.ws-head:hover, .fd-head:hover { background: var(--hover); color: var(--text); }
.ws-head .car, .fd-head .car { width: 12px; transition: transform .15s; font-size: 10px; }
.ws.closed > .ws-head .car, .fd.closed > .fd-head .car { transform: rotate(-90deg); }
.ws.closed > .ws-body, .fd.closed > .fd-body { display: none; }
.ws-head .add { margin-left: auto; opacity: 0; }
.ws-head:hover .add { opacity: 1; }
.bd {
  display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 8px 0 22px; border-radius: 7px;
  text-decoration: none; color: var(--muted); font-size: 13.5px;
}
.fd-body .bd { padding-left: 32px; }
.bd:hover { background: var(--hover); color: var(--text); }
.bd.on { background: var(--card-2); color: var(--text); box-shadow: inset 2px 0 0 var(--accent); }
.bd span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.bd small { color: var(--dim); font-size: 11px; }
.main { min-width: 0; min-height: 0; overflow: auto; position: relative; }
.loading, .empty-state { padding: 60px 32px; color: var(--muted); text-align: center; }
/* Setinhas desenhadas em CSS (a fonte da Lab não tem o caractere ▾) */
.car { display: inline-grid; place-items: center; }
.car::before { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }

/* ---------- cabeçalho de páginas ---------- */
.page { padding: 26px 32px 60px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { font-size: 30px; font-weight: 400; letter-spacing: -.02em; margin: 0; }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.menu-btn { display: none; }

/* ---------- quadro ---------- */
.board-head { position: sticky; left: 0; padding: 20px 28px 0; background: var(--bg); z-index: 30; }
.board-title { display: flex; align-items: center; gap: 10px; }
.board-title h1 { font-size: 26px; font-weight: 400; letter-spacing: -.02em; margin: 0; padding: 2px 6px; margin-left: -6px; border-radius: 6px; outline: none; }
.board-title h1[contenteditable=true]:hover { background: var(--hover); }
.board-desc { color: var(--muted); margin: 2px 0 0; font-size: 13px; }
.tabs { display: flex; gap: 2px; margin-top: 14px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 12px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 13.5px; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-color: var(--accent); }
.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 0; flex-wrap: wrap; }
.toolbar .search { width: 210px; height: 32px; font-size: 13px; }
.toolbar .sep { flex: 1; }
.chip-btn { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--card); color: var(--muted); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.chip-btn:hover { color: var(--text); }
.chip-btn.on { border-color: var(--accent); color: var(--text); }
.chip-btn .n { background: var(--accent); color: var(--ink); border-radius: 10px; padding: 0 6px; font-size: 11px; font-weight: 700; }

.table-wrap { padding: 4px 28px 120px; }
.grp { margin-top: 18px; }
.grp-head { display: flex; align-items: center; gap: 8px; height: 34px; position: sticky; left: 28px; width: max-content; }
.grp-head .car { color: var(--g); font-size: 12px; width: 18px; transition: transform .15s; border: 0; background: none; padding: 0; }
.grp.collapsed .grp-head .car { transform: rotate(-90deg); }
.grp-title { color: var(--g); font-size: 17px; font-weight: 400; letter-spacing: -.01em; padding: 2px 6px; border-radius: 6px; outline: none; }
.grp-title[contenteditable=true]:hover { background: var(--hover); }
.grp-count { color: var(--dim); font-size: 12.5px; }
.grp-head .icon-btn { opacity: 0; }
.grp-head:hover .icon-btn { opacity: 1; }
.grp.collapsed .rows, .grp.collapsed .add-row, .grp.collapsed .sum-row { display: none; }

.trow { display: flex; min-height: var(--row); width: max-content; min-width: 100%; }
.thead { position: sticky; top: 0; z-index: 20; }
.thead .cell { background: var(--bg); color: var(--muted); font-size: 12.5px; justify-content: center; border-top: 1px solid var(--line); position: relative; }
.thead .cell.name { justify-content: flex-start; }
.thead .cell .ctitle { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.thead .cell:hover .cmenu { opacity: 1; }
.cmenu { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); opacity: 0; width: 22px; height: 22px; }
.resize { position: absolute; right: -3px; top: 0; bottom: 0; width: 6px; cursor: col-resize; z-index: 2; }
.resize:hover { background: var(--accent); opacity: .5; }
.cell {
  flex: none; display: flex; align-items: center; min-height: var(--row); padding: 0 8px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--panel);
  overflow: hidden; position: relative; font-size: 13.5px;
}
.cell.name {
  position: sticky; left: 0; z-index: 10; gap: 6px; padding-left: 0;
  border-left: 4px solid var(--g); box-shadow: 1px 0 0 var(--line);
}
.thead .cell.name { z-index: 21; border-left-color: var(--g); }
.cell.pick { width: 34px; justify-content: center; padding: 0; }
.cell.add-col { width: 44px; justify-content: center; padding: 0; border-right: 0; background: transparent; }
.rows .trow:hover .cell { background: var(--card); }
.rows .trow.sel .cell { background: rgba(171,255,19,.06); }
.rows .trow.drag-over-top .cell { box-shadow: inset 0 2px 0 var(--accent); }
.rows .trow.drag-over-bottom .cell { box-shadow: inset 0 -2px 0 var(--accent); }
.drag { cursor: grab; color: var(--dim); opacity: 0; width: 14px; text-align: center; flex: none; user-select: none; }
.trow:hover .drag { opacity: 1; }
.iname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 4px 4px; border-radius: 5px; cursor: text; outline: none; }
.iname:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.iname[contenteditable=true] { white-space: normal; box-shadow: inset 0 0 0 1px var(--accent); background: var(--bg); }
.sub-tog { width: 22px; height: 22px; border: 0; background: none; color: var(--dim); font-size: 11px; flex: none; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; gap: 1px; }
.sub-tog:hover { background: var(--hover); color: var(--text); }
.sub-tog.empty { opacity: 0; }
.trow:hover .sub-tog.empty { opacity: .6; }
.sub-tog b { font-weight: 400; font-size: 10.5px; }
.open-btn { flex: none; height: 24px; padding: 0 7px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--dim); font-size: 12px; display: inline-flex; align-items: center; gap: 4px; }
.open-btn:hover { border-color: var(--line-2); color: var(--text); }
.open-btn.has { color: var(--accent-text); }
.trow:not(:hover) .open-btn:not(.has) { opacity: 0; }

.subrows .cell { background: var(--bg); }
.subrows .cell.name { padding-left: 34px; border-left-color: color-mix(in srgb, var(--g) 45%, transparent); }
.subrows .thead-sub .cell { background: var(--bg); color: var(--dim); font-size: 12px; min-height: 30px; justify-content: center; }
.subrows .thead-sub .cell.name { justify-content: flex-start; }
.subrows .add-row .cell.name { padding-left: 34px; }

.add-row .cell { background: transparent; }
.add-row .cell.name { background: var(--panel); }
.add-input { border: 0 !important; background: transparent !important; box-shadow: none !important; height: 30px !important; padding: 0 6px !important; color: var(--muted); }
.add-input:focus { color: var(--text); }
.sum-row .cell { background: transparent; border-right-color: transparent; border-bottom: 0; }
.sum-row .cell.name { background: transparent; box-shadow: none; border-left-color: transparent; }
.battery { display: flex; width: 100%; height: 20px; border-radius: 4px; overflow: hidden; background: var(--card-2); }
.battery i { display: block; height: 100%; }

/* valores nas células */
.v-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; width: 100%; cursor: text; min-height: 22px; line-height: 22px; }
.v-center { width: 100%; text-align: center; }
.cell.clk { cursor: pointer; }
.cell.ro { color: var(--muted); }
.cell.status-cell { padding: 0; }
.status {
  width: 100%; height: 100%; min-height: var(--row); display: grid; place-items: center; padding: 0 6px;
  color: #fff; font-size: 13px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  position: relative;
}
.status.empty { background: transparent; color: var(--dim); }
.subrows .status { min-height: var(--row); }
.status .fold { position: absolute; top: 0; right: 0; border: 6px solid transparent; border-top-color: rgba(0,0,0,.25); border-right-color: rgba(0,0,0,.25); opacity: 0; }
.cell.status-cell:hover .fold { opacity: 1; }
.pills { display: flex; gap: 4px; overflow: hidden; width: 100%; justify-content: center; }
.pill { padding: 1px 8px; border-radius: 10px; background: var(--card-2); border: 1px solid var(--line-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 140px; }
.avs { display: flex; justify-content: center; width: 100%; }
.av {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 10.5px; font-weight: 700;
  color: #0a1102; border: 2px solid var(--panel); margin-left: -7px; flex: none;
}
.av:first-child { margin-left: 0; }
.av.more { background: var(--card-2); color: var(--muted); }
.av-empty { width: 26px; height: 26px; border-radius: 50%; border: 1px dashed var(--line-2); color: var(--dim); display: grid; place-items: center; font-size: 13px; }
.date { width: 100%; text-align: center; }
.date.late { color: var(--danger); }
.date.today { color: var(--accent-text); }
.date .ok { color: var(--accent-text); margin-right: 4px; }
.chk { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid var(--line-2); display: grid; place-items: center; margin: auto; font-size: 12px; color: var(--ink); }
.chk.on { background: var(--accent); border-color: var(--accent); }
.tl { width: 100%; height: 22px; border-radius: 11px; background: var(--card-2); display: grid; place-items: center; font-size: 12px; position: relative; overflow: hidden; }
.tl i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(171,255,19,.28); }
.tl span { position: relative; }
.files { display: flex; gap: 4px; justify-content: center; width: 100%; align-items: center; }
.fthumb { width: 26px; height: 26px; border-radius: 5px; background: var(--card-2) center/cover; border: 1px solid var(--line-2); display: grid; place-items: center; font-size: 9px; color: var(--muted); text-transform: uppercase; overflow: hidden; }
.prog { width: 100%; display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.prog .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--card-2); overflow: hidden; }
.prog .bar i { display: block; height: 100%; background: var(--accent); }
.link-v { color: var(--accent-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-v:hover { text-decoration: underline; }
.cell-input { width: 100%; height: 28px !important; padding: 0 6px !important; border-radius: 5px !important; }

/* barra de seleção */
.selbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60;
  display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-radius: 12px;
  background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.selbar b { color: var(--accent-text); }

/* ---------- popovers e menus ---------- */
.pop {
  position: fixed; z-index: 90; min-width: 200px; max-width: 340px; max-height: min(460px, 70vh); overflow: auto;
  background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; box-shadow: var(--shadow); padding: 8px;
}
.pop .search { height: 32px; margin-bottom: 6px; font-size: 13px; }
.opt {
  display: flex; align-items: center; gap: 8px; width: 100%; min-height: 32px; padding: 4px 8px; border-radius: 7px;
  border: 0; background: none; text-align: left; color: var(--text); font-size: 13.5px;
}
.opt:hover, .opt.hl { background: var(--hover); }
.opt.on { box-shadow: inset 0 0 0 1px var(--accent); }
.opt .sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.opt .mark { margin-left: auto; color: var(--accent-text); }
.opt.danger { color: var(--danger); }
.pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.status-grid { display: grid; gap: 4px; min-width: 210px; }
.status-opt { height: 32px; border-radius: 6px; border: 0; color: #fff; font-size: 13px; padding: 0 10px; text-align: center; }
.status-opt:hover { filter: brightness(1.1); }
.status-opt.empty-l { background: var(--card-2) !important; color: var(--dim); }
.pop-actions { display: flex; gap: 6px; margin-top: 8px; }
.lbl-edit { display: grid; grid-template-columns: 30px 1fr 30px 28px; gap: 6px; align-items: center; margin-bottom: 6px; }
.lbl-edit input[type=color] { width: 30px; height: 30px; padding: 0; border: 0; background: none; border-radius: 6px; }
.lbl-edit input[type=text] { height: 30px; }
.lbl-edit .done-t { font-size: 11px; color: var(--dim); display: grid; place-items: center; cursor: pointer; border-radius: 6px; height: 30px; border: 1px solid var(--line-2); }
.lbl-edit .done-t.on { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.file-row { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 7px; }
.file-row:hover { background: var(--hover); }
.file-row a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.file-row small { color: var(--dim); }

/* ---------- painel do item ---------- */
.panel-wrap { position: fixed; inset: 0; z-index: 70; }
.panel-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(760px, 100vw); background: var(--panel);
  border-left: 1px solid var(--line-2); display: flex; flex-direction: column; box-shadow: var(--shadow);
  animation: slide .18s ease-out;
}
@keyframes slide { from { transform: translateX(30px); opacity: .5; } }
.p-head { padding: 16px 20px 0; border-bottom: 1px solid var(--line); }
.p-top { display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 13px; }
.p-top a { color: var(--muted); text-decoration: none; }
.p-top a:hover { color: var(--text); }
.p-top .sp { flex: 1; }
.p-name { font-size: 24px; font-weight: 400; letter-spacing: -.02em; margin: 8px 0 4px; padding: 2px 6px; margin-left: -6px; border-radius: 6px; outline: none; }
.p-name:hover { background: var(--hover); }
.p-body { flex: 1; overflow: auto; padding: 18px 20px 40px; }
.fields { display: grid; grid-template-columns: 170px 1fr; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.fields > div { background: var(--panel); min-height: 40px; display: flex; align-items: center; }
.fields .fl { padding: 0 12px; color: var(--muted); font-size: 13px; }
.fields .fv { padding: 0; }
.fields .fv .cell { width: 100% !important; border: 0; background: transparent; min-height: 40px; }
.fields .fv .status { min-height: 40px; }
.editor-box { border: 1px solid var(--line-2); border-radius: 10px; background: var(--bg); }
.editor-box:focus-within { border-color: var(--accent); }
.editor-tools { display: flex; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); }
.editor-tools button { height: 26px; min-width: 28px; border: 0; border-radius: 5px; background: none; color: var(--muted); font-size: 13px; }
.editor-tools button:hover { background: var(--hover); color: var(--text); }
.editor { min-height: 90px; max-height: 300px; overflow: auto; padding: 10px 12px; outline: none; }
.editor:empty::before { content: attr(data-ph); color: var(--dim); }
.editor-foot { display: flex; align-items: center; gap: 8px; padding: 8px; border-top: 1px solid var(--line); }
.editor-foot .sp { flex: 1; }
.upd { border: 1px solid var(--line); border-radius: 12px; background: var(--card); margin-top: 14px; }
.upd-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px 0; }
.upd-head .av { margin: 0; border: 0; width: 30px; height: 30px; }
.upd-head b { font-weight: 700; font-size: 13.5px; }
.upd-head small { color: var(--dim); font-size: 12px; }
.upd-head .sp { flex: 1; }
.upd-body { padding: 8px 14px 12px 54px; overflow-wrap: anywhere; }
.upd-body p { margin: 0 0 6px; }
.upd-body img { max-width: 100%; border-radius: 8px; }
.upd-body a { color: var(--accent-text); }
.mention { color: var(--accent-text); background: rgba(171,255,19,.1); border-radius: 4px; padding: 0 3px; }
.upd-foot { display: flex; gap: 6px; padding: 0 14px 10px 50px; }
.replies { border-top: 1px solid var(--line); padding: 4px 14px 8px 54px; }
.reply { padding: 8px 0; border-bottom: 1px solid var(--line); }
.reply:last-child { border-bottom: 0; }
.reply .upd-body { padding: 4px 0 0; }
.upd-files { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 12px 54px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gcard { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--card); text-decoration: none; display: block; }
.gcard .gthumb { aspect-ratio: 4/3; background: var(--card-2) center/cover; display: grid; place-items: center; color: var(--muted); text-transform: uppercase; font-size: 13px; }
.gcard .gname { padding: 8px 10px; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcard .gname small { display: block; color: var(--dim); }
.act { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.act time { color: var(--dim); white-space: nowrap; width: 110px; flex: none; }
.act .who { color: var(--text); }
.act .what { color: var(--muted); }
.act .arrow { color: var(--dim); }
.sublist { margin-top: 22px; }
.sublist h3, .p-body h3 { font-size: 14px; font-weight: 700; margin: 0 0 8px; }

/* ---------- kanban ---------- */
.kanban { display: flex; gap: 12px; padding: 8px 28px 60px; align-items: flex-start; width: max-content; min-width: 100%; }
.kcol { width: 272px; flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
.kcol-head { padding: 10px 12px; border-radius: 12px 12px 0 0; color: #fff; font-size: 13.5px; display: flex; justify-content: space-between; }
.kcol-body { padding: 8px; overflow: auto; display: grid; gap: 8px; min-height: 60px; }
.kcol.over { box-shadow: 0 0 0 2px var(--accent); }
.kcard { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: grab; }
.kcard:hover { border-color: var(--line-2); }
.kcard .kt { margin-bottom: 8px; }
.kcard .km { display: flex; align-items: center; justify-content: space-between; gap: 6px; color: var(--dim); font-size: 12px; }
.kcard .avs { width: auto; justify-content: flex-end; }

/* ---------- meu trabalho e listas ---------- */
.mw-sec { margin-top: 22px; }
.mw-sec h2 { font-size: 15px; font-weight: 700; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.mw-sec h2 small { color: var(--dim); font-weight: 400; }
.list { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel); }
.li { display: grid; grid-template-columns: 1fr 200px 140px 90px; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; border-bottom: 1px solid var(--line); text-decoration: none; cursor: pointer; }
.li:last-child { border-bottom: 0; }
.li:hover { background: var(--card); }
.li .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .b { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .s { border-radius: 6px; color: #fff; font-size: 12px; text-align: center; padding: 3px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li .d { font-size: 13px; text-align: right; color: var(--muted); }
.li .d.late { color: var(--danger); }
.notif { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: rgba(171,255,19,.05); }
.notif.unread::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.notif time { color: var(--dim); font-size: 12px; margin-left: auto; white-space: nowrap; }
.tbl { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.tbl th { color: var(--muted); font-weight: 400; font-size: 12.5px; background: var(--card); }
.tbl select { height: 30px; width: auto; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; background: var(--card-2); color: var(--muted); }
.tag.ok { background: rgba(171,255,19,.14); color: var(--accent-text); }
.tag.warn { background: rgba(253,171,61,.14); color: var(--warn); }
.tag.bad { background: rgba(255,92,108,.14); color: var(--danger); }
.rule { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); margin-bottom: 10px; }
.rule .rt { flex: 1; }
.rule .rt b { color: var(--accent-text); font-weight: 400; }
.rule.off { opacity: .5; }
.card-box { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); padding: 18px; max-width: 520px; margin-bottom: 16px; }
.card-box h2 { font-size: 16px; font-weight: 700; margin: 0 0 12px; }
.form-grid { display: grid; gap: 12px; }

/* ---------- modal e avisos ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 95; background: rgba(0,0,0,.5); display: grid; place-items: start center; padding: 10vh 16px 16px; overflow: auto; }
.modal { width: min(520px, 100%); background: var(--panel); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); padding: 20px; }
.modal h2 { font-size: 20px; font-weight: 400; letter-spacing: -.01em; margin: 0 0 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.search-modal { width: min(640px, 100%); padding: 10px; }
.search-modal input { height: 44px; font-size: 16px; }
.search-res { margin-top: 8px; max-height: 60vh; overflow: auto; }
.search-res .opt small { margin-left: auto; color: var(--dim); }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; }
.toast { background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; padding: 11px 14px; box-shadow: var(--shadow); max-width: 360px; font-size: 13.5px; animation: slide .18s ease-out; }
.toast.err { border-color: rgba(255,92,108,.5); }
.toast a { color: var(--accent-text); }
.copy-box { display: flex; gap: 8px; margin-top: 10px; }
.copy-box input { font-size: 12.5px; }

/* ---------- celular ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 80; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; box-shadow: var(--shadow); }
  .side-close, .menu-btn { display: inline-grid; }
  .board-head { padding: 14px 16px 0; }
  .table-wrap { padding: 4px 12px 120px; }
  .grp-head { left: 12px; }
  .page { padding: 18px 16px 60px; }
  .li { grid-template-columns: 1fr 110px; }
  .li .b, .li .d { display: none; }
  .fields { grid-template-columns: 110px 1fr; }
  .toolbar .search { width: 100%; }
  .kanban { padding: 8px 12px 60px; }
}
