body { font-family: 'Segoe UI', Arial; margin: 0; background:#f5f7fa; }
header { background: linear-gradient(90deg,#1f4aa8,#3c7be0); color:#fff; padding:12px 30px; display:flex; justify-content:space-between; align-items:center; }
.brand { display:flex; align-items:center; gap:12px; }
.brand img { height:38px; }
.brand-name { font-size:18px; font-weight:600; }
nav { display:flex; align-items:center; gap:20px; }
nav a { color:#fff; text-decoration:none; }
.user-info { display:flex; align-items:center; gap:15px; }
.logout { background:rgba(255,255,255,0.2); padding:6px 12px; border-radius:6px; cursor:pointer; }

.notifications-wrap { position:relative; }
.notifications-bell {
  position:relative;
  width:42px;
  height:42px;
  padding:0;
  border-radius:999px;
  background:rgba(255,255,255,0.18);
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.notifications-bell:hover { background:rgba(255,255,255,0.26); }
.notifications-bell-icon { font-size:18px; line-height:1; }
.notifications-badge {
  position:absolute;
  top:-4px;
  right:-4px;
  min-width:20px;
  height:20px;
  padding:0 5px;
  border-radius:999px;
  background:#dc3545;
  color:#fff;
  font-size:11px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  box-shadow:0 4px 12px rgba(0,0,0,0.18);
}
.notifications-panel {
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  width:360px;
  max-width:min(360px, calc(100vw - 30px));
  background:#fff;
  color:#0f172a;
  border-radius:14px;
  box-shadow:0 18px 40px rgba(15,23,42,0.18);
  border:1px solid #dbe4f0;
  overflow:hidden;
  z-index:1000;
}
.notifications-panel-head {
  padding:14px 16px;
  border-bottom:1px solid #e5e7eb;
  background:#f8fafc;
}
.notifications-panel-head strong { display:block; margin-bottom:3px; }
.notifications-panel-head small { color:#64748b; }

.notifications-panel-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.notifications-panel-head button { flex-shrink:0; }
.notification-history-modal { width:min(900px, 100%); }
.notification-history-list {
  display:flex;
  flex-direction:column;
  gap:12px;
  max-height:min(70vh, 640px);
  overflow:auto;
}
.notification-history-item {
  border:1px solid #e2e8f0;
  border-radius:14px;
  padding:14px 16px;
  background:#fff;
}
.notification-history-item.is-unread { background:#eef5ff; border-color:#bfdbfe; }
.notification-history-meta {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:8px;
}
.notification-history-meta strong { font-size:14px; color:#0f172a; }
.notification-history-meta span { font-size:12px; color:#64748b; white-space:nowrap; }
.notification-history-body { font-size:13px; line-height:1.5; color:#334155; }
.notification-history-status {
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:10px;
  font-size:12px;
  color:#64748b;
}
.notification-history-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:12px;
}
.notification-history-empty { color:#64748b; padding:8px 0; }
.notifications-empty {
  padding:18px 16px;
  color:#64748b;
}
.notifications-list {
  max-height:380px;
  overflow:auto;
}
.notification-item {
  padding:14px 16px;
  border-top:1px solid #eef2f7;
}
.notification-item.is-unread { background:#eef5ff; }
.notification-item.is-read { background:#fff; }
.notification-item-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:8px;
}
.notification-item-head strong { font-size:14px; color:#0f172a; }
.notification-item-head span { font-size:12px; color:#64748b; white-space:nowrap; }
.notification-item-body {
  font-size:13px;
  line-height:1.45;
  color:#334155;
}
.notification-item-actions {
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.service-meta-helper {
  display:block;
  margin-top:4px;
  margin-bottom:8px;
  color:#475569;
}
.service-responsavel-select {
  font-size:13px;
  padding:8px 10px;
  min-height:38px;
}
.container { padding:30px 30px 140px; }
table { width:100%; border-collapse:collapse; background:#fff; }
th, td { padding:12px; border-bottom:1px solid #eee; }
th { background:#f0f2f5; }
th.sortable { cursor:pointer; user-select:none; white-space:nowrap; }
th.sortable:hover { background:#e4ebf7; }
th.sortable.sorted { color:#1f4aa8; }
.sort-indicator { display:inline-block; margin-left:6px; font-size:12px; opacity:0.8; }
tbody tr { cursor:pointer; transition: background-color 0.2s ease; }
tbody tr:hover { background:#e6f0ff; box-shadow: inset 0 0 0 9999px rgba(60,123,224,0.08); }
.form-box { background:#fff; padding:25px; border-radius:12px; max-width:900px; margin:auto; box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.form-grid { display:grid; grid-template-columns: repeat(2, 1fr); gap:18px; }
.form-group { display:flex; flex-direction:column; }
.form-group-full { grid-column: 1 / -1; }
label { font-size:14px; font-weight:600; color:#333; margin-bottom:6px; }
input, select, textarea { width:100%; padding:10px; border:1px solid #d5d9e0; border-radius:8px; box-sizing:border-box; font-family:inherit; }
textarea { min-height:100px; resize:vertical; }
button { padding:10px 16px; background:#2b5fad; color:#fff; border:none; cursor:pointer; border-radius:8px; }
.hidden { display:none; }
.center { text-align: center; }
.page-title { margin-top:0; margin-bottom:20px; color:#1f2d3d; }
.actions { display:flex; gap:12px; margin-top:22px; }
.btn-secondary { background:#6c757d; }
.btn-warning { background:#dc3545; }
.status { padding:6px 10px; border-radius:999px; color:#fff; font-size:12px; font-weight:600; display:inline-block; }
.ainiciar { background:#6c757d; }
.andamento { background:#f0ad4e; }
.concluido { background:#28a745; color:#fff; }
.cancelada { background:#dc3545; }
.status-taxas { color:#0f172a; background:#e2e8f0; }
.status-taxas.em-dia { background:#dcfce7; color:#166534; }
.status-taxas.sem-taxas { background:#e5e7eb; color:#374151; }
.status-taxas.com-pendencia { background:#fee2e2; color:#991b1b; }
.status-taxas.com-pendencia-pagamento { background:#fee2e2; color:#991b1b; }
.status-taxas.com-pendencia-vencida { background:#fee2e2; color:#991b1b; }

#home .info-card { overflow-x:auto; }
#home table {
  table-layout: fixed;
  min-width: 1340px;
}
#home th,
#home td {
  vertical-align: middle;
}
#home th:nth-child(1),
#home td:nth-child(1) { width: 6%; }
#home th:nth-child(2),
#home td:nth-child(2) { width: 7%; }
#home th:nth-child(3),
#home td:nth-child(3) { width: 14%; }
#home th:nth-child(4),
#home td:nth-child(4) { width: 7%; }
#home th:nth-child(5),
#home td:nth-child(5) { width: 17%; }
#home th:nth-child(6),
#home td:nth-child(6) { width: 16%; }
#home th:nth-child(7),
#home td:nth-child(7) { width: 9%; }
#home th:nth-child(8),
#home td:nth-child(8) { width: 8%; }
#home th:nth-child(9),
#home td:nth-child(9) { width: 8%; }
#home th:nth-child(10),
#home td:nth-child(10) { width: 5%; }
#home th:nth-child(11),
#home td:nth-child(11) { width: 3%; }
#home td.cell-cliente,
#home td.cell-obra,
#home td.cell-setor {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#home td.cell-acoes,
#home td.cell-data,
#home td.cell-progresso,
#home td.cell-numero,
#home td.cell-numero-obra,
#home td.cell-numero-cliente {
  white-space: nowrap;
}
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  white-space: nowrap;
  line-height: 1;
}
#home .btn-editar-os {
  background: transparent;
  color: #1f4aa8;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.info-card { background:#fff; padding:20px; border-radius:12px; box-shadow: 0 6px 18px rgba(0,0,0,0.06); }
.checkbox-group { display:grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap:12px 18px; margin-top:4px; }
.checkbox-item { display:flex; align-items:center; gap:8px; font-weight:500; margin-bottom:0; }
.services-panel { margin-top:24px; padding-top:24px; border-top:1px solid #e5e7eb; }
.services-panel.hidden { display:none; }
.services-row { display:grid; grid-template-columns: 220px 1fr 56px; gap:12px; align-items:start; }
.services-row > .form-group { align-self:start; }
.services-list { margin-top:18px; display:flex; flex-direction:column; gap:12px; }
.service-picker-group { min-width:0; }
.service-picker { position:relative; width:100%; }
.service-picker-button {
  width:100%;
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:10px 14px;
  border:1px solid #cfd7e3;
  border-radius:10px;
  background:#fff;
  color:#0f172a;
  text-align:left;
}
.service-picker-button:hover { border-color:#9fb2cb; }
.service-picker.is-open .service-picker-button,
.service-picker:focus-within .service-picker-button { border-color:#2b5fad; box-shadow:0 0 0 3px rgba(43,95,173,0.14); }
#servico_picker_label { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.service-picker-arrow { flex:0 0 auto; font-size:12px; color:#475569; }
.service-picker-dropdown {
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  right:0;
  z-index:30;
  background:#fff;
  border:1px solid #cfd7e3;
  border-radius:12px;
  box-shadow:0 18px 40px rgba(15,23,42,0.16);
  overflow:hidden;
}
.service-picker-status {
  padding:10px 12px;
  font-size:12px;
  color:#64748b;
  background:#f8fafc;
  border-bottom:1px solid #e2e8f0;
}
.service-picker-options { max-height:260px; overflow:auto; padding:6px; }
.service-picker-option {
  width:100%;
  border:none;
  background:#fff;
  color:#0f172a;
  text-align:left;
  border-radius:10px;
  padding:10px 12px;
  cursor:pointer;
  display:block;
}
.service-picker-option:hover,
.service-picker-option.is-active { background:#eef4ff; }
.service-picker-option.is-selected { background:#e6eefc; font-weight:600; }
.service-picker-empty { padding:12px; color:#64748b; font-size:14px; }
.service-item { display:grid; grid-template-columns: 120px 1fr 180px 44px; gap:12px; align-items:center; padding:14px 16px; background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%); border:1px solid #dbe3ee; border-radius:14px; box-shadow: 0 4px 14px rgba(15,23,42,0.06); }
.service-pill { display:inline-flex; align-items:center; justify-content:center; padding:6px 10px; border-radius:999px; font-size:12px; font-weight:700; }
.service-name { font-weight:600; color:#1f2937; }
.service-meta { font-size:13px; color:#475569; }
.service-actions { display:flex; justify-content:flex-end; }
.btn-icon { padding:10px 0; font-size:20px; line-height:1; margin-top:28px; }
.btn-danger { background:#fff; color:#dc3545; border:1px solid #f1c5cb; width:36px; height:36px; border-radius:999px; padding:0; font-size:18px; display:inline-flex; align-items:center; justify-content:center; }
.btn-icon-only { font-size:16px; line-height:1; flex:0 0 36px; }
.btn-danger:hover { background:#fff5f5; }
.services-empty { color:#64748b; font-size:14px; padding:14px 6px; background:#f8fafc; border:1px dashed #d7e0ea; border-radius:12px; }
.progress-card { background:#fff; padding:18px 20px; border-radius:12px; box-shadow: 0 6px 18px rgba(0,0,0,0.06); margin-bottom:20px; }
.progress-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.progress-track { width:100%; height:14px; background:#e2e8f0; border-radius:999px; overflow:hidden; }
.progress-fill { height:100%; width:0%; background:linear-gradient(90deg,#1f4aa8,#3c7be0); border-radius:999px; transition:width 0.3s ease; }
.setor-group { margin-bottom:18px; }
.setor-header { display:inline-block; padding:8px 14px; border-radius:999px; color:#fff; font-weight:700; margin-bottom:10px; }
.setor-ambiental { background:rgba(46,125,50,0.58); }
.setor-florestal { background:rgba(101,67,33,0.58); }
.setor-infraestrutura { background:rgba(21,101,192,0.58); }
.setor-topografia { background:rgba(239,108,0,0.58); }
.acompanhamento-card { display:grid; grid-template-columns: 1fr 180px 160px; gap:12px; align-items:center; padding:14px 16px; background:#fff; border:1px solid #dbe3ee; border-radius:14px; box-shadow: 0 4px 14px rgba(15,23,42,0.05); margin-bottom:10px; }
.resumo-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:14px; }
.resumo-item { background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:14px; }
.resumo-item strong { display:block; color:#475569; font-size:12px; margin-bottom:6px; text-transform:uppercase; }
.resumo-item span { color:#0f172a; font-weight:600; }

.history-actions { display:flex; justify-content:flex-end; gap:12px; margin-top:16px; }
.history-header { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.history-list { display:flex; flex-direction:column; gap:12px; }
.history-item { background:#f8fafc; border:1px solid #e2e8f0; border-radius:12px; padding:14px; }
.history-title { font-weight:700; color:#0f172a; margin-bottom:6px; }
.history-note { color:#475569; font-size:14px; white-space:pre-wrap; }
.history-empty { color:#64748b; font-size:14px; padding:14px 6px; background:#f8fafc; border:1px dashed #d7e0ea; border-radius:12px; }

.history-title { white-space: pre-wrap; }
.history-observation-box { margin-top: 10px; padding: 12px; border: 1px solid #dbeafe; border-left: 4px solid #2563eb; background: rgba(37, 99, 235, 0.06); border-radius: 10px; }
.history-observation-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: #1d4ed8; margin-bottom: 6px; }
.history-observation-text { color: #334155; font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.history-observation-text.is-empty { color: #64748b; font-style: italic; }
.history-item-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.btn-small { padding: 8px 12px; font-size: 13px; }


.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 9999;
}

.modal-content {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
}

.modal-close {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  background: #eef2ff;
  color: #1e3a8a;
}

.modal-body {
  padding: 16px 20px;
}

.modal-observacao textarea {
  min-height: 160px;
  resize: vertical;
  white-space: pre-wrap;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 20px 20px;
}


.history-list {
  position: relative;
  gap: 18px;
}

.history-item {
  position: relative;
  display: grid;
  grid-template-columns: 26px 1fr;
  column-gap: 14px;
  background: transparent;
  border: 0;
  padding: 0;
}

.history-line {
  position: absolute;
  left: 12px;
  top: 0;
  bottom: -18px;
  width: 2px;
  background: linear-gradient(180deg, #bfdbfe 0%, #dbeafe 100%);
}

.history-item:last-child .history-line {
  bottom: 24px;
}

.history-dot {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  margin: 10px 0 0 5px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.12);
}

.history-card {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
}

.history-title {
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
  white-space: normal;
}

.history-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-detail-row {
  color: #334155;
  font-size: 14px;
  line-height: 1.45;
}

.history-detail-label {
  font-weight: 700;
  color: #0f172a;
}

.history-change-row {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 10px 12px;
}

.history-change-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #475569;
  margin-bottom: 6px;
}

.history-change-values {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.history-change-from,
.history-change-to {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 13px;
  line-height: 1.2;
}

.history-change-from {
  background: #fee2e2;
  color: #991b1b;
}

.history-change-to {
  background: #dcfce7;
  color: #166534;
}

.history-change-arrow {
  font-size: 16px;
  font-weight: 700;
  color: #2563eb;
}

.history-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
}


.import-folder-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(37,99,235,0.08) 0%, rgba(37,99,235,0.03) 100%);
}

.import-folder-bar strong {
  display: block;
  color: #0f172a;
  margin-bottom: 4px;
}

.import-folder-bar span {
  display: block;
  color: #475569;
  font-size: 14px;
}

.import-folder-hint {
  display: block;
  margin-top: 6px;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
}

.import-folder-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-outline {
  background: #fff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.btn-outline:hover {
  background: #eff6ff;
}

.modal-folder-import {
  width: min(860px, 100%);
}

.folder-import-summary {
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%);
  color: #334155;
  font-size: 14px;
  line-height: 1.5;
}

.folder-import-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.folder-import-search {
  flex: 1;
}

.folder-import-count {
  min-width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.folder-options-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  max-height: 420px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.folder-option {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #fff;
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background-color .15s ease;
}

.folder-option:hover {
  background: #f8fbff;
  border-color: #93c5fd;
  transform: translateY(-1px);
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.10);
}

.folder-option.is-selected {
  background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
  border-color: #3b82f6;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.16);
}

.folder-option-code {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #2563eb;
}

.folder-option-name {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 700;
}

.folder-option-folder {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  color: #64748b;
}

.folder-option-check {
  align-self: flex-end;
  margin-top: auto;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.folder-option.is-selected .folder-option-check {
  background: #2563eb;
  color: #fff;
}

.folder-import-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e2e8f0;
}

.folder-import-selected {
  color: #334155;
  font-size: 14px;
}

.folder-import-selected strong {
  color: #0f172a;
}

.folder-empty-state {
  grid-column: 1 / -1;
  padding: 18px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  background: #f8fafc;
  color: #64748b;
}


.geo-card {
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: linear-gradient(180deg, #f8fbff 0%, #f1f7ff 100%);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.geo-card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.geo-card-head strong {
  display: block;
  color: #0f172a;
  margin-bottom: 6px;
}

.geo-card-head p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.geo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.geo-badge.is-empty {
  background: #e2e8f0;
  color: #334155;
}

.geo-badge.is-point {
  background: #dbeafe;
  color: #1d4ed8;
}

.geo-badge.is-polygon {
  background: #ede9fe;
  color: #6d28d9;
}

.geo-card-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.geo-detail-item {
  background: rgba(255,255,255,0.86);
  border: 1px solid #dbeafe;
  border-radius: 12px;
  padding: 12px 14px;
  min-width: 0;
}

.geo-detail-item-full {
  grid-column: 1 / -1;
}

.geo-detail-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
}

.geo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.geo-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.resumo-item-wide {
  grid-column: span 2;
}


.modal-location {
  width: min(1100px, 100%);
}

.location-modal-state {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.location-modal-state p {
  margin: 0;
  color: #475569;
  line-height: 1.5;
}

.location-editor {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: start;
}

.location-map-shell {
  min-width: 0;
}

.location-map-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.location-map-note {
  color: #475569;
  font-size: 13px;
}


.location-search-bar {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

.btn-google-maps {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn-google-maps:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
}

.btn-google-maps:disabled {
  opacity: 0.72;
  cursor: wait;
  transform: none;
}

.btn-google-maps-open {
  background: #ffffff;
  color: #1f2937;
  border: 1px solid #d6e3ff;
}

.btn-google-maps-open:hover {
  background: #f8fbff;
}

.btn-google-maps-locate {
  background: linear-gradient(135deg, #1a73e8 0%, #4285f4 100%);
  color: #ffffff;
}

.location-search-bar-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.btn-google-maps-import {
  background: linear-gradient(135deg, #0f9d58 0%, #34a853 100%);
  color: #ffffff;
}

.btn-google-maps-import:hover {
  background: linear-gradient(135deg, #11834c 0%, #2f964a 100%);
}


.gmaps-btn-icon {
  font-size: 16px;
  line-height: 1;
}

.location-search-status {
  min-height: 20px;
  margin-bottom: 10px;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
}

.location-search-help {
  margin-bottom: 10px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.location-map {
  height: 460px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  overflow: hidden;
  background: #e2e8f0;
}

.location-sidepanel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.location-panel-card {
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
}

.location-panel-card h4 {
  margin: 0 0 10px 0;
  color: #0f172a;
}

.location-panel-card p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.5;
}

.location-panel-list {
  display: grid;
  gap: 10px;
}

.location-panel-list div {
  color: #334155;
  line-height: 1.5;
}

.location-panel-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.location-reference textarea {
  min-height: 88px;
}

.location-empty-hint {
  color: #64748b;
  font-size: 13px;
}

.leaflet-container {
  font: inherit;
}

.leaflet-draw-toolbar a {
  background-color: #fff;
}

.leaflet-control-attribution {
  font-size: 11px;
}
@media (max-width: 900px) {
  .geo-card-head,
  .location-editor {
    grid-template-columns: 1fr;
    flex-direction: column;
  }
}

@media (max-width: 720px) {
  .location-search-bar,
  .location-search-bar-three {
    grid-template-columns: 1fr;
  }

  .btn-google-maps,
  .location-search-bar .btn-outline {
    width: 100%;
  }

  .geo-card-details,
  .resumo-grid {
    grid-template-columns: 1fr;
  }

  .resumo-item-wide,
  .geo-detail-item-full {
    grid-column: span 1;
  }
}


.table-toolbar {
  background:#fff;
  padding:18px 20px;
  border-radius:12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
  margin-bottom:16px;
}

.table-toolbar-grid {
  display:grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(4, minmax(150px, 1fr)) auto;
  gap:14px;
  align-items:end;
}

.toolbar-field {
  display:flex;
  flex-direction:column;
  gap:6px;
}

.toolbar-field-search {
  min-width:220px;
}

.toolbar-actions {
  display:flex;
  align-items:flex-end;
  justify-content:flex-end;
}

.table-toolbar-summary {
  margin-top:12px;
  color:#475569;
  font-size:14px;
}

.table-empty {
  text-align:center;
  color:#64748b;
  padding:24px 12px;
  background:#f8fafc;
}

@media (max-width: 1300px) {
  .table-toolbar-grid {
    grid-template-columns: repeat(3, minmax(180px, 1fr));
  }

  .toolbar-actions {
    justify-content:flex-start;
  }
}

@media (max-width: 900px) {
  .table-toolbar-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .table-toolbar-grid,
  .form-grid,
  .resumo-grid,
  .services-row,
  .service-item,
  .acompanhamento-card {
    grid-template-columns: 1fr;
  }
}

.section-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.section-subtitle {
  margin:4px 0 0;
  color:#64748b;
  font-size:14px;
}

.taxas-list {
  display:flex;
  flex-direction:column;
  gap:12px;
}

.taxa-card {
  border:1px solid #dbe3ee;
  border-radius:14px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fafc 100%);
  box-shadow:0 4px 14px rgba(15,23,42,0.05);
  padding:16px;
}

.taxa-card-head {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:12px;
}

.taxa-card-title {
  font-weight:700;
  color:#0f172a;
  margin-bottom:4px;
}

.taxa-card-subtitle {
  color:#64748b;
  font-size:13px;
}

.taxa-status {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}

.taxa-status-pendente, .taxa-status-aguardando-pagamento { background:#fff7ed; color:#9a3412; }
.taxa-status-emitida { background:#eff6ff; color:#1d4ed8; }
.taxa-status-paga { background:#dcfce7; color:#166534; }
.taxa-status-vencida, .taxa-status-cancelada { background:#fee2e2; color:#991b1b; }

.taxa-grid {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
}

.taxa-item {
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:10px 12px;
}

.taxa-item-wide { grid-column:1 / -1; }
.taxa-label {
  display:block;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#64748b;
  margin-bottom:5px;
}
.taxa-value {
  color:#0f172a;
  font-weight:600;
  line-height:1.4;
  word-break:break-word;
}
.taxa-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:14px;
  flex-wrap:wrap;
}

.modal-content.modal-taxa { width:min(860px, 100%); }
.modal-taxa-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:14px 16px;
}
.modal-taxa-grid .form-group-full { grid-column:1 / -1; }
.file-existing {
  margin-top:8px;
  padding:8px 10px;
  border:1px dashed #cbd5e1;
  border-radius:10px;
  background:#f8fafc;
  font-size:13px;
  color:#475569;
}
.file-existing label { font-size:12px; font-weight:600; margin-top:8px; display:flex; align-items:center; gap:8px; }
.checkbox-inline { display:flex; align-items:center; gap:8px; margin-top:10px; font-weight:500; }
.checkbox-group-row {
  display:flex;
  gap:18px;
  flex-wrap:wrap;
  align-items:center;
}

.taxas-empty-state {
  color:#64748b;
  font-size:14px;
  padding:16px;
  border:1px dashed #d7e0ea;
  border-radius:12px;
  background:#f8fafc;
}

@media (max-width: 960px) {
  .taxa-grid,
  .resumo-grid { grid-template-columns:repeat(2, minmax(0,1fr)); }
}

@media (max-width: 720px) {
  .section-head,
  .taxa-card-head,
  .history-actions,
  .actions { flex-direction:column; align-items:stretch; }
  .modal-taxa-grid,
  .taxa-grid,
  .resumo-grid { grid-template-columns:1fr; }
}


.section-actions {
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.section-head-taxas-acompanhamento {
  align-items:center;
}


.modal-content.modal-servico-anotacoes { width:min(980px, 100%); }
.servico-modal-identificacao {
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:12px;
  margin-bottom:16px;
}
.servico-modal-identificacao > div {
  background:#f8fafc;
  border:1px solid #e2e8f0;
  border-radius:12px;
  padding:12px 14px;
}
.servico-modal-identificacao strong {
  display:block;
  font-size:12px;
  text-transform:uppercase;
  color:#64748b;
  margin-bottom:6px;
}
.servico-modal-identificacao span {
  display:block;
  font-weight:600;
  color:#0f172a;
}
.servico-modal-identificacao-wide { grid-column:span 1; }
.servico-documentos-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
  margin-top:16px;
}
.servico-documento-card {
  border:1px solid #dbe3ee;
  border-radius:14px;
  padding:14px;
  background:#fff;
}
.servico-documento-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:12px;
}
.servico-documento-head h4 {
  margin:0;
  font-size:16px;
  color:#0f172a;
}
.servico-documento-badge {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:28px;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
}
.servico-documento-badge.is-ok { background:#dcfce7; color:#166534; }
.servico-documento-badge.is-empty { background:#e5e7eb; color:#475569; }
.servico-arquivo-item {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
  padding:12px 0;
  border-top:1px solid #e2e8f0;
}
.servico-arquivo-item:first-child { border-top:0; padding-top:0; }
.servico-arquivo-info {
  flex:1;
  min-width:0;
}
.servico-arquivo-item strong,
.servico-arquivo-item small {
  display:block;
}
.servico-arquivo-item strong {
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.servico-arquivo-item small {
  color:#64748b;
  margin-top:4px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.inline-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  align-items:center;
}
.service-link-button {
  display:block;
  padding:0;
  margin:0 0 6px 0;
  font-size:16px;
  font-weight:700;
  color:#1d4ed8;
  text-align:left;
}
.service-link-button:hover { text-decoration:none; }
.service-extra-info {
  margin-top:6px;
  color:#64748b;
  font-size:13px;
}
.acompanhamento-card-actions {
  display:flex;
  justify-content:flex-end;
}

.acompanhamento-card-clickable {
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.acompanhamento-card-clickable:hover {
  transform: translateY(-1px);
  border-color: #bfdbfe;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.12);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.acompanhamento-card-clickable:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
  border-color: #93c5fd;
}

.acompanhamento-card-clickable.servico-destacado {
  border-color: #60a5fa;
  background: linear-gradient(180deg, #ffffff 0%, #eff6ff 100%);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.20), 0 0 22px rgba(59, 130, 246, 0.32), 0 18px 34px rgba(37, 99, 235, 0.18);
  animation: servicoDelegadoPulse 1.1s ease-in-out 0s 3;
}

@keyframes servicoDelegadoPulse {
  0% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.00), 0 12px 24px rgba(37, 99, 235, 0.10);
  }
  50% {
    transform: translateY(-1px);
    box-shadow: 0 0 0 4px rgba(96, 165, 250, 0.18), 0 0 24px rgba(59, 130, 246, 0.30), 0 18px 34px rgba(37, 99, 235, 0.18);
  }
  100% {
    transform: translateY(0);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.00), 0 12px 24px rgba(37, 99, 235, 0.10);
  }
}

.service-card-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  align-self: stretch;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  text-align: right;
}

.service-status-badge {
  width: fit-content;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .servico-documentos-grid,
  .servico-modal-identificacao {
    grid-template-columns:1fr;
  }
}


.acompanhamento-tabs-shell {
  padding: 0;
  overflow: hidden;
}

.acompanhamento-tabs {
  display: flex;
  gap: 10px;
  padding: 18px 18px 0;
  border-bottom: 1px solid #e2e8f0;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.acompanhamento-tab {
  border: 1px solid transparent;
  background: #eef4ff;
  color: #334155;
  border-radius: 14px 14px 0 0;
  padding: 12px 16px;
  min-width: 140px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.acompanhamento-tab small {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
  font-size: 12px;
}

.acompanhamento-tab.is-active {
  background: #fff;
  color: #0f172a;
  border-color: #dbeafe;
  box-shadow: 0 -2px 0 #2563eb inset;
}

.acompanhamento-tab-panel {
  padding: 20px;
  background: #fff;
}

.acompanhamento-section-card {
  border: 1px solid #dbe3ee;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.acompanhamento-section-card + .acompanhamento-section-card {
  margin-top: 16px;
}

.setor-group {
  margin-bottom: 20px;
}

.setor-block {
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
  overflow: hidden;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.setor-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.10);
  border-color: #bfdbfe;
}

.setor-bg-ambiental {
  border-color: rgba(46, 125, 50, 0.18);
  background: linear-gradient(180deg, rgba(46, 125, 50, 0.3) 0%, rgba(255, 255, 255, 0.98) 18%, #f8fafc 100%);
}

.setor-bg-florestal {
  border-color: rgba(101, 67, 33, 0.18);
  background: linear-gradient(180deg, rgba(101, 67, 33, 0.3) 0%, rgba(255, 255, 255, 0.98) 18%, #f8fafc 100%);
}

.setor-bg-infraestrutura {
  border-color: rgba(21, 101, 192, 0.18);
  background: linear-gradient(180deg, rgba(21, 101, 192, 0.3) 0%, rgba(255, 255, 255, 0.98) 18%, #f8fafc 100%);
}

.setor-bg-topografia {
  border-color: rgba(239, 108, 0, 0.2);
  background: linear-gradient(180deg, rgba(239, 108, 0, 0.3) 0%, rgba(255, 255, 255, 0.98) 18%, #f8fafc 100%);
}

.setor-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  background: rgba(248, 250, 252, 0.75);
  backdrop-filter: blur(2px);
  cursor: pointer;
}

.setor-block-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.setor-toggle-btn {
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight:700;
}

.setor-toggle-icon {
  font-size:14px;
  line-height:1;
}

.setor-block.is-collapsed .setor-servicos-list {
  display:none;
}

.setor-block.is-collapsed .setor-block-header {
  border-bottom:none;
}

.setor-counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.setor-servicos-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.acompanhamento-card {
  grid-template-columns: minmax(0, 1.3fr) minmax(220px, 0.9fr) 170px;
  gap: 14px;
  padding: 16px 18px;
  margin-bottom: 0;
  border-radius: 16px;
  background: #fff;
}

.service-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.service-meta-card {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.service-meta-card strong {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #64748b;
  margin-bottom: 4px;
}

.service-meta-card span {
  color: #0f172a;
  font-weight: 600;
  word-break: break-word;
}

.service-status-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-status-wrap label {
  margin: 0;
  font-size: 12px;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: .04em;
  font-weight: 700;
}

.service-status-wrap select:disabled {
  opacity:.7;
  cursor:wait;
}

.history-panel-shell {
  border: 1px solid #dbeafe;
  border-radius: 18px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.history-header-inline {
  margin-bottom: 18px;
}

.history-list {
  gap: 20px;
}

.history-item {
  grid-template-columns: 34px 1fr;
  column-gap: 16px;
}

.history-line {
  left: 16px;
  top: 0;
  bottom: -22px;
  width: 3px;
  background: linear-gradient(180deg, #93c5fd 0%, #dbeafe 100%);
  border-radius: 999px;
}

.history-item:last-child .history-line {
  bottom: 28px;
}

.history-dot {
  width: 16px;
  height: 16px;
  margin: 12px 0 0 8px;
  background: #2563eb;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.12);
}

.history-card {
  border-radius: 18px;
  padding: 18px;
}

.history-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.history-date-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
}

.history-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  color: #475569;
  font-size: 13px;
  flex-wrap: wrap;
}

@media (max-width: 860px) {
  .acompanhamento-tabs {
    flex-direction: column;
    padding: 16px 16px 0;
  }

  .acompanhamento-tab {
    width: 100%;
    border-radius: 14px;
  }

  .acompanhamento-card {
    grid-template-columns: 1fr;
  }

  .service-meta-grid {
    grid-template-columns: 1fr;
  }

  .setor-block-header,
  .history-topline,
  .history-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}


.field-hint {
  display:block;
  margin-top:6px;
  font-size:12px;
  color:#64748b;
}


.user-info { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.user-role-badge {
  display:inline-flex;
  align-items:center;
  padding:4px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  letter-spacing:0.02em;
  border:1px solid rgba(31,74,168,0.18);
  background:#eef4ff;
  color:#1f4aa8;
}
.user-role-badge.is-master { background:#e8fff1; color:#137333; border-color:rgba(19,115,51,0.22); }
.user-role-badge.is-user { background:#eef4ff; color:#1f4aa8; }
.user-role-badge.is-readonly { background:#f3f4f6; color:#4b5563; border-color:rgba(75,85,99,0.2); }
.field-readonly { opacity:0.72; }
.field-readonly input,
.field-readonly select,
.field-readonly textarea { cursor:not-allowed; }
.disabled-state { opacity:0.6; pointer-events:none; }
button:disabled,
select:disabled,
input:disabled,
textarea:disabled {
  cursor:not-allowed;
  opacity:0.68;
}


.admin-shell { padding: 20px; }
.admin-header { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; margin-bottom:16px; }
.admin-tabs { display:flex; gap:10px; margin-bottom:16px; flex-wrap:wrap; }
.admin-panel { margin-top: 4px; }
.admin-table-card { overflow-x:auto; }
.admin-user-cell { min-width: 240px; }
.admin-user-email { display:block; color:#6b7280; font-size:12px; margin-top:4px; }
.admin-perm-check { width:18px; height:18px; }
.admin-actions-cell { white-space:nowrap; }
.admin-review-list { display:grid; gap:14px; }
.admin-review-card { border:1px solid #dbe3ef; border-radius:14px; padding:16px; background:#fff; box-shadow:0 8px 22px rgba(15, 23, 42, 0.05); }
.admin-review-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:10px; }
.admin-review-meta { display:grid; gap:4px; color:#475569; font-size:13px; }
.admin-review-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.admin-status-badge { display:inline-flex; align-items:center; padding:5px 10px; border-radius:999px; font-size:12px; font-weight:700; }
.admin-status-badge.is-pendente { background:#fff7ed; color:#9a3412; }
.admin-status-badge.is-aprovado { background:#dcfce7; color:#166534; }
.admin-status-badge.is-rejeitado { background:#fee2e2; color:#991b1b; }
.document-review-badge { display:inline-flex; align-items:center; padding:3px 8px; border-radius:999px; font-size:11px; font-weight:700; margin-left:8px; }
.document-review-badge.is-pendente { background:#fff7ed; color:#9a3412; }
.document-review-badge.is-aprovado { background:#dcfce7; color:#166534; }
.document-review-badge.is-rejeitado { background:#fee2e2; color:#991b1b; }
.audit-item-meta { color:#64748b; font-size:12px; display:block; margin-top:4px; }
.audit-empty { padding:16px; border:1px dashed #cbd5e1; border-radius:12px; color:#64748b; background:#f8fafc; }

.admin-audit-item {
  display:grid;
  gap:14px;
  padding:18px 20px;
  border:1px solid #dbe3ee;
  border-radius:16px;
  background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
  box-shadow:0 10px 24px rgba(15,23,42,0.05);
}
.admin-audit-item + .admin-audit-item {
  margin-top:14px;
}
.admin-audit-item-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.admin-audit-item-title-wrap {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:10px 12px;
}
.admin-audit-item-title {
  font-size:18px;
  line-height:1.3;
  color:#0f172a;
}
.admin-audit-item-date {
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:#eff6ff;
  color:#1d4ed8;
  font-size:12px;
  font-weight:700;
  white-space:nowrap;
}
.admin-audit-item-description {
  margin:0;
  color:#1f2937;
  line-height:1.6;
  white-space:normal;
  word-break:break-word;
}
.admin-audit-item-meta-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:12px;
}
.admin-audit-meta-card {
  min-width:0;
  padding:12px 14px;
  border:1px solid #e2e8f0;
  border-radius:12px;
  background:#fff;
}
.admin-audit-meta-card strong {
  display:block;
  color:#0f172a;
  line-height:1.5;
  word-break:break-word;
}
.admin-audit-meta-label {
  display:block;
  margin-bottom:6px;
  color:#64748b;
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
}
@media (max-width: 720px) {
  .admin-audit-item-meta-grid {
    grid-template-columns:1fr;
  }
  .admin-audit-item {
    padding:16px;
  }
}


.service-models-shell { margin-top:16px; padding:16px; border:1px solid #dbe3ee; border-radius:14px; background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%); }
.service-models-header { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:12px; }
.service-models-row { display:grid; grid-template-columns: minmax(280px, 1fr) auto; gap:12px; align-items:end; }
.service-models-actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.service-model-preview { margin-top:12px; display:grid; gap:12px; }
.model-preview-group { padding:12px; border:1px solid #dbe3ee; border-radius:12px; background:#fff; }
.model-preview-title { margin-bottom:10px; }
.model-preview-items { display:flex; gap:8px; flex-wrap:wrap; }
.model-preview-item { display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; background:#eef4ff; color:#1f3b6e; font-size:13px; }

.admin-workspace-grid { display:grid; grid-template-columns: minmax(360px, 1fr) minmax(520px, 1.25fr); gap:20px; align-items:start; }
.admin-workspace-card { padding:34px 34px 36px; display:flex; flex-direction:column; gap:6px; min-height:0; background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%); border:1px solid #dbe3ee; border-radius:22px; box-shadow:0 18px 40px rgba(15,23,42,0.06); overflow:hidden; box-sizing:border-box; }
.admin-workspace-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; margin-bottom:18px; }
.admin-section-kicker { display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; background:#e8f0ff; color:#2b5fad; font-size:12px; font-weight:700; margin-bottom:8px; }
.admin-surface-block { border:1px solid #dbe3ee; border-radius:16px; background:#fff; padding:18px; box-shadow:0 10px 24px rgba(15,23,42,0.04); box-sizing:border-box; width:100%; }
.admin-surface-block + .admin-surface-block { margin-top:18px; }
.admin-surface-fill { display:flex; flex-direction:column; flex:1; min-height:0; }
.admin-subsection-head { display:flex; align-items:flex-start; gap:12px; margin-bottom:14px; }
.admin-subsection-head--spread { justify-content:space-between; }
.admin-subsection-head strong { display:block; font-size:16px; color:#111827; }
.admin-subsection-head p { margin:4px 0 0; color:#64748b; font-size:13px; line-height:1.45; }
.admin-status-chip { display:inline-flex; align-items:center; padding:6px 10px; border-radius:999px; background:#eff6ff; color:#1d4ed8; font-size:12px; font-weight:700; white-space:nowrap; }
.admin-form-grid { display:grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap:12px; }
.admin-form-grid-single { grid-template-columns: 1fr; }
.admin-actions-row { flex-wrap:wrap; gap:10px; margin-top:14px; }
.admin-search-field { margin-bottom:12px; }
.admin-service-list { display:grid; gap:10px; flex:1; min-height:420px; max-height:560px; overflow:auto; padding-right:4px; }
.admin-service-item { display:flex; justify-content:space-between; gap:12px; align-items:center; border:1px solid #dbe3ee; border-radius:14px; background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%); padding:14px 16px; box-shadow:0 6px 18px rgba(15,23,42,0.04); }
.admin-service-main { min-width:0; display:flex; flex-direction:column; gap:4px; flex:1; }
.admin-service-main strong { display:block; font-size:15px; line-height:1.35; color:#1f2937; word-break:break-word; margin:0; }
.admin-service-main small { color:#64748b; font-size:12px; }
.admin-models-layout { display:grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.72fr); gap:22px; align-items:start; min-height:0; }
.admin-model-editor-block { display:flex; flex-direction:column; min-height:0; align-self:start; }
.admin-hidden-native-select { display:none; }
.admin-model-picker-head { display:flex; flex-direction:column; gap:4px; margin:16px 0 10px; }
.admin-model-picker { display:grid; gap:12px; flex:1; min-height:360px; max-height:520px; overflow:auto; overflow-x:hidden; padding-right:4px; }
.admin-model-group { border:1px solid #dbe3ee; border-radius:14px; background:#fff; padding:12px; }
.admin-model-group-title { margin-bottom:10px; }
.admin-model-group-items { display:grid; gap:8px; }
.admin-model-check { display:flex; align-items:flex-start; gap:8px; color:#1f2937; }
.admin-model-check input { width:16px; height:16px; margin-top:2px; }
.admin-model-list-block { display:flex; flex-direction:column; min-height:0; align-self:start; }
.admin-models-list { display:grid; gap:10px; flex:1; min-height:360px; max-height:640px; overflow:auto; overflow-x:hidden; padding-right:4px; }
.admin-model-card { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; border:1px solid #dbe3ee; border-radius:14px; background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%); padding:14px; transition:border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.admin-model-card.is-active { border-color:#93c5fd; box-shadow:0 10px 24px rgba(37,99,235,0.12); transform:translateY(-1px); }
.admin-model-card-main { min-width:0; display:flex; flex-direction:column; gap:5px; }
.admin-model-card-main strong { font-size:15px; color:#111827; }
.admin-model-card-main small { color:#64748b; font-size:12px; line-height:1.45; }
.admin-model-card-meta { display:inline-flex; align-items:center; align-self:flex-start; padding:4px 8px; border-radius:999px; background:#eef2ff; color:#3730a3; font-size:11px; font-weight:700; }
.admin-model-card-actions { display:flex; align-items:center; gap:8px; flex-shrink:0; }
.admin-service-main .service-pill { display:none !important; }
.btn-danger.btn-icon-only,
.btn-delete-admin-service,
.btn-delete-admin-model {
  width:36px;
  height:36px;
  min-width:36px;
  padding:0;
  font-size:16px;
  line-height:1;
}
.btn-delete-admin-service svg,
.btn-delete-admin-model svg {
  width:16px;
  height:16px;
  display:block;
}
.admin-content { padding-bottom:96px; }
body { padding-bottom:40px; }

@media (max-width: 1180px) {
  .admin-workspace-grid,
  .admin-models-layout,
  .admin-form-grid,
  .service-models-row {
    grid-template-columns: 1fr;
  }
}
