/* Pulse — sistema visual */
:root {
  --bg: #090C0B; --bg-2: #0D1110; --panel: #111614; --panel-2: #151B19; --panel-3: #1A211F;
  --line: #1F2725; --line-2: #2A3431; --text: #E7EDEB; --muted: #95A39F; --faint: #66736F;
  --accent: #0DF884; --accent-2: #0BD873; --accent-soft: rgba(13, 248, 132, .12); --accent-ink: #02140A;
  --warn: #F2B544; --warn-soft: rgba(242, 181, 68, .12); --danger: #F26B6B; --danger-soft: rgba(242, 107, 107, .12);
  --info: #6CB4FF; --info-soft: rgba(108, 180, 255, .12); --violet: #B9A2FF; --violet-soft: rgba(185, 162, 255, .13);
  --radius: 14px; --radius-sm: 10px; --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 12px 32px -18px rgba(0,0,0,.8);
  --sidebar: 252px; --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif; --display: 'Manrope', 'Inter', system-ui, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0; }
::selection { background: var(--accent); color: var(--accent-ink); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; } .tiny { font-size: 11.5px; }
.mono { font-family: ui-monospace, 'Cascadia Code', Consolas, monospace; font-size: 12px; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.boot { height: 100vh; display: grid; place-items: center; }
.boot-mark { width: 56px; height: 56px; object-fit: contain; animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.82); opacity: .6; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -200px 0; } 100% { background-position: 200px 0; } }

