/* FELIPE-DOLOROSO — tokens e componentes adaptados do design ORTO-DESK.
   Light + dark, sem dependências externas além do Inter via Google Fonts. */

:root {
  --bg-main: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f4f4f5;
  --bg-active: #ececef;
  --bg-subtle: #f9fafb;
  --bg-toolbar: #fafafa;

  --border: #ececec;
  --border-strong: #d4d4d8;

  --text-primary: #18181b;
  --text-secondary: #71717a;
  --text-muted: #a1a1aa;

  --accent: #5e6ad2;
  --accent-bg: #eeeefb;
  --accent-text: #1e1b4b;

  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --warn: #c2410c;
  --warn-bg: #fff7ed;
  --info: #1d4ed8;
  --info-bg: #eff6ff;
  --ok: #047857;
  --ok-bg: #ecfdf5;

  --tag-noci: #3b82f6;
  --tag-neuro: #8b5cf6;
  --tag-mista: #f59e0b;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);

  --radius: 6px;
  --radius-sm: 4px;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg-main: #0e0e10;
  --bg-card: #18181b;
  --bg-hover: #27272a;
  --bg-active: #2e2a4d;
  --bg-subtle: #1c1c1f;
  --bg-toolbar: #1c1c1f;

  --border: #27272a;
  --border-strong: #3f3f46;

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;

  --accent: #818cf8;
  --accent-bg: #2e2a4d;
  --accent-text: #c7d2fe;

  --danger: #ef4444;
  --danger-bg: #4c0519;
  --warn: #fb923c;
  --warn-bg: #431407;
  --info: #60a5fa;
  --info-bg: #0c1e3d;
  --ok: #10b981;
  --ok-bg: #052e16;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);

  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-feature-settings: "cv11", "ss01";
  font-size: 14px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  background: var(--bg-main);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background 200ms ease, color 200ms ease;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-main);
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar-left { display: flex; align-items: center; gap: 10px; }
.logo {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; letter-spacing: -0.015em;
}
.logo-mark {
  width: 10px; height: 10px; border-radius: 50%; background: var(--accent);
}
.brand-title {
  font-size: 14px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--text-primary);
}
.made-by {
  font-size: 10.5px; color: var(--text-muted);
  letter-spacing: 0.05em; margin-left: 6px;
}
@media (max-width: 600px) {
  .made-by { display: none; }
}
.topbar-center { display: flex; align-items: center; gap: 8px; }
.topbar-right { display: flex; align-items: center; gap: 6px; }

/* ---------- Botões ---------- */
.btn {
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: transparent;
  color: var(--text-primary);
  transition: background 100ms ease, border-color 100ms ease, color 100ms ease;
}
.btn:disabled { cursor: not-allowed; opacity: 0.6; }
.btn-primary { background: var(--text-primary); color: var(--bg-main); }
.btn-primary:hover:not(:disabled) { opacity: 0.9; }
.btn-secondary { border-color: var(--border-strong); }
.btn-secondary:hover:not(:disabled) { background: var(--bg-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { filter: brightness(0.92); }

.btn-icon {
  width: 32px; height: 32px;
  border: none; background: transparent;
  border-radius: var(--radius);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-secondary);
  font-size: 16px; line-height: 1;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text-primary); }

/* ---------- Layout ---------- */
.content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 16px;
  align-items: start;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.card-header { margin-bottom: 12px; }
.card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.card-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }

