/* =====================================================================
   BedHosting · Central de Tarefas
   Paleta baseada em bedhosting.com.br: azul-marinho profundo, azul #2563eb e ciano #22d3ee.
   ===================================================================== */

/* ============ Tokens ============ */
:root {
  --bg: #eef2f8;
  --bg-2: #e6ecf5;
  --surface: #ffffff;
  --surface-2: #f6f8fc;
  --surface-hover: #eef3fb;
  --glass: rgba(255, 255, 255, .78);
  --border: #e1e7f0;
  --border-strong: #cdd6e3;
  --text: #0b1324;
  --text-2: #4a5873;
  --text-3: #8592a8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #e5edff;
  --accent-text: #1d4ed8;
  --cyan: #06b6d4;
  --brand-grad: linear-gradient(120deg, #22d3ee 0%, #2563eb 100%);
  --title-grad: linear-gradient(90deg, #2563eb, #06b6d4);
  --hero-grad: linear-gradient(125deg, #0b1b4d 0%, #1e3a8a 45%, #0e7490 100%);
  --card-grad: linear-gradient(180deg, rgba(255,255,255,.9), rgba(255,255,255,.75));
  --glow: 0 0 0 1px rgba(37, 99, 235, .18), 0 10px 30px -8px rgba(37, 99, 235, .25);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px -12px rgba(15, 23, 42, .12);
  --shadow-lg: 0 24px 60px -12px rgba(15, 23, 42, .3);

  --u-baixa: #059669;   --u-baixa-soft: #dcf5ea;
  --u-alta: #d97706;    --u-alta-soft: #fdf1dc;
  --u-imediata: #e11d48; --u-imediata-soft: #fde4ea;
  --s-pendente: #64748b; --s-pendente-soft: #eaeef4;
  --s-andamento: #0891b2; --s-andamento-soft: #dbf4fa;
  --s-concluida: #059669; --s-concluida-soft: #dcf5ea;
  --danger: #e11d48;

  --p-online: #22c55e; --p-away: #f59e0b; --p-offline: #94a3b8; --p-support: #06b6d4;

  --ch-whatsapp: #22c55e; --ch-discord: #6366f1; --ch-whmcs: #3b82f6; --ch-chat: #06b6d4;
  --ch-email: #f59e0b; --ch-telefone: #a855f7; --ch-outro: #94a3b8;

  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 256px;
  --font: "Inter", ui-sans-serif, system-ui, "Segoe UI", -apple-system, Roboto, sans-serif;
  --font-display: "Plus Jakarta Sans", "Inter", ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #020617;
  --bg-2: #050b1f;
  --surface: #0b1428;
  --surface-2: #0a1223;
  --surface-hover: #13203b;
  --glass: rgba(9, 16, 34, .72);
  --border: rgba(148, 163, 184, .11);
  --border-strong: rgba(148, 163, 184, .2);
  --text: #e8eef9;
  --text-2: #9aa9c2;
  --text-3: #62708a;
  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(37, 99, 235, .16);
  --accent-text: #7cb4ff;
  --cyan: #22d3ee;
  --title-grad: linear-gradient(90deg, #60a5fa, #22d3ee);
  --hero-grad: linear-gradient(125deg, #0b1d56 0%, #10307a 42%, #075e74 100%);
  --card-grad: linear-gradient(180deg, rgba(20, 32, 60, .72), rgba(11, 20, 40, .72));
  --glow: 0 0 0 1px rgba(56, 189, 248, .22), 0 14px 40px -12px rgba(34, 211, 238, .28);
  --shadow-sm: none;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px -18px rgba(0, 0, 0, .8);
  --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .85);

  --u-baixa: #34d399;   --u-baixa-soft: rgba(52, 211, 153, .13);
  --u-alta: #fbbf24;    --u-alta-soft: rgba(251, 191, 36, .13);
  --u-imediata: #fb7185; --u-imediata-soft: rgba(251, 113, 133, .14);
  --s-pendente: #94a3b8; --s-pendente-soft: rgba(148, 163, 184, .13);
  --s-andamento: #22d3ee; --s-andamento-soft: rgba(34, 211, 238, .13);
  --s-concluida: #34d399; --s-concluida-soft: rgba(52, 211, 153, .13);
  --danger: #fb7185;
  --p-offline: #55627a; --p-support: #22d3ee;
  color-scheme: dark;
}

/* ============ Base ============ */
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 600px at 105% -15%, rgba(37, 99, 235, .14), transparent 60%),
    radial-gradient(800px 500px at 15% -10%, rgba(34, 211, 238, .08), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(37, 99, 235, .06), transparent 60%);
}
:root[data-theme="dark"] body::before {
  background:
    radial-gradient(1100px 600px at 105% -15%, rgba(37, 99, 235, .22), transparent 60%),
    radial-gradient(800px 500px at 15% -10%, rgba(34, 211, 238, .09), transparent 60%),
    radial-gradient(900px 700px at 50% 120%, rgba(37, 99, 235, .1), transparent 60%);
}
a { color: var(--accent-text); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.015em; font-family: var(--font-display); }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg.i-sm { width: 15px; height: 15px; }
::selection { background: rgba(34, 211, 238, .3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }

/* entrada suave dos blocos */
.rise { animation: rise .45s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

/* ============ Layout ============ */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: none;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.4);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  padding: 20px 14px 16px; z-index: 30;
}
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 16px 32px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 21px; font-weight: 750; }
.topbar .subtitle { color: var(--text-3); font-size: 13px; margin-top: 1px; }
.topbar .spacer { flex: 1; }
.content { padding: 28px 32px 56px; max-width: 1560px; width: 100%; }
.icon-btn.menu-btn { display: none; }

.brand { display: flex; align-items: center; gap: 11px; padding: 2px 8px 20px; }
.brand-mark { width: 40px; height: 40px; flex: none; object-fit: contain; filter: drop-shadow(0 4px 14px rgba(37, 99, 235, .45)); }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 16.5px; letter-spacing: -.02em;
  background: var(--title-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { font-size: 10px; color: var(--text-3); margin-top: 0; text-transform: uppercase; letter-spacing: .16em; font-weight: 600; }
.brand-lg .brand-mark { width: 54px; height: 54px; }
.brand-lg .brand-name { font-size: 20px; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); padding: 12px 12px 8px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 11px;
  color: var(--text-2); font-weight: 550;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-hover); color: var(--text); }
