/* =========================================================================
   Agenda — estilos
   ========================================================================= */

:root {
  /* base neutra/indigo; o lilas entra so como toque (--lilac, --grad-soft) */
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-2: #f8f9fd;
  --surface-3: #eef0f8;
  --line: #e5e7f2;
  --line-strong: #d4d7e6;
  --ink: #1b1d2e;
  --ink-2: #4a4f66;
  --ink-3: #8189a3;
  --accent: #6366f1;
  --accent-2: #a855f7;
  --accent-soft: #eef0ff;
  --accent-ink: #ffffff;
  --lilac: #b39ddb;
  --lilac-soft: #f3effc;
  --grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 55%, #d946ef 100%);
  --grad-soft: linear-gradient(120deg, #ffffff 0%, #f8f7ff 55%, #f3effc 100%);
  --rec: #ef4444;
  --rec-soft: #fdecec;
  --ok: #16a34a;
  --ok-soft: #e7f8ee;
  --warn: #d97706;
  --warn-soft: #fff6e5;
  --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(30, 27, 75, .06);
  --shadow: 0 1px 2px rgba(30, 27, 75, .05), 0 10px 30px -12px rgba(49, 46, 129, .18);
  --shadow-lg: 0 28px 70px -16px rgba(49, 46, 129, .35);
  --radius: 14px;
  --radius-sm: 8px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --sidebar: 224px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1020;
    --surface: #171933;
    --surface-2: #1c1f3d;
    --surface-3: #252949;
    --line: #2c3058;
    --line-strong: #3a3f6c;
    --ink: #eef0ff;
    --ink-2: #b9bedb;
    --ink-3: #8a90b5;
    --accent: #818cf8;
    --accent-2: #c084fc;
    --accent-soft: #23264d;
    --accent-ink: #ffffff;
    --lilac: #a78bdb;
    --lilac-soft: #241f45;
    --grad-soft: linear-gradient(120deg, #171933 0%, #1c1d3d 55%, #221d44 100%);
    --rec: #ff6b6b;
    --rec-soft: #3a1c1e;
    --ok: #51cf66;
    --ok-soft: #173321;
    --warn: #ffa94d;
    --warn-soft: #3a2a17;
    --danger: #ff8787;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -8px rgba(0, 0, 0, .5);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Botoes ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font-weight: 600; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .1s, box-shadow .15s;
}
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:focus-visible, .input:focus-visible, .chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 6px 16px -6px rgba(99, 102, 241, .6); }
.btn.primary:hover { background: var(--grad); filter: brightness(1.06); border-color: transparent; transform: translateY(-1px); box-shadow: 0 10px 22px -8px rgba(99, 102, 241, .7); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--rec-soft); border-color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-3); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { width: 36px; padding: 0; }
.btn.sm.icon { width: 30px; }
.btn .badge { margin-left: 2px; }

.badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--rec); color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
}
.pill {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px;
  border-radius: 11px; font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-2);
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.rec { background: var(--rec-soft); color: var(--rec); }
.pill.accent { background: var(--accent-soft); color: var(--accent); }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.live .dot { animation: pulse 1.2s infinite; }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex: none; }

