/* ========== MODO PEDIATRIA ========== */

/* Toggle no header */
.mode-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: hsl(220 18% 96%);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
  margin-right: 12px;
}
.mode-toggle:hover { background: hsl(220 18% 92%); }
.mode-toggle .mode-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-faint);
  transition: all 0.18s ease;
}
.mode-toggle .mode-knob {
  width: 28px;
  height: 16px;
  border-radius: 999px;
  background: hsl(220 14% 80%);
  position: relative;
  flex-shrink: 0;
  transition: background 0.18s ease;
}
.mode-toggle .mode-knob::after {
  content: '';
  position: absolute;
  left: 2px;
  top: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.mode-toggle.on {
  background: hsl(330 70% 96%);
  border-color: hsl(330 60% 80%);
  color: hsl(330 60% 35%);
}
.mode-toggle.on .mode-icon { background: hsl(330 70% 60%); color: white; }
.mode-toggle.on .mode-knob { background: hsl(330 70% 60%); }
.mode-toggle.on .mode-knob::after { transform: translateX(12px); }

/* Quando modo pediatria ativo, troca acento global para tom rosa pedi\u00e1trico */
body.ped-mode-active {
  --accent: hsl(330 70% 55%);
}

/* Cor de destaque pedi\u00e1trica nos cards quando modo ativo */
.app:has(.mode-toggle.on) {
  --accent-h-ped: 330;
}
.app:has(.mode-toggle.on) .col-pediatria .card {
  border-color: hsl(330 30% 90%);
}
.app:has(.mode-toggle.on) .col-pediatria .card:hover {
  border-color: hsl(330 60% 70%);
}

/* Coluna pediatria full width */
.col-pediatria { grid-column: 1 / -1; }
.ped-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
@media (max-width: 720px) {
  .ped-grid { grid-template-columns: 1fr; }
}

/* FAB pedi\u00e1trico (rosa) */
.fab-stack-ped .fab.fab-ped {
  background: hsl(330 70% 55%);
}
.fab-stack-ped .fab.fab-ped:hover {
  background: hsl(330 70% 48%);
}

/* Badge pediatria nos modais */
.ped-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: hsl(330 70% 95%);
  color: hsl(330 60% 38%);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

/* === MODAL: Calculadora de doses === */
.modal-title-wrap { display: flex; flex-direction: column; gap: 4px; }
.modal-title { margin: 0; font-size: 22px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.modal-sub { margin: 0; font-size: 13px; color: var(--text-faint); }

.ped-calc-body {
  display: grid !important;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 24px;
  padding: 20px 24px;
}
@media (max-width: 760px) {
  .ped-calc-body { grid-template-columns: 1fr; }
}

.ped-inputs { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12px; font-weight: 600; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.04em; }
.field-label .req { color: hsl(0 70% 55%); margin-left: 2px; }
.field-label .opt { color: var(--text-faint); font-weight: 500; text-transform: none; letter-spacing: 0; margin-left: 4px; }
.field input[type="text"], .field textarea, .field select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: hsl(var(--accent-h) 65% 55%);
  box-shadow: 0 0 0 3px hsl(var(--accent-h) 65% 90%);
}
.field-with-suffix {
  position: relative;
  display: flex;
  align-items: center;
}
.field-with-suffix input { padding-right: 40px; font-size: 18px; font-weight: 600; }
.field-with-suffix .suffix {
  position: absolute;
  right: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-faint);
  pointer-events: none;
}

.ped-result {
  background: hsl(220 18% 98%);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 240px;
}
.ped-result-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--border-soft);
}
.ped-result-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 13px;
  padding: 24px;
}
.ped-dose-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ped-dose-item {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ped-dose-name { font-size: 14px; color: var(--text); }
.ped-dose-pres { color: var(--text-faint); font-weight: 400; font-size: 12.5px; }
.ped-dose-value {
  font-family: 'Source Serif 4', serif;
  font-size: 17px;
  font-weight: 600;
  color: hsl(var(--accent-h) 60% 40%);
}
.ped-dose-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--text-faint); }
.ped-dose-cond { font-style: italic; color: hsl(35 80% 40%); }
.ped-dose-alert {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px;
  color: hsl(28 80% 38%);
  background: hsl(35 95% 95%);
  padding: 4px 8px;
  border-radius: 6px;
  margin-top: 4px;
}

