/* ============ BASE ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:        #1a5fd4;
  --blue-light:  #eef3fd;
  --blue-dark:   #1248a8;
  --green:       #1a6644;
  --green-light: #e8f5ee;
  --red:         #b82e2e;
  --red-light:   #fdeaea;
  --amber:       #92600a;
  --amber-light: #fdf3e3;
  --gray-50:     #f9f9f8;
  --gray-100:    #f2f2f0;
  --gray-200:    #e4e4e1;
  --gray-400:    #a3a39e;
  --gray-600:    #6b6b66;
  --gray-800:    #2c2c2a;
  --gray-900:    #1a1a18;
  --sidebar-w:   216px;
  --radius:      6px;
  --radius-md:   8px;
  --radius-lg:   10px;
  --border:      1px solid var(--gray-200);
  --shadow-sm:   0 1px 2px rgba(0,0,0,0.05);
  --shadow:      0 1px 4px rgba(0,0,0,0.08);
}

html { font-size: 14px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
  background: var(--gray-100);
  color: var(--gray-900);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ============ LAYOUT ============ */
#app { display: flex; min-height: 100vh; }

aside {
  width: var(--sidebar-w);
  background: #fff;
  border-right: var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 20;
}

main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 28px 28px 40px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  border-bottom: var(--border);
}
.logo-mark { width: 28px; height: 28px; flex-shrink: 0; }
.logo-name { display: block; font-size: 14px; font-weight: 600; color: var(--gray-900); letter-spacing: -0.2px; }
.logo-sub  { display: block; font-size: 10.5px; color: var(--gray-400); letter-spacing: 0.2px; margin-top: 1px; }

nav { flex: 1; padding: 12px 10px; overflow-y: auto; }

.nav-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0 6px;
  margin: 6px 0 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 7px 8px;
  border: none;
  background: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-600);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  text-align: left;
  margin-bottom: 1px;
}
.nav-item:hover { background: var(--gray-100); color: var(--gray-900); }
.nav-item.active { background: var(--blue-light); color: var(--blue); font-weight: 500; }

.nav-icon {
  width: 16px; height: 16px;
  flex-shrink: 0;
  opacity: 0.75;
}
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-footer {
  padding: 12px 14px;
  border-top: var(--border);
}
.user-chip { display: flex; align-items: center; gap: 9px; }
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600;
  flex-shrink: 0;
}
.user-name  { display: block; font-size: 12.5px; font-weight: 500; color: var(--gray-900); }
.user-role  { display: block; font-size: 11px; color: var(--gray-400); }

/* ============ PAGE ============ */
.page { display: none; flex-direction: column; gap: 16px; }
.page.active { display: flex; }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title { font-size: 17px; font-weight: 600; letter-spacing: -0.3px; color: var(--gray-900); }
.page-sub   { font-size: 12px; color: var(--gray-400); margin-top: 2px; }

.header-actions { display: flex; align-items: center; gap: 8px; }

/* ============ CARD ============ */
.card {
  background: #fff;
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.card-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 14px;
}

/* ============ METRICS ============ */
.metrics-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }

.metric {
  background: #fff;
  border: var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}
.metric-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}
.metric-value         { font-size: 22px; font-weight: 600; letter-spacing: -0.5px; color: var(--gray-900); }
.metric-value.accent  { color: var(--blue); }
.metric-value.success { color: var(--green); }
.metric-value.danger  { color: var(--red); }
.metric-value.warning { color: var(--amber); }

