/* ============================================================
   secretaria.css — Módulo de Secretaria (área da administração)
   Reusa a casca .acc-* (cabeçalho, subnav, cards, modal, toast).
   Adiciona: mapa em grade, scanner de conta de energia, lista de
   moradores (tabela/cards), importação.
   Sobre tokens.css + components.css + app.css + accounting.css.
   ============================================================ */

.sec { max-width: 1280px; margin: 0 auto; }

/* ---- Cores de status (lote / morador) ---- */
.sec-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; display: inline-block; }
.is-ocupado { --st: var(--green-600); --st-bg: var(--green-50); --st-bd: var(--green-200); --st-tx: var(--green-800); }
.is-vago { --st: var(--stone-400); --st-bg: var(--stone-50); --st-bd: var(--color-border); --st-tx: var(--stone-600); }
.is-inadimplente { --st: var(--warning); --st-bg: var(--warning-bg); --st-bd: var(--warning-border); --st-tx: #8a5a12; }

.sec-statuspill { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-heading); font-weight: 600; font-size: var(--text-xs); padding: 0.28rem 0.6rem; border-radius: var(--radius-pill); background: var(--st-bg); color: var(--st-tx); border: 1px solid var(--st-bd); white-space: nowrap; }
.sec-statuspill .sec-dot { background: var(--st); }

/* ============================================================
   VISÃO GERAL
   ============================================================ */
.sec-occ { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-5); align-items: stretch; }
.sec-occ-bar { display: flex; height: 18px; border-radius: var(--radius-pill); overflow: hidden; border: 1px solid var(--color-border); margin: var(--space-3) 0 var(--space-4); }
.sec-occ-seg { height: 100%; }
.sec-occ-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); }
.sec-occ-legend li { list-style: none; display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text); }
.sec-occ-legend strong { font-family: var(--font-heading); font-weight: 800; }
.sec-occ-legend span { color: var(--color-text-muted); font-size: var(--text-xs); }

.sec-streetbars { display: flex; flex-direction: column; gap: var(--space-2); }
.sec-streetbar { display: grid; grid-template-columns: 150px 1fr 56px; gap: var(--space-3); align-items: center; }
.sec-streetbar-name { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-sm); color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-streetbar-track { display: flex; height: 12px; border-radius: var(--radius-pill); overflow: hidden; background: var(--stone-100); }
.sec-streetbar-track i { height: 100%; }
.sec-streetbar-num { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-muted); text-align: right; }

.sec-recent { display: flex; flex-direction: column; gap: var(--space-2); }
.sec-recent-row { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--stone-50); }
.sec-avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; font-size: var(--text-sm); background: var(--green-100); color: var(--green-700); }
.sec-recent-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sec-recent-body strong { font-family: var(--font-heading); font-size: var(--text-sm); color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-recent-body span { font-size: var(--text-xs); color: var(--color-text-muted); }
.sec-recent-when { font-size: var(--text-xs); color: var(--color-text-faint); white-space: nowrap; }

/* ---- Funil de cadastro (3 fases) ---- */
.sec-funnel { display: flex; flex-direction: column; }
.sec-funnel-row { display: grid; grid-template-columns: 218px 1fr 78px; gap: var(--space-4); align-items: center; padding: var(--space-2) 0; }
.sec-funnel-stage { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.sec-funnel-ic { width: 40px; height: 40px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex: none; }
.sec-funnel-meta { display: flex; flex-direction: column; min-width: 0; }
.sec-funnel-eyebrow { font-family: var(--font-heading); font-weight: 700; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; color: var(--color-text-faint); }
.sec-funnel-meta strong { font-family: var(--font-heading); font-weight: 700; font-size: var(--text-sm); color: var(--color-text); line-height: 1.25; }
.sec-funnel-sub { font-size: 11px; color: var(--color-text-muted); }
.sec-funnel-track { height: 28px; background: var(--stone-100); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.sec-funnel-fill { height: 100%; display: flex; align-items: center; justify-content: flex-end; padding-right: 10px; font-family: var(--font-mono); font-weight: 700; font-size: var(--text-sm); min-width: 30px; transition: width var(--dur-base) var(--ease-out); }
.sec-funnel-num { text-align: right; }
.sec-funnel-num strong { display: block; font-family: var(--font-heading); font-weight: 800; font-size: var(--text-lg); color: var(--color-text); line-height: 1; }
.sec-funnel-num span { font-size: 10px; color: var(--color-text-faint); }
.sec-funnel-gap { display: flex; align-items: center; gap: 7px; margin-left: 19px; padding: 5px 0 5px 18px; font-size: var(--text-xs); color: var(--color-text-muted); border-left: 2px dashed var(--color-border-strong); }
.sec-funnel-gap svg { color: var(--color-text-faint); }
.sec-funnel-gap strong { color: var(--sun-700); font-family: var(--font-heading); font-weight: 800; }
.sec-funnel-divider { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-5) 0 var(--space-3); }
.sec-funnel-divider::after { content: ""; flex: 1; height: 1px; background: var(--color-border); }
.sec-funnel-divider span { font-family: var(--font-heading); font-weight: 700; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-faint); }

/* ============================================================
   TOOLBAR · busca, filtros, alternador de visão
   ============================================================ */
.sec-viewtoggle { display: inline-flex; background: var(--stone-100); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 3px; flex: none; }
.sec-viewtoggle button { border: none; background: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-heading); font-weight: 600; font-size: var(--text-sm); color: var(--color-text-muted); padding: 0.4rem 0.7rem; border-radius: var(--radius-sm); transition: all var(--dur-fast); }
.sec-viewtoggle button.active { background: var(--color-surface); color: var(--green-800); box-shadow: var(--shadow-xs); }

