/* ============================================================
   Geny Eletro — Painel Administrativo
   Reutiliza as variáveis do design system (navy + âmbar).
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0d2240;
  --primary-dark: #050f22;
  --secondary: #f5b800;
  --secondary-hover: #e0a700;
  --on-secondary: #0d2240;
  --tertiary: #ea580c;

  --bg-page: #f1efe9;
  --surface: #ffffff;
  --surface-alt: #f7f5f0;
  --text-main: #0d2240;
  --text-muted: #475569;
  --border-color: #e2ded2;
  --border-input: #d4cebe;

  --ok-bg: #d1fae5; --ok-fg: #047857;
  --err-bg: #ffdad6; --err-fg: #93000a;
  --warn-bg: #fef3c7; --warn-fg: #92400e;
  --info-bg: #dbeafe; --info-fg: #1d4ed8;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --shadow-card: 0 4px 18px -2px rgba(13, 34, 64, 0.07);
  --shadow-raised: 0 18px 44px -12px rgba(13, 34, 64, 0.28);

  --sidebar-w: 264px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--text-main);
  background: var(--bg-page);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------
   LOGIN
   ------------------------------------------------------------ */
body.tela-login {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(900px at 12% -10%, rgba(245, 184, 0, 0.22), transparent 60%),
    radial-gradient(800px at 100% 110%, rgba(234, 88, 12, 0.18), transparent 55%),
    linear-gradient(150deg, var(--primary-dark), var(--primary) 55%, #16345e);
}

.login-card {
  width: 100%; max-width: 430px;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 40px 36px 34px;
  box-shadow: var(--shadow-raised);
  border: 1px solid rgba(255, 255, 255, 0.4);
  animation: loginIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@keyframes loginIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login-brand img { width: 56px; height: 56px; object-fit: contain; border-radius: 14px; }
.login-brand .titulo { display: flex; flex-direction: column; line-height: 1.1; }
.login-brand .titulo strong { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; }
.login-brand .titulo small {
  font-size: 10px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--secondary-hover); margin-top: 2px;
}

.login-card h1 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 6px; }
.login-card .sub { font-size: 14.5px; color: var(--text-muted); margin-bottom: 26px; }

.login-form { display: flex; flex-direction: column; gap: 16px; }

/* ------------------------------------------------------------
   FORMULÁRIOS (compartilhado)
   ------------------------------------------------------------ */
.campo { display: flex; flex-direction: column; gap: 7px; }
.campo > span { font-size: 13px; font-weight: 800; color: var(--primary); }
.campo input, .campo select, .campo textarea {
  width: 100%; padding: 13px 15px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--border-input); background: #fff;
  font-size: 15px; font-family: inherit; color: var(--text-main);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.35);
}
.campo input:disabled { background: var(--surface-alt); color: var(--text-muted); }
.campo-dica { font-size: 12px; color: var(--text-muted); }

.senha-wrap { position: relative; }
.senha-wrap input { padding-right: 46px; }
.senha-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none; cursor: pointer; font-size: 16px;
  padding: 6px 8px; border-radius: 6px; line-height: 1;
}
.senha-toggle:hover { background: var(--surface-alt); }

/* ------------------------------------------------------------
   BOTÕES
   ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: none; cursor: pointer;
  font-family: inherit; font-size: 15px; font-weight: 800;
  transition: background 0.18s, transform 0.12s, box-shadow 0.18s, color 0.18s;
  text-decoration: none; white-space: nowrap;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--secondary); color: var(--on-secondary); box-shadow: 0 8px 20px -8px rgba(245, 184, 0, 0.9); }
.btn-primary:not(:disabled):hover { background: var(--secondary-hover); transform: translateY(-1px); }
.btn-dark { background: var(--primary); color: #fff; }
.btn-dark:not(:disabled):hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--primary); border: 1.5px solid var(--border-input); }
.btn-ghost:not(:disabled):hover { border-color: var(--primary); background: var(--surface-alt); }
.btn-danger { background: #dc2626; color: #fff; }
.btn-danger:not(:disabled):hover { background: #b91c1c; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

.acoes-linha { display: flex; flex-wrap: wrap; gap: 10px; }

/* ------------------------------------------------------------
   FEEDBACK
   ------------------------------------------------------------ */
