/* DSAM Saúde — design system v2 "Digital Vitality"
   Shell estilo clínica: header fixo + rail de ícones com submenu no hover +
   menu gaveta. Azul petróleo, Manrope, cantos suaves, sombras tintadas. */
:root {
  --primary: #2b506e;          /* azul petróleo */
  --primary-dark: #0f3956;
  --primary-soft: #e3edf5;     /* frosted sky */
  --success: #00c853;
  --bg: #f4f7fa;               /* ice */
  --card: #ffffff;
  --text: #1a2530;
  --muted: #64748b;
  --border: #e2e8f0;
  --input-bg: #f1f5f9;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow: 0 8px 24px rgba(15, 57, 86, .08);
  --shadow-soft: 0 2px 10px rgba(15, 57, 86, .06);
  --appbar-h: 60px;
  --rail-w: 68px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Manrope", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
       background: var(--bg); color: var(--text); font-size: 16px; line-height: 1.55; }
a { color: var(--primary); }
h1 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: var(--primary-dark); margin: 0 0 6px; }
h2 { font-size: 1.16rem; font-weight: 800; letter-spacing: -.01em; color: var(--primary-dark); }
h3 { font-size: 1.02rem; font-weight: 700; margin: 0 0 4px; color: var(--primary-dark); }
.page-sub { color: var(--muted); margin: 0 0 20px; font-size: .95rem; }

/* ícones SVG (sprite no base.html) */
.ico { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2;
       stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; display: inline-block;
       vertical-align: middle; }
.ico-sm { width: 16px; height: 16px; }
.ico-lg { width: 26px; height: 26px; }

/* ================================================================ header fixo */
.appbar { position: fixed; top: 0; left: 0; right: 0; height: var(--appbar-h); z-index: 500;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 14px 0 10px; background: rgba(255, 255, 255, .94); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); }
.appbar-left, .appbar-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none;
  color: var(--primary-dark); min-width: 0; }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text b { font-weight: 800; font-size: .98rem; letter-spacing: -.01em; white-space: nowrap; }
.brand-text small { color: var(--muted); font-size: .72rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 420px) { .brand-text small { display: none; } }

.appbar-search { display: flex; align-items: center; gap: 8px; background: var(--input-bg);
  border: 1.5px solid transparent; border-radius: 999px; padding: 7px 16px; width: 300px;
  color: var(--muted); transition: border-color .15s, background .15s, width .2s; }
.appbar-search:focus-within { border-color: var(--primary); background: #fff; width: 340px; }
.appbar-search .ico { width: 18px; height: 18px; }
.appbar-search input { border: none; background: none; padding: 0; margin: 0; font-size: .92rem;
  font-family: inherit; color: var(--text); width: 100%; }
.appbar-search input:focus { outline: none; }
@media (max-width: 860px) { .appbar-search { display: none; } }
.only-mobile { display: none !important; }
@media (max-width: 860px) { .only-mobile { display: inline-flex !important; } }

.search-row { position: fixed; top: var(--appbar-h); left: 0; right: 0; z-index: 490;
  display: none; align-items: center; gap: 10px; padding: 10px 16px; background: #fff;
  border-bottom: 1px solid var(--border); color: var(--muted); }
.search-row .ico { width: 18px; height: 18px; }
.search-row input { border: none; background: none; padding: 6px 0; margin: 0; font-size: 1rem;
  font-family: inherit; color: var(--text); width: 100%; }
.search-row input:focus { outline: none; }
body.search-open .search-row { display: flex; }
body.search-open .page { padding-top: calc(var(--appbar-h) + 54px); }

.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px;
  height: 40px; border-radius: 12px; border: none; background: transparent; color: var(--primary-dark);
  cursor: pointer; position: relative; text-decoration: none; transition: background .15s; padding: 0; }
