:root {
    --ink: #1c2b24;
    --paper: #f4f0e6;
    --card: #fffdf9;
    --line: #d9d0be;
    --accent: #8b3a2a;
    --accent-dark: #6e2d21;
    --muted: #5c675f;
    --sage: #3d5a4c;
    --sidebar: #1c2b24;
    --sidebar-text: #f3efe4;
    --sidebar-muted: #a8b3ac;
    --alert: #8b3a2a;
    --ok-bg: #e7f0e4;
    --ok-ink: #2c4a32;
    --shadow: 0 10px 30px rgba(28, 43, 36, 0.08);
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--paper);
    color: var(--ink);
}

body.has-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: var(--sidebar);
    color: var(--sidebar-text);
    padding: 28px 20px 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: sticky;
    top: 0;
}
.brand {
    font-weight: 700;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}
.sidebar-user {
    margin: 8px 0 12px;
    color: var(--sidebar-muted);
    font-size: 0.88rem;
}
.empresa-switch { margin: 0 0 12px; }
.empresa-switch-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--sidebar-muted);
}
.empresa-switch select {
    width: 100%;
    background: #24352c;
    color: var(--sidebar-text);
    border: 1px solid #3d5248;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 0.88rem;
    text-transform: none;
    letter-spacing: 0;
}
.sidebar-note {
    margin: 0 0 12px;
    font-size: 0.78rem;
    color: #e2b4a8;
    line-height: 1.35;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group {
    margin: 16px 0 6px;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sidebar-muted);
}
.nav-item {
    color: var(--sidebar-text);
    text-decoration: none;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 0.95rem;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.08); }
.nav-item.is-active {
    background: var(--accent);
    color: #fff;
}
.sidebar-out { margin-top: 16px; }
.sidebar-out button {
    width: 100%;
    margin: 0;
    background: transparent;
    color: var(--sidebar-text);
    border: 1px solid rgba(243, 239, 228, 0.25);
}
.sidebar-out button:hover { background: rgba(255,255,255,0.08); }

.nav-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 40;
    width: auto;
    margin: 0;
    padding: 8px 12px;
    background: var(--ink);
}

.shell-main { min-width: 0; }

.auth, .is-auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, #e7dcc4 0, transparent 42%),
        var(--paper);
}

.auth-card,
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    box-shadow: var(--shadow);
}

.auth-card { max-width: 420px; }
.form-wide { max-width: 640px; }

select, textarea {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    background: #fff;
}

.ghost-link { color: var(--accent); text-decoration: none; padding: 10px 16px; border: 1px solid var(--line); border-radius: 10px; }

