/* =================================================================
   GoatOS 3.2 — Sistema de Ordem de Serviço
   Criado pela Goats Sport & Marketing
   Paleta derivada da logo GOATS: azul-aço + azul-marinho.
   (Os nomes de variáveis --cyan/--magenta foram mantidos por
   compatibilidade; seus VALORES agora seguem a marca GOATS.)
   ================================================================= */

:root {
  /* Marca — GOATS */
  --cyan:        #2B8CB8;   /* azul principal (escudo) */
  --cyan-deep:   #1E6E94;   /* azul profundo */
  --magenta:     #2E6E93;   /* azul-aço secundário */
  --magenta-deep:#242C3B;   /* azul-marinho (números de OS, tags, status) */
  --grad: linear-gradient(120deg, #34A0CC 0%, #1E6E94 100%);

  /* Tema escuro (chrome / sidebar / login) */
  --ink-0:  #0B0B0F;
  --ink-1:  #14141C;
  --ink-2:  #1E1E2A;
  --ink-3:  #2A2A3A;

  /* Conteúdo claro */
  --bg:      #F4F5F8;
  --surface: #FFFFFF;
  --line:    #E5E7EE;
  --text:    #1B1D26;
  --muted:   #6B7185;
  --muted-2: #9AA0B2;

  /* Estados */
  --ok:     #1FA971;
  --ok-bg:  #E6F7EF;
  --warn:   #C9821B;
  --warn-bg:#FBF1E0;
  --danger: #D14343;
  --danger-bg:#FBE9E9;
  --info-bg:#E8F6F9;

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16,18,30,.06), 0 8px 24px rgba(16,18,30,.06);
  --shadow-lg: 0 12px 40px rgba(16,18,30,.18);

  --sidebar-w: 248px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --display: 'Poppins', var(--font);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.2; }

/* ---------------------------------------------------------------
   Layout com sidebar
   --------------------------------------------------------------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--ink-1);
  color: #E9E9F2;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid #23232f;
}

.sidebar__brand {
  padding: 22px 20px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #23232f;
}
.sidebar__brand img {
  width: 48px; height: 48px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.sidebar__brand .name {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: .5px;
  font-size: 18px;
  line-height: 1;
}
.sidebar__brand .tag {
  display: block;
  font-size: 10.5px;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 3px;
}

.nav { padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav__label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: #6a6a82;
  padding: 14px 12px 6px;
}
.nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: #C6C7D6;
  font-weight: 500;
  font-size: 14.5px;
  transition: background .15s, color .15s;
}
.nav a:hover { background: var(--ink-2); color: #fff; text-decoration: none; }
.nav a.active {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 6px 16px -6px rgba(30,110,148,.55);
}
.nav a svg { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar__foot { padding: 14px; border-top: 1px solid #23232f; }
.sidebar__user { display: flex; align-items: center; gap: 10px; padding: 4px 8px 12px; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; font-size: 14px;
  flex-shrink: 0;
}
.sidebar__user .u-name { font-size: 13.5px; font-weight: 600; color: #fff; }
.sidebar__user .u-role { font-size: 11px; color: var(--muted-2); }

/* ---------------------------------------------------------------
   Área de conteúdo
   --------------------------------------------------------------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 64px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 26px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 19px; font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .hamburger { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }

.content { padding: 26px; max-width: 1180px; width: 100%; margin: 0 auto; }

/* ---------------------------------------------------------------
   Cards
   --------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.card__head {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 12px;
}
.card__head h2 { font-size: 16px; font-weight: 600; }
.card__head .spacer { flex: 1; }
.card__body { padding: 20px; }
.card__body.tight { padding: 0; }

/* Cabeçalho de página */
.page-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head .titles { flex: 1; min-width: 200px; }
.page-head h1 { font-size: 22px; font-weight: 700; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

/* ---------------------------------------------------------------
   Dashboard - tiles
   --------------------------------------------------------------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 12px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  color: var(--text);
}
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); text-decoration: none; border-color: #d7dae6; }
.tile .ic {
  width: 44px; height: 44px; border-radius: 11px;
  background: var(--grad);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.tile .ic svg { width: 22px; height: 22px; }
.tile .t-title { font-weight: 600; font-size: 15.5px; font-family: var(--display); }
.tile .t-desc { color: var(--muted); font-size: 13px; line-height: 1.45; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px,1fr)); gap: 16px; margin-bottom: 22px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.stat .n { font-family: var(--display); font-size: 28px; font-weight: 700; line-height: 1; }
.stat .l { color: var(--muted); font-size: 13px; margin-top: 6px; }
.stat .n.grad {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------------------------------------------------------------
   Botões
   --------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 14px; font-weight: 600;
  padding: 10px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s, border-color .15s;
  text-decoration: none; line-height: 1;
}
.btn:hover { background: #f7f8fb; text-decoration: none; border-color: #d7dae6; }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn--primary {
  background: var(--grad); color: #fff; border: 0;
  box-shadow: 0 8px 18px -8px rgba(43,140,184,.7);
}
.btn--primary:hover { background: var(--grad); filter: brightness(1.05); }
.btn--ghost { background: transparent; }
.btn--danger { color: var(--danger); border-color: #f0cccc; background: var(--danger-bg); }
.btn--danger:hover { background: #f7dada; }
.btn--sm { padding: 7px 11px; font-size: 13px; }
.btn--block { width: 100%; }

/* ---------------------------------------------------------------
   Formulários
   --------------------------------------------------------------- */
.grid { display: grid; gap: 16px 18px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-full { grid-column: 1 / -1; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label {
  font-size: 12.5px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .4px;
}
.field input, .field select, .field textarea {
  font-family: var(--font); font-size: 14.5px; color: var(--text);
  padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); width: 100%; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(43,140,184,.18);
}
.field .hint { font-size: 12px; color: var(--muted-2); }
.field input[readonly] { background: #f3f4f8; color: var(--muted); }

.form-actions {
  display: flex; gap: 10px; justify-content: flex-end;
  padding-top: 6px; flex-wrap: wrap;
}

/* Bloco de dados somente-leitura (ficha do cliente, etc.) */
.readout { display: grid; gap: 14px 22px; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); }
.readout .ro { display: flex; flex-direction: column; gap: 3px; }
.readout .ro .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted-2); font-weight: 600; }
.readout .ro .v { font-size: 14.5px; color: var(--text); font-weight: 500; }