.nav a.active {
  color: var(--text);
  background: linear-gradient(90deg, rgba(37, 99, 235, .2), rgba(34, 211, 238, .06));
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .22);
}
.nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--brand-grad); box-shadow: 0 0 12px rgba(34, 211, 238, .7);
}
.nav a.active svg { color: var(--cyan); }
.nav .count { margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--u-imediata); color: #fff; box-shadow: 0 0 12px rgba(244, 63, 94, .5); }

.sidebar-footer { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; background: var(--surface-hover); }
.me .who { min-width: 0; flex: 1; }
.me .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me .name { font-weight: 650; font-size: 13.5px; }
.me .role { font-size: 11.5px; color: var(--text-3); }

/* ============ Controls ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; padding: 0 16px;
  border-radius: var(--radius-sm); border: 1px solid transparent;
  font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .08s, filter .15s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, .icon-btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--cyan); outline-offset: 1px;
}
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: 0 8px 22px -8px rgba(34, 211, 238, .6), inset 0 1px 0 rgba(255,255,255,.2); }
.btn-primary:hover { filter: brightness(1.08) saturate(1.1); box-shadow: 0 10px 28px -8px rgba(34, 211, 238, .75), inset 0 1px 0 rgba(255,255,255,.25); }
.btn-secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { background: var(--surface-hover); border-color: rgba(59, 130, 246, .45); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-hover); color: var(--text); }
.btn-danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, transparent); }
.btn-danger:hover { background: var(--u-imediata-soft); }
.btn-success { background: linear-gradient(120deg, #34d399, #059669); color: #fff; box-shadow: 0 8px 20px -10px rgba(16, 185, 129, .7); }
.btn-success:hover { filter: brightness(1.07); }
.btn-glass { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .22); color: #fff; backdrop-filter: blur(6px); }
.btn-glass:hover { background: rgba(255, 255, 255, .2); }
.btn-sm { height: 31px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled], .btn-disabled { opacity: .5; pointer-events: none; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border-radius: 10px; border: 0; background: transparent; color: var(--text-2); cursor: pointer;
  transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--surface-hover); color: var(--text); }
.link-btn { background: none; border: 0; padding: 0; color: var(--text-3); cursor: pointer; font-size: 12.5px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--danger); }

.input, select.input, textarea.input {
  height: 40px; width: 100%;
  padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: rgba(59, 130, 246, .7); box-shadow: 0 0 0 4px rgba(59, 130, 246, .15); outline: none; }
textarea.input { height: auto; min-height: 110px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.input::placeholder { color: var(--text-3); }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search .input { padding-left: 36px; }

.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 12.5px; font-weight: 650; color: var(--text-2); }
.field .req { color: var(--danger); }
.field .help { font-size: 12px; color: var(--text-3); font-weight: 400; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }

.segmented { display: flex; gap: 8px; }
.segmented label { flex: 1; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong);
  font-weight: 600; font-size: 13px; color: var(--text-2); background: var(--surface);
  transition: all .15s;
}
.segmented input:checked + span.u-baixa { border-color: var(--u-baixa); background: var(--u-baixa-soft); color: var(--u-baixa); }
.segmented input:checked + span.u-alta { border-color: var(--u-alta); background: var(--u-alta-soft); color: var(--u-alta); }
.segmented input:checked + span.u-imediata { border-color: var(--u-imediata); background: var(--u-imediata-soft); color: var(--u-imediata); box-shadow: 0 0 18px -6px var(--u-imediata); }
.segmented input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 1px; }

.toggle-group { display: inline-flex; padding: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; gap: 2px; }
.toggle-group button {
  border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-2); font-weight: 600; font-size: 13px;
  transition: all .15s;
}
.toggle-group button:hover { color: var(--text); }
.toggle-group button.on { background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .3); }

/* ============ Cards ============ */
.card {
  background: var(--card-grad), var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
}
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.card-head > svg { color: var(--accent-text); }
.card-head h2 { font-size: 15px; font-weight: 700; }
.card-head .spacer { flex: 1; }
.card-head .sub { color: var(--text-3); font-size: 12.5px; font-weight: 500; }
.card-body { padding: 18px 20px; }
.card-empty { padding: 32px 20px; text-align: center; color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.card-empty .ei { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-hover); color: var(--text-3); }