/* ============================================================
   MORADORES · tabela
   ============================================================ */
.sec-table-name { display: flex; align-items: center; gap: var(--space-3); }
.sec-table-name .sec-avatar { width: 32px; height: 32px; font-size: var(--text-xs); }
.sec-td-strong { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-sm); color: var(--color-text); }
.sec-td-sub { font-size: var(--text-xs); color: var(--color-text-muted); }
.sec-td-mono { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-muted); }
.table tr.sec-row-clickable { cursor: pointer; }
.table tr.sec-row-clickable:hover td { background: var(--green-50); }

/* ============================================================
   MORADORES · cards
   ============================================================ */
.sec-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--space-4); }
.sec-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); box-shadow: var(--shadow-xs); cursor: pointer; transition: box-shadow var(--dur-base), transform var(--dur-base), border-color var(--dur-base); display: flex; flex-direction: column; gap: var(--space-3); }
.sec-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--green-200); }
.sec-card-top { display: flex; align-items: flex-start; gap: var(--space-3); }
.sec-card-top .sec-avatar { width: 44px; height: 44px; font-size: var(--text-base); }
.sec-card-id { flex: 1; min-width: 0; }
.sec-card-id strong { display: block; font-family: var(--font-heading); font-weight: 700; font-size: var(--text-base); color: var(--color-text); }
.sec-card-id span { font-size: var(--text-xs); color: var(--color-text-muted); }
.sec-card-meta { display: flex; flex-direction: column; gap: 6px; padding-top: var(--space-3); border-top: 1px solid var(--color-border); }
.sec-card-meta-row { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-xs); color: var(--color-text-muted); }
.sec-card-meta-row svg { color: var(--color-text-faint); flex: none; }
.sec-card-vago { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-2); padding: var(--space-5) 0; color: var(--color-text-faint); text-align: center; }
.sec-card-vago strong { font-family: var(--font-heading); color: var(--stone-500); font-size: var(--text-sm); }

/* ============================================================
   MAPA DO RESIDENCIAL · grade ruas × lotes
   ============================================================ */
.sec-map-wrap { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: var(--space-5) var(--space-6); overflow-x: auto; }
.sec-map-legend { display: flex; flex-wrap: wrap; gap: var(--space-4); margin-bottom: var(--space-5); padding-bottom: var(--space-4); border-bottom: 1px solid var(--color-border); }
.sec-map-legend li { list-style: none; display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text); }
.sec-map-legend .sec-dot { width: 12px; height: 12px; border-radius: 4px; }

.sec-map-grid { display: flex; flex-direction: column; gap: var(--space-2); min-width: 640px; }
.sec-map-street { display: grid; grid-template-columns: 168px 1fr; gap: var(--space-4); align-items: center; }
.sec-map-street-label { display: flex; flex-direction: column; }
.sec-map-street-label strong { font-family: var(--font-heading); font-weight: 600; font-size: var(--text-sm); color: var(--color-text); white-space: nowrap; }
.sec-map-street-label span { font-family: var(--font-mono); font-size: 11px; color: var(--color-text-faint); }
.sec-map-lots { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-lot { position: relative; width: 38px; height: 38px; border-radius: var(--radius-sm); border: 1.5px solid var(--st-bd); background: var(--st-bg); color: var(--st-tx); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 600; font-size: 12px; cursor: pointer; transition: transform var(--dur-fast), box-shadow var(--dur-fast); }
.sec-lot::before { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--st); }
.sec-lot:hover { transform: translateY(-2px) scale(1.06); box-shadow: var(--shadow-md); z-index: 2; }
.sec-lot.is-sel { outline: 2px solid var(--green-700); outline-offset: 1px; }
.sec-lot.is-dim { opacity: 0.28; }