.feedback {
  padding: 13px 16px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 700;
}
.feedback.ok { background: var(--ok-bg); color: var(--ok-fg); }
.feedback.error { background: var(--err-bg); color: var(--err-fg); }
.feedback.loading { background: var(--warn-bg); color: var(--warn-fg); }
.feedback a { color: inherit; }

/* ------------------------------------------------------------
   LAYOUT DO PAINEL
   ------------------------------------------------------------ */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: linear-gradient(180deg, var(--primary), var(--primary-dark));
  color: #cfdaf2; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}
.sidebar-brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 12px; }
.sidebar-brand .txt { display: flex; flex-direction: column; line-height: 1.1; }
.sidebar-brand .txt strong { color: #fff; font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.sidebar-brand .txt small {
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--secondary); margin-top: 2px;
}

.sidebar-nav { padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 12px 14px; border-radius: var(--radius-md); border: none;
  background: transparent; color: #cfdaf2; font-family: inherit;
  font-size: 14.5px; font-weight: 700; cursor: pointer; text-align: left;
  transition: background 0.18s, color 0.18s;
}
.nav-item .ico { font-size: 17px; width: 22px; text-align: center; }
.nav-item .badge {
  margin-left: auto; background: var(--secondary); color: var(--on-secondary);
  font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  min-width: 24px; text-align: center;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
.nav-item.active {
  background: var(--secondary); color: var(--on-secondary);
  box-shadow: 0 10px 22px -10px rgba(245, 184, 0, 0.9);
}
.nav-item.active .badge { background: var(--primary); color: var(--secondary); }

.sidebar-foot { padding: 16px; border-top: 1px solid rgba(255, 255, 255, 0.09); }
.usuario-box { display: flex; align-items: center; gap: 11px; margin-bottom: 12px; }
.avatar {
  width: 38px; height: 38px; border-radius: 999px; flex-shrink: 0;
  background: var(--secondary); color: var(--on-secondary);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.usuario-box .info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.usuario-box .info strong { color: #fff; font-size: 14px; font-weight: 700; }
.usuario-box .info small { font-size: 11px; color: var(--secondary); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.usuario-box .info .email { font-size: 11.5px; color: #9fb0cc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-foot .btn-sair {
  width: 100%; background: rgba(255, 255, 255, 0.08); color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.sidebar-foot .btn-sair:hover { background: rgba(255, 255, 255, 0.16); }

/* ---------------- CONTEÚDO ---------------- */
.conteudo { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  background: var(--surface); border-bottom: 1px solid var(--border-color);
  padding: 16px 28px; display: flex; align-items: center; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar .menu-btn { display: none; }
.topbar h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.topbar .sub { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.topbar .espaco { flex: 1; }

.view { display: none; padding: 26px 28px 48px; }
.view.active { display: block; animation: fadeIn 0.25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------- PAINÉIS / CARDS ---------------- */
.card-painel {
  background: var(--surface); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-card);
  padding: 22px 24px; margin-bottom: 22px;
}
.card-painel > h2 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.card-painel > .desc { font-size: 13.5px; color: var(--text-muted); margin-bottom: 18px; }

/* ---------------- BARRA DE FERRAMENTAS ---------------- */
.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px;
  margin-bottom: 18px;
}
.toolbar .crescer { flex: 1; }
.busca {
  position: relative; flex: 1; min-width: 220px; max-width: 380px;
}
.busca input { width: 100%; padding: 11px 14px 11px 38px; border-radius: 999px;
  border: 1.5px solid var(--border-input); font-family: inherit; font-size: 14px; }
.busca input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.3); }
.busca::before { content: "🔍"; position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: 0.6; }

select.filtro {
  padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--border-input);
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--text-main);
  background: #fff; cursor: pointer;
}
select.filtro:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.3); }
select.filtro.filtro-cidade { max-width: 200px; text-overflow: ellipsis; }
/* Destaca o filtro quando há uma cidade selecionada. */
select.filtro.filtro-cidade[data-ativa="1"] {
  border-color: var(--primary); background: rgba(245, 184, 0, 0.12); color: var(--text-main);
}