/* === MODAL: Novo medicamento pedi\u00e1trico === */
.ped-novo-body {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  padding: 20px 24px;
}
.ped-form-row { display: flex; gap: 12px; }
.ped-form-row .field { flex: 1; }

.ped-meds-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: hsl(220 18% 98%);
  border-radius: 12px;
  padding: 12px;
  border: 1px solid var(--border-soft);
}
.ped-meds-head {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; font-weight: 700; color: var(--text-soft);
  padding: 0 4px 4px;
}
.ped-meds-head > span { display: inline-flex; align-items: center; gap: 6px; }

.ped-med-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
}
.ped-med-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.ped-med-num {
  font-size: 11px; font-weight: 700;
  color: var(--text-faint);
  letter-spacing: 0.05em;
}
.ped-med-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 12px;
}
.ped-med-grid .col-span-2 { grid-column: span 2; }
.ped-med-grid .col-span-4 { grid-column: span 4; }
@media (max-width: 720px) {
  .ped-med-grid { grid-template-columns: repeat(2, 1fr); }
  .ped-med-grid .col-span-2, .ped-med-grid .col-span-4 { grid-column: span 2; }
}

/* Segmented control */
.seg {
  display: inline-flex;
  background: hsl(220 18% 96%);
  border-radius: 8px;
  padding: 3px;
  gap: 3px;
}
.seg-btn {
  background: transparent;
  border: 0;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s ease;
}
.seg-btn.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.seg-btn:hover:not(.active) { color: var(--text); }

.btn-sm { padding: 5px 10px; font-size: 12.5px; }

@media (max-width: 720px) {
  .mode-toggle { padding: 6px 10px; }
  .mode-toggle .mode-label { display: none; }
  .mode-toggle .mode-knob { display: none; }
}

/* ============================================
   CATÁLOGO BUTTON (header)
   ============================================ */
.catalog-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.catalog-btn:hover {
  border-color: hsl(var(--accent-h) 60% 50% / .4);
  background: hsl(var(--accent-h) 60% 97%);
  color: hsl(var(--accent-h) 60% 40%);
}
@media (max-width: 720px) {
  .catalog-btn span { display: none; }
  .catalog-btn { padding: 8px; }
}

/* ============================================
   PEDIATRIA CATALOG MODAL
   ============================================ */
.ped-catalog-modal { width: 760px !important; }
.ped-catalog-body {
  display: flex !important;
  flex-direction: column;
  gap: 14px;
  padding: 18px 22px;
  min-height: 420px;
}
.ped-catalog-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}
.ped-catalog-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text-soft);
}
.ped-catalog-search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 14px;
  color: var(--text);
}
.ped-catalog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-soft);
}
.link-btn {
  background: 0;
  border: 0;
  color: hsl(var(--accent-h) 60% 50%);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { text-decoration: underline; }

.ped-catalog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  color: var(--text-faint);
  text-align: center;
}
.ped-catalog-empty p { margin: 0; font-size: 14px; }

.ped-catalog-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ped-catalog-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: all .15s ease;
}
.ped-catalog-item:hover {
  border-color: hsl(var(--accent-h) 60% 50% / .3);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.pci-info { flex: 1; min-width: 0; }
.pci-name { font-size: 14px; color: var(--text); margin-bottom: 4px; }
.pci-name b { font-weight: 700; }
.pci-pres { color: var(--text-soft); font-weight: 500; margin-left: 4px; }
.pci-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: var(--text-soft);
}
.pci-dose {
  font-weight: 600;
  color: hsl(var(--accent-h) 60% 45%);
}
.pci-actions { display: flex; gap: 4px; }
.icon-btn-danger:hover { color: hsl(0 70% 55%); background: hsl(0 70% 96%); }

.ped-catalog-edit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.ped-catalog-edit-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.med-form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.med-form-grid .col-span-2 { grid-column: span 2; }
.med-form-grid .col-span-4 { grid-column: span 4; }
.med-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ============================================
   PEDIATRIA NOVA PRESCRIÇÃO V2 (split)
   ============================================ */