/* Layout */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--bg-2); border-right: 1px solid var(--line); padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 8px 12px 18px; }
.brand-logo { display: block; height: 36px; width: auto; max-width: 100%; align-self: flex-start; flex: none; object-fit: contain; }
.brand-logo.sm { height: 26px; }
.brand-logo.lg { height: 52px; }
.brand-name { font-family: var(--display); font-weight: 800; font-size: 17px; letter-spacing: -.02em; }
.brand-sub { font-size: 11px; color: var(--faint); margin-top: -2px; }
.nav-group { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); padding: 14px 12px 6px; font-weight: 600; }
.nav-link { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; color: var(--muted); font-weight: 500; transition: background .15s, color .15s; }
.nav-link:hover { background: var(--panel); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.nav-link svg { width: 17px; height: 17px; flex: none; }
.nav-count { margin-left: auto; font-size: 11px; background: var(--panel-3); color: var(--muted); border-radius: 20px; padding: 0 7px; }
.sidebar-foot { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--panel-3); display: grid; place-items: center; font-weight: 700; font-size: 12px; color: var(--accent); flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.main { min-width: 0; }
.topbar { display: none; }
.page { max-width: 1320px; margin: 0 auto; padding: 30px 36px 80px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head .eyebrow { font-size: 12px; color: var(--accent); font-weight: 600; letter-spacing: .02em; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.page-head p { color: var(--muted); margin-top: 6px; max-width: 720px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Grid */
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.split-r { display: grid; grid-template-columns: minmax(300px, .9fr) minmax(0, 1.6fr); gap: 16px; align-items: start; }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; } .row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.sm { gap: 6px; } .stack.lg { gap: 20px; }
.grow { flex: 1; min-width: 0; }
.sticky { position: sticky; top: 16px; }

/* Cards */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { padding: 16px 18px 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-h h3 { display: flex; align-items: center; gap: 8px; }
.card-h .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-b { padding: 16px 18px 18px; }
.card.flat { box-shadow: none; background: var(--panel-2); }
.card.hl { border-color: rgba(13,248,132,.35); background: linear-gradient(180deg, rgba(13,248,132,.06), transparent 60%), var(--panel); }
.card.warn { border-color: rgba(242,181,68,.35); }
.card.danger { border-color: rgba(242,107,107,.35); }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.section-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); font-weight: 600; margin-bottom: 8px; }

/* KPI */
.kpi { padding: 16px 18px; }
.kpi .label { color: var(--muted); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.kpi .value { font-family: var(--display); font-size: 26px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .meta { font-size: 12px; color: var(--faint); margin-top: 2px; }
.meter { height: 6px; background: var(--panel-3); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 6px; transition: width .4s; }
.meter.warn > span { background: var(--warn); } .meter.danger > span { background: var(--danger); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--text); font-weight: 600; font-size: 13.5px; cursor: pointer; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--panel-3); border-color: #3A4643; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #4DFAA6; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--panel-2); color: var(--text); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: rgba(242,107,107,.4); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn.xs { height: 26px; padding: 0 8px; font-size: 12px; border-radius: 7px; }
.btn.icon { width: 36px; padding: 0; } .btn.sm.icon { width: 30px; }
.btn.block { width: 100%; }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; flex: none; }

/* Badges */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: var(--panel-3); color: var(--muted); white-space: nowrap; line-height: 18px; }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.demo { background: repeating-linear-gradient(135deg, rgba(242,181,68,.16) 0 6px, rgba(242,181,68,.06) 6px 12px); color: var(--warn); border: 1px dashed rgba(242,181,68,.5); }
.badge.live .dot { animation: pulse 1.2s infinite; }

/* Kinds (fato, métrica, hipótese, recomendação, indisponível) */
.kind { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; }
.kind.observado { color: var(--info); background: var(--info-soft); }
.kind.metrica { color: var(--accent); background: var(--accent-soft); }
.kind.interpretado { color: #8FD3FF; background: rgba(143,211,255,.08); }
.kind.hipotese { color: var(--violet); background: var(--violet-soft); }
.kind.recomendacao { color: var(--warn); background: var(--warn-soft); }
.kind.indisponivel { color: var(--faint); background: repeating-linear-gradient(135deg, var(--panel-3) 0 5px, var(--panel-2) 5px 10px); }
.legend { display: flex; gap: 8px; flex-wrap: wrap; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12.5px; color: var(--muted); font-weight: 500; }
.field .hint { font-size: 11.5px; color: var(--faint); }
.input, .select, .textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; color: var(--text); outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.input.sm { padding: 6px 10px; font-size: 13px; }
.select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.input-group { display: flex; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 12.5px; cursor: pointer; }
.seg button.on { background: var(--panel-3); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.range { width: 100%; accent-color: var(--accent); }
.dropzone { display: block; width: 100%; border: 1.5px dashed var(--line-2); border-radius: var(--radius); padding: 26px; text-align: center; background: var(--bg-2); transition: border-color .15s, background .15s; cursor: pointer; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: rgba(13,248,132,.04); }

/* Tables / lists */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--faint); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable:hover td { background: var(--panel-2); cursor: pointer; }
.table-wrap { overflow-x: auto; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.thumb { width: 44px; height: 60px; border-radius: 7px; background: var(--panel-3) center/cover; flex: none; display: grid; place-items: center; color: var(--faint); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.wide { width: 96px; height: 54px; }

/* Stepper (fluxo principal) */
.flow { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.flow-step { flex: 1; min-width: 118px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; position: relative; }
.flow-step .n { font-size: 11px; color: var(--faint); font-weight: 600; }
.flow-step .t { font-weight: 600; font-size: 13px; }
.flow-step.done { border-color: rgba(13,248,132,.25); }
.flow-step.done .n { color: var(--accent); }
.flow-step.current { border-color: var(--accent); background: var(--accent-soft); }
.flow-step.current .t { color: var(--accent); }
.flow-step a { position: absolute; inset: 0; }

/* Progress / steps */
.progress { height: 4px; border-radius: 4px; background: var(--panel-3); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); transition: width .5s; }
.progress.indet > span { width: 30% !important; animation: indet 1.3s ease-in-out infinite; }
@keyframes indet { 0% { transform: translateX(-100%); } 100% { transform: translateX(340%); } }
.steps { display: flex; flex-direction: column; }
.step { display: grid; grid-template-columns: 22px 1fr auto; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: start; }
.step:last-child { border-bottom: 0; }
.step-ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); color: var(--faint); margin-top: 1px; }
.step-ic svg { width: 13px; height: 13px; }
.step.done .step-ic { background: var(--accent-soft); color: var(--accent); }
.step.running .step-ic { background: var(--info-soft); color: var(--info); }
.step.failed .step-ic { background: var(--danger-soft); color: var(--danger); }
.step.wait .step-ic { background: var(--warn-soft); color: var(--warn); }

/* Timeline (relatório) */
.track { position: relative; height: 54px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; cursor: pointer; }
.track .scores { position: absolute; inset: 0; display: flex; align-items: flex-end; gap: 1px; padding: 6px 4px; opacity: .55; }
.track .scores span { flex: 1; background: var(--line-2); border-radius: 1px; min-height: 2px; }
.track .mark { position: absolute; top: 0; bottom: 0; width: 2px; transform: translateX(-1px); }
.track .mark.corte { background: rgba(108,180,255,.75); }
.track .mark.hipotese { background: var(--violet); width: 3px; }
.track .mark.cta { background: var(--warn); width: 3px; }
.track .silence { position: absolute; top: 0; bottom: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.06) 0 4px, transparent 4px 8px); }
.track .head { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.tl { display: flex; flex-direction: column; max-height: 560px; overflow-y: auto; }
.tl-item { display: grid; grid-template-columns: 62px 1fr; gap: 12px; padding: 9px 4px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 6px; }
.tl-item:hover { background: var(--panel-2); }
.tl-item.active { background: var(--accent-soft); }
.tl-time { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent); font-size: 12.5px; padding-top: 1px; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; background: var(--panel-3); font-size: 12px; color: var(--muted); cursor: pointer; border: 1px solid transparent; }
.chip:hover { border-color: var(--line-2); color: var(--text); }
.chip.on { background: var(--accent-soft); color: var(--accent); }