.page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 16px; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn {
    display: inline-block;
    padding: 10px 16px;
    background: var(--accent);
    color: #fff !important;
    text-decoration: none;
    border-radius: 10px;
}
.btn.ghost-btn {
    background: transparent;
    color: var(--accent) !important;
    border: 1px solid var(--line);
}
.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 8px 0 28px;
}
.stat-tile {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px 16px;
    border-radius: 18px;
    text-decoration: none;
    color: inherit;
}
.stat-tile strong { font-size: 1.7rem; letter-spacing: -0.03em; }
.stat-tile span { font-size: 0.88rem; }
.stat-tile.gold { background: #f3e6c8; color: #8a6a2f; }
.stat-tile.accent { background: #f3d9d2; color: #8b3a2a; }
.stat-tile.sage { background: #d7e5dc; color: #3d5a4c; }
.stat-tile:hover { filter: brightness(0.97); }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin: 28px 0 12px;
}
.section-head h2 { margin: 0; }
.count { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.08em; }
.empty-hint {
    background: rgba(217, 208, 190, 0.35);
    color: var(--muted);
    padding: 16px 18px;
    border-radius: 16px;
    margin: 0 0 8px;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #ece6d8;
    color: var(--muted);
}
.pill-accent { background: #f3d9d2; color: var(--accent); }
.pill-sage { background: #d7e5dc; color: var(--sage); }
.pill-gold { background: #f3e6c8; color: #8a6a2f; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    text-decoration: none;
    color: inherit;
    max-width: none;
}
.item-row:hover { border-color: #c9bea8; }
.item-row strong { display: block; }
.item-row .muted { margin: 4px 0 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 20px; }
.filters input, .filters select, .filters button { width: auto; margin: 0; }

.wide { max-width: 1100px; margin: 0 auto; }
.table-wrap { overflow: auto; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 0.95rem; }
th { color: var(--muted); font-weight: 600; }
.muted { color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.actions form { margin: 0; }
.actions button { width: auto; margin: 0; }

.preview { margin-top: 24px; }
.preview iframe, .preview img {
    width: 100%;
    max-width: 900px;
    min-height: 70vh;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}
.preview img { min-height: 0; height: auto; }

.eyebrow {
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--accent);
    margin: 0 0 8px;
}
.trail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin: 0 0 14px;
}
.trail-back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: auto;
    margin: 0;
    padding: 6px 12px 6px 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.88rem;
}
.trail-back svg { width: 16px; height: 16px; }
.trail-back:hover { border-color: var(--accent); color: var(--accent); background: #fff; }
.crumbs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    font-size: 0.9rem;
    color: var(--muted);
}
.crumbs li {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
}
.crumbs li:not(:last-child)::after {
    content: "›";
    margin: 0 8px;
    color: var(--line);
    font-weight: 600;
}
.crumbs a {
    color: var(--accent);
    text-decoration: none;
}
.crumbs a:hover { text-decoration: underline; }
.crumbs a,
.crumbs span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: min(42vw, 280px);
}
.crumbs span {
    color: var(--ink);
    font-weight: 600;
}

h1 { margin: 0 0 8px; font-size: 1.8rem; }
h2 { margin: 0 0 16px; font-size: 1.15rem; }
.lede, .hint, dt { color: var(--muted); }

label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 14px 0;
    font-size: 0.9rem;
}
label[hidden] { display: none !important; }
label > .lbl {
    display: block;
}
.req {
    color: var(--accent);
    font-weight: 700;
    margin-left: 2px;
}
.form-req-legend {
    margin: 8px 0 0;
    font-size: 0.82rem;
}
label input,
label select,
label textarea {
    width: 100%;
}
label input[type="checkbox"],
label input[type="radio"] {
    width: auto;
    max-width: none;
    flex: 0 0 auto;
    margin: 0;
    accent-color: var(--accent);
}
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-color: var(--accent);
}
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
    border-color: var(--accent);
    background: #fdf4f1;
}
.dropzone.is-invalid {
    border-color: var(--accent);
    background: #fdf4f1;
}
.field-error {
    color: var(--accent);
    font-size: 0.82rem;
}

input {
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font: inherit;
    background: #fff;
}

button {
    margin-top: 8px;
    width: 100%;
    padding: 12px 16px;
    border: 0;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

button:hover { background: var(--accent-dark); }

button:disabled,
button.is-busy {
    opacity: 0.82;
    cursor: wait;
}
button:not(.ghost):disabled,
button:not(.ghost).is-busy {
    background: var(--accent-dark);
}
button.ghost:disabled,
button.ghost.is-busy {
    background: transparent;
}
button.ghost .btn-spin {
    border-color: rgba(139, 58, 42, 0.22);
    border-top-color: var(--accent);
}

form.is-sending {
    pointer-events: none;
}

.btn-spin {
    width: 1.05em;
    height: 1.05em;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    flex: 0 0 auto;
    animation: mbq-spin 0.65s linear infinite;
}

@keyframes mbq-spin {
    to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
    .btn-spin { animation: none; opacity: 0.9; }
}

button.ghost {
    width: auto;
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--line);
}

button.danger {
    width: auto;
    background: #8b3a2a;
}

.inline-form { display: inline; margin: 0 0 0 8px; }
.inline-form button { margin: 0; padding: 6px 10px; font-size: 0.85rem; }

.ok {
    background: var(--ok-bg);
    color: var(--ok-ink);
    padding: 10px 12px;
    border-radius: 10px;
}
.alert {
    background: #f8e4df;
    color: var(--accent-dark);
    padding: 10px 12px;
    border-radius: 10px;
}
.check {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: max-content;
    max-width: 100%;
    margin: 8px 0;
    cursor: pointer;
}
.checks {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    margin: 8px 0 4px;
}
.checks .check { margin: 4px 0; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 16px 0; }

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--line);
}

