/* CyberGarimpo — camada de app sobre tokens.css (Cyber Design System "Liquid Glass"). */

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; }
body { margin: 0; font-size: 15px; line-height: 1.6; letter-spacing: 0.02em; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid rgb(236 178 255 / 0.6); outline-offset: 2px; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); text-wrap: balance; }
p { margin: 0; }
.mono { font-family: var(--font-mono); }
.muted { color: rgb(255 255 255 / 0.6); }

/* ---------------------------------------------------------------- ícones */
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
[data-icon] { display: inline-flex; }

/* ---------------------------------------------------------------- botões e campos */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 42px; padding: 0 20px; border-radius: var(--radius-md); border: 0;
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: box-shadow 0.2s ease, background-color 0.2s ease, transform 0.15s ease, opacity 0.2s ease;
}
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--brand-gradient); color: #131318; }
.btn-primary:hover:not(:disabled) { box-shadow: 0 0 24px rgb(236 178 255 / 0.35); }
.btn-ghost { background: rgb(255 255 255 / 0.05); border: 0.5px solid rgb(255 255 255 / 0.2); color: rgb(255 255 255 / 0.8); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1); }
.btn-ghost:hover:not(:disabled) { background: rgb(255 255 255 / 0.1); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 11px; }
.btn .spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.input, .select {
  width: 100%; min-height: 42px; padding: 0 14px; border-radius: var(--radius-md);
  background: rgb(255 255 255 / 0.05); border: 0.5px solid rgb(255 255 255 / 0.2);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.input::placeholder { color: rgb(255 255 255 / 0.45); }
.input:focus, .select:focus { outline: none; border-color: rgb(236 178 255 / 0.5); box-shadow: 0 0 0 3px rgb(236 178 255 / 0.12); }
.select { appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ecb2ff' stroke-width='2' stroke-linecap='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px; }
.select option { background: #1f1f25; }
.field { display: grid; gap: 8px; }
.field .label-caps { color: rgb(255 255 255 / 0.6); }
.form-error { color: var(--error); font-size: 14px; }

/* ---------------------------------------------------------------- login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(420px, 100%); padding: 40px; border-radius: var(--radius-panel); display: grid; gap: 20px; justify-items: start; }
.login-card .wordmark { font-size: 32px; line-height: 1.2; }
.login-sub { color: rgb(255 255 255 / 0.7); margin-top: -12px; }
.login-card .field, .login-card .btn { width: 100%; }

/* ---------------------------------------------------------------- shell */
.shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 32px;
  padding: 28px 18px; border-radius: 0 var(--radius-panel) var(--radius-panel) 0; border-left: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 0 6px; }
.brand .wordmark { display: block; font-size: 19px; line-height: 1.2; }
.brand-status { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.15em; text-transform: uppercase; color: rgb(255 255 255 / 0.55); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px rgb(125 244 255 / 0.8); flex: none; }
.dot.live { animation: pulse 1.6s ease-in-out infinite; }
.dot.err { background: var(--error); box-shadow: 0 0 10px rgb(255 180 171 / 0.7); }
.dot.idle { background: rgb(255 255 255 / 0.35); box-shadow: none; }
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.8); } }

.nav { display: grid; gap: 6px; }
.nav a {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 14px; border-radius: var(--radius-md);
  font-family: var(--font-mono); font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  text-decoration: none; color: rgb(255 255 255 / 0.55); border: 0.5px solid transparent;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav a:hover { color: rgb(255 255 255 / 0.9); background: rgb(255 255 255 / 0.05); }
.nav a[aria-current="page"] { color: var(--primary); background: rgb(255 255 255 / 0.06); border-color: rgb(255 255 255 / 0.18); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1); }
.sidebar-foot { margin-top: auto; display: grid; gap: 16px; }
.next-run { display: grid; gap: 6px; padding: 14px; border-radius: var(--radius-lg); background: rgb(255 255 255 / 0.04); border: 0.5px solid rgb(255 255 255 / 0.1); }
.next-run .label-caps { color: rgb(255 255 255 / 0.5); font-size: 10px; }
.next-run-value { font-family: var(--font-display); font-weight: 300; font-size: 22px; color: var(--cyan); }

