/* =========================================================================
   ROIFIN · Gestão de Tarefas — Design system
   Paleta: laranja (marca), cinzas, preto e branco. Cores semânticas apenas
   para sucesso, alerta, erro e prioridade.
   ========================================================================= */
:root {
  --brand-50: #fff7ed; --brand-100: #ffedd5; --brand-200: #fed7aa; --brand-300: #fdba74;
  --brand-500: #f97316; --brand-600: #ea580c; --brand-700: #c2410c;
  --gray-0: #ffffff; --gray-25: #fcfcfc; --gray-50: #fafafa; --gray-100: #f4f4f5; --gray-150: #ececee; --gray-200: #e4e4e7;
  --gray-300: #d4d4d8; --gray-400: #a1a1aa; --gray-500: #71717a; --gray-600: #52525b; --gray-700: #3f3f46;
  --gray-800: #27272a; --gray-900: #18181b; --gray-950: #0c0c0e;
  /* Marca ROIFIN (áreas escuras e detalhes do logo) */
  --roifin-dark: #003239; --roifin-darker: #002126; --roifin-accent: #1ebb9a;
  --success: #16a34a; --success-bg: #f0fdf4; --warning: #b45309; --warning-bg: #fffbeb; --danger: #dc2626; --danger-bg: #fef2f2;
  --bg: #f6f6f7; --surface: #ffffff; --text: var(--gray-900); --muted: var(--gray-500); --border: var(--gray-200);
  --radius-sm: 6px; --radius: 10px; --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 16, 20, .06);
  --shadow: 0 1px 3px rgba(16, 16, 20, .06), 0 6px 16px -6px rgba(16, 16, 20, .10);
  --shadow-lg: 0 20px 50px -12px rgba(16, 16, 20, .28);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 236px;
  --topbar-h: 60px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font: 14px/1.45 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