.icon-btn:hover, .icon-btn:focus-visible { background: var(--primary-soft); outline: none; }
.icon-btn.danger { color: #b91c1c; }
.icon-btn.danger:hover { background: #fee2e2; }

.bell-badge { position: absolute; top: 4px; right: 3px; background: #dc2626; color: #fff;
  border-radius: 999px; font-size: .64rem; font-weight: 800; padding: 1px 5px; line-height: 1.3;
  border: 2px solid #fff; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 36px;
  height: 36px; border-radius: 50%; background: var(--primary-dark); color: #fff;
  font-weight: 800; font-size: .95rem; flex-shrink: 0; user-select: none; }

/* tooltips dos botões gráficos */
[data-tip] { position: relative; }
[data-tip]::after { content: attr(data-tip); position: absolute; top: calc(100% + 7px); left: 50%;
  transform: translateX(-50%) scale(.94); background: var(--primary-dark); color: #fff;
  font-size: .74rem; font-weight: 600; font-family: "Manrope", sans-serif; padding: 5px 10px;
  border-radius: 8px; white-space: nowrap; opacity: 0; pointer-events: none;
  transition: opacity .12s ease, transform .12s ease; z-index: 700; letter-spacing: 0; }
[data-tip]:hover::after, [data-tip]:focus-visible::after { opacity: 1;
  transform: translateX(-50%) scale(1); }

/* ================================================================ rail lateral */
.siderail { position: fixed; top: var(--appbar-h); left: 0; bottom: 0; width: var(--rail-w);
  z-index: 450; display: flex; flex-direction: column; justify-content: space-between;
  align-items: center; padding: 12px 0; background: #fff; border-right: 1px solid var(--border); }
.siderail nav { display: flex; flex-direction: column; gap: 4px; align-items: center; width: 100%; }
.rail-item { position: relative; width: 100%; display: flex; justify-content: center; }
.rail-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px;
  height: 44px; border-radius: 13px; color: var(--muted); border: none; background: transparent;
  cursor: pointer; position: relative; text-decoration: none; transition: background .15s, color .15s; }
.rail-item:hover .rail-btn, .rail-btn:focus-visible { background: var(--primary-soft);
  color: var(--primary-dark); outline: none; }
.rail-item.is-active .rail-btn { background: var(--primary-dark); color: #fff; }
.rail-dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: #dc2626; border: 2px solid #fff; }
.rail-item.is-active .rail-dot { border-color: var(--primary-dark); }
.rail-exit { margin-top: 8px; }
.rail-exit .rail-btn:hover { background: #fee2e2; color: #b91c1c; }

/* submenu flutuante no hover */
.rail-fly { position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%);
  background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow);
  padding: 8px; min-width: 190px; display: none; z-index: 600; }
.rail-item:hover .rail-fly, .rail-item:focus-within .rail-fly { display: block; }
.rail-fly::before { content: ""; position: absolute; left: -10px; top: 0; bottom: 0; width: 12px; }
.rail-fly-title { font-weight: 800; font-size: .82rem; color: var(--primary-dark);
  padding: 6px 10px 6px; letter-spacing: -.01em; }
.rail-fly a { display: block; padding: 8px 10px; border-radius: 9px; text-decoration: none;
  font-size: .88rem; font-weight: 600; color: var(--text); }
.rail-fly a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.rail-fly a[aria-current="page"] { background: var(--primary-dark); color: #fff; }
@media (max-width: 899px) { .siderail { display: none; } }

/* ================================================================ menu gaveta */
.scrim { position: fixed; inset: 0; z-index: 640; background: rgba(15, 35, 52, .5);
  backdrop-filter: blur(2px); }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; z-index: 650; width: min(320px, 88vw);
  background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column;
  transform: translateX(-102%); transition: transform .22s ease; }
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--border); }
.drawer-nav { flex: 1; overflow-y: auto; padding: 12px; }
.drawer-link { display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border-radius: 12px; text-decoration: none; color: var(--text); font-weight: 700;
  font-size: .94rem; margin-bottom: 2px; }