/* ---- Planta do residencial (visão de mapa 2D) ---- */
.sec-plan { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: var(--space-5) var(--space-6); overflow-x: auto; }
/* ---- Mapa real (OpenStreetMap) ---- */
.sec-plan--osm { overflow: visible; }
.sec-osm-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-3); }
.sec-osm-loc { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-heading); font-weight: 700; font-size: var(--text-sm); color: var(--green-700); }
.sec-osm-hint { font-size: var(--text-xs); color: var(--color-text-muted); }
.sec-osm { width: 100%; height: 520px; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--color-border-strong); background: var(--stone-100); z-index: 0; }
.sec-osm .leaflet-container { font-family: var(--font-body); background: var(--stone-100); }
.sec-osm .leaflet-tooltip { font-family: var(--font-heading); font-weight: 600; font-size: 11px; border-radius: var(--radius-sm); border: none; box-shadow: var(--shadow-md); color: var(--color-text); padding: 4px 8px; }
.sec-osm-tip { background: color-mix(in srgb, var(--green-800) 92%, transparent); color: var(--stone-50); font-weight: 700; }
.sec-osm .leaflet-bar a { color: var(--green-800); }
.sec-osm path.leaflet-interactive { cursor: pointer; transition: fill-opacity var(--dur-fast); }
@container portal (max-width: 720px) { .sec-osm { height: 400px; } }
.sec-plan-inner { position: relative; min-width: 720px; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, minmax(96px, 1fr)); gap: 16px; background: repeating-linear-gradient(45deg, var(--stone-200), var(--stone-200) 11px, var(--stone-300) 11px, var(--stone-300) 12px); border: 4px solid var(--stone-400); border-radius: var(--radius-lg); padding: 16px; }
.sec-plan-quadra { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 8px 9px; display: flex; flex-direction: column; gap: 6px; min-width: 0; box-shadow: var(--shadow-xs); }
.sec-plan-quadra-label { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sec-plan-quadra-label strong { font-family: var(--font-heading); font-weight: 700; font-size: 11px; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-plan-quadra-label span { font-family: var(--font-mono); font-size: 9px; color: var(--color-text-faint); flex: none; }
.sec-plan-lots { display: flex; flex-wrap: wrap; gap: 3px; }
.sec-plan-lot { width: 16px; height: 16px; border-radius: 3px; background: var(--st); border: 1px solid var(--st-bd); cursor: pointer; transition: transform var(--dur-fast), box-shadow var(--dur-fast); }
.sec-plan-lot:hover { transform: scale(1.35); box-shadow: var(--shadow-md); z-index: 3; position: relative; }
.sec-plan-lot.is-dim { opacity: 0.24; }
.sec-plan-core { grid-column: 2 / 4; grid-row: 2 / 4; background: linear-gradient(150deg, var(--green-600), var(--green-800)); border-radius: var(--radius-md); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; color: var(--stone-50); padding: var(--space-4); position: relative; overflow: hidden; }
.sec-plan-core::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 70% 25%, color-mix(in srgb, var(--lime-300) 30%, transparent), transparent 60%); }
.sec-plan-core svg { color: var(--lime-300); position: relative; }
.sec-plan-core strong { font-family: var(--font-heading); font-weight: 700; font-size: var(--text-sm); position: relative; }
.sec-plan-core span { font-size: 11px; color: color-mix(in srgb, var(--stone-50) 78%, transparent); position: relative; max-width: 22ch; }
.sec-plan-gate { position: absolute; left: 50%; bottom: -16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 5px; background: var(--stone-800); color: var(--stone-50); font-family: var(--font-heading); font-weight: 700; font-size: 10px; letter-spacing: .04em; text-transform: uppercase; padding: 4px 12px; border-radius: var(--radius-pill); box-shadow: var(--shadow-md); }
.sec-plan-compass { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%; background: var(--color-surface); border: 1px solid var(--color-border-strong); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 800; font-size: 12px; color: var(--green-700); box-shadow: var(--shadow-sm); }

/* detalhe do lote (modal) */
.sec-lotdetail { display: flex; flex-direction: column; gap: var(--space-4); }
.sec-lotdetail-head { display: flex; align-items: center; gap: var(--space-4); }
.sec-lotdetail-badge { width: 56px; height: 56px; border-radius: var(--radius-md); border: 2px solid var(--st-bd); background: var(--st-bg); color: var(--st-tx); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--font-mono); font-weight: 700; flex: none; line-height: 1.1; }
.sec-lotdetail-badge span { font-size: 10px; font-weight: 600; opacity: .8; }
.sec-kv { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3) var(--space-5); }
.sec-kv > div { display: flex; flex-direction: column; gap: 2px; }
.sec-kv dt { font-family: var(--font-heading); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-faint); }
.sec-kv dd { margin: 0; font-size: var(--text-sm); color: var(--color-text); }
.sec-kv dd.mono { font-family: var(--font-mono); font-size: var(--text-xs); }

/* ---- Vínculo · pílula (proprietário / inquilino / não identificado) ---- */
.sec-vpill { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-heading); font-weight: 600; font-size: var(--text-xs); padding: 0.24rem 0.55rem; border-radius: var(--radius-pill); white-space: nowrap; border: 1px solid; }
.sec-vpill.is-prop { background: var(--green-50); color: var(--green-800); border-color: var(--green-200); }
.sec-vpill.is-aluga { background: var(--sun-100); color: #8a5a12; border-color: var(--sun-300); }
.sec-vpill.is-desc { background: var(--stone-100); color: var(--stone-600); border-color: var(--color-border-strong); }
.sec-vpill svg { flex: none; }

/* ---- Faixa de rastreio (cadastro · proprietário · ocupação) ---- */
.sec-track { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
.sec-track-pill { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--stone-50); }
.sec-track-ic { width: 30px; height: 30px; border-radius: var(--radius-sm); flex: none; display: flex; align-items: center; justify-content: center; background: var(--stone-100); color: var(--stone-500); }
.sec-track-pill.is-ok { border-color: var(--green-200); background: var(--green-50); }
.sec-track-pill.is-ok .sec-track-ic { background: var(--green-100); color: var(--green-700); }
.sec-track-pill.is-warn { border-color: var(--sun-300); background: var(--sun-100); }
.sec-track-pill.is-warn .sec-track-ic { background: #fff; color: #8a5a12; }
.sec-track-tx { display: flex; flex-direction: column; min-width: 0; }
.sec-track-tx span { font-family: var(--font-heading); font-weight: 700; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--color-text-faint); }
.sec-track-tx strong { font-family: var(--font-heading); font-weight: 700; font-size: var(--text-xs); color: var(--color-text); line-height: 1.2; }

/* ---- Seletor de vínculo (formulário) ---- */
.sec-vinc-seg { display: flex; gap: 6px; }
.sec-vinc-seg button { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--color-border-strong); background: var(--color-surface); color: var(--color-text-muted); border-radius: var(--radius-md); padding: 0.6rem; font-family: var(--font-heading); font-weight: 600; font-size: var(--text-sm); cursor: pointer; transition: all var(--dur-fast); }
.sec-vinc-seg button:hover { border-color: var(--green-300); }
.sec-vinc-seg button.active { border-color: var(--green-600); background: var(--green-50); color: var(--green-800); box-shadow: inset 0 0 0 1px var(--green-600); }