small { font-size: 12px; }
.i { flex-shrink: 0; display: block; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
::selection { background: var(--brand-200); }
[hidden] { display: none !important; }
.boot { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 22px; background: var(--roifin-dark); }
.boot img { width: 200px; height: auto; }
.boot .spinner { --s: 22px; border-color: rgba(255, 255, 255, .12); border-top-color: var(--brand-500); }

/* ------------------------------------------------------------ Botões ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); font-weight: 550; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s, color .12s; }
.btn:hover { background: var(--gray-50); border-color: var(--gray-300); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand-500); border-color: var(--brand-500); color: #fff; box-shadow: 0 1px 2px rgba(234, 88, 12, .25); }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); }
.btn-dark { background: var(--gray-900); border-color: var(--gray-900); color: #fff; }
.btn-dark:hover { background: var(--gray-800); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--gray-100); border-color: transparent; }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 7px; }
.btn-xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 6px; gap: 5px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--gray-600); position: relative; }
.icon-btn:hover { background: var(--gray-100); color: var(--gray-900); }
.icon-btn.sm { width: 28px; height: 28px; }
.link { color: var(--brand-600); font-weight: 550; background: none; border: 0; padding: 0; }
.link:hover { text-decoration: underline; }
kbd { font: 11px/1 var(--font); padding: 3px 5px; border: 1px solid var(--border); border-bottom-width: 2px; border-radius: 5px; background: var(--gray-50); color: var(--gray-600); }

/* ------------------------------------------------------------ Campos ---- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--gray-700); }
.field .hint { font-size: 12px; color: var(--muted); }
.input, .select, .textarea { width: 100%; height: 38px; padding: 0 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); transition: border-color .12s, box-shadow .12s; min-width: 0; }
.textarea { height: auto; min-height: 90px; padding: 9px 11px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 30px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='m3 4.5 3 3 3-3'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--gray-300); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.input-sm { height: 32px; font-size: 13px; }
.input-icon { position: relative; }
.input-icon .i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--gray-400); pointer-events: none; }
.input-icon .input { padding-left: 34px; }
.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.checkbox input, input.cb { appearance: none; width: 17px; height: 17px; border: 1.5px solid var(--gray-300); border-radius: 5px; background: #fff; display: inline-grid; place-items: center; margin: 0; cursor: pointer; flex-shrink: 0; transition: all .12s; }
.checkbox input:checked, input.cb:checked { background: var(--brand-500); border-color: var(--brand-500); }
.checkbox input:checked::after, input.cb:checked::after { content: ""; width: 9px; height: 5px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
input.cb:indeterminate { background: var(--brand-500); border-color: var(--brand-500); }
input.cb:indeterminate::after { content: ""; width: 8px; height: 2px; background: #fff; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { appearance: none; width: 36px; height: 20px; border-radius: 99px; background: var(--gray-300); position: relative; transition: background .15s; cursor: pointer; margin: 0; flex-shrink: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked { background: var(--brand-500); }
.switch input:checked::after { transform: translateX(16px); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: span 2; }
.row { display: flex; align-items: center; gap: 8px; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.spacer { flex: 1; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.segmented { display: inline-flex; padding: 3px; background: var(--gray-100); border-radius: 9px; gap: 2px; }
.segmented button { border: 0; background: transparent; height: 30px; padding: 0 11px; border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; color: var(--gray-600); font-weight: 550; font-size: 13px; }
.segmented button:hover { color: var(--gray-900); }
.segmented button.active { background: #fff; color: var(--gray-900); box-shadow: var(--shadow-sm); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { height: 30px; min-width: 38px; padding: 0 10px; border-radius: 99px; border: 1px solid var(--border); background: #fff; font-size: 13px; font-weight: 550; color: var(--gray-600); }
.pill.active { background: var(--gray-900); border-color: var(--gray-900); color: #fff; }
.prio-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.prio-picker button { height: 36px; border: 1px solid var(--border); border-radius: 8px; background: #fff; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 550; color: var(--gray-600); }
.prio-picker button .i { color: var(--c); }
.prio-picker button.active { border-color: var(--c); background: color-mix(in srgb, var(--c) 9%, #fff); color: var(--gray-900); box-shadow: 0 0 0 1px var(--c) inset; }

/* ------------------------------------------------------------ Badges ---- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: color-mix(in srgb, var(--c, var(--gray-500)) 11%, #fff); color: color-mix(in srgb, var(--c, var(--gray-500)) 75%, #000); border: 1px solid color-mix(in srgb, var(--c, var(--gray-500)) 22%, #fff); }
button.badge { cursor: pointer; }
button.badge:hover { border-color: color-mix(in srgb, var(--c) 45%, #fff); }
.badge .caret { opacity: .55; margin-right: -2px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--gray-400)); flex-shrink: 0; display: inline-block; }
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 550; background: var(--gray-100); color: var(--gray-700); max-width: 100%; }
.tag.brand { background: var(--brand-50); color: var(--brand-700); }
.tag .dot { width: 6px; height: 6px; }
.chip-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--gray-100); color: var(--gray-600); font-size: 11.5px; font-weight: 700; }
.prio { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--gray-600); border: 0; background: none; padding: 3px 6px; margin: -3px -6px; border-radius: 6px; white-space: nowrap; }
.prio .i { color: var(--c); }
.prio-low { color: var(--gray-500); }
.prio-urgent { color: var(--danger); }
.prio-high { color: var(--brand-700); }
button.prio:hover { background: var(--gray-100); }
.due { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 550; white-space: nowrap; color: var(--gray-700); }
.due.danger { color: var(--danger); }
.due.warning { color: var(--brand-700); }
.due.muted { color: var(--gray-400); }
.due-pill { padding: 2px 8px; border-radius: 99px; }
.due-pill.danger { background: var(--danger-bg); }
.due-pill.warning { background: var(--brand-50); }
.avatar { --s: 26px; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); color: #fff; display: inline-grid; place-items: center; font-size: calc(var(--s) * .38); font-weight: 700; flex-shrink: 0; letter-spacing: .02em; box-shadow: 0 0 0 2px #fff; }
.avatar-empty { background: var(--gray-100); color: var(--gray-400); box-shadow: 0 0 0 1.5px var(--gray-300) inset; }
.avatars { display: inline-flex; }
.avatars .avatar + .avatar { margin-left: -7px; }
.load { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--gray-600); white-space: nowrap; }
.load i { width: 9px; height: 9px; border-radius: 50%; }
.load-low i { background: var(--success); }
.load-moderate i { background: #eab308; }
.load-high i { background: var(--danger); }
.progress { display: inline-block; width: 100%; height: 5px; border-radius: 99px; background: var(--gray-150); overflow: hidden; vertical-align: middle; }
.progress i { display: block; height: 100%; background: var(--brand-500); border-radius: inherit; transition: width .25s; }
.progress.success i { background: var(--success); }
.spinner { --s: 16px; width: var(--s); height: var(--s); border: 2px solid var(--gray-200); border-top-color: var(--brand-500); border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ Layout ---- */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--roifin-dark); color: rgba(255, 255, 255, .72); display: flex; flex-direction: column; padding: 14px 12px; gap: 6px; z-index: 30; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 8px 18px; color: #fff; }
.brand-logo { width: 150px; height: auto; display: block; }
.brand small { display: block; color: rgba(255, 255, 255, .5); font-size: 11.5px; letter-spacing: .02em; padding-left: 2px; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand-500); display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 15px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: rgba(255, 255, 255, .38); padding: 14px 10px 6px; font-weight: 650; }
.nav a { position: relative; display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 8px; color: rgba(255, 255, 255, .66); font-weight: 550; transition: background .12s, color .12s; }
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.active { background: rgba(249, 115, 22, .14); color: #fff; }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-500); }
.nav a.active .i { color: var(--brand-500); }
.nav .nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--brand-500); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
.nav .nav-count.danger { background: var(--danger); }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .08); padding-top: 10px; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; width: 100%; border: 0; background: transparent; color: inherit; text-align: left; }
.me-card:hover { background: rgba(255, 255, 255, .06); }
.me-card strong { display: block; color: #fff; font-size: 13px; }
.me-card small { color: rgba(255, 255, 255, .5); }
.me-card .avatar { box-shadow: none; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; height: var(--topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 24px; background: rgba(246, 246, 247, .86); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; }
.topbar.scrolled { border-bottom-color: var(--border); }
.topbar .menu-toggle { display: none; }
.global-search { position: relative; flex: 1; max-width: 460px; }
.global-search .input { height: 38px; padding-left: 36px; padding-right: 36px; background: #fff; }
.global-search > .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--gray-400); }
.global-search kbd { position: absolute; right: 9px; top: 50%; transform: translateY(-50%); }
.company-scope { width: 220px; }
.company-scope .select { background-color: #fff; }
.bell-count { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; border-radius: 99px; background: var(--brand-500); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; box-shadow: 0 0 0 2px var(--bg); }
.view { padding: 8px 24px 40px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 10px 0 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 750; }
.page-head p { color: var(--muted); margin-top: 3px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bottom-nav { display: none; }
.fab { display: none; }

/* ------------------------------------------------------------ Cards ----- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 0; }
.card-head h3 { font-size: 14.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.card-head h3 .i { color: var(--gray-400); }
.card-body { padding: 14px 16px 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { position: relative; text-align: left; padding: 14px 14px 13px; border-radius: var(--radius-lg); border: 1px solid var(--border); background: #fff; box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 6px; transition: border-color .12s, box-shadow .12s, transform .12s; min-width: 0; }
button.stat:hover { border-color: var(--gray-300); box-shadow: var(--shadow); }
.stat.active { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--gray-500); font-size: 12.5px; font-weight: 600; gap: 6px; }
.stat-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--gray-100); color: var(--gray-600); }
.stat-value { font-size: 26px; font-weight: 750; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 12px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat.tone-danger .stat-icon { background: var(--danger-bg); color: var(--danger); }
.stat.tone-danger .stat-value { color: var(--danger); }
.stat.tone-brand .stat-icon { background: var(--brand-50); color: var(--brand-600); }
.stat.tone-success .stat-icon { background: var(--success-bg); color: var(--success); }
.stat.tone-dark .stat-icon { background: var(--gray-900); color: #fff; }
.stat select { border: 0; background: transparent; font-size: 12px; color: var(--gray-500); padding: 0; cursor: pointer; }

/* ------------------------------------------------------------ Toolbar ---- */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.toolbar .input-icon { width: 260px; }
.filter-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px dashed var(--gray-300); background: #fff; font-size: 13px; font-weight: 550; color: var(--gray-600); white-space: nowrap; }
.filter-btn:hover { border-color: var(--gray-400); color: var(--gray-900); }
.filter-btn.on { border-style: solid; border-color: var(--brand-300); background: var(--brand-50); color: var(--brand-700); }
.filter-btn .n { background: var(--brand-500); color: #fff; border-radius: 99px; min-width: 18px; height: 18px; font-size: 11px; display: grid; place-items: center; padding: 0 5px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; align-items: center; }
.fchip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 4px 0 9px; border-radius: 7px; background: var(--gray-900); color: #fff; font-size: 12px; font-weight: 550; }
.fchip b { font-weight: 400; color: var(--gray-400); }
.fchip button { border: 0; background: transparent; color: var(--gray-400); display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; }
.fchip button:hover { background: rgba(255, 255, 255, .15); color: #fff; }
.bulkbar { position: sticky; top: calc(var(--topbar-h) + 6px); z-index: 15; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px 8px 14px; margin-bottom: 10px; border-radius: 12px; background: var(--gray-900); color: #fff; box-shadow: var(--shadow-lg); animation: rise .18s ease-out; }
.bulkbar strong { margin-right: 6px; }
.bulkbar .btn { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .12); color: #fff; }
.bulkbar .btn:hover { background: rgba(255, 255, 255, .16); }
.bulkbar .btn-danger { background: var(--danger); border-color: var(--danger); }
@keyframes rise { from { transform: translateY(6px); opacity: 0; } }

/* ------------------------------------------------------------ Lista ----- */
.tlist { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.trow { display: grid; grid-template-columns: 34px minmax(240px, 2.4fr) minmax(120px, 1.1fr) 150px 96px 138px 132px 110px 92px 40px; align-items: center; gap: 10px; padding: 0 12px; min-height: 52px; border-bottom: 1px solid var(--gray-100); position: relative; }
.trow:last-child { border-bottom: 0; }
.trow.head { min-height: 38px; background: var(--gray-50); color: var(--gray-500); font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .04em; position: sticky; top: 0; }
.trow.head button { border: 0; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; display: inline-flex; align-items: center; gap: 4px; }
.trow.head button:hover, .trow.head button.sorted { color: var(--gray-900); }
.trow:not(.head):hover { background: var(--gray-25); }
.trow.selected { background: var(--brand-50) !important; }
.trow.overdue::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--danger); }
.trow.is-done .t-title-text { color: var(--gray-400); text-decoration: line-through; text-decoration-color: var(--gray-300); }
.cell { min-width: 0; display: flex; align-items: center; gap: 7px; }
.cell-label { display: none; }
.t-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; cursor: pointer; padding: 8px 0; }
.t-title-text { font-weight: 600; color: var(--gray-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-title:hover .t-title-text { color: var(--brand-700); }
.t-meta { display: flex; align-items: center; gap: 10px; color: var(--gray-400); font-size: 12px; min-width: 0; }
.t-meta span { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.t-meta .progress { width: 46px; }
.t-company { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--gray-700); }
.t-company a:hover { color: var(--brand-700); text-decoration: underline; }
.t-internal { color: var(--gray-400); font-size: 12.5px; }
.inline-edit { border: 0; background: none; padding: 3px 6px; margin: -3px -6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 7px; min-width: 0; max-width: 100%; text-align: left; }
.inline-edit:hover:not(:disabled) { background: var(--gray-100); }
.inline-edit:disabled { cursor: default; }
.inline-edit span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.rec-icon { color: var(--gray-500); display: inline-flex; align-items: center; gap: 5px; font-size: 12px; min-width: 0; }
.rec-icon span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.updated { font-size: 12px; color: var(--gray-500); white-space: nowrap; }
.check-complete { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--gray-300); background: #fff; display: grid; place-items: center; color: transparent; padding: 0; transition: all .12s; flex-shrink: 0; }
.check-complete:hover { border-color: var(--success); color: var(--success); }
.check-complete.done { background: var(--success); border-color: var(--success); color: #fff; }
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 4px; color: var(--gray-500); font-size: 13px; flex-wrap: wrap; }

/* ------------------------------------------------------------ Kanban ---- */
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; scroll-snap-type: x proximity; min-height: calc(100vh - 330px); }
.column { flex: 0 0 292px; background: var(--gray-100); border-radius: var(--radius-lg); display: flex; flex-direction: column; max-height: calc(100vh - 250px); scroll-snap-align: start; border: 1px solid transparent; transition: background .12s, border-color .12s; }
.column.drop-target { background: var(--brand-50); border-color: var(--brand-300); }
.column-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; font-weight: 650; }
.column-head .dot { width: 9px; height: 9px; }
.column-body { overflow-y: auto; padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; flex: 1; }
.kcard { background: #fff; border-radius: 11px; border: 1px solid var(--border); padding: 11px 12px; box-shadow: var(--shadow-sm); cursor: grab; user-select: none; position: relative; touch-action: pan-y; transition: box-shadow .12s, border-color .12s; }
.kcard:hover { border-color: var(--gray-300); box-shadow: var(--shadow); }
.kcard.overdue { border-left: 3px solid var(--danger); }
.kcard.dragging { opacity: .35; }
.kcard-ghost { position: fixed; z-index: 100; pointer-events: none; transform: rotate(2deg); box-shadow: var(--shadow-lg); cursor: grabbing; width: 272px; }
.drop-placeholder { height: 64px; border-radius: 11px; border: 2px dashed var(--brand-300); background: rgba(249, 115, 22, .06); flex-shrink: 0; }
.kcard-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 6px; }
.kcard-title { font-weight: 600; line-height: 1.35; margin-bottom: 8px; word-break: break-word; }
.kcard-company { font-size: 12px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard-foot { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.kcard-foot .t-meta { flex: 1; }
.column-add { margin: 0 8px 8px; }
.column-add input { width: 100%; height: 36px; border-radius: 9px; border: 1px dashed var(--gray-300); background: transparent; padding: 0 10px; }
.column-add input:focus { outline: none; background: #fff; border: 1px solid var(--brand-500); }

/* ------------------------------------------------------------ Calendário - */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-head h2 { font-size: 17px; font-weight: 700; text-transform: capitalize; min-width: 180px; }
.cal { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.cal-weekdays, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-weekdays div { padding: 9px 10px; font-size: 11.5px; font-weight: 650; color: var(--gray-500); text-transform: uppercase; letter-spacing: .05em; background: var(--gray-50); border-bottom: 1px solid var(--border); }
.cal-day { min-height: 118px; border-right: 1px solid var(--gray-100); border-bottom: 1px solid var(--gray-100); padding: 6px; display: flex; flex-direction: column; gap: 3px; min-width: 0; transition: background .1s; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.other { background: var(--gray-25); }
.cal-day.other .cal-num { color: var(--gray-300); }
.cal-day.weekend { background: var(--gray-50); }
.cal-day.drop-target { background: var(--brand-50); }
.cal-num { font-size: 12.5px; font-weight: 650; color: var(--gray-600); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; border: 0; background: none; padding: 0; }
.cal-num:hover { background: var(--gray-100); }
.cal-day.today .cal-num { background: var(--brand-500); color: #fff; }
.cal-chip { display: flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 6px; border-radius: 6px; background: var(--gray-100); color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 0; text-align: left; width: 100%; border-left: 3px solid var(--c, var(--gray-400)); cursor: pointer; }
.cal-chip:hover { background: var(--gray-150); }
.cal-chip.done { color: var(--gray-400); text-decoration: line-through; }
.cal-chip.overdue { background: var(--danger-bg); color: #991b1b; }
.cal-chip time { color: var(--gray-500); font-variant-numeric: tabular-nums; }
.cal-more { font-size: 11.5px; color: var(--gray-500); border: 0; background: none; text-align: left; padding: 1px 6px; font-weight: 600; }
.cal-more:hover { color: var(--brand-700); }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-week .cal-col { border-right: 1px solid var(--gray-100); min-height: 460px; padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cal-week .cal-col:last-child { border-right: 0; }
.cal-col-head { display: flex; align-items: baseline; gap: 6px; padding-bottom: 6px; border-bottom: 1px solid var(--gray-100); margin-bottom: 4px; }
.cal-col-head strong { font-size: 20px; font-weight: 700; }
.cal-col-head span { color: var(--gray-500); font-size: 12px; text-transform: uppercase; font-weight: 650; }
.cal-col.today .cal-col-head strong { color: var(--brand-600); }
.cal-dayview { display: grid; grid-template-columns: 64px 1fr; }
.cal-hour { height: 56px; border-bottom: 1px solid var(--gray-100); font-size: 11.5px; color: var(--gray-400); padding: 4px 8px; text-align: right; }
.cal-slot { height: 56px; border-bottom: 1px solid var(--gray-100); padding: 3px 8px; display: flex; flex-wrap: wrap; gap: 4px; align-content: flex-start; }
.cal-slot .cal-chip { width: auto; max-width: 100%; }
.cal-allday { padding: 10px; border-bottom: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 6px; background: var(--gray-50); }
.cal-allday .cal-chip { width: auto; }
.now-line { position: relative; }
.now-line::after { content: ""; position: absolute; left: 0; right: 0; top: var(--top); height: 2px; background: var(--danger); }

/* ---------------------------------------------------------- Cronograma --- */
.schedule { display: grid; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: auto; box-shadow: var(--shadow-sm); }
.sch-head { position: sticky; top: 0; background: var(--gray-50); border-bottom: 1px solid var(--border); padding: 10px; font-weight: 650; font-size: 12.5px; color: var(--gray-600); z-index: 1; }
.sch-head.today { color: var(--brand-700); background: var(--brand-50); }
.sch-head small { display: block; color: var(--gray-400); font-weight: 500; }
.sch-person { padding: 10px; border-bottom: 1px solid var(--gray-100); border-right: 1px solid var(--gray-100); display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; position: sticky; left: 0; background: #fff; }
.sch-cell { border-bottom: 1px solid var(--gray-100); border-right: 1px solid var(--gray-100); padding: 6px; display: flex; flex-direction: column; gap: 5px; min-height: 84px; min-width: 150px; }
.sch-cell.today { background: rgba(249, 115, 22, .035); }
.sch-card { border: 1px solid var(--border); border-left: 3px solid var(--c, var(--gray-300)); border-radius: 8px; padding: 6px 8px; background: #fff; font-size: 12.5px; cursor: pointer; text-align: left; width: 100%; }
.sch-card:hover { box-shadow: var(--shadow); }
.sch-card strong { display: block; font-weight: 600; line-height: 1.3; }
.sch-card small { color: var(--gray-500); display: flex; gap: 6px; align-items: center; margin-top: 3px; }
.sch-card.done strong { color: var(--gray-400); text-decoration: line-through; }
.sch-card.overdue { background: var(--danger-bg); }

/* ------------------------------------------------------------ Overlays --- */
.overlay { position: fixed; inset: 0; background: rgba(12, 12, 14, .42); opacity: 0; transition: opacity .16s; }
.overlay.open { opacity: 1; }
.modal-overlay { z-index: 50; display: grid; place-items: center; padding: 20px; }
.modal { background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-height: calc(100vh - 40px); display: flex; flex-direction: column; transform: translateY(10px) scale(.98); transition: transform .16s; }
.overlay.open .modal { transform: none; }
.modal-sm { max-width: 440px; }
.modal-md { max-width: 620px; }
.modal-lg { max-width: 860px; }
.modal-xl { max-width: 1080px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px 22px; border-bottom: 1px solid var(--gray-100); }
.modal-head h2 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--gray-100); background: var(--gray-25); border-radius: 0 0 16px 16px; }
.confirm-msg { font-size: 15px; font-weight: 600; }
.confirm-detail { color: var(--muted); margin-top: 6px; }
.drawer-overlay { z-index: 40; }
.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(920px, 100vw); background: #fff; box-shadow: var(--shadow-lg); transform: translateX(24px); opacity: .6; transition: transform .2s ease-out, opacity .2s; display: flex; flex-direction: column; }
.overlay.open .drawer { transform: none; opacity: 1; }
.drawer.narrow { width: min(460px, 100vw); }
.popover { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--border); border-radius: 11px; box-shadow: var(--shadow-lg); animation: pop .12s ease-out; max-width: calc(100vw - 16px); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } }
.menu { padding: 5px; min-width: 200px; max-height: 360px; overflow-y: auto; }
.menu-item { width: 100%; display: flex; align-items: center; gap: 9px; border: 0; background: none; padding: 7px 9px; border-radius: 7px; text-align: left; font-size: 13.5px; color: var(--gray-800); }
.menu-item:hover:not(:disabled), .menu-item:focus-visible { background: var(--gray-100); outline: none; }
.menu-item:disabled { color: var(--gray-400); cursor: not-allowed; }
.menu-item.danger { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger-bg); }
.menu-item .i { color: var(--gray-500); }
.menu-item.danger .i { color: var(--danger); }
.menu-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-label small { display: block; color: var(--gray-500); font-size: 11.5px; }
.menu-hint { color: var(--gray-400); font-size: 12px; }
.menu-check { color: var(--brand-600) !important; }
.menu-sep { height: 1px; background: var(--gray-100); margin: 5px 2px; }
.menu-head { padding: 7px 9px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-400); font-weight: 650; }
.menu-empty { padding: 14px; text-align: center; color: var(--gray-400); font-size: 13px; }
.select-pop { width: 290px; padding: 0; }
.select-search { display: flex; align-items: center; gap: 8px; padding: 9px 11px; border-bottom: 1px solid var(--gray-100); color: var(--gray-400); }
.select-search input { border: 0; outline: 0; flex: 1; min-width: 0; font-size: 13.5px; }
.select-list { padding: 5px; max-height: 300px; overflow-y: auto; }
.check { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--gray-300); display: grid; place-items: center; color: transparent; flex-shrink: 0; }
.check.on { background: var(--brand-500); border-color: var(--brand-500); color: #fff; }
.date-pop { padding: 12px; width: 260px; display: flex; flex-direction: column; gap: 10px; }
.date-pop .quick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.toasts { position: fixed; z-index: 70; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; background: var(--gray-900); color: #fff; padding: 10px 10px 10px 14px; border-radius: 11px; box-shadow: var(--shadow-lg); animation: rise .18s ease-out; font-weight: 500; }
.toast.leaving { opacity: 0; transform: translateY(6px); transition: all .18s; }
.toast-success .i:first-child { color: #4ade80; }
.toast-error { background: #7f1d1d; }
.toast-error .i:first-child { color: #fca5a5; }
.toast-info .i:first-child { color: var(--brand-300); }
.toast-text { flex: 1; }
.toast-action { border: 0; background: rgba(255, 255, 255, .12); color: #fff; padding: 5px 9px; border-radius: 7px; font-weight: 600; }
.toast-close { border: 0; background: none; color: var(--gray-400); display: grid; place-items: center; padding: 4px; border-radius: 6px; }
[data-tip] { position: relative; }
[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); background: var(--gray-900); color: #fff; font-size: 12px; font-weight: 500; padding: 5px 8px; border-radius: 6px; white-space: nowrap; z-index: 80; pointer-events: none; text-transform: none; letter-spacing: 0; }

/* ------------------------------------------------------------ Detalhe ---- */
.td-head { padding: 14px 18px 14px 22px; border-bottom: 1px solid var(--gray-100); display: flex; flex-direction: column; gap: 10px; }
.td-toprow { display: flex; align-items: center; gap: 8px; color: var(--gray-500); font-size: 12.5px; }
.td-title { font-size: 20px; font-weight: 700; line-height: 1.3; outline: none; border-radius: 6px; padding: 2px 4px; margin: -2px -4px; word-break: break-word; }
.td-title[contenteditable="true"]:hover { background: var(--gray-50); }
.td-title[contenteditable="true"]:focus { background: #fff; box-shadow: 0 0 0 2px var(--brand-200); }
.td-props { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.td-prop { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; font-size: 13px; font-weight: 550; }
button.td-prop:hover:not(:disabled) { background: var(--gray-50); border-color: var(--gray-300); }
.td-prop:disabled { cursor: default; }
.td-prop.danger { border-color: #fecaca; background: var(--danger-bg); color: var(--danger); }
.td-prop.warning { border-color: var(--brand-200); background: var(--brand-50); color: var(--brand-700); }
.td-scroll { flex: 1; overflow-y: auto; }
.td-grid { display: grid; grid-template-columns: minmax(0, 1fr) 270px; }
.td-main { padding: 18px 22px 24px; display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.td-side { padding: 18px 18px 24px; border-left: 1px solid var(--gray-100); background: var(--gray-25); display: flex; flex-direction: column; gap: 14px; }
.td-section h4 { font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--gray-800); }
.td-section h4 .i { color: var(--gray-400); }
.td-section h4 .chip-count { margin-left: 2px; }
.td-section h4 .spacer + * { font-weight: 500; }
.desc { white-space: pre-wrap; word-break: break-word; line-height: 1.6; color: var(--gray-800); padding: 8px 10px; margin: -8px -10px; border-radius: 8px; }
.desc.editable:hover { background: var(--gray-50); cursor: text; }
.desc.empty { color: var(--gray-400); }
.side-item { display: flex; flex-direction: column; gap: 3px; }
.side-item .k { font-size: 11.5px; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.side-item .v { font-size: 13.5px; color: var(--gray-900); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; min-width: 0; word-break: break-word; }
.items { display: flex; flex-direction: column; }
.item { display: flex; align-items: center; gap: 10px; padding: 6px 6px; border-radius: 8px; min-height: 36px; }
.item:hover { background: var(--gray-50); }
.item .item-title { flex: 1; min-width: 0; word-break: break-word; outline: none; border-radius: 4px; padding: 1px 3px; }
.item .item-title[contenteditable="true"]:focus { background: #fff; box-shadow: 0 0 0 2px var(--brand-200); }
.item.done .item-title { color: var(--gray-400); text-decoration: line-through; }
.item .item-actions { display: flex; gap: 2px; opacity: 0; }
.item:hover .item-actions, .item:focus-within .item-actions { opacity: 1; }
.item-add { display: flex; gap: 8px; margin-top: 6px; }
.item-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 12.5px; color: var(--gray-600); }
.item-progress .progress { flex: 1; height: 6px; }
.dropzone { border: 1.5px dashed var(--gray-300); border-radius: 11px; padding: 14px; text-align: center; color: var(--gray-500); font-size: 13px; transition: all .12s; cursor: pointer; }
.dropzone:hover, .dropzone.over { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); }
.files { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.file { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 10px; }
.file-icon { width: 34px; height: 34px; border-radius: 8px; background: var(--brand-50); color: var(--brand-600); display: grid; place-items: center; font-size: 10px; font-weight: 800; text-transform: uppercase; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-info strong { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info small { color: var(--gray-500); }
.comments { display: flex; flex-direction: column; gap: 14px; }
.comment { display: flex; gap: 10px; }
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--gray-500); }
.comment-meta strong { color: var(--gray-900); font-size: 13px; }
.comment-text { margin-top: 3px; white-space: pre-wrap; word-break: break-word; line-height: 1.55; background: var(--gray-50); padding: 8px 11px; border-radius: 4px 12px 12px 12px; display: inline-block; max-width: 100%; }
.comment-text .mention { color: var(--brand-700); font-weight: 600; background: var(--brand-50); border-radius: 4px; padding: 0 3px; }
.comment-text.deleted { color: var(--gray-400); font-style: italic; background: transparent; padding-left: 0; }
.comment-actions { display: flex; gap: 10px; margin-top: 4px; font-size: 12px; }
.comment-actions button { border: 0; background: none; padding: 0; color: var(--gray-500); font-weight: 550; }
.comment-actions button:hover { color: var(--gray-900); }
.replies { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--gray-100); display: flex; flex-direction: column; gap: 10px; }
.composer { display: flex; gap: 10px; align-items: flex-start; }
.composer-box { flex: 1; border: 1px solid var(--border); border-radius: 12px; background: #fff; transition: border-color .12s, box-shadow .12s; }
.composer-box:focus-within { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.composer-box textarea { width: 100%; border: 0; outline: 0; resize: none; min-height: 44px; padding: 10px 12px 4px; background: transparent; line-height: 1.5; }
.composer-bar { display: flex; align-items: center; gap: 8px; padding: 4px 6px 6px 12px; font-size: 12px; color: var(--gray-400); }
.replying { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--brand-700); background: var(--brand-50); padding: 3px 8px; border-radius: 6px; margin: 8px 12px 0; }
.history { display: flex; flex-direction: column; }
.hist { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 7px 0; font-size: 13px; position: relative; border-bottom: 1px dashed var(--gray-100); }
.hist:last-child { border-bottom: 0; }
.hist time { color: var(--gray-400); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.hist b { font-weight: 600; }
.hist .change { color: var(--gray-500); }
.hist .change del { color: var(--gray-400); }
.hist .change ins { text-decoration: none; color: var(--gray-900); font-weight: 550; }
.td-footer-bar { display: flex; gap: 8px; padding: 10px 18px; border-top: 1px solid var(--gray-100); background: #fff; }

/* ------------------------------------------------------------ Formulário - */
.form-section { padding: 16px 0; border-bottom: 1px solid var(--gray-100); }
.form-section:first-child { padding-top: 0; }
.form-section:last-child { border-bottom: 0; padding-bottom: 0; }
.form-section > h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--gray-500); font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.picker-field { min-height: 38px; border: 1px solid var(--border); border-radius: 8px; background: #fff; display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 4px 8px; cursor: pointer; text-align: left; width: 100%; }
.picker-field:hover { border-color: var(--gray-300); }
.picker-field .placeholder { color: var(--gray-400); padding: 0 3px; }
.picker-field .tag button { border: 0; background: none; padding: 0; margin-left: 2px; color: var(--gray-500); display: grid; place-items: center; }
.picker-field .caret { margin-left: auto; color: var(--gray-400); }
.workload { border: 1px solid var(--gray-100); background: var(--gray-25); border-radius: 10px; padding: 10px 12px; margin-top: 8px; }
.workload-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 80px auto; gap: 8px; align-items: center; padding: 4px 0; font-size: 12.5px; }
.workload-row .progress { height: 6px; }
.workload-row.current { font-weight: 650; }
.workload-row button { border: 0; background: none; padding: 0; text-align: left; color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workload-row button:hover { color: var(--brand-700); }
.editable-list { display: flex; flex-direction: column; gap: 6px; }
.editable-list .el-row { display: flex; gap: 6px; align-items: center; }
.rec-box { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: var(--gray-25); display: flex; flex-direction: column; gap: 12px; }
.rec-preview { font-size: 12.5px; color: var(--gray-600); background: #fff; border: 1px dashed var(--gray-300); border-radius: 9px; padding: 8px 10px; }
.rec-preview strong { color: var(--gray-900); }

/* ------------------------------------------------------------ Dashboards - */
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 12px 0 20px; flex-wrap: wrap; }
.hello h1 { font-size: 28px; font-weight: 780; letter-spacing: -.02em; }
.hello h1 span { color: var(--brand-600); }
.hello p { color: var(--muted); margin-top: 4px; text-transform: none; }
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; }
.col-12 { grid-column: span 12; } .col-8 { grid-column: span 8; } .col-7 { grid-column: span 7; } .col-6 { grid-column: span 6; }
.col-5 { grid-column: span 5; } .col-4 { grid-column: span 4; } .col-3 { grid-column: span 3; }
.day-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mini-list { display: flex; flex-direction: column; }
.mini-task { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--gray-100); min-width: 0; }
.mini-task:last-child { border-bottom: 0; }
.mini-task .mt-body { flex: 1; min-width: 0; cursor: pointer; }
.mini-task .mt-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-task .mt-title:hover { color: var(--brand-700); }
.mini-task .mt-sub { display: flex; gap: 8px; align-items: center; font-size: 12px; color: var(--gray-500); min-width: 0; }
.mini-task .mt-sub span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.week-day { background: var(--gray-50); border-radius: 11px; padding: 8px; min-height: 150px; display: flex; flex-direction: column; gap: 5px; min-width: 0; border: 1px solid transparent; }
.week-day.today { background: var(--brand-50); border-color: var(--brand-200); }
.week-day-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: var(--gray-500); font-weight: 650; text-transform: uppercase; margin-bottom: 2px; }
.week-day-head strong { font-size: 17px; color: var(--gray-900); }
.week-day.today .week-day-head strong { color: var(--brand-600); }
.progress-card { display: flex; align-items: center; gap: 18px; }
.progress-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; flex: 1; }
.progress-stats div { display: flex; flex-direction: column; }
.progress-stats b { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.progress-stats span { font-size: 12px; color: var(--gray-500); }
.ring-value { font-size: 22px; font-weight: 780; fill: var(--gray-900); }
.ring-label, .donut-sub { font-size: 11px; fill: var(--gray-500); }
.donut-center { font-size: 24px; font-weight: 780; fill: var(--gray-900); }
.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--gray-600); }
.donut-wrap .legend { flex-direction: column; flex: 1; min-width: 150px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.legend b { margin-left: auto; color: var(--gray-900); font-variant-numeric: tabular-nums; padding-left: 8px; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 150px) 1fr 40px; gap: 10px; align-items: center; font-size: 13px; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gray-700); }
.hbar-label small { color: var(--gray-400); margin-left: 5px; }
.hbar-track { height: 10px; background: var(--gray-100); border-radius: 99px; overflow: hidden; display: flex; }
.hbar-track > i { display: block; height: 100%; background: var(--c); border-radius: 99px; }
.hbar-track.stacked { background: transparent; }
.hbar-track.stacked::before { content: none; }
.hbar-track.stacked { width: 100%; }
.hbar-track.stacked > i { border-radius: 0; }
.hbar-track.stacked > i:first-child { border-top-left-radius: 99px; border-bottom-left-radius: 99px; }
.hbar-track.stacked > i:last-child { border-top-right-radius: 99px; border-bottom-right-radius: 99px; }
.hbar-value { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.columns { width: 100%; height: 220px; display: block; margin-top: 8px; }
.columns .axis { font-size: 10px; fill: var(--gray-400); }
.columns .grid { stroke: var(--gray-100); }
.chart-empty { color: var(--gray-400); font-size: 13px; padding: 20px 0; text-align: center; }
.indicator { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; }
.indicator .k { font-size: 12.5px; color: var(--gray-500); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.indicator .v { font-size: 24px; font-weight: 780; letter-spacing: -.02em; }
.indicator .s { font-size: 12px; color: var(--gray-500); }
.alerts { display: flex; flex-direction: column; gap: 8px; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 13px; background: var(--warning-bg); color: #78350f; border: 1px solid #fde68a; }
.alert.high { background: var(--danger-bg); color: #7f1d1d; border-color: #fecaca; }
.alert.info { background: var(--gray-50); color: var(--gray-700); border-color: var(--border); }
.alert.success { background: var(--success-bg); color: #14532d; border-color: #bbf7d0; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--gray-500); font-weight: 650; padding: 9px 12px; background: var(--gray-50); border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--gray-100); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--gray-25); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.rate { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.rate .progress { flex: 1; height: 6px; }
.rate b { width: 40px; text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ Empresas --- */
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; }
.company-card { padding: 16px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; transition: border-color .12s, box-shadow .12s; }
.company-card:hover { border-color: var(--gray-300); box-shadow: var(--shadow); }
.company-card h3 { font-size: 15px; font-weight: 650; }
.company-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--gray-900); color: #fff; display: grid; place-items: center; font-weight: 750; flex-shrink: 0; }
.company-counts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.company-counts div { background: var(--gray-50); border-radius: 8px; padding: 7px 8px; }
.company-counts b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.company-counts span { font-size: 11px; color: var(--gray-500); }
.company-counts .danger b { color: var(--danger); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 14px; overflow-x: auto; }
.tabs button, .tabs a { border: 0; background: none; padding: 10px 12px; font-weight: 600; color: var(--gray-500); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; }
.tabs button:hover, .tabs a:hover { color: var(--gray-900); }
.tabs .active { color: var(--gray-900); border-bottom-color: var(--brand-500); }

/* ------------------------------------------------------------ Notificações */
.notif-list { display: flex; flex-direction: column; }
.notif { display: flex; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--gray-100); cursor: pointer; position: relative; }
.notif:hover { background: var(--gray-25); }
.notif.unread { background: #fffaf5; }
.notif.unread::after { content: ""; position: absolute; right: 14px; top: 18px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-500); }
.notif-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--gray-100); color: var(--gray-600); flex-shrink: 0; }
.notif-icon.danger { background: var(--danger-bg); color: var(--danger); }
.notif-icon.brand { background: var(--brand-50); color: var(--brand-600); }
.notif-icon.success { background: var(--success-bg); color: var(--success); }
.notif-body { flex: 1; min-width: 0; padding-right: 16px; }
.notif-body strong { display: block; font-weight: 600; line-height: 1.35; }
.notif-body p { color: var(--gray-500); font-size: 13px; white-space: pre-line; margin-top: 2px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.notif-body time { font-size: 12px; color: var(--gray-400); }
.notif-pop { width: 380px; padding: 0; }
.notif-pop header { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--gray-100); }
.notif-pop .notif-list { max-height: 420px; overflow-y: auto; }
.notif-pop footer { padding: 8px; border-top: 1px solid var(--gray-100); text-align: center; }

/* ------------------------------------------------------------ Settings --- */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 10px); display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--gray-600); font-weight: 550; }
.settings-nav a:hover { background: var(--gray-100); color: var(--gray-900); }
.settings-nav a.active { background: #fff; color: var(--gray-900); box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.settings-nav a.active .i { color: var(--brand-600); }
.perm-matrix th:not(:first-child), .perm-matrix td:not(:first-child) { text-align: center; }
.code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; background: var(--gray-950); color: #e4e4e7; padding: 12px 14px; border-radius: 10px; overflow-x: auto; white-space: pre; line-height: 1.55; }
.code-inline { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--gray-100); padding: 1px 6px; border-radius: 5px; }
.color-input { width: 38px; height: 34px; padding: 2px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; }
.rule-card { border: 1px solid var(--border); border-radius: 12px; padding: 14px; background: #fff; display: flex; gap: 14px; align-items: flex-start; }
.rule-flow { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; margin-top: 6px; }
.rule-flow .arrow { color: var(--gray-400); }

/* ------------------------------------------------- Duas etapas (2FA) ----- */
.tf-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); padding: 24px 0; justify-content: center; }
.tf-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 16px; line-height: 1.5; }
.tf-steps li::marker { font-weight: 700; color: var(--brand-600); }
.tf-qr { display: inline-block; margin: 10px 0 4px; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 12px; line-height: 0; }
.tf-manual { margin-top: 4px; font-size: 13px; }
.tf-manual summary { cursor: pointer; color: var(--brand-700); font-weight: 550; }
.tf-secret { display: inline-block; font-family: ui-monospace, Consolas, monospace; font-size: 15px; letter-spacing: .08em; background: var(--gray-100); padding: 8px 12px; border-radius: 8px; margin: 6px 0; word-break: break-all; }
.tf-code { font-size: 22px; letter-spacing: .35em; text-align: center; font-family: ui-monospace, Consolas, monospace; height: 48px; max-width: 220px; }
.tf-error { color: var(--danger); font-size: 13px; margin-top: 10px; font-weight: 550; }
.tf-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.tf-codes code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; background: var(--gray-50); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; text-align: center; letter-spacing: .05em; }
.tf-done h4 { margin: 18px 0 6px; font-size: 14px; }
.login-2fa { display: flex; flex-direction: column; gap: 16px; }
.login-2fa .tf-code { max-width: none; }
.tf-help { font-size: 13px; }
.tf-help summary { cursor: pointer; color: var(--gray-600); }
.tf-help p { margin-top: 8px; line-height: 1.5; }
@media (max-width: 560px) { .tf-codes { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------ Estados ---- */
.empty { text-align: center; padding: 42px 20px; color: var(--gray-500); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--gray-100); color: var(--gray-400); display: grid; place-items: center; margin-bottom: 4px; }
.empty h3 { font-size: 15px; color: var(--gray-900); font-weight: 650; }
.empty p { max-width: 360px; font-size: 13.5px; }
.empty.success .empty-icon { background: var(--success-bg); color: var(--success); }
.empty.compact { padding: 18px 10px; }
.empty.compact .empty-icon { width: 40px; height: 40px; border-radius: 12px; }
.sk { background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-150) 37%, var(--gray-100) 63%); background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.sk-rows { display: flex; flex-direction: column; gap: 10px; padding: 14px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); }
.sk-row { height: 34px; width: var(--w); }
.sk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.sk-card { height: 96px; border-radius: var(--radius-lg); }
.sk-board { display: flex; gap: 12px; }
.sk-col { flex: 0 0 280px; display: flex; flex-direction: column; gap: 8px; padding: 10px; background: var(--gray-100); border-radius: 14px; }
.sk-kcard { height: 90px; background: #fff; }

/* ------------------------------------------------------------ Login ------ */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: linear-gradient(165deg, var(--roifin-dark), var(--roifin-darker)); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::after { content: ""; position: absolute; width: 520px; height: 520px; right: -180px; bottom: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(30, 187, 154, .32), transparent 65%); }
.login-logo { width: 240px; height: auto; position: relative; z-index: 1; }
.login-logo-mobile { display: none; width: 160px; height: auto; align-self: flex-start; }
.login-art h2 { font-size: 34px; font-weight: 780; line-height: 1.15; max-width: 440px; letter-spacing: -.02em; }
.login-art h2 span { color: var(--brand-500); }
.login-art ul { list-style: none; padding: 0; margin: 26px 0 0; display: flex; flex-direction: column; gap: 12px; color: var(--gray-300); position: relative; z-index: 1; }
.login-art li { display: flex; gap: 10px; align-items: center; }
.login-art li .i { color: var(--brand-500); }
.login-form { display: grid; place-items: center; padding: 32px; background: #fff; }
.login-form form { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 16px; }
.login-form h1 { font-size: 24px; font-weight: 750; }
.demo-users { font-size: 12.5px; color: var(--gray-500); border: 1px dashed var(--gray-300); border-radius: 10px; padding: 10px 12px; }
.demo-users button { border: 0; background: var(--gray-100); border-radius: 6px; padding: 3px 7px; margin: 3px 3px 0 0; font-size: 12px; }
.demo-users button:hover { background: var(--brand-100); }
.error-box { background: var(--danger-bg); color: #991b1b; border: 1px solid #fecaca; padding: 9px 12px; border-radius: 9px; font-size: 13px; }

/* ------------------------------------------------------------ Responsivo - */
@media (min-width: 861px) {
  .tlist { overflow-x: auto; }
  .tlist .trow { min-width: 880px; }
}
@media (max-width: 1640px) {
  .trow { grid-template-columns: 34px minmax(220px, 2.4fr) minmax(110px, 1fr) 140px 90px 130px 124px 40px; }
  .trow .c-rec, .trow .c-updated { display: none; }
}
@media (max-width: 1280px) {
  .trow { grid-template-columns: 34px minmax(200px, 2fr) minmax(96px, 1fr) 128px 84px 124px 116px 36px; gap: 8px; }
}
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .col-8, .col-7, .col-6, .col-5, .col-4 { grid-column: span 12; }
  .col-3 { grid-column: span 6; }
  .td-grid { grid-template-columns: 1fr; }
  .td-side { border-left: 0; border-top: 1px solid var(--gray-100); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 272px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0, 0, 0, .4); z-index: 25; }
  .topbar .menu-toggle { display: inline-grid; }
  .company-scope { width: 170px; }
  .settings { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .settings-nav a { white-space: nowrap; }
}
@media (max-width: 860px) {
  :root { --topbar-h: 56px; }
  .view { padding: 4px 14px 96px; }
  .topbar { padding: 0 12px; gap: 6px; }
  .topbar .btn-new-task, .topbar .company-scope, .global-search kbd { display: none; }
  .global-search { max-width: none; }
  .page-head h1 { font-size: 21px; }
  .hello h1 { font-size: 23px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 11px 12px; }
  .stat-value { font-size: 22px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .col-3 { grid-column: span 12; }
  .day-cols { grid-template-columns: 1fr; }
  .week-strip { grid-template-columns: repeat(7, 150px); overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .week-day { scroll-snap-align: start; }
  .toolbar .input-icon { width: 100%; }
  .toolbar .desktop-only { display: none; }
  /* Lista vira cards */
  .tlist { background: transparent; border: 0; box-shadow: none; display: flex; flex-direction: column; gap: 8px; overflow: visible; }
  .trow.head { display: none; }
  .trow { grid-template-columns: 26px 1fr auto; grid-template-areas: "cb title actions" "cb meta meta"; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px 10px; gap: 6px 10px; min-height: 0; box-shadow: var(--shadow-sm); }
  .trow > .c-cb { grid-area: cb; align-self: start; padding-top: 10px; }
  .trow > .c-title { grid-area: title; }
  .trow > .c-actions { grid-area: actions; align-self: start; padding-top: 4px; }
  .trow > .c-company, .trow > .c-assignee, .trow > .c-priority, .trow > .c-status, .trow > .c-due { grid-column: 2 / 4; }
  .trow .cell.c-company, .trow .cell.c-assignee, .trow .cell.c-priority, .trow .cell.c-status, .trow .cell.c-due { display: none; }
  .trow .m-meta { display: flex; }
  .board { margin: 0 -14px; padding: 0 14px 12px; scroll-snap-type: x mandatory; }
  .column { flex-basis: 84vw; max-height: none; }
  .cal-day { min-height: 64px; padding: 3px; }
  .cal-day .cal-chip { font-size: 0; padding: 0; height: 6px; border-radius: 3px; border-left: 0; background: var(--c, var(--gray-400)); }
  .cal-day .cal-chip time, .cal-day .cal-chip span { display: none; }
  .cal-more { font-size: 10px; padding: 0 2px; }
  .cal-week { grid-template-columns: 1fr; }
  .cal-week .cal-col { min-height: 0; border-right: 0; border-bottom: 1px solid var(--gray-100); }
  .drawer { width: 100vw; }
  .td-side { grid-template-columns: 1fr 1fr; }
  .td-head { padding: 12px 14px; }
  .td-main { padding: 14px; }
  .modal-overlay { padding: 0; align-items: end; }
  .modal { max-height: 94vh; border-radius: 18px 18px 0 0; }
  .modal-foot { border-radius: 0; }
  .toasts { left: 12px; right: 12px; bottom: 76px; align-items: stretch; }
  .toast { max-width: none; }
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a, .bottom-nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; color: var(--gray-500); font-weight: 600; position: relative; padding: 4px 0; }
  .bottom-nav .active { color: var(--brand-600); }
  .bottom-nav .bn-new { width: 46px; height: 46px; border-radius: 14px; background: var(--brand-500); color: #fff; place-self: center; justify-content: center; margin-top: -18px; box-shadow: 0 8px 20px -6px rgba(249, 115, 22, .7); }
  .bottom-nav .bell-count { top: 0; right: 22%; box-shadow: 0 0 0 2px #fff; }
  .login { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-logo-mobile { display: block; }
  .notif-pop { width: calc(100vw - 16px); }
  .progress-card { flex-direction: column; align-items: stretch; }
  .hbar { grid-template-columns: 100px 1fr 34px; }
  .company-counts b { font-size: 15px; }
}
.m-meta { display: none; grid-column: 2 / 4; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@media print { .sidebar, .topbar, .bottom-nav, .toolbar, .bulkbar { display: none !important; } .app { display: block; } }