/* Player */
.player { background: #000; border-radius: 12px; overflow: hidden; position: relative; border: 1px solid var(--line); }
.player video { display: block; width: 100%; max-height: 640px; background: #000; }
.player.vertical { max-width: 340px; margin: 0 auto; aspect-ratio: 9/16; }
.player.vertical video { height: 100%; object-fit: contain; max-height: none; }
.frames { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.frame { position: relative; border-radius: 6px; overflow: hidden; cursor: pointer; border: 1px solid var(--line); aspect-ratio: 9/16; background: var(--panel-3); }
.frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.frame span { position: absolute; left: 4px; bottom: 4px; font-size: 10.5px; background: rgba(0,0,0,.7); padding: 0 5px; border-radius: 4px; font-weight: 600; }

/* Storyboard */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.scene { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.scene-vis { aspect-ratio: 9/12; background: linear-gradient(160deg, var(--panel-3), var(--bg-2)); position: relative; display: grid; place-items: center; padding: 16px; text-align: center; color: var(--muted); font-size: 12.5px; overflow: hidden; }
.scene-vis img, .scene-vis video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scene-vis .ost { position: relative; font-family: var(--display); font-weight: 800; color: var(--text); font-size: 17px; line-height: 1.2; }
.scene-num { position: absolute; top: 8px; left: 8px; z-index: 2; }
.scene-type { position: absolute; top: 8px; right: 8px; z-index: 2; }
.scene-b { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.scene.dragging { opacity: .4; }
.scene.drop { outline: 2px dashed var(--accent); }

/* Editor */
.editor { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 16px; align-items: start; }
.strip { display: flex; gap: 4px; overflow-x: auto; padding: 6px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; }
.strip-item { flex: none; height: 58px; border-radius: 6px; background: var(--panel-3); border: 1px solid var(--line-2); display: flex; align-items: flex-end; padding: 4px 6px; font-size: 11px; font-weight: 600; cursor: grab; position: relative; overflow: hidden; color: var(--muted); }
.strip-item.sel { border-color: var(--accent); color: var(--accent); }
.strip-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; }
.strip-item span { position: relative; }

/* Modal, toast */
.modal-bg { position: fixed; inset: 0; background: rgba(3,5,4,.72); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .15s; }
.modal { width: min(640px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--panel); border: 1px solid var(--line-2); border-radius: 16px; box-shadow: 0 30px 80px -20px #000; }
.modal.lg { width: min(920px, 100%); }
.modal-h { padding: 18px 20px 0; display: flex; justify-content: space-between; align-items: center; }
.modal-b { padding: 16px 20px 20px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
.toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: min(420px, calc(100vw - 36px)); }
.toast { background: var(--panel-3); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); padding: 11px 14px; border-radius: 10px; box-shadow: 0 16px 40px -12px #000; animation: fade .2s; font-size: 13px; }
.toast.err { border-left-color: var(--danger); }

/* Notices */
.notice { display: flex; gap: 10px; padding: 11px 13px; border-radius: 10px; background: var(--panel-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.notice svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.notice.warn { background: var(--warn-soft); border-color: rgba(242,181,68,.25); color: #F0D199; }
.notice.warn svg { color: var(--warn); }
.notice.info { background: var(--info-soft); border-color: rgba(108,180,255,.2); color: #BBD9FF; }
.notice.danger { background: var(--danger-soft); border-color: rgba(242,107,107,.25); color: #F7B7B7; }
.notice.ok { background: var(--accent-soft); border-color: rgba(13,248,132,.25); color: #A9EFC7; }
.notice strong { color: var(--text); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--panel-2); display: grid; place-items: center; margin: 0 auto 12px; color: var(--accent); }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.skeleton { background: linear-gradient(90deg, var(--panel-2) 0, var(--panel-3) 50%, var(--panel-2) 100%); background-size: 400px 100%; animation: shimmer 1.2s infinite linear; border-radius: 8px; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab { padding: 10px 14px; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; background: none; border-top: 0; border-left: 0; border-right: 0; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }

/* Calendar */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-h { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 0 6px; }
.cal-d { min-height: 104px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal-d.out { opacity: .4; }
.cal-d.today { border-color: var(--accent); }
.cal-n { font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-ev { font-size: 11px; padding: 3px 6px; border-radius: 5px; background: var(--panel-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-left: 2px solid var(--muted); }
.cal-ev.publicada { border-left-color: var(--accent); } .cal-ev.agendada { border-left-color: var(--info); } .cal-ev.falhou, .cal-ev.incerto { border-left-color: var(--danger); }

/* Charts */
.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: minmax(90px, 160px) 1fr 70px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar { height: 8px; background: var(--panel-3); border-radius: 6px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.spark { width: 100%; height: 40px; }

/* Auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { background: radial-gradient(1200px 600px at 0% 0%, rgba(13,248,132,.16), transparent 60%), radial-gradient(800px 500px at 100% 100%, rgba(108,180,255,.08), transparent 60%), var(--bg-2); border-right: 1px solid var(--line); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-art h1 { font-size: 40px; line-height: 1.08; max-width: 520px; letter-spacing: -.03em; }
.auth-art .flowline { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 26px; max-width: 520px; }
.auth-form { display: grid; place-items: center; padding: 32px; }
.auth-card { width: min(380px, 100%); }
.auth-mobile-logo { display: none; height: 44px; }

/* Responsivo */
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .split-r, .editor { grid-template-columns: 1fr; }
  .sticky { position: static; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 40; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; box-shadow: 30px 0 60px -20px #000; }
  .sidebar.open { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 39; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); position: sticky; top: 0; z-index: 30; }
  .page { padding: 18px 16px 70px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  h1 { font-size: 22px; }
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-mobile-logo { display: block; }
  .cal { grid-template-columns: 1fr; }
  .cal-h { display: none; }
  .cal-d { min-height: 0; }
  .cal-d.empty-day { display: none; }
  .bar-row { grid-template-columns: 100px 1fr 56px; }
}
@media (max-width: 520px) { .g4 { grid-template-columns: 1fr 1fr; } .kpi .value { font-size: 21px; } }

/* Ícones de integração */
.brand-icon { display: inline-grid; place-items: center; flex: none; border-radius: 11px; border: 1px solid var(--line-2); transition: background .25s, color .25s, border-color .25s, filter .25s; }
.brand-icon.on { color: var(--brand); background: var(--brand-tint); border-color: color-mix(in srgb, var(--brand) 35%, transparent); }
.brand-icon.off { color: #5D6865; background: var(--panel-2); filter: grayscale(1); opacity: .8; }
.brand-mono { font-family: var(--display); font-weight: 800; letter-spacing: -.02em; line-height: 1; }

.input.masked { -webkit-text-security: disc; font-family: var(--font); letter-spacing: .08em; }

.switch-label{display:inline-flex;align-items:center;gap:6px;cursor:pointer;color:var(--muted);padding:0 6px}
.switch-label input{appearance:none;width:30px;height:18px;border-radius:999px;background:var(--line-2,#2A3330);position:relative;cursor:pointer;transition:background .15s;margin:0}
.switch-label input::after{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:#F4F7F6;transition:transform .15s}
.switch-label input:checked{background:var(--accent)}
.switch-label input:checked::after{transform:translateX(12px)}
