/* ============================================================
   Labor Marketing Hub — design system
   ============================================================ */
:root {
  --brand: #0A4BAF;
  --brand-700: #083B8A;
  --brand-800: #062C68;
  --brand-100: #DCE7F9;
  --brand-50: #EEF3FC;
  --ink: #0E1A30;
  --ink-2: #33415C;
  --muted: #6A7891;
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --surface-2: #F8FAFD;
  --border: #E2E8F2;
  --ok: #12A150;
  --ok-50: #E7F7EE;
  --warn: #E08A00;
  --warn-50: #FFF4E0;
  --danger: #D6334A;
  --danger-50: #FDECEF;
  --ch-blog: #F2A007;
  --ch-linkedin: #0A66C2;
  --ch-instagram: #D62976;
  --ch-youtube: #E62117;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14, 26, 48, .06);
  --shadow: 0 6px 24px -8px rgba(14, 26, 48, .14), 0 1px 3px rgba(14, 26, 48, .06);
  --shadow-lg: 0 24px 60px -16px rgba(10, 30, 70, .32);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --script: 'Pinyon Script', 'Great Vibes', cursive;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.spacer { flex: 1; }
::selection { background: var(--brand-100); }

/* ---------- logo ---------- */
.logo { display: inline-flex; align-items: center; }
.logo img { display: none; height: 100%; }
.logo.has-img img { display: block; }
.logo.has-img .logo-text { display: none; }
.logo-text { font-family: var(--script); font-weight: 400; line-height: 1; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); font-weight: 600; font-size: 13.5px;
  cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s, border-color .18s;
}
.btn:hover { border-color: #C9D3E3; box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: 0 6px 16px -6px rgba(10, 75, 175, .6); }
.btn.primary:hover { background: var(--brand-700); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--brand-50); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-50); border-color: #F5C2CA; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn.icon { width: 38px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input {
  height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--surface); outline: none; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(10, 75, 175, .12); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

/* ============================================================
   LOGIN
   ============================================================ */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: var(--surface); }