/* ---- Legenda de vínculo do mapa (contornos) ---- */
.sec-osm-vlegend { margin-top: calc(-1 * var(--space-3)); margin-bottom: var(--space-3); padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border); }
.sec-vk { width: 13px; height: 13px; border-radius: 50%; flex: none; display: inline-block; background: var(--stone-300); }
.sec-vk.is-prop { border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--stone-400); }
.sec-vk.is-aluga { border: 2px solid var(--sun-500); box-shadow: 0 0 0 1.5px var(--sun-500); }
.sec-vk.is-desc { border: 2px dashed var(--stone-500); }

/* ============================================================
   IMPORTAÇÃO · escolha de método
   ============================================================ */
.sec-import-intro { display: flex; align-items: flex-start; gap: var(--space-3); padding: var(--space-4) var(--space-5); background: var(--info-bg); border: 1px solid var(--info-border); border-radius: var(--radius-lg); color: var(--info); font-size: var(--text-sm); line-height: var(--leading-normal); }
.sec-import-intro svg { flex: none; margin-top: 2px; }
.sec-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); gap: var(--space-5); align-items: stretch; }
.sec-method { display: flex; flex-direction: column; gap: var(--space-3); text-align: left; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-6); box-shadow: var(--shadow-xs); cursor: pointer; transition: all var(--dur-base); display: flex; flex-direction: column; gap: var(--space-3); }
.sec-method:hover { border-color: var(--green-300); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.sec-method.is-primary { background: linear-gradient(160deg, var(--green-700), var(--green-900)); border-color: var(--green-900); color: var(--stone-50); }
.sec-method-ic { width: 52px; height: 52px; border-radius: var(--radius-lg); display: flex; align-items: center; justify-content: center; background: var(--green-100); color: var(--green-700); }
.sec-method.is-primary .sec-method-ic { background: color-mix(in srgb, var(--lime-300) 22%, transparent); color: var(--lime-300); }
.sec-method h3 { font-size: var(--text-h3); margin: 0; }
.sec-method.is-primary h3 { color: var(--stone-50); }
.sec-method p { font-size: var(--text-sm); color: var(--color-text-muted); margin: 0; line-height: var(--leading-normal); }
.sec-method.is-primary p { color: color-mix(in srgb, var(--stone-50) 78%, transparent); }
.sec-method-go { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-heading); font-weight: 700; font-size: var(--text-sm); color: var(--green-700); margin-top: var(--space-2); }
.sec-method.is-primary .sec-method-go { color: var(--lime-300); }
.sec-method-tag { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-family: var(--font-heading); font-weight: 700; font-size: 11px; padding: 3px 9px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--lime-500) 26%, transparent); color: var(--lime-100); }
.sec-method-go { margin-top: auto; }
.sec-method-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: auto; }
.sec-method-btn { display: inline-flex; align-items: center; gap: 7px; padding: 0.5rem 0.85rem; border-radius: var(--radius-md); border: 1px solid color-mix(in srgb, var(--stone-50) 30%, transparent); background: color-mix(in srgb, var(--stone-50) 12%, transparent); color: var(--stone-50); font-family: var(--font-heading); font-weight: 700; font-size: var(--text-sm); cursor: pointer; transition: background var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.sec-method-btn:hover { background: color-mix(in srgb, var(--stone-50) 22%, transparent); transform: translateY(-1px); }
.sec-method-btn.is-fill { background: var(--lime-300); border-color: var(--lime-300); color: var(--green-900); }
.sec-method-btn.is-fill:hover { background: var(--lime-100); border-color: var(--lime-100); }

/* ---- Documento genérico (ficha / manuscrito) ---- */
.sec-ficha { position: relative; background: #fbfbf4; color: #20231a; font-family: var(--font-body); font-size: 13px; line-height: 1.6; padding: 18px 20px 20px; min-height: 360px; background-image: linear-gradient(color-mix(in srgb, #2a6f9e 18%, transparent) 1px, transparent 1px); background-size: 100% 30px; background-position: 0 52px; }
.sec-ficha-head { display: flex; align-items: center; gap: 9px; border-bottom: 2px solid #20231a; padding-bottom: 9px; margin-bottom: 12px; }
.sec-ficha-stamp { width: 30px; height: 30px; border-radius: 6px; background: #20231a; color: #fbfbf4; display: flex; align-items: center; justify-content: center; flex: none; }
.sec-ficha-head b { display: block; font-family: var(--font-heading); font-size: 13px; letter-spacing: .02em; }
.sec-ficha-head span { font-size: 10.5px; opacity: .6; }
.sec-ficha-row { display: flex; align-items: baseline; gap: 10px; min-height: 30px; }
.sec-ficha-row label { flex: none; width: 78px; font-family: var(--font-heading); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: #6b6f5e; }
.sec-ficha-hand { flex: 1; font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive; font-size: 16px; color: #1c3d63; }
.sec-ficha-note { margin-top: 14px; font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive; font-size: 14px; color: #7a4a2a; }

/* ---- Pré-cadastro por voz ---- */
.sec-voz-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-5); box-shadow: var(--shadow-xs); }
.sec-voz-head { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.sec-voz-head-ic { width: 38px; height: 38px; border-radius: var(--radius-md); flex: none; background: var(--green-100); color: var(--green-700); display: flex; align-items: center; justify-content: center; }
.sec-voz-head strong { display: block; font-family: var(--font-heading); font-size: var(--text-base); }
.sec-voz-head span { font-size: var(--text-xs); color: var(--color-text-muted); }
.sec-voz-review { background: var(--green-50); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: var(--space-5); height: 100%; }
.sec-voz-review blockquote { margin: 0; font-style: italic; color: var(--color-text); line-height: var(--leading-relaxed); border-left: 3px solid var(--green-300); padding-left: var(--space-3); }
.sec-preform .vi-mode-seg { margin-bottom: var(--space-4); align-self: flex-start; width: max-content; max-width: 100%; }
.sec-preform .vi-transcript { margin: 0 0 var(--space-4); }
.sec-voz-guide { margin-top: var(--space-4); background: var(--green-50); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4) var(--space-5); }
.sec-voz-guide-head { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-heading); font-weight: 700; font-size: var(--text-sm); color: var(--green-800); margin-bottom: var(--space-3); }
.sec-voz-guide-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.sec-voz-guide-list li { display: flex; align-items: baseline; gap: var(--space-2); font-size: var(--text-sm); color: var(--color-text-muted); }
.sec-voz-guide-k { display: inline-block; min-width: 78px; font-family: var(--font-heading); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--green-700); }
.sec-voz-guide-note { margin: var(--space-3) 0 0; font-size: var(--text-xs); color: var(--color-text-faint); line-height: var(--leading-snug); }

/* ---- Stepper ---- */
.sec-steps { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-5); flex-wrap: wrap; }
.sec-step { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-heading); font-weight: 600; font-size: var(--text-xs); color: var(--color-text-faint); }
.sec-step-num { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--color-border-strong); display: flex; align-items: center; justify-content: center; font-size: 11px; }
.sec-step.is-active { color: var(--green-800); }
.sec-step.is-active .sec-step-num { border-color: var(--green-700); background: var(--green-700); color: var(--stone-50); }
.sec-step.is-done .sec-step-num { border-color: var(--green-600); background: var(--green-100); color: var(--green-700); }
.sec-step-line { width: 26px; height: 1.5px; background: var(--color-border-strong); }

