/* GA — Sistema de Gestão de Agência */
:root {
  --primary: #6d4aff; --primary-d: #5a37f0; --primary-l: #efeaff;
  --ok: #10b981; --ok-d: #059669; --warn: #f59e0b; --bad: #ef4444; --info: #0ea5e9;
  --bg: #f4f5fa; --panel: #fff; --line: #e6e8f0; --line-2: #eef0f6;
  --text: #1b1f33; --muted: #6b7189; --side: #12142b; --side-2: #1c1f3d;
  --r: 14px; --shadow: 0 1px 2px rgba(20,24,60,.05), 0 6px 18px rgba(20,24,60,.05);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
body.modal-open { overflow: hidden; }
body.busy, body.busy * { cursor: progress !important; }
a { color: var(--primary); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5 { margin: 0; line-height: 1.25; }
p { margin: 0; }
button { font: inherit; cursor: pointer; }
code { background: var(--line-2); padding: 1px 6px; border-radius: 6px; font-size: .9em; }
.ic { flex: none; vertical-align: -3px; }
.boot { display: grid; place-items: center; height: 100vh; color: var(--muted); }
.hide, [hidden] { display: none !important; }
.sp { flex: 1; }
.muted { color: var(--muted); } .sm { font-size: 13px; } .xs { font-size: 12px; } .center { text-align: center; }
.neg { color: var(--bad); } .pos { color: var(--ok-d); } .nowrap { white-space: nowrap; }
.pre { white-space: pre-wrap; }
.mt-0 { margin-top: 0; margin-bottom: 8px; }
small { color: var(--muted); font-size: 12px; }

/* ---------- layout ---------- */
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); height: 100vh; }
.sidebar { background: var(--side); color: #c9cde8; display: flex; flex-direction: column; padding: 18px 14px; gap: 14px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 10px; }
.brand b { color: #fff; font-size: 15px; display: block; } .brand small { color: #8a8fb5; }
.logo { width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(135deg, #7c5cff, #ff4ecd); color: #fff; font-weight: 800; display: grid; place-items: center; letter-spacing: .5px; box-shadow: 0 6px 16px rgba(109,74,255,.45); }
.logo.xl { width: 64px; height: 64px; font-size: 26px; border-radius: 18px; }
nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-i { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #b4b9d9; font-weight: 500; position: relative; }
.nav-i:hover { background: var(--side-2); color: #fff; text-decoration: none; }
.nav-i.on { background: linear-gradient(135deg, rgba(124,92,255,.32), rgba(255,78,205,.16)); color: #fff; }
.nav-i.on::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: #9d85ff; }
.nav-n { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 700; background: #3a3f6e; color: #fff; border-radius: 999px; padding: 1px 8px; }
.nav-n.hot { background: var(--bad); }
.side-foot { display: flex; align-items: center; gap: 8px; border-top: 1px solid #272a4d; padding-top: 14px; }
.me { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; padding: 4px; border-radius: 10px; }
.me:hover { background: var(--side-2); }
.me b { color: #fff; font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .me small { color: #8a8fb5; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .icon-btn { color: #b4b9d9; } .sidebar .icon-btn:hover { background: var(--side-2); color: #fff; }
.main { overflow-y: auto; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 22px 30px 8px; flex-wrap: wrap; }
.page-h { flex: 1; min-width: 220px; }
.page-h h1 { font-size: 24px; letter-spacing: -.3px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-h p { color: var(--muted); margin-top: 4px; }
.top-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.page { padding: 14px 30px 48px; max-width: 1480px; display: flex; flex-direction: column; gap: 18px; }
.topbar .menu-btn, .scrim { display: none; }
.back { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--panel); border: 1px solid var(--line); color: var(--text); }

/* ---------- botões / campos ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--text); font-weight: 600; font-size: 14px; transition: .15s; white-space: nowrap; text-decoration: none !important; }
.btn:hover { background: #f8f8fd; border-color: #d3d6e6; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(109,74,255,.28); }
.btn.primary:hover { background: var(--primary-d); }
.btn.success { background: var(--ok); border-color: var(--ok); color: #fff; } .btn.success:hover { background: var(--ok-d); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-o { color: var(--bad); border-color: #f6c8c8; } .btn.danger-o:hover { background: #fff1f1; }
.btn.ghost { background: transparent; }
.btn.sm { padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 13px 18px; font-size: 15px; }
.btn.block { width: 100%; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent; color: var(--muted); }
.icon-btn:hover { background: var(--line-2); color: var(--text); }
.inp { width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; color: var(--text); transition: .15s; }
.inp:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(109,74,255,.15); }
.inp.sm { padding: 6px 10px; font-size: 13px; width: auto; max-width: 100%; }
.inp.ro { background: var(--line-2); color: var(--muted); }
textarea.inp { resize: vertical; min-height: 60px; }
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fld-l { font-weight: 600; font-size: 13px; color: #3a3f5c; }
.hint { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.chk { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.chk input { width: 16px; height: 16px; accent-color: var(--primary); }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; } .stack-s { display: flex; flex-direction: column; gap: 8px; } .stack-l { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; } .row.gap { gap: 10px; } .row.gap-s { gap: 6px; } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.end { justify-content: flex-end; }
.sec-t { font-size: 12px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-top: 4px; }
.form-error { background: #fff1f1; color: #b42318; border: 1px solid #f6c8c8; border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.quick-add { display: grid; grid-template-columns: 1fr 150px auto; gap: 8px; margin-bottom: 14px; }

/* ---------- cartões ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-h h3 { font-size: 15.5px; display: flex; align-items: center; gap: 8px; }
.card-actions { display: flex; gap: 8px; align-items: center; }
.count { display: inline-block; background: var(--line-2); color: var(--muted); font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 6px; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid-agenda { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 18px; align-items: start; }
.tabs { display: flex; gap: 4px; background: #e9ebf4; padding: 4px; border-radius: 12px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; border-radius: 9px; font-weight: 600; color: var(--muted); white-space: nowrap; display: flex; align-items: center; }
.tabs button.on { background: #fff; color: var(--text); box-shadow: 0 1px 4px rgba(20,24,60,.1); }
.tabs .count { margin-left: 8px; background: rgba(0,0,0,.06); }
.toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.seg { display: inline-flex; background: #e9ebf4; padding: 3px; border-radius: 10px; }
.seg button { border: 0; background: transparent; padding: 6px 14px; border-radius: 8px; font-weight: 600; color: var(--muted); }
.seg button.on { background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(20,24,60,.1); }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c) 14%, white); color: color-mix(in srgb, var(--c) 78%, black); white-space: nowrap; }
.badge.soft { background: color-mix(in srgb, var(--c) 9%, white); }
.chip { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 6px; background: color-mix(in srgb, var(--c) 14%, white); color: color-mix(in srgb, var(--c) 75%, black); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; color: color-mix(in srgb, var(--c, #64748b) 80%, black); }
.tag.soft { background: var(--line-2); color: var(--muted); padding: 1px 7px; border-radius: 6px; }
.avatar { width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: calc(var(--s) * .4); flex: none; }
.avatar.ghost { background: #cbd0e2; }
.pill { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; }
.pill.good { background: #d1fae5; color: #065f46; } .pill.warn { background: #fef3c7; color: #92400e; } .pill.bad { background: #fee2e2; color: #991b1b; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { display: flex; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); }
.kpi.link { cursor: pointer; transition: .15s; } .kpi.link:hover { transform: translateY(-2px); border-color: #cfc6ff; }
.kpi-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--primary-l); color: var(--primary); flex: none; }
.kpi.good .kpi-ic { background: #d1fae5; color: #047857; } .kpi.warn .kpi-ic { background: #fef3c7; color: #b45309; } .kpi.bad .kpi-ic { background: #fee2e2; color: #b91c1c; }
.kpi small { display: block; font-weight: 600; } .kpi b { font-size: 22px; letter-spacing: -.4px; display: block; line-height: 1.2; } .kpi em { font-style: normal; font-size: 12px; color: var(--muted); }

/* ---------- listas ---------- */
.list { display: flex; flex-direction: column; }
.list .row-item { border-bottom: 1px solid var(--line-2); }
.list .row-item:last-child { border-bottom: 0; }
.row-item { display: flex; align-items: center; gap: 12px; padding: 11px 6px; cursor: pointer; border-radius: 10px; }
.row-item:hover { background: #f7f7fc; }
.ri-main { flex: 1; min-width: 0; } .ri-main b { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ri-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-end { display: flex; align-items: center; gap: 8px; flex: none; flex-wrap: wrap; justify-content: flex-end; }
.ri-thumb { width: 42px; height: 42px; border-radius: 10px; background-size: cover; background-position: center; display: grid; place-items: center; flex: none; }
.ri-date { width: 44px; height: 46px; border-radius: 11px; background: color-mix(in srgb, var(--c) 13%, white); color: color-mix(in srgb, var(--c) 75%, black); display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; }
.ri-date b { font-size: 17px; line-height: 1; } .ri-date small { color: inherit; text-transform: uppercase; font-size: 10px; font-weight: 700; }
.list.tight .row-item { padding: 8px 4px; }
.card-list { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 12px; }
.check { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #c3c7da; background: #fff; flex: none; display: grid; place-items: center; color: #fff; padding: 0; }
.check:hover { border-color: var(--ok); } .check.on { background: var(--ok); border-color: var(--ok); }
.task-ceo.done .ri-main b { text-decoration: line-through; color: var(--muted); }
.group-t { margin: 14px 0 4px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); } .group-t.late { color: var(--bad); }
.atts { display: flex; flex-direction: column; gap: 8px; }
.att { display: flex; gap: 12px; align-items: flex-start; padding: 11px 13px; border-radius: 11px; background: #f5f6fb; cursor: pointer; font-size: 13.5px; }
.att span { flex: 1; min-width: 0; } .att small { display: block; }
.att.late, .att.bad { background: #fff1f1; color: #991b1b; } .att.late small, .att.bad small { color: #b45a5a; }
.att.warn { background: #fff8e6; color: #92400e; } .att.warn small { color: #a8782f; }
.att.ok { background: #ecfdf5; color: #065f46; } .att.info { background: #eef6ff; color: #1e4e8c; }
.att:hover { filter: brightness(.98); }
.hbars { display: flex; flex-direction: column; gap: 11px; }
.hbar { display: grid; grid-template-columns: 150px 1fr 90px; gap: 12px; align-items: center; font-size: 13.5px; }
.hbar span small { display: block; } .hbar div { height: 10px; border-radius: 99px; background: var(--line-2); overflow: hidden; } .hbar div i { display: block; height: 100%; border-radius: 99px; background: var(--primary); } .hbar b { text-align: right; }
.hbars.cost .hbar { grid-template-columns: 1.3fr 1fr 100px; } .hbars.cost div i { background: linear-gradient(90deg, #f59e0b, #f97316); }
.total-line { display: flex; justify-content: space-between; border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 12px; font-size: 15px; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin: 6px 0 12px; }
.mini-stats > div { background: #f6f7fc; border-radius: 12px; padding: 12px; } .mini-stats b { font-size: 20px; display: block; }
.bullets { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; color: #3a3f5c; }
.empty { text-align: center; padding: 26px 14px; color: var(--muted); }
.empty h4 { color: var(--text); margin: 8px 0 4px; } .empty-ic { width: 52px; height: 52px; margin: 0 auto; display: grid; place-items: center; border-radius: 16px; background: var(--primary-l); color: var(--primary); }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- avisos ---------- */
.banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); }
.banner > span:first-of-type { flex: 1; }
.banner.demo { background: #fff8e6; border-color: #f7dfa1; color: #7a4b05; }
.banner.action { background: linear-gradient(135deg, #f3efff, #fff0fa); border-color: #d9ccff; cursor: pointer; color: #3b2a8f; }
.banner.info { background: #eef6ff; border-color: #cfe3fb; color: #1e4e8c; } .banner.bad { background: #fff1f1; border-color: #f6c8c8; color: #991b1b; }
.note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 11px; background: #f3f4fa; font-size: 13.5px; color: #3a3f5c; }
.note .ic { margin-top: 2px; }
.note.warn { background: #fff8e6; color: #7a4b05; } .note.ok { background: #ecfdf5; color: #065f46; } .note.info { background: #eef6ff; color: #1e4e8c; } .note.lock { background: #f3efff; color: #4a35b8; }

/* ---------- Kanban ---------- */
.kanban { display: grid; grid-template-columns: repeat(6, minmax(248px, 1fr)); gap: 14px; overflow-x: auto; align-items: start; padding-bottom: 14px; }
.kcol { background: #eceef6; border-radius: 16px; padding: 10px; }
.kcol-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-size: 13.5px; } .kcol-h i { width: 10px; height: 10px; border-radius: 50%; } .kcol-h .count { margin-left: auto; background: #fff; }
.kcol-b { display: flex; flex-direction: column; gap: 10px; min-height: 110px; border-radius: 12px; transition: background .15s; padding: 2px; }
.kcol-b.over { background: rgba(109,74,255,.12); outline: 2px dashed #9d85ff; outline-offset: -2px; }
.kcard { background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 1px 3px rgba(20,24,60,.08); cursor: pointer; display: flex; flex-direction: column; gap: 8px; border: 1px solid transparent; transition: .15s; }
.kcard[draggable=true] { cursor: grab; }
.kcard:hover { border-color: #cfc6ff; box-shadow: 0 6px 16px rgba(20,24,60,.1); }
.kcard.dragging { opacity: .4; } .kcard.high { border-left: 4px solid var(--bad); }
.kthumb { height: 104px; border-radius: 8px; background-size: cover; background-position: center; margin: -4px -4px 0; }
.kcard-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; } .prio { color: var(--bad); }
.kcard-title { font-weight: 600; line-height: 1.3; }
.kcard-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; }
.due { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-weight: 600; font-size: 12px; } .due.late { color: var(--bad); } .due.today { color: #d97706; } .due.soon { color: #ca8a04; } .due.ok { color: var(--ok-d); }
.rev { display: inline-flex; align-items: center; gap: 3px; color: #ea580c; font-weight: 700; }
.kempty { text-align: center; color: #a4a9c3; font-size: 13px; padding: 16px 0; } .kmore { text-align: center; color: var(--muted); font-size: 12px; padding: 6px; }

/* ---------- Calendário ---------- */
.cal-card { padding: 14px; }
.cal-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.cal-nav { display: flex; align-items: center; gap: 6px; } .cal-title { margin-left: 10px; font-size: 18px; } .cal-title::first-letter, .month-nav b::first-letter { text-transform: uppercase; }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 6px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.cal-cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 118px; padding: 4px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.cal-cell:hover { background: #fafaff; } .cal-cell.other { background: #fafbfe; } .cal-cell.other .cal-num { opacity: .4; }
.cal-num { text-align: right; font-size: 12.5px; font-weight: 600; padding: 2px 4px; } .cal-cell.today .cal-num span { background: var(--primary); color: #fff; padding: 2px 7px; border-radius: 999px; }
.cal-chip { font-size: 11.5px; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c) 15%, white); color: color-mix(in srgb, var(--c) 70%, black); border-left: 3px solid var(--c); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; cursor: pointer; display: flex; gap: 4px; align-items: center; font-weight: 600; }
.cal-chip b { font-weight: 800; } .cal-chip span { overflow: hidden; text-overflow: ellipsis; }
.cal-chip:hover { filter: brightness(.96); } .cal-chip.done { opacity: .55; text-decoration: line-through; } .cal-chip.late { border-left-color: var(--bad); background: #fff1f1; color: #991b1b; }
.cal-more { font-size: 11.5px; color: var(--muted); font-weight: 700; padding: 0 6px; }
.cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--muted); } .cal-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.cal-week { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wk-head, .wk-allday { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); }
.wk-head { background: #fafbfe; border-bottom: 1px solid var(--line); }
.wk-h { text-align: center; padding: 8px 0; display: flex; flex-direction: column; gap: 2px; border-left: 1px solid var(--line); } .wk-h small { text-transform: uppercase; font-weight: 700; } .wk-h b { font-size: 18px; } .wk-h.today b { color: var(--primary); }
.wk-allday { border-bottom: 1px solid var(--line); min-height: 40px; } .wk-allday .wk-gut { font-size: 10px; display: grid; place-items: center; }
.wk-ad { border-left: 1px solid var(--line); padding: 3px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.wk-body { display: grid; grid-template-columns: 56px repeat(7, minmax(0, 1fr)); max-height: 560px; overflow-y: auto; }
.wk-hr { height: var(--hh); font-size: 11px; color: var(--muted); text-align: right; padding-right: 8px; } .wk-hr span { position: relative; top: -7px; }
.wk-col { position: relative; border-left: 1px solid var(--line); cursor: pointer; background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hh) - 1px), var(--line-2) calc(var(--hh) - 1px), var(--line-2) var(--hh)); }
.wk-col.today { background-color: #fbfaff; }
.wk-ev { position: absolute; border-radius: 8px; padding: 3px 6px; font-size: 11.5px; overflow: hidden; background: color-mix(in srgb, var(--c) 16%, white); border-left: 3px solid var(--c); color: color-mix(in srgb, var(--c) 65%, black); cursor: pointer; font-weight: 600; line-height: 1.25; }
.wk-ev b { display: block; font-size: 10.5px; } .wk-ev small { display: block; color: inherit; opacity: .8; font-weight: 500; } .wk-ev:hover { z-index: 3; filter: brightness(.96); } .wk-ev.done { opacity: .55; }
.wk-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--bad); z-index: 2; } .wk-now::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.sm-chk { margin-bottom: 10px; display: flex; }

/* ---------- medidores ---------- */
.meter { background: #f6f7fc; border-radius: 12px; padding: 12px 14px; }
.meter-h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; } .meter-h b { font-size: 18px; } .meter-h small { font-size: 13px; }
.meter-bar { height: 9px; background: #e3e6f1; border-radius: 99px; overflow: hidden; margin: 8px 0 6px; } .meter-bar i { display: block; height: 100%; border-radius: 99px; background: var(--ok); }
.meter.warn .meter-bar i { background: var(--warn); } .meter.over .meter-bar i { background: var(--bad); } .meter-n { font-size: 12.5px; color: var(--muted); } .meter.over .meter-n { color: var(--bad); font-weight: 700; }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 190px; padding-top: 10px; }
.bars-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.bars-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 5px; }
.bar { display: block; width: 36%; max-width: 30px; border-radius: 6px 6px 0 0; min-height: 2px; } .bar.a { background: var(--primary); } .bar.b { background: #f59e0b; }
.bars-l { font-size: 12px; font-weight: 600; text-transform: capitalize; } .bars-v { font-size: 11.5px; font-weight: 700; } .bars-v.pos { color: var(--ok-d); } .bars-v.neg { color: var(--bad); }
.month-nav { display: flex; align-items: center; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 3px 6px; } .month-nav b { min-width: 140px; text-align: center; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table td small { display: block; } .table .r { text-align: right; } .table tr.click { cursor: pointer; } .table tr.click:hover { background: #f7f7fc; }
.table tfoot td { border-top: 2px solid var(--line); border-bottom: 0; background: #fafbfe; }

/* ---------- arquivos / tarefa ---------- */
.files { display: flex; flex-wrap: wrap; gap: 12px; } .files.multi .file.img img { max-height: 150px; }
.file-wrap { position: relative; max-width: 100%; }
.x-btn { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(20,24,60,.75); color: #fff; display: grid; place-items: center; opacity: 0; transition: .15s; } .file-wrap:hover .x-btn { opacity: 1; }
.file { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.file.img img { display: block; max-width: 100%; max-height: 180px; object-fit: contain; background: #f1f2f8; } .file.img.big img { max-height: 460px; }
.file.vid video { display: block; max-width: 100%; max-height: 360px; background: #000; } .file.vid small { display: block; padding: 6px 10px; }
.file.link, .file.doc { display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: var(--text); text-decoration: none; min-width: 260px; } .file.link:hover, .file.doc:hover { background: #f8f8fd; text-decoration: none; }
.file.link span:nth-child(2), .file.doc span { flex: 1; min-width: 0; } .file b { display: block; } .file small { display: block; }
.tm { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 22px; }
.tm-main { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.tm-sec h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
.tm-side { display: flex; flex-direction: column; gap: 16px; background: #f7f8fc; border-radius: 14px; padding: 16px; align-self: start; }
.dl { display: grid; grid-template-columns: 1fr; gap: 2px 0; margin: 0; } .dl dt { font-size: 11.5px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; margin-top: 10px; } .dl dd { margin: 0; font-weight: 500; } .dl dd .inp { width: 100%; }
.dl.wide { grid-template-columns: 150px 1fr; gap: 10px 14px; align-items: center; } .dl.wide dt { margin: 0; }
.deliver-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; align-items: center; } .inline-form { display: flex; gap: 8px; flex: 1; min-width: 260px; }
.approve-box { border: 2px solid #d9ccff; background: linear-gradient(135deg, #f7f4ff, #fff6fc); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.approve-box h4 { font-size: 16px; text-transform: none; letter-spacing: 0; color: var(--text); margin: 0 0 2px; }
details.old { margin-top: 12px; } details.old summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 6px 0; } details.old[open] summary { margin-bottom: 8px; }
.cms { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.cm { display: flex; gap: 10px; } .cm-b { flex: 1; min-width: 0; background: #f5f6fb; border-radius: 4px 14px 14px 14px; padding: 9px 13px; }
.cm-h { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; flex-wrap: wrap; } .cm p { white-space: pre-wrap; word-break: break-word; }
.cm.chg .cm-b { background: #fff3e6; border: 1px solid #fbd5a8; } .cm.internal .cm-b { background: #f1f1f4; border: 1px dashed #c3c7da; }
.cm.sys { align-items: center; font-size: 12.5px; color: var(--muted); gap: 7px; padding-left: 4px; } .cm.sys.aprovacao { color: var(--ok-d); font-weight: 600; } .cm.sys small { margin-left: auto; }
.cm-form { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Mesa de aprovação ---------- */
.apv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; }
.apv { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.apv-media { background: #eef0f7; display: flex; align-items: center; justify-content: center; min-height: 240px; padding: 0; }
.apv-media .file { border: 0; border-radius: 0; width: 100%; background: transparent; } .apv-media .file.img img { max-height: 400px; width: 100%; }
.apv-media.multi { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; position: relative; } .apv-media.multi .file.img img { max-height: 190px; height: 190px; object-fit: cover; }
.apv-media.multi .more { position: absolute; right: 8px; bottom: 8px; background: rgba(20,24,60,.8); color: #fff; padding: 2px 10px; border-radius: 99px; font-weight: 700; }
.apv-media.none { flex-direction: column; gap: 8px; color: #a4a9c3; }
.apv-media .file.link { background: #fff; margin: 20px; width: auto; }
.apv-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; } .apv-body h4 { font-size: 16.5px; } .apv-actions { margin-top: 6px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- clientes ---------- */
.cgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.ccard { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--r); padding: 16px; cursor: pointer; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; transition: .15s; }
.ccard:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(20,24,60,.1); }
.ccard-h { display: flex; gap: 12px; align-items: center; } .ccard-h > div:nth-child(2) { flex: 1; min-width: 0; } .ccard-h h4 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-badge { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; color: #fff; background: var(--c); }
.ccard-plan { display: flex; justify-content: space-between; font-size: 13.5px; color: #3a3f5c; } .ccard-plan span { font-weight: 700; color: var(--text); }
.ccard-use { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; } .ccard-use > div { background: #f6f7fc; border-radius: 10px; padding: 8px 10px; } .ccard-use b { font-size: 17px; display: block; } .ccard-use i { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; }
.ccard-flag { background: #f3efff; color: #5a37f0; font-weight: 600; font-size: 12.5px; padding: 7px 10px; border-radius: 9px; }
.drive { display: flex; align-items: center; gap: 14px; background: linear-gradient(135deg, #eef5ff, #f3fbf6); border: 1px solid #cfe0f7; border-radius: var(--r); padding: 14px 18px; } .drive > div:nth-child(2) { flex: 1; } .drive b { display: block; } .drive.empty { background: #fff; border-style: dashed; }
.drive-ic { width: 48px; height: 48px; border-radius: 13px; background: #fff; color: #1a73e8; display: grid; place-items: center; box-shadow: var(--shadow); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }

/* ---------- reuniões / treinamentos ---------- */
.day-group { display: flex; flex-direction: column; gap: 10px; } .day-group h5 { font-size: 13px; text-transform: uppercase; letter-spacing: .7px; color: var(--muted); margin-top: 8px; } .day-group h5 small { text-transform: none; letter-spacing: 0; margin-left: 6px; }
.meet { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 14px; padding: 14px 16px; cursor: pointer; box-shadow: var(--shadow); } .meet:hover { border-color: var(--c); }
.meet-time { width: 56px; text-align: center; } .meet-time b { font-size: 17px; display: block; } .meet-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; } .meet-main h4 { font-size: 15.5px; }
.train-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 16px; }
.train { display: flex; gap: 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); } .train-date { width: 64px; height: 72px; border-radius: 14px; background: linear-gradient(160deg, var(--c), color-mix(in srgb, var(--c) 60%, #ff4ecd)); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; } .train-date b { font-size: 26px; line-height: 1; } .train-date small { color: #fff; text-transform: uppercase; font-weight: 700; opacity: .9; }
.train-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; } .train-body h4 { font-size: 16.5px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; } .info-grid > div { display: flex; gap: 12px; align-items: center; background: #f6f7fc; padding: 12px; border-radius: 12px; } .info-grid b { display: block; }
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .type-pick label { cursor: pointer; } .type-pick input { position: absolute; opacity: 0; }
.type-pick span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 16px; border: 2px solid var(--line); border-radius: 14px; text-align: center; transition: .15s; } .type-pick input:checked + span { border-color: var(--primary); background: var(--primary-l); color: var(--primary-d); } .type-pick small { color: inherit; opacity: .7; }
.choose { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; } .choice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; text-align: left; } .choice:hover { border-color: var(--primary); background: var(--primary-l); } .choice .ic { color: var(--primary); }

/* ---------- modal / toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,18,44,.55); backdrop-filter: blur(3px); display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; z-index: 50; overflow-y: auto; animation: fade .15s; }
.modal-backdrop.top { z-index: 70; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 640px; box-shadow: 0 30px 80px rgba(10,12,40,.4); animation: pop .18s; } .modal.wide { max-width: 980px; } .modal.sm { max-width: 440px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); } .modal-head h3 { font-size: 18px; display: flex; align-items: center; gap: 8px; }
.modal-body { padding: 20px 22px 22px; }
.modal-foot { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
@keyframes fade { from { opacity: 0; } } @keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
#toast-root { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 90; }
.toast { display: flex; gap: 10px; align-items: center; background: #1b1f33; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 10px 30px rgba(10,12,40,.35); max-width: 380px; animation: pop .2s; } .toast.error { background: #b42318; } .toast.out { opacity: 0; transform: translateY(8px); transition: .35s; } .toast .ic { color: #6ee7b7; } .toast.error .ic { color: #fff; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: radial-gradient(900px 500px at 10% 0%, #7c5cff 0%, transparent 60%), radial-gradient(700px 500px at 100% 100%, #ff4ecd 0%, transparent 55%), #12142b; color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: center; gap: 18px; }
.login-art h1 { font-size: 38px; letter-spacing: -.8px; } .login-art p { font-size: 17px; opacity: .85; max-width: 440px; } .login-art ul { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 12px; opacity: .92; } .login-art li { display: flex; gap: 12px; align-items: center; }
.login-box { display: grid; place-items: center; padding: 32px; } .login-box form { width: 100%; max-width: 380px; } .login-box h2 { font-size: 26px; }
.demo-login { border-top: 1px dashed var(--line); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; } .demo-login > div { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- responsivo ---------- */
@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpis.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-main, .grid-agenda { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 40; transform: translateX(-102%); transition: .22s; }
  .nav-open .sidebar { transform: none; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(10,12,40,.5); z-index: 30; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar { padding: 14px 16px 4px; } .page { padding: 10px 16px 40px; }
  .page-h h1 { font-size: 20px; }
  .tm { grid-template-columns: 1fr; } .grid2, .grid3 { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; } .login-art { display: none; }
  .hbar { grid-template-columns: 100px 1fr 70px; } .hbars.cost .hbar { grid-template-columns: 1fr; gap: 4px; }
  .cal-cell { min-height: 84px; } .cal-chip b { display: none; }
  .train-grid { grid-template-columns: 1fr; } .apv-grid { grid-template-columns: 1fr; }
  .dl.wide { grid-template-columns: 1fr; gap: 2px; } .dl.wide dt { margin-top: 8px; }
  .quick-add { grid-template-columns: 1fr auto; } .quick-add input[type=date] { display: none; }
  .modal-backdrop { padding: 0; align-items: stretch; } .modal, .modal.wide { max-width: none; border-radius: 0; min-height: 100vh; }
}
@media (max-width: 560px) { .kpis, .kpis.six { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .kpi { padding: 12px; gap: 10px; } .kpi-ic { display: none; } .kpi b { font-size: 19px; } .meet { flex-wrap: wrap; } .bars { gap: 6px; } }

/* ---------- chat ---------- */
.chat { display: grid; grid-template-columns: 330px minmax(0, 1fr); background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); height: calc(100vh - 175px); min-height: 480px; overflow: hidden; }
.chat-side { border-right: 1px solid var(--line); overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.chat-side-h { padding: 8px 8px 10px; } .chat-side-h h4 { font-size: 15px; margin-bottom: 2px; }
.contact { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid transparent; border-radius: 12px; background: transparent; text-align: left; width: 100%; color: var(--text); }
.contact:hover:not(:disabled) { background: #f6f7fc; } .contact.on { background: var(--primary-l); border-color: #d9ccff; } .contact:disabled { opacity: .5; cursor: not-allowed; }
.contact-ic { width: 42px; height: 42px; border-radius: 12px; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 15%, white); color: color-mix(in srgb, var(--c) 80%, black); font-weight: 800; font-size: 13px; }
.contact-b { flex: 1; min-width: 0; display: flex; flex-direction: column; } .contact-b b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.contact-b small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .contact-b .prev { color: #8a8fa8; }
.empty-sm { text-align: center; color: var(--muted); padding: 30px 14px; font-size: 13.5px; }
.chat-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #f6f7fc; }
.chat-empty { margin: auto; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px; } .chat-empty h3 { color: var(--text); }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; border-bottom: 1px solid var(--line); } .chat-head small { display: block; }
.back-btn { display: none; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 6px; }
.day-sep { text-align: center; margin: 10px 0 4px; } .day-sep span { background: #e6e8f2; color: var(--muted); font-size: 12px; font-weight: 600; padding: 3px 12px; border-radius: 99px; text-transform: capitalize; }
.msg { max-width: min(74%, 560px); align-self: flex-start; background: #fff; padding: 8px 13px 6px; border-radius: 14px 14px 14px 4px; box-shadow: 0 1px 2px rgba(20,24,60,.08); word-break: break-word; }
.msg.mine { align-self: flex-end; background: var(--primary); color: #fff; border-radius: 14px 14px 4px 14px; } .msg.mine a { color: #fff; text-decoration: underline; } .msg.mine small { color: rgba(255,255,255,.75); }
.msg-n { display: block; font-size: 12px; font-weight: 700; margin-bottom: 1px; } .msg small { display: block; text-align: right; font-size: 11px; margin-top: 2px; }
.chat-form { display: flex; gap: 10px; padding: 12px; background: #fff; border-top: 1px solid var(--line); align-items: flex-end; } .chat-form textarea { resize: none; max-height: 140px; min-height: 42px; }
@media (max-width: 900px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 150px); }
  .chat .chat-main { display: none; } .chat.open .chat-side { display: none; } .chat.open .chat-main { display: flex; }
  .back-btn { display: inline-grid; }
}