.auth-brand {
  position: relative; overflow: hidden; background: var(--brand); color: #fff;
  display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px;
}
.auth-brand .logo { height: 120px; }
.auth-brand .logo-text { font-size: 132px; color: #fff; }
.auth-brand h2 { font-size: 34px; line-height: 1.15; font-weight: 700; max-width: 440px; }
.auth-brand p { opacity: .8; max-width: 420px; font-size: 15px; }
.auth-brand .feat { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 460px; margin-top: 28px; }
.auth-brand .feat div { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); border-radius: 12px; padding: 12px 14px; font-size: 13px; backdrop-filter: blur(6px); }
.auth-brand .feat b { display: block; font-size: 14px; }
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; pointer-events: none; animation: float 14s ease-in-out infinite; }
.blob.b1 { width: 420px; height: 420px; background: #3B7BF0; top: -120px; right: -100px; }
.blob.b2 { width: 360px; height: 360px; background: #052A66; bottom: -140px; left: -80px; animation-delay: -5s; }
.blob.b3 { width: 220px; height: 220px; background: #5FA0FF; bottom: 20%; right: 18%; opacity: .35; animation-delay: -9s; }
@keyframes float { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(30px, -26px) scale(1.08); } }
.auth-brand > :not(.blob) { position: relative; z-index: 1; }

.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.tabs { display: inline-flex; background: var(--bg); border-radius: 12px; padding: 4px; margin: 22px 0; position: relative; }
.tabs button { position: relative; z-index: 1; border: 0; background: none; padding: 8px 18px; font-weight: 600; color: var(--muted); cursor: pointer; border-radius: 9px; transition: color .2s; }
.tabs button.on { color: var(--ink); }
.tabs .pill { position: absolute; top: 4px; bottom: 4px; border-radius: 9px; background: var(--surface); box-shadow: var(--shadow-sm); transition: left .35s var(--ease), width .35s var(--ease); }
.auth-note { margin-top: 18px; padding: 12px 14px; background: var(--brand-50); border-radius: 10px; font-size: 12.5px; color: var(--brand-800); display: flex; gap: 10px; }
.auth-note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.code-inputs { display: flex; gap: 8px; }
.code-inputs input { width: 100%; height: 54px; text-align: center; font-size: 22px; font-weight: 700; border-radius: 12px; border: 1px solid var(--border); outline: none; transition: border-color .15s, box-shadow .15s, transform .2s var(--ease-spring); }
.code-inputs input:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(10, 75, 175, .12); transform: translateY(-2px); }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ============================================================
   APP SHELL
   ============================================================ */
.app { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; background: var(--brand-800);
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand-800) 100%);
  color: #fff; display: flex; flex-direction: column; padding: 22px 14px;
}
.sidebar .logo { height: 54px; padding: 0 10px; }
.sidebar .logo-text { font-size: 58px; color: #fff; }
.sidebar .tag { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; opacity: .65; padding: 0 12px; margin: 6px 0 26px; }
.nav { display: flex; flex-direction: column; gap: 4px; position: relative; }
.nav a {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; padding: 0 12px; height: 44px;
  border-radius: 10px; color: rgba(255, 255, 255, .78); text-decoration: none; font-weight: 500;
  transition: color .2s, background .2s;
}
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.nav a.on { color: var(--brand-800); font-weight: 600; }
.nav a svg { width: 19px; height: 19px; flex: none; }
.nav .indicator { position: absolute; left: 0; right: 0; height: 44px; border-radius: 10px; background: #fff; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .4); transition: transform .45s var(--ease); z-index: 0; }
.nav .badge { margin-left: auto; background: rgba(255, 255, 255, .18); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.nav a.on .badge { background: var(--brand); }
.sidebar .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: rgba(255, 255, 255, .08); }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: #fff; color: var(--brand); flex: none; }
.sidebar .me .n { font-weight: 600; font-size: 13px; line-height: 1.2; }
.sidebar .me .e { font-size: 11px; opacity: .65; }
.sidebar .me button { margin-left: auto; background: none; border: 0; color: #fff; opacity: .7; cursor: pointer; padding: 6px; border-radius: 8px; }
.sidebar .me button:hover { opacity: 1; background: rgba(255, 255, 255, .1); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 18px 32px; background: rgba(244, 246, 250, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s;
}
.topbar.scrolled { border-color: var(--border); }
.topbar h1 { font-size: 22px; font-weight: 700; }
.topbar .sub { color: var(--muted); font-size: 13px; }
.topbar .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.menu-btn { display: none; }
.view { padding: 8px 32px 48px; }

/* view transitions */
.view-enter > * { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.view-leave { animation: fadeOut .18s ease forwards; }
@keyframes fadeOut { to { opacity: 0; transform: translateY(-6px); } }
.pop { animation: pop .45s var(--ease-spring) both; }
@keyframes pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 18px 20px 0; }
.card-h h3 { font-size: 15px; font-weight: 700; }
.card-b { padding: 16px 20px 20px; }
.grid { display: grid; gap: 18px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
.kpi { padding: 18px 18px 16px; position: relative; overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease); }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.kpi .l { font-size: 12.5px; color: var(--muted); font-weight: 500; display: flex; align-items: center; gap: 8px; }
.kpi .l i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.kpi .l i svg { width: 15px; height: 15px; }
.kpi .v { font-size: 28px; font-weight: 750; letter-spacing: -.02em; margin-top: 10px; font-variant-numeric: tabular-nums; }
.kpi .d { font-size: 12px; color: var(--muted); }
.kpi .bar { height: 5px; background: var(--bg); border-radius: 9px; margin-top: 10px; overflow: hidden; }
.kpi .bar span { display: block; height: 100%; background: var(--brand); border-radius: 9px; width: 0; transition: width 1.1s var(--ease); }

.dash-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; }
.chart-box { position: relative; height: 300px; }
.chart-box.sm { height: 240px; }

/* list items */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.li:first-child { border-top: 0; }
.li .t { font-weight: 600; font-size: 13.5px; }
.li .s { font-size: 12px; color: var(--muted); }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: #B8C4D8; margin-bottom: 8px; }

/* channel dots / chips */
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
.ch-blog { --c: var(--ch-blog); }
.ch-linkedin { --c: var(--ch-linkedin); }
.ch-instagram { --c: var(--ch-instagram); }
.ch-youtube { --c: var(--ch-youtube); }
.dot { background: var(--c, var(--brand)); }
.tag-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.tag-pill.ok { background: var(--ok-50); color: var(--ok); }
.tag-pill.warn { background: var(--warn-50); color: #A86400; }
.tag-pill.danger { background: var(--danger-50); color: var(--danger); }
.tag-pill.brand { background: var(--brand-50); color: var(--brand); }

/* ============================================================
   CALENDÁRIO
   ============================================================ */
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-toolbar .month { font-size: 18px; font-weight: 700; min-width: 190px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.filter {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--surface); font-weight: 600; font-size: 12.5px; cursor: pointer;
  transition: all .2s var(--ease);
}
.filter:not(.on) { opacity: .5; }
.filter:not(.on) .dot { background: #B8C4D8; }
.filter:hover { opacity: 1; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; height: 30px; padding: 0 12px; border-radius: 7px; font-weight: 600; font-size: 12.5px; color: var(--muted); cursor: pointer; transition: all .2s; }
.seg button.on { background: var(--brand); color: #fff; }

/* abas por rede */
.ch-tabs { position: relative; display: flex; gap: 4px; padding: 5px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; box-shadow: var(--shadow-sm); }
.ch-tabs::-webkit-scrollbar { display: none; }
.ch-tabs button {
  position: relative; z-index: 1; flex: 1; min-width: max-content; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 16px; border: 0; background: none; border-radius: 10px; cursor: pointer;
  font-weight: 600; font-size: 13.5px; color: var(--ink-2); transition: color .3s var(--ease);
}
.ch-tabs button svg { width: 16px; height: 16px; }
.ch-tabs button:hover:not(.on) { background: var(--surface-2); }
.ch-tabs button.on { color: #fff; }
.ch-tabs button.on .dot { background: #fff; }
.ch-tabs .cnt { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--bg); color: var(--muted); transition: all .3s; }
.ch-tabs button.on .cnt { background: rgba(255, 255, 255, .22); color: #fff; }
.ch-tabs .ink { position: absolute; z-index: 0; top: 5px; left: 0; height: 42px; border-radius: 10px; background: var(--brand); box-shadow: 0 8px 18px -8px rgba(0, 0, 0, .45); transition: transform .45s var(--ease), width .45s var(--ease), background .45s var(--ease); }
.ch-stats { --tc: var(--brand); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) 2fr; gap: 12px; margin-bottom: 14px; }
.ch-stats .st { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; border-top: 3px solid var(--tc); transition: border-color .45s var(--ease); animation: rise .45s var(--ease) both; min-width: 0; }
.ch-stats .st:nth-child(2) { animation-delay: 40ms; } .ch-stats .st:nth-child(3) { animation-delay: 80ms; } .ch-stats .st:nth-child(4) { animation-delay: 120ms; } .ch-stats .st:nth-child(5) { animation-delay: 160ms; }
.ch-stats span { font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.ch-stats b { font-size: 22px; font-weight: 750; letter-spacing: -.02em; }
.ch-stats b.bad { color: var(--danger); }
.ch-stats b.next { font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 4px 0 2px; }
.ch-stats small { font-size: 12px; color: var(--muted); }
.ch-stats .mini { height: 5px; border-radius: 9px; background: var(--bg); overflow: hidden; margin-top: 6px; }
.ch-stats .mini i { display: block; height: 100%; border-radius: 9px; transition: width .8s var(--ease); }
.tab-swap { animation: tabSwap .4s var(--ease); }
@keyframes tabSwap { from { opacity: .3; transform: translateY(6px); } }
.chip .tt small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; }

.cal { overflow: hidden; }
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-head div { padding: 10px 12px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-bottom: 1px solid var(--border); }
.cal-grid .day { min-height: 128px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 8px; display: flex; flex-direction: column; gap: 4px; transition: background .2s; }
.cal-grid .day:nth-child(7n) { border-right: 0; }
.cal-grid .day.out { background: var(--surface-2); }
.cal-grid .day.out .num { opacity: .4; }
.cal-grid .day:hover { background: #FAFBFE; }
.cal-grid .day .num { font-size: 12.5px; font-weight: 600; color: var(--ink-2); width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; }
.cal-grid .day.today .num { background: var(--brand); color: #fff; }
.cal-grid .day .add { opacity: 0; margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; width: 22px; height: 22px; display: grid; place-items: center; transition: opacity .15s; }
.cal-grid .day:hover .add { opacity: 1; }
.cal-grid .day .add:hover { background: var(--brand-50); color: var(--brand); }
.cal-grid .day .more { font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 2px 6px; cursor: pointer; }
.cal-grid .day .more:hover { color: var(--brand); }

.chip {
  display: flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border-radius: 7px; font-size: 12px; cursor: pointer;
  background: color-mix(in srgb, var(--c) 10%, white); border-left: 3px solid var(--c);
  transition: transform .2s var(--ease), box-shadow .2s, opacity .3s;
  animation: chipIn .4s var(--ease) both;
}
@keyframes chipIn { from { opacity: 0; transform: translateY(4px); } }
.chip:hover { transform: translateX(2px); box-shadow: var(--shadow-sm); }
.chip .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; font-weight: 500; }
.chip.done .tt { text-decoration: line-through; opacity: .6; }
.chip.late { box-shadow: inset 0 0 0 1px rgba(214, 51, 74, .35); }
.tick {
  width: 18px; height: 18px; border-radius: 6px; border: 1.6px solid color-mix(in srgb, var(--c) 60%, white); background: #fff; flex: none;
  display: grid; place-items: center; cursor: pointer; transition: all .25s var(--ease-spring); padding: 0;
}
.tick svg { width: 12px; height: 12px; color: #fff; transform: scale(0); transition: transform .3s var(--ease-spring); }
.tick.on { background: var(--c, var(--ok)); border-color: var(--c, var(--ok)); }
.tick.on svg { transform: scale(1); }
.tick:hover { transform: scale(1.12); }
.tick.big { width: 22px; height: 22px; border-radius: 7px; }
.tick.big svg { width: 14px; height: 14px; }

.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }

/* lista de posts */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); position: sticky; top: 0; }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tr { transition: background .15s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl-wrap { overflow: auto; max-height: 620px; border-radius: var(--radius); }

/* ============================================================
   MODAL / DRAWER / TOAST
   ============================================================ */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(8, 20, 45, .42); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 20px; animation: fadeIn .25s ease; }
.overlay.closing { animation: fadeOut .2s ease forwards; }
@keyframes fadeIn { from { opacity: 0; } }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: modalIn .42s var(--ease-spring); }
.modal.wide { max-width: 860px; }
.overlay.closing .modal { animation: modalOut .2s ease forwards; }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.97); } }
@keyframes modalOut { to { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 20px 24px 0; }
.modal-h h3 { font-size: 18px; }
.modal-b { padding: 18px 24px; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 14px 24px 20px; border-top: 1px solid var(--border); }
.x { margin-left: auto; width: 34px; height: 34px; border-radius: 9px; border: 0; background: none; cursor: pointer; color: var(--muted); display: grid; place-items: center; }
.x:hover { background: var(--bg); color: var(--ink); }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-weight: 500; animation: toastIn .45s var(--ease-spring); }
.toast.out { animation: toastOut .3s ease forwards; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.ok svg { color: #4ADE80; }
.toast.err svg { color: #FB7185; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }

/* dropzone */
.drop {
  border: 2px dashed #C9D5E8; border-radius: 14px; padding: 30px 20px; text-align: center; cursor: pointer;
  background: var(--surface-2); transition: all .25s var(--ease);
}
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-50); transform: scale(1.01); }
.drop svg { width: 38px; height: 38px; color: var(--brand); margin-bottom: 6px; transition: transform .3s var(--ease-spring); }
.drop.over svg { transform: translateY(-4px) scale(1.1); }
.drop b { display: block; font-size: 15px; }
.map-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.map-grid .field label { font-size: 11.5px; }
.map-grid select { height: 34px; font-size: 12.5px; }
.preview { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 12px; }
.preview .tbl td, .preview .tbl th { padding: 7px 10px; font-size: 12px; }

/* ============================================================
   PEDIDOS (kanban)
   ============================================================ */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { background: #EBEFF6; border-radius: 16px; padding: 12px; min-height: 300px; transition: background .2s, box-shadow .2s; }
.col.over { background: var(--brand-50); box-shadow: inset 0 0 0 2px var(--brand); }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 12px; font-weight: 700; }
.col-h .count { background: #fff; color: var(--muted); font-size: 11.5px; padding: 1px 8px; border-radius: 99px; }
.col-h .dot { width: 8px; height: 8px; }
.cards { display: flex; flex-direction: column; gap: 10px; min-height: 40px; }
.rcard { background: #fff; border-radius: 12px; padding: 14px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); cursor: grab; transition: transform .2s var(--ease), box-shadow .2s, opacity .2s; animation: rise .45s var(--ease) both; }
.rcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.rcard.dragging { opacity: .4; transform: rotate(2deg); }
.rcard .t { font-weight: 650; margin: 8px 0 4px; }
.rcard .d { color: var(--muted); font-size: 12.5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rcard .f { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.prio { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.prio.alta { background: var(--danger); }
.prio.media { background: var(--warn); }
.prio.baixa { background: var(--ok); }

/* ============================================================
   REUNIÕES
   ============================================================ */
.split { display: grid; grid-template-columns: 320px 1fr; gap: 18px; align-items: start; }
.mlist .mi { padding: 14px 16px; border-top: 1px solid var(--border); cursor: pointer; transition: background .15s; position: relative; }
.mlist .mi:first-child { border-top: 0; }
.mlist .mi:hover { background: var(--surface-2); }
.mlist .mi.on { background: var(--brand-50); }
.mlist .mi.on::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--brand); }
.mlist .mi .t { font-weight: 600; }
.progress { height: 6px; background: var(--bg); border-radius: 9px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #3B82F6); border-radius: 9px; transition: width .6s var(--ease); }
.tasks { display: flex; flex-direction: column; gap: 2px; }
.task { display: flex; align-items: flex-start; gap: 12px; padding: 10px 8px; border-radius: 10px; transition: background .15s; }
.task:hover { background: var(--surface-2); }
.task .tick { --c: var(--ok); margin-top: 1px; }
.task .tx { flex: 1; }
.task.done .tx > div:first-child { text-decoration: line-through; color: var(--muted); }
.task .meta { display: flex; gap: 8px; margin-top: 3px; }
.etask { display: flex; gap: 8px; align-items: center; animation: rise .35s var(--ease) both; }
.etask .input { height: 36px; }
.etask .bullet { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); flex: none; }
.summary-box { background: var(--brand-50); border-radius: 12px; padding: 14px 16px; color: var(--brand-800); font-size: 13.5px; }
details.transcript summary { cursor: pointer; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
details.transcript pre { white-space: pre-wrap; font-family: var(--font); font-size: 13px; background: var(--surface-2); padding: 14px; border-radius: 10px; max-height: 360px; overflow: auto; color: var(--ink-2); }

/* ============================================================
   ANALYTICS
   ============================================================ */
.an-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.an-grid .full { grid-column: 1 / -1; }
.kpis.an { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* skeleton */
.sk { background: linear-gradient(90deg, #EBEFF6 0%, #F6F8FC 50%, #EBEFF6 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: 10px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ============================================================
   RESPONSIVO
   ============================================================ */
@media (max-width: 1200px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 32px 24px; min-height: 260px; }
  .auth-brand .logo-text { font-size: 84px; }
  .auth-brand .logo { height: 80px; }
  .auth-brand h2 { font-size: 24px; }
  .auth-brand .feat { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 90; width: 260px; transform: translateX(-100%); transition: transform .35s var(--ease); }
  .app.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .menu-btn { display: inline-flex; }
  .topbar { padding: 14px 16px; flex-wrap: wrap; }
  .view { padding: 8px 16px 40px; }
  .board, .split, .an-grid { grid-template-columns: 1fr; }
  .kpis, .kpis.an { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2, .map-grid { grid-template-columns: 1fr; }
  .ch-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ch-stats .st.wide { grid-column: 1 / -1; }
  .cal-grid .day { min-height: 84px; padding: 4px; }
  .chip .tt { display: none; }
  .chip { padding: 3px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
