/* Pele premium do ecossistema Portal Notarial.
   Inter self-hosted, azul-tinta, cartoes com sombra suave, cabecalho em duas
   linhas com chip do usuario e navegacao em pilulas. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/Inter-roman.var.woff2") format("woff2");
}

:root {
  --bg: #eef2f8;
  --card: #ffffff;
  --ink: #0f2748;
  --text: #1f2d45;
  --muted: #64748b;
  --border: #e6ebf3;
  --accent: #2563eb;
  --accent-2: #1d4ed8;
  --accent-soft: #eaf0ff;
  --ok: #0f9669;
  --err: #e11d48;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 39, 72, .05);
  --shadow: 0 10px 28px rgba(15, 39, 72, .07);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 960px;
}

* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font);
  font-feature-settings: "cv05" 1, "ss01" 1;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Cabecalho */
.top {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 20px;
}
.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  max-width: var(--max);
  margin: 0 auto;
}
.nav-row { margin-top: 12px; }

.logo { display: flex; align-items: center; line-height: 1.05; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-img { height: 34px; width: auto; display: block; }
.logo-text { display: flex; flex-direction: column; }
.logo-eyebrow {
  font-size: .62rem;
  letter-spacing: .18em;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}
.logo-word { font-size: 1.32rem; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }

.chip { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 42px; height: 42px; flex: none;
  border-radius: 999px;
  background: var(--accent);
  color: #fff; font-weight: 700; font-size: .9rem;
  display: grid; place-items: center;
}
.chip-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.chip-name {
  font-weight: 600; color: var(--ink); font-size: .95rem;
  max-width: 52vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.chip-sub { font-size: .8rem; color: var(--muted); }

.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink);
  font: inherit; font-weight: 600; font-size: .92rem;
  text-decoration: none; cursor: pointer;
}
.pill-btn:hover { background: var(--bg); text-decoration: none; }

/* Conteudo */
.wrap { max-width: var(--max); margin: 0 auto; padding: 26px 20px 40px; }
h1 { font-size: 1.5rem; letter-spacing: -.01em; margin: 0 0 4px; color: var(--ink); }

.tool-title { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.tool-title .ic {
  width: 52px; height: 52px; flex: none;
  border-radius: 16px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center;
}
.ic svg { width: 26px; height: 26px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.section-label {
  text-transform: uppercase; letter-spacing: .12em;
  font-size: .78rem; font-weight: 700; color: var(--muted);
  margin: 22px 0 10px;
}

/* Cartoes */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm), var(--shadow);
  padding: 22px;
  margin: 16px 0;
}
.card-h { font-size: 1.12rem; font-weight: 800; color: var(--ink); margin: 0 0 2px; }
.card-sub { color: var(--muted); font-size: .93rem; margin: 0 0 14px; }

/* Campos */
.field { margin-bottom: 16px; }
.lbl { display: block; font-size: .88rem; font-weight: 700; color: var(--ink); margin-bottom: 7px; }
input[type="text"], input[type="email"], input[type="password"], input[type="file"], select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  font: inherit;
  color: var(--ink);
}
input:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 42px;
  cursor: pointer;
}
input[type="file"] { padding: 9px 12px; }
input[type="file"]::file-selector-button {
  font: inherit; font-weight: 600;
  margin-right: 12px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--accent-soft); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }

/* Caixa de consentimento (declaracao) */
.consent {
  display: flex; align-items: flex-start; gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--muted);
  font-size: .92rem;
}
.consent span { color: var(--text); }

/* Botoes */
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 12px 22px;
  font: inherit; font-weight: 700; font-size: .96rem;
  cursor: pointer; text-decoration: none;
}
.btn.primary {
  background: var(--accent); color: #fff;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .28);
}
.btn.primary:hover { background: var(--accent-2); text-decoration: none; }
.btn.primary:active { transform: translateY(1px); }
.btn.ghost { background: var(--card); border-color: var(--border); color: var(--ink); }
.btn.ghost:hover { background: var(--bg); text-decoration: none; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font: inherit; }
.inline { display: inline; }

/* Pills e badges */
.pill {
  display: inline-block; font-size: .78rem; font-weight: 600;
  padding: 4px 11px; border-radius: 999px; background: var(--bg); color: var(--muted);
}
.badge { display: inline-block; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge.admin { background: var(--accent-soft); color: var(--accent); }
.badge.member { background: var(--bg); color: var(--muted); }

/* Status do job */
.status { font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.status-QUEUED { background: var(--bg); color: var(--muted); }
.status-RUNNING { background: #fff4d6; color: #92680a; }
.status-COMPLETED { background: rgba(15, 150, 105, .12); color: var(--ok); }
.status-FAILED { background: rgba(225, 29, 72, .12); color: var(--err); }

/* Tabelas */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.data { width: 100%; min-width: 520px; border-collapse: collapse; background: var(--card); }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); }
table.data th { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
table.data tr:last-child td { border-bottom: 0; }

/* Transcricao */
.transcript { margin-top: 20px; }
.segment { margin: 10px 0; line-height: 1.6; }
.ts { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 8px; font-size: .88rem; }
.speaker { font-weight: 700; margin-right: 4px; color: var(--ink); }

.note { color: var(--muted); font-size: .92rem; }
.hash { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .82rem; word-break: break-all; color: var(--ink); margin: 2px 0 8px; }
.error { color: var(--err); }
.messages { list-style: none; padding: 0; margin: 0 0 16px; max-width: var(--max); }
.messages li { background: var(--accent-soft); color: var(--ink); padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 8px; }
.auth-card { max-width: 440px; margin: 44px auto; }
