@font-face { font-family: 'Public Sans'; font-weight: 400; font-display: swap; src: url('/fonts/public-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-weight: 500; font-display: swap; src: url('/fonts/public-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-weight: 600; font-display: swap; src: url('/fonts/public-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Public Sans'; font-weight: 700; font-display: swap; src: url('/fonts/public-sans-latin-700-normal.woff2') format('woff2'); }

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f7f7f8;
  --surface-3: #efeff1;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --text-2: #3f3f46;
  --muted: #71717a;
  --faint: #a1a1aa;
  --primary: #18181b;
  --primary-600: #000000;
  --primary-soft: #f0f0f1;
  --primary-text: #18181b;
  --link: #1d4ed8;
  --ok: #16a34a; --ok-soft: #ecfdf3; --ok-text: #15803d;
  --warn: #d97706; --warn-soft: #fef6e7; --warn-text: #b45309;
  --danger: #dc2626; --danger-soft: #fdeeee; --danger-text: #b91c1c;
  --info-soft: #eef4ff; --info-text: #1d4ed8;
  --shadow-sm: none;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .14);
  --radius: 6px;
  --radius-sm: 4px;
  --sidebar: 236px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0f0f11;
  --surface: #18181b;
  --surface-2: #1d1d21;
  --surface-3: #27272a;
  --border: #2e2e33;
  --border-strong: #3f3f46;
  --text: #f4f4f5;
  --text-2: #d4d4d8;
  --muted: #a1a1aa;
  --faint: #71717a;
  --primary: #f4f4f5;
  --primary-600: #ffffff;
  --primary-soft: #27272a;
  --primary-text: #f4f4f5;
  --link: #93c5fd;
  --ok-soft: #102a1b; --ok-text: #86efac;
  --warn-soft: #33250c; --warn-text: #fcd34d;
  --danger-soft: #3a1414; --danger-text: #fca5a5;
  --info-soft: #172036; --info-text: #93c5fd;
  --shadow: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, .6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 'Public Sans', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--link); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i.sm { width: 15px; height: 15px; }
svg.i.xs { width: 13px; height: 13px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar) 1fr; height: 100vh; }
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 6px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; font-size: 16px; }
/* Logo Daniela Tombini: o PNG serve de máscara e a cor vem do tema (currentColor) */
.brand-logo {
  width: 34px; height: 34px; flex: none; color: var(--text);
  background-color: currentColor;
  -webkit-mask: url(/core/img/logo.png) center / contain no-repeat;
  mask: url(/core/img/logo.png) center / contain no-repeat;
}
.login-form .brand-logo { width: 44px; height: 44px; }
.nav-title { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px;
  color: var(--text-2); font-weight: 500;
}
.nav a:hover { background: var(--surface-2); }
.nav a.active { background: var(--surface-3); color: var(--text); font-weight: 600; box-shadow: inset 2px 0 0 var(--text); }
.nav a .count { margin-left: auto; font-size: 12px; color: var(--muted); background: var(--surface-3); padding: 0 8px; border-radius: 6px; }
.nav a.active .count { background: var(--surface); }
.prio-dot { width: 9px; height: 9px; border-radius: 3px; flex: none; }

.online-box { margin-top: auto; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; background: var(--surface-2); }
.online-box h4 { margin: 0 0 8px; font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; color: var(--text-2); }
.online-list { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow-y: auto; }
.online-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.online-item small { display: block; color: var(--muted); font-size: 11px; line-height: 1.2; }
.pulse { width: 8px; height: 8px; background: var(--ok); border-radius: 50%; }

.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: var(--surface);
  border-bottom: 1px solid var(--border); min-height: 68px;
}
.topbar h1 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: center; gap: 10px; }
.topbar .sub { font-size: 13px; color: var(--muted); }
.content { flex: 1; overflow: auto; padding: 24px 28px; }
.content.board-content { padding: 18px 28px 0; display: flex; flex-direction: column; overflow: hidden; }

