/* Componentes das telas dinâmicas (prontuário, financeiro, funcionários, login). Mesma paleta do protótipo. */
[hidden] { display: none !important; } /* vence o display inline das telas do protótipo */
.card { background: #fff; border: 1px solid #E1E6E2; border-radius: 14px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card h2 { margin: 0; font-size: 17px; font-weight: 700; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.muted { color: #5B6B63; font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid #C9D4CD; background: #fff; color: #17211C; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; box-sizing: border-box; }
.btn:hover { border-color: #1F6F54; }
.btn.primary { background: #1F6F54; border-color: #1F6F54; color: #fff; }
.btn.primary:hover { background: #17573F; }
.btn.ghost { border-color: transparent; background: transparent; color: #1F6F54; padding: 0 8px; }
.btn:disabled { opacity: .55; cursor: progress; }
.btn:focus-visible, .field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid #1F6F54; outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: #4A5751; min-width: 0; }
.field input, .field select, .field textarea { min-height: 42px; padding: 0 12px; border-radius: 8px; border: 1px solid #C9D4CD; font: inherit; font-size: 14px; font-weight: 500; color: #17211C; background: #fff; box-sizing: border-box; width: 100%; }
.field textarea { padding: 10px 12px; min-height: 80px; resize: vertical; line-height: 1.5; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding: 16px; border-radius: 12px; background: #F7F9F7; border: 1px solid #E1E6E2; }
.form .full { grid-column: 1 / -1; }
.pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: #EEF1EE; color: #4A5751; }
.pill.ok { background: #DDF0E6; color: #17573F; }
.pill.warn { background: #FDF1E3; color: #8A4B0B; }
.pill.bad { background: #FDECEA; color: #9F1D14; }
.pill.info { background: #E8EEFD; color: #1E40AF; }
.list > * { padding: 12px 0; border-top: 1px solid #EEF1EE; }
.list > *:first-child { border-top: 0; }
.empty { padding: 24px; text-align: center; color: #5B6B63; font-size: 14px; border: 1px dashed #C9D4CD; border-radius: 12px; }
.error { padding: 10px 12px; border-radius: 8px; background: #FDECEA; color: #9F1D14; font-size: 13px; font-weight: 600; }
.timeline { display: flex; flex-direction: column; }
.tl { display: flex; gap: 14px; }
.tl .dot { display: flex; flex-direction: column; align-items: center; }
.tl .dot span:first-child { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; }
.tl .dot span:last-child { flex: 1; width: 2px; background: #E1E6E2; }
.tl:last-child .dot span:last-child { display: none; }
.tl .body { flex: 1; display: flex; flex-direction: column; gap: 4px; padding-bottom: 18px; min-width: 0; }
.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-size: 12px; font-weight: 600; color: #5B6B63; padding: 10px 12px; background: #F7F9F7; white-space: nowrap; }
.t td { padding: 12px; border-top: 1px solid #EEF1EE; vertical-align: top; }
.scroll { overflow-x: auto; }
.ai { border: 1px solid #CFE5DA; background: #F6FBF8; border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ai-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: #17573F; }
.kpi { background: #fff; border: 1px solid #E1E6E2; border-radius: 14px; padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.kpi .label { font-size: 13px; font-weight: 500; color: #5B6B63; }
.kpi .value { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.kpi .delta { font-size: 13px; font-weight: 600; }
.up { color: #1F6F54; } .down { color: #B42318; }
.chart { position: relative; height: 280px; }
.chart.sm { height: 220px; }
.seg { display: inline-flex; background: #E7ECE8; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; min-height: 36px; padding: 0 14px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: #4A5751; cursor: pointer; }
.seg button[aria-pressed="true"] { background: #fff; color: #17211C; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100% - 32px)); box-shadow: 0 24px 64px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(18, 55, 42, .45); }
dialog form { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
dialog h2 { margin: 0; font-size: 19px; }