.contador-selecao {
  font-size: 13.5px; font-weight: 700; color: var(--text-muted);
  padding: 8px 14px; background: var(--surface); border-radius: 999px;
  border: 1px solid var(--border-color);
}

/* ---------------- TABELA ---------------- */
.tabela-wrap { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border-color); background: #fff; }
table.tabela { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 820px; }
table.tabela thead th {
  background: var(--surface-alt); text-align: left; padding: 12px 14px;
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-muted);
  border-bottom: 1px solid var(--border-color); white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
table.tabela tbody td { padding: 12px 14px; border-bottom: 1px solid var(--border-color); vertical-align: top; }
table.tabela tbody tr:last-child td { border-bottom: none; }
table.tabela tbody tr:hover { background: #fbfaf7; }
table.tabela tbody tr.selecionada { background: rgba(245, 184, 0, 0.12); }
table.tabela tbody tr.linha-atraso { background: rgba(185, 28, 28, 0.055); }
table.tabela tbody tr.linha-atraso td:first-child { box-shadow: inset 4px 0 0 var(--err-fg); }
table.tabela tbody tr.linha-atraso.selecionada { background: rgba(245, 184, 0, 0.18); }
table.tabela .col-check { width: 42px; text-align: center; }
table.tabela input[type="checkbox"] { width: 17px; height: 17px; cursor: pointer; accent-color: var(--primary); }
.celula-principal { font-weight: 700; color: var(--primary); }
.celula-sub { font-size: 12.5px; color: var(--text-muted); }
.tabela .detalhes { max-width: 260px; font-size: 12.5px; color: var(--text-muted); }
.tabela .sem-dados { text-align: center; padding: 40px 16px; color: var(--text-muted); }

/* Seletor de status por linha */
select.status-select {
  appearance: none; -webkit-appearance: none;
  padding: 6px 26px 6px 12px; border-radius: 999px; cursor: pointer;
  font-family: inherit; font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; border: 1.5px solid transparent;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='3' 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 9px center; background-size: 11px;
  transition: filter 0.15s, opacity 0.15s;
}
select.status-select:hover { filter: brightness(0.96); }
select.status-select:focus { outline: none; box-shadow: 0 0 0 3px rgba(245, 184, 0, 0.4); }
select.status-select:disabled { opacity: 0.6; cursor: wait; }
select.status-select.salvando { border-color: var(--secondary); }
select.status-select.st-pendente { background-color: #fef9c3; color: #854d0e; }
select.status-select.st-em_andamento { background-color: var(--info-bg); color: var(--info-fg); }
select.status-select.st-concluido { background-color: var(--ok-bg); color: var(--ok-fg); }
select.status-select.st-cancelado { background-color: #e5e7eb; color: #374151; }

/* Fotos do produto (assistência) */
.fotos-linha { display: flex; gap: 8px; margin-top: 8px; }
.foto-thumb {
  width: 54px; height: 54px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--border-color); display: block; transition: transform .15s;
}
.foto-thumb:hover { transform: scale(1.06); }

/* Fotos no modal/PDF de detalhes */
.fotos-pdf { display: flex; gap: 10px; flex-wrap: wrap; }
.fotos-pdf img {
  width: 120px; height: 120px; object-fit: cover;
  border: 1px solid var(--border-color); border-radius: 8px; display: block;
}

/* ---------------- BADGES ---------------- */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; white-space: nowrap;
}
.tag-montagem { background: var(--info-bg); color: var(--info-fg); }
.tag-entrega { background: var(--warn-bg); color: var(--warn-fg); }
.tag-assistencia { background: #ffe4e6; color: #9f1239; }
.tag-pendente { background: #fef9c3; color: #854d0e; }
.tag-em_andamento { background: var(--info-bg); color: var(--info-fg); }
.tag-concluido { background: var(--ok-bg); color: var(--ok-fg); }
.tag-cancelado { background: #e5e7eb; color: #374151; }
.tag-master { background: var(--primary); color: var(--secondary); }
.tag-admin { background: var(--surface-alt); color: var(--text-muted); }
.tag-ok { background: var(--ok-bg); color: var(--ok-fg); }
.tag-off { background: #e5e7eb; color: #374151; }

/* Ações rápidas na tabela de administradores */
.acoes-linha { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-sm {
  padding: 5px 10px; font-size: 11.5px; font-weight: 800;
  border-radius: 8px; border: 1.5px solid var(--border-color);
  background: var(--surface); color: var(--text-main);
  cursor: pointer; font-family: inherit; letter-spacing: 0.02em;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.btn-sm:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.btn-sm:disabled { opacity: 0.55; cursor: wait; }
.btn-sm.btn-danger { color: var(--err-fg); border-color: rgba(185, 28, 28, 0.35); }
.btn-sm.btn-danger:hover:not(:disabled) { background: var(--err-fg); border-color: var(--err-fg); color: #fff; }
/* Exportar para Excel (CSV) */
.btn-sm.btn-excel { color: #166534; border-color: rgba(22, 101, 52, 0.35); }
.btn-sm.btn-excel:hover:not(:disabled) { background: #166534; border-color: #166534; color: #fff; }
.tag-atraso {
  display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.04em; white-space: nowrap;
}
/* 1 a 5 dias: ainda dentro do prazo (verde) */
.tag-atraso.tag-atraso-baixo { background: var(--ok-bg, #dcfce7); color: var(--ok-fg, #15803d); }
/* 6 dias ou mais: atraso (vermelho) */
.tag-atraso.tag-atraso-alto { background: #fee2e2; color: #b91c1c; }

/* ---------------- AVISO DE PRAZO (dashboard) ---------------- */
.aviso-prazo {
  display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap;
  background: #fff7f7; border: 2px solid var(--err-fg); border-left-width: 8px;
  border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.aviso-prazo .alerta-icone { font-size: 26px; line-height: 1; }
.aviso-prazo .alerta-conteudo { flex: 1; min-width: 240px; }

/* ---------------- ALERTA DE ATRASO (6 dias ou mais) ---------------- */
.alerta-atraso {
  display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap;
  background: #fff7f7; border: 2px solid var(--err-fg); border-left-width: 8px;
  border-radius: var(--radius-lg); padding: 16px 18px; margin-bottom: 18px;
  box-shadow: var(--shadow-card);
}
.alerta-atraso .alerta-icone { font-size: 26px; line-height: 1; }
.alerta-atraso .alerta-conteudo { flex: 1; min-width: 240px; }
.alerta-atraso .alerta-titulo {
  display: block; font-size: 15px; font-weight: 800; color: #b91c1c;
  letter-spacing: -0.01em; margin-bottom: 4px;
}
.alerta-atraso .alerta-texto {
  font-size: 13.5px; font-weight: 800; color: #7f1d1d; margin-bottom: 8px;
}
.alerta-atraso .alerta-lista {
  list-style: none; display: flex; flex-direction: column; gap: 4px;
  font-size: 12.5px; color: var(--text-muted);
}
.alerta-atraso .alerta-lista li { padding-left: 18px; position: relative; }
.alerta-atraso .alerta-lista li::before {
  content: "•"; position: absolute; left: 6px; color: var(--err-fg); font-weight: 800;
}
.alerta-atraso .alerta-acoes { display: flex; align-items: center; }
.btn-alerta {
  background: #b91c1c; color: #fff; border: none; white-space: nowrap;
}
.btn-alerta:hover { background: #991b1b; }

/* ---------------- DASHBOARD ---------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 22px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px;
  border-radius: 999px; background: rgba(245, 184, 0, 0.12);
}
.kpi .rotulo { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.kpi .valor { font-size: 32px; font-weight: 800; letter-spacing: -0.03em; color: var(--primary); line-height: 1.1; }
.kpi .extra { font-size: 12.5px; color: var(--text-muted); font-weight: 600; }
.kpi.destaque { background: linear-gradient(140deg, var(--primary), #16345e); border-color: transparent; }
.kpi.destaque .rotulo { color: var(--secondary); }
.kpi.destaque .valor, .kpi.destaque .extra { color: #fff; }
.kpi.destaque::after { background: rgba(245, 184, 0, 0.22); }

.grade-graficos { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.grafico-card {
  background: var(--surface); border: 1px solid var(--border-color);
  border-radius: var(--radius-lg); padding: 20px 22px; box-shadow: var(--shadow-card);
}
.grafico-card h3 { font-size: 14.5px; font-weight: 800; margin-bottom: 14px; }
.barras { display: flex; flex-direction: column; gap: 12px; }
.barra-item { display: grid; grid-template-columns: 120px 1fr 46px; align-items: center; gap: 12px; }
.barra-item .nome { font-size: 13px; font-weight: 700; color: var(--text-main); }
.barra-track { height: 10px; background: var(--surface-alt); border-radius: 999px; overflow: hidden; }
.barra-fill { height: 100%; border-radius: 999px; transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1); }
.barra-item .qtd { font-size: 13px; font-weight: 800; color: var(--primary); text-align: right; }

.fill-montagem { background: #3b82f6; }
.fill-entrega { background: var(--secondary); }
.fill-assistencia { background: var(--tertiary); }

.lista-recente { display: flex; flex-direction: column; }
.lista-recente .linha {
  display: flex; align-items: center; gap: 12px; padding: 11px 0;
  border-bottom: 1px dashed var(--border-color); font-size: 13.5px;
}
.lista-recente .linha:last-child { border-bottom: none; }
.lista-recente .linha .quando { margin-left: auto; font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ---------------- GESTÃO DE ADMINISTRADORES ---------------- */
.form-admin { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-admin .full { grid-column: span 2; }
.form-admin .rodape { grid-column: span 2; display: flex; justify-content: flex-end; gap: 10px; }

/* ---------------- ESTADO VAZIO ---------------- */
.estado-vazio {
  text-align: center; padding: 48px 20px; color: var(--text-muted);
  background: var(--surface); border: 1.5px dashed var(--border-color);
  border-radius: var(--radius-lg);
}
.estado-vazio .emoji { font-size: 34px; display: block; margin-bottom: 10px; }

/* ---------------- AVISO EXCLUSÃO ---------------- */
.barra-excluir {
  display: none; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--primary); color: #fff; border-radius: var(--radius-md);
  padding: 12px 16px; margin-bottom: 14px;
}
.barra-excluir.ativa { display: flex; }
.barra-excluir strong { font-size: 14px; }

/* ---------------- RESPONSIVO ---------------- */
@media (max-width: 980px) {
  .sidebar {
    position: fixed; left: 0; top: 0; z-index: 200;
    transform: translateX(-100%); transition: transform 0.25s ease;
    box-shadow: var(--shadow-raised);
  }
  .sidebar.aberta { transform: none; }
  .topbar .menu-btn { display: inline-flex; }
  .backdrop {
    display: none; position: fixed; inset: 0; z-index: 150;
    background: rgba(5, 15, 34, 0.5);
  }
  .backdrop.ativo { display: block; }
  .form-admin { grid-template-columns: 1fr; }
  .form-admin .full, .form-admin .rodape { grid-column: span 1; }
}

@media (max-width: 640px) {
  .view { padding: 18px 14px 40px; }
  .topbar { padding: 14px 16px; }
  .topbar h1 { font-size: 17px; }
  .barra-item { grid-template-columns: 92px 1fr 40px; }
  .kpi .valor { font-size: 26px; }
}

/* ---------------- IMPRESSÃO ---------------- */
@media print {
  .sidebar, .topbar, .toolbar, .barra-excluir, .acoes-linha { display: none !important; }
  .view { padding: 0; }
}