.view { padding: 40px clamp(20px, 3.5vw, 56px) 64px; display: grid; gap: 28px; align-content: start; min-width: 0; outline: none; }

/* ---------------------------------------------------------------- cabeçalho de página */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-head h1 { font-size: 32px; font-weight: 700; letter-spacing: 0.03em; line-height: 1.2; margin-top: 8px; }
.page-head p { color: rgb(255 255 255 / 0.7); margin-top: 6px; max-width: 64ch; }
.page-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- painéis */
.panel { position: relative; border-radius: var(--radius-panel); padding: 28px; min-width: 0; }
.panel-title { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.panel-title .tile { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--primary); background: rgb(255 255 255 / 0.06); border: 0.5px solid rgb(255 255 255 / 0.15); }
.panel-title .tile.cyan { color: var(--cyan); }
.panel-title h2 { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: rgb(255 255 255 / 0.75); }
.panel-title .aside { margin-left: auto; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: rgb(255 255 255 / 0.55); }

/* faixa de indicadores: um único painel, colunas separadas por fios */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.stat { padding: 24px 26px; display: grid; gap: 6px; align-content: start; }
.stat + .stat { border-left: 0.5px solid rgb(255 255 255 / 0.1); }
.stat .label-caps { color: rgb(255 255 255 / 0.55); font-size: 10px; }
.stat-value { font-family: var(--font-display); font-weight: 300; font-size: 36px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-value.cyan { color: var(--cyan); }
.stat-value.primary { color: var(--primary); }
.stat-note { font-size: 13px; color: rgb(255 255 255 / 0.6); }

.grid-main { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 24px; align-items: start; }

/* ---------------------------------------------------------------- execução */
.run-head { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.15em; text-transform: uppercase; }
.run-meta { margin-top: 6px; font-size: 14px; color: rgb(255 255 255 / 0.7); }
.progress { height: 4px; border-radius: 999px; background: rgb(255 255 255 / 0.1); overflow: hidden; margin: 16px 0; }
.progress > span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--cyan)); box-shadow: 0 0 15px rgb(125 244 255 / 0.8); transform-origin: left; transition: transform 0.4s ease-out; }
.terminal {
  margin: 0; height: 280px; overflow: auto; padding: 14px 16px; border-radius: var(--radius-lg);
  background: rgb(0 0 0 / 0.35); border: 0.5px solid rgb(255 255 255 / 0.08);
  font-family: var(--font-mono); font-size: 12px; line-height: 1.7; color: rgb(255 255 255 / 0.72); white-space: pre-wrap; word-break: break-word;
}
.terminal .t { color: rgb(255 255 255 / 0.35); }
.terminal .erro { color: var(--error); }
.terminal-empty { color: rgb(255 255 255 / 0.5); }

/* ---------------------------------------------------------------- histograma */
.hist { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 8px; align-items: end; height: 150px; }
.hist-col { display: grid; grid-template-rows: auto 1fr auto; height: 100%; gap: 6px; text-align: center; }
.hist-count { font-family: var(--font-mono); font-size: 11px; color: rgb(255 255 255 / 0.6); }
.hist-track { position: relative; display: flex; align-items: flex-end; }
.hist-bar { width: 100%; border-radius: 6px 6px 2px 2px; background: rgb(255 255 255 / 0.16); min-height: 2px; transform-origin: bottom; }
.hist-bar.mid { background: rgb(236 178 255 / 0.55); }
.hist-bar.top { background: linear-gradient(180deg, var(--cyan), rgb(125 244 255 / 0.4)); box-shadow: 0 0 14px rgb(125 244 255 / 0.4); }
.hist-label { font-family: var(--font-mono); font-size: 11px; color: rgb(255 255 255 / 0.55); }
.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: rgb(255 255 255 / 0.65); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------------------------------------------------------------- tabela */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: rgb(255 255 255 / 0.5); padding: 0 10px 12px; }
.table td { padding: 12px 10px; border-top: 0.5px solid rgb(255 255 255 / 0.07); font-variant-numeric: tabular-nums; color: rgb(255 255 255 / 0.8); }
.table td.num { font-family: var(--font-mono); font-size: 13px; }
.table-wrap { overflow-x: auto; }