/* ============ GRID ============ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: var(--radius);
  border: var(--border);
  background: #fff;
  color: var(--gray-800);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
  white-space: nowrap;
  line-height: 1;
}
.btn svg { width: 14px; height: 14px; }
.btn:hover { background: var(--gray-100); border-color: var(--gray-400); }
.btn:active { transform: scale(0.98); }

.btn-primary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-primary:hover { background: var(--blue-dark); border-color: var(--blue-dark); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--gray-600); }
.btn-ghost:hover { background: var(--gray-100); border-color: transparent; color: var(--gray-900); }

.btn-danger-text { background: transparent; border-color: transparent; color: var(--red); font-size: 12px; padding: 5px 8px; }
.btn-danger-text:hover { background: var(--red-light); border-color: transparent; }

.btn-sm { padding: 6px 12px; font-size: 12.5px; }
.btn-icon { padding: 6px 8px; }
.btn-icon svg { width: 15px; height: 15px; }

.btn-group {
  display: flex;
  border: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.btn-group .btn {
  border: none;
  border-radius: 0;
  border-right: var(--border);
}
.btn-group .btn:last-child { border-right: none; }

/* ============ FORMS ============ */
label {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 5px;
  letter-spacing: 0.1px;
}
.field-label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--gray-600);
  letter-spacing: 0.1px;
  margin-bottom: 5px;
}
input, select, textarea {
  width: 100%;
  padding: 7px 10px;
  border: var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  color: var(--gray-900);
  background: #fff;
  transition: border-color 0.12s, box-shadow 0.12s;
  line-height: 1.4;
}
input::placeholder, textarea::placeholder { color: var(--gray-400); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,95,212,0.1);
}
textarea { resize: vertical; min-height: 72px; }
.form-group { margin-bottom: 12px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ============ TABLE ============ */
.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.search-wrap { position: relative; flex: 1; max-width: 340px; }
.search-svg {
  position: absolute;
  left: 9px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  color: var(--gray-400);
  pointer-events: none;
}
.search-input { padding-left: 30px; }

table { width: 100%; border-collapse: collapse; }
thead tr { border-bottom: var(--border); }
th {
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  white-space: nowrap;
}
td {
  padding: 11px 12px;
  border-bottom: var(--border);
  font-size: 13px;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.1s; }
tbody tr:hover td { background: var(--gray-50); }

.td-name     { font-weight: 500; color: var(--gray-900); line-height: 1.3; }
.td-sub      { font-size: 11.5px; color: var(--gray-400); margin-top: 1px; }
.td-actions  { display: flex; gap: 4px; align-items: center; }

/* ============ BADGE ============ */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.badge-blue   { background: var(--blue-light);  color: var(--blue); }
.badge-green  { background: var(--green-light); color: var(--green); }
.badge-red    { background: var(--red-light);   color: var(--red); }
.badge-amber  { background: var(--amber-light); color: var(--amber); }
.badge-gray   { background: var(--gray-100);    color: var(--gray-600); }

/* ============ AVATAR ============ */
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.av-b { background: var(--blue-light);  color: var(--blue); }
.av-g { background: var(--green-light); color: var(--green); }
.av-a { background: var(--amber-light); color: var(--amber); }
.av-r { background: var(--red-light);   color: var(--red); }

.cell-person { display: flex; align-items: center; gap: 9px; }

/* ============ AGENDA ============ */
.agenda-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 5px;
}
.day-name {
  text-align: center;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0 0 8px;
}
.agenda-day {
  background: var(--gray-50);
  border: var(--border);
  border-radius: var(--radius);
  padding: 7px 6px;
  min-height: 88px;
  transition: border-color 0.12s;
}
.agenda-day:hover { border-color: var(--gray-400); }
.agenda-day.dim { opacity: 0.35; }
.agenda-day.today { border-color: var(--blue); background: #fff; }

.day-num {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 5px;
  color: var(--gray-800);
}
.today-num {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  font-weight: 600;
  margin: 0 auto 5px;
}
.appoint {
  background: var(--blue-light);
  color: var(--blue);
  font-size: 9.5px;
  font-weight: 500;
  border-radius: 3px;
  padding: 2px 5px;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}
.appoint.conf { background: var(--green-light); color: var(--green); }
.appoint.canc { background: var(--red-light);   color: var(--red);   }

/* ============ ODONTOGRAMA ============ */
.tooth-map {
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  gap: 3px;
  margin: 4px 0;
}
.tooth {
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px;
  font-weight: 500;
  border-radius: 3px;
  border: var(--border);
  background: var(--gray-100);
  color: var(--gray-600);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.tooth:hover   { background: var(--blue-light); border-color: var(--blue); color: var(--blue); }
.tooth.treated { background: var(--green-light); border-color: var(--green); color: var(--green); }
.tooth.problem { background: var(--red-light);   border-color: var(--red);   color: var(--red); }
.tooth.sel     { background: var(--blue-light);  border-color: var(--blue);  color: var(--blue); }

.tooth-legend { display: flex; gap: 8px; margin-top: 12px; }
.tooth-leg {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 4px;
}
.tooth-leg.normal  { background: var(--gray-100); color: var(--gray-600); }
.tooth-leg.treated { background: var(--green-light); color: var(--green); }
.tooth-leg.problem { background: var(--red-light); color: var(--red); }

/* ============ MODAL ============ */
.modal-bg {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,15,15,0.45);
  backdrop-filter: blur(2px);
  z-index: 100;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-bg.open { display: flex; }

.modal {
  background: #fff;
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  animation: modalIn 0.18s ease;
}
.modal-lg { max-width: 540px; }

@keyframes modalIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.99); }
  to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: var(--border);
}
.modal-title { font-size: 14px; font-weight: 600; color: var(--gray-900); }
.modal-sub   { font-size: 11.5px; color: var(--gray-400); margin-top: 2px; }