/* ============ KPIs ============ */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { padding: 18px 18px 14px; overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; }
.kpi:hover { box-shadow: var(--glow); transform: translateY(-2px); }
.kpi::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--k, #3b82f6), transparent); opacity: .7;
}
.kpi .k-top { display: flex; align-items: center; gap: 10px; }
.kpi .k-ic {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex: none;
  color: var(--k, #3b82f6); background: color-mix(in srgb, var(--k, #3b82f6) 14%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--k, #3b82f6) 25%, transparent);
}
.kpi .label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.kpi .value { font-family: var(--font-display); font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 12px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.kpi .spark { display: block; width: 100%; height: 34px; margin-top: 8px; }
.kpi.accent-imediata { --k: var(--u-imediata); }
.kpi.accent-andamento { --k: var(--cyan); }
.kpi.accent-concluida { --k: var(--u-baixa); }
.kpi.accent-alta { --k: var(--u-alta); }
.kpi.accent-violet { --k: #a855f7; }
.kpi.accent-imediata .value { color: var(--u-imediata); }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; }
.grid-2-even { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.mb { margin-bottom: 20px; }

/* ============ Hero (painel) ============ */
.hero {
  position: relative; overflow: hidden; border-radius: 22px; padding: 28px 30px; margin-bottom: 22px;
  background: var(--hero-grad); color: #fff;
  box-shadow: 0 24px 60px -24px rgba(37, 99, 235, .7), inset 0 1px 0 rgba(255,255,255,.15);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(500px 260px at 88% 10%, rgba(34, 211, 238, .45), transparent 60%),
    radial-gradient(400px 240px at 10% 120%, rgba(59, 130, 246, .5), transparent 60%);
}
.hero::after {
  content: ""; position: absolute; right: -60px; bottom: -80px; width: 320px; height: 320px; pointer-events: none;
  background: url(/static/logo.png) center / contain no-repeat; opacity: .07; transform: rotate(-12deg);
}
.hero > * { position: relative; z-index: 1; }
.hero .hi { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.hero h2 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; }
.hero p { margin: 8px 0 0; color: rgba(255,255,255,.82); font-size: 14.5px; max-width: 620px; }
.hero p b { color: #fff; }
.hero .hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero .hero-actions .btn-primary { background: #fff; color: #0b1d56; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); }
.hero .hero-actions .btn-primary:hover { filter: none; background: #eaf6ff; }
.hero .hero-side { display: flex; align-items: center; gap: 26px; }
.hero .hero-stat { text-align: center; }
.hero .hero-stat .n { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.hero .hero-stat .l { font-size: 12px; color: rgba(255,255,255,.7); }

.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .track { stroke: rgba(255,255,255,.15); }
.ring .bar { stroke: url(#ringGrad); stroke-linecap: round; transition: stroke-dashoffset 1s cubic-bezier(.2,.7,.2,1); }
.ring .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring .center b { font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1; }
.ring .center span { font-size: 11px; color: rgba(255,255,255,.72); margin-top: 4px; }

.stack-avatars { display: flex; }
.stack-avatars .av-wrap + .av-wrap { margin-left: -9px; }
.stack-avatars .avatar { box-shadow: 0 0 0 2.5px #16307a; }

/* ============ Badges / avatars ============ */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 23px; padding: 0 9px; border-radius: 99px;
  font-size: 11.5px; font-weight: 650; white-space: nowrap;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.u-baixa { background: var(--u-baixa-soft); color: var(--u-baixa); }
.badge.u-alta { background: var(--u-alta-soft); color: var(--u-alta); }
.badge.u-imediata { background: var(--u-imediata-soft); color: var(--u-imediata); }
.badge.u-imediata .dot { animation: pulse 1.6s infinite; box-shadow: 0 0 8px currentColor; }
.badge.s-pendente { background: var(--s-pendente-soft); color: var(--s-pendente); }
.badge.s-em_andamento { background: var(--s-andamento-soft); color: var(--s-andamento); }
.badge.s-concluida { background: var(--s-concluida-soft); color: var(--s-concluida); }
.badge.role-fundador { background: linear-gradient(90deg, rgba(37,99,235,.18), rgba(34,211,238,.14)); color: var(--accent-text); }
.badge.role-funcionario { background: var(--surface-hover); color: var(--text-2); }
.badge.neutral { background: var(--surface-hover); color: var(--text-2); }
.badge.danger { background: var(--u-imediata-soft); color: var(--u-imediata); }
.badge.ch { background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--c); }
.badge.ch .dot { animation: none; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; overflow: hidden;
  font-size: 11px; font-weight: 700; color: #fff; background: var(--text-3);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 24px; height: 24px; font-size: 9.5px; }
.avatar-lg { width: 38px; height: 38px; font-size: 13px; }
.avatar-xl { width: 46px; height: 46px; font-size: 15px; }
.avatar-empty { background: transparent; border: 1.5px dashed var(--border-strong); color: var(--text-3); }
.person { display: inline-flex; align-items: center; gap: 9px; min-width: 0; }
.person span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ Linhas de tarefa ============ */
.task-rows { display: flex; flex-direction: column; padding: 6px; }
.task-row {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px; cursor: pointer;
  transition: background .15s, transform .15s;
}
.task-row + .task-row { margin-top: 2px; }
.task-row:hover { background: var(--surface-hover); }
.task-row .title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row .meta { color: var(--text-3); font-size: 12.5px; white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.task-id { color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; font-weight: 600; }

/* ============ Kanban ============ */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 20px; }
.toolbar .search { width: 300px; max-width: 100%; }
.toolbar select.input { width: auto; min-width: 160px; }
.toolbar .spacer { flex: 1; }

.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; align-items: start; }
.column {
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid var(--border); border-radius: 18px; min-height: 240px; display: flex; flex-direction: column;
  backdrop-filter: blur(8px);
}
.column-head { display: flex; align-items: center; gap: 9px; padding: 14px 16px 12px; font-weight: 700; font-size: 13.5px; font-family: var(--font-display); }
.column-head .count { font-family: var(--font); font-size: 11.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; background: var(--surface-hover); color: var(--text-2); }
.column-head .dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 10px currentColor; }
.column-body { padding: 0 10px 12px; display: flex; flex-direction: column; gap: 10px; flex: 1; border-radius: 0 0 18px 18px; transition: background .15s; }
.column.drop-target { border-color: rgba(34, 211, 238, .6); box-shadow: 0 0 0 3px rgba(34, 211, 238, .12); }
.column.drop-target .column-body { background: rgba(34, 211, 238, .06); }
.column-empty { text-align: center; color: var(--text-3); font-size: 12.5px; padding: 22px 0; border: 1.5px dashed var(--border-strong); border-radius: 12px; }

.tcard {
  position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 14px 12px 16px; cursor: grab; box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s, border-color .2s;
  overflow: hidden;
}
.tcard::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--border-strong); }
.tcard:hover { box-shadow: var(--glow); transform: translateY(-2px); border-color: rgba(59, 130, 246, .35); }
.tcard.u-baixa::before { background: var(--u-baixa); }
.tcard.u-alta::before { background: var(--u-alta); }
.tcard.u-imediata::before { background: var(--u-imediata); box-shadow: 0 0 12px var(--u-imediata); }
.tcard.dragging { opacity: .45; transform: rotate(1.5deg) scale(.98); }
.tcard .t-top { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.tcard .t-title { font-weight: 650; line-height: 1.4; word-break: break-word; }
.tcard .t-note { margin-top: 6px; font-size: 12.5px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tcard .t-foot { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--text-3); font-size: 12px; }
.tcard .t-foot .spacer { flex: 1; }
.tcard .t-foot .late { color: var(--u-imediata); font-weight: 650; }
.chip { display: inline-flex; align-items: center; gap: 4px; }

/* ============ Tabelas ============ */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .07em;
  color: var(--text-3); padding: 12px 16px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td, .table tbody tr:hover td { background: color-mix(in srgb, var(--surface-hover) 70%, transparent); }
.table .t-title { font-weight: 600; max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table td.right, .table th.right { text-align: right; }
tr.inactive td { opacity: .5; }

/* ============ Gráficos ============ */
.bars { display: flex; gap: 8px; height: 230px; }
.bars-y { display: flex; flex-direction: column; justify-content: space-between; font-size: 11px; color: var(--text-3); text-align: right; min-width: 18px; padding-bottom: 22px; margin-top: -7px; }
.bars-y span { line-height: 14px; }
.bars-plot { position: relative; flex: 1; display: flex; min-width: 0; }
.bars-grid { position: absolute; left: 0; right: 0; height: 1px; background: var(--border); margin-bottom: 22px; }
.bars-col { flex: 1; min-width: 0; display: flex; flex-direction: column; position: relative; z-index: 1; border-radius: 6px; }
.bars-col:hover { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.bars-pair { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; padding: 0 14%; }
.bar { flex: 1; max-width: 20px; min-height: 0; border-radius: 5px 5px 2px 2px; transition: height .6s cubic-bezier(.2,.7,.2,1); }
.bars.dense .bars-pair { gap: 0; padding: 0 1px; }
.bars.dense .bar { border-radius: 1px 1px 0 0; }
.bar-created { background: linear-gradient(180deg, #60a5fa, rgba(37, 99, 235, .55)); }
.bar-done { background: linear-gradient(180deg, #5eead4, #10b981); }
.bars-x { height: 22px; line-height: 22px; font-size: 11px; color: var(--text-3); text-align: center; white-space: nowrap; overflow: visible; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.area { position: relative; }
.area svg { display: block; width: 100%; height: 200px; overflow: visible; }
.area .grid line { stroke: var(--border); stroke-dasharray: 3 5; }
.area .l-created { stroke: #60a5fa; }
.area .l-done { stroke: #34d399; }
.area path.line { fill: none; stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-linejoin: round; stroke-linecap: round; }
.area-x { display: flex; margin-top: 8px; }
.area-x span { flex: 1; text-align: center; font-size: 11.5px; color: var(--text-3); }
.area-hover { position: absolute; inset: 0 0 0 0; display: flex; }
.area-hover div { flex: 1; border-radius: 8px; }
.area-hover div:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

.donut-wrap { display: flex; align-items: center; gap: 22px; }
.donut { position: relative; width: 150px; height: 150px; flex: none; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 14; }
.donut .center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.donut .center b { font-family: var(--font-display); font-size: 30px; font-weight: 800; line-height: 1; }
.donut .center span { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.donut-legend { display: flex; flex-direction: column; gap: 12px; flex: 1; min-width: 0; }
.donut-legend .dl { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.donut-legend .dl i { width: 10px; height: 10px; border-radius: 4px; flex: none; }
.donut-legend .dl span { flex: 1; color: var(--text-2); }
.donut-legend .dl b { font-variant-numeric: tabular-nums; }

.hbar { display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 10px; padding: 7px 0; }
.hbar .track { height: 9px; background: var(--surface-hover); border-radius: 99px; overflow: hidden; }
.hbar .fill { height: 100%; border-radius: 99px; transition: width .8s cubic-bezier(.2,.7,.2,1); }
.hbar .v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ============ Equipe agora (painel) ============ */
.team-live { display: flex; flex-direction: column; padding: 8px; }
.tl-person { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.tl-person:hover { background: var(--surface-hover); }
.tl-person .who { flex: 1; min-width: 0; }
.tl-person .who b { display: block; font-weight: 650; }
.tl-person .timer-chip { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12.5px; color: var(--p-support); background: color-mix(in srgb, var(--p-support) 12%, transparent); padding: 3px 9px; border-radius: 99px; }
.support-strip { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--border); }
.support-strip div { padding: 14px 20px; }
.support-strip div + div { border-left: 1px solid var(--border); }
.support-strip b { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 800; }
.support-strip span { font-size: 12px; color: var(--text-3); }

/* ============ Timeline ============ */
.timeline { display: flex; flex-direction: column; padding: 6px 0; }
.tl-item { display: flex; gap: 12px; padding: 11px 20px; position: relative; }
.tl-item::before { content: ""; position: absolute; left: 34px; top: 42px; bottom: -10px; width: 1px; background: var(--border); }
.tl-item:last-child::before { display: none; }
.tl-icon { position: relative; z-index: 1; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-hover); color: var(--text-2); }
.tl-icon svg { width: 15px; height: 15px; }
.tl-icon.created { background: var(--accent-soft); color: var(--accent-text); }
.tl-icon.done { background: var(--s-concluida-soft); color: var(--s-concluida); }
.tl-icon.started { background: var(--s-andamento-soft); color: var(--s-andamento); }
.tl-icon.reopen, .tl-icon.deleted { background: var(--u-alta-soft); color: var(--u-alta); }
.tl-body { flex: 1; min-width: 0; }
.tl-line { line-height: 1.45; }
.tl-line b { font-weight: 650; }
.tl-details { color: var(--text-2); font-size: 13px; margin-top: 3px; word-break: break-word; }
.tl-note { margin-top: 6px; padding: 8px 12px; border-radius: 10px; background: var(--surface-hover); border-left: 3px solid var(--s-concluida); font-size: 13px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.tl-time { color: var(--text-3); font-size: 12px; white-space: nowrap; }
.tl-task { color: var(--accent-text); cursor: pointer; font-weight: 600; }
.tl-task:hover { text-decoration: underline; }
.tl-proof { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 12.5px; font-weight: 650; color: var(--cyan); background: color-mix(in srgb, var(--cyan) 10%, transparent); border: 1px solid color-mix(in srgb, var(--cyan) 30%, transparent); border-radius: 99px; padding: 3px 10px; cursor: pointer; }
.tl-proof:hover { background: color-mix(in srgb, var(--cyan) 18%, transparent); }
.tl-proof.warn { color: var(--u-alta); background: var(--u-alta-soft); border-color: color-mix(in srgb, var(--u-alta) 35%, transparent); cursor: default; }

.people-summary { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 14px; margin-bottom: 22px; }
.person-card { padding: 16px 18px; cursor: pointer; min-width: 0; transition: box-shadow .2s, transform .2s, border-color .2s; }
.person-card:hover { box-shadow: var(--glow); transform: translateY(-2px); }
.person-card.on { border-color: rgba(34, 211, 238, .6); box-shadow: 0 0 0 1px rgba(34, 211, 238, .5), var(--glow); }
.person-card .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(58px, 1fr)); gap: 10px 12px; margin-top: 12px; font-size: 12px; color: var(--text-3); }
.person-card .stats > div { min-width: 0; }
.person-card .stats b { color: var(--text); font-size: 17px; font-weight: 800; display: block; white-space: nowrap; font-family: var(--font-display); }

.date-nav { display: inline-flex; align-items: center; gap: 4px; }
.date-nav .input { width: 165px; }

/* ============ Painel lateral / modais ============ */
.overlay { position: fixed; inset: 0; background: rgba(2, 6, 23, .55); backdrop-filter: blur(4px); z-index: 50; animation: fade .18s ease-out; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 10px; right: 10px; bottom: 10px; width: min(640px, calc(100vw - 20px));
  background: var(--surface); z-index: 51; box-shadow: var(--shadow-lg); border: 1px solid var(--border); border-radius: 20px;
  display: flex; flex-direction: column; animation: slide .25s cubic-bezier(.2,.7,.2,1); overflow: hidden;
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: flex-start; gap: 10px; padding: 20px 24px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, var(--accent-soft), transparent); }
.drawer-head h2 { font-size: 19px; font-weight: 750; flex: 1; word-break: break-word; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 32px; }
.drawer-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.meta-grid { display: grid; grid-template-columns: 150px 1fr; gap: 11px 14px; font-size: 13.5px; margin-bottom: 20px; padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.meta-grid dt { color: var(--text-3); }
.meta-grid dd { margin: 0; }
.desc { white-space: pre-wrap; word-break: break-word; background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 22px; }
.done-box { border-radius: 14px; padding: 14px 16px; margin-bottom: 22px; background: var(--s-concluida-soft); border: 1px solid color-mix(in srgb, var(--s-concluida) 30%, transparent); }
.done-box h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--s-concluida); display: flex; align-items: center; gap: 6px; }
.done-box div { white-space: pre-wrap; word-break: break-word; }
.section-title { font-size: 11.5px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .1em; margin: 24px 0 10px; }
.comment { display: flex; gap: 10px; padding: 10px 0; }
.comment + .comment { border-top: 1px solid var(--border); }
.comment .c-body { white-space: pre-wrap; word-break: break-word; margin-top: 2px; }
.comment-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.comment-form textarea { min-height: 70px; }
.comment-form .row { display: flex; justify-content: flex-end; }

.modal {
  position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(580px, calc(100vw - 32px)); max-height: calc(100vh - 40px); overflow-y: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow-lg); z-index: 51;
  animation: pop .22s cubic-bezier(.2,.7,.2,1);
}
.modal.wide { width: min(760px, calc(100vw - 32px)); }
@keyframes pop { from { transform: translate(-50%, -47%) scale(.97); opacity: 0; } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 24px 8px; }
.modal-head .m-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: none; background: var(--brand-grad); color: #fff; box-shadow: 0 8px 20px -8px rgba(34, 211, 238, .7); }
.modal-head .m-ic.ok { background: linear-gradient(120deg, #34d399, #059669); box-shadow: 0 8px 20px -8px rgba(16, 185, 129, .7); }
.modal-head h2 { font-size: 18px; font-weight: 750; }
.modal-head .m-sub { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.modal-head .grow { flex: 1; min-width: 0; }
.modal-body { padding: 14px 24px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 16px 24px 22px; }
.modal-foot .left { margin-right: auto; }
.form-error { color: var(--danger); font-size: 13px; font-weight: 550; padding: 10px 12px; border-radius: 10px; background: var(--u-imediata-soft); }

/* ============ Comprovação de atendimento ============ */
.dropzone {
  border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 16px; text-align: center; color: var(--text-3);
  cursor: pointer; transition: all .15s; font-size: 13px;
}
.dropzone:hover, .dropzone.over { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 6%, transparent); color: var(--text-2); }
.dropzone b { color: var(--text); }
.thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb { position: relative; width: 96px; height: 72px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(2,6,23,.75); color: #fff; cursor: pointer; display: grid; place-items: center; }
.thumb button svg { width: 12px; height: 12px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.gallery a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); aspect-ratio: 4 / 3; background: var(--surface-2); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s; }
.gallery a:hover img { transform: scale(1.04); }
.proof-head { display: flex; flex-wrap: wrap; gap: 18px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.proof-head div b { display: block; font-family: var(--font-display); font-size: 18px; font-weight: 800; }
.proof-head div span { font-size: 12px; color: var(--text-3); }

/* ============ Toasts ============ */
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: 14px; box-shadow: var(--shadow-lg);
  font-weight: 550; animation: pop-in .25s cubic-bezier(.2,.7,.2,1); max-width: 380px;
}
.toast.error { background: var(--danger); color: #fff; }
.toast.info { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg), inset 3px 0 0 var(--cyan); }
.toast.clickable { cursor: pointer; }
.toast .t-title { font-weight: 750; }
.toast .t-body { font-weight: 400; opacity: .9; font-size: 13px; }
@keyframes pop-in { from { transform: translateY(12px) scale(.98); opacity: 0; } }

/* ============ Diversos ============ */
.alert { padding: 12px 16px; border-radius: 12px; font-size: 13.5px; }
.alert-danger { background: var(--u-imediata-soft); color: var(--u-imediata); }
.alert-info { background: var(--accent-soft); color: var(--accent-text); border: 1px solid rgba(59, 130, 246, .2); }
.empty-state { text-align: center; padding: 64px 20px; color: var(--text-3); }
.empty-state h3 { color: var(--text); font-size: 17px; margin-bottom: 6px; }
.loading { padding: 60px; display: grid; place-items: center; color: var(--text-3); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--cyan); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.kbd { font-size: 11px; border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 5px; padding: 0 5px; color: var(--text-3); }
.period { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.period .input[type=date] { width: 155px; }

/* ============ Login ============ */
.login-body { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card {
  width: min(430px, 100%); background: var(--card-grad), var(--surface); border: 1px solid var(--border);
  border-radius: 24px; padding: 36px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 16px;
  animation: rise .5s cubic-bezier(.2,.7,.2,1);
}
.login-card .brand { padding: 0 0 8px; }
.login-card h1 { font-size: 24px; font-weight: 800; }
.login-card p { margin: -8px 0 0; }
.btn-google { height: 46px; background: var(--surface); border: 1px solid var(--border-strong); color: var(--text); font-size: 14.5px; gap: 10px; border-radius: 12px; }
.btn-google:hover { background: var(--surface-hover); border-color: rgba(59, 130, 246, .5); }
.dev-form { display: flex; flex-direction: column; gap: 12px; }
.dev-form input { height: 40px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ============ Presença ============ */
.av-wrap { position: relative; display: inline-flex; flex: none; }
.pdot {
  position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--surface); background: var(--p-offline);
}
.avatar-lg + .pdot, .avatar-xl + .pdot { width: 12px; height: 12px; }
.pdot.p-online { background: var(--p-online); box-shadow: 0 0 8px var(--p-online); }
.pdot.p-ausente { background: var(--p-away); }
.pdot.p-offline { background: var(--p-offline); }
.pdot.p-atendendo { background: var(--p-support); animation: live 1.8s infinite; }
.presence-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.presence-label i { width: 8px; height: 8px; border-radius: 50%; background: var(--p-offline); }
.presence-label.p-online i { background: var(--p-online); }
.presence-label.p-online { color: var(--p-online); font-weight: 650; }
.presence-label.p-ausente i { background: var(--p-away); }
.presence-label.p-atendendo i { background: var(--p-support); }
.presence-label.p-atendendo { color: var(--p-support); font-weight: 650; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, .7); } 70% { box-shadow: 0 0 0 7px rgba(34, 211, 238, 0); } 100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); } }

.team { margin-top: 10px; overflow-y: auto; min-height: 0; flex: 1; }
.team .nav-label { display: flex; align-items: center; }
.team .nav-label span { margin-left: auto; text-transform: none; letter-spacing: 0; font-weight: 700; color: var(--p-online); }
.team .nav-label em { font-style: normal; color: var(--p-support); margin-left: 4px; }
.team-row { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 10px; }
.team-row:hover { background: var(--surface-hover); }
.team-row .who { min-width: 0; flex: 1; line-height: 1.25; }
.team-row .who div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-row .nm { font-size: 13px; font-weight: 600; color: var(--text); }
.team-row .st { font-size: 11.5px; color: var(--text-3); }
.team-row.offline .nm { color: var(--text-2); }
.team-row.atendendo .st { color: var(--p-support); }

/* ============ Notificações ============ */
.bell-wrap { position: relative; }
.bell { position: relative; width: 40px; height: 40px; border: 1px solid var(--border); background: var(--surface); }
.bell .bdg {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px;
  background: var(--u-imediata); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center;
  border: 2px solid var(--bg); box-shadow: 0 0 12px rgba(244, 63, 94, .6);
}
.bell.ring svg { animation: ring .9s ease-in-out; transform-origin: 50% 10%; }
@keyframes ring { 0%,100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(410px, calc(100vw - 24px));
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg);
  z-index: 40; overflow: hidden; animation: pop-in .2s ease-out;
}
.notif-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.notif-head h3 { font-size: 15px; flex: 1; }
.notif-list { max-height: min(460px, 60vh); overflow-y: auto; padding: 6px; }
.notif-item { display: flex; gap: 11px; padding: 11px 12px; border-radius: 12px; cursor: pointer; position: relative; }
.notif-item:hover { background: var(--surface-hover); }
.notif-item.unread { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.notif-item.unread::after { content: ""; position: absolute; right: 12px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.notif-item .n-body { flex: 1; min-width: 0; padding-right: 12px; }
.notif-item .n-title { font-weight: 650; font-size: 13.5px; }
.notif-item .n-text { color: var(--text-2); font-size: 13px; word-break: break-word; }
.notif-item .n-time { color: var(--text-3); font-size: 11.5px; margin-top: 2px; }
.notif-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12.5px; }
.notif-foot label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-2); }

/* ============ Botão "Em atendimento" ============ */
.btn-support { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn-support:hover { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(34, 211, 238, .15); }
.btn-support.on {
  background: linear-gradient(var(--surface), var(--surface)) padding-box, var(--brand-grad) border-box;
  border: 1px solid transparent; color: var(--p-support); box-shadow: 0 0 22px -4px rgba(34, 211, 238, .5);
}
.btn-support .live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--p-support); animation: live 1.8s infinite; }
.btn-support .timer { font-variant-numeric: tabular-nums; font-weight: 800; }
.btn-support.on:hover { color: var(--text); }
.btn-support.on:hover .timer::after { content: " · Encerrar"; font-weight: 600; }
.tl-icon.live { background: rgba(34, 211, 238, .15); color: var(--p-support); animation: live 1.8s infinite; }

/* ============ Responsivo ============ */
@media (max-width: 1200px) {
  .grid-2, .grid-2-even, .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); transition: transform .25s; visibility: hidden; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); visibility: visible; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi .value { font-size: 24px; margin-top: 8px; }
  .kpi .spark { display: none; }
  .task-row { padding: 10px 12px; gap: 8px; }
  .task-row .meta { display: none; }
  .icon-btn.menu-btn { display: inline-grid; }
  .topbar { padding: 12px 14px; gap: 8px; }
  .content { padding: 16px 14px 40px; }
  .board { grid-template-columns: 1fr; }
  .toolbar .search { width: 100%; }
  .toolbar select.input { flex: 1; min-width: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 110px 1fr; }
  .topbar .subtitle, .hide-sm { display: none; }
  .hero { grid-template-columns: 1fr; padding: 22px; }
  .hero h2 { font-size: 24px; }
  .hero .hero-side { justify-content: space-between; }
  .ring { width: 110px; height: 110px; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut { margin: 0 auto; }
  .contact-row { grid-template-columns: 1fr 34px; }
  .contact-row > *:not(:last-child) { grid-column: 1; }
  .contact-row > :last-child { grid-column: 2; grid-row: 1; }
  .btn-support.on:hover .timer::after { content: ""; }
  .notif-panel { position: fixed; right: 12px; top: 62px; }
  .drawer { top: 0; right: 0; bottom: 0; width: 100vw; border-radius: 0; }
}

@media print {
  .sidebar, .topbar .btn, .toolbar, .period, .no-print, .bell-wrap { display: none !important; }
  .topbar { position: static; background: none; border: 0; }
  body { background: #fff; }
  body::before { display: none; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* ============ Hero compacto (demais telas) ============ */
.hero-sm { padding: 22px 26px; border-radius: 20px; margin-bottom: 18px; }
.hero-sm h2 { font-size: 25px; margin-top: 4px; }
.hero-sm h2::first-letter { text-transform: uppercase; }
.hero-sm p { font-size: 13.5px; }
.hero-sm .hero-actions { margin-top: 16px; }
.hero-sm::after { width: 240px; height: 240px; right: -40px; bottom: -70px; }
.hero-stats { display: flex; gap: 0; }
.hero-stats .hero-stat { padding: 4px 22px; text-align: left; }
.hero-stats .hero-stat + .hero-stat { border-left: 1px solid rgba(255, 255, 255, .18); }
.hero-stats .hero-stat .n { font-size: 26px; line-height: 1.1; }
.toolbar.card { padding: 12px 14px; border-radius: 16px; }

/* ============ Chips de canais ============ */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 99px;
  border: 1px solid var(--border-strong); font-size: 13px; font-weight: 600; color: var(--text-2); background: var(--surface);
  transition: all .15s;
}
.chips span .dot { width: 9px; height: 9px; border-radius: 50%; }
.chips label:hover span { border-color: rgba(59, 130, 246, .5); color: var(--text); }
.chips input:checked + span { border-color: var(--cyan); background: color-mix(in srgb, var(--cyan) 14%, transparent); color: var(--text); box-shadow: 0 0 16px -6px var(--cyan); }
.chips input:checked + span::after { content: "✓"; font-weight: 800; color: var(--cyan); }
.chips input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 1px; }
.dropzone { padding: 22px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dropzone svg { width: 26px; height: 26px; color: var(--cyan); }
@media (max-width: 860px) {
  .hero-stats { flex-wrap: wrap; gap: 12px 0; }
  .hero-stats .hero-stat { padding: 4px 16px 4px 0; }
  .hero-stats .hero-stat + .hero-stat { border-left: 0; }
}

/* Faixa pedindo para ativar os alertas no computador */
.perm-banner {
  display: flex; align-items: center; gap: 14px; margin: 20px 32px 0; padding: 14px 16px; max-width: 1496px;
  background: var(--accent-soft); border: 1px solid rgba(59, 130, 246, .25); border-radius: var(--radius-sm);
  box-shadow: inset 3px 0 0 var(--cyan);
}
.perm-banner[hidden] { display: none; }
.perm-banner .pb-icon { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--cyan); }
.perm-banner .pb-icon .i { animation: bell-nudge 2.4s ease-in-out infinite; transform-origin: 50% 10%; }
.perm-banner .pb-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; color: var(--text); }
.perm-banner .pb-text span { color: var(--text-2); font-size: 13px; }
.perm-banner .pb-actions { display: flex; gap: 6px; flex: none; }
@keyframes bell-nudge { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(14deg); } 82% { transform: rotate(-12deg); } 88% { transform: rotate(8deg); } 94% { transform: rotate(-4deg); } }
@media (prefers-reduced-motion: reduce) { .perm-banner .pb-icon .i { animation: none; } }
@media (max-width: 860px) {
  .perm-banner { margin: 12px 14px 0; flex-wrap: wrap; }
  .perm-banner .pb-actions { width: 100%; justify-content: flex-end; }
}
@media print { .perm-banner { display: none !important; } }