/* ---------------------------------------------------------------- chips e badges */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-family: var(--font-mono); font-size: 10px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; background: rgb(255 255 255 / 0.06); border: 0.5px solid rgb(255 255 255 / 0.14); color: rgb(255 255 255 / 0.75); white-space: nowrap; }
.chip .icon { width: 12px; height: 12px; }
.chip.ok { color: var(--cyan); border-color: rgb(125 244 255 / 0.3); }
.chip.warn { color: var(--primary); border-color: rgb(236 178 255 / 0.3); }
.chip.bad { color: var(--error); border-color: rgb(255 180 171 / 0.3); }

.score { --c: rgb(255 255 255 / 0.45); position: relative; width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), rgb(255 255 255 / 0.08) 0); }
.score::before { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: #15141b; }
.score b { position: relative; font-family: var(--font-display); font-weight: 600; font-size: 16px; font-variant-numeric: tabular-nums; }
.score.top { --c: var(--cyan); }
.score.top b { color: var(--cyan); }
.score.mid { --c: var(--primary); }
.score.pending { background: rgb(255 255 255 / 0.06); }
.score.pending b { font-family: var(--font-mono); font-size: 11px; color: rgb(255 255 255 / 0.55); letter-spacing: 0.1em; }

/* ---------------------------------------------------------------- lista de vagas */
.job-list { list-style: none; margin: 0; padding: 0; }
.job { display: flex; align-items: center; gap: 18px; width: 100%; padding: 16px 14px; border: 0; border-radius: var(--radius-lg); background: transparent; text-align: left; cursor: pointer; transition: background-color 0.2s ease; }
.job-list li + li { border-top: 0.5px solid rgb(255 255 255 / 0.06); }
.job:hover { background: rgb(255 255 255 / 0.05); }
.job-body { min-width: 0; flex: 1; display: grid; gap: 4px; }
.job-title { font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.35; color: rgb(255 255 255 / 0.95); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-sub { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 14px; color: rgb(255 255 255 / 0.7); }
.job-sub > span { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.job-sub .icon { width: 14px; height: 14px; color: rgb(255 255 255 / 0.5); }
.job-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; max-width: 280px; }
.job-date { font-family: var(--font-mono); font-size: 11px; color: rgb(255 255 255 / 0.5); white-space: nowrap; width: 72px; text-align: right; }

/* toolbar de filtros */
.toolbar { display: flex; flex-wrap: wrap; gap: 14px; align-items: end; padding: 20px 24px; border-radius: var(--radius-xl); }
.toolbar .field { flex: 1 1 140px; }
.toolbar .field.search { flex: 2 1 220px; }
.search-box { position: relative; }
.search-box .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: rgb(255 255 255 / 0.5); pointer-events: none; }
.search-box .input { padding-left: 42px; }
.segmented { display: inline-flex; padding: 3px; gap: 2px; border-radius: var(--radius-md); background: rgb(255 255 255 / 0.05); border: 0.5px solid rgb(255 255 255 / 0.18); }
.segmented button { min-height: 36px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; cursor: pointer; font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 255 255 / 0.6); transition: background-color 0.2s ease, color 0.2s ease; }
.segmented button:hover { color: #fff; }
.segmented button[aria-pressed="true"] { background: rgb(255 255 255 / 0.1); color: var(--primary); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.1); }
.range-row { display: flex; align-items: center; gap: 12px; min-height: 42px; }
.range-row output { font-family: var(--font-mono); font-size: 13px; color: var(--cyan); width: 34px; text-align: right; }
input[type="range"] { flex: 1; accent-color: #ecb2ff; height: 24px; cursor: pointer; }
.list-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 14px 0; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 255 255 / 0.55); }