.drawer-link .ico { color: var(--muted); }
.drawer-link:hover { background: var(--primary-soft); color: var(--primary-dark); }
.drawer-link:hover .ico { color: var(--primary-dark); }
.drawer-link.is-active { background: var(--primary-dark); color: #fff; }
.drawer-link.is-active .ico { color: #fff; }
.drawer-link .badge { margin-left: auto; }
.drawer-group { margin: 6px 0 2px; }
.drawer-group-label { display: flex; align-items: center; gap: 12px; padding: 11px 12px 5px;
  font-weight: 800; font-size: .94rem; color: var(--primary-dark); }
.drawer-group-label .ico { color: var(--muted); }
.drawer-sub { display: block; padding: 9px 12px 9px 46px; border-radius: 12px;
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: .9rem; }
.drawer-sub:hover { background: var(--primary-soft); color: var(--primary-dark); }
.drawer-sub.is-active { background: var(--primary-dark); color: #fff; }
.drawer-foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-top: 1px solid var(--border); }
.drawer-user { flex: 1; min-width: 0; font-size: .84rem; font-weight: 600; color: var(--muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ================================================================ página */
.page { padding-top: var(--appbar-h); min-height: 100vh; display: flex; flex-direction: column; }
body.has-shell .page { margin-left: var(--rail-w); }
@media (max-width: 899px) { body.has-shell .page { margin-left: 0; } }
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 26px 22px 40px; flex: 1; }
@media (max-width: 560px) { .container { padding: 18px 14px 32px; } }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  flex-wrap: wrap; max-width: 1120px; width: 100%; margin: 0 auto; color: var(--muted);
  font-size: .84rem; padding: 18px 22px 26px; }
.footer a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted);
  text-decoration: none; font-weight: 600; }
.footer a:hover { color: var(--primary); }

.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px;
  flex-wrap: wrap; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head .page-sub { margin: 2px 0 0; }

/* ================================================================ cards */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; margin-bottom: 20px; box-shadow: var(--shadow-soft); }
@media (max-width: 560px) { .card { padding: 18px 16px; border-radius: var(--radius); } }
.card.narrow { max-width: 600px; margin-left: auto; margin-right: auto; }
.card.center { text-align: center; }
.card-dashed { border-style: dashed; text-align: center; box-shadow: none; background: transparent; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px;
  margin-bottom: 20px; }
.cards .card { margin-bottom: 0; transition: box-shadow .18s ease, transform .18s ease; }
.cards .card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
@media (max-width: 899px) { .card:has(> .table) { overflow-x: auto; } }

/* KPIs (dashboard) */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 16px;
  margin: 0 0 20px; }
.kpi { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; box-shadow: var(--shadow-soft); }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.kpi-chip { display: inline-flex; align-items: center; justify-content: center; width: 46px;
  height: 46px; border-radius: 14px; }