.ped-novo-v2 { width: 960px !important; }
.ped-novo-v2-body {
  display: flex !important;
  flex-direction: column;
  gap: 14px;
  padding: 18px 22px;
}
.pnv-form-row { display: flex; gap: 12px; }
.pnv-form-row .field { flex: 1; }

.pnv-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  min-height: 360px;
}

.pnv-catalog,
.pnv-selected {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  overflow: hidden;
}
.pnv-catalog-head {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.pnv-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-soft);
}
.pnv-search input {
  flex: 1;
  border: 0;
  background: transparent;
  outline: 0;
  font-size: 13px;
  color: var(--text);
}

.pnv-med-list {
  list-style: none;
  margin: 0;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  max-height: 380px;
}
.pnv-med-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all .12s ease;
}
.pnv-med-item:hover {
  border-color: hsl(var(--accent-h) 60% 50% / .25);
  background: hsl(var(--accent-h) 60% 98%);
}
.pnv-med-item.selected {
  background: hsl(var(--accent-h) 60% 96%);
  border-color: hsl(var(--accent-h) 60% 50% / .5);
}
.pnv-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--border-strong, var(--border));
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  margin-top: 1px;
}
.pnv-med-item.selected .pnv-checkbox {
  background: hsl(var(--accent-h) 60% 50%);
  border-color: hsl(var(--accent-h) 60% 50%);
}
.pnv-med-info { flex: 1; min-width: 0; }
.pnv-med-name {
  font-size: 13.5px;
  color: var(--text);
  margin-bottom: 2px;
}
.pnv-med-name b { font-weight: 700; }
.pnv-med-name span { color: var(--text-soft); margin-left: 4px; }
.pnv-med-meta { font-size: 11.5px; color: var(--text-soft); }

.pnv-selected-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
}
.pnv-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: var(--text-faint);
  font-size: 13px;
  text-align: center;
}
.pnv-sel-list {
  list-style: none;
  margin: 0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: 380px;
}
.pnv-sel-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
}
.pnv-sel-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.pnv-sel-num {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: hsl(var(--accent-h) 60% 50%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  flex-shrink: 0;
}
.pnv-sel-name { flex: 1; min-width: 0; font-size: 13px; }
.pnv-sel-name b { font-weight: 700; }
.pnv-sel-name span { color: var(--text-soft); margin-left: 4px; font-size: 12px; }

.pnv-sel-overrides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mini-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mini-field-wide { grid-column: span 2; }
.mini-field span {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.mini-field input {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 12.5px;
  color: var(--text);
  outline: 0;
}
.mini-field input:focus {
  border-color: hsl(var(--accent-h) 60% 50%);
}

@media (max-width: 900px) {
  .ped-novo-v2 { width: 100vw !important; }
  .pnv-split { grid-template-columns: 1fr; }
  .pnv-med-list, .pnv-sel-list { max-height: 240px; }
  .med-form-grid { grid-template-columns: repeat(2, 1fr); }
  .med-form-grid .col-span-4 { grid-column: span 2; }
}

/* ============================================
   PEDIATRIA CALC MODAL V2 (calcular + editar)
   ============================================ */
.ped-calc-modal-v2 { width: min(880px, 100vw - 32px); max-height: calc(100vh - 32px); }
.ped-calc-body-v2 {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  padding: 18px 20px !important;
  overflow-y: auto;
}

.pcv2-inputs {
  display: grid;
  grid-template-columns: 140px 120px 1fr;
  gap: 12px;
  padding: 12px;
  background: hsl(220 18% 98%);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
@media (max-width: 640px) {
  .pcv2-inputs { grid-template-columns: 1fr 1fr; }
  .pcv2-inputs .field:last-child { grid-column: span 2; }
}

.pcv2-meds {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: white;
  overflow: hidden;
}
.pcv2-meds-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: hsl(220 18% 98%);
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}
.pcv2-meds-head > span { display: inline-flex; align-items: center; gap: 6px; }
.pcv2-meds-actions { display: flex; gap: 6px; }

.pcv2-picker {
  border-bottom: 1px solid var(--border-soft);
  background: hsl(var(--accent-h) 60% 99%);
}
.pcv2-picker-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.pcv2-picker-search input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 13px;
  outline: 0;
}
.pcv2-picker-search input:focus { border-color: hsl(var(--accent-h) 60% 50%); }
.pcv2-picker-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}
.pcv2-picker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  cursor: pointer;
  border-bottom: 1px solid var(--border-soft);
  transition: background .12s;
}
.pcv2-picker-item:last-child { border-bottom: 0; }
.pcv2-picker-item:hover { background: hsl(var(--accent-h) 60% 96%); }
.pcv2-pi-info { flex: 1; min-width: 0; }
.pcv2-pi-name { font-size: 13.5px; }
.pcv2-pi-name b { color: var(--text); }
.pcv2-pi-name span { color: var(--text-soft); }
.pcv2-pi-meta { font-size: 11.5px; color: var(--text-faint); margin-top: 2px; }
.pcv2-picker-empty {
  padding: 20px 12px;
  text-align: center;
  font-size: 13px;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.pcv2-empty {
  padding: 32px 12px;
  text-align: center;
  color: var(--text-faint);
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}
.pcv2-empty p { margin: 0; font-size: 13px; }

.pcv2-med-list { list-style: none; margin: 0; padding: 0; }
.pcv2-med-item {
  border-bottom: 1px solid var(--border-soft);
  transition: background .12s;
}
.pcv2-med-item:last-child { border-bottom: 0; }
.pcv2-med-item.editing { background: hsl(var(--accent-h) 60% 99%); }

.pcv2-med-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
}
.pcv2-med-num {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: hsl(var(--accent-h) 60% 92%);
  color: hsl(var(--accent-h) 60% 35%);
  font-size: 11px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 2px;
}
.pcv2-med-info { flex: 1; min-width: 0; }
.pcv2-med-name { font-size: 14px; line-height: 1.35; }
.pcv2-med-name b { color: var(--text); }
.pcv2-med-pres { color: var(--text-soft); font-weight: 400; }
.pcv2-med-meta { font-size: 12px; color: var(--text-faint); margin-top: 3px; }