/* ---------- Controles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px;
  border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  font-weight: 500; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--surface); }
.btn.primary:hover { background: var(--primary-600); }
.btn.danger { color: var(--danger-text); border-color: transparent; background: var(--danger-soft); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 6px; }
.btn.icon { width: 38px; padding: 0; }
.btn.icon.sm { width: 32px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { position: relative; }
.badge-count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 6px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 600; display: grid; place-items: center; border: 2px solid var(--surface);
}

.input, .select, textarea.input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--border-strong);
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input:focus, .select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.search .input { padding-left: 36px; background: var(--surface-2); }
label.lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 0 6px; }
.field { margin-bottom: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 10px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--primary); }

.segmented { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 6px; overflow: hidden; background: var(--surface); }
.segmented button { border: 0; background: transparent; padding: 0 12px; height: 34px; display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); font-weight: 500; }
.segmented button + button { border-left: 1px solid var(--border); }
.segmented button.on { background: var(--surface-3); color: var(--text); }

/* ---------- Chips / avatares ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px;
  font-size: 12px; font-weight: 500; white-space: nowrap; border: 1px solid transparent;
}
.chip.outline { border-color: var(--border-strong); color: var(--muted); background: transparent; }
.chip.p-urgente { background: var(--danger-soft); color: var(--danger-text); }
.chip.p-alta { background: #fff1e8; color: #c2410c; }
:root[data-theme="dark"] .chip.p-alta { background: #3a2212; color: #fdba74; }
.chip.p-media { background: var(--warn-soft); color: var(--warn-text); }
.chip.p-baixa { background: var(--surface-3); color: var(--muted); }
.chip.sla-no_prazo { background: var(--surface-3); color: var(--text-2); }
.chip.sla-em_risco { background: var(--warn-soft); color: var(--warn-text); }
.chip.sla-estourado { background: var(--danger-soft); color: var(--danger-text); }
.chip.sla-cumprido { background: var(--ok-soft); color: var(--ok-text); }
.chip.sla-violado { background: var(--danger-soft); color: var(--danger-text); }
.chip.solid { color: #fff; }

.avatar {
  --s: 28px; width: var(--s); height: var(--s); border-radius: 50%; flex: none; display: inline-grid; place-items: center;
  font-size: calc(var(--s) * .38); font-weight: 600; color: #fff; position: relative; border: 2px solid var(--surface);
  letter-spacing: .02em;
}
.avatar.animal { font-size: calc(var(--s) * .58); font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; line-height: 1; }
.avatar.foto { background: var(--surface-3); }
.avatar.foto img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.avatar-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.avatar-grade button {
  display: grid; justify-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); color: var(--text-2); font-size: 11px; cursor: pointer;
}
.avatar-grade button:hover { background: var(--surface-2); }
.avatar-grade button.sel { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); color: var(--text); font-weight: 600; }
.avatar.sm { --s: 24px; }
.avatar.lg { --s: 36px; }
.avatar.xl { --s: 64px; }
.avatar.on::after {
  content: ''; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--ok); border: 2px solid var(--surface);
}
.avatars { display: flex; align-items: center; }
.avatars .avatar + .avatar { margin-left: -8px; }
.avatars .more { --s: 24px; background: var(--surface-3); color: var(--muted); }

/* ---------- Cards genéricos ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--border); }
.panel-h h3 { margin: 0; font-size: 15px; font-weight: 600; }
.panel-b { padding: 16px 18px; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--faint); margin-bottom: 8px; }

/* ---------- Projetos ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.proj-card { padding: 18px; cursor: pointer; transition: transform .15s, box-shadow .15s; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden; }
.proj-card:hover { border-color: var(--border-strong); }
.proj-card .marca { width: 10px; height: 10px; border-radius: 2px; background: var(--c); flex: none; }
.proj-card { color: var(--text); }
.proj-card h3 { margin: 0; font-size: 16px; }
.proj-card p { margin: 0; color: var(--muted); font-size: 13px; min-height: 20px; }
.proj-stats { display: flex; gap: 16px; font-size: 12px; color: var(--muted); }
.proj-stats b { display: block; font-size: 18px; color: var(--text); }
.progress { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width .3s; }
.progress.ok > span { background: var(--ok); }

/* ---------- Quadro ---------- */
.board-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.board-toolbar .search { width: 240px; }
.board-toolbar .select { width: auto; min-width: 140px; height: 34px; }
.board { display: flex; gap: 18px; overflow-x: auto; flex: 1; padding-bottom: 18px; align-items: flex-start; }
.col { width: 296px; flex: none; display: flex; flex-direction: column; max-height: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 14px 14px 10px; }
.col-h .dot { width: 10px; height: 10px; border-radius: 50%; }
.col-h h3 { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.col-h .n { font-size: 12px; color: var(--muted); background: var(--surface); border: 1px solid var(--border); padding: 0 8px; border-radius: 6px; }
.col-h .n.over { background: var(--danger-soft); color: var(--danger-text); border-color: transparent; }
.col-h .acts { margin-left: auto; display: flex; gap: 2px; }
.col-body { flex: 1; overflow-y: auto; padding: 4px 10px 10px; min-height: 60px; display: flex; flex-direction: column; gap: 10px; }
.col-foot { padding: 0 10px 12px; }
.add-card {
  width: 100%; height: 40px; border-radius: 6px; border: 1px dashed var(--border-strong); color: var(--muted);
  background: transparent; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer;
}
.add-card:hover { background: var(--surface-3); }
.quick-add textarea { min-height: 64px; margin-bottom: 8px; }

.kcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 12px 12px 10px; cursor: pointer; display: flex; flex-direction: column; gap: 9px; position: relative;
  transition: box-shadow .15s, border-color .15s;
}
.kcard:hover { border-color: var(--faint); }
.kcard.done .kc-title { color: var(--muted); }
.kcard .cover { margin: -12px -12px 0; height: 130px; border-radius: 6px 11px 0 0; background: var(--surface-3) center/cover no-repeat; }
.kc-top { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.kc-top .num { font-weight: 600; }
.kc-title { font-weight: 600; font-size: 14px; line-height: 1.35; word-break: break-word; }
.kc-tags { display: flex; flex-wrap: wrap; gap: 5px; }
.kc-prog { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.kc-prog .progress { flex: 1; height: 5px; }
.kc-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.kc-foot .meta { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.kc-foot .meta span { display: inline-flex; align-items: center; gap: 3px; }
/* selo de notificações não lidas no card (módulo notificacoes) */
.kc-foot .meta .kc-notif {
  background: #dc2626; color: #fff; font-weight: 700; font-size: 11px;
  height: 18px; min-width: 18px; padding: 0 6px; border-radius: 9px; justify-content: center;
  box-shadow: 0 0 0 2px var(--surface);
}
.kc-foot .meta .kc-notif .i { width: 11px; height: 11px; }
.sortable-ghost { opacity: .35; }
.sortable-drag { transform: rotate(2deg); box-shadow: var(--shadow-lg) !important; }
.sortable-chosen { cursor: grabbing; }
.viewers { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }

/* lista */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(9, 9, 11, .5); display: flex; align-items: flex-start; justify-content: center; padding: 4vh 16px; z-index: 50; overflow-y: auto; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 6px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; animation: up .18s ease-out; }
@keyframes up { from { transform: translateY(12px); opacity: 0; } }
.modal.wide { max-width: 1180px; }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-h h2 { margin: 0; font-size: 17px; }
.modal-b { padding: 20px 22px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid var(--border); }

/* Card detalhe */
.cd { display: grid; grid-template-columns: minmax(0, 1fr) 400px; min-height: 70vh; }
.cd-main { padding: 22px 26px 26px; border-right: 1px solid var(--border); }
.cd-side { display: flex; flex-direction: column; background: var(--surface-2); border-radius: 0 0 18px 0; min-height: 0; max-height: 86vh; }
.cd-title { width: 100%; border: 0; outline: none; resize: none; overflow: hidden; font-family: inherit; font-size: 22px; font-weight: 700; background: transparent; padding: 4px 0; letter-spacing: -.01em; }
.cd-title:focus { box-shadow: 0 2px 0 var(--primary); }
.props { display: grid; grid-template-columns: 130px 1fr; gap: 10px 14px; align-items: center; margin: 18px 0 24px; font-size: 13px; }
.props > .k { color: var(--muted); display: flex; align-items: center; gap: 8px; font-weight: 500; }
.props .select, .props .input { height: 34px; }
.sec { margin-bottom: 24px; }
.sec-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.sec-h h4 { margin: 0; font-size: 14px; font-weight: 600; }
.desc-view { white-space: pre-wrap; word-break: break-word; padding: 10px 12px; border-radius: 6px; background: var(--surface-2); min-height: 44px; cursor: text; color: var(--text-2); }
.desc-view.empty-desc { color: var(--faint); }
.check-item { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; }
.check-item:hover { background: var(--surface-2); }
.check-item span.done { text-decoration: line-through; color: var(--muted); }
.check-item .btn { opacity: 0; }
.check-item:hover .btn { opacity: 1; }
.dropzone { display: block; border: 1.5px dashed var(--border-strong); border-radius: 6px; padding: 16px; text-align: center; color: var(--muted); font-size: 13px; cursor: pointer; transition: all .15s; }
.dropzone.over, .dropzone:hover { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 10px; }
.att { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; background: var(--surface); position: relative; }
.att .thumb { height: 100px; background: var(--surface-3) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); cursor: zoom-in; }
.att .info { padding: 7px 9px; font-size: 12px; }
.att .info b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att .tools { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.att:hover .tools { opacity: 1; }
.att .tools button { width: 28px; height: 28px; border-radius: 7px; border: 0; background: rgba(17, 24, 39, .7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.att.is-cover { outline: 2px solid var(--primary); }

/* Atividade */
.act-h { padding: 16px 18px 0; }
.act-h h3 { margin: 0 0 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tabs button { border: 0; background: none; padding: 8px 10px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; display: flex; gap: 6px; align-items: center; }
.tabs button.on { color: var(--text); border-color: var(--text); }
.tabs .n { font-size: 11px; background: var(--surface-3); padding: 0 6px; border-radius: 6px; }
.feed { flex: 1; overflow-y: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 14px; min-height: 200px; }
.msg { display: flex; gap: 10px; }
.msg .bubble { background: var(--surface); border: 1px solid var(--border); border-radius: 4px 6px 6px 6px; padding: 9px 12px; flex: 1; min-width: 0; }
.msg.mine .bubble { background: var(--surface-3); border-color: transparent; }
.msg .who { display: flex; align-items: baseline; gap: 6px; font-size: 12px; margin-bottom: 3px; }
.msg .who b { font-size: 13px; }
.msg .who .t { color: var(--faint); }
.msg .txt { white-space: pre-wrap; word-break: break-word; font-size: 13.5px; }
.msg .txt .mention { color: var(--link); font-weight: 600; background: var(--info-soft); padding: 0 3px; border-radius: 4px; }
.msg .ops { display: flex; gap: 8px; font-size: 12px; margin-top: 4px; }
.msg .ops a { color: var(--muted); cursor: pointer; }
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: 14px; font-size: 13px; }
.tl-item .ic { position: absolute; left: -22px; top: 0; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border-strong); }
.tl-item .ic.movido { border-color: #3b82f6; } .tl-item .ic.comentario { border-color: var(--text-2); }
.tl-item .ic.criado { border-color: var(--ok); } .tl-item .ic.sla { border-color: var(--danger); } .tl-item .ic.anexo { border-color: var(--warn); }
.tl-item .t { color: var(--faint); font-size: 12px; }
.composer { border-top: 1px solid var(--border); padding: 12px 14px; background: var(--surface); border-radius: 0 0 18px 0; position: relative; }
.composer textarea { min-height: 64px; max-height: 200px; border-radius: 6px; }
.composer .row { margin-top: 8px; }
.mention-pop { position: absolute; bottom: 100%; left: 14px; right: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-lg); max-height: 220px; overflow-y: auto; padding: 4px; z-index: 5; }
.mention-pop div { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.mention-pop div.sel, .mention-pop div:hover { background: var(--primary-soft); }

/* ---------- Picker de usuários ---------- */
.picker { position: relative; }
.picker-box { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-height: 34px; padding: 3px 6px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); cursor: text; }
.picker-box:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.picker-box input { border: 0; outline: none; background: transparent; flex: 1; min-width: 80px; height: 26px; }
.pchip { display: inline-flex; align-items: center; gap: 5px; background: var(--surface-3); border-radius: 6px; padding: 2px 4px 2px 2px; font-size: 12px; font-weight: 500; }
.pchip .avatar { --s: 20px; border: 0; }
.pchip button { border: 0; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; padding: 0; }
.picker-list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-lg); max-height: 240px; overflow-y: auto; z-index: 20; padding: 4px; }
.picker-list div { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.picker-list div:hover, .picker-list div.sel { background: var(--primary-soft); }
.picker-list small { color: var(--muted); margin-left: auto; }

/* ---------- Dropdown notificações ---------- */
.dropdown { position: absolute; top: calc(100% + 8px); right: 0; width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-lg); z-index: 40; overflow: hidden; }
.dropdown-h { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.dropdown-h h4 { margin: 0; font-size: 15px; flex: 1; }
.notif-list { max-height: 460px; overflow-y: auto; }
.notif { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; position: relative; }
.notif:hover { background: var(--surface-2); }
.notif.unread { background: var(--surface-2); }
.notif.unread::after { content: ''; position: absolute; right: 14px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--link); }
.notif .ic { width: 34px; height: 34px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.notif .ic.mencao, .notif .ic.comentario { background: var(--primary-soft); color: var(--primary-text); }
.notif .ic.atribuicao { background: var(--ok-soft); color: var(--ok-text); }
.notif .ic.movido { background: var(--info-soft); color: var(--info-text); }
.notif .ic.sla_risco { background: var(--warn-soft); color: var(--warn-text); }
.notif .ic.sla_estouro { background: var(--danger-soft); color: var(--danger-text); }
.notif b { display: block; font-size: 13px; font-weight: 600; padding-right: 14px; }
.notif p { margin: 2px 0; font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif small { color: var(--faint); font-size: 11.5px; }

.user-menu { width: 240px; padding: 6px; }
.user-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; color: var(--text-2); cursor: pointer; }
.user-menu a:hover { background: var(--surface-2); }
.menu { position: absolute; z-index: 45; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: var(--shadow-lg); padding: 5px; min-width: 190px; }
.menu a { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 6px; color: var(--text-2); cursor: pointer; font-size: 13px; }
.menu a:hover { background: var(--surface-2); }
.menu a.danger { color: var(--danger-text); }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { background: #111827; color: #fff; padding: 12px 16px; border-radius: 6px; box-shadow: var(--shadow-lg); max-width: 380px; font-size: 13px; display: flex; gap: 10px; align-items: flex-start; animation: up .2s; cursor: default; }
.toast.err { background: #b91c1c; }
.toast.ok { background: #047857; }
.toast.notif { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); cursor: pointer; }
.toast b { display: block; }

/* ---------- Dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; }
.kpi .l { font-size: 12px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 28px; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.kpi .v small { font-size: 14px; color: var(--muted); font-weight: 500; }
.kpi.danger .v { color: var(--danger); }
.kpi.warn .v { color: var(--warn); }
.charts { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.charts .panel { grid-column: span 6; }
.charts .panel.w8 { grid-column: span 8; } .charts .panel.w4 { grid-column: span 4; } .charts .panel.w12 { grid-column: span 12; }
.chart-box { position: relative; height: 270px; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.login-art {
  background: radial-gradient(120% 90% at 0% 0%, #13132a 0%, #0b0b12 45%, #07070b 100%);
  color: #fafafa; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden; isolation: isolate;
}
.login-art > *:not(.login-fx):not(.login-glow) { position: relative; z-index: 2; }
/* rede animada (canvas) e brilhos de fundo */
/* marca maior no painel escuro */
.login-art .brand { gap: 16px; font-size: 26px; padding: 0; }
.login-art .brand-logo { width: 64px; height: 64px; filter: drop-shadow(0 0 18px rgba(129, 140, 248, .45)); }
.login-art .brand small { font-size: 14px; margin-top: 2px; }
.login-fx { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.login-glow { position: absolute; inset: 0; z-index: 0; filter: blur(70px); opacity: .55; }
.login-glow i { position: absolute; border-radius: 50%; animation: lg-flutua 18s ease-in-out infinite alternate; }
.login-glow i:nth-child(1) { width: 420px; height: 420px; left: -120px; top: -80px; background: #4f46e5; }
.login-glow i:nth-child(2) { width: 360px; height: 360px; right: -140px; top: 35%; background: #0891b2; animation-duration: 22s; animation-delay: -6s; }
.login-glow i:nth-child(3) { width: 300px; height: 300px; left: 25%; bottom: -160px; background: #7c3aed; animation-duration: 26s; animation-delay: -12s; }
@keyframes lg-flutua { from { transform: translate(0, 0) scale(1); } to { transform: translate(60px, 40px) scale(1.15); } }
/* grade sutil por cima do fundo */
.login-art::after {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 30% 50%, #000 20%, transparent 75%);
}
.login-tag {
  display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #a5f3fc; padding: 5px 12px; border-radius: 999px; background: rgba(34, 211, 238, .08); border: 1px solid rgba(34, 211, 238, .25); margin-bottom: 18px;
}
.login-tag .pulse { background: #22d3ee; box-shadow: 0 0 0 0 rgba(34, 211, 238, .6); animation: lg-pulso 2s infinite; }
@keyframes lg-pulso { 70% { box-shadow: 0 0 0 10px rgba(34, 211, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); } }
.login-grad {
  background: linear-gradient(90deg, #67e8f9, #a5b4fc, #c4b5fd, #67e8f9); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: lg-grad 8s linear infinite;
}
@keyframes lg-grad { to { background-position: 300% 0; } }
/* mini quadro Kanban de vidro: um card viaja de "A fazer" até "Concluído" */
.login-board {
  margin-top: 34px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 460px; position: relative;
}
.lb-col {
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .09); border-radius: 10px; padding: 10px;
  backdrop-filter: blur(8px); display: flex; flex-direction: column; gap: 7px; min-height: 120px;
}
.lb-col b { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: #a1a1aa; font-weight: 600; }
.lb-card { height: 30px; border-radius: 6px; background: linear-gradient(90deg, rgba(255,255,255,.10), rgba(255,255,255,.05)); border-left: 2px solid #818cf8; }
.lb-card.curto { width: 70%; border-left-color: #22d3ee; }
.lb-card.ok { border-left-color: #34d399; }
.lb-move {
  position: absolute; top: 58px; left: 10px; width: calc((100% - 20px) / 3 - 20px); height: 30px; border-radius: 6px;
  background: linear-gradient(90deg, rgba(34,211,238,.28), rgba(129,140,248,.22)); border: 1px solid rgba(34,211,238,.55);
  box-shadow: 0 0 22px rgba(34, 211, 238, .35); padding: 7px 8px; display: flex; flex-direction: column; gap: 4px;
  animation: lb-viaja 9s cubic-bezier(.65, 0, .35, 1) infinite;
}
.lb-move i { display: block; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .7); }
.lb-move i.curto { width: 55%; background: rgba(255, 255, 255, .4); }
@keyframes lb-viaja {
  0%, 18% { transform: translate(0, 0); }
  30%, 52% { transform: translate(calc(100% + 30px), 0); border-color: rgba(251, 191, 36, .7); box-shadow: 0 0 22px rgba(251, 191, 36, .35); }
  64%, 86% { transform: translate(calc(200% + 60px), 0); border-color: rgba(52, 211, 153, .8); box-shadow: 0 0 22px rgba(52, 211, 153, .4); }
  100% { transform: translate(0, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .login-glow i, .login-grad, .lb-move, .login-tag .pulse { animation: none; }
}
.login-art h2 { font-size: 38px; line-height: 1.15; margin: 0 0 14px; letter-spacing: -.02em; }
.login-art p { opacity: .85; max-width: 420px; font-size: 15px; }
.login-mock { display: flex; gap: 12px; }
.login-mock .mc { background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .25); border-radius: 6px; padding: 12px; width: 170px; backdrop-filter: blur(6px); }
.login-mock .bar { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, .45); margin-bottom: 8px; }
.login-form { display: grid; place-items: center; padding: 32px; background: var(--surface); }
.login-form form { width: 100%; max-width: 360px; }
.login-form h1 { font-size: 26px; margin: 18px 0 6px; }
.err-msg { color: var(--danger-text); background: var(--danger-soft); padding: 9px 12px; border-radius: 6px; font-size: 13px; margin-bottom: 12px; }
.err-msg.ok { color: var(--ok-text); background: var(--ok-soft); }

/* colunas (config) */
.col-edit { display: grid; grid-template-columns: 22px 1fr 44px 80px auto 34px; gap: 8px; align-items: center; margin-bottom: 8px; }
.col-edit input[type=color] { width: 44px; height: 34px; padding: 2px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); }
.handle { cursor: grab; color: var(--faint); display: grid; place-items: center; }

.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .85); display: grid; place-items: center; padding: 30px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 6px; }

@media (max-width: 1100px) {
  .cd { grid-template-columns: 1fr; }
  .cd-main { border-right: 0; }
  .cd-side { max-height: none; border-radius: 0 0 18px 18px; }
  .charts .panel, .charts .panel.w8, .charts .panel.w4 { grid-column: span 12; }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .grid2, .grid4 { grid-template-columns: 1fr; }
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }

/* marca */
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: .02em; }
.brand .nome { line-height: 1.15; }
.sidebar .nav-title { letter-spacing: .08em; }
.slot-rodape { margin-top: auto; }
.chip.setor { color: var(--text-2); gap: 5px; }
.chip.setor i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; }