.chip-navy { background: var(--primary-soft); color: var(--primary-dark); }
.chip-blue { background: #e0edff; color: #1d4ed8; }
.chip-green { background: #ddf7e5; color: #15803d; }
.chip-red { background: #fee2e2; color: #dc2626; }
.chip-teal { background: #d7f0ee; color: #0f766e; }
.chip-yellow { background: #fef3c7; color: #b45309; }
.kpi-delta { font-size: .76rem; font-weight: 800; background: #ddf7e5; color: #15803d;
  border-radius: 999px; padding: 3px 10px; }
.kpi-label { color: var(--muted); font-size: .86rem; font-weight: 600; display: block; }
.kpi-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -.03em; color: var(--primary-dark);
  line-height: 1.2; }

/* funil com barras */
.funnel { margin-top: 8px; }
.funnel-row { display: grid; grid-template-columns: minmax(130px, 200px) 1fr 52px; gap: 12px;
  align-items: center; padding: 9px 0; }
.funnel-row .fl { font-weight: 600; font-size: .9rem; }
.funnel-row .fn { text-align: right; font-weight: 800; color: var(--primary-dark);
  font-variant-numeric: tabular-nums; }
.bar { height: 9px; border-radius: 999px; background: var(--input-bg); overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--primary); min-width: 2px; }
.bar-fill.green { background: var(--success); }
.bar-fill.dark { background: var(--primary-dark); }

/* lista de decisões (dashboard) */
.dec-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border-radius: 14px; background: #f8fafc; border: 1px solid var(--border); margin-bottom: 10px; }
.dec-item .kpi-chip { width: 40px; height: 40px; border-radius: 50%; }
.dec-item b { flex: 1; font-size: .96rem; }
.dec-pill { font-size: .8rem; font-weight: 800; border-radius: 999px; padding: 4px 12px; }

/* avatar de iniciais em tabelas */
.tavatar { display: inline-flex; align-items: center; justify-content: center; width: 38px;
  height: 38px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-dark);
  font-weight: 800; font-size: .82rem; flex-shrink: 0; }
.tperson { display: flex; align-items: center; gap: 11px; min-width: 0; }
.tperson .tp-name { font-weight: 700; color: var(--primary-dark); }
.tperson .tp-sub { font-size: .78rem; color: var(--muted); }

/* ================================================================ forms */
label { display: block; margin: 14px 0 4px; font-weight: 600; font-size: .9rem; color: var(--primary-dark); }
input, select, textarea { width: 100%; padding: 11px 14px; border: 1.5px solid transparent;
  background: var(--input-bg); border-radius: 11px; font-size: 1rem; margin-top: 4px;
  font-family: inherit; color: var(--text); transition: border-color .15s, background .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); background: #fff; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); margin: 14px 0; padding: 4px 16px 16px; }
legend { font-weight: 700; font-size: .92rem; padding: 0 6px; color: var(--primary-dark); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.field-hint { color: var(--muted); font-size: .8rem; font-weight: 500; margin: 4px 2px 0; }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 12px 0;
  color: var(--text); }
.check input { width: auto; margin-top: 4px; accent-color: var(--primary); }

/* ================================================================ botões */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 11px; border: 1.5px solid var(--border);
  background: #fff; color: var(--primary-dark); text-decoration: none; font-size: .93rem;
  font-weight: 700; font-family: inherit; cursor: pointer; margin: 4px 6px 4px 0;
  transition: border-color .15s, background .15s, box-shadow .15s; }
.btn .ico { width: 17px; height: 17px; }
.btn:hover { border-color: var(--primary); box-shadow: var(--shadow-soft); }
.btn-primary { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-primary:hover { background: var(--primary); border-color: var(--primary); }
.btn-primary:disabled { background: #9fb4c4; border-color: #9fb4c4; cursor: not-allowed; box-shadow: none; }
.btn-lg { padding: 14px 24px; font-size: 1.02rem; width: 100%; text-align: center; border-radius: 13px; }
.btn-sm { padding: 6px 12px; font-size: .82rem; border-radius: 9px; }
.btn-link { background: none; border: none; color: var(--primary); cursor: pointer; font-size: 1rem;
  font-family: inherit; font-weight: 600; padding: 0; }
.btn-x { position: absolute; top: 6px; right: 6px; background: rgba(15, 57, 86, .72); color: #fff;
  border: none; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; }
.btn-x .ico { width: 14px; height: 14px; }
.btn-x:hover { background: #dc2626; }
.inline { display: inline; }
.hidden { display: none; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, Consolas, monospace; word-break: break-all; }
.actions { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }

.small-btn { padding: 6px 12px; font-size: .84rem; border-radius: 9px; }
.btn-danger { color: #991b1b; }
.btn-danger:hover { border-color: #dc2626; background: #fef2f2; }

/* ================================================================ avisos e badges */
.alert { border-radius: 12px; padding: 13px 16px; margin: 12px 0; font-size: .95rem; }
.alert ul { margin: 0; padding-left: 18px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; }
.alert-ok { background: #ecfdf3; border: 1px solid #b7f0cd; color: #14532d; }
.alert-warn { background: #fffbeb; border: 1px solid #fde68a; color: #78350f; }

.badge { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: .76rem;
  font-weight: 700; letter-spacing: .02em; }
.badge-gray { background: #eef2f6; color: #475569; }
.badge-blue { background: #e0edff; color: #1e40af; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-teal { background: #d7f0ee; color: #115e59; }
.badge-green { background: #ddf7e5; color: #157347; }
.badge-red { background: #fee2e2; color: #991b1b; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-green { background: #16a34a; }
.dot-red { background: #dc2626; }
.dot-yellow { background: #d97706; }
.dot-gray { background: #94a3b8; }

/* ================================================================ tabelas */
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--border); }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: #f8fbfd; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.kv th { text-align: left; padding: 6px 14px 6px 0; color: var(--muted); font-weight: 600;
  vertical-align: top; white-space: nowrap; }
.kv td { padding: 6px 0; }
th.sortable { cursor: pointer; user-select: none; white-space: nowrap; }
th.sortable:hover { color: var(--primary); }
th.sortable::after { content: " ↕"; color: #b6c3d0; font-size: .85em; }
th.sortable[data-sort="asc"]::after { content: " ↑"; color: var(--primary); }
th.sortable[data-sort="desc"]::after { content: " ↓"; color: var(--primary); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 16px 0; }
.stat { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; text-align: center; box-shadow: var(--shadow-soft); }
.stat-n { display: block; font-size: 1.6rem; font-weight: 800; color: var(--primary-dark);
  letter-spacing: -.02em; }
.stat-l { color: var(--muted); font-size: .84rem; font-weight: 600; }

/* ================================================================ fotos */
.photo-slot { border-top: 1px solid var(--border); padding: 16px 0; }
.photo-slot-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.photo-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.thumb { position: relative; }
.thumb img { width: 108px; height: 108px; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--border); }
input[type="file"] { background: var(--input-bg); }

.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.photo-grid img { width: 100%; border-radius: 12px; border: 1px solid var(--border); }
.photo-grid figure { margin: 0; }
.photo-grid figcaption { font-size: .82rem; color: var(--muted); margin-top: 4px; }

.info-i { display: inline-flex; align-items: center; justify-content: center; width: 22px;
  height: 22px; margin-left: 6px; border-radius: 50%; border: none;
  background: var(--primary-soft); color: var(--primary); cursor: pointer; vertical-align: middle;
  padding: 0; transition: background .15s, color .15s; }
.info-i .ico { width: 15px; height: 15px; }
.info-i:hover { background: var(--primary); color: #fff; }

/* ================================================================ pagamento */
.pix-qr { width: 240px; max-width: 80%; border: 1px solid var(--border); border-radius: 16px; padding: 10px;
  background: #fff; box-shadow: var(--shadow-soft); }
#pix-code { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }
.decision-options .check { padding: 12px; border: 1.5px solid var(--border); border-radius: 12px;
  transition: border-color .15s, background .15s; }
.decision-options .check:has(input:checked) { border-color: var(--primary); background: #f4f9fd; }
.pay-list { list-style: none; padding: 0; margin: 8px 0; }
.pay-list li { padding: 2px 0; }

.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 8px; line-height: 1; border-radius: 9px;
  color: var(--muted); display: inline-flex; }
.pw-toggle:hover { color: var(--primary-dark); background: var(--primary-soft); }
.pw-toggle .ico { width: 19px; height: 19px; }

.card-actions { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 2px; }
.pay-select { border: 1.5px solid var(--border); border-radius: 12px; padding: 12px; background: #fafcfe; }
.pay-select input { width: 18px; height: 18px; }
.paybar { position: sticky; bottom: 16px; z-index: 100; display: flex;
  justify-content: flex-end; margin: 14px 0 0; }
.btn-pay { border-radius: 999px; padding: 15px 28px; font-size: 1.02rem; margin: 0;
  box-shadow: 0 8px 24px rgba(15, 57, 86, .3); }
.btn-pay:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }

/* ================================================================ modais */
dialog { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px;
  max-width: 640px; width: calc(100% - 32px); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(15, 35, 52, .55); backdrop-filter: blur(2px); }
.terms-text { white-space: pre-wrap; max-height: 60vh; overflow-y: auto; font-size: .92rem;
  border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin: 12px 0;
  background: var(--bg); }

/* ================================================================ etapas */
.steps { display: flex; gap: 8px; margin: 14px 0 18px; }
.steps .step { flex: 1; display: flex; align-items: center; gap: 8px; padding: 9px 14px;
  border: 1.5px solid var(--border); border-radius: 999px; color: var(--muted);
  font-size: .88rem; font-weight: 600; background: #fff; }
.steps .step-n { display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; background: var(--input-bg);
  color: var(--text); font-weight: 800; font-size: .78rem; }
.steps .step.is-active { border-color: var(--primary); color: var(--primary-dark); }
.steps .step.is-active .step-n { background: var(--primary-dark); color: #fff; }
.steps .step.is-done { border-color: #b7f0cd; }
.steps .step.is-done .step-n { background: #ddf7e5; color: #157347; }
@media (max-width: 480px) { .steps .step { padding: 8px 10px; font-size: .8rem; } }

/* ================================================================ token de parceiro (discreto) */
.partner-line { display: flex; gap: 8px; align-items: center; max-width: 380px; margin: 26px 0 0; }
.partner-line input { flex: 1; margin-top: 0; text-transform: uppercase; font-size: .9rem;
  padding: 9px 13px; }
.partner-line .btn { margin: 0; white-space: nowrap; }
.partner-form { display: flex; gap: 8px; align-items: center; }
.partner-form input { flex: 1; margin-top: 0; }
.partner-form .btn { margin: 0; white-space: nowrap; }

/* ================================================================ hero / banners */
.hero-carousel { position: relative; overflow: hidden; border-radius: var(--radius-lg);
  margin-bottom: 26px; box-shadow: var(--shadow); }
.hero-track { display: flex; transition: transform .5s ease; }
.hero-slide { flex: 0 0 100%; min-width: 100%; }
.hero-slide img { display: block; width: 100%; height: auto; }
.hero-slide a { display: block; }
.hero-welcome { display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 36px 40px; min-height: 190px;
  background: linear-gradient(120deg, var(--primary-dark) 0%, var(--primary) 62%, #3e6b8e 100%);
  color: #fff; }
.hero-welcome .hero-text h2 { color: #fff; margin: 0 0 8px; font-size: 1.6rem; font-weight: 800;
  letter-spacing: -.02em; }
.hero-welcome .hero-text p { margin: 0; color: #d8e6f2; max-width: 480px; }
.hero-mark { height: 110px; width: auto; opacity: .35; filter: brightness(0) invert(1); }
@media (max-width: 560px) { .hero-welcome { padding: 26px 22px; } .hero-mark { display: none; } }
.hero-dots { position: absolute; bottom: 12px; left: 0; right: 0; display: flex;
  justify-content: center; gap: 8px; }
.hero-dot { width: 9px; height: 9px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .55); padding: 0; }
.hero-dot.is-on { background: #fff; width: 22px; border-radius: 999px; }

/* ================================================================ serviços */
.service-options { display: grid; gap: 12px; margin: 14px 0; }
.service-option { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius); cursor: pointer;
  font-weight: 400; background: #fff; transition: border-color .15s, box-shadow .15s; }
.service-option:hover { border-color: var(--primary); box-shadow: var(--shadow-soft); }
.service-option:has(input:checked) { border-color: var(--primary); background: #f4f9fd;
  box-shadow: var(--shadow-soft); }
.service-option input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--primary); }
.service-body { display: block; flex: 1; }
.service-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.service-head b { color: var(--primary-dark); font-size: 1.02rem; }
.service-price { color: var(--primary); font-weight: 800; white-space: nowrap; }

/* ================================================================ diversos */
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }
.empty .ico { width: 34px; height: 34px; opacity: .45; margin-bottom: 8px; }
.filters .check { margin: 10px 0; }