.pcv2-med-dose {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pcv2-dose-text {
  font-size: 13.5px;
  font-weight: 600;
  color: hsl(var(--accent-h) 60% 35%);
}
.pcv2-dose-meta { font-size: 11.5px; color: var(--text-soft); }
.pcv2-dose-cond { font-size: 11.5px; color: var(--text-faint); font-style: italic; }
.pcv2-dose-alert {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: hsl(30 80% 40%);
  background: hsl(40 90% 95%);
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 3px;
  width: fit-content;
}

.pcv2-med-actions { display: flex; gap: 4px; }
.icon-btn-danger:hover { color: hsl(0 70% 50%); background: hsl(0 70% 96%); }

.pcv2-med-edit {
  padding: 0 12px 12px 44px;
  background: white;
  border-top: 1px dashed var(--border-soft);
}
.pcv2-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 10px;
  padding-top: 10px;
}
.pcv2-edit-grid .mini-field-wide { grid-column: span 2; }

.pcv2-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: hsl(40 90% 96%);
  border: 1px solid hsl(40 80% 85%);
  border-radius: 8px;
  font-size: 12.5px;
  color: hsl(30 60% 35%);
}

@media (max-width: 640px) {
  .pcv2-meds-head { flex-direction: column; align-items: stretch; gap: 8px; }
  .pcv2-meds-actions { flex-wrap: wrap; }
  .pcv2-edit-grid { grid-template-columns: 1fr; }
  .pcv2-edit-grid .mini-field-wide { grid-column: span 1; }
  .pcv2-med-edit { padding-left: 12px; }
}

/* ============================================
   "Cadastrar novo medicamento" botão destacado
   ============================================ */
.pnv-cadastrar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: white;
  border: 2px dashed hsl(var(--accent-h) 60% 70%);
  color: hsl(var(--accent-h) 60% 40%);
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.pnv-cadastrar-btn:hover {
  background: hsl(var(--accent-h) 60% 97%);
  border-color: hsl(var(--accent-h) 60% 50%);
  border-style: solid;
}
.pnv-cadastrar-btn:active { transform: scale(0.98); }
