/* Painel do Good Vet (complementa o style.css) */
.brand-bag { background: url('/img/logo-mark.svg') center / cover no-repeat; }
.thumb { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; background: #f1f2f6; display: inline-grid; place-items: center; vertical-align: middle; }
.photo-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.photo-grid a, .photo-grid figure { margin: 0; width: 86px; height: 86px; border-radius: 12px; overflow: hidden; background: #f1f2f6; display: block; }
.photo-grid img { width: 100%; height: 100%; object-fit: cover; }
.late { color: var(--danger); font-weight: 700; }
.ok-txt { color: #15803d; font-weight: 700; }
.alerta { color: #b45309; font-weight: 700; margin: 4px 0 0; }
.plain { margin: 0; padding-left: 18px; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.main-head h2 { margin: 0; }
.table-wrap + .main-head, .table-wrap + h2 { margin-top: 28px; }
td.acts { white-space: nowrap; } td.acts .btn + .btn { margin-left: 6px; }
tr.inativo td { opacity: .55; }
.modal-wide { width: min(860px, 100%); }
.big-total { font-size: 1.25rem; text-align: right; margin: 12px 0 0; }

/* Situações */
.badge.ok { background: #dcfce7; color: #15803d; }
.badge.off { background: #f1f3f7; color: #64748b; }
.badge.warn { background: #fef3c7; color: #b45309; }
.badge.crit { background: #fee2e2; color: #b91c1c; }
.badge.ag-agendado { background: var(--primary-soft); color: var(--primary-dark); }
.badge.ag-confirmado { background: #e0f2fe; color: #0369a1; }
.badge.ag-chegou { background: #fef3c7; color: #b45309; }
.badge.ag-atendimento { background: #ede9fe; color: #6d28d9; }
.badge.ag-finalizado { background: #dcfce7; color: #15803d; }
.badge.ag-faltou { background: #ffe4e6; color: var(--danger); }
.badge.ag-cancelado { background: #f1f3f7; color: #64748b; }
.badge.risco-estavel { background: #dcfce7; color: #15803d; }
.badge.risco-atencao { background: #fef3c7; color: #b45309; }
.badge.risco-critico { background: #fee2e2; color: #b91c1c; }

/* Pacientes */
.pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.pet-card { display: flex; gap: 12px; align-items: flex-start; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; font: inherit; color: inherit; transition: border-color .15s, box-shadow .15s; }
.pet-card:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.pet-card.off { opacity: .6; }
.pet-card span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pet-card small { font-size: .8rem; }
.pet-photo { border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: var(--primary-soft); }
.pet-emoji { display: inline-grid; place-items: center; }
.pac-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 14px; }
.pac-head > div:first-of-type, .pac-head > div:nth-of-type(1) { flex: 1 1 320px; min-width: 0; }
.pac-head h1 { margin: 0 0 4px; }
.pac-head p { margin: 2px 0; }
.tutor-box { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; padding: 14px 18px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.tabs button { border: 0; background: none; font: inherit; font-weight: 700; color: var(--muted); padding: 10px 14px; cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs button.on { color: var(--primary-dark); border-bottom-color: var(--primary); }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.grid2 .card { margin: 0; }
.peso-graf { width: 100%; max-width: 420px; height: auto; }

/* Atendimento */
.at-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; align-items: start; }
.at-grid > div { min-width: 0; }
.at-grid .card { margin-bottom: 18px; }
.exame-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0 12px; }
.rx-item { border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px 10px; margin-bottom: 10px; background: #fafbfd; }
.dose-res { font-size: 1.15rem; background: var(--primary-soft); border-radius: 14px; padding: 14px 16px; margin: 6px 0 12px; }
.dose-res .big { font-size: 1.6rem; color: var(--primary-dark); }
@media (max-width: 900px) { .at-grid { grid-template-columns: minmax(0, 1fr); } }

/* Agenda da semana */
.semana { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; overflow-x: auto; }
.semana-dia { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 10px; min-height: 160px; }
.semana-dia.hoje { border-color: var(--primary); box-shadow: inset 0 3px 0 var(--primary); }
.semana-dia h4 { margin: 0 0 8px; font-size: .85rem; text-transform: capitalize; }
.ag-card { display: block; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--primary); background: var(--primary-soft); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px; font: inherit; font-size: .82rem; cursor: pointer; color: inherit; }
.ag-card small { display: block; color: var(--muted); }
.ag-card.ag-finalizado { border-left-color: #15803d; background: #f0fdf4; }
.ag-card.ag-cancelado, .ag-card.ag-faltou { border-left-color: #94a3b8; background: #f8fafc; opacity: .7; }
.ag-card.ag-chegou, .ag-card.ag-atendimento { border-left-color: #b45309; background: #fffbeb; }

/* Internação */
.quadro { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.leito { display: flex; flex-direction: column; gap: 4px; text-align: left; background: var(--surface); border: 2px solid var(--border); border-radius: 16px; padding: 14px; font: inherit; color: inherit; cursor: pointer; min-height: 150px; }
.leito.livre { border-style: dashed; background: #fafbfd; cursor: default; justify-content: center; align-items: center; }
.leito.risco-b-atencao { border-color: #fcd34d; }
.leito.risco-b-critico { border-color: #f87171; background: #fff7f7; }
.leito.tem-atraso { box-shadow: 0 0 0 3px #fecaca; }
.leito-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.leito-pet { font-size: 1.05rem; }
.leito-tasks { font-size: .85rem; margin-top: auto; }
.folha-wrap { overflow-x: auto; }
table.folha { border-collapse: collapse; min-width: 100%; }
table.folha th, table.folha td { border: 1px solid var(--border); padding: 6px; vertical-align: top; font-size: .82rem; white-space: nowrap; }
table.folha td:first-child, table.folha th:first-child { position: sticky; left: 0; background: var(--surface); white-space: normal; min-width: 220px; z-index: 1; }
table.folha tr.suspensa td:first-child { opacity: .55; }
.tarefa { display: inline-block; border: 0; border-radius: 8px; padding: 4px 7px; margin: 1px; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.tarefa.feita { background: #dcfce7; color: #15803d; }
.tarefa.pendente { background: #e0f2fe; color: #0369a1; }
.tarefa.atrasada { background: #fee2e2; color: #b91c1c; }
.tarefa.pulada { background: #f1f3f7; color: #64748b; }
.legenda .tarefa { cursor: default; }
@media (max-width: 860px) { table.folha td:first-child, table.folha th:first-child { min-width: 160px; } }
.pwa-box { margin-top: 12px; }
@media (max-width: 860px) { .pwa-box { display: none; } }
