:root {
  --bg: #0b1020;
  --panel: #131a2a;
  --panel2: #1b2437;
  --text: #f8fafc;
  --muted: #9aa7bd;
  --line: #2a3650;
  --accent: #f4b41a;
  --accent-ink: #17120a;
  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;
  --shadow: 0 18px 45px rgba(0,0,0,.25);
}
* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; }
body { margin: 0; min-height: 100vh; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; background: radial-gradient(circle at top, #18233c 0, var(--bg) 42%); color: var(--text); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 1rem max(1rem, calc((100vw - 1180px)/2)); background: rgba(11,16,32,.88); backdrop-filter: blur(18px); border-bottom: 1px solid rgba(255,255,255,.06); }
.topbar h1 { margin: .1rem 0 0; font-size: clamp(1.25rem, 3vw, 1.8rem); }
.eyebrow { margin: 0; color: var(--accent); font-size: .76rem; letter-spacing: .14em; font-weight: 800; }
.shell { width: min(1180px, calc(100% - 2rem)); margin: 1.2rem auto 4rem; }
.card { background: linear-gradient(180deg, rgba(27,36,55,.95), rgba(19,26,42,.95)); border: 1px solid rgba(255,255,255,.07); border-radius: 20px; box-shadow: var(--shadow); }
.hero { padding: 1.25rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.hero h2 { margin: .25rem 0; font-size: clamp(1.25rem, 3vw, 2rem); }
.hero-actions, .button-row { display: flex; flex-wrap: wrap; gap: .7rem; }
.button { border: 0; border-radius: 12px; padding: .8rem 1rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; gap: .4rem; }
.primary { background: var(--accent); color: var(--accent-ink); }
.secondary { background: #26334d; color: var(--text); }
.danger { background: #4a1722; color: #ffd8df; }
.badge { padding: .5rem .7rem; border-radius: 999px; background: #26334d; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.badge.online { background: rgba(52,211,153,.12); color: var(--ok); }
.badge.offline { background: rgba(251,191,36,.12); color: var(--warn); }
.muted { color: var(--muted); margin: 0; }
.metrics { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; margin: .8rem 0; }
.metric { padding: 1rem; min-width: 0; }
.metric span { display: block; color: var(--muted); font-size: .8rem; }
.metric strong { display: block; margin-top: .3rem; font-size: 1.35rem; overflow: hidden; text-overflow: ellipsis; }
.action-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; margin: .8rem 0; }
.action-card { text-align: left; min-height: 125px; padding: 1rem; border: 1px solid rgba(255,255,255,.07); border-radius: 18px; background: var(--panel); color: var(--text); display: flex; flex-direction: column; justify-content: center; gap: .3rem; box-shadow: var(--shadow); }
.action-card:hover:not(:disabled) { border-color: rgba(244,180,26,.45); transform: translateY(-1px); }
.action-card:disabled { opacity: .45; cursor: not-allowed; }
.action-card strong { font-size: 1rem; }
.action-card small { color: var(--muted); }
.action-icon { color: var(--accent); font-size: 1.55rem; }
.list-section { margin-top: .8rem; padding: 1rem; }
.section-head, .modal-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.section-head h3, .modal-head h3 { margin: .2rem 0 0; }
.search, textarea, select, .quantity-input, .inline-form input { width: 100%; border: 1px solid var(--line); border-radius: 12px; background: #0d1424; color: var(--text); padding: .8rem .9rem; outline: none; }
.search:focus, textarea:focus, select:focus, .quantity-input:focus, .inline-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(244,180,26,.12); }
.section-head .search { max-width: 320px; }
.large { margin: 1rem 0; }
.material-list { display: grid; gap: .55rem; margin-top: .8rem; max-height: 56vh; overflow: auto; }
.material-row { width: 100%; text-align: left; border: 1px solid var(--line); background: #10182a; color: var(--text); padding: .85rem; border-radius: 14px; display: grid; grid-template-columns: 1fr auto; gap: .65rem; }
.material-row:hover { border-color: rgba(244,180,26,.45); }
.material-main strong { display: block; font-size: .98rem; }
.material-main small, .material-side small { display: block; color: var(--muted); margin-top: .15rem; }
.material-side { text-align: right; }
.status-pill { display: inline-flex; align-items: center; padding: .28rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 800; }
.status-pending { background: rgba(154,167,189,.12); color: var(--muted); }
.status-ok { background: rgba(52,211,153,.12); color: var(--ok); }
.status-diff { background: rgba(251,113,133,.12); color: #ff9aab; }
.status-review { background: rgba(251,191,36,.12); color: var(--warn); }
.empty-state { color: var(--muted); padding: 1.5rem 0; text-align: center; }
.modal { width: min(620px, calc(100% - 1rem)); border: 1px solid var(--line); border-radius: 22px; padding: 0; background: var(--panel); color: var(--text); box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.modal.wide, .modal-inner.wide { width: min(900px, 100%); }
.modal::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(4px); }
.modal-inner { padding: 1rem; }
.icon-button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #26334d; color: var(--text); font-size: 1.6rem; line-height: 1; }
.video-wrap { position: relative; margin-top: 1rem; border-radius: 18px; overflow: hidden; background: #020617; aspect-ratio: 3/4; max-height: 62vh; }
#scannerVideo { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 30% 10%; border: 3px solid var(--accent); border-radius: 16px; box-shadow: 0 0 0 9999px rgba(0,0,0,.22); }
.status-line { color: var(--muted); font-size: .9rem; }
.inline-form { display: grid; grid-template-columns: 1fr auto; gap: .6rem; }
.material-detail { margin: 1rem 0; padding: 1rem; border-radius: 16px; background: #10182a; border: 1px solid var(--line); }
.material-detail > p { margin-top: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.detail-grid span { display: block; color: var(--muted); font-size: .75rem; }
.detail-grid strong { display: block; margin-top: .15rem; }
.field-label { display: block; margin: 1rem 0 .45rem; font-size: .86rem; font-weight: 800; }
.quantity-input { font-size: 2rem; font-weight: 900; text-align: center; }
.result-box { margin: 1rem 0; padding: .9rem; border-radius: 14px; background: #0d1424; border: 1px solid var(--line); }
.result-box.diff { border-color: rgba(251,113,133,.4); }
.result-box.ok { border-color: rgba(52,211,153,.4); }
.hidden { display: none !important; }
.notice { color: var(--muted); line-height: 1.5; }
.mapping-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; margin: 1rem 0; }
.mapping-field label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .35rem; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; }
.toggle-row small { display: block; color: var(--muted); margin-top: .25rem; line-height: 1.4; }
.toggle-row input { width: 22px; height: 22px; accent-color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.toast { position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: #f8fafc; color: #0f172a; padding: .75rem 1rem; border-radius: 999px; font-weight: 800; opacity: 0; pointer-events: none; transition: .2s ease; z-index: 50; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 820px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:last-child { grid-column: span 2; }
  .action-grid { grid-template-columns: repeat(2, 1fr); }
  .hero { align-items: stretch; flex-direction: column; }
  .hero-actions .button { flex: 1; }
}
@media (max-width: 520px) {
  .topbar { align-items: flex-start; }
  .badge { font-size: .72rem; }
  .shell { width: min(100% - 1rem, 1180px); }
  .action-grid { grid-template-columns: 1fr 1fr; }
  .action-card { min-height: 115px; padding: .85rem; }
  .metrics { gap: .5rem; }
  .metric { padding: .8rem; }
  .mapping-grid { grid-template-columns: 1fr; }
  .section-head { align-items: stretch; flex-direction: column; }
  .section-head .search { max-width: none; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .inline-form { grid-template-columns: 1fr; }
}

/* MVP 0.3 · diagnóstico y lectura multiformato */
.scanner-test { margin: .8rem 0; padding: 1rem 1.15rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.scanner-test h3 { margin: .25rem 0 .35rem; }
.scanner-test .muted { max-width: 780px; line-height: 1.45; }
.scanner-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: 1rem; padding: .35rem; background: #0d1424; border: 1px solid var(--line); border-radius: 14px; }
.scanner-tab { border: 0; border-radius: 10px; padding: .7rem .8rem; background: transparent; color: var(--muted); font-weight: 800; }
.scanner-tab.active { background: #26334d; color: var(--text); }
.camera-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .3rem; background: radial-gradient(circle at center, rgba(38,51,77,.68), rgba(2,6,23,.94)); color: var(--text); }
.camera-placeholder small { color: var(--muted); }
.scanner-controls { margin-top: .7rem; }
.photo-drop { min-height: 290px; margin-top: 1rem; border: 1px dashed #465574; border-radius: 18px; background: #0d1424; display: flex; flex-direction: column; gap: .85rem; align-items: center; justify-content: center; padding: 1rem; text-align: center; }
.photo-drop p { color: var(--muted); max-width: 420px; }
#scanImagePreview { max-width: 100%; max-height: 46vh; object-fit: contain; border-radius: 12px; background: #fff; }
.scanner-result { margin: .85rem 0; padding: 1rem; border: 1px solid rgba(244,180,26,.34); background: #10182a; border-radius: 16px; }
.scanner-result-head { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: .75rem; }
.scanner-result-head small { color: var(--muted); }
.result-label { display: block; color: var(--muted); font-size: .75rem; }
#scanResultValue { display: block; margin: .2rem 0 .9rem; font-size: clamp(1.15rem, 5vw, 1.7rem); word-break: break-all; }
.scan-meta-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .55rem; margin-bottom: .9rem; }
.scan-meta-grid > div { padding: .65rem; border: 1px solid var(--line); border-radius: 12px; background: #0d1424; min-width: 0; }
.scan-meta-grid span { display: block; color: var(--muted); font-size: .7rem; }
.scan-meta-grid strong { display: block; margin-top: .15rem; font-size: .82rem; overflow-wrap: anywhere; }
.diagnostic-box { margin: .8rem 0; border: 1px solid var(--line); border-radius: 12px; background: #0d1424; }
.diagnostic-box summary { cursor: pointer; padding: .75rem .85rem; color: var(--muted); font-weight: 700; }
.diagnostic-lines { padding: 0 .85rem .85rem; color: var(--muted); font-size: .8rem; line-height: 1.65; }
.diagnostic-lines strong { color: var(--text); }
.manual-scan { margin-top: .8rem; }
@media (max-width: 620px) {
  .scanner-test { align-items: stretch; flex-direction: column; }
  .scanner-test .button { width: 100%; }
  .scan-meta-grid { grid-template-columns: 1fr; }
  .scanner-result .button-row .button { flex: 1 1 100%; }
}

/* MVP 0.4 · flujo móvil continuo */
.metrics { grid-template-columns: repeat(6, 1fr); }
.scanner-progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; margin-top: .7rem; }
.scanner-progress > div { padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: #0d1424; min-width: 0; }
.scanner-progress span { display: block; color: var(--muted); font-size: .68rem; }
.scanner-progress strong { display: block; margin-top: .1rem; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; }
.scanner-modal .button { min-height: 46px; }
#saveCountBtn { min-height: 52px; font-size: 1.05rem; }
#countQty { min-height: 62px; }

@media (max-width: 980px) {
  .metrics { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 700px) {
  .scanner-modal { width: 100vw; max-width: none; height: 100dvh; max-height: 100dvh; border-radius: 0; border: 0; margin: 0; }
  .scanner-modal .modal-inner { min-height: 100dvh; padding: max(.8rem, env(safe-area-inset-top)) .8rem max(.8rem, env(safe-area-inset-bottom)); display: flex; flex-direction: column; }
  .scanner-modal .video-wrap { aspect-ratio: auto; height: min(56dvh, 520px); max-height: none; margin-top: .65rem; border-radius: 14px; }
  .scanner-modal .scan-frame { inset: 34% 7%; }
  .scanner-tabs { margin-top: .6rem; }
  .scanner-progress { grid-template-columns: repeat(4, 1fr); }
  .scanner-progress > div { padding: .5rem .45rem; text-align: center; }
  .scanner-progress span { font-size: .62rem; }
  .scanner-progress strong { font-size: .78rem; }
  .scanner-controls .button { flex: 1; }
  #countDialog { width: 100vw; max-width: none; max-height: 100dvh; border-radius: 0; margin: 0; }
  #countDialog .modal-inner { min-height: 100dvh; padding: max(.9rem, env(safe-area-inset-top)) .9rem max(.9rem, env(safe-area-inset-bottom)); }
  #countDialog .button-row { position: sticky; bottom: 0; padding-top: .7rem; background: linear-gradient(180deg, rgba(19,26,42,0), var(--panel) 24%); }
  #countDialog .button-row .button { flex: 1; min-height: 54px; }
}

@media (max-width: 520px) {
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:last-child { grid-column: span 2; }
  .scanner-test { padding: .9rem; }
  .scanner-progress { grid-template-columns: repeat(2, 1fr); }
  .action-card { min-height: 122px; }
}


/* MVP 0.5 · operación offline segura */
.status-stack { display:flex; flex-direction:column; gap:.35rem; align-items:flex-end; }
.recovery-card { margin:.8rem 0; padding:1rem 1.15rem; display:flex; align-items:center; justify-content:space-between; gap:1rem; border-color:rgba(52,211,153,.32); }
.recovery-card h3 { margin:.25rem 0 .35rem; }
.save-meta { min-width:180px; text-align:right; }
.save-meta span { display:block; color:var(--muted); font-size:.72rem; }
.save-meta strong { display:block; margin-top:.2rem; font-size:.86rem; }
.location-list { display:grid; gap:.55rem; margin-top:.85rem; max-height:60vh; overflow:auto; }
.location-row { width:100%; border:1px solid var(--line); background:#0d1424; color:var(--text); border-radius:14px; padding:.8rem .9rem; display:flex; justify-content:space-between; align-items:center; gap:1rem; text-align:left; }
.location-row:hover { border-color:#465574; background:#10182a; }
.location-row strong { display:block; }
.location-row small { display:block; color:var(--muted); margin-top:.25rem; }
.install-help { line-height:1.55; }
.install-help p { margin:.7rem 0; }
.backup-panel h4 { margin:.25rem 0 .7rem; }
.backup-meta-grid { display:grid; grid-template-columns:1fr 1fr; gap:.55rem; margin:.7rem 0 1rem; }
.backup-meta-grid > div { padding:.7rem; border:1px solid var(--line); border-radius:12px; background:#0d1424; }
.backup-meta-grid span { display:block; color:var(--muted); font-size:.7rem; }
.backup-meta-grid strong { display:block; margin-top:.2rem; font-size:.82rem; }
.small-note { font-size:.78rem; margin-bottom:0; }

@media (max-width:700px) {
  .status-stack { align-items:flex-end; }
  .recovery-card { align-items:stretch; flex-direction:column; }
  .save-meta { text-align:left; min-width:0; }
  .backup-meta-grid { grid-template-columns:1fr; }
}
@media (max-width:520px) {
  .topbar { gap:.6rem; }
  .status-stack .badge { font-size:.64rem; max-width:170px; text-align:right; }
}

/* MVP 0.5.1 · selector explícito cámara / galería */
.photo-actions { justify-content: center; gap: 12px; flex-wrap: wrap; }
.photo-actions .button { min-width: 170px; }
@media (max-width: 520px) {
  .photo-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .photo-actions .button { width: 100%; min-width: 0; text-align: center; }
}

/* MVP 0.6 · control operativo por ubicación y cierre */
.metrics { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.operation-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:.6rem; margin:.9rem 0; }
.operation-grid > div { padding:.75rem; border:1px solid var(--line); border-radius:12px; background:#0d1424; min-width:0; }
.operation-grid span { display:block; color:var(--muted); font-size:.7rem; }
.operation-grid strong { display:block; margin-top:.2rem; font-size:.9rem; overflow-wrap:anywhere; }
.location-state-banner,.summary-state { display:flex; flex-direction:column; gap:.25rem; padding:.9rem 1rem; border-radius:14px; margin:.75rem 0; border:1px solid var(--line); }
.location-state-banner span,.summary-state span { color:var(--muted); font-size:.82rem; line-height:1.4; }
.location-state-banner.closed,.summary-state.ready { border-color:rgba(52,211,153,.45); background:rgba(16,185,129,.08); }
.location-state-banner.ready { border-color:rgba(244,180,26,.45); background:rgba(244,180,26,.07); }
.location-state-banner.open,.summary-state.blocked { border-color:rgba(248,113,113,.35); background:rgba(248,113,113,.06); }
.summary-grid { grid-template-columns:repeat(5,minmax(0,1fr)); }
.blocker-list { display:grid; gap:.45rem; margin:.55rem 0 1rem; }
.blocker-item { padding:.65rem .75rem; border:1px solid var(--line); border-radius:10px; background:#0d1424; color:var(--text); font-size:.84rem; }
.blocker-item.ok { border-color:rgba(52,211,153,.35); }
@media (max-width:1100px){ .metrics{grid-template-columns:repeat(4,1fr)} .summary-grid{grid-template-columns:repeat(3,1fr)} }
@media (max-width:700px){ .operation-grid,.summary-grid{grid-template-columns:repeat(2,1fr)} }
@media (max-width:520px){ .metrics{grid-template-columns:repeat(2,1fr)} .metric:last-child{grid-column:auto} .operation-grid,.summary-grid{grid-template-columns:repeat(2,1fr)} }

/* =========================================================
   INBEGAMA MVP 0.7 · BRAND + OPERACIÓN + TRAZABILIDAD
   ========================================================= */
:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel2: #e9eef5;
  --text: #2e3440;
  --muted: #667085;
  --line: #d8e0eb;
  --accent: #f0b323;
  --accent-ink: #1d2939;
  --brand: #163b70;
  --brand-dark: #0e2d58;
  --ok: #16875b;
  --warn: #c47d00;
  --danger: #cf3346;
  --shadow: 0 12px 32px rgba(22,59,112,.10);
}
html { background: var(--bg); color-scheme: light; }
body { background: linear-gradient(180deg,#f8fafc 0,#eef3f9 100%); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
h1,h2,h3,h4,.brand-lockup,.metric strong,.action-card strong,.button { font-family: Montserrat, Inter, ui-sans-serif, system-ui, sans-serif; }
.card { background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); }
.eyebrow { color: var(--brand); letter-spacing: .12em; }
.muted { color: var(--muted); }
.primary { background: var(--accent); color: #1b2535; box-shadow: 0 6px 16px rgba(240,179,35,.18); }
.primary:hover:not(:disabled) { filter: brightness(.98); }
.secondary { background: #e9eef5; color: var(--brand); border: 1px solid #d5deea; }
.ghost { background: transparent; color: var(--brand); border: 1px solid #c8d4e3; }
.compact { padding: .55rem .75rem; border-radius: 10px; font-size: .78rem; }
.danger { background: #fff0f2; color: #9d2235; border:1px solid #facbd2; }
.badge { background:#edf2f7; color:#64748b; border:1px solid #dce4ee; }
.badge.online { background:#e8f7f0; color:#137a55; border-color:#c6eadc; }
.badge.offline { background:#fff7e5; color:#9a6500; border-color:#f7ddb0; }

/* Login */
.login-view { min-height:100dvh; display:grid; place-items:center; padding:24px; background:
  radial-gradient(circle at 18% 12%, rgba(240,179,35,.18), transparent 24%),
  radial-gradient(circle at 82% 88%, rgba(22,59,112,.16), transparent 24%),
  linear-gradient(135deg,#0f2f5a 0,#163b70 48%,#1f4f8e 100%); }
.login-shell { width:min(880px,100%); display:grid; grid-template-columns:1fr 1fr; gap:28px; align-items:center; }
.login-brand { color:#fff; display:flex; flex-direction:column; gap:18px; padding:24px; }
.login-mark { width:150px; filter:drop-shadow(0 16px 24px rgba(0,0,0,.16)); background:#fff; border-radius:32px; padding:14px; }
.login-brand h1 { margin:0; font-size:clamp(2.5rem,7vw,5rem); letter-spacing:.035em; line-height:.92; }
.brand-slogan { margin:.45rem 0 0; font-size:clamp(1rem,2.4vw,1.35rem); color:#e8eef7; font-weight:600; }
.brand-descriptor { margin:.35rem 0 0; color:#ffc33d; font-weight:700; }
.login-card { padding:26px; border-radius:28px; }
.login-card h2 { color:var(--brand); margin:.28rem 0 .45rem; }
.login-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:20px 0 16px; }
.login-grid label span,.choice-fieldset legend { display:block; color:#475467; font-size:.78rem; font-weight:800; margin-bottom:7px; }
.login-grid input { width:100%; border:1px solid var(--line); border-radius:12px; padding:.85rem .9rem; color:var(--text); background:#fff; outline:none; }
.login-grid input:focus { border-color:var(--brand); box-shadow:0 0 0 3px rgba(22,59,112,.10); }
.choice-fieldset { border:0; padding:0; margin:14px 0; }
.turn-choice,.role-choice { display:grid; gap:8px; }
.turn-choice { grid-template-columns:repeat(4,1fr); }
.role-choice { grid-template-columns:1fr 1fr; }
.turn-choice label,.role-choice label { position:relative; cursor:pointer; }
.turn-choice input,.role-choice input { position:absolute; opacity:0; pointer-events:none; }
.turn-choice span,.role-choice span { display:flex; justify-content:center; align-items:center; min-height:46px; padding:8px; border:1px solid var(--line); border-radius:12px; color:#475467; background:#f8fafc; font-weight:800; font-size:.84rem; text-align:center; }
.turn-choice input:checked + span,.role-choice input:checked + span { border-color:var(--accent); background:#fff8e4; color:var(--brand-dark); box-shadow:inset 0 0 0 1px var(--accent); }
.login-button { width:100%; min-height:52px; margin-top:10px; }
.login-note { margin:13px 0 0; color:#98a2b3; font-size:.72rem; text-align:center; }
.login-footer { grid-column:1/-1; display:flex; justify-content:space-between; gap:12px; padding:0 24px; color:#d6e1ef; font-size:.76rem; }

/* Header */
.topbar { background:rgba(255,255,255,.94); border-bottom:1px solid #dfe6ef; box-shadow:0 4px 18px rgba(22,59,112,.06); backdrop-filter:blur(18px); }
.brand-lockup { display:flex; gap:10px; align-items:center; color:var(--brand); }
.topbar-mark { width:48px; height:48px; }
.brand-lockup h1 { margin:0; color:var(--brand); font-size:1.28rem; letter-spacing:.05em; }
.brand-lockup p { margin:2px 0 0; color:#667085; font-size:.68rem; font-weight:700; }
.topbar-right { display:flex; gap:10px; align-items:center; }
.session-chip { min-width:180px; border-left:3px solid var(--accent); padding-left:10px; line-height:1.2; }
.session-chip span { display:block; font-size:.78rem; color:#475467; }
.session-chip strong { display:block; margin-top:3px; color:var(--brand); font-size:.78rem; }
.session-chip strong span { display:inline; color:inherit; }

/* Dashboard */
.shell { width:min(1220px,calc(100% - 2rem)); }
.dashboard-hero { display:grid; grid-template-columns:1.25fr .85fr; gap:28px; padding:24px; border-top:4px solid var(--brand); }
.dashboard-intro h2 { color:var(--brand); margin:.35rem 0 .2rem; font-size:clamp(1.55rem,3vw,2.35rem); }
.inventory-heading { margin-top:20px; display:flex; flex-direction:column; gap:4px; }
.inventory-heading span { color:#98a2b3; font-size:.72rem; text-transform:uppercase; letter-spacing:.08em; font-weight:800; }
.inventory-heading strong { color:#344054; font-size:1.05rem; }
.inventory-heading small { color:#667085; }
.dashboard-progress-wrap { align-self:center; background:#f8fafc; border:1px solid #e1e7ef; border-radius:18px; padding:18px; }
.progress-head,.dashboard-state-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.progress-head span { color:#667085; font-size:.8rem; font-weight:700; }
.progress-head strong { color:var(--brand); font-size:1.4rem; }
.progress-track { height:10px; border-radius:999px; background:#e5ebf3; overflow:hidden; margin:10px 0 12px; }
.progress-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--brand),#2b69ad 62%,var(--accent)); transition:width .3s ease; }
.dashboard-state-row { margin-bottom:14px; }
.dashboard-state-row .muted { font-size:.72rem; }
.hero-actions .button { flex:1; }
.metrics { gap:.7rem; }
.metric { border-radius:16px; border-top:3px solid #dbe5f0; min-height:98px; }
.metric:nth-child(2),.metric:nth-child(6){ border-top-color:#5da582; }
.metric:nth-child(3),.metric:nth-child(5){ border-top-color:var(--accent); }
.metric:nth-child(4){ border-top-color:#dd6270; }
.metric span { color:#667085; }
.metric strong { color:var(--brand); }
.action-card { background:#fff; color:var(--text); border:1px solid var(--line); box-shadow:var(--shadow); }
.action-card:hover:not(:disabled) { border-color:var(--accent); box-shadow:0 14px 30px rgba(22,59,112,.14); }
.action-card small { color:#667085; }
.action-icon { color:var(--brand); }
.senior-tag { display:inline-flex; font-style:normal; font-size:.62rem; padding:.18rem .35rem; margin-left:.3rem; border-radius:999px; background:#fff3cf; color:#8b5b00; vertical-align:middle; }

/* Forms, dialogs and lists */
.search, textarea, select, .quantity-input, .inline-form input { background:#fff; color:var(--text); border-color:var(--line); }
.search:focus, textarea:focus, select:focus, .quantity-input:focus, .inline-form input:focus { border-color:var(--brand); box-shadow:0 0 0 3px rgba(22,59,112,.10); }
.material-row,.location-row { background:#fff; color:var(--text); border-color:var(--line); }
.material-row:hover,.location-row:hover { border-color:#9db4cf; background:#f8fbff; }
.material-main small,.material-side small,.location-row small { color:#667085; }
.modal { background:#fff; color:var(--text); border-color:#d7e0eb; box-shadow:0 28px 90px rgba(15,42,79,.30); }
.modal::backdrop { background:rgba(14,45,88,.52); backdrop-filter:blur(5px); }
.icon-button { background:#edf2f7; color:var(--brand); }
.material-detail,.result-box,.scanner-result,.diagnostic-box,.scanner-progress > div,.operation-grid > div,.backup-meta-grid > div,.blocker-item { background:#f8fafc; border-color:#dfe6ef; color:var(--text); }
.detail-grid span,.result-label,.scan-meta-grid span,.operation-grid span,.backup-meta-grid span,.diagnostic-lines,.diagnostic-box summary { color:#667085; }
.scan-meta-grid > div { background:#fff; border-color:#dfe6ef; }
.scanner-tabs { background:#eef3f8; border-color:#dfe6ef; }
.scanner-tab { color:#667085; }
.scanner-tab.active { background:var(--brand); color:#fff; }
.scanner-result { border-color:rgba(240,179,35,.55); background:#fffdf7; }
.status-line { color:#667085; }
.video-wrap { background:#071426; }
.scan-frame { border-color:var(--accent); }
.camera-placeholder { background:radial-gradient(circle at center,rgba(22,59,112,.75),rgba(5,18,37,.96)); color:#fff; }
.photo-drop { background:#f8fafc; border-color:#b7c5d6; }
.photo-drop p { color:#667085; }
.status-pending { background:#edf2f7; color:#667085; }
.status-ok { background:#e8f7f0; color:#147955; }
.status-diff { background:#fff0f2; color:#b4233a; }
.status-review { background:#fff7e5; color:#9a6500; }
.recovery-card { border-color:#bfe1d1; background:#fbfffd; }
.location-state-banner.closed,.summary-state.ready { background:#ecf8f2; border-color:#bfe1d1; }
.location-state-banner.ready { background:#fff9e9; border-color:#efd290; }
.location-state-banner.open,.summary-state.blocked { background:#fff4f5; border-color:#f3c7cd; }

/* Traceability and role permissions */
.trace-box { margin:12px 0; padding:12px; border:1px solid #d8e2ed; border-radius:14px; background:#f7faff; display:grid; gap:8px; }
.trace-box > div { padding:9px 10px; border-left:3px solid var(--brand); background:#fff; border-radius:8px; }
.trace-box span { display:block; color:#667085; font-size:.68rem; text-transform:uppercase; letter-spacing:.06em; font-weight:800; }
.trace-box strong { display:block; color:#344054; font-size:.82rem; margin-top:2px; }
.trace-box small { color:#667085; font-size:.7rem; }
.profile-settings-card { display:grid; grid-template-columns:auto 1fr auto; gap:12px; align-items:center; margin:0 0 14px; padding:12px; border:1px solid var(--line); background:#f8fafc; border-radius:14px; }
.profile-settings-card img { width:44px; }
.profile-settings-card span { display:block; color:#667085; font-size:.68rem; text-transform:uppercase; letter-spacing:.05em; }
.profile-settings-card strong { display:block; color:var(--brand); margin-top:2px; }
.profile-settings-card small { color:#667085; }
.summary-signoff { margin:12px 0; padding:10px 12px; border-radius:12px; background:#eef4fb; color:#536273; font-size:.82rem; }
.permission-overlay { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:20px; background:rgba(14,45,88,.62); backdrop-filter:blur(5px); }
.permission-card { width:min(420px,100%); background:#fff; border-radius:24px; padding:26px; box-shadow:0 28px 90px rgba(0,0,0,.25); text-align:center; }
.permission-card img { width:72px; }
.permission-card h3 { color:var(--brand); margin:.35rem 0 .45rem; }
.permission-card .button { width:100%; margin-top:18px; }

/* Scanner mobile keeps its operational dark camera context */
@media (max-width:700px) {
  .scanner-modal .modal-inner { background:#fff; }
  #countDialog .button-row { background:linear-gradient(180deg,rgba(255,255,255,0),#fff 24%); }
}

@media (max-width:900px) {
  .login-shell { grid-template-columns:1fr; max-width:620px; }
  .login-brand { text-align:center; align-items:center; padding-bottom:0; }
  .login-mark { width:112px; }
  .login-brand h1 { font-size:3.25rem; }
  .login-footer { grid-column:auto; }
  .dashboard-hero { grid-template-columns:1fr; }
  .topbar-right { flex-wrap:wrap; justify-content:flex-end; }
  .session-chip { min-width:150px; }
}
@media (max-width:620px) {
  .login-view { padding:12px; align-items:start; }
  .login-shell { gap:14px; }
  .login-brand { padding:14px 10px 0; gap:8px; }
  .login-brand h1 { font-size:2.55rem; }
  .brand-slogan { margin-top:.2rem; }
  .login-card { padding:18px; border-radius:22px; }
  .login-grid { grid-template-columns:1fr; }
  .role-choice { grid-template-columns:1fr; }
  .login-footer { flex-direction:column; text-align:center; padding-bottom:10px; }
  .topbar { align-items:center; padding:.65rem .75rem; }
  .brand-lockup p { display:none; }
  .topbar-mark { width:38px; height:38px; }
  .brand-lockup h1 { font-size:1rem; }
  .session-chip { order:3; width:100%; border-left:0; border-top:1px solid #e1e7ef; padding:7px 0 0; display:flex; justify-content:space-between; min-width:0; }
  .session-chip span,.session-chip strong { font-size:.7rem; }
  .status-stack { margin-left:auto; }
  .status-stack .badge { max-width:150px; font-size:.6rem; }
  .compact { padding:.45rem .55rem; font-size:.67rem; }
  .shell { width:calc(100% - .75rem); margin-top:.7rem; }
  .dashboard-hero { padding:16px; gap:16px; border-radius:18px; }
  .dashboard-intro h2 { font-size:1.6rem; }
  .metrics { grid-template-columns:repeat(2,1fr); }
  .metric { min-height:88px; }
  .action-card { min-height:112px; border-radius:16px; }
  .profile-settings-card { grid-template-columns:auto 1fr; }
  .profile-settings-card .button { grid-column:1/-1; }
}


/* =========================================================
   INBEGAMA MVP 0.7.1 · UX PROFESIONAL + TRAZABILIDAD VISIBLE
   ========================================================= */
.module-section { margin: 1.25rem 0; }
.module-section-head {
  display:flex; justify-content:space-between; align-items:flex-end; gap:18px;
  padding:0 4px 10px;
}
.module-section-head h3 { margin:.15rem 0 .25rem; color:var(--brand); font-size:1.25rem; }
.module-section-head p:last-child { margin:0; font-size:.82rem; }

.module-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.module-span-2 { grid-column:span 2; }
.module-card {
  appearance:none; width:100%; min-height:104px; padding:15px 16px;
  border:1px solid #d9e2ec; border-radius:18px; background:#fff; color:var(--text);
  display:grid; grid-template-columns:52px minmax(0,1fr) auto; align-items:center; gap:14px;
  text-align:left; cursor:pointer; box-shadow:0 7px 22px rgba(22,59,112,.07);
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
}
.module-card:hover:not(:disabled), .module-card:focus-visible:not(:disabled) {
  border-color:#9fb4ce; box-shadow:0 14px 34px rgba(22,59,112,.13); transform:translateY(-1px); outline:none;
}
.module-card:active:not(:disabled) { transform:translateY(0); }
.module-card:disabled { opacity:.46; cursor:not-allowed; box-shadow:none; }

.module-card-featured {
  min-height:126px; padding:18px 20px;
  border-color:#b8c9dc;
  background:linear-gradient(120deg,#123766 0%,#163b70 58%,#1f518e 100%);
  box-shadow:0 16px 38px rgba(22,59,112,.22);
}
.module-card-featured .module-copy strong,
.module-card-featured .module-copy small,
.module-card-featured .module-kicker,
.module-card-featured .module-chevron { color:#fff; }
.module-card-featured .module-copy small { color:#dce8f5; }
.module-card-featured .module-kicker { color:#ffd36b; }
.module-card-featured .module-badge { background:rgba(255,255,255,.12); color:#fff; border-color:rgba(255,255,255,.22); }

.module-icon-shell {
  width:52px; height:52px; border-radius:15px; display:grid; place-items:center;
  background:#eef4fb; color:var(--brand); border:1px solid #dce6f1;
}
.module-icon-shell.featured { background:var(--accent); color:#17345d; border-color:#ffd269; box-shadow:0 8px 22px rgba(240,179,35,.24); }
.module-icon-shell.warn { background:#fff7e7; color:#a76a00; border-color:#f4d594; }
.module-icon-shell.danger { background:#fff1f3; color:#b4233a; border-color:#f2c9d0; }
.module-icon-shell.senior { background:#f8f1dc; color:#8a5d00; border-color:#ead498; }
.module-icon-shell.trace { background:#eaf3ff; color:#1558a0; border-color:#c8dbf3; }
.module-icon { width:27px; height:27px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }

.module-copy { min-width:0; display:flex; flex-direction:column; gap:3px; }
.module-kicker { font-size:.62rem; letter-spacing:.11em; color:#7c8da0; font-weight:800; }
.module-copy strong { font-family:Montserrat,Inter,sans-serif; font-size:1.02rem; color:#25354a; }
.module-copy small { color:#667085; font-size:.78rem; line-height:1.35; }
.module-tail { display:flex; align-items:center; gap:8px; color:#8ca0b6; }
.module-chevron { width:19px; height:19px; fill:none; stroke:currentColor; stroke-width:2; stroke-linecap:round; stroke-linejoin:round; }
.module-badge {
  display:inline-flex; align-items:center; min-height:25px; padding:3px 8px; border-radius:999px;
  border:1px solid #d7e2ee; background:#f3f7fb; color:#53677d; font-size:.66rem; font-weight:800; white-space:nowrap;
}
.module-badge.warn { color:#956000; background:#fff7e4; border-color:#f2d69b; }
.module-badge.danger { color:#a8273a; background:#fff0f2; border-color:#f1cad1; }
.module-badge.senior { color:#805700; background:#fff7dd; border-color:#ead391; }

.module-card-trace { border-left:4px solid #2d69ad; }

/* Trazabilidad profesional */
.trace-modal-inner { max-width:900px; }
.trace-summary-grid {
  display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:4px 0 14px;
}
.trace-summary-grid > div {
  padding:12px 13px; border-radius:14px; border:1px solid #dde6ef; background:#f8fafc;
}
.trace-summary-grid span { display:block; color:#7a899b; font-size:.68rem; font-weight:700; }
.trace-summary-grid strong { display:block; margin-top:4px; color:var(--brand); font-size:1rem; }
.trace-toolbar { display:grid; grid-template-columns:1fr 220px; gap:10px; margin-bottom:14px; }
.trace-toolbar select { width:100%; border:1px solid var(--line); border-radius:12px; padding:.78rem .85rem; background:#fff; color:var(--text); }
.trace-timeline { display:grid; gap:9px; max-height:56vh; overflow:auto; padding-right:2px; }
.trace-event {
  display:grid; grid-template-columns:44px minmax(0,1fr); gap:12px; align-items:flex-start;
  padding:12px 13px; border:1px solid #dfe7f0; border-radius:14px; background:#fff;
}
.trace-event-icon {
  width:42px; height:42px; display:grid; place-items:center; border-radius:12px; color:var(--brand);
  background:#edf4fb; border:1px solid #d8e5f2;
}
.trace-event-icon svg { width:23px; height:23px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.trace-control .trace-event-icon { background:#fff7e4; color:#976300; border-color:#efd596; }
.trace-session .trace-event-icon { background:#edf8f3; color:#147955; border-color:#cbe9dc; }
.trace-count .trace-event-icon { background:#eaf3ff; color:#1558a0; border-color:#cadcf2; }
.trace-event-head { display:flex; justify-content:space-between; gap:12px; align-items:baseline; }
.trace-event-head strong { color:#344054; font-size:.88rem; }
.trace-event-head time { color:#98a2b3; font-size:.67rem; white-space:nowrap; }
.trace-event p { margin:4px 0 3px; color:#536273; font-size:.79rem; line-height:1.35; }
.trace-event small { color:#7c8b9b; font-size:.7rem; }

/* Conteo: acción de guardado clara y salida automática */
#countDialog .modal-inner { border-top:4px solid var(--brand); }
#saveCountBtn { min-width:180px; }
#countDialog .trace-box { border-left:4px solid #2d69ad; }

/* Mobile */
@media (max-width:620px) {
  .module-section { margin:1rem 0; }
  .module-section-head { padding:0 5px 8px; }
  .module-section-head h3 { font-size:1.08rem; }
  .module-section-head p:last-child { font-size:.74rem; }
  .module-grid { grid-template-columns:1fr; gap:9px; }
  .module-span-2 { grid-column:auto; }
  .module-card, .module-card-featured {
    min-height:88px; padding:13px 14px; border-radius:16px;
    grid-template-columns:48px minmax(0,1fr) auto; gap:12px;
  }
  .module-card-featured { min-height:105px; }
  .module-icon-shell { width:48px; height:48px; border-radius:14px; }
  .module-icon { width:25px; height:25px; }
  .module-copy strong { font-size:.94rem; }
  .module-copy small { font-size:.72rem; }
  .module-kicker { font-size:.57rem; }
  .module-tail .module-badge { display:none; }
  .module-card-featured .module-tail .module-badge { display:inline-flex; }
  .trace-summary-grid { grid-template-columns:repeat(2,1fr); }
  .trace-toolbar { grid-template-columns:1fr; }
  .trace-event { grid-template-columns:40px minmax(0,1fr); padding:11px; }
  .trace-event-icon { width:38px; height:38px; }
  .trace-event-head { align-items:flex-start; flex-direction:column; gap:2px; }
}

/* =========================================================
   INBEGAMA MVP 0.8 · CABECERA DE MARCA + JERARQUÍA VISUAL
   ========================================================= */
.topbar.topbar-v072 {
  position: sticky;
  top: 0;
  z-index: 20;
  display: block;
  padding: 0;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #dce5ef;
  box-shadow: 0 8px 28px rgba(22,59,112,.08);
  backdrop-filter: blur(18px);
}
.topbar-inner {
  width: min(1220px, calc(100% - 2rem));
  min-height: 104px;
  margin: 0 auto;
  padding: 15px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.brand-lockup-primary {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 0 0 auto;
  min-width: 360px;
}
.brand-lockup-primary .topbar-mark {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  filter: drop-shadow(0 7px 11px rgba(22,59,112,.11));
}
.brand-wording { min-width: 0; }
.brand-lockup-primary .brand-wording h1 {
  margin: 0;
  color: var(--brand);
  font-family: Montserrat, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: .055em;
}
.brand-lockup-primary .brand-wording p {
  display: block;
  margin: 7px 0 0;
  color: #697586;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: .76rem;
  font-weight: 650;
  letter-spacing: .018em;
  white-space: nowrap;
}
.topbar-meta {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
}
.session-chip-v072 {
  min-width: 190px;
  border-left: 3px solid var(--accent);
  padding: 3px 0 3px 12px;
  line-height: 1.15;
}
.session-chip-v072 > span {
  display: block;
  color: #344054;
  font-size: .8rem;
  font-weight: 650;
}
.session-chip-v072 > strong {
  display: block;
  margin-top: 5px;
  color: var(--brand);
  font-size: .8rem;
  font-weight: 800;
}
.session-chip-v072 > strong span { display: inline; color: inherit; font-size: inherit; }
.status-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}
.badge.status-mini {
  min-height: 27px;
  padding: 4px 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  font-size: .66rem;
  line-height: 1;
  font-weight: 750;
  white-space: nowrap;
  box-shadow: none;
}
.badge.status-mini::before {
  content: '';
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .85;
}
.badge.status-mini.online {
  background: #eef8f3;
  color: #267a5b;
  border-color: #d4eadf;
}
.badge.status-mini.offline {
  background: #fff6e6;
  color: #986500;
  border-color: #f0ddb3;
}
.badge.status-mini.offline-capability.ready {
  background: #edf3fa;
  color: #416589;
  border-color: #dae5f0;
}
.badge.status-mini.offline-capability.preparing {
  background: #f6f7f9;
  color: #7c8795;
  border-color: #e3e7ec;
}
.change-user-v072 {
  min-height: 34px;
  padding: 7px 10px;
  color: var(--brand);
  border-color: #cfd9e5;
  background: #fff;
  white-space: nowrap;
  font-size: .7rem;
}
.change-user-v072:hover { background:#f7f9fc; border-color:#aebfd3; }

/* Más aire en la parte superior para que el dashboard no compita con la marca */
.shell { margin-top: 1rem; }

/* Recuperación: mantenerla informativa, no protagónica */
.recovery-card {
  border-top: 2px solid #8bc8ad;
  box-shadow: 0 8px 24px rgba(22,59,112,.07);
}
.recovery-card .eyebrow { font-size: .67rem; }

/* KPI ligeramente más ejecutivo */
.metric {
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(22,59,112,.065);
}
.metric::after {
  content: '';
  position: absolute;
  inset: auto 12px 0 12px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(22,59,112,.12), transparent);
}

@media (max-width: 900px) {
  .topbar-inner {
    width: min(100% - 1.5rem, 1220px);
    min-height: 0;
    padding: 13px 0 12px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
  .brand-lockup-primary { min-width: 0; width: 100%; }
  .brand-lockup-primary .topbar-mark { width: 64px; height: 64px; flex-basis: 64px; }
  .brand-lockup-primary .brand-wording h1 { font-size: 1.65rem; }
  .brand-lockup-primary .brand-wording p { font-size: .74rem; }
  .topbar-meta {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #e5ebf2;
  }
  .session-chip-v072 {
    min-width: 0;
    border-left: 0;
    padding: 0;
  }
}

@media (max-width: 620px) {
  .topbar.topbar-v072 { position: sticky; }
  .topbar-inner {
    width: calc(100% - 1.2rem);
    padding: 12px 0 10px;
    gap: 9px;
  }
  .brand-lockup-primary {
    gap: 12px;
    align-items: center;
  }
  .brand-lockup-primary .topbar-mark {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }
  .brand-lockup-primary .brand-wording h1 {
    font-size: 1.58rem;
    letter-spacing: .05em;
  }
  .brand-lockup-primary .brand-wording p {
    display: block !important;
    margin-top: 6px;
    font-size: .7rem;
    font-weight: 700;
    white-space: normal;
  }
  .topbar-meta {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "session change"
      "status status";
    align-items: center;
    row-gap: 8px;
  }
  .session-chip-v072 { grid-area: session; }
  .session-chip-v072 > span { font-size: .75rem; }
  .session-chip-v072 > strong { font-size: .74rem; margin-top: 4px; }
  .status-row {
    grid-area: status;
    justify-content: flex-start;
    gap: 5px;
  }
  .change-user-v072 { grid-area: change; justify-self: end; }
  .badge.status-mini {
    min-height: 25px;
    padding: 4px 7px;
    font-size: .62rem;
  }
  .shell { width: calc(100% - .75rem); margin-top: .65rem; }
}

@media (max-width: 390px) {
  .brand-lockup-primary .topbar-mark { width: 54px; height: 54px; flex-basis: 54px; }
  .brand-lockup-primary .brand-wording h1 { font-size: 1.4rem; }
  .brand-lockup-primary .brand-wording p { font-size: .64rem; }
  .change-user-v072 { padding: 6px 8px; font-size: .65rem; }
}


/* ===== INBEGAMA MVP 0.8 · Equipo y consolidación offline ===== */
.module-icon-shell.team { background:linear-gradient(145deg,#e9f1fb,#f5f8fc); color:#163B70; }
.module-card-team { border-color:#cbd8e8; }
.team-modal-inner { max-width:980px; }
.team-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin:14px 0 18px; }
.team-summary-grid>div { background:#f7f9fc; border:1px solid #dce5ef; border-radius:14px; padding:12px 14px; display:grid; gap:5px; }
.team-summary-grid span { font-size:.72rem; color:#65758a; font-weight:700; }
.team-summary-grid strong { color:#163B70; font-size:1rem; }
.team-panel { border:1px solid #dce5ef; border-radius:18px; padding:16px; margin:14px 0; background:#fff; box-shadow:0 8px 22px rgba(22,59,112,.045); }
.team-panel-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:12px; }
.team-panel-head h4 { margin:3px 0 0; font-size:1.03rem; color:#24364d; }
.team-assignee-grid { display:grid; grid-template-columns:1.2fr 1.2fr .7fr 1fr; gap:10px; }
.team-assignee-grid label { display:grid; gap:5px; }
.team-assignee-grid label>span { font-size:.72rem; color:#66768a; font-weight:700; }
.team-assignee-grid input,.team-assignee-grid select { width:100%; border:1px solid #ccd7e3; border-radius:10px; padding:10px 11px; background:#fff; color:#22344a; font:inherit; }
.team-location-toolbar { display:flex; gap:8px; align-items:center; margin:14px 0 10px; }
.team-location-toolbar .search { flex:1; }
.team-location-list { max-height:330px; overflow:auto; border:1px solid #dfe7ef; border-radius:12px; background:#fafbfd; }
.team-location-row { display:grid; grid-template-columns:auto 1fr auto; gap:10px; align-items:center; padding:10px 12px; border-bottom:1px solid #e7edf3; cursor:pointer; }
.team-location-row:last-child { border-bottom:0; }
.team-location-row:hover { background:#f1f6fb; }
.team-location-main { display:grid; gap:2px; }
.team-location-main strong { color:#253a55; }
.team-location-main small { color:#728197; font-size:.72rem; }
.team-location-progress { font-weight:800; color:#163B70; font-size:.8rem; }
.team-selection-foot { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:10px; color:#64748a; font-size:.8rem; }
.team-user-activity,.team-import-history { display:grid; gap:8px; }
.team-user-row,.team-import-row { display:flex; justify-content:space-between; align-items:center; gap:12px; border:1px solid #e0e7ef; border-radius:12px; padding:10px 12px; background:#fbfcfe; }
.team-user-row>div,.team-import-row>div { display:grid; gap:2px; }
.team-user-row small,.team-import-row small { color:#738297; font-size:.72rem; }
.team-user-row>div:last-child { text-align:right; }
.team-conflict-list { display:grid; gap:10px; }
.team-conflict-card { border:1px solid #f0c7cb; border-left:4px solid #d9534f; border-radius:14px; padding:12px; background:#fffafa; }
.team-conflict-head { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.team-conflict-head>div { display:grid; gap:2px; }
.team-conflict-head small { color:#7b6c70; font-size:.72rem; }
.team-conflict-values { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin:10px 0; }
.team-conflict-values>div { background:#fff; border:1px solid #ecdfe1; border-radius:10px; padding:8px 10px; display:grid; gap:3px; }
.team-conflict-values span { color:#7b6c70; font-size:.7rem; }
.team-conflict-values strong { font-size:1.15rem; color:#24364d; }
.role-hidden { display:none !important; }
.inline-file-button { display:inline-flex; }
.compact-empty { min-height:54px; padding:14px; }
@media(max-width:760px){.team-summary-grid{grid-template-columns:1fr 1fr}.team-assignee-grid{grid-template-columns:1fr 1fr}.team-location-toolbar{flex-wrap:wrap}.team-location-toolbar .search{flex-basis:100%}.team-selection-foot{align-items:stretch;flex-direction:column}.team-selection-foot .button{width:100%}}
@media(max-width:430px){.team-summary-grid{grid-template-columns:1fr 1fr;gap:7px}.team-summary-grid>div{padding:10px}.team-assignee-grid{grid-template-columns:1fr}.team-panel{padding:12px}.team-user-row,.team-import-row{align-items:flex-start;flex-direction:column}.team-user-row>div:last-child{text-align:left}}

/* INBEGAMA 1.0 · release operativo */
.dashboard-title-row{display:flex;align-items:center;gap:.65rem;flex-wrap:wrap}
.dashboard-title-row .eyebrow{margin:0}
.release-badge{display:inline-flex;align-items:center;min-height:24px;padding:.18rem .52rem;border-radius:999px;background:rgba(22,59,112,.1);color:#163B70;border:1px solid rgba(22,59,112,.18);font-size:.68rem;font-weight:900;letter-spacing:.08em}
.about-release{padding:.2rem 0}
.about-release-head{display:flex;align-items:center;gap:.8rem}
.about-release-head img{width:46px;height:46px}
.about-release-head h4{margin:.12rem 0;color:#163B70;font-family:Montserrat,Inter,sans-serif}
.about-release-head span{font-size:.8rem;color:var(--muted)}
@media(max-width:520px){.release-badge{font-size:.62rem}}