/* ---------- Inputs ---------- */
.input, .select, textarea.input {
  width: 100%;
  height: 32px;
  padding: 0 10px;
  background: var(--bg-main);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  font: inherit;
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color 100ms ease, background 100ms ease;
}
textarea.input { height: auto; padding: 8px 10px; resize: vertical; min-height: 64px; }
.input:focus, .select:focus, textarea.input:focus {
  outline: none; border-color: var(--accent);
}
.field { display: flex; flex-direction: column; gap: 4px; }
.field-label {
  font-size: 11.5px; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.row {
  display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* ---------- EVA slider ---------- */
.eva-wrap { display: flex; flex-direction: column; gap: 10px; }
.eva-value {
  font-size: 56px; font-weight: 600;
  line-height: 1; letter-spacing: -0.04em;
  color: var(--text-primary);
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.eva-label {
  text-align: center; font-size: 12px;
  color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em;
}
.eva-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 12px; border-radius: 6px;
  background: linear-gradient(90deg, #10b981 0%, #facc15 50%, #ef4444 100%);
  outline: none;
}
.eva-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-main); border: 3px solid var(--text-primary);
  cursor: pointer; box-shadow: var(--shadow-md);
}
.eva-slider::-moz-range-thumb {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-main); border: 3px solid var(--text-primary);
  cursor: pointer;
}
.eva-ticks {
  display: flex; justify-content: space-between;
  font-size: 11px; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- DN4 grid ---------- */
.dn4-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}
.dn4-section-title {
  grid-column: 1 / -1;
  font-size: 11.5px; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.05em;
  margin-top: 4px;
}
.check {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  user-select: none;
  transition: background 100ms ease, border-color 100ms ease;
  min-height: 44px; /* touch target iOS */
}
.check:hover { background: var(--bg-hover); }
.check input { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }
.check input:checked + span { font-weight: 500; }
.check.checked { background: var(--accent-bg); border-color: var(--accent); }

.dn4-score {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.dn4-score.positive { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-text); }

/* ---------- Tags (classificação) ---------- */
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px; font-weight: 500;
  color: #fff;
}
.tag.noci  { background: var(--tag-noci); }
.tag.neuro { background: var(--tag-neuro); }
.tag.mista { background: var(--tag-mista); }
.tag.none  { background: var(--text-muted); }

/* ---------- Resumo (sticky) ---------- */
.summary {
  position: sticky;
  top: 68px;
  display: flex; flex-direction: column; gap: 12px;
}

.summary .card { margin-bottom: 0; }

.summary-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 4px 0;
}
.summary-key { color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.summary-val { font-weight: 500; font-variant-numeric: tabular-nums; }

.rx-item {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 6px;
}
.rx-item:last-child { margin-bottom: 0; }
.rx-drug { font-weight: 600; font-size: 13px; }
.rx-dose { font-size: 12.5px; color: var(--text-primary); margin-top: 2px; }
.rx-note { font-size: 11.5px; color: var(--text-secondary); margin-top: 4px; font-style: italic; }

.alert {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 12.5px;
  border-left: 3px solid;
  margin-bottom: 6px;
}
.alert:last-child { margin-bottom: 0; }
.alert.warn   { background: var(--warn-bg);   border-color: var(--warn);   color: var(--warn); }
.alert.danger { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.alert.info   { background: var(--info-bg);   border-color: var(--info);   color: var(--info); }

.disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin: 20px auto;
  padding: 0 20px;
  max-width: 800px;
  line-height: 1.5;
}

.site-credit {
  font-size: 10.5px;
  color: var(--text-muted);
  text-align: center;
  margin: 4px auto 20px;
  padding: 0 20px;
  letter-spacing: 0.04em;
  opacity: 0.7;
}
@media print {
  .site-credit { display: none !important; }
}

.empty {
  text-align: center; color: var(--text-muted); font-size: 12.5px;
  padding: 8px 0;
}

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}
.login-title {
  font-size: 18px; font-weight: 600; letter-spacing: -0.015em;
  margin-bottom: 4px; text-align: center;
}
.login-sub {
  font-size: 12.5px; color: var(--text-secondary);
  text-align: center; margin-bottom: 18px;
}
.login-card form { display: flex; flex-direction: column; gap: 12px; }
.login-card .btn-primary { width: 100%; height: 36px; }

.error-line {
  margin-top: 10px;
  padding: 8px 10px;
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 12.5px; font-weight: 500;
  text-align: center;
}

/* ---------- Tela de pacientes (lista de cards) ---------- */
.patients-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}
.patients-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.patients-title {
  font-size: 22px; font-weight: 600; letter-spacing: -0.02em;
}
.patients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 16px;
}
.patients-empty {
  margin: 40px auto; text-align: center;
}

.patient-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--text-muted);
  border-radius: var(--radius);
  padding: 16px 20px;
  cursor: pointer;
  transition: border-color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}