/* ---------- Formularios ---------- */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.input, select.input, textarea.input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input::placeholder { color: var(--ink-3); }
.hint { font-size: 12px; color: var(--ink-3); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.form { display: grid; gap: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: 13.5px; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.form-error { color: var(--danger); font-size: 13px; font-weight: 500; }
.form-ok { color: var(--ok); font-size: 13px; font-weight: 500; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 10px;
  border-radius: 17px; border: 1px solid var(--line-strong); background: var(--surface);
  cursor: pointer; font-weight: 600; font-size: 13px; user-select: none; transition: all .15s;
}
.chip .sw { width: 12px; height: 12px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 2px var(--surface); outline: 1.5px solid var(--c); }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip:has(input:checked) { border-color: var(--c); background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.chip:has(input:checked) .sw { box-shadow: none; }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Estrutura do app ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 14px; border-right: 1px solid var(--line); background: var(--surface);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: var(--grad); color: #fff; box-shadow: 0 6px 16px -6px rgba(99, 102, 241, .7);
}
.brand-mark svg { width: 18px; height: 18px; }
.nav a {
  display: flex; align-items: center; gap: 11px; height: 38px; padding: 0 10px; border-radius: 9px;
  color: var(--ink-2); font-weight: 600; text-decoration: none; transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a.active { background: var(--accent-soft); color: var(--accent); position: relative; }
.nav a.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--grad); }
.nav a .badge { margin-left: auto; }
.nav-label { padding: 16px 10px 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.sidebar-foot { margin-top: auto; display: grid; gap: 8px; }
.me-card {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: left; width: 100%;
}
.me-card:hover { border-color: var(--line-strong); }
.me-card .who { min-width: 0; flex: 1; }
.me-card .who strong { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card .who span { font-size: 11.5px; color: var(--ink-3); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--c, var(--accent)); color: #fff; font-weight: 700; font-size: 12.5px; letter-spacing: .02em;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  height: 56px; padding: 0 24px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid transparent;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 20px; font-weight: 750; }
.topbar .sub { color: var(--ink-3); font-size: 13px; margin-left: 2px; }
.topbar .spacer { flex: 1; }
.menu-toggle { display: none; }
.page { padding: 6px 24px 32px; flex: 1; min-width: 0; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 18px; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 15px; font-weight: 700; }
.card-head .spacer { flex: 1; }
.section-title { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 10px; }

.empty { padding: 36px 20px; text-align: center; color: var(--ink-3); display: grid; gap: 8px; justify-items: center; }
.empty svg.i { width: 30px; height: 30px; stroke-width: 1.4; color: var(--line-strong); }
.empty strong { color: var(--ink-2); font-size: 14.5px; }

/* ---------- Agenda ---------- */
.agenda-layout { display: grid; grid-template-columns: 252px minmax(0, 1fr); gap: 14px; align-items: start; }
.agenda-side {
  display: grid; gap: 10px; position: sticky; top: 64px;
  max-height: calc(100vh - 92px); overflow: auto; padding: 0 2px 4px; scrollbar-width: thin;
}
.side-card { padding: 12px; }
.side-title { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; }
.side-title .spacer { flex: 1; }
.side-title a { text-transform: none; letter-spacing: 0; font-weight: 650; font-size: 12px; }

/* minicalendario */
.mini-head { display: flex; align-items: center; gap: 2px; margin: -4px 0 2px; }
.mini-head strong { flex: 1; font-size: 14px; font-weight: 750; letter-spacing: -.01em; }
.mini-head strong::first-letter { text-transform: uppercase; }
.mini-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; text-align: center; }
.mini-cal .dow { font-size: 10px; font-weight: 750; color: var(--ink-3); padding: 0 0 2px; text-transform: uppercase; }
.mini-cal button {
  position: relative; height: 26px; border: none; background: transparent; border-radius: 8px;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; font-variant-numeric: tabular-nums;
  transition: background .12s, color .12s;
}
.mini-cal button:hover { background: var(--surface-3); color: var(--ink); }
.mini-cal button.out { color: var(--ink-3); opacity: .5; }
.mini-cal button.in-range { background: var(--accent-soft); color: var(--accent); }
.mini-cal button.today { background: var(--grad); color: #fff; box-shadow: 0 4px 12px -4px rgba(99, 102, 241, .7); }
.mini-cal .dots { position: absolute; left: 0; right: 0; bottom: 2px; display: flex; justify-content: center; gap: 2px; }
.mini-cal .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--c); }
.mini-cal button.today .dots i { background: #fff; }

/* agendas */
.cal-list { display: grid; gap: 2px; }
.cal-item { display: flex; align-items: center; gap: 10px; padding: 4px 6px; border-radius: 9px; cursor: pointer; user-select: none; }
.cal-item:hover { background: var(--surface-2); }
.cal-item input { appearance: none; width: 17px; height: 17px; border-radius: 6px; border: 2px solid var(--c); margin: 0; flex: none; cursor: pointer; display: grid; place-items: center; transition: background .12s; }
.cal-item input:checked { background: var(--c); }
.cal-item input:checked::after { content: ""; width: 8px; height: 4px; border: solid #fff; border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.cal-item .nm { flex: 1; min-width: 0; font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item .tag { font-size: 11px; color: var(--ink-3); }

/* lista lateral: proximos / passados */
.side-tabs { display: flex; gap: 3px; padding: 3px; background: var(--surface-3); border-radius: 11px; margin-bottom: 10px; }
.side-tabs button {
  flex: 1; height: 30px; border: none; background: transparent; border-radius: 8px; font: inherit;
  font-weight: 650; font-size: 12.5px; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.side-tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.filter-chips { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.filter-chips button {
  height: 25px; padding: 0 9px; border-radius: 13px; border: 1px solid var(--line-strong); background: var(--surface);
  font: inherit; font-size: 11.5px; font-weight: 650; color: var(--ink-2); cursor: pointer;
}
.filter-chips button.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.ev-list { display: grid; gap: 6px; align-content: start; max-height: 50vh; overflow: auto; padding-right: 2px; scrollbar-width: thin; }
.ev-day { font-size: 10.5px; font-weight: 750; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 6px 2px 0; }
.ev-item {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px;
  padding: 8px 8px 8px 10px; border-radius: 10px; cursor: pointer;
  background: color-mix(in srgb, var(--c) 9%, var(--surface)); border-left: 3px solid var(--c);
  transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.ev-item:hover { transform: translateX(2px); box-shadow: var(--shadow-sm); background: color-mix(in srgb, var(--c) 14%, var(--surface)); }
.ev-item strong { display: block; font-size: 13px; font-weight: 650; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-item span { font-size: 11.5px; color: var(--ink-3); }
.ev-item.now strong::after { content: "agora"; margin-left: 6px; font-size: 10px; font-weight: 800; color: var(--rec); text-transform: uppercase; }
.ev-item.missed strong { text-decoration: line-through; color: var(--ink-3); }
.ok-btns { display: flex; gap: 4px; }
.ok-btn {
  width: 27px; height: 27px; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface);
  display: grid; place-items: center; cursor: pointer; color: var(--ink-3); transition: all .12s;
}
.ok-btn svg.i { width: 14px; height: 14px; stroke-width: 2.4; }
.ok-btn.yes:hover, .ok-btn.yes.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.ok-btn.no:hover, .ok-btn.no.on { background: var(--rec); border-color: var(--rec); color: #fff; }
.ok-state { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 750; }
.ok-state.done { color: var(--ok); }
.ok-state.missed { color: var(--rec); }

/* barra da agenda */
.cal-card { padding: 10px 12px 12px; }
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cal-toolbar h2 { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.cal-toolbar h2::first-letter { text-transform: uppercase; }
.cal-toolbar .spacer { flex: 1; }
.nav-btns { display: flex; gap: 4px; }
.segmented { display: flex; padding: 3px; background: var(--surface-3); border-radius: 11px; }
.segmented button {
  height: 30px; padding: 0 13px; border: none; background: transparent; border-radius: 8px;
  font: inherit; font-weight: 650; font-size: 12.5px; color: var(--ink-2); cursor: pointer;
}
.segmented button.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow-sm); }
#calendar { min-height: 480px; }

/* FullCalendar */
.cal-card .fc {
  --fc-border-color: var(--line);
  --fc-page-bg-color: var(--surface);
  --fc-neutral-bg-color: var(--surface-2);
  --fc-today-bg-color: color-mix(in srgb, var(--accent) 5%, transparent);
  --fc-now-indicator-color: var(--rec);
  --fc-event-border-color: transparent;
  --fc-list-event-hover-bg-color: var(--surface-2);
  --fc-highlight-color: color-mix(in srgb, var(--accent) 16%, transparent);
  --fc-non-business-color: color-mix(in srgb, var(--surface-3) 40%, transparent);
  font-size: 12.5px;
}
.cal-card .fc-theme-standard td, .fc-theme-standard th { border-color: var(--line); }
.cal-card .fc-theme-standard .fc-scrollgrid { border-color: var(--line); border-radius: 12px; overflow: hidden; }
.cal-card .fc a { color: inherit; }
.cal-card .fc a:hover { text-decoration: none; }
.cal-card .fc .fc-col-header-cell { background: var(--surface); }
.cal-card .fc .fc-col-header-cell-cushion { padding: 6px 2px; font-weight: 700; color: var(--ink-2); font-size: 12px; text-transform: capitalize; }
.cal-card .fc .day-head { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.cal-card .fc .day-head small { font-size: 10.5px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
.cal-card .fc .day-head b { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; font-size: 14px; font-weight: 750; color: var(--ink); }
.cal-card .fc .fc-day-today .day-head small { color: var(--accent); }
.cal-card .fc .fc-day-today .day-head b { background: var(--grad); color: #fff; box-shadow: 0 4px 12px -4px rgba(99, 102, 241, .7); }
.cal-card .fc .fc-daygrid-day-number { font-weight: 650; color: var(--ink-2); padding: 6px 8px; font-size: 12.5px; }
.cal-card .fc .fc-day-today .fc-daygrid-day-number { background: var(--grad); color: #fff; border-radius: 12px; min-width: 24px; text-align: center; margin: 4px; padding: 2px 7px; }
.cal-card .fc .fc-timegrid-slot { height: 17px; }
.cal-card .fc .fc-timegrid-slot-minor { border-top-style: dotted; border-top-color: color-mix(in srgb, var(--line-strong) 55%, transparent); }
.cal-card .fc .fc-timegrid-slot-label { vertical-align: top; }
.cal-card .fc .fc-timegrid-slot-label-cushion { font-size: 11px; color: var(--ink-3); font-family: var(--mono); padding-top: 0; transform: translateY(-50%); background: var(--surface); }
/* o primeiro horario (00:00) nao sobe, senao fica cortado no topo da area rolavel */
.cal-card .fc .fc-timegrid-slots tr:first-child .fc-timegrid-slot-label-cushion { transform: none; }
/* barras de rolagem finas (sem as setinhas do Windows) */
.cal-card .fc .fc-scroller { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
.cal-card .fc .fc-timegrid-axis-cushion { font-size: 11px; color: var(--ink-3); }
.cal-card .fc .fc-timegrid-now-indicator-line { border-width: 2px 0 0; }
.cal-card .fc .fc-timegrid-now-indicator-arrow { border-color: var(--rec); border-top-color: transparent; border-bottom-color: transparent; }

/* compromissos: cartoes coloridos */
.cal-card .fc .ag-ev {
  background: color-mix(in srgb, var(--c) 15%, var(--surface)) !important;
  border: none !important; border-left: 3px solid var(--c) !important; border-radius: 8px !important;
  color: color-mix(in srgb, var(--c) 72%, var(--ink)) !important; cursor: pointer;
  transition: background .12s, box-shadow .12s;
}
.cal-card .fc .ag-ev:hover { background: color-mix(in srgb, var(--c) 24%, var(--surface)) !important; box-shadow: var(--shadow); }
.cal-card .fc .ag-ev .fc-event-main { color: inherit; }
.cal-card .fc .ag-ev.missed { opacity: .55; }
.cal-card .fc .ag-ev.missed .t { text-decoration: line-through; }
.cal-card .fc .ag-ev.pending-ok { border-left-style: dashed !important; }
.cal-card .fc .fc-timegrid-event-harness-inset .ag-ev { box-shadow: 0 0 0 1.5px var(--surface); }
.cal-card .fc .fc-event-mirror, .cal-card .fc .fc-event-mirror.ag-ev {
  background: color-mix(in srgb, var(--accent) 18%, var(--surface)) !important; border: 2px dashed var(--accent) !important;
  border-radius: 8px !important; color: var(--accent) !important; box-shadow: var(--shadow);
}
.fc-ev { display: flex; flex-direction: column; gap: 1px; padding: 2px 6px; overflow: hidden; line-height: 1.25; width: 100%; }
.fc-ev .row { display: flex; align-items: center; gap: 4px; min-width: 0; }
.fc-ev .t { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fc-ev .h { font-size: 10.5px; opacity: .85; font-family: var(--mono); white-space: nowrap; }
.fc-ev .own { display: flex; gap: 3px; margin-top: 1px; }
.fc-ev .own i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 1.5px var(--surface); }
.fc-ev svg.i { width: 12px; height: 12px; flex: none; stroke-width: 2.4; }
.fc-ev .st-done { color: var(--ok); }
.fc-ev .st-missed { color: var(--rec); }
.fc-ev .cdot { width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--c); }
.fc-daygrid-event .fc-ev { flex-direction: row; align-items: center; gap: 5px; }
.cal-card .fc .fc-daygrid-event { margin-top: 2px; }
.cal-card .fc .fc-daygrid-dot-event { background: transparent !important; border-left: none !important; color: var(--ink-2) !important; }
.cal-card .fc .fc-daygrid-dot-event:hover { background: var(--surface-2) !important; }
.cal-card .fc .fc-list { border-radius: 12px; overflow: hidden; }
.cal-card .fc .fc-list-event-title, .cal-card .fc .fc-list-event-time { font-size: 13px; }
.cal-card .fc .fc-list-day-cushion { background: var(--surface-2); }
.cal-card .fc .fc-list-event:hover td { background: var(--surface-2); }
.cal-card .fc .fc-more-link { color: var(--accent); font-weight: 700; }
.cal-card .fc .fc-popover { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow-lg); border-radius: 12px; overflow: hidden; }
.cal-card .fc .fc-popover-header { background: var(--surface-2); }

/* horario sob o mouse (marcacao de 15 em 15 minutos) */
.cal-card .fc .fc-timegrid-body { position: relative; }
.slot-hover {
  position: absolute; z-index: 4; pointer-events: none; border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 60%, transparent);
  display: flex; align-items: center; gap: 4px; padding: 0 6px; overflow: hidden;
  font-size: 11px; font-weight: 750; color: var(--accent); font-family: var(--mono); white-space: nowrap;
}
.slot-hover::before { content: "+"; font-family: var(--font); font-weight: 800; font-size: 13px; }

/* Agenda ocupando exatamente a altura da janela (computador): a pagina nao rola */
.cal-toolbar { margin-bottom: 8px; }
.agenda-side .notice { padding: 9px 11px; font-size: 12.5px; }
@media (min-width: 1101px) and (min-height: 560px) {
  .page.page-fit { padding-bottom: 12px; }
  .page-fit .agenda-layout { height: calc(100vh - 56px - 6px - 12px); align-items: stretch; }
  .page-fit .agenda-side { position: static; height: 100%; max-height: none; display: flex; flex-direction: column; overflow: hidden; padding: 0; }
  .page-fit .agenda-side > * { flex: none; }
  .page-fit .agenda-side > .grow { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .page-fit .agenda-side > .grow #side-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }
  .page-fit .agenda-side > .grow .ev-list { flex: 1; min-height: 0; max-height: none; }
  .page-fit .agenda-side > .grow .empty { padding: 18px 10px; }
  .page-fit .cal-card { height: 100%; display: flex; flex-direction: column; min-height: 0; }
  .page-fit #cal-wrap { flex: 1; min-height: 0; }
  .page-fit #calendar { height: 100%; min-height: 0; }
}

/* ---------- Dialogos ---------- */
dialog.modal {
  border: none; padding: 0; border-radius: 16px; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg); width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 40px);
}
dialog.modal.wide { width: min(820px, calc(100vw - 32px)); }
dialog.modal:focus { outline: none; }
dialog.modal::backdrop { background: rgba(14, 15, 18, .45); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: pop .18s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px 6px; }
.modal-head h2 { font-size: 18px; font-weight: 750; flex: 1; }
.modal-body { padding: 12px 22px 8px; overflow: auto; max-height: calc(100vh - 200px); }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 14px 22px 18px; border-top: 1px solid var(--line); margin-top: 8px; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }
.title-input { border: none; border-bottom: 2px solid var(--line); border-radius: 0; height: 46px; font-size: 20px; font-weight: 700; padding: 0 2px; background: transparent; }
.title-input:focus { box-shadow: none; border-bottom-color: var(--accent); }
.meta-line { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--ink-3); font-size: 12.5px; }

/* ---------- Formulario de compromisso (compacto, horario em destaque) ---------- */
dialog.modal.ev-modal { width: min(560px, calc(100vw - 32px)); }
.ev-modal .modal-head { padding: 12px 16px 0; }
.ev-modal .modal-head h2 { font-size: 11.5px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.ev-modal .modal-body { padding: 2px 16px 2px; }
.ev-modal .modal-foot { padding: 10px 16px 12px; margin-top: 4px; gap: 6px; }
.ev-form { gap: 10px; }
.ev-form .title-input { height: 38px; font-size: 17px; }
.ev-form .input, .ev-form select.input { height: 32px; font-size: 13px; border-radius: 8px; padding: 0 10px; }
.ev-form textarea.input { height: auto; min-height: 0; padding: 7px 10px; font-size: 13px; line-height: 1.45; }
.ev-form .field { gap: 4px; align-content: start; }
.ev-form .field > label, .ev-form .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 750; }
.ev-form .form-error:empty { display: none; }
.ev-form .meta-line { font-size: 11.5px; gap: 4px 12px; }

.time-card { background: var(--grad-soft); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.time-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.time-row .spacer { flex: 1; }
.tc-date { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); }
.tc-date svg, .tc-enddate svg { width: 15px; height: 15px; flex: none; }
.ev-form .tc-date .input { width: auto; height: 30px; border-color: transparent; background: var(--surface); font-weight: 650; color: var(--ink); }
.tc-times { display: inline-flex; align-items: center; gap: 6px; }
.ev-form .time-big {
  width: 132px; height: 46px; padding: 0 8px 0 10px; border: 1px solid transparent; border-radius: 10px;
  background: var(--surface); box-shadow: var(--shadow-sm);
  font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 24px; font-weight: 800; letter-spacing: -.03em; color: var(--accent);
}
.ev-form .time-big:focus, .ev-form .time-big.wheeling { border-color: var(--accent); }
/* relogio pequeno e fixo (sem isso ele cresce com a fonte e cobre os minutos) */
.time-big::-webkit-calendar-picker-indicator { width: 14px; height: 14px; padding: 0; margin: 0 0 0 6px; opacity: .4; cursor: pointer; }
.time-big::-webkit-datetime-edit { padding: 0; }
@supports (field-sizing: content) { .ev-form .time-big { width: auto; field-sizing: content; } }
.time-big::-webkit-calendar-picker-indicator:hover { opacity: .8; }
.tc-arrow { color: var(--lilac); font-weight: 800; font-size: 18px; }
.tc-dur { margin-left: auto; padding: 4px 11px; border-radius: 999px; background: var(--grad); color: #fff; font-size: 12px; font-weight: 750; white-space: nowrap; }
.tc-dur.bad { background: var(--danger); }
.tc-dur:empty { display: none; }
.time-row.sub { gap: 6px 12px; }
.dur-chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.chip-mini {
  height: 24px; padding: 0 9px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface);
  color: var(--ink-2); font-size: 11.5px; font-weight: 650; cursor: pointer; transition: all .12s;
}
.chip-mini:hover { border-color: var(--accent); color: var(--accent); }
.chip-mini.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.check.small { font-size: 12.5px; gap: 6px; color: var(--ink-2); }
.check.small input { width: 14px; height: 14px; }
.tc-enddate { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.tc-enddate svg { color: var(--accent); }
.ev-form .tc-enddate .input { width: auto; height: 28px; }

.ev-grid { display: grid; grid-template-columns: minmax(0, 1fr) 196px; gap: 10px 12px; }
.ev-form .chips { gap: 5px; }
.ev-form .chip { height: 28px; padding: 0 10px 0 8px; font-size: 12.5px; gap: 6px; }
.ev-form .chip .sw { width: 10px; height: 10px; }
.color-dots { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; min-height: 32px; }
.color-dots label { position: relative; width: 18px; height: 18px; border-radius: 50%; background: var(--c); cursor: pointer; transition: transform .12s, box-shadow .12s; }
.color-dots label.auto { background: conic-gradient(#6366f1, #d946ef, #f59e0b, #16a34a, #0ea5e9, #6366f1); }
.color-dots label:hover { transform: scale(1.12); }
.color-dots input { position: absolute; opacity: 0; pointer-events: none; }
.color-dots label:has(input:checked) { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c, var(--accent)); }
.color-dots label:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 4px; }
.ev-outcome-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 6px 10px; border-radius: 10px; background: var(--surface-3); }
@media (max-width: 560px) {
  .ev-grid { grid-template-columns: 1fr; }
  .ev-form .time-big { font-size: 21px; }
  .tc-dur { margin-left: 0; }
}

/* ---------- Toasts e alertas ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: grid; gap: 10px; width: min(380px, calc(100vw - 40px)); }
.toast {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-weight: 500;
  animation: slidein .25s cubic-bezier(.2, .9, .3, 1.1);
}
.toast.error { background: var(--danger); color: #fff; }
@keyframes slidein { from { opacity: 0; transform: translateY(12px); } }
.alert-card {
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--c, var(--accent));
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 14px 16px; display: grid; gap: 8px;
  animation: slidein .3s cubic-bezier(.2, .9, .3, 1.1);
}
.alert-card .when { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--c, var(--accent)); text-transform: uppercase; letter-spacing: .04em; }
.alert-card .when svg { width: 15px; height: 15px; animation: ring 1.6s ease-in-out 2; transform-origin: 50% 10%; }
@keyframes ring { 0%, 50%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(14deg); } 20%, 40% { transform: rotate(-14deg); } }
.alert-card strong { font-size: 15px; line-height: 1.3; }
.alert-card .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }

/* ---------- Notificacoes ---------- */
.popover {
  position: absolute; top: 56px; right: 24px; width: min(400px, calc(100vw - 24px)); z-index: 50;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden;
  animation: pop .16s ease-out;
}
.popover-head { display: flex; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.popover-head strong { flex: 1; }
.notif-list { max-height: 60vh; overflow: auto; }
.notif { display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.notif:hover { background: var(--surface-2); }
.notif .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.notif.read .dot { background: transparent; }
.notif p { font-size: 13.5px; }
.notif time { font-size: 11.5px; color: var(--ink-3); }
.bell { position: relative; }
.bell .badge { position: absolute; top: -3px; right: -3px; }

/* ---------- Listas e tabelas ---------- */
.list { display: grid; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: none; }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow strong { display: block; font-weight: 650; }
.list-row .grow span { font-size: 12.5px; color: var(--ink-3); }
.list-row .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table .user-cell { display: flex; align-items: center; gap: 10px; }
.table .user-cell strong { display: block; }
.table .user-cell span { font-size: 12px; color: var(--ink-3); }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 11px; background: var(--surface-3); width: fit-content; flex-wrap: wrap; }
.tabs button { height: 32px; padding: 0 14px; border: none; background: transparent; border-radius: 8px; font-weight: 600; color: var(--ink-2); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.tabs button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 16px; height: 16px; }
.search .input { padding-left: 34px; width: 260px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { padding: 14px 16px; }
.stat b { display: block; font-size: 24px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; }

.request-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.request-card:last-child { border-bottom: none; }
.request-card .info { flex: 1; min-width: 200px; display: grid; gap: 2px; }
.request-card .info strong { font-size: 14.5px; }
.request-card .info span { font-size: 12.5px; color: var(--ink-3); }

.linkbox { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line-strong); font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.share-btns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.share-btns .btn { height: 44px; }

.settings-grid { display: grid; gap: 18px; max-width: 860px; }
.status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; }

/* ---------- Reunioes ---------- */
.meet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.meet-card { padding: 16px; display: grid; gap: 10px; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; text-decoration: none; color: inherit; }
.meet-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow); transform: translateY(-1px); text-decoration: none; }
.meet-card h3 { font-size: 15.5px; font-weight: 700; }
.meet-card .meta-line { gap: 4px 12px; }
.meet-card .pills { display: flex; gap: 6px; flex-wrap: wrap; }

.meeting-head { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 18px; }
.meeting-head .titles { flex: 1; min-width: 260px; display: grid; gap: 6px; }
.meeting-head .title-input { font-size: 24px; height: 50px; }
.meeting-head .acts { display: flex; gap: 8px; flex-wrap: wrap; }

.recorder { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; padding: 22px 24px; }
.rec-btn {
  position: relative; width: 84px; height: 84px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--rec); color: #fff; display: grid; place-items: center;
  box-shadow: 0 10px 26px -8px color-mix(in srgb, var(--rec) 70%, transparent), inset 0 -3px 0 rgba(0,0,0,.15);
  transition: transform .15s, box-shadow .2s;
}
.rec-btn:hover { transform: scale(1.04); }
.rec-btn:active { transform: scale(.97); }
.rec-btn svg { width: 30px; height: 30px; }
.rec-btn .ring { position: absolute; inset: -8px; border-radius: 50%; border: 2px solid var(--rec); opacity: 0; }
.rec-btn.recording .ring { animation: ripple 1.6s ease-out infinite; }
.rec-btn.recording { background: var(--ink); box-shadow: 0 0 0 6px var(--rec-soft); }
.rec-btn.recording svg { color: var(--rec); }
@keyframes ripple { 0% { opacity: .6; transform: scale(.92); } 100% { opacity: 0; transform: scale(1.25); } }
.rec-info { display: grid; gap: 8px; min-width: 0; }
.rec-time { font-family: var(--mono); font-size: 38px; font-weight: 600; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.rec-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); }
.meter { height: 40px; width: 100%; display: block; }
.rec-actions { display: flex; flex-direction: column; gap: 8px; }

.transcript-card .card-head { flex-wrap: wrap; }
.transcript-box { padding: 14px 18px 18px; max-height: 460px; overflow: auto; scroll-behavior: smooth; }
.t-line { display: grid; grid-template-columns: 74px 1fr; gap: 10px; padding: 5px 0; }
.t-line time { font-family: var(--mono); font-size: 12px; color: var(--ink-3); padding-top: 2px; cursor: default; }
.t-line p { font-size: 14.5px; line-height: 1.6; }
.t-line.interim p { color: var(--ink-3); font-style: italic; }
.t-line.preview p { color: var(--ink-3); }
.t-divider { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.t-divider::before, .t-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.seg-list summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 4px 0; }
.transcript-edit { width: 100%; min-height: 420px; font-family: var(--mono); font-size: 13px; }

.segments { display: grid; gap: 8px; padding: 12px 18px 16px; }
.segment { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.segment audio { width: 100%; height: 34px; }
.segment .lbl { font-weight: 700; font-size: 12.5px; white-space: nowrap; }

.summary { display: grid; gap: 18px; padding: 18px; }
.summary .overview { font-size: 15px; line-height: 1.7; color: var(--ink); white-space: pre-line; }
.brief-card { border-radius: 14px; padding: 14px 16px 12px; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 10%, var(--surface)), color-mix(in srgb, var(--accent-2) 9%, var(--surface))); border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line)); }
.brief-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.brief-head h4 { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); }
.brief-head .spacer { flex: 1; }
.brief-card ul { margin: 0; padding-left: 20px; display: grid; gap: 5px; font-size: 14.5px; line-height: 1.55; color: var(--ink); }
.brief-card li::marker { color: var(--accent); }
.brief-card.empty-brief p { margin-top: 2px; }
.topics { display: grid; gap: 10px; counter-reset: topic; }
.topic { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.topic summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; font-weight: 700; font-size: 14.5px; }
.topic summary::-webkit-details-marker { display: none; }
.topic summary::before {
  counter-increment: topic; content: counter(topic);
  width: 26px; height: 26px; flex: none; border-radius: 8px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 800;
}
.topic summary .when { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--ink-3); font-weight: 500; }
.topic summary .chev { transition: transform .2s; color: var(--ink-3); }
.topic[open] summary .chev { transform: rotate(180deg); }
.topic ul { margin: 0; padding: 0 18px 14px 54px; display: grid; gap: 6px; }
.topic li { line-height: 1.6; }
.summary-block h4 { font-size: 13px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.summary-block ul { margin: 0; padding-left: 20px; display: grid; gap: 5px; line-height: 1.6; }
.summary-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: 13px; font-weight: 500; }
.notice.info { background: var(--accent-soft); color: var(--accent); }
.notice svg.i { margin-top: 1px; }

