:root {
    --navy: #0b1f3a;
    --blue: #1666d8;
    --cyan: #22a6d5;
    --light: #f3f7fb;
    --text: #172033;
    --muted: #667085;
    --line: #dce5ef;
    --white: #ffffff;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--light); color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; }
.topbar { min-height: 72px; padding: 14px max(24px, calc((100% - 1160px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--navy); color: var(--white); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: linear-gradient(135deg, var(--blue), var(--cyan)); font-size: 22px; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand small { color: #b8c7da; }
.version { color: #b8c7da; font-size: 13px; }
.container { width: min(1160px, calc(100% - 32px)); margin: 30px auto 60px; }
.hero { padding: clamp(28px, 5vw, 58px); border-radius: 24px; background: linear-gradient(125deg, #0b1f3a 0%, #124d95 70%, #1685b9 100%); color: var(--white); box-shadow: 0 18px 45px rgba(11,31,58,.18); }
.hero h1 { max-width: 760px; margin: 4px 0 12px; font-size: clamp(32px, 5vw, 56px); line-height: 1.05; }
.hero > p:not(.eyebrow) { max-width: 720px; color: #d8e8f8; font-size: 17px; }
.eyebrow { margin: 0; color: var(--cyan); font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.hero-actions { display: flex; align-items: center; gap: 18px; margin-top: 26px; }
.button { padding: 10px 16px; border-radius: 10px; background: var(--white); color: var(--navy); font-weight: 750; }
.subtle { color: #c7d9eb; }
.section-title { display: flex; align-items: end; justify-content: space-between; margin: 42px 0 16px; }
.section-title h2 { margin: 2px 0 0; font-size: 28px; }
.counter, .status { padding: 5px 10px; border-radius: 999px; background: #e8f2ff; color: #1556a4; font-size: 12px; font-weight: 750; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { min-height: 155px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); box-shadow: 0 8px 24px rgba(23,32,51,.05); }
.card h3 { margin: 18px 0 5px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); }
.card-link { display: block; color: inherit; text-decoration: none; transition: transform .16s ease, box-shadow .16s ease; }
.card-link:hover { transform: translateY(-3px); box-shadow: 0 14px 32px rgba(23,32,51,.12); }
.status-live { background: #e9f8ef; color: #18743c; }
.brand-link { color: white; text-decoration: none; }
.userbox { display: flex; align-items: center; gap: 18px; }
.userbox span, .userbox small { display: block; }
.userbox small { color: #b8c7da; }
.logout { padding: 8px 13px; border: 1px solid #42617f; border-radius: 9px; background: transparent; color: white; cursor: pointer; }
.auth-body { min-height: 100vh; background: linear-gradient(135deg, #081a31, #124d95 65%, #1685b9); }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: min(460px, 100%); padding: clamp(26px, 5vw, 42px); border-radius: 22px; background: var(--white); box-shadow: 0 28px 80px rgba(0,0,0,.28); }
.auth-card-wide { width: min(760px, 100%); }
.auth-card h1 { margin: 8px 0; color: var(--navy); font-size: 30px; line-height: 1.15; }
.auth-card > p:not(.eyebrow) { margin-top: 0; color: var(--muted); }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; color: var(--navy); }
.auth-brand strong, .auth-brand small { display: block; }
.auth-brand small { color: var(--muted); }
.form-stack, .form-grid { display: grid; gap: 16px; margin-top: 24px; }
.form-grid { grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
label { display: grid; gap: 6px; color: #344054; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; padding: 12px 13px; border: 1px solid #cfd9e5; border-radius: 10px; background: #fff; color: var(--text); font: inherit; outline: none; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(22,102,216,.12); }
.primary { padding: 12px 17px; border: 0; border-radius: 10px; background: linear-gradient(135deg, var(--blue), #1685b9); color: white; font: inherit; font-weight: 800; cursor: pointer; }
.alert { width: min(1160px, 100%); margin: 0 auto 18px; padding: 12px 14px; border-radius: 10px; font-weight: 650; }
.auth-card .alert { margin-top: 18px; }
.alert.success { background: #e9f8ef; color: #18743c; border: 1px solid #bde8ca; }
.alert.error { background: #fff0f0; color: #a42a2a; border: 1px solid #f1c2c2; }
.narrow { max-width: 860px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 10px 0 24px; }
.page-heading h1, .form-panel h1 { margin: 4px 0; font-size: 36px; color: var(--navy); }
.page-heading p:not(.eyebrow), .form-panel > p:not(.eyebrow) { margin: 0; color: var(--muted); }
.back-link { display: inline-block; margin-bottom: 18px; color: #1556a4; text-decoration: none; font-weight: 700; }
.button-link { display: inline-block; text-decoration: none; text-align: center; }
.secondary { padding: 11px 16px; border: 1px solid #cfd9e5; border-radius: 10px; background: white; color: #344054; font-weight: 750; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: white; box-shadow: 0 8px 24px rgba(23,32,51,.05); }
.panel-head { display: flex; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); color: var(--muted); }
.panel-head strong { color: var(--navy); font-size: 18px; }
.form-panel { padding: clamp(24px, 5vw, 40px); }
.form-panel .form-grid { margin-top: 28px; }
.form-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 6px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 16px; background: #f8fafc; color: #667085; font-size: 12px; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
td { padding: 14px 16px; border-top: 1px solid #edf1f5; vertical-align: middle; }
tbody tr:hover { background: #fbfdff; }
.row-inactive { opacity: .62; }
.tree-name { position: relative; padding-left: calc(var(--level) * 24px); min-width: 240px; }
.tree-name strong, .tree-name small { display: block; }
.tree-name small { margin-top: 2px; color: var(--muted); }
.tree-name[style*="--level: 0"] .tree-line { display: none; }
.tree-line { position: absolute; left: calc((var(--level) * 24px) - 14px); top: 7px; width: 9px; height: 9px; border-left: 1px solid #9fb2c8; border-bottom: 1px solid #9fb2c8; }
code { padding: 4px 7px; border-radius: 6px; background: #f1f5f9; color: #334155; }
.type-pill, .state { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #eef4fb; color: #35577b; font-size: 12px; font-weight: 750; white-space: nowrap; }
.state.active { background: #e9f8ef; color: #18743c; }
.state.inactive { background: #f1f2f4; color: #667085; }
.actions { display: flex; align-items: center; gap: 12px; }
.actions a, .link-button { padding: 0; border: 0; background: none; color: #1556a4; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.link-button { color: #8b3a3a; }
.empty { padding: 58px 24px; text-align: center; }
.empty h2 { margin: 0 0 5px; color: var(--navy); }
.empty p { margin: 0; color: var(--muted); }
.filters { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr) auto auto; align-items: end; gap: 12px; margin-bottom: 18px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; }
.cell-sub { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 5px; min-width: 150px; }
.tags span { padding: 3px 7px; border-radius: 999px; background: #eef4fb; color: #35577b; font-size: 11px; font-weight: 750; }
.tags small { color: var(--muted); }
.check-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 18px; border: 1px solid #dce5ef; border-radius: 12px; }
.check-panel legend { padding: 0 7px; color: var(--navy); font-weight: 800; }
.check-panel > small { grid-column: 1 / -1; color: var(--muted); }
.check { display: flex; align-items: center; gap: 9px; }
.check input { width: 18px; height: 18px; }
.equipment-state { display: inline-block; padding: 5px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; white-space: nowrap; }
.state-operativo { background: #e9f8ef; color: #18743c; }
.state-en_revision { background: #fff7dc; color: #866400; }
.state-fuera_servicio, .state-extraviado { background: #fff0f0; color: #a42a2a; }
.state-en_reparacion { background: #f2edff; color: #6842a5; }
.state-baja { background: #eef0f2; color: #59636e; }
.qr-code { display: inline-block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.detail-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.detail-heading h1 { margin: 4px 0; color: var(--navy); font-size: 38px; }
.detail-heading p:not(.eyebrow) { margin: 0; color: var(--muted); }
.detail-actions { display: flex; gap: 10px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .7fr); gap: 18px; }
.detail-card, .qr-panel { padding: clamp(22px, 4vw, 34px); }
.detail-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.data-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 0; }
.data-list div { padding: 15px 0; border-bottom: 1px solid #edf1f5; }
.data-list div:nth-child(odd) { padding-right: 20px; }
.data-list dt { margin-bottom: 4px; color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; }
.data-list dd { margin: 0; color: var(--navy); font-weight: 700; }
.note { margin-top: 22px; padding: 16px; border-radius: 12px; background: #f6f9fc; }
.note p { margin: 6px 0 0; color: var(--muted); }
.qr-panel { text-align: center; }
.qr-panel h2 { margin: 4px 0 18px; }
#qrcode { display: grid; place-items: center; min-height: 190px; margin: 0 auto 16px; }
#qrcode img, #qrcode canvas { max-width: 100%; height: auto; }
.qr-panel > p:not(.eyebrow) { color: var(--muted); font-size: 13px; }
.qr-panel a { color: #1556a4; font-weight: 750; }
.public-body { min-height: 100vh; background: linear-gradient(135deg,#081a31,#124d95 65%,#1685b9); }
.public-shell { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.public-card { width: min(520px,100%); padding: clamp(26px,6vw,44px); border-radius: 22px; background: white; box-shadow: 0 28px 80px rgba(0,0,0,.28); }
.public-card h1 { margin: 6px 0; color: var(--navy); font-size: 32px; }
.public-card > p:not(.eyebrow,.public-note) { margin-top: 0; color: var(--muted); }
.public-code { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 24px 0 10px; }
.data-list.compact { grid-template-columns: 1fr; }
.public-note { margin: 22px 0 0; padding: 14px; border-radius: 10px; background: #f3f7fb; color: var(--muted); font-size: 13px; }
.label-body { margin: 0; background: #e9edf2; }
.print-toolbar { display: flex; justify-content: center; gap: 10px; padding: 18px; }
.print-toolbar button { padding: 9px 16px; border: 0; border-radius: 8px; background: var(--navy); color: white; cursor: pointer; }
.equipment-label { display: grid; grid-template-columns: 1fr 170px; align-items: center; gap: 20px; width: 100mm; min-height: 55mm; margin: 0 auto; padding: 8mm; border: 1px solid #cdd6df; background: white; }
.label-brand { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.label-brand strong,.label-brand small { display: block; }
.label-brand small { color: #59636e; font-size: 9px; }
.equipment-label h1 { margin: 0; font-size: 19px; line-height: 1.1; }
.equipment-label section > p { margin: 4px 0 14px; color: #59636e; }
.label-code { display: block; font-size: 18px; }
.equipment-label section > small { display: block; margin-top: 4px; }
.table-link { color: #1556a4; font-weight: 750; text-decoration: none; }
.compact-empty { padding: 34px 10px 10px; }
.movement-detail-grid { grid-template-columns: 1fr 1fr; }
.movement-line { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid #edf1f5; }
.movement-line strong,.movement-line small { display: block; }
.movement-line small { margin-top: 4px; color: var(--muted); }
.movement-line > span { font-weight: 800; }
.stock-filters { grid-template-columns: 1.5fr 1fr 1fr auto auto; }
.stock-warning { background: #fff7dc; color: #866400; }
.stock-danger { background: #fff0f0; color: #a42a2a; }
.form-alert { margin-top: 24px; }
[hidden] { display: none !important; }
.people-filters { grid-template-columns: 1fr auto auto; }
.epp-filters { grid-template-columns: minmax(220px, .4fr) auto auto; justify-content: start; }
.person-detail-grid { grid-template-columns: minmax(280px,.7fr) minmax(0,1.5fr); }
.inventory-location { grid-column: 1 / -1; }
.inventory-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; margin-bottom: 18px; }
.summary-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.summary-card span,.summary-card strong { display: block; }
.summary-card span { color: var(--muted); font-size: 13px; }
.summary-card strong { margin-top: 4px; color: var(--navy); font-size: 28px; }
.inventory-info { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.inventory-info h2 { margin-top: 0; }
.close-inventory,.count-actions { display: flex; align-items: center; justify-content: flex-end; gap: 16px; margin-top: 20px; }
.close-inventory p { margin: 0; color: var(--muted); }
.count-table input,.count-table select { min-width: 135px; padding: 9px; }

@media (max-width: 800px) {
    .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .version { display: none; }
    .container { width: min(100% - 22px, 1160px); margin-top: 14px; }
    .hero { border-radius: 18px; }
    .grid { grid-template-columns: 1fr; }
    .section-title { align-items: center; }
    .form-grid { grid-template-columns: 1fr; }
    .form-grid .full { grid-column: auto; }
    .userbox span { display: none; }
    .page-heading { align-items: stretch; flex-direction: column; }
    .page-heading .primary { width: 100%; }
    .form-actions { flex-direction: column-reverse; }
    .filters { grid-template-columns: 1fr; }
    .check-panel { grid-template-columns: 1fr; }
    .detail-heading { align-items: stretch; flex-direction: column; }
    .detail-actions { flex-direction: column; }
    .detail-grid { grid-template-columns: 1fr; }
    .data-list { grid-template-columns: 1fr; }
    .data-list div:nth-child(odd) { padding-right: 0; }
    .movement-detail-grid { grid-template-columns: 1fr; }
    .stock-filters { grid-template-columns: 1fr; }
    .people-filters, .epp-filters { grid-template-columns: 1fr; }
    .person-detail-grid { grid-template-columns: 1fr; }
    .inventory-summary { grid-template-columns: 1fr 1fr; }
    .inventory-info { grid-template-columns: 1fr; }
    .close-inventory,.count-actions { align-items: stretch; flex-direction: column; }
}

/* Encabezado con marcas separadas */
.topbar { position: relative; min-height: 108px; padding-right: max(125px,calc((100% - 1160px) / 2)); }
.topbar .brand .brand-mark { width: 248px; height: 72px; padding: 7px 12px; }
.topbar .brand::after { display: none; }
.topbar::after {
    content: ''; position: absolute; right: max(24px,calc((100% - 1160px) / 2)); top: 50%;
    width: 88px; height: 88px; transform: translateY(-50%);
    background: url('../img/sexta-compania.png') center/contain no-repeat;
    filter: drop-shadow(0 3px 6px rgba(0,0,0,.35));
}
.topbar .userbox { margin-right: 112px; }

@media (max-width: 700px) {
    .topbar { min-height: 82px; padding: 8px 76px 8px 10px; }
    .topbar .brand .brand-mark { width: 158px; height: 52px; padding: 4px 6px; }
    .topbar::after { right: 10px; width: 58px; height: 58px; }
    .topbar .userbox { margin-right: 0; }
    .topbar .userbox span { display: none; }
}

@media (max-width: 410px) {
    .topbar .brand .brand-mark { width: 132px; height: 46px; }
    .topbar { padding-right: 62px; }
    .topbar::after { width: 50px; height: 50px; }
}
.maintenance-filters { grid-template-columns: minmax(220px,.4fr) auto auto; justify-content: start; }
.maintenance-alert { background: #fff7dc; color: #725600; border: 1px solid #efd57d; }
.maintenance-overdue { color: #b42318; font-weight: 800; }
.maintenance-soon { color: #8a6500; font-weight: 800; }
.maintenance-pendiente { background: #fff7dc; color: #866400; }
.maintenance-aprobado { background: #e9f8ef; color: #18743c; }
.maintenance-observado { background: #fff0df; color: #9a4e00; }
.maintenance-rechazado { background: #fff0f0; color: #a42a2a; }
@media (max-width: 560px) { .maintenance-filters { grid-template-columns: 1fr; } }
.users-filters { grid-template-columns: 1fr auto auto; }
@media (max-width: 560px) { .users-filters { grid-template-columns: 1fr; } }
.report-filters { grid-template-columns: 1.2fr 1.4fr .8fr .8fr auto auto; }
.report-print-head { margin-bottom: 18px; padding: 22px 4px 4px; }
.report-print-head h1 { margin: 4px 0; color: var(--navy); font-size: 32px; }
.report-print-head > p:last-child { margin: 0; color: var(--muted); }
.report-logos { display: none; }
.report-panel td { white-space: nowrap; }
.report-footer { padding: 18px 4px; color: var(--muted); font-size: 12px; text-align: right; }
@media (max-width: 900px) { .report-filters { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .report-filters { grid-template-columns: 1fr; } }
@media print {
    @page report { size: landscape; margin: 10mm; }
    body { background: white; font-size: 10px; }
    .no-print { display: none !important; }
    .report-container { page: report; width: 100%; margin: 0; }
    .report-print-head { padding: 0 0 8px; border-bottom: 2px solid var(--red); }
    .report-logos { display: flex; align-items: center; justify-content: space-between; }
    .report-logos img:first-child { width: 48mm; height: 15mm; object-fit: contain; }
    .report-logos img:last-child { width: 18mm; height: 18mm; object-fit: contain; }
    .report-print-head h1 { font-size: 20px; }
    .report-panel { border: 0; box-shadow: none; }
    .report-panel .table-wrap { overflow: visible; }
    .report-panel table { font-size: 8px; }
    .report-panel th,.report-panel td { padding: 5px 6px; white-space: normal; }
    .report-footer { padding-top: 8px; }
}

@media (min-width: 561px) and (max-width: 1050px) {
    .filters { grid-template-columns: 1fr 1fr; }
}

@media print {
    @page label { size: 100mm 55mm; margin: 0; }
    .print-toolbar { display: none; }
    .label-body { page: label; background: white; }
    .equipment-label { width: 100mm; min-height: 55mm; border: 0; margin: 0; }
}

/* Identidad visual AMARO + Sexta Compañía */
:root {
    --navy: #071c36;
    --blue: #0d64c8;
    --cyan: #00a6dc;
    --red: #d62828;
    --gold: #dcae38;
    --light: #f2f6fa;
    --line: #d7e1eb;
}
body { background-image: radial-gradient(circle at 100% 0,rgba(13,100,200,.07),transparent 28rem); }
.topbar { min-height: 82px; border-bottom: 4px solid var(--red); background: linear-gradient(100deg,#06172d,#0a284b); box-shadow: 0 5px 20px rgba(7,28,54,.16); }
.brand,.auth-brand { gap: 10px; }
.brand .brand-mark,.auth-brand .brand-mark {
    width: 174px; height: 54px; border-radius: 10px; padding: 5px 8px;
    background: #fff url('../img/amaro-inventario-logo.png') center/contain no-repeat;
    box-shadow: 0 3px 12px rgba(0,0,0,.15); color: transparent; font-size: 0;
}
.brand > div,.auth-brand > div { display: none; }
.brand::after,.auth-brand::after {
    content: ''; display: block; width: 52px; height: 52px;
    background: url('../img/sexta-compania.png') center/contain no-repeat;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.25));
}
.auth-brand { justify-content: center; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.auth-brand::after { width: 64px; height: 64px; }
.auth-body { background: radial-gradient(circle at 80% 18%,rgba(214,40,40,.22),transparent 21rem),linear-gradient(135deg,#06172d,#0d4380 68%,#0b80ad); }
.auth-card { border-top: 5px solid var(--red); }
.hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 5px solid var(--red); background: linear-gradient(125deg,#071c36 0%,#0d4e92 67%,#008cbd 100%); }
.hero::after { content: ''; position: absolute; z-index: -1; right: 30px; top: 50%; width: 230px; height: 230px; transform: translateY(-50%); background: url('../img/sexta-compania.png') center/contain no-repeat; opacity: .16; filter: grayscale(.15); }
.hero h1,.hero > p,.hero .hero-actions { position: relative; z-index: 1; }
.eyebrow { color: var(--cyan); }
.page-heading { padding-left: 16px; border-left: 4px solid var(--red); }
.primary { background: linear-gradient(135deg,var(--blue),#008fbe); box-shadow: 0 5px 12px rgba(13,100,200,.18); }
.primary:hover { filter: brightness(.95); transform: translateY(-1px); }
.card { position: relative; border-top: 3px solid var(--blue); }
.card::after { content: ''; position: absolute; top: -3px; right: 20px; width: 42px; height: 3px; background: var(--red); }
.panel { border-top: 3px solid rgba(13,100,200,.72); }
th { border-bottom: 2px solid #e3e9ef; background: #f5f8fb; color: #42566d; }
tbody tr:hover { background: #f4f9ff; }
.back-link,.actions a,.table-link { color: #075db7; }
.logout { border-color: rgba(255,255,255,.38); }
.logout:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.equipment-label { position: relative; overflow: hidden; border-top: 4px solid var(--red); }
.equipment-label::after { content: ''; position: absolute; right: 4mm; top: 3mm; width: 16mm; height: 16mm; background: url('../img/sexta-compania.png') center/contain no-repeat; opacity: .92; }
.label-brand .brand-mark { width: 42mm; height: 13mm; border-radius: 2mm; background: #fff url('../img/amaro-inventario-logo.png') center/contain no-repeat; color: transparent; font-size: 0; }
.public-card { position: relative; overflow: hidden; border-top: 5px solid var(--red); }
.public-card::after { content: ''; position: absolute; right: 18px; top: 18px; width: 64px; height: 64px; background: url('../img/sexta-compania.png') center/contain no-repeat; opacity: .16; }

@media (max-width: 560px) {
    .topbar { min-height: 70px; padding: 9px 12px; }
    .brand .brand-mark { width: 128px; height: 44px; }
    .brand::after { width: 42px; height: 42px; }
    .hero::after { right: -34px; width: 175px; height: 175px; opacity: .12; }
    .auth-brand { flex-direction: column; }
    .auth-brand .brand-mark { width: 190px; }
}

/* Ficha QR global de ubicaciones */
.public-location-body { min-height: 100vh; background: #eef4f9; }
.public-location-header { padding: 12px max(18px,calc((100% - 980px)/2)); border-bottom: 4px solid var(--red); background: linear-gradient(100deg,#06172d,#0a284b); }
.public-location-header .brand-mark { width: 190px; height: 58px; border-radius: 10px; background: #fff url('../img/amaro-inventario-logo.png') center/contain no-repeat; color: transparent; font-size: 0; }
.public-location-header .brand > div { display: none; }
.public-location-shell { width: min(980px,calc(100% - 28px)); margin: 24px auto 60px; }
.location-hero { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; padding: clamp(24px,5vw,42px); border-radius: 22px; border-bottom: 5px solid var(--red); background: linear-gradient(125deg,#071c36,#0d4e92 68%,#008cbd); color: #fff; box-shadow: 0 16px 38px rgba(7,28,54,.18); }
.location-hero h1 { margin: 4px 0; font-size: clamp(30px,5vw,48px); line-height: 1.08; }
.location-hero p:not(.eyebrow) { margin: 4px 0; color: #d8e8f8; }
.location-hero .public-code { justify-content: flex-start; margin: 20px 0 0; }
.location-summary { display: flex; gap: 10px; }
.location-summary span { min-width: 92px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,.12); text-align: center; }
.location-summary strong { display: block; font-size: 24px; }
.scope-tabs { display: flex; gap: 8px; margin: 16px 0; padding: 6px; border-radius: 12px; background: #fff; box-shadow: 0 5px 15px rgba(7,28,54,.06); }
.scope-tabs a { flex: 1; padding: 10px; border-radius: 8px; color: #526477; font-weight: 750; text-align: center; text-decoration: none; }
.scope-tabs a.active { background: #e7f2ff; color: #075db7; }
.location-owner { color: var(--muted); font-size: 12px; text-align: center; }
.public-content-panel { margin-top: 16px; padding: 22px; border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 16px; background: #fff; box-shadow: 0 8px 22px rgba(7,28,54,.05); }
.public-section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.public-section-title h2 { margin: 3px 0 0; color: var(--navy); }
.public-item-list article { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid #edf1f5; }
.public-item-list article > div:last-child { display: flex; align-items: center; justify-content: flex-end; gap: 9px; text-align: right; }
.public-item-list strong,.public-item-list small { display: block; }
.public-item-list small { margin-top: 3px; color: var(--muted); }
.location-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.location-chips > span { padding: 7px 9px; border-radius: 9px; background: #f1f6fb; color: #42566d; }
.location-label .eyebrow { margin-bottom: 3px; }
.location-label { grid-template-columns: minmax(0,1fr) 40mm; gap: 4mm; padding: 5mm 6mm; }
.location-label::after { display: none; }
.location-label .label-brand { margin-bottom: 3px; }
.location-label .label-brand .brand-mark { width: 39mm; height: 12mm; }
.location-label-org { display: block; max-width: 48mm; margin-bottom: 4px; color: #59636e; font-size: 8px; }
.location-label #qrcode { min-height: 0; margin: 0; }
.location-label #qrcode img,.location-label #qrcode canvas { width: 38mm !important; height: 38mm !important; }
@media (max-width: 680px) {
    .location-hero { grid-template-columns: 1fr; }
    .location-summary { display: grid; grid-template-columns: repeat(3,1fr); }
    .location-summary span { min-width: 0; }
    .public-item-list article { align-items: flex-start; flex-direction: column; }
    .public-item-list article > div:last-child { justify-content: space-between; width: 100%; text-align: left; }
}