.patient-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.patient-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.patient-card[data-cor="neutro"]   { border-left-color: var(--text-muted); }
.patient-card[data-cor="primeira_consulta"] { border-left: 4px dashed var(--text-muted); }
.patient-card[data-cor="verde"]    { border-left-color: #2d5a3d; }
.patient-card[data-cor="amarelo"]  { border-left-color: #b8860b; }
.patient-card[data-cor="laranja"]  { border-left-color: #a8470e; }
.patient-card[data-cor="vermelho"] { border-left-color: #9b2226; }

.patient-card-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
}
.patient-info { min-width: 0; }
.patient-info h3 {
  margin: 0 0 4px;
  font-size: 16px; font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.patient-info .meta {
  color: var(--text-secondary); font-size: 13px; margin: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.patient-info .last {
  color: var(--text-muted); font-size: 12px; margin: 6px 0 0;
}

.aderencia-tag {
  font-size: 11.5px; font-weight: 500;
  padding: 3px 10px; border-radius: 999px;
  background: var(--bg-subtle); color: var(--text-secondary);
  white-space: nowrap; flex-shrink: 0;
}
.aderencia-tag[data-cor="neutro"]   { background: var(--bg-subtle);          color: var(--text-muted); }
.aderencia-tag[data-cor="primeira_consulta"] {
  background: rgba(139,142,148,0.14); color: var(--text-secondary);
  border: 1px dashed var(--text-muted);
}
.aderencia-tag[data-cor="verde"]    { background: rgba(45,90,61,0.18);   color: #5fa874; }
.aderencia-tag[data-cor="amarelo"]  { background: rgba(184,134,11,0.18); color: #d4a843; }
.aderencia-tag[data-cor="laranja"]  { background: rgba(168,71,14,0.18);  color: #d97d3d; }
.aderencia-tag[data-cor="vermelho"] { background: rgba(155,34,38,0.20);  color: #d96570; }

/* ---------- Pills (filtros temporais) + Tabs (médico) ---------- */
.filters-bar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 14px;
}
.pills, .tabs {
  display: inline-flex; gap: 4px; flex-wrap: wrap;
}
.pill, .tab {
  font-size: 11.5px;
  padding: 6px 12px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 999px;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: background 100ms ease, color 100ms ease, border-color 100ms ease;
}
.pill:hover, .tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.pill.active, .tab.active {
  background: var(--text-primary);
  color: var(--bg-main);
  border-color: var(--text-primary);
}
.custom-range {
  display: inline-flex; gap: 6px; align-items: center;
  font-size: 12px; color: var(--text-secondary);
}
.custom-range input[type="date"] {
  padding: 4px 8px; border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--bg-main); color: var(--text-primary); font-size: 12px;
}

/* doctor tag no card */
.doctor-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10.5px; padding: 2px 8px;
  border-radius: 999px;
  color: #fff;
  margin-top: 4px;
}
.doctor-tag::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.6;
}

/* search box */
.search-box {
  height: 30px; padding: 0 10px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--bg-main); color: var(--text-primary);
  font-size: 12.5px; min-width: 200px;
}

.patient-card-expand {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.expand-rx-title {
  margin-top: 12px;
  font-size: 11.5px; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.expand-rx { margin-top: 6px; }
.expand-actions {
  display: flex; gap: 8px; margin-top: 14px;
}
.expand-actions .btn { flex: 1; }

/* ---------- Modal (Evolução SOAP) ---------- */
.modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000;
  padding: 24px;
}
.modal[hidden] { display: none !important; }
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: min(820px, 100%);
  max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-md);
}
.modal-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 {
  font-size: 15px; font-weight: 600; margin: 0;
  letter-spacing: -0.01em;
}
.modal-close {
  background: none; border: none; cursor: pointer;
  font-size: 16px; line-height: 1; padding: 6px 8px;
  color: var(--text-secondary); border-radius: var(--radius);
}
.modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
#evolucaoText {
  flex: 1; min-height: 320px;
  padding: 14px 18px;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 12.5px; line-height: 1.55;
  background: var(--bg-subtle);
  color: var(--text-primary);
  border: none; resize: vertical;
  white-space: pre-wrap;
  overflow: auto;
}
#evolucaoText:focus { outline: none; }
.modal-actions {
  display: flex; gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

@media (max-width: 600px) {
  .modal { padding: 0; }
  .modal-content {
    max-height: 100vh; height: 100vh;
    border-radius: 0; width: 100%;
  }
  .modal-actions { flex-direction: column-reverse; }
  .modal-actions .btn { width: 100%; height: 38px; }
}

/* ---------- Modal Receita (largo, com grupos editáveis) ---------- */
.modal-wide .modal-content { width: min(960px, 100%); }

.modal-body {
  padding: 16px 18px; overflow-y: auto;
  flex: 1; min-height: 0;
}
.modal-body .hint { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 12px; }
.modal-body .hint-warn { font-size: 12px; color: var(--warn); margin: 8px 0; }

.rx-grupo { margin-bottom: 18px; }
.rx-grupo-titulo {
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-secondary);
  margin-bottom: 10px;
  border-bottom: 1px solid var(--border); padding-bottom: 4px;
}
.rx-grupo-b .rx-grupo-titulo { color: #1d4ed8; border-bottom-color: #93c5fd; }
.rx-grupo-a {
  background: rgba(184, 134, 11, 0.08);
  border: 1px solid rgba(184, 134, 11, 0.4);
  padding: 12px; border-radius: var(--radius);
}
.rx-grupo-a .rx-grupo-titulo {
  color: var(--warn); border-bottom-color: rgba(184, 134, 11, 0.3);
}
#rxTextoA {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 10px 12px;
  font-family: "JetBrains Mono", "SF Mono", Menlo, monospace;
  font-size: 11px; line-height: 1.5;
  white-space: pre-wrap;
  max-height: 200px; overflow-y: auto;
  border-radius: var(--radius); margin: 6px 0;
}

.rx-item-edit {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 10px;
  background: var(--bg-main);
}
.rx-item-edit.unchecked { opacity: 0.5; }
.rx-item-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 10px;
}
.rx-item-drug { font-weight: 600; font-size: 13px; }
.rx-item-toggle { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.rx-item-note { font-size: 11.5px; color: var(--text-muted); font-style: italic; margin-top: 4px; }

.rx-item-fields {
  display: grid; gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.rx-item-fields label {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11px; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.04em;
}
.rx-item-fields input {
  padding: 6px 8px; font-size: 12.5px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--bg-main); color: var(--text-primary);
}
.rx-item-fields input:focus { outline: none; border-color: var(--accent); }
.rx-item-fields label.full { grid-column: 1 / -1; }

/* ---------- Tela /config ---------- */
.config-page {
  max-width: 720px; margin: 0 auto;
  padding: 24px 20px 60px;
}
.config-page h1 {
  font-size: 20px; font-weight: 600; letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.config-section { margin-bottom: 20px; }
.config-section h2 {
  font-size: 12px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-secondary);
  margin-bottom: 10px;
}

/* ---------- Responsivo (iPhone do Felipe) ---------- */
@media (max-width: 900px) {
  .content {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .summary { position: static; }
  .topbar { padding: 0 12px; }
  .topbar .logo-text { display: none; }
}

@media (max-width: 480px) {
  .row { grid-template-columns: 1fr; }
  .eva-value { font-size: 44px; }
  .btn { height: 36px; } /* touch */
  .btn-icon { width: 36px; height: 36px; }
}

/* ---------- Print (PDF do resumo) ---------- */
@media print {
  body { background: #fff !important; color: #000 !important; }
  .topbar, .form-side, .actions-bar, .btn, button { display: none !important; }
  .content {
    display: block !important; padding: 0 !important; max-width: none !important;
  }
  .summary { position: static !important; }
  .card {
    border: 1px solid #ccc !important; box-shadow: none !important;
    page-break-inside: avoid;
  }
  .disclaimer { display: block !important; color: #555 !important; }
  .print-header {
    display: block !important;
    border-bottom: 2px solid #000;
    margin-bottom: 12px; padding-bottom: 8px;
  }
}
.print-header { display: none; }