.close-btn {
  background: none; border: none;
  color: var(--gray-400);
  cursor: pointer;
  padding: 3px;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.12s, color 0.12s;
  flex-shrink: 0;
  margin-top: 2px;
}
.close-btn svg { width: 14px; height: 14px; }
.close-btn:hover { background: var(--gray-100); color: var(--gray-900); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: var(--border);
}

/* ============ TOAST ============ */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: var(--gray-900);
  color: #fff;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  animation: toastIn 0.22s ease;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============ UTILITIES ============ */
.flex       { display: flex; }
.gap-6      { gap: 6px; }
.gap-8      { gap: 8px; }
.items-center { align-items: center; }

/* ============ RESPONSIVE — TABLET ============ */
@media (max-width: 960px) {
  :root { --sidebar-w: 52px; }

  .logo-text, .nav-label,
  .nav-item span:not(.nav-icon),
  .user-details { display: none; }

  .logo { justify-content: center; padding: 16px 0; }
  .logo-mark { width: 26px; height: 26px; }

  .nav-item { justify-content: center; padding: 8px; }
  .nav-icon { opacity: 1; width: 18px; height: 18px; }

  .sidebar-footer { padding: 10px 0; display: flex; justify-content: center; }

  main { padding: 20px 16px 32px; }
  .metrics-grid { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

/* ============ RESPONSIVE — MOBILE ============ */
@media (max-width: 620px) {
  :root { --sidebar-w: 0px; }

  /* Bottom navigation */
  aside {
    width: 100%;
    height: 56px;
    position: fixed;
    top: auto; bottom: 0; left: 0; right: 0;
    flex-direction: row;
    border-right: none;
    border-top: var(--border);
    z-index: 50;
    background: #fff;
  }
  .logo, .sidebar-footer, .nav-label { display: none; }
  nav {
    display: flex;
    flex-direction: row;
    flex: 1;
    padding: 0;
    align-items: stretch;
    gap: 0;
    overflow: visible;
  }
  .nav-item {
    flex: 1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 3px;
    padding: 4px 2px;
    margin: 0;
    border-radius: 0;
    font-size: 9px;
    font-weight: 500;
    color: var(--gray-400);
  }
  .nav-item span:not(.nav-icon) { display: block; font-size: 9px; }
  .nav-item.active { background: var(--blue-light); color: var(--blue); }
  .nav-icon { width: 19px; height: 19px; opacity: 1; }

  /* Main */
  main {
    margin-left: 0;
    padding: 16px 14px 72px;
    gap: 12px;
  }

  /* Header */
  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .header-actions { width: 100%; justify-content: space-between; }
  .page-title { font-size: 16px; }

  /* Metrics */
  .metrics-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .metric { padding: 12px 14px; }
  .metric-value { font-size: 19px; }

  /* Cards */
  .card { padding: 14px 14px; border-radius: var(--radius-md); }

  /* Tables → Card list on mobile */
  table, thead, tbody, th, td, tr { display: block; }
  thead { display: none; }
  tbody tr {
    background: #fff;
    border: var(--border);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-bottom: 8px;
    box-shadow: var(--shadow-sm);
  }
  tbody tr:last-child td { border-bottom: none; }
  tbody tr:hover td { background: transparent; }
  td { padding: 3px 0; border: none; font-size: 13px; }
  .td-actions { padding-top: 8px; border-top: var(--border); margin-top: 4px; }

  /* Grid */
  .grid-2 { grid-template-columns: 1fr; gap: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .search-wrap { max-width: 100%; }

  /* Agenda */
  .agenda-day { min-height: 52px; padding: 5px 4px; }
  .day-name { font-size: 9px; padding-bottom: 6px; }
  .day-num { font-size: 11px; }
  .today-num { width: 20px; height: 20px; font-size: 10px; }
  .appoint { font-size: 8px; padding: 1px 3px; }

  /* Odontograma */
  .tooth { font-size: 7px; }
  .tooth-map { gap: 2px; }

  /* Modal — bottom sheet */
  .modal-bg {
    align-items: flex-end;
    padding: 0;
  }
  .modal {
    max-width: 100%;
    width: 100%;
    border-radius: 14px 14px 0 0;
    padding: 20px 18px 24px;
    max-height: 92vh;
    animation: slideUp 0.22s ease;
  }
  @keyframes slideUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
  .modal-footer .btn { flex: 1; justify-content: center; }
  .btn-group { flex: 1; }
}

/* ============ FILTROS — ORÇAMENTOS ============ */
.filter-panel {
  background: #fff;
  border: var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.filter-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: var(--border);
  background: var(--gray-50);
}
.filter-panel-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn-link-muted {
  background: none;
  border: none;
  font-family: inherit;
  font-size: 12px;
  color: var(--gray-400);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link-muted:hover { color: var(--red); }

.filter-panel-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-group { display: flex; flex-direction: column; gap: 7px; }
.filter-group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Status chips */
.status-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 5px 12px;
  border-radius: 20px;
  border: var(--border);
  background: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.12s;
  line-height: 1;
}
.chip:hover { border-color: var(--gray-400); }
.chip.active { border-width: 1.5px; }

.chip-all.active          { background: var(--gray-800);   color: #fff; border-color: var(--gray-800); }
.chip-analise.active      { background: var(--blue-light); color: var(--blue); border-color: var(--blue); }
.chip-aprovado.active     { background: var(--green-light);color: var(--green); border-color: var(--green); }
.chip-pendente.active     { background: var(--amber-light);color: var(--amber); border-color: var(--amber); }
.chip-recusado.active     { background: var(--red-light);  color: var(--red);   border-color: var(--red); }

/* 3-column filter row */
.filter-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 14px;
  align-items: start;
}
.filter-select-full {
  width: 100%;
  padding: 7px 10px;
  border: var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13px;
  color: var(--gray-800);
  background: #fff;
  cursor: pointer;
}
.filter-select-full:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,95,212,0.1);
}

/* Valor range */
.valor-range-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.valor-field {
  flex: 1;
  display: flex;
  align-items: center;
  border: var(--border);
  border-radius: var(--radius);
  background: #fff;
  overflow: hidden;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.valor-field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,95,212,0.1);
}
.valor-prefix {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--gray-400);
  padding: 0 6px 0 9px;
  white-space: nowrap;
  user-select: none;
}
.valor-field input {
  border: none !important;
  box-shadow: none !important;
  padding: 7px 8px 7px 0;
  font-size: 13px;
  width: 100%;
  background: transparent;
}
.valor-field input:focus { outline: none; box-shadow: none !important; }
.valor-dash { font-size: 13px; color: var(--gray-400); flex-shrink: 0; }

