
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }

/* NAVBAR */
.navbar {
  background: #1a237e; color: #fff; display: flex; align-items: center;
  padding: 0 20px; height: 52px; gap: 16px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}
.nav-brand { font-size: 18px; font-weight: 700; margin-right: 16px; white-space: nowrap; color: #fff; text-decoration: none; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-link {
  color: rgba(255,255,255,0.8); text-decoration: none; padding: 6px 14px;
  border-radius: 6px; font-size: 13px; transition: all .2s;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,0.2); color: #fff; }
.nav-user { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.user-badge {
  padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
  text-transform: uppercase;
}
.user-admin { background: #ff6f00; }
.user-operador { background: #0277bd; }
.user-cliente { background: #2e7d32; }
.btn-logout {
  background: rgba(255,255,255,0.15); color: #fff; text-decoration: none;
  padding: 5px 12px; border-radius: 6px; font-size: 12px; transition: .2s;
}
.btn-logout:hover { background: rgba(255,0,0,0.4); }

/* CONTAINER */
.container { max-width: 1400px; margin: 0 auto; padding: 20px; }

/* PAGE HEADER */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-title { font-size: 22px; font-weight: 700; color: #1a237e; }
.projeto-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 980px;
}
.projeto-action-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.projeto-header-actions .btn,
.projeto-header-actions .psd-inteiro-toggle {
  min-height: 34px;
  white-space: nowrap;
}
.puxar-listas-box {
  max-height: 240px;
  overflow: auto;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.puxar-filtros {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
  text-align: left;
}
.puxar-listas-table-wrap {
  max-height: 300px;
  overflow: auto;
  border: 1px solid #d8def0;
  border-radius: 8px;
  margin-bottom: 16px;
}
.puxar-listas-table {
  width: 100%;
  border-collapse: collapse;
}
.puxar-listas-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #d9e8fb;
  color: #111827;
  font-weight: 800;
}
.puxar-listas-table td {
  padding: 10px 12px;
}
.puxar-lista-row {
  cursor: pointer;
}
.puxar-lista-row.active td {
  background: #eef2ff;
  color: #1a237e;
  font-weight: 800;
}
.puxar-lista-row:hover td {
  background: #f3f6ff;
}
.puxar-lista-card {
  border: 1px solid #d8def0;
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  color: #1f2937;
}
.puxar-lista-card strong {
  display: block;
  color: #1a237e;
  font-size: 14px;
}
.puxar-lista-card span {
  display: block;
  color: #667085;
  font-size: 12px;
  margin-top: 3px;
}
.puxar-lista-card:hover,
.puxar-lista-card.active {
  border-color: #1a237e;
  background: #eef2ff;
  box-shadow: inset 0 0 0 1px #1a237e;
}

/* CARD */
.card {
  background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  padding: 20px; margin-bottom: 16px;
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px;
  border: none; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: .2s;
}
.btn-primary { background: #1a237e; color: #fff; }
.btn-primary:hover { background: #283593; }
.btn-success { background: #2e7d32; color: #fff; }
.btn-success:hover { background: #388e3c; }
.btn-danger { background: #c62828; color: #fff; }
.btn-danger:hover { background: #d32f2f; }
.btn-warning { background: #e65100; color: #fff; }
.btn-warning:hover { background: #f57c00; }
.btn-secondary { background: #546e7a; color: #fff; }
.btn-secondary:hover { background: #607d8b; }
.btn-light { background: #e5e7eb; color: #111; }
.btn-light:hover { background: #d1d5db; }
.btn-outline { background: transparent; border: 1px solid #1a237e; color: #1a237e; }
.btn-outline:hover { background: #1a237e; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 10px 18px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.legacy-actions-hidden { display: none; }

/* INPUTS */
input[type=text], input[type=password], input[type=search], select, textarea {
  width: 100%; padding: 8px 12px; border: 1px solid #ccc; border-radius: 6px;
  font-size: 14px; outline: none; transition: .2s;
}
input:focus, select:focus, textarea:focus { border-color: #1a237e; box-shadow: 0 0 0 3px rgba(26,35,126,.1); }
label { font-size: 13px; font-weight: 600; margin-bottom: 4px; display: block; color: #555; }
.form-group { margin-bottom: 14px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }

/* TABLE */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  background: #1a237e; color: #fff; padding: 10px 12px; text-align: left;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.cadastro-table-wrap {
  max-height: calc(100vh - 230px);
  overflow: auto;
  position: relative;
}
.cadastro-table-wrap th {
  position: sticky;
  top: 0;
  z-index: 20;
}
td { padding: 8px 12px; border-bottom: 1px solid #eee; font-size: 13px; }
tr:hover td { background: #f5f7ff; }
tr.selected td { background: #e8eaf6; }
.acoes-cell {
  white-space: nowrap;
  min-width: 132px;
}
.acoes-cell .btn {
  margin-right: 4px;
  vertical-align: middle;
}
.lupa-cell {
  width: 42px;
  text-align: center;
  white-space: nowrap;
}

/* BADGES */
.badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600;
}
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-danger { background: #ffebee; color: #c62828; }
.badge-warning { background: #fff3e0; color: #e65100; }
.badge-info { background: #e3f2fd; color: #0277bd; }

/* ALERTS */
.alert {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 14px;
  font-size: 13px; display: flex; align-items: center; gap: 8px;
}
.alert-success { background: #e8f5e9; color: #1b5e20; border-left: 4px solid #2e7d32; }
.alert-danger { background: #ffebee; color: #b71c1c; border-left: 4px solid #c62828; }
.alert-info { background: #e3f2fd; color: #01579b; border-left: 4px solid #0277bd; }

/* MODAL */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 1000; align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 12px; padding: 24px; width: 500px; max-width: 95vw;
  max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 20px; color: #1a237e; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.modal-confirmacao { width: min(460px, 94vw); }
.confirm-icon {
  width: 52px; height: 52px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: #e8eaf6; color: #1a237e; font-size: 28px; font-weight: 800;
}
.modal-lista-gerar { width: min(980px, 96vw); }
#modal-lista-editar .modal-lista-gerar {
  width: min(1240px, 98vw);
}
.lista-preview-wrap { max-height: 55vh; overflow: auto; border: 1px solid #eee; border-radius: 8px; }
.lista-preview-wrap th {
  position: sticky;
  top: 0;
  z-index: 25;
}
.lista-preview-wrap th:nth-child(7),
.lista-preview-wrap td:nth-child(7) {
  min-width: 88px;
  white-space: nowrap;
}
.lista-preview-wrap td.desc-clickable,
#lista-editar-itens td.desc-clickable {
  min-width: 300px;
  max-width: 360px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#modal-lista-editar .lista-preview-wrap table {
  table-layout: fixed;
  min-width: 1120px;
}
#modal-lista-editar .lista-preview-wrap th:nth-child(1),
#modal-lista-editar .lista-preview-wrap td:nth-child(1) { width: 38px; }
#modal-lista-editar .lista-preview-wrap th:nth-child(2),
#modal-lista-editar .lista-preview-wrap td:nth-child(2) { width: 58px; }
#modal-lista-editar .lista-preview-wrap th:nth-child(3),
#modal-lista-editar .lista-preview-wrap td:nth-child(3) { width: 50px; }
#modal-lista-editar .lista-preview-wrap th:nth-child(4),
#modal-lista-editar .lista-preview-wrap td:nth-child(4) { width: 88px; }
#modal-lista-editar .lista-preview-wrap th:nth-child(5),
#modal-lista-editar .lista-preview-wrap td:nth-child(5) { width: 340px; }
#modal-lista-editar .lista-preview-wrap th:nth-child(6),
#modal-lista-editar .lista-preview-wrap td:nth-child(6) { width: 110px; }
#modal-lista-editar .lista-preview-wrap th:nth-child(7),
#modal-lista-editar .lista-preview-wrap td:nth-child(7) { width: 300px; }
#modal-lista-editar .lista-preview-wrap th:nth-child(8),
#modal-lista-editar .lista-preview-wrap td:nth-child(8) {
  width: 110px;
  white-space: nowrap;
}
#modal-lista-editar .lista-preview-wrap th:nth-child(9),
#modal-lista-editar .lista-preview-wrap td:nth-child(9) {
  width: 96px;
  white-space: nowrap;
}
.btn-gerar-grande {
  min-width: 260px; justify-content: center; padding: 14px 24px; font-size: 17px;
  border-radius: 10px; box-shadow: 0 8px 20px rgba(46,125,50,.25);
}
.placa-formatos {
  margin-top: 18px; padding: 14px; border: 1px solid #e5e7eb; border-radius: 10px;
  display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); gap: 10px; align-items: center;
  background: #fafafa;
}
.placa-formatos-titulo { grid-column: 1 / -1; font-weight: 800; color: #1a237e; margin-bottom: 2px; }
.placa-opcao {
  border: 2px solid #e5e7eb; background: #fff; border-radius: 10px; padding: 12px 14px;
  cursor: pointer; display: flex; gap: 8px; align-items: center; justify-content:center; font-weight: 800; color: #333;
}
.placa-opcao input { display: none; }
.placa-opcao.active { border-color: #1a237e; background: #eef2ff; color: #1a237e; }
#lista-qtd-multiplo-wrap input { width: 90px; margin-top: 4px; }
.data-tipos { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tipo-data-btn {
  border: 1px solid currentColor;
  background: #fff;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.tipo-data-btn[data-tipo="periodo"] { color: #1a237e; }
.tipo-data-btn[data-tipo="dia"] { color: #2e7d32; }
.tipo-data-btn[data-tipo="apartir"] { color: #ef6c00; }
.tipo-data-btn[data-tipo="ate"] { color: #8e24aa; }
.tipo-data-btn.active { color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.14); }
.tipo-data-btn[data-tipo="periodo"].active { background: #1a237e; border-color: #1a237e; }
.tipo-data-btn[data-tipo="dia"].active { background: #2e7d32; border-color: #2e7d32; }
.tipo-data-btn[data-tipo="apartir"].active { background: #ef6c00; border-color: #ef6c00; }
.tipo-data-btn[data-tipo="ate"].active { background: #8e24aa; border-color: #8e24aa; }
.cal-resultado-box {
  background: #f5f7ff;
  border: 1px solid #e8eaf6;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 14px;
  text-align: center;
}
.cal-resultado-box #cal-resultado {
  display: inline-block;
  max-width: 100%;
  font-size: 13px !important;
  line-height: 1.35;
}
.cal-resultado-box[data-tipo="periodo"] { background: #f5f7ff; border-color: #c5cae9; }
.cal-resultado-box[data-tipo="periodo"] #cal-resultado { color: #1a237e !important; }
.cal-resultado-box[data-tipo="dia"] { background: #f1f8f1; border-color: #c8e6c9; }
.cal-resultado-box[data-tipo="dia"] #cal-resultado { color: #2e7d32 !important; }
.cal-resultado-box[data-tipo="apartir"] { background: #fff8ee; border-color: #ffe0b2; }
.cal-resultado-box[data-tipo="apartir"] #cal-resultado { color: #ef6c00 !important; }
.cal-resultado-box[data-tipo="ate"] { background: #fbf0fd; border-color: #e1bee7; }
.cal-resultado-box[data-tipo="ate"] #cal-resultado { color: #8e24aa !important; }

/* SEARCH BAR */
.search-bar { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-end; }
.search-bar input { max-width: 340px; }

/* TOOLBAR */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }

/* LOGIN */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a237e 0%, #283593 50%, #3949ab 100%);
}
.login-card {
  background: #fff; border-radius: 16px; padding: 40px 36px; width: 380px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo h1 { font-size: 28px; font-weight: 800; color: #1a237e; }
.login-logo p { color: #888; font-size: 13px; margin-top: 4px; }
.login-card .form-group { margin-bottom: 18px; }
.login-card .btn { width: 100%; justify-content: center; padding: 11px; font-size: 15px; }

/* DASHBOARD CARDS */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.dash-card {
  background: #fff; border-radius: 12px; padding: 24px 20px; text-align: center;
  text-decoration: none; color: #333; box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: .2s; border: 2px solid transparent;
}
.dash-card:hover { border-color: #1a237e; transform: translateY(-2px); }
.dash-card .icon { font-size: 40px; margin-bottom: 12px; }
.dash-card .label { font-size: 15px; font-weight: 700; color: #1a237e; }
.dash-card .desc { font-size: 12px; color: #888; margin-top: 4px; }

/* CHECKBOX */
.cb-col { width: 36px; text-align: center; }
input[type=checkbox] { width: 16px; height: 16px; cursor: pointer; }

/* PRODUTO IMG */
.prod-img { width: 40px; height: 40px; object-fit: contain; border-radius: 4px; border: 1px solid #eee; }
.img-clickable { cursor: zoom-in; transition: transform .15s, box-shadow .15s; }
.img-clickable:hover { transform: scale(1.12); box-shadow: 0 2px 8px rgba(0,0,0,.2); }
.no-img { width: 40px; height: 40px; background: #eee; border-radius: 4px; display: inline-flex; align-items: center; justify-content: center; color: #bbb; font-size: 18px; }
.desc-clickable { cursor: zoom-in; color: #111827; }
.desc-clickable:hover { color: #1a237e; text-decoration: underline; }
input.valor-inline[type=text] {
  width: 86px;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid #cfd6e4;
  border-radius: 6px;
  font-weight: 700;
  text-align: right;
}
input.valor-inline[type=text]:focus {
  border-color: #1a237e;
  box-shadow: 0 0 0 3px rgba(26,35,126,.1);
}
input.data-inline[type=text] {
  min-width: 260px;
  padding: 6px 8px;
  border: 1px solid #cfd6e4;
  border-radius: 6px;
  font-size: 12px;
}
input.data-inline[type=text]:focus {
  border-color: #1a237e;
  box-shadow: 0 0 0 3px rgba(26,35,126,.1);
}
.placas-table-wrap {
  max-height: 52vh;
  overflow: auto;
}
.lista-origem-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: #1a237e;
  color: #fff;
  border-radius: 5px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  min-width: 72px;
  white-space: nowrap;
}
.lista-origem-badge.static {
  cursor: default;
}
.lista-preview-wrap .lista-origem-badge.static {
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  min-width: 72px;
}
.lista-cor-azul { background: #1a237e; color: #fff; }
.lista-cor-verde { background: #2e7d32; color: #fff; }
.lista-cor-laranja { background: #e65100; color: #fff; }
.lista-cor-roxo { background: #6a1b9a; color: #fff; }
.lista-cor-vermelho { background: #c62828; color: #fff; }
.lista-cor-ciano { background: #006064; color: #fff; }
.filtro-grupo-lista {
  margin-top: 12px;
  padding: 10px 12px;
  background: #f1f8e9;
  border: 1px solid #a5d6a7;
  border-radius: 8px;
  color: #1b5e20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.linha-grupo-lista-ativa {
  background: #f6fff2;
}
.lista-edit-data {
  min-width: 260px;
  font-size: 12px !important;
}

.modal-imagem-produto { width: min(860px, 94vw); }
.imagem-produto-box {
  min-height: 420px; max-height: 72vh; display: flex; align-items: center; justify-content: center;
  background: #f6f7fb; border: 1px solid #e5e7eb; border-radius: 10px; padding: 18px;
}
.imagem-produto-box img { max-width: 100%; max-height: 68vh; object-fit: contain; }

.busca-produto-row {
  padding: 9px 14px; cursor: pointer; border-bottom: 1px solid #f0f0f0;
  display: grid; grid-template-columns: 36px minmax(0, 1fr) 96px; gap: 12px; align-items: center;
}
.busca-produto-row-projeto { grid-template-columns: 24px 36px minmax(0, 1fr); }
.busca-fila-info {
  font-size: 13px; color: #111827; margin-bottom: 12px;
}
.busca-fila-card {
  margin-top: 8px; padding: 10px; border: 1px solid #222; background: #fff;
  line-height: 1.4;
}
.busca-produto-row-lote { grid-template-columns: auto 36px minmax(0, 1fr) 96px; }
.busca-produto-marcado { background: #e8f5e9 !important; box-shadow: inset 4px 0 0 #2e7d32; }
.busca-marcar { width: 32px; height: 32px; justify-content: center; padding: 0; font-size: 16px; }
.busca-produto-info { min-width: 0; }
.busca-produto-info div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.busca-ver-img { justify-content: center; padding: 6px 8px; }
.busca-selecionados {
  margin: -2px 0 12px; padding: 10px; border: 1px solid #c8e6c9; border-radius: 8px;
  background: #f1f8e9;
}
.busca-selecionados-title { font-size: 12px; font-weight: 800; color: #2e7d32; margin-bottom: 8px; }
.busca-selecionados-list { display: flex; flex-wrap: wrap; gap: 6px; }
.busca-chip {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%;
  background: #fff; border: 1px solid #a5d6a7; color: #1b5e20; border-radius: 999px;
  padding: 4px 6px 4px 10px; font-size: 12px;
}
.busca-chip span { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.busca-chip em { font-style: normal; font-weight: 800; color: #1a237e; }
.busca-chip button {
  border: none; background: #2e7d32; color: #fff; border-radius: 50%; width: 20px; height: 20px;
  cursor: pointer; line-height: 1; font-weight: 800;
}
.busca-lote-tools { margin: 8px 0 10px; padding: 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fafafa; }
.busca-lote-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.busca-listas-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.busca-lista-tab {
  border: 1px solid #cfd6e4; background: #fff; color: #1a237e; border-radius: 8px;
  padding: 8px 10px; display: inline-flex;
  align-items: center; gap: 6px; cursor: pointer; font-weight: 800;
}
.busca-lista-tab.active { border-color: #1a237e; background: #eef2ff; box-shadow: 0 2px 8px rgba(26,35,126,.12); }
.busca-lista-tab small { color: #e65100; font-weight: 900; }
.busca-lista-tab.active small { color: #2e7d32; }

.lista-contadores {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 12px;
}
.lista-contador-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid #1a237e;
  border-radius: 8px;
  background: #eef2ff;
  color: #1a237e;
  cursor: pointer;
  font-weight: 900;
}
.lista-contador-badge span {
  color: #2e7d32;
  font-weight: 900;
}
.lista-contador-badge:hover {
  background: #dbe4ff;
  box-shadow: 0 2px 8px rgba(26,35,126,.14);
}
.lista-contador-badge.lista-sem-grupo {
  border-color: #777;
  background: #f5f5f5;
  color: #555;
}
.produto-sem-cadastro-box { display: flex; gap: 8px; margin-top: 8px; align-items: center; }
.produto-sem-cadastro-box input { flex: 1; }

/* PROJETOS */
.projeto-workspace { padding: 0; overflow: hidden; }
.projeto-tabs {
  display: flex; gap: 0; align-items: flex-end; padding: 10px 12px 0;
  background: #edf3f8; border-bottom: 1px solid #cfd8dc;
  overflow-x: auto;
}
.projeto-tab {
  border: 1px solid #9aa9b5; border-bottom: 0; background: #e5e7eb; color: #111827;
  padding: 10px 14px; font-weight: 800; cursor: pointer; min-width: 112px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  white-space: nowrap;
  position: relative;
}
.projeto-tab.active { background: #10b981; color: #fff; border-color: #10b981; }
.projeto-tab-close {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  position: absolute; right: 6px; top: 5px; z-index: 10;
  background: #ef4444; color: #fff;
  border: 1px solid rgba(255,255,255,.9);
  box-shadow: 0 2px 6px rgba(127,29,29,.25);
  font-size: 12px; line-height: 1; font-weight: 900;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.projeto-tab.active .projeto-tab-close {
  background: #dc2626; color: #fff;
}
.projeto-tab-close:hover {
  background: #b91c1c; color: #fff; transform: scale(1.12);
  box-shadow: 0 3px 9px rgba(127,29,29,.35);
}
.psd-inteiro-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  height: 31px; padding: 0 10px; border: 1px solid #cfd8dc;
  background: #f3f4f6; color: #111; border-radius: 2px;
  font-size: 12px; font-weight: 700; cursor: pointer; user-select: none;
}
.psd-inteiro-toggle input {
  width: 14px; height: 14px; margin: 0; accent-color: #1a237e;
}
.psd-inteiro-toggle.active {
  border-color: #1a237e; background: #e8eaf6; color: #1a237e;
}
.modal-salvar-projeto {
  width: min(760px, 96vw);
  padding: 34px 28px 30px;
  position: relative;
}
.modal-close-x {
  position: absolute; right: 14px; top: 12px;
  width: 30px; height: 30px; border: 0; border-radius: 50%;
  background: transparent; color: #777; font-size: 24px; line-height: 1;
  cursor: pointer;
}
.modal-close-x:hover { background: #f3f4f6; color: #c62828; }
.salvar-projeto-title {
  text-align: center; color: #064e3b; font-size: 25px; font-weight: 900;
  margin: 4px 0 34px;
}
.salvar-projeto-section-title {
  color: #1f2937; font-size: 18px; font-weight: 900; margin-bottom: 26px;
}
.salvar-clientes-grid {
  display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 12px 16px; margin-bottom: 28px;
}
.salvar-cliente-btn {
  min-height: 56px; border: 1px solid #111; background: #e5e5e5;
  color: #111; font-size: 14px; font-weight: 900; cursor: pointer;
  text-transform: uppercase;
}
.salvar-cliente-btn:hover,
.salvar-cliente-btn.active {
  background: #dbeafe; border-color: #1a237e; color: #1a237e;
  box-shadow: inset 0 0 0 2px #1a237e;
}
.salvar-cliente-selecionado {
  display: grid; grid-template-columns: 180px 1fr; align-items: center;
  gap: 4px; margin: 14px 0 28px;
}
.salvar-cliente-selecionado strong { color: #1f2937; font-size: 15px; }
#salvar-cliente-atual {
  min-height: 34px; display: flex; align-items: center; justify-content: center;
  background: #e5e5e5; border-top: 2px solid #111; font-weight: 900;
}
.salvar-projeto-admin-note {
  color: #4b5563; font-size: 13px; font-weight: 700; margin-bottom: 18px;
}
.salvar-projeto-data {
  text-align: center; color: #666; font-style: italic; margin: 22px 0 34px;
}
.salvar-projeto-actions {
  display: flex; justify-content: flex-end; gap: 10px;
}
.btn-salvar-projeto,
.btn-cancelar-projeto {
  min-width: 170px; height: 54px; justify-content: center; border-radius: 0;
  font-size: 15px; font-weight: 900;
}
.salvar-sem-clientes {
  grid-column: 1 / -1; padding: 22px; text-align: center;
  color: #777; background: #f8fafc; border: 1px dashed #cbd5e1;
}
.projeto-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 12px; background: #edf3f8; border-bottom: 1px solid #d5dde5;
}
.projeto-create-layouts {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px; background: #fff; border-bottom: 1px solid #d5dde5;
}
.projeto-create-layouts input { max-width: 260px; }
.projeto-toolbar label { margin: 0; color: #111827; }
.projeto-table-wrap {
  max-height: calc(100vh - 250px);
  overflow: auto;
}
.projeto-table { min-width: 1500px; }
.projeto-table th {
  position: sticky;
  top: 0;
  z-index: 30;
}
.projeto-table td { vertical-align: middle; }
.projeto-table input[type=text],
.projeto-table input:not([type]) {
  height: 30px; padding: 4px 6px; border-radius: 0; font-size: 13px;
}
.projeto-table .valor-inline { max-width: 120px; }
.projeto-table .f-desc { min-width: 360px; width: 100%; }
.projeto-icon-btn { width: 34px; min-width: 34px; padding: 5px 0; justify-content: center; }
.projeto-num-btn {
  border: 0; background: transparent; color: #667085; cursor: pointer;
  font-size: 12px; padding: 4px 2px; white-space: nowrap;
}
.projeto-num-btn:hover { color: #1a237e; text-decoration: underline; }
.projeto-table tr.projeto-linha-nao-cadastrada td {
  background: #ffe3e3;
}
.projeto-table tr.projeto-linha-nao-cadastrada:hover td {
  background: #ffd1d1;
}
.modal-mover-linha { width: min(460px, 94vw); }
.projeto-img-btn {
  border: 0; background: transparent; color: #bbb; width: 30px; height: 30px;
  cursor: default; font-size: 16px;
}
.projeto-img-btn.on { color: #111827; cursor: pointer; }

/* SPINNER */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid #ccc; border-top-color: #1a237e; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* EMPTY STATE */
.empty-state { text-align: center; padding: 48px 20px; color: #aaa; }
.empty-state .icon { font-size: 52px; margin-bottom: 12px; }
.empty-state p { font-size: 15px; }

/* PERMISSIONS CHECKBOXES */
.perm-list { display: flex; flex-wrap: wrap; gap: 10px; }
.perm-item { display: flex; align-items: center; gap: 6px; background: #f5f5f5; padding: 6px 12px; border-radius: 6px; font-size: 13px; }
.perm-item input { width: auto; }

/* TOAST */
#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: #323232; color: #fff; padding: 12px 20px; border-radius: 8px;
  font-size: 14px; display: none; box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  max-width: 320px;
}
#toast.success { background: #2e7d32; }
#toast.error { background: #c62828; }

@media (max-width: 768px) {
  .navbar { flex-wrap: wrap; height: auto; padding: 8px 12px; }
  .nav-links { order: 3; width: 100%; }
  .container { padding: 10px; }
  .form-row { flex-direction: column; }
}