/* empty / skeleton */
.empty { display: grid; justify-items: center; gap: 14px; padding: 48px 20px; text-align: center; }
.empty .tile { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; color: var(--primary); background: rgb(255 255 255 / 0.06); border: 0.5px solid rgb(255 255 255 / 0.15); }
.empty p { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; color: rgb(255 255 255 / 0.65); max-width: 46ch; }
.skeleton { height: 76px; border-radius: var(--radius-lg); background: linear-gradient(90deg, rgb(255 255 255 / 0.03), rgb(255 255 255 / 0.07), rgb(255 255 255 / 0.03)); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; margin-bottom: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------------------------------------------------------------- drawer (detalhe da vaga) */
.drawer { position: fixed; inset: 0 0 0 auto; margin: 0; height: 100vh; max-height: 100vh; width: min(640px, 100vw); padding: 0; border-radius: var(--radius-panel) 0 0 var(--radius-panel); border-right: 0; color: var(--on-surface); overflow: hidden; }
.drawer[open] { display: flex; flex-direction: column; animation: drawer-in 0.28s cubic-bezier(0.22, 1, 0.36, 1); }
.drawer::backdrop { background: rgb(0 0 0 / 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; gap: 18px; align-items: flex-start; padding: 28px 28px 20px; border-bottom: 0.5px solid rgb(255 255 255 / 0.08); }
.drawer-head h2 { font-size: 22px; font-weight: 600; line-height: 1.3; }
.drawer-head .sub { margin-top: 6px; color: rgb(255 255 255 / 0.7); font-size: 14px; }
.drawer-close { margin-left: auto; width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 0.5px solid rgb(255 255 255 / 0.18); background: rgb(255 255 255 / 0.05); cursor: pointer; }
.drawer-close:hover { background: rgb(255 255 255 / 0.1); }
.drawer-body { flex: 1; overflow-y: auto; padding: 24px 28px 32px; display: grid; gap: 24px; align-content: start; }
.drawer-foot { display: flex; gap: 12px; padding: 18px 28px; border-top: 0.5px solid rgb(255 255 255 / 0.08); flex-wrap: wrap; }
.verdict { display: flex; align-items: center; gap: 18px; }
.verdict-score { font-family: var(--font-display); font-weight: 300; font-size: 48px; line-height: 1; font-variant-numeric: tabular-nums; }
.verdict-score small { font-size: 18px; color: rgb(255 255 255 / 0.5); }
.verdict-score.top { color: var(--cyan); }
.verdict-score.mid { color: var(--primary); }
.verdict-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin: 0; }
.facts div { display: grid; gap: 4px; min-width: 0; }
.facts dt { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase; color: rgb(255 255 255 / 0.5); }
.facts dd { margin: 0; font-size: 14px; color: rgb(255 255 255 / 0.88); overflow-wrap: anywhere; }
.block { display: grid; gap: 10px; }
.block h3 { font-family: var(--font-mono); font-size: 10px; font-weight: 600; letter-spacing: 0.25em; text-transform: uppercase; color: rgb(255 255 255 / 0.55); }
.block p { color: rgb(255 255 255 / 0.85); max-width: 70ch; text-wrap: pretty; }
.pitch { position: relative; padding: 18px 20px; border-radius: var(--radius-lg); background: rgb(236 178 255 / 0.06); border: 0.5px solid rgb(236 178 255 / 0.25); white-space: pre-wrap; }
.cases { display: flex; gap: 8px; flex-wrap: wrap; }
.cases .chip { height: auto; min-height: 28px; padding: 4px 12px; text-transform: none; letter-spacing: 0.02em; font-size: 12px; white-space: normal; }
details.desc summary { cursor: pointer; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--primary); list-style: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; }
details.desc summary::-webkit-details-marker { display: none; }
details.desc[open] summary .icon { transform: rotate(180deg); }
details.desc pre { margin: 8px 0 0; white-space: pre-wrap; word-break: break-word; font-family: var(--font-body); font-size: 14px; line-height: 1.65; color: rgb(255 255 255 / 0.78); max-width: 72ch; }

/* ---------------------------------------------------------------- controles de formulário */
.hint { font-size: 12px; color: rgb(255 255 255 / 0.55); line-height: 1.4; }
.hint.erro, .form-error { color: var(--error); }
.textarea { min-height: 0; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.textarea.mono { font-family: var(--font-mono); font-size: 12.5px; }
.input-suffix { position: relative; display: block; }
.input-suffix .input { padding-right: 64px; font-variant-numeric: tabular-nums; }
.input-suffix span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: rgb(255 255 255 / 0.45); pointer-events: none; }
.icon-inline { width: 14px; height: 14px; vertical-align: -2px; margin-right: 6px; }