.sec-import-back { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; cursor: pointer; font-family: var(--font-heading); font-weight: 600; font-size: var(--text-sm); color: var(--color-text-muted); padding: 0; margin-bottom: var(--space-4); }
.sec-import-back:hover { color: var(--green-700); }

/* ============================================================
   SCANNER · captura + conta de energia + leitura de texto
   ============================================================ */
.sec-scan-layout { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-5); align-items: start; }
@container portal (max-width: 920px) { .sec-scan-layout { grid-template-columns: 1fr; } }

/* moldura "câmera" */
.sec-cam { position: relative; background: #0e120c; border-radius: var(--radius-xl); padding: var(--space-4); box-shadow: var(--shadow-lg); overflow: hidden; }
.sec-cam-frame { position: relative; border-radius: var(--radius-lg); overflow: hidden; background: #1b2016; }
.sec-cam-corners::before, .sec-cam-corners::after, .sec-cam-corner::before, .sec-cam-corner::after { content: ""; position: absolute; width: 26px; height: 26px; border: 3px solid var(--lime-300); z-index: 6; pointer-events: none; }
.sec-cam-corners::before { top: 14px; left: 14px; border-right: none; border-bottom: none; border-radius: 6px 0 0 0; }
.sec-cam-corners::after { top: 14px; right: 14px; border-left: none; border-bottom: none; border-radius: 0 6px 0 0; }
.sec-cam-corner::before { bottom: 14px; left: 14px; border-right: none; border-top: none; border-radius: 0 0 0 6px; }
.sec-cam-corner::after { bottom: 14px; right: 14px; border-left: none; border-top: none; border-radius: 0 0 6px 0; }
.sec-cam-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); padding: 0 var(--space-2) var(--space-3); color: color-mix(in srgb, #fff 70%, transparent); font-family: var(--font-mono); font-size: 11px; }
.sec-cam-rec { display: inline-flex; align-items: center; gap: 6px; }
.sec-cam-rec i { width: 8px; height: 8px; border-radius: 50%; background: #ff5a47; animation: sec-blink 1.2s infinite; }
@keyframes sec-blink { 50% { opacity: .3; } }
.sec-cam-actions { display: flex; align-items: center; justify-content: center; gap: var(--space-4); padding-top: var(--space-4); }
.sec-shutter { width: 60px; height: 60px; border-radius: 50%; border: 4px solid color-mix(in srgb, #fff 80%, transparent); background: var(--lime-300); cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--green-900); transition: transform var(--dur-fast); }
.sec-shutter:hover { transform: scale(1.06); }
.sec-shutter:active { transform: scale(.94); }
.sec-cam-ghost { background: none; border: none; color: color-mix(in srgb, #fff 64%, transparent); cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; gap: 3px; font-family: var(--font-heading); font-size: 11px; font-weight: 600; }
.sec-cam-ghost:hover { color: #fff; }

/* linha de varredura */
.sec-scanline { position: absolute; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--lime-300), transparent); box-shadow: 0 0 18px 4px color-mix(in srgb, var(--lime-300) 60%, transparent); z-index: 7; }
.sec-scan-glow { position: absolute; left: 0; right: 0; top: 0; background: linear-gradient(180deg, color-mix(in srgb, var(--lime-300) 16%, transparent), transparent); z-index: 5; pointer-events: none; }
.sec-scanning .sec-scanline { animation: sec-sweep 2.1s var(--ease-out) forwards; }
@keyframes sec-sweep { from { top: 0%; } to { top: 100%; } }

/* ---- A conta de energia (mock) ---- */
.sec-bill { position: relative; background: #fbfbf7; color: #1c1f17; font-family: var(--font-mono); font-size: 10.5px; line-height: 1.5; padding: 16px 18px 18px; min-height: 360px; }
.sec-bill-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; border-bottom: 2px solid #1c1f17; padding-bottom: 8px; }
.sec-bill-logo { display: flex; align-items: center; gap: 7px; }
.sec-bill-logo .mk { width: 26px; height: 26px; border-radius: 5px; background: #1f7a3d; color: #fff; display: flex; align-items: center; justify-content: center; }
.sec-bill-logo b { font-family: var(--font-heading); font-weight: 800; font-size: 12px; color: #15622f; letter-spacing: -.02em; }
.sec-bill-logo span { display: block; font-size: 8px; color: #6a7060; letter-spacing: .04em; }
.sec-bill-barcode { display: flex; gap: 1.4px; align-items: flex-end; height: 30px; }
.sec-bill-barcode i { width: 1.6px; background: #1c1f17; }
.sec-bill-sec { padding: 8px 0; border-bottom: 1px dashed #c7ccba; }
.sec-bill-sec:last-child { border-bottom: none; }
.sec-bill-label { font-size: 8px; text-transform: uppercase; letter-spacing: .08em; color: #8a8f7e; }
.sec-bill-val { font-size: 11px; color: #1c1f17; }
.sec-bill-val.big { font-family: var(--font-heading); font-weight: 800; font-size: 15px; }
.sec-bill-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 12px; }
.sec-bill-grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 7px 10px; }
.sec-bill-foot { margin-top: 8px; padding-top: 7px; border-top: 2px solid #1c1f17; display: flex; justify-content: space-between; align-items: center; }
.sec-bill-money { font-family: var(--font-heading); font-weight: 800; font-size: 17px; color: #15622f; }

/* campo destacável pelo OCR */
.sec-field { position: relative; border-radius: 4px; transition: background var(--dur-base), box-shadow var(--dur-base); padding: 1px 3px; margin: -1px -3px; }
.sec-field.lit { background: color-mix(in srgb, var(--lime-300) 36%, transparent); box-shadow: 0 0 0 2px var(--green-600); }
.sec-field-tag { position: absolute; top: -9px; right: 0; transform: translateY(-100%); display: inline-flex; align-items: center; gap: 4px; background: var(--green-700); color: #fff; font-family: var(--font-heading); font-weight: 700; font-size: 9px; padding: 2px 6px; border-radius: 4px; white-space: nowrap; z-index: 8; animation: sec-tag-in .2s var(--ease-out); pointer-events: none; }
.sec-field-tag::after { content: ""; position: absolute; bottom: -3px; right: 8px; width: 6px; height: 6px; background: var(--green-700); transform: rotate(45deg); }
@keyframes sec-tag-in { from { opacity: 0; transform: translateY(-100%) scale(.8); } to { opacity: 1; transform: translateY(-100%) scale(1); } }

/* painel de progresso do OCR */
.sec-ocr-panel { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); padding: var(--space-5); }
.sec-ocr-status { display: flex; align-items: center; gap: var(--space-3); padding-bottom: var(--space-4); margin-bottom: var(--space-4); border-bottom: 1px solid var(--color-border); }
.sec-ocr-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--green-100); border-top-color: var(--green-600); animation: sec-spin .8s linear infinite; flex: none; }
@keyframes sec-spin { to { transform: rotate(360deg); } }
.sec-ocr-status strong { font-family: var(--font-heading); font-weight: 700; font-size: var(--text-base); color: var(--color-text); }
.sec-ocr-status span { font-size: var(--text-xs); color: var(--color-text-muted); }
.sec-ocr-log { display: flex; flex-direction: column; gap: var(--space-2); }
.sec-ocr-log-row { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-text-faint); transition: color var(--dur-base); }
.sec-ocr-log-row.done { color: var(--color-text); }
.sec-ocr-log-ic { width: 18px; height: 18px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: var(--stone-100); color: var(--color-text-faint); }
.sec-ocr-log-row.done .sec-ocr-log-ic { background: var(--green-100); color: var(--green-700); }
.sec-ocr-log-row.active .sec-ocr-log-ic { background: var(--green-600); color: #fff; }

/* ---- Revisão: campos extraídos ---- */
.sec-review-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-4) var(--space-5); border-radius: var(--radius-lg); background: var(--green-50); border: 1px solid var(--green-200); margin-bottom: var(--space-5); }
.sec-review-head-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--green-700); color: var(--stone-50); display: flex; align-items: center; justify-content: center; flex: none; }
.sec-review-head strong { font-family: var(--font-heading); font-weight: 800; font-size: var(--text-base); color: var(--green-800); }
.sec-review-head span { font-size: var(--text-xs); color: var(--green-700); }

.sec-fields { display: flex; flex-direction: column; gap: var(--space-3); }
.sec-fld { display: grid; grid-template-columns: 1fr; gap: 5px; }
.sec-fld-lbl { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); font-family: var(--font-heading); font-weight: 600; font-size: var(--text-xs); color: var(--color-text-muted); }
.sec-conf { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: 10px; padding: 1px 6px; border-radius: var(--radius-pill); }
.sec-conf.hi { background: var(--green-100); color: var(--green-700); }
.sec-conf.mid { background: var(--sun-100); color: var(--sun-700); }
.sec-fld-input { display: flex; align-items: center; gap: var(--space-2); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); padding: 0.55rem 0.7rem; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.sec-fld-input:focus-within { border-color: var(--green-400); box-shadow: 0 0 0 3px var(--green-50); }
.sec-fld-input svg { color: var(--color-text-faint); flex: none; }
.sec-fld-input input { flex: 1; border: none; outline: none; background: none; font-family: var(--font-body); font-size: var(--text-sm); color: var(--color-text); min-width: 0; }
.sec-fld-input.is-suggest { border-color: var(--green-300); background: var(--green-50); }

.sec-suggest-note { display: flex; align-items: flex-start; gap: var(--space-2); margin-top: 3px; font-size: 11px; color: var(--green-700); }
.sec-suggest-note svg { flex: none; margin-top: 1px; }

.sec-mini-lots { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.sec-mini-lot { font-family: var(--font-mono); font-size: 11px; padding: 3px 8px; border-radius: var(--radius-sm); border: 1px solid var(--green-200); background: var(--color-surface); color: var(--green-800); cursor: pointer; }
.sec-mini-lot.active { background: var(--green-700); color: var(--stone-50); border-color: var(--green-700); }
.sec-mini-lot:hover:not(.active) { background: var(--green-50); }

/* sucesso */
.sec-success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-3); padding: var(--space-8) var(--space-5); }
.sec-success-ic { width: 72px; height: 72px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: flex; align-items: center; justify-content: center; animation: sec-pop-in .4s var(--ease-out); }
@keyframes sec-pop-in { from { transform: scale(.4); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sec-success h2 { font-size: var(--text-h2); margin: 0; }
.sec-success p { color: var(--color-text-muted); margin: 0; max-width: 42ch; }
.sec-success-card { display: flex; align-items: center; gap: var(--space-3); background: var(--stone-50); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-5); margin-top: var(--space-2); }
.sec-success-actions { display: flex; gap: var(--space-3); margin-top: var(--space-4); flex-wrap: wrap; justify-content: center; }

/* dropzone (arquivo) */
.sec-drop { border: 2px dashed var(--color-border-strong); border-radius: var(--radius-xl); padding: var(--space-8) var(--space-6); text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--space-3); background: var(--stone-50); transition: all var(--dur-base); cursor: pointer; }
.sec-drop:hover, .sec-drop.over { border-color: var(--green-400); background: var(--green-50); }
.sec-drop-ic { width: 56px; height: 56px; border-radius: 50%; background: var(--green-100); color: var(--green-700); display: flex; align-items: center; justify-content: center; }
.sec-drop strong { font-family: var(--font-heading); font-size: var(--text-base); color: var(--color-text); }
.sec-drop span { font-size: var(--text-sm); color: var(--color-text-muted); }
.sec-filechips { display: flex; flex-direction: column; gap: var(--space-2); margin-top: var(--space-4); }
.sec-filechip { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.sec-filechip-ic { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--green-100); color: var(--green-700); display: flex; align-items: center; justify-content: center; flex: none; }
.sec-filechip-body { flex: 1; min-width: 0; }
.sec-filechip-body strong { display: block; font-family: var(--font-heading); font-size: var(--text-sm); color: var(--color-text); }
.sec-filechip-body span { font-size: var(--text-xs); color: var(--color-text-muted); }

/* ============================================================
   FORMULÁRIOS (modal nova unidade / novo morador)
   ============================================================ */
.sec-seg-status { display: flex; gap: 6px; }
.sec-seg-status button { flex: 1; border: 1px solid var(--st-bd); background: var(--st-bg); color: var(--st-tx); border-radius: var(--radius-md); padding: 0.5rem; font-family: var(--font-heading); font-weight: 600; font-size: var(--text-xs); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; opacity: .55; transition: opacity var(--dur-fast); }
.sec-seg-status button.active { opacity: 1; box-shadow: inset 0 0 0 1.5px var(--st); }

/* ---- Importação: grupos de campos + atribuição posterior ---- */
.sec-group-label { display: flex; align-items: center; gap: 7px; font-family: var(--font-heading); font-weight: 700; font-size: var(--text-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--green-700); margin-bottom: var(--space-3); }
.sec-group-label svg { color: var(--green-600); }
.sec-attrib-toggle { display: flex; align-items: center; gap: var(--space-3); width: 100%; text-align: left; border: 1px solid var(--color-border-strong); background: var(--color-surface); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); cursor: pointer; transition: all var(--dur-fast); }
.sec-attrib-toggle:hover { border-color: var(--green-300); }
.sec-attrib-toggle.on { border-color: var(--green-400); background: var(--green-50); }
.sec-attrib-check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--color-border-strong); flex: none; display: flex; align-items: center; justify-content: center; color: #fff; }
.sec-attrib-toggle.on .sec-attrib-check { background: var(--green-600); border-color: var(--green-600); }
.sec-attrib-tx { display: flex; flex-direction: column; gap: 1px; }
.sec-attrib-tx strong { font-family: var(--font-heading); font-size: var(--text-sm); color: var(--color-text); }
.sec-attrib-tx span { font-size: var(--text-xs); color: var(--color-text-muted); }
.sec-pending-note { display: flex; align-items: center; gap: var(--space-2); justify-content: center; background: var(--sun-100); border: 1px solid var(--sun-300); color: #8a5a12; border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); font-size: var(--text-sm); margin-top: var(--space-2); }

/* titular pendente (detalhe do lote) */
.sec-pending-card { display: flex; align-items: center; gap: var(--space-3); background: var(--sun-100); border: 1px solid var(--sun-300); border-radius: var(--radius-md); padding: var(--space-4); }
.sec-pending-ic { width: 42px; height: 42px; border-radius: 50%; background: #fff; color: #8a5a12; display: flex; align-items: center; justify-content: center; flex: none; }
.sec-pending-body { display: flex; flex-direction: column; gap: 2px; }
.sec-pending-body strong { font-family: var(--font-heading); font-size: var(--text-base); color: var(--color-text); }
.sec-pending-tag { font-family: var(--font-heading); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #8a5a12; }

/* ============================================================
   DOMICÍLIO · ocupantes do lote (vários adultos, perfis por pessoa)
   ============================================================ */
.sec-dom { margin-top: var(--space-5); border-top: 1px solid var(--color-border); padding-top: var(--space-5); }
.sec-dom-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.sec-dom-title { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text); }
.sec-dom-title h4 { margin: 0; font-family: var(--font-heading); font-size: var(--text-base); font-weight: 700; }
.sec-dom-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: var(--radius-pill); background: var(--green-100); color: var(--green-800); font-family: var(--font-heading); font-weight: 700; font-size: var(--text-xs); }
.sec-dom-lead { margin: var(--space-2) 0 var(--space-4); font-size: var(--text-sm); color: var(--color-text-muted); line-height: var(--leading-snug); max-width: var(--width-prose); }
.sec-dom-list { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }

.sec-ocup { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-3); box-shadow: var(--shadow-xs); }
.sec-ocup.is-titular { border-color: var(--green-300); background: color-mix(in srgb, var(--green-50) 60%, var(--color-surface)); }
.sec-ocup-top { display: flex; align-items: flex-start; gap: var(--space-3); }
.sec-ocup-av { flex: none; width: 40px; height: 40px; border-radius: var(--radius-pill); background: var(--stone-200); color: var(--stone-700); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-weight: 700; font-size: var(--text-sm); }
.sec-ocup-av.is-titular { background: var(--green-600); color: #fff; }
.sec-ocup-id { flex: 1; min-width: 0; }
.sec-ocup-name { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.sec-ocup-name strong { font-family: var(--font-heading); font-size: var(--text-base); color: var(--color-text); }
.sec-ocup-papel { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: var(--tracking-caps); padding: 2px 7px; border-radius: var(--radius-pill); background: var(--stone-100); color: var(--stone-600); }
.sec-ocup-papel.is-titular { background: var(--green-200); color: var(--green-900); }
.sec-ocup-contacts { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin-top: 4px; }
.sec-ocup-contacts span { display: inline-flex; align-items: center; gap: 5px; font-size: var(--text-xs); color: var(--color-text-muted); }
.sec-ocup-nocontact { font-size: var(--text-xs); color: var(--color-text-faint); font-style: italic; }
.sec-ocup-del { flex: none; width: 28px; height: 28px; border-radius: var(--radius-md); border: 1px solid transparent; background: transparent; color: var(--color-text-faint); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.sec-ocup-del:hover { background: var(--danger-bg); color: var(--danger); }

.sec-ocup-gestor { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--space-3); background: var(--stone-50); border-radius: var(--radius-md); }
.sec-ocup-gestor-ic { display: inline-flex; color: var(--green-700); }
.sec-ocup-gestor-tx { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--color-text-muted); }
.sec-ocup-select { font-family: var(--font-body); font-size: var(--text-xs); padding: 2px 6px; border: 1px solid var(--color-border); border-radius: var(--radius-sm); background: var(--color-surface); color: var(--color-text); max-width: 160px; }

.sec-ocup-perfis { display: flex; flex-wrap: wrap; gap: 6px; }
.sec-perfil { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: var(--radius-pill); border: 1px solid var(--color-border); background: var(--color-surface); color: var(--color-text-muted); font-family: var(--font-heading); font-weight: 600; font-size: var(--text-xs); cursor: pointer; transition: background var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
button.sec-perfil:hover { border-color: var(--green-400); color: var(--color-text); }
.sec-perfil.on { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.sec-perfil-tick { display: inline-flex; align-items: center; justify-content: center; min-width: 14px; opacity: 0.85; font-weight: 700; }

.sec-addocup { margin-top: var(--space-3); border: 1px dashed var(--green-300); border-radius: var(--radius-lg); padding: var(--space-4); background: var(--green-50); display: flex; flex-direction: column; gap: var(--space-3); }
.sec-addocup-head { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-heading); font-weight: 700; font-size: var(--text-sm); color: var(--green-800); }

@container portal (max-width: 720px) {
  .sec-dom-list { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVO
   ============================================================ */
@container portal (max-width: 1080px) {
  .sec-occ, .sec-methods { grid-template-columns: 1fr; }
}
@container portal (max-width: 720px) {
  .sec-streetbar { grid-template-columns: 110px 1fr 44px; }
  .sec-kv { grid-template-columns: 1fr; }
  .sec-map-street { grid-template-columns: 1fr; gap: var(--space-2); }
  .sec-funnel-row { grid-template-columns: 1fr auto; gap: var(--space-2) var(--space-3); }
  .sec-funnel-track { grid-column: 1 / -1; order: 3; }
}