/* Result header */
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  min-height: 20px;
  flex-wrap: wrap;
  gap: 8px;
}
.filter-result {
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-400);
}
.active-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.active-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--blue-light);
  color: var(--blue);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 500;
}
.active-tag button {
  background: none; border: none; cursor: pointer;
  color: var(--blue); padding: 0; font-size: 13px; line-height: 1;
  display: flex; align-items: center;
}
.active-tag button:hover { color: var(--blue-dark); }

.empty-row {
  text-align: center;
  color: var(--gray-400);
  padding: 32px 12px !important;
  font-size: 13px;
}

/* Responsive */
@media (max-width: 860px) {
  .filter-row-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .filter-panel-body { padding: 12px 14px; gap: 12px; }
  .filter-row-3 { grid-template-columns: 1fr; }
  .valor-range-wrap { flex-wrap: wrap; }
  .valor-field { flex: 1; min-width: 110px; }
}

/* ============ SERVIÇOS & ESTOQUE ============ */
.tipo-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.tipo-consulta     { background: #eef3fd; color: #1a5fd4; }
.tipo-clinico      { background: #eaf3de; color: #1a6644; }
.tipo-estetico     { background: #fdf3e3; color: #92600a; }
.tipo-cirurgico    { background: #fdeaea; color: #b82e2e; }

.est-badge-normal  { background: #eaf3de; color: #1a6644; }
.est-badge-baixo   { background: #fdf3e3; color: #92600a; }
.est-badge-zerado  { background: #fdeaea; color: #b82e2e; }

/* Checkbox list inside modal */
.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  border: var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
  background: var(--gray-50);
}
.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--gray-800);
  cursor: pointer;
  margin: 0;
}
.checkbox-list input[type="checkbox"] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--blue);
}
.field-hint {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 5px;
}

/* Stock quantity display */
.qty-display {
  display: flex;
  align-items: center;
  gap: 6px;
}
.qty-number { font-weight: 600; font-size: 14px; }
.qty-unit   { font-size: 11px; color: var(--gray-400); }

/* Movimentação buttons */
.mov-btns { display: flex; gap: 4px; }
.btn-entrada { background: var(--green-light); color: var(--green); border-color: transparent; font-size: 11.5px; padding: 4px 10px; }
.btn-entrada:hover { background: #c5e8d1; border-color: transparent; }
.btn-saida { background: var(--red-light); color: var(--red); border-color: transparent; font-size: 11.5px; padding: 4px 10px; }
.btn-saida:hover { background: #f9c9c9; border-color: transparent; }