/* ---------------------------------------------------------------
   Tabelas
   --------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th {
  text-align: left; font-weight: 600; color: var(--muted);
  font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fafbfd; white-space: nowrap;
}
table.data td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: #f7f9fc; }
table.data .num { font-variant-numeric: tabular-nums; }
.os-code { font-family: var(--display); font-weight: 700; color: var(--magenta-deep); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }

/* Etiquetas de status */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap;
}
.badge.aberta { background: var(--info-bg); color: var(--cyan-deep); }
.badge.fechada { background: var(--ok-bg); color: var(--ok); }
.badge.atraso { background: var(--warn-bg); color: var(--warn); }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------------------------------------------------------------
   Avisos / mensagens
   --------------------------------------------------------------- */
.alert { padding: 13px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 18px; display: flex; gap: 10px; align-items: flex-start; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert--ok { background: var(--ok-bg); color: #14764e; }
.alert--warn { background: var(--warn-bg); color: #8a5a12; }
.alert--err { background: var(--danger-bg); color: #9c2b2b; }

/* Busca */
.search-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.search-bar .field { flex: 1; min-width: 180px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }

/* Estado vazio */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty svg { width: 46px; height: 46px; color: var(--muted-2); margin-bottom: 12px; }
.empty h3 { font-size: 16px; color: var(--text); margin-bottom: 6px; }
.empty p { font-size: 14px; margin: 0 0 16px; }

/* Lista de resultados de busca de cliente (Nova OS) */
.cli-list { display: flex; flex-direction: column; }
.cli-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  color: var(--text); transition: background .12s;
}
.cli-row:hover { background: #f7f9fc; text-decoration: none; }
.cli-row:last-child { border-bottom: 0; }
.cli-row .cli-ic {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: var(--grad); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.cli-main { flex: 1; min-width: 0; }
.cli-nome { display: block; font-weight: 600; font-size: 15px; }
.cli-sub { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.cli-go { color: var(--cyan-deep); font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.empty-sm { padding: 22px 16px; color: var(--muted); font-size: 14px; text-align: center; }
.search-hero { display: flex; gap: 10px; }
.search-hero input { font-size: 16px; padding: 13px 14px; }

/* Tabs de filtro */
.seg { display: inline-flex; background: #eef0f5; border-radius: 999px; padding: 3px; }
.seg a { padding: 7px 15px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------------------------------------------------------------
   Responsivo
   --------------------------------------------------------------- */
@media (max-width: 920px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .col-span-3 { grid-column: span 2; }
}
@media (max-width: 760px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 100;
    transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }
  .app.nav-open .sidebar { transform: translateX(0); }
  .app.nav-open::after {
    content: ''; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 90;
  }
  .topbar .hamburger { display: inline-flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .col-span-2, .col-span-3 { grid-column: span 1; }
  .content { padding: 18px; }
}

/* ---------------------------------------------------------------
   Login
   --------------------------------------------------------------- */
.login-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 500px at 20% 10%, rgba(43,140,184,.20), transparent 60%),
    radial-gradient(800px 500px at 85% 90%, rgba(105,171,198,.16), transparent 60%),
    var(--ink-0);
  padding: 24px;
}
.login-card {
  width: 100%; max-width: 380px;
  background: var(--ink-1);
  border: 1px solid #252533;
  border-radius: 18px;
  padding: 34px 30px 30px;
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.7);
  color: #ECECF4;
}
.login-card .logo-wrap { display: flex; justify-content: center; margin-bottom: 18px; }
.login-card .logo-wrap img {
  width: 116px; height: 116px; border-radius: 22px; object-fit: contain;
  padding: 10px; background: #fff; box-shadow: 0 8px 28px rgba(0,0,0,.35);
}
.login-card h1 { text-align: center; font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.login-card .sub { text-align: center; color: var(--muted-2); font-size: 12.5px; letter-spacing: .8px; text-transform: uppercase; margin: 4px 0 26px; }
.login-card .field > label { color: #B7B8C8; }
.login-card .field input {
  background: var(--ink-2); border-color: #2e2e3e; color: #fff;
}
.login-card .field input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(43,140,184,.22); }
.login-card .field { margin-bottom: 16px; }
.login-card .btn--primary { width: 100%; padding: 12px; font-size: 15px; margin-top: 6px; }
.login-card .err {
  background: rgba(209,67,67,.14); color: #ff9c9c; border: 1px solid rgba(209,67,67,.3);
  padding: 10px 13px; border-radius: var(--radius-sm); font-size: 13.5px; margin-bottom: 18px; text-align: center;
}
.login-foot { text-align: center; color: #56566c; font-size: 12px; margin-top: 22px; }

/* ---------------------------------------------------------------
   Impressão da OS
   --------------------------------------------------------------- */
.print-page { max-width: 720px; margin: 0 auto; background: #fff; color: #000; }
.print-toolbar { max-width: 720px; margin: 16px auto; display: flex; gap: 10px; justify-content: flex-end; }
.os-doc { border: 1.5px solid #000; }
.os-doc .os-header { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-bottom: 1.5px solid #000; background: #f4f4f6; }
.os-doc .os-header img { width: 92px; height: 92px; object-fit: contain; border-radius: 8px; background:#fff; border:1px solid #d8d8de; }
.os-doc .os-header .co h2 { font-size: 18px; }
.os-doc .os-header .co .num { font-size: 22px; font-weight: 800; font-family: var(--display); }
.os-doc .os-header .co p { margin: 4px 0 0; font-size: 12px; line-height: 1.4; }
.os-doc .os-section { padding: 12px 18px; border-bottom: 1px solid #999; }
.os-doc .os-section:last-child { border-bottom: 0; }
.os-doc .os-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 18px; }
.os-doc .os-grid.two { grid-template-columns: 1fr 1fr; }
.os-doc .ro { display: flex; flex-direction: column; gap: 2px; }
.os-doc .ro .k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .4px; color: #555; font-weight: 700; }
.os-doc .ro .v { font-size: 13.5px; }
.os-doc .os-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .8px; color: #333; margin-bottom: 8px; }
.os-doc .sign { margin-top: 30px; display: flex; gap: 40px; }
.os-doc .sign .line { flex: 1; border-top: 1px solid #000; padding-top: 6px; font-size: 11px; text-align: center; color: #333; }

/* Observações com asterisco / tópicos */
.os-notes { margin: 4px 0 0; padding: 0; list-style: none; counter-reset: ast; }
.os-notes li { font-size: 11.5px; line-height: 1.5; color: #222; padding-left: 16px; position: relative; }
.os-notes li::before { content: attr(data-mark); position: absolute; left: 0; font-weight: 700; }
.os-termo { margin-top: 4px; }
.os-termo .lbl { font-weight: 800; }
.os-termo p { font-size: 11.5px; line-height: 1.5; margin: 4px 0 0; color: #222; }
.os-ciente { margin-top: 22px; display: flex; align-items: flex-end; gap: 40px; }
.os-ciente .ciente-lbl { font-size: 12px; font-weight: 700; white-space: nowrap; padding-bottom: 6px; }
.os-ciente .line { flex: 1; border-top: 1px solid #000; padding-top: 6px; font-size: 11px; text-align: center; color: #333; }
.os-doc .doc-tag { display:inline-block; font-size: 11px; font-weight: 700; letter-spacing: .5px; color: var(--magenta-deep); border: 1px solid currentColor; border-radius: 999px; padding: 2px 10px; }
.pay-badge { display:inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 12px; }
.pay-badge.pago { background: #E6F7EF; color: #14764e; }
.pay-badge.aberto { background: #FBF1E0; color: #8a5a12; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .print-page { max-width: 100%; }
  .os-doc { border-color: #000; }
}

/* =================================================================
   v2 — STATUS / HISTÓRICO, empresa e ajustes de impressão (A4)
   ================================================================= */

/* Badges de status */
.st-badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; white-space: nowrap;
  background: var(--info-bg); color: var(--cyan-deep);
  border: 1px solid rgba(16,166,189,.25);
}
.st-badge.st-fech { background: #E9F1F7; color: var(--magenta-deep); border-color: rgba(36,44,59,.22); }
.st-badge.st-op   { background: var(--bg); color: var(--muted); border-color: var(--line); }
.st-atual { font-size: 13px; color: var(--muted); }
.st-atual strong { color: var(--magenta-deep); }

/* Card de status em destaque */
.card--status { border: 1.5px solid var(--cyan-deep); box-shadow: 0 0 0 3px rgba(43,140,184,.12), var(--shadow); }
.card--status .card__head h2 { display: flex; align-items: center; gap: 8px; }
.card--status .card__head h2 svg { width: 18px; height: 18px; color: var(--cyan-deep); }

/* Tabela de histórico (tela) */
.hist-wrap { overflow-x: auto; }
.hist { width: 100%; border-collapse: collapse; font-size: 13px; }
.hist th {
  text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap;
}
.hist td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.hist td.num { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hist tr:last-child td { border-bottom: 0; background: rgba(43,140,184,.06); }
.hist-vazio { padding: 14px; color: var(--muted-2); font-size: 13px; }

/* Botão de perigo (excluir funcionário) */
.btn--danger { background: var(--danger-bg); color: #9c2b2b; border-color: #efc7c7; }
.btn--danger:hover { background: #f6d7d7; }

/* Cadastro da empresa */
.logo-picker { display: flex; align-items: center; gap: 16px; }
.logo-picker img {
  width: 84px; height: 84px; object-fit: contain; border-radius: 10px;
  background: #fff; border: 1px solid var(--line); padding: 6px;
}
.inline-rename { display: flex; gap: 6px; align-items: center; }
.rename-input { max-width: 260px; }

/* Histórico na impressão */
.hist--print { font-size: 10px; }
.hist--print th { font-size: 8.5px; color: #444; padding: 3px 6px; border-bottom: 1px solid #000; }
.hist--print td { padding: 3px 6px; border-bottom: 1px solid #ccc; }
.hist--print tr:last-child td { background: transparent; }
.hist--print .st-badge { background: transparent; border: none; color: #000; padding: 0; font-size: 10px; }

/* -------- Impressão em UMA página A4 -------------------------------------
   Reduz margens, fontes e espaçamentos apenas ao imprimir. */
@page { size: A4 portrait; margin: 8mm; }
@media print {
  html, body { background: #fff !important; }
  .print-page { max-width: 100% !important; margin: 0 !important; }
  .os-doc { border-width: 1px !important; }
  .os-doc .os-header { padding: 8px 12px !important; gap: 12px !important; }
  .os-doc .os-header img { width: 64px !important; height: 64px !important; }
  .os-doc .os-header .co h2 { font-size: 14px !important; }
  .os-doc .os-header .co .num { font-size: 16px !important; }
  .os-doc .os-header .co p { font-size: 10px !important; margin-top: 2px !important; }
  .os-doc .os-section { padding: 6px 12px !important; }
  .os-doc .os-title { font-size: 9px !important; margin-bottom: 4px !important; }
  .os-doc .os-grid { gap: 4px 12px !important; }
  .os-doc .ro .k { font-size: 8.5px !important; }
  .os-doc .ro .v { font-size: 10.5px !important; }
  .os-notes li, .os-termo p { font-size: 9.5px !important; line-height: 1.35 !important; }
  .os-doc .sign { margin-top: 16px !important; }
  .os-ciente { margin-top: 12px !important; }
  .os-doc .sign .line, .os-ciente .line { font-size: 9px !important; padding-top: 4px !important; }
  .hist--print { font-size: 9px !important; }
  .hist--print th { font-size: 7.5px !important; }
  .os-doc, .os-section { page-break-inside: avoid; }
}

/* v2.1 — linhas de texto livre nas impressões (asteriscos manuais) */
.os-lines { margin: 4px 0 0; }
.os-line { font-size: 11.5px; line-height: 1.5; color: #222; }
@media print {
  .os-line { font-size: 9.5px !important; line-height: 1.35 !important; }
}

/* crédito GoatOS (Goats Sport & Marketing) */
.goat-credit {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 4px; opacity: .75;
}
.goat-credit img { width: 26px; height: 26px; object-fit: contain; }
.goat-credit span { font-size: 10.5px; line-height: 1.35; color: var(--sidebar-fg, #cfd8e3); }
.goat-credit--login { justify-content: center; margin-top: 14px; opacity: .8; }
.goat-credit--login span { color: #6b7a8c; }
@media print { .goat-credit { display: none; } }