/* ---------- Login ---------- */
.auth-page { min-height: 100vh; background: #fbf8ff; overflow-x: hidden; }
.clouds { position: fixed; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.cloud { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .8; will-change: transform; }
.cloud.c1 { width: 56vmax; height: 42vmax; top: -16vmax; left: -14vmax; background: radial-gradient(circle at 40% 40%, #a5b4fc 0%, rgba(165, 180, 252, 0) 68%); animation: drift1 28s ease-in-out infinite alternate; }
.cloud.c2 { width: 48vmax; height: 40vmax; top: -10vmax; right: -14vmax; background: radial-gradient(circle at 50% 50%, #f9a8d4 0%, rgba(249, 168, 212, 0) 68%); animation: drift2 34s ease-in-out infinite alternate; }
.cloud.c3 { width: 52vmax; height: 44vmax; bottom: -20vmax; left: 4vmax; background: radial-gradient(circle at 50% 50%, #99f6e4 0%, rgba(153, 246, 228, 0) 68%); animation: drift3 31s ease-in-out infinite alternate; }
.cloud.c4 { width: 44vmax; height: 36vmax; bottom: -14vmax; right: -6vmax; background: radial-gradient(circle at 50% 50%, #fde68a 0%, rgba(253, 230, 138, 0) 68%); animation: drift4 38s ease-in-out infinite alternate; opacity: .7; }
.cloud.c5 { width: 36vmax; height: 30vmax; top: 28%; left: 34%; background: radial-gradient(circle at 50% 50%, #c4b5fd 0%, rgba(196, 181, 253, 0) 68%); animation: drift5 42s ease-in-out infinite alternate; opacity: .6; }
@keyframes drift1 { to { transform: translate(22vw, 14vh) scale(1.15) rotate(8deg); } }
@keyframes drift2 { to { transform: translate(-20vw, 18vh) scale(.9) rotate(-10deg); } }
@keyframes drift3 { to { transform: translate(18vw, -16vh) scale(1.12); } }
@keyframes drift4 { to { transform: translate(-24vw, -12vh) scale(1.2) rotate(12deg); } }
@keyframes drift5 { to { transform: translate(-14vw, 10vh) scale(1.25); } }

.auth-center { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.auth-wrap { width: min(420px, 100%); display: grid; gap: 18px; justify-items: center; }
.auth-card {
  width: 100%; display: grid; gap: 20px; padding: 32px 30px 26px; border-radius: 24px;
  background: rgba(255, 255, 255, .72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 30px 80px -24px rgba(99, 102, 241, .38), 0 2px 6px rgba(30, 27, 75, .05);
  animation: rise .5s cubic-bezier(.2, .9, .3, 1.1);
}
@keyframes rise { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.auth-logo { width: 220px; height: auto; display: block; }
.auth-brand .brand-mark { width: 54px; height: 54px; border-radius: 17px; }
.auth-brand .brand-mark svg { width: 26px; height: 26px; }
.auth-brand .brand-name { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-card h2 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; text-align: center; }
.auth-card .lead { color: var(--ink-3); margin-top: 4px; text-align: center; }
.auth-card .input { height: 44px; border-radius: 12px; background: rgba(255, 255, 255, .92); }
.auth-card .btn { height: 46px; border-radius: 12px; font-size: 14.5px; width: 100%; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; font-weight: 600; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.btn.outline-accent { border-color: color-mix(in srgb, var(--accent) 45%, var(--line-strong)); color: var(--accent); background: rgba(255, 255, 255, .75); }
.btn.outline-accent:hover { background: var(--accent-soft); border-color: var(--accent); }
.auth-links { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; font-size: 13.5px; }
.auth-foot { font-size: 12.5px; color: var(--ink-3); text-align: center; }
.auth-foot a { color: var(--ink-2); }
.pass-wrap { position: relative; }
.pass-wrap .input { padding-right: 44px; }
.pass-wrap button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 36px !important; height: 36px !important; }

/* ---------- Inicio (painel do dia) ---------- */
.dash { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; max-width: 1440px; margin: 0 auto; padding-top: 4px; }
.dash > *, .dash-grid > * { min-width: 0; }
/* Situacao: verde realizado, amarelo proximo/agora, azul a seguir, vermelho sem atualizacao */
.s-done { --sc: #16a34a; --sc-ink: #fff; }
.s-now, .s-next { --sc: #f5b700; --sc-ink: #4a3300; }
.s-future { --sc: #3b82f6; --sc-ink: #fff; }
.s-late { --sc: #e11d48; --sc-ink: #fff; }
.s-missed { --sc: #a39fb3; --sc-ink: #fff; }

.dash-hero {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 22px; padding: 18px 22px;
  border-radius: 20px; background: var(--grad-soft); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.dash-hero::before, .dash-hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.dash-hero::before { width: 340px; height: 340px; right: -90px; top: -210px; background: radial-gradient(circle, rgba(179, 157, 219, .28), transparent 66%); }
.dash-hero::after { left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--lilac); }
.dash-hero > * { position: relative; z-index: 1; }
.hero-logo { flex: none; background: #fff; border-radius: 16px; padding: 10px 14px; border: 1px solid rgba(99, 102, 241, .1); box-shadow: 0 8px 22px -8px rgba(99, 102, 241, .28); }
.hero-logo img { display: block; width: 168px; height: auto; }
.hero-text { flex: 1; min-width: 0; padding-left: 22px; border-left: 1px solid var(--line-strong); }
.hero-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent); }
.hero-kicker svg.i { width: 15px; height: 15px; }
.hero-text h2 {
  margin: 3px 0 4px; font-size: 27px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15;
  color: var(--ink);
}
.hero-text h2 span { color: var(--accent); }
.hero-text p { font-size: 13.5px; color: var(--ink-2); }
.hero-stats { display: flex; gap: 10px; flex: none; }
.hero-stat {
  display: grid; gap: 3px; min-width: 96px; padding: 11px 14px; border-radius: 14px;
  background: color-mix(in srgb, var(--surface) 80%, transparent); border: 1px solid var(--line); backdrop-filter: blur(6px);
}
.hero-stat b { font-size: 25px; font-weight: 800; line-height: 1; color: var(--sc, var(--accent)); font-variant-numeric: tabular-nums; }
.hero-stat span { font-size: 11.5px; font-weight: 650; color: var(--ink-3); }
.hero-stat.zero b { color: var(--ink-3); }

/* Linha do dia */
.tl-card { padding: 14px 18px 8px; }
.tl-head { display: flex; align-items: center; gap: 10px 18px; flex-wrap: wrap; }
.tl-heading { display: grid; gap: 1px; }
.tl-heading h3 { font-size: 15px; font-weight: 750; }
.tl-date { font-size: 12.5px; font-weight: 600; color: var(--ink-3); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; font-weight: 650; color: var(--ink-2); }
.tl-legend span { display: inline-flex; align-items: center; gap: 6px; }
.tl-legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--sc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 20%, transparent); }
.tl-allday { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tl-allday:empty { display: none; }
.ad-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 13px; cursor: pointer;
  font-size: 12px; font-weight: 650; color: var(--ink);
  background: color-mix(in srgb, var(--sc) 13%, var(--surface)); border: 1px solid color-mix(in srgb, var(--sc) 35%, transparent);
}
.ad-chip svg.i { width: 13px; height: 13px; color: var(--sc); }
.ad-chip { max-width: 100%; }
.ad-chip span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-chip em { flex: none; font-style: normal; font-weight: 600; color: var(--ink-3); font-size: 11px; }
.tl-scroll { overflow-x: auto; overflow-y: hidden; margin: 0 -8px; scrollbar-width: thin; }
.tl { position: relative; height: 172px; min-width: 680px; }
.tl-svg { position: absolute; left: 0; top: 0; overflow: visible; }
.tl-wave { fill: none; stroke: url(#tl-soft); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.tl-wave.past { stroke: url(#tl-grad); stroke-width: 6.5; }
.tl-glow { fill: none; stroke: url(#tl-grad); stroke-width: 20; stroke-linecap: round; stroke-linejoin: round; opacity: .13; }
.tl-flow { fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: .1 14; opacity: .85; animation: tl-flow 1.3s linear infinite; }
@keyframes tl-flow { from { stroke-dashoffset: 14.1; } to { stroke-dashoffset: 0; } }
.tl-span { fill: none; stroke: var(--sc); stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; opacity: .22; }
.tl-hour { fill: var(--surface); stroke: #8b5cf6; stroke-width: 2; }
.tl-hour-lbl { fill: var(--ink-3); font-size: 10.5px; font-weight: 650; text-anchor: middle; font-family: var(--mono); }
.tl-stem { stroke: var(--sc); stroke-width: 1.5; stroke-dasharray: 2 3; opacity: .75; }
.tl-now-line { stroke: var(--accent); stroke-width: 1.4; stroke-dasharray: 3 4; opacity: .7; }
.tl-now-dot { fill: var(--accent); stroke: var(--surface); stroke-width: 2; }
.tl-now-ring { fill: var(--accent); transform-box: fill-box; transform-origin: center; animation: tl-pulse 2.2s ease-out infinite; }
@keyframes tl-pulse { from { transform: scale(.8); opacity: .45; } to { transform: scale(3); opacity: 0; } }
.tl-now {
  position: absolute; top: 2px; transform: translateX(-50%); padding: 2px 8px; border-radius: 999px; white-space: nowrap;
  background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 750; box-shadow: 0 4px 10px -3px rgba(99, 102, 241, .5);
}
.tl-mk {
  position: absolute; transform: translate(-50%, -50%); width: 36px; height: 36px; padding: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; z-index: 1;
  background: var(--sc); color: var(--sc-ink); border: 2.5px solid var(--surface);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--sc) 22%, transparent), 0 6px 14px -5px color-mix(in srgb, var(--sc) 70%, transparent);
  transition: transform .16s cubic-bezier(.2, .9, .3, 1.3);
}
.tl-mk svg.i { width: 17px; height: 17px; stroke-width: 2.1; }
.tl-mk:hover, .tl-mk:focus-visible { transform: translate(-50%, -50%) scale(1.16); z-index: 3; outline: none; }
.tl-mk:focus-visible { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.tl-mk.s-now::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 2px solid var(--sc); animation: mk-pulse 1.8s ease-out infinite; }
@keyframes mk-pulse { from { transform: scale(.85); opacity: .9; } to { transform: scale(1.45); opacity: 0; } }
.tl-empty {
  display: inline-flex; align-items: center; gap: 8px; max-width: 100%;
  padding: 3px 4px 3px 12px; border-radius: 999px; background: var(--surface); border: 1px dashed var(--line-strong);
  font-size: 12.5px; color: var(--ink-3);
}
.tl-empty > svg.i { width: 15px; height: 15px; color: var(--lilac); flex: none; }
.tl-empty .btn svg.i { width: 14px; height: 14px; }

/* Ver painel de outra pessoa (agenda compartilhada) */
.dash-people { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.dash-people[hidden] { display: none; }
.who-label { display: inline-flex; align-items: center; gap: 6px; margin-right: 4px; font-size: 12px; font-weight: 650; color: var(--ink-3); }
.who-label svg.i { width: 15px; height: 15px; }
.who {
  display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px 0 4px; border-radius: 16px; cursor: pointer;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink-2); font: inherit; font-size: 12.5px; font-weight: 650; transition: border-color .15s, background .15s, color .15s;
}
.who:hover { border-color: var(--accent); color: var(--accent); }
.who.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.who > svg.i { width: 15px; height: 15px; margin-left: 7px; }

/* Dica do compromisso */
.tl-tip {
  position: fixed; z-index: 70; width: 268px; display: grid; gap: 4px; padding: 11px 13px 10px; pointer-events: none;
  border-radius: 12px; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--sc);
  box-shadow: var(--shadow-lg); animation: tip-in .14s ease-out;
}
@keyframes tip-in { from { opacity: 0; transform: translateY(4px); } }
.tip-status { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: color-mix(in srgb, var(--sc) 75%, var(--ink)); }
.tip-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
.tip-status em { font-style: normal; font-weight: 650; text-transform: none; letter-spacing: 0; color: var(--ink-3); font-size: 11.5px; }
.tl-tip strong { font-size: 14px; font-weight: 750; line-height: 1.3; }
.tip-time { display: flex; align-items: baseline; gap: 8px; font-family: var(--mono); font-size: 15px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.tip-time small { font-family: var(--font, inherit); font-size: 11px; font-weight: 700; color: var(--ink-3); }
.tip-row { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.tip-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tip-row svg.i { width: 13px; height: 13px; color: var(--ink-3); }
.tip-desc { font-size: 12px; color: var(--ink-3); line-height: 1.4; }
.tip-hint { margin-top: 3px; font-size: 10.5px; font-weight: 650; color: var(--lilac); }

/* Cartoes de baixo */
.dash-grid { display: grid; grid-template-columns: 1.15fr 1fr 1fr; gap: 16px; align-items: start; }
.dash-card { display: grid; gap: 10px; padding: 14px 16px 16px; align-content: start; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 750; }
.card-title svg.i { width: 16px; height: 16px; color: var(--accent); }
.card-title .count { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; display: grid; place-items: center; background: var(--sc); color: #fff; font-size: 11.5px; font-weight: 800; }
.card-meta { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.card-sub { font-size: 12px; color: var(--ink-3); margin-top: -4px; }
.card-link { font-size: 12.5px; font-weight: 650; color: var(--accent); }
.empty.compact { padding: 14px 10px; gap: 6px; }
.empty.compact svg.i { width: 24px; height: 24px; color: var(--lilac); }

.nx-main, .nx-now { border-radius: 12px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.nx-main:hover, .nx-now:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.nx-main:focus-visible, .nx-now:focus-visible, .pd-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.nx-main { display: flex; align-items: center; gap: 12px; padding: 12px; background: color-mix(in srgb, var(--sc) 12%, var(--surface)); border: 1px solid color-mix(in srgb, var(--sc) 40%, transparent); }
.nx-icon { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--sc); color: var(--sc-ink); box-shadow: 0 6px 14px -6px var(--sc); }
.nx-icon svg.i { width: 21px; height: 21px; }
.nx-info { display: grid; gap: 2px; min-width: 0; }
.nx-when { font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #a87600; }
.nx-info strong { font-size: 15px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-info > span:last-child { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-time { font-family: var(--mono); font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.nx-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.nx-actions .btn svg.i { width: 15px; height: 15px; }
.nx-now { display: grid; gap: 7px; padding: 9px 11px; background: color-mix(in srgb, var(--sc) 8%, var(--surface)); border: 1px dashed color-mix(in srgb, var(--sc) 55%, transparent); }
.nx-row { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; }
.nx-row strong { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nx-tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; background: var(--sc); color: var(--sc-ink); font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.nx-tag i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 1.2s infinite; }
.nx-left { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.nx-bar { height: 5px; border-radius: 3px; overflow: hidden; background: color-mix(in srgb, var(--sc) 20%, var(--surface)); }
.nx-bar i { display: block; height: 100%; border-radius: 3px; background: var(--sc); }

.pd-list { display: grid; gap: 6px; }
.pd-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 8px 7px 9px; border-radius: 11px; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line); transition: background .15s, transform .15s;
}
.pd-item:hover { background: color-mix(in srgb, var(--sc) 7%, var(--surface)); transform: translateX(2px); }
.pd-ico { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--sc) 14%, var(--surface)); color: var(--sc); }
.pd-ico svg.i { width: 15px; height: 15px; }
.pd-item > div:not(.ok-btns) { flex: 1; min-width: 0; display: grid; }
.pd-item strong { font-size: 13px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-item > div > span { font-size: 11.5px; color: var(--ink-3); }

.wk { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; height: 150px; }
.wk-day {
  display: grid; grid-template-rows: 1fr auto; gap: 5px; justify-items: center; padding: 6px 2px 5px; min-width: 0;
  border: 1px solid transparent; border-radius: 11px; background: none; cursor: pointer; color: inherit; font: inherit;
}
.wk-day:hover { background: var(--surface-3); }
.wk-day.sel { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 25%, transparent); }
.wk-n { font-size: 11px; font-weight: 800; color: var(--ink-2); min-height: 14px; }
.wk-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px; width: 100%; min-height: 0; height: 100%; }
.wk-bar { display: flex; flex-direction: column-reverse; width: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-3); }
.wk-bar i { display: block; flex-basis: 0; min-height: 3px; background: var(--sc); }
.wk-lbl { display: grid; justify-items: center; font-size: 10.5px; font-weight: 650; color: var(--ink-3); line-height: 1.25; }
.wk-lbl b { font-size: 13px; font-weight: 750; color: var(--ink); }
.wk-day.today .wk-lbl b { min-width: 22px; padding: 0 4px; border-radius: 999px; background: var(--grad); color: #fff; }

@media (max-width: 1250px) {
  .hero-stat { min-width: 80px; padding: 9px 11px; }
  .hero-logo img { width: 140px; }
}
@media (max-width: 1100px) {
  .dash-hero { flex-wrap: wrap; }
  .hero-stats { width: 100%; }
  .hero-stat { flex: 1; }
  .dash-grid { grid-template-columns: 1fr 1fr; }
  #dash-next { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .dash-hero { padding: 16px; gap: 14px; }
  .hero-text { padding-left: 0; border-left: none; flex-basis: 100%; }
  .hero-text h2 { font-size: 22px; }
  .hero-stats { display: grid; grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .tl-legend { order: 3; width: 100%; }
}

/* ---------- Inicio: nuvens do fundo (as mesmas da tela de entrada) ---------- */
.clouds.dash-sky { z-index: -1; }
.dash .card, .dash .dash-people .who { background: color-mix(in srgb, var(--surface) 84%, transparent); }
.dash-hero { background: linear-gradient(120deg, color-mix(in srgb, var(--surface) 90%, transparent) 0%, color-mix(in srgb, var(--surface) 78%, transparent) 60%, color-mix(in srgb, var(--lilac-soft) 75%, transparent) 100%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .clouds.dash-sky { opacity: .22; }
}

/* ---------- Inicio: sinais cardiacos sutis atras da linha do dia ---------- */
.tl-card { position: relative; overflow: hidden; }
.tl-card > :not(.ecg) { position: relative; z-index: 1; }
.ecg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.ecg-svg { display: block; width: 100%; height: 100%; }
.ecg-line { fill: none; stroke-width: 1.7; stroke-opacity: .2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Inicio: minimapa 3D de Rondonopolis ---------- */
.hero-map { flex: none; width: 210px; height: 128px; margin: -8px 0; display: grid; grid-template-rows: 1fr auto; justify-items: center; }
.map-stage { position: relative; width: 100%; height: 100%; display: grid; place-items: center; perspective: 460px; }
.map-stage::after {
  content: ""; position: absolute; left: 24%; right: 24%; bottom: 8%; height: 16px; border-radius: 50%;
  background: radial-gradient(closest-side, rgba(49, 46, 129, .22), transparent); z-index: -1;
}
.map3d {
  position: relative; width: 96px; height: 128px; transform-style: preserve-3d;
  transform: rotateX(54deg) rotateZ(-30deg); animation: map-turn 14s ease-in-out infinite alternate;
}
@keyframes map-turn {
  from { transform: translateY(-3px) rotateX(56deg) rotateZ(-40deg); }
  to { transform: translateY(3px) rotateX(46deg) rotateZ(-6deg); }
}
.map-layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.map-side { fill: #5b61e6; }
.map-edge { fill: none; stroke: #6366f1; stroke-width: 2.4; stroke-opacity: .45; stroke-linejoin: round; }
.map-run {
  fill: none; stroke: url(#map-run); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 16 84; animation: map-run 4.5s linear infinite;
}
.map-run.r2 { animation-delay: -2.25s; }
@keyframes map-run { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -100; } }
.map-pin { fill: #e11d48; stroke: #fff; stroke-width: 2.5; }
.map-pin-ring { fill: #e11d48; transform-box: fill-box; transform-origin: center; animation: tl-pulse 2s ease-out infinite; }
.map-label { display: inline-flex; align-items: center; gap: 4px; margin-top: -4px; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; color: var(--ink-3); }
.map-label svg.i { width: 12px; height: 12px; color: #e11d48; }
@media (min-width: 1101px) and (max-width: 1500px) {
  .hero-stats { display: grid; grid-template-columns: repeat(2, minmax(84px, 1fr)); gap: 6px; }
  .hero-stat { min-width: 0; padding: 6px 10px; gap: 1px; }
  .hero-stat b { font-size: 19px; }
  .hero-text h2 { font-size: 24px; }
}
@media (max-width: 1320px) {
  .hero-map { width: 160px; }
  .map3d { width: 78px; height: 104px; }
}
@media (max-width: 640px) {
  .hero-map { display: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .agenda-layout { grid-template-columns: 1fr; }
  .agenda-side { position: static; max-height: none; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .grid-2, .summary-cols { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 60; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .shell.nav-open .sidebar { transform: none; }
  .shell.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 55; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .page { padding: 8px 16px 32px; }
  .recorder { grid-template-columns: auto 1fr; }
  .rec-actions { grid-column: 1 / -1; flex-direction: row; }
}
@media (max-width: 640px) {
  .agenda-side { grid-template-columns: 1fr; }
  .row, .row-3, .share-btns { grid-template-columns: 1fr; }
  .search .input { width: 100%; }
  .search { flex: 1; }
  .rec-time { font-size: 30px; }
  .rec-btn { width: 70px; height: 70px; }
  .topbar h1 { font-size: 17px; }
  .topbar .sub { display: none; }
  .t-line { grid-template-columns: 1fr; gap: 0; }
}

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

@media print {
  .sidebar, .topbar, .recorder, .no-print { display: none !important; }
  .shell { display: block; }
  .card { box-shadow: none; }
}