.alert-row { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin: 0; padding: 16px 20px; max-width: none; text-decoration: none; color: inherit; }
.alert-row:hover { filter: brightness(0.97); }
.alert-row.is-vencida { border-color: #e0b4aa; }
.alert-row strong { display: block; margin: 0 0 4px; }
.alert-meta { margin: 0; font-size: 0.85rem; color: var(--muted); }
.pref-toggle { margin: 0; }
.pref-toggle label { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tablero-lista { display: grid; gap: 12px; }
.anuncio-card { margin: 0; max-width: none; padding: 18px 22px; }
.anuncio-card h3 { margin: 0 0 8px; font-size: 1.08rem; color: var(--ink); }
.anuncio-card p { margin: 0 0 8px; white-space: pre-wrap; }
.anuncio-card .muted { margin: 0; }
.anuncio-card.is-fijo { border-color: #d4b56a; }
ul.plain { list-style: none; padding: 0; }
ul.plain li { margin: 6px 0; }
h3 { font-size: 1rem; color: var(--muted); margin: 16px 0 8px; }
.exp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-top: 20px; }
.exp-card { text-decoration: none; color: inherit; display: block; }
.exp-card h2 { margin: 0 0 8px; }
.eyebrow a { color: inherit; }

.dropzone {
    position: relative;
    border: 2px dashed var(--line);
    border-radius: 14px;
    padding: 20px;
    text-align: center;
    background: #faf7f0;
    margin: 16px 0;
}
.dropzone.drag { border-color: var(--accent); background: #f3e6df; }
.dropzone .file-collector {
    display: none !important;
}
.dropzone-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    margin: 0;
}
.dropzone-prompt .dropzone-icon {
    width: 36px;
    height: 36px;
    color: var(--accent);
    margin-bottom: 8px;
}
.dropzone-prompt p { margin: 4px 0; }
.file-list {
    list-style: none;
    padding: 12px 0 0;
    margin: 12px 0 0;
    text-align: left;
    border-top: 1px solid var(--line);
}
.file-list:empty { display: none; }
.file-list li.file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    margin: 0 0 8px;
    padding: 8px 10px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
}
.file-ico { width: 22px; height: 22px; flex-shrink: 0; }
.kind-pdf .file-ico { color: #b42318; }
.kind-img .file-ico { color: #0f6c5c; }
.kind-doc .file-ico { color: #185fa5; }
.kind-xls .file-ico { color: #1b7a3d; }
.kind-file .file-ico { color: var(--muted); }
.file-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.file-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta em { font-style: normal; color: var(--muted); font-size: 0.8rem; }

.panel { padding: 32px 36px 48px; }

dl { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; }
dt { font-size: 0.85rem; }
dd { margin: 0; }

@media (max-width: 880px) {
    body.has-shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: 260px;
        z-index: 30;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        box-shadow: none;
    }
    body.nav-open .sidebar { transform: none; box-shadow: 8px 0 32px rgba(0,0,0,0.25); }
    .nav-toggle { display: inline-block; }
    .panel { padding: 16px 16px 32px; }
    .stat-grid { grid-template-columns: 1fr; }
    .alert-row, .item-row { flex-direction: column; align-items: flex-start; }
}

.split-forms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 20px 0 28px;
}
.split-forms .card { margin: 0; }
.file-list button { width: auto; margin: 0 0 0 auto; padding: 4px 10px; flex-shrink: 0; }
.dt-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    align-items: center;
    margin: 0 0 10px;
}
.dt-search input { width: 220px; margin: 0; }
.dt-len select { width: auto; margin: 0; }
.dt-info { color: var(--muted); font-size: 0.88rem; }
.dt-pager { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.dt-pager button {
    width: auto;
    margin: 0;
    padding: 6px 10px;
    background: var(--card);
    color: var(--ink);
    border: 1px solid var(--line);
}
.dt-pager button.is-on, .dt-pager button:hover { background: var(--accent); color: #fff; }
.dt-pager button:disabled { opacity: 0.4; cursor: default; background: var(--card); color: var(--ink); }
th.dt-sort { cursor: pointer; user-select: none; }
th.dt-sort:hover { color: var(--accent); }
.lote-head td {
    background: #efe8d8;
    font-weight: 600;
    color: var(--ink);
    font-size: 0.88rem;
}
.lote-item td { background: #fffdf9; }
.lote-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
}
.lote-list li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0;
    border-top: 1px solid var(--line);
    font-size: 0.92rem;
}
.lote-list .ghost-link { padding: 4px 10px; font-size: 0.85rem; }
.archivos-lote {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
button.archivo-ico {
    width: 36px;
    height: 36px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: inherit;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}
button.archivo-ico:hover {
    border-color: var(--accent);
    background: #fdf4f1;
}
button.archivo-ico .file-ico { width: 18px; height: 18px; }
a.archivo-ico {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: inherit;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-decoration: none;
}
a.archivo-ico:hover {
    border-color: var(--accent);
    background: #fdf4f1;
}
a.archivo-ico.is-disabled { opacity: 0.72; }
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
span.doc-link {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 6px;
}
.mbq-doc-lote { margin-top: 12px; }
.adjuntos { margin-top: 28px; }
.adjuntos h2 { margin: 0 0 12px; }
.adjuntos-list {
    list-style: none;
    margin: 0;
    padding: 0;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.adjunto-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-top: 1px solid var(--line);
}
.adjunto-item:first-child { border-top: 0; }
.adjunto-item .file-kind {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}
.adjunto-info { flex: 1; min-width: 0; }
.adjunto-info strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.adjunto-info p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.88rem;
}
.adjunto-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}
.adjunto-actions .btn,
.adjunto-actions .ghost-btn {
    width: auto;
    margin: 0;
    padding: 8px 14px;
    font-size: 0.88rem;
}
.adjunto-actions .btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.mbq-doc-meta.props {
    margin-top: 12px;
    padding: 16px 18px;
    box-shadow: none;
}
@media (max-width: 720px) {
    .adjunto-item { flex-wrap: wrap; }
    .adjunto-actions { width: 100%; }
}

button.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
    color: var(--accent);
    border: 0;
    border-radius: 0;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
button.doc-link:hover { background: transparent; color: var(--accent-dark); text-decoration: underline; }
button.doc-link span { overflow: hidden; text-overflow: ellipsis; }

body.mbq-open { overflow: hidden; }
.mbq-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(28, 43, 36, 0.45);
}
.mbq-overlay[hidden] { display: none !important; }
.mbq-modal {
    position: relative;
    width: min(440px, 100%);
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--shadow);
}
.mbq-modal-wide { width: min(760px, 100%); max-height: calc(100vh - 48px); overflow: auto; }
.mbq-msg-text { margin: 0 0 8px; white-space: pre-line; line-height: 1.45; }
.mbq-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 18px;
}
.mbq-modal-actions .btn,
.mbq-modal-actions button,
.mbq-modal-actions .ghost-link {
    width: auto;
    margin: 0;
}
.mbq-close {
    position: absolute;
    top: 10px;
    right: 12px;
    width: auto;
    margin: 0;
    padding: 4px 10px;
    background: transparent;
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
}
.mbq-close:hover { background: transparent; color: var(--ink); }
.mbq-doc-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0 28px 12px 0;
}
.mbq-doc-head h2 { margin: 0; font-size: 1.15rem; }
.mbq-doc-ico { display: flex; }
.mbq-doc-ico .file-ico { width: 28px; height: 28px; }
.mbq-doc-meta { margin: 12px 0 0; }
.mbq-doc-preview { margin-top: 16px; }
.mbq-doc-preview iframe,
.mbq-doc-preview img {
    width: 100%;
    min-height: 360px;
    max-height: 50vh;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
}
.mbq-doc-preview img { min-height: 0; height: auto; max-height: 50vh; object-fit: contain; }
.mbq-doc-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 160px;
    padding: 24px;
    color: var(--muted);
    text-align: center;
}
.mbq-doc-loading p { margin: 0; font-size: 0.92rem; }
.mbq-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--accent, #8b2942);
    border-radius: 50%;
    animation: mbq-spin 0.75s linear infinite;
}
@keyframes mbq-spin { to { transform: rotate(360deg); } }
.mbq-doc-error { margin: 0; }

@media (max-width: 880px) {
    .split-forms { grid-template-columns: 1fr; }
}