.switch { display: inline-flex; align-items: center; gap: 12px; min-height: 40px; cursor: pointer; position: relative; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-track { width: 40px; height: 22px; flex: none; border-radius: 999px; background: rgb(255 255 255 / 0.12); border: 0.5px solid rgb(255 255 255 / 0.25); position: relative; transition: background-color 0.2s ease; }
.switch-track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 17px; height: 17px; border-radius: 50%; background: rgb(255 255 255 / 0.8); transition: transform 0.2s ease; }
.switch input:checked + .switch-track { background: var(--brand-gradient); border-color: transparent; }
.switch input:checked + .switch-track::after { transform: translateX(18px); background: #131318; }
.switch input:focus-visible + .switch-track { outline: 2px solid rgb(236 178 255 / 0.6); outline-offset: 2px; }
.switch-text { display: grid; gap: 2px; font-size: 14px; color: rgb(255 255 255 / 0.9); }
.switch-text small { font-size: 12px; color: rgb(255 255 255 / 0.55); }
.switch.is-disabled { cursor: not-allowed; opacity: 0.5; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; font-size: 14px; color: rgb(255 255 255 / 0.85); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: #ecb2ff; cursor: pointer; }
.check-row { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.icon-btn { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; border: 0.5px solid rgb(255 255 255 / 0.15); background: rgb(255 255 255 / 0.04); color: rgb(255 255 255 / 0.7); cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
.icon-btn:hover:not(:disabled) { background: rgb(255 180 171 / 0.1); color: var(--error); }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 2px; }
.fieldset legend { padding: 0 0 6px; color: rgb(255 255 255 / 0.6); }

/* ---------------------------------------------------------------- ajustes */
.settings { display: grid; gap: 24px; padding-bottom: 72px; }
.settings-grid { display: grid; gap: 20px; }
.settings-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 16px; margin-top: 16px; }
.settings-summary { margin-top: 18px; padding-top: 16px; border-top: 0.5px solid rgb(255 255 255 / 0.08); font-size: 14px; color: rgb(255 255 255 / 0.75); }
.segmented.days { flex-wrap: wrap; width: fit-content; }
.segmented.days button { min-width: 48px; }
.time-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.time-chip { height: 32px; padding: 0 6px 0 12px; font-size: 13px; color: var(--cyan); border-color: rgb(125 244 255 / 0.3); }
.time-chip button { width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; }
.time-chip button:hover { background: rgb(255 255 255 / 0.1); }
.time-add { display: flex; gap: 10px; align-items: center; margin-top: 4px; }
.time-add .input { width: 130px; }
.frentes-list { display: grid; gap: 16px; }
.frente-card { display: grid; gap: 16px; padding: 20px; border-radius: var(--radius-xl); background: rgb(255 255 255 / 0.03); border: 0.5px solid rgb(255 255 255 / 0.12); transition: opacity 0.2s ease; }
.frente-card.is-off { opacity: 0.6; }
.frente-head { display: grid; grid-template-columns: 150px minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 14px; align-items: end; }
.alvo-row { display: grid; grid-template-columns: minmax(0, 1fr) auto 180px auto; gap: 12px; align-items: center; }
.add-btn { width: fit-content; }
.savebar { position: sticky; bottom: 16px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 14px 12px 22px; border-radius: var(--radius-xl); }
.savebar-state { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; color: rgb(255 255 255 / 0.6); }
.savebar-state.pending { color: var(--primary); }
.savebar-state.erro { color: var(--error); }
.savebar-actions { display: flex; gap: 10px; }

/* ---------------------------------------------------------------- modal (nova rodada) */
.modal { width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border-radius: var(--radius-panel); color: var(--on-surface); }
.modal[open] { display: flex; animation: rise-in 0.25s ease-out; }
.modal::backdrop { background: rgb(0 0 0 / 0.5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.modal-form { display: flex; flex-direction: column; width: 100%; max-height: inherit; }
.modal-head { display: flex; gap: 16px; align-items: flex-start; padding: 26px 26px 18px; border-bottom: 0.5px solid rgb(255 255 255 / 0.08); }
.modal-head h2 { font-size: 22px; font-weight: 600; }
.modal-head p { margin-top: 4px; font-size: 14px; color: rgb(255 255 255 / 0.65); }
.modal-body { overflow-y: auto; padding: 20px 26px; display: grid; gap: 20px; }
.modal-switches { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.modal-row { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.modal-summary { font-size: 12px; letter-spacing: 0.05em; color: var(--cyan); }
.modal-foot { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 26px; border-top: 0.5px solid rgb(255 255 255 / 0.08); }

/* ---------------------------------------------------------------- toasts */
.toasts { position: fixed; right: 24px; bottom: 96px; display: grid; gap: 10px; z-index: 60; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-md); background: #1f1f25; border: 0.5px solid rgb(255 255 255 / 0.2); box-shadow: 0 10px 40px -10px rgb(0 0 0 / 0.6); font-size: 14px; animation: rise-in 0.25s ease-out both; }
.toast .icon { color: var(--cyan); }
.toast.erro .icon { color: var(--error); }

/* ---------------------------------------------------------------- entrada */
.reveal > * { animation: rise-in 0.4s ease-out both; }
.reveal > *:nth-child(2) { animation-delay: 70ms; }
.reveal > *:nth-child(3) { animation-delay: 140ms; }
.reveal > *:nth-child(4) { animation-delay: 210ms; }

/* ---------------------------------------------------------------- responsivo */
@media (max-width: 1180px) {
  .grid-main { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat:nth-child(4) { border-left: 0; }
  .stat:nth-child(n + 4) { border-top: 0.5px solid rgb(255 255 255 / 0.1); }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; top: 0; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 16px; border-radius: 0 0 var(--radius-xl) var(--radius-xl); border-left: 0.5px solid rgb(255 255 255 / 0.25); border-top: 0; }
  .brand .brand-status, .next-run { display: none; }
  .nav { display: flex; order: 3; width: 100%; }
  .nav a { flex: 1; justify-content: center; padding: 0 8px; letter-spacing: 0.1em; font-size: 11px; }
  .sidebar-foot { margin: 0 0 0 auto; }
  .view { padding: 24px 16px 48px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 18px; border-left: 0 !important; border-top: 0.5px solid rgb(255 255 255 / 0.1); }
  .stat:nth-child(-n + 2) { border-top: 0; }
  .stat-value { font-size: 28px; }
  .job { flex-wrap: wrap; gap: 12px 14px; }
  .job-body { flex-basis: calc(100% - 70px); }
  .job-tags { justify-content: flex-start; max-width: none; }
  .job-title { white-space: normal; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .drawer { border-radius: 0; }
  .panel { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .dot.live, .skeleton, .btn .spin { animation: none; }
  .reveal > *, .toast, .drawer[open] { animation: none; }
}

@media (max-width: 860px) {
  .frente-head { grid-template-columns: minmax(0, 1fr) auto; }
  .frente-head .switch { grid-column: 1 / -1; }
  .alvo-row { grid-template-columns: minmax(0, 1fr) auto; }
  .alvo-row .select { grid-column: 1; }
  .modal-switches, .modal-grid, .modal-row { grid-template-columns: minmax(0, 1fr); }
  .savebar { bottom: 8px; }
}

.grid-half { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
@media (max-width: 1180px) { .grid-half { grid-template-columns: minmax(0, 1fr); } }
/* lista resumida (painel): só nota, título e local */
.job-list.compact .job-tags, .job-list.compact .job-date { display: none; }
.settings-summary.ok-text { color: var(--cyan); }
.settings-summary.erro-text { color: var(--error); }
.model-row { display: flex; gap: 10px; align-items: center; }
.model-row > .select, .model-row > .input { flex: 1; min-width: 0; }
.icon-btn .spin { animation: spin 1s linear infinite; }
.cred-list { display: grid; gap: 14px; margin: 18px 0 10px; }
.cred-row { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) auto; gap: 14px; align-items: start; padding: 16px; border-radius: var(--radius-lg); background: rgb(255 255 255 / 0.03); border: 0.5px solid rgb(255 255 255 / 0.1); }
.cred-row:not(:has(> .field:nth-child(3))) { grid-template-columns: minmax(0, 1fr) auto; }
.cred-row .cred-test { padding-top: 22px; }
.cred-row > .settings-summary { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 860px) { .cred-row { grid-template-columns: minmax(0, 1fr); } .cred-row .cred-test { padding-top: 0; } }

/* ---------------------------------------------------------------- chat */
.chat-shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; height: calc(100vh - 104px); min-height: 520px; }
.chat-side { border-radius: var(--radius-xl); padding: 18px 12px; display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.chat-side-head { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.chat-side-head .label-caps { color: rgb(255 255 255 / 0.6); }
.chat-list-items { list-style: none; margin: 0; padding: 0; overflow-y: auto; display: grid; gap: 4px; align-content: start; }
.chat-list-items li { position: relative; }
.chat-item { width: 100%; display: grid; gap: 2px; text-align: left; padding: 10px 40px 10px 12px; border-radius: var(--radius-md); border: 0.5px solid transparent; background: transparent; cursor: pointer; transition: background-color 0.2s ease; }
.chat-item:hover { background: rgb(255 255 255 / 0.05); }
.chat-item.is-active { background: rgb(255 255 255 / 0.07); border-color: rgb(255 255 255 / 0.15); }
.chat-item-title { font-size: 14px; color: rgb(255 255 255 / 0.9); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-item.is-active .chat-item-title { color: var(--primary); }
.chat-item-meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; color: rgb(255 255 255 / 0.45); }
.chat-item-del { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); opacity: 0; }
.chat-list-items li:hover .chat-item-del, .chat-item-del:focus-visible { opacity: 1; }
.chat-list-empty { padding: 12px; font-size: 13px; color: rgb(255 255 255 / 0.5); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 10px; }
.icon-btn.sm .icon { width: 15px; height: 15px; }

.chat-main { border-radius: var(--radius-panel); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 24px; border-bottom: 0.5px solid rgb(255 255 255 / 0.08); flex-wrap: wrap; }
.chat-head-text { display: grid; gap: 4px; min-width: 0; }
.chat-title { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-head-tools { display: flex; align-items: center; gap: 12px; }
.chat-account { font-size: 11px; letter-spacing: 0.08em; color: rgb(255 255 255 / 0.5); }
.chat-model { width: auto; min-width: 190px; }
.chat-thread { flex: 1; overflow-y: auto; padding: 24px clamp(16px, 3vw, 40px); display: flex; flex-direction: column; gap: 22px; }
.chat-empty { margin: auto; max-width: 620px; display: grid; justify-items: center; gap: 12px; text-align: center; padding: 24px 0; }
.chat-empty h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.chat-empty p { color: rgb(255 255 255 / 0.65); font-size: 14px; }
.chat-suggestions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; width: 100%; }
.suggestion { text-align: left; padding: 14px 16px; border-radius: var(--radius-lg); border: 0.5px solid rgb(255 255 255 / 0.14); background: rgb(255 255 255 / 0.04); color: rgb(255 255 255 / 0.82); font-size: 13.5px; line-height: 1.45; cursor: pointer; transition: background-color 0.2s ease, border-color 0.2s ease; }
.suggestion:hover { background: rgb(255 255 255 / 0.08); border-color: rgb(236 178 255 / 0.35); }

.msg { display: flex; gap: 12px; max-width: 860px; width: 100%; }
.msg-user { justify-content: flex-end; align-self: flex-end; }
.msg-user .msg-body { max-width: 75%; padding: 12px 16px; border-radius: 18px 18px 4px 18px; background: rgb(236 178 255 / 0.12); border: 0.5px solid rgb(236 178 255 / 0.25); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.msg-ai { align-self: flex-start; }
.msg-avatar img { width: 28px; height: 28px; margin-top: 2px; }
.msg-col { min-width: 0; flex: 1; display: grid; gap: 8px; }
.msg-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.msg-tools:empty { display: none; }
.chat-tool { font-size: 12px; color: rgb(255 255 255 / 0.6); }
.chat-tool summary { cursor: pointer; display: inline-flex; align-items: center; gap: 2px; padding: 3px 10px; border-radius: 999px; background: rgb(125 244 255 / 0.07); border: 0.5px solid rgb(125 244 255 / 0.25); color: var(--cyan); font-family: var(--font-mono); font-size: 11px; list-style: none; }
.chat-tool summary::-webkit-details-marker { display: none; }
.chat-tool[open] { flex-basis: 100%; }
.chat-tool pre { margin: 6px 0 0; padding: 10px 12px; border-radius: var(--radius-md); background: rgb(0 0 0 / 0.35); font-family: var(--font-mono); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; color: rgb(255 255 255 / 0.75); }
.msg-error { color: var(--error); font-size: 13px; }
.msg-actions { display: flex; gap: 6px; opacity: 0; transition: opacity 0.2s ease; }
.msg-ai:hover .msg-actions, .msg-actions:focus-within { opacity: 1; }

.md { font-size: 15px; line-height: 1.65; color: rgb(255 255 255 / 0.88); overflow-wrap: anywhere; }
.md > * + * { margin-top: 10px; }
.md p { margin: 0; }
.md .md-h { font-family: var(--font-display); font-weight: 600; margin: 16px 0 4px; line-height: 1.3; }
.md h3.md-h { font-size: 18px; } .md h4.md-h { font-size: 16px; } .md h5.md-h, .md h6.md-h { font-size: 15px; }
.md .md-list { margin: 0; padding-left: 22px; display: grid; gap: 4px; }
.md a { color: var(--cyan); text-underline-offset: 3px; }
.md strong { color: #fff; font-weight: 600; }
.md code { font-family: var(--font-mono); font-size: 0.88em; padding: 1px 6px; border-radius: 6px; background: rgb(255 255 255 / 0.08); }
.md .md-code { margin: 0; padding: 14px 16px; border-radius: var(--radius-md); background: rgb(0 0 0 / 0.35); border: 0.5px solid rgb(255 255 255 / 0.08); overflow-x: auto; }
.md .md-code code { background: none; padding: 0; font-size: 12.5px; }
.md .md-quote { margin: 0; padding: 4px 0 4px 14px; border-left: 2px solid rgb(236 178 255 / 0.4); color: rgb(255 255 255 / 0.75); }
.md hr { border: 0; border-top: 0.5px solid rgb(255 255 255 / 0.12); }
.md .md-table { overflow-x: auto; border-radius: var(--radius-md); border: 0.5px solid rgb(255 255 255 / 0.12); }
.md table { border-collapse: collapse; width: 100%; font-size: 13.5px; overflow-wrap: normal; }
.md td:first-child, .md td:nth-child(2) { white-space: nowrap; }
.md th { text-align: left; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: rgb(255 255 255 / 0.6); background: rgb(255 255 255 / 0.04); }
.md th, .md td { padding: 8px 12px; border-bottom: 0.5px solid rgb(255 255 255 / 0.07); vertical-align: top; }
.md tr:last-child td { border-bottom: 0; }

.typing { display: inline-flex; gap: 4px; padding: 8px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: 0.4; animation: typing 1.2s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; } .typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 50% { opacity: 1; transform: translateY(-3px); } }

.chat-composer { display: flex; gap: 10px; align-items: flex-end; padding: 14px 18px 18px; border-top: 0.5px solid rgb(255 255 255 / 0.08); }
.chat-input { flex: 1; resize: none; min-height: 46px; max-height: 220px; padding: 12px 16px; line-height: 1.5; border-radius: var(--radius-lg); }
.chat-send { width: 46px; height: 46px; padding: 0; border-radius: 14px; }
.chat-send.is-stop { background: rgb(255 255 255 / 0.1); color: #fff; border: 0.5px solid rgb(255 255 255 / 0.3); }

@media (max-width: 860px) {
  .chat-shell { grid-template-columns: minmax(0, 1fr); height: calc(100vh - 150px); }
  .chat-side { max-height: 160px; }
  .chat-suggestions { grid-template-columns: minmax(0, 1fr); }
  .msg-user .msg-body { max-width: 90%; }
}
@media (prefers-reduced-motion: reduce) { .typing i { animation: none; opacity: 0.8; } }
.msg-col > * { min-width: 0; }
.msg-notices:empty { display: none; }
.msg-notice { font-size: 12.5px; color: var(--primary); padding: 6px 10px; border-radius: var(--radius-md); background: rgb(236 178 255 / 0.06); border: 0.5px solid rgb(236 178 255 / 0.2); }
.msg-actions { align-items: center; }
.msg-via { font-size: 10.5px; letter-spacing: 0.08em; color: rgb(255 255 255 / 0.4); }
