/* QR Manager Pro — admin theme (blue / white / slate). Light and dark via [data-bs-theme]. */
:root,
[data-bs-theme="light"] {
  --qrm-primary: #1d4ed8;
  --qrm-primary-hover: #1e40af;
  --qrm-primary-soft: #eff4ff;
  --qrm-bg: #f1f5f9;
  --qrm-surface: #ffffff;
  --qrm-border: #e2e8f0;
  --qrm-text: #0f172a;
  --qrm-muted: #64748b;
  --qrm-sidebar-bg: #0f172a;
  --qrm-sidebar-text: #cbd5e1;
  --qrm-sidebar-muted: #7c8aa0;
  --qrm-sidebar-active: #1d4ed8;
  --qrm-sidebar-hover: rgba(255, 255, 255, 0.06);
  --bs-primary: #1d4ed8;
  --bs-primary-rgb: 29, 78, 216;
  --bs-link-color: #1d4ed8;
  --bs-link-color-rgb: 29, 78, 216;
  --bs-link-hover-color: #1e40af;
  --bs-link-hover-color-rgb: 30, 64, 175;
  --bs-body-bg: #f1f5f9;
  --bs-body-color: #0f172a;
  --bs-border-color: #e2e8f0;
  --bs-secondary-color: #64748b;
}
[data-bs-theme="dark"] {
  --qrm-primary: #3b82f6;
  --qrm-primary-hover: #60a5fa;
  --qrm-primary-soft: rgba(59, 130, 246, 0.14);
  --qrm-bg: #0b1220;
  --qrm-surface: #111a2c;
  --qrm-border: #223049;
  --qrm-text: #e2e8f0;
  --qrm-muted: #94a3b8;
  --qrm-sidebar-bg: #0a101c;
  --qrm-sidebar-text: #cbd5e1;
  --qrm-sidebar-muted: #7c8aa0;
  --qrm-sidebar-hover: rgba(255, 255, 255, 0.06);
  --bs-primary: #3b82f6;
  --bs-primary-rgb: 59, 130, 246;
  --bs-link-color: #60a5fa;
  --bs-link-color-rgb: 96, 165, 250;
  --bs-link-hover-color: #93c5fd;
  --bs-link-hover-color-rgb: 147, 197, 253;
  --bs-body-bg: #0b1220;
  --bs-body-color: #e2e8f0;
  --bs-border-color: #223049;
  --bs-secondary-color: #94a3b8;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", Arial, sans-serif;
  font-size: 0.925rem;
  background: var(--qrm-bg);
  color: var(--qrm-text);
}
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn, .nav-link, .dropdown-item, .page-link, .list-group-item-action { text-decoration: none !important; }
:focus-visible { outline: 2px solid var(--qrm-primary); outline-offset: 2px; }
.skip-link { position: absolute; top: 8px; left: 8px; z-index: 2000; background: var(--qrm-surface); padding: 8px 12px; border-radius: 6px; }

/* ---- buttons */
.btn { --bs-btn-font-size: 0.9rem; border-radius: 8px; font-weight: 500; }
.btn-primary { --bs-btn-bg: var(--qrm-primary); --bs-btn-border-color: var(--qrm-primary); --bs-btn-hover-bg: var(--qrm-primary-hover); --bs-btn-hover-border-color: var(--qrm-primary-hover); --bs-btn-active-bg: var(--qrm-primary-hover); --bs-btn-active-border-color: var(--qrm-primary-hover); --bs-btn-disabled-bg: var(--qrm-primary); --bs-btn-disabled-border-color: var(--qrm-primary); --bs-btn-color: #fff; --bs-btn-hover-color: #fff; }
.btn-outline-primary { --bs-btn-color: var(--qrm-primary); --bs-btn-border-color: var(--qrm-primary); --bs-btn-hover-bg: var(--qrm-primary); --bs-btn-hover-border-color: var(--qrm-primary); --bs-btn-active-bg: var(--qrm-primary); }
.btn-light { --bs-btn-bg: var(--qrm-surface); --bs-btn-border-color: var(--qrm-border); --bs-btn-color: var(--qrm-text); --bs-btn-hover-bg: var(--qrm-bg); --bs-btn-hover-border-color: var(--qrm-border); --bs-btn-hover-color: var(--qrm-text); --bs-btn-active-bg: var(--qrm-bg); --bs-btn-active-color: var(--qrm-text); --bs-btn-active-border-color: var(--qrm-border); }
.btn-icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; color: var(--qrm-muted); font-size: 1.15rem; border: 0; background: transparent; }
.btn-icon:hover { background: var(--qrm-bg); color: var(--qrm-text); }

/* ---- layout */
.app-sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; background: var(--qrm-sidebar-bg); color: var(--qrm-sidebar-text); display: flex; flex-direction: column; z-index: 1040; transition: transform 0.2s ease, width 0.2s ease; }
.app-main { margin-left: 264px; min-height: 100vh; display: flex; flex-direction: column; transition: margin-left 0.2s ease; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px; color: #fff; font-weight: 700; font-size: 1.05rem; text-decoration: none !important; border-bottom: 1px solid rgba(255, 255, 255, 0.07); }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--qrm-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; flex: none; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 12px 10px 24px; scrollbar-width: thin; scrollbar-color: #334155 transparent; }
.sidebar-nav .nav-link { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; color: var(--qrm-sidebar-text); font-weight: 500; background: transparent; border: 0; text-align: left; }
.sidebar-nav .nav-link > i:first-child { font-size: 1.05rem; width: 20px; text-align: center; flex: none; }
.sidebar-nav .nav-link:hover { background: var(--qrm-sidebar-hover); color: #fff; }
.sidebar-nav .nav-link.active { background: var(--qrm-sidebar-active, #1d4ed8); color: #fff; }
.sidebar-nav .chevron { margin-left: auto; font-size: 0.7rem; transition: transform 0.15s ease; }
.sidebar-nav .nav-group-toggle:not(.collapsed) .chevron { transform: rotate(90deg); }
.sidebar-nav .nav-sub { padding: 2px 0 6px 30px; }
.sidebar-nav .nav-sub .nav-link { padding: 6px 12px; font-weight: 400; font-size: 0.875rem; }
.sidebar-nav .nav-link.is-planned { color: var(--qrm-sidebar-muted); cursor: default; justify-content: space-between; }
.sidebar-nav .nav-link.is-planned:hover { background: transparent; color: var(--qrm-sidebar-muted); }
.phase-tag { font-size: 0.65rem; border: 1px solid #334155; border-radius: 999px; padding: 0 7px; line-height: 1.5; white-space: nowrap; }
.sidebar-backdrop { display: none; }

body.sidebar-collapsed .app-sidebar { transform: translateX(-100%); }
body.sidebar-collapsed .app-main { margin-left: 0; }

.app-topbar { position: sticky; top: 0; z-index: 1030; height: 62px; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--qrm-surface); border-bottom: 1px solid var(--qrm-border); }
.topbar-search { position: relative; flex: 1; max-width: 460px; }
.topbar-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--qrm-muted); }
.topbar-search .form-control { padding-left: 36px; background: var(--qrm-bg); border-color: transparent; border-radius: 10px; }
.topbar-search .form-control:focus { background: var(--qrm-surface); border-color: var(--qrm-primary); box-shadow: none; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.user-button { display: flex; align-items: center; gap: 8px; border: 0; padding: 4px 8px; border-radius: 10px; color: var(--qrm-text); }
.user-button:hover { background: var(--qrm-bg); }
.user-name { max-width: 160px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--qrm-primary); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
[data-bs-theme="light"] .theme-icon-light, [data-bs-theme="dark"] .theme-icon-dark { display: none; }

.notif-badge { position: absolute; top: 5px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #dc2626; color: #fff; font-size: 0.65rem; font-weight: 700; line-height: 17px; text-align: center; }
.notif-menu { width: 340px; max-width: calc(100vw - 24px); }
.notif-list { max-height: 340px; overflow-y: auto; }
.notif-item { display: block; padding: 10px 16px; border-bottom: 1px solid var(--qrm-border); color: inherit; text-decoration: none !important; }
.notif-item:hover { background: var(--qrm-bg); }
.notif-item.unread, .notif-unread { background: var(--qrm-primary-soft); }
.notif-item .time { font-size: 0.75rem; color: var(--qrm-muted); }

.app-content { flex: 1; padding: 24px; max-width: 1560px; width: 100%; }
.app-content:focus { outline: none; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 20px; gap: 12px; }
.page-title { font-size: 1.45rem; font-weight: 700; margin: 0; }
.breadcrumb { font-size: 0.8rem; --bs-breadcrumb-divider-color: var(--qrm-muted); --bs-breadcrumb-item-active-color: var(--qrm-muted); }
.app-footer { display: flex; justify-content: space-between; gap: 12px; padding: 14px 24px; font-size: 0.8rem; color: var(--qrm-muted); border-top: 1px solid var(--qrm-border); }

/* ---- components */
.card { background: var(--qrm-surface); border: 1px solid var(--qrm-border); border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04); }
.card-header, .card-footer { background: transparent; border-color: var(--qrm-border); padding: 14px 18px; }
.card-body { padding: 18px; }
.card-title { font-size: 1rem; font-weight: 600; margin: 0; }
.form-label { font-weight: 500; font-size: 0.85rem; margin-bottom: 4px; }
.form-control, .form-select { border-color: var(--qrm-border); border-radius: 8px; font-size: 0.9rem; background-color: var(--qrm-surface); }
.form-control:focus, .form-select:focus, .form-check-input:focus { border-color: var(--qrm-primary); box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15); }
.form-check-input { border-color: #94a3b8; }
.form-check-input:checked { background-color: var(--qrm-primary); border-color: var(--qrm-primary); }
.table { --bs-table-bg: transparent; --bs-table-hover-bg: var(--qrm-bg); font-size: 0.9rem; }
.table thead th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--qrm-muted); font-weight: 600; border-bottom-width: 1px; white-space: nowrap; background: var(--qrm-bg); }
.table td, .table th { padding: 12px 18px; border-color: var(--qrm-border); }
.sort-link { color: inherit; text-decoration: none !important; display: inline-flex; gap: 4px; align-items: center; }
.sort-link.active { color: var(--qrm-primary); }
.sort-link i { font-size: 0.7rem; opacity: 0.7; }
.badge { font-weight: 600; }
.badge-soft { background: var(--qrm-primary-soft); color: var(--qrm-primary); }
.nav-pills .nav-link { color: var(--qrm-muted); border-radius: 8px; padding: 6px 14px; }
.nav-pills .nav-link.active { background: var(--qrm-primary); color: #fff; }
.pagination { --bs-pagination-color: var(--qrm-text); --bs-pagination-bg: var(--qrm-surface); --bs-pagination-border-color: var(--qrm-border); --bs-pagination-active-bg: var(--qrm-primary); --bs-pagination-active-border-color: var(--qrm-primary); --bs-pagination-hover-color: var(--qrm-primary); --bs-pagination-hover-bg: var(--qrm-bg); --bs-pagination-disabled-bg: var(--qrm-surface); --bs-pagination-disabled-border-color: var(--qrm-border); }
.list-group { --bs-list-group-bg: transparent; --bs-list-group-border-color: var(--qrm-border); --bs-list-group-color: var(--qrm-text); --bs-list-group-action-hover-bg: var(--qrm-bg); }
.dropdown-menu { --bs-dropdown-bg: var(--qrm-surface); --bs-dropdown-border-color: var(--qrm-border); --bs-dropdown-link-hover-bg: var(--qrm-bg); border-radius: 10px; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12); font-size: 0.9rem; }
.modal-content { background: var(--qrm-surface); border-color: var(--qrm-border); border-radius: 12px; }
.empty-state { text-align: center; padding: 44px 16px; color: var(--qrm-muted); }
.empty-state > i { font-size: 2.4rem; display: block; margin-bottom: 8px; opacity: 0.6; }
.role-check { border: 1px solid var(--qrm-border); border-radius: 10px; padding: 10px 12px 10px 38px; height: 100%; }
.perm-table td, .perm-table th { padding: 8px 12px; }
.otp-input { letter-spacing: 0.3em; font-variant-numeric: tabular-nums; max-width: 220px; }
.auth-card .otp-input { max-width: none; }

/* ---- dashboard */
.stat-card .card-body { position: relative; padding: 16px 18px; }
.stat-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; margin-bottom: 10px; }
.tone-blue { background: var(--qrm-primary-soft); color: var(--qrm-primary); }
.tone-green { background: rgba(22, 163, 74, 0.12); color: #15803d; }
.tone-amber { background: rgba(217, 119, 6, 0.14); color: #b45309; }
.tone-red { background: rgba(220, 38, 38, 0.12); color: #b91c1c; }
.tone-slate { background: rgba(100, 116, 139, 0.14); color: #475569; }
[data-bs-theme="dark"] .tone-green { color: #4ade80; }
[data-bs-theme="dark"] .tone-amber { color: #fbbf24; }
[data-bs-theme="dark"] .tone-red { color: #f87171; }
[data-bs-theme="dark"] .tone-slate { color: #cbd5e1; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-text { font-size: 1.05rem; font-weight: 700; line-height: 1.6; }
.stat-label { color: var(--qrm-muted); font-size: 0.82rem; margin-top: 2px; }
.stat-scope { position: absolute; top: 14px; right: 14px; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--qrm-muted); }
.chart-wrap { position: relative; height: 320px; }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.quick-action { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--qrm-border); border-radius: 10px;
  background: var(--qrm-surface); color: var(--qrm-text); font-weight: 600; font-size: 0.9rem; text-decoration: none !important; flex-wrap: wrap; }
.quick-action > i { font-size: 1.2rem; color: var(--qrm-primary); }
a.quick-action:hover, a.quick-action:focus-visible { border-color: var(--qrm-primary); background: var(--qrm-primary-soft); }
.quick-action.is-planned { color: var(--qrm-muted); cursor: default; }
.quick-action.is-planned > i { color: var(--qrm-muted); }
.quick-action .phase-tag { border-color: var(--qrm-border); font-weight: 500; margin-left: auto; }

/* ---- catalogue */
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; border: 1px solid var(--qrm-border); background: var(--qrm-bg); flex-shrink: 0; }
.thumb-empty { display: inline-flex; align-items: center; justify-content: center; color: var(--qrm-muted); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gallery-item { border: 1px solid var(--qrm-border); border-radius: 10px; overflow: hidden; background: var(--qrm-surface); }
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--qrm-bg); display: block; }
.gallery-item.is-primary { border-color: var(--qrm-primary); box-shadow: 0 0 0 2px var(--qrm-primary-soft); }
.brand-logo { max-height: 40px; max-width: 120px; object-fit: contain; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--qrm-border); vertical-align: -2px; }
.detail-list { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 16px; margin: 0; }
.detail-list dt { font-weight: 500; color: var(--qrm-muted); font-size: 0.85rem; }
.detail-list dd { margin: 0; word-break: break-word; }
.pre-line { white-space: pre-line; }
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.barcode-preview { background: #fff; border: 1px solid var(--qrm-border); border-radius: 10px; padding: 16px; text-align: center; overflow-x: auto; }
.barcode-preview img { max-width: 100%; height: auto; }
.import-progress { height: 14px; }

/* ---- QR codes */
.type-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.type-option { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--qrm-border); border-radius: 10px; cursor: pointer; font-size: 0.875rem; height: 100%; background: var(--qrm-surface); }
.type-option > i { font-size: 1.15rem; color: var(--qrm-primary); }
.btn-check:checked + .type-option { border-color: var(--qrm-primary); background: var(--qrm-primary-soft); box-shadow: 0 0 0 2px var(--qrm-primary-soft); font-weight: 600; }
.btn-check:focus-visible + .type-option { outline: 2px solid var(--qrm-primary); outline-offset: 2px; }
.qr-preview { display: flex; align-items: center; justify-content: center; min-height: 200px; padding: 12px; border-radius: 10px;
  background-color: #fff; background-image: linear-gradient(45deg, #f1f5f9 25%, transparent 25%), linear-gradient(-45deg, #f1f5f9 25%, transparent 25%),
  linear-gradient(45deg, transparent 75%, #f1f5f9 75%), linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
  background-size: 16px 16px; background-position: 0 0, 0 8px, 8px -8px, -8px 0; border: 1px solid var(--qrm-border); }
.qr-preview img { max-width: 100%; height: auto; max-height: 300px; }
.qr-preview-lg img { max-height: 340px; }
.qr-sticky { position: sticky; top: 76px; }
@media (max-width: 1199.98px) { .qr-sticky { position: static; } }
.template-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.template-card { border: 1px solid var(--qrm-border); border-radius: 12px; padding: 12px; }
.template-card.is-default { border-color: var(--qrm-primary); box-shadow: 0 0 0 2px var(--qrm-primary-soft); }
.template-card .qr-preview { min-height: 140px; }
.label-preview-box { background: var(--qrm-bg); border-radius: 10px; padding: 12px; text-align: center; }
.label-preview-box img, .label-preview-box svg { max-width: 100%; max-height: 640px; height: auto; box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12); background: #fff; }

/* ---- public pages (reached by scanning) */
.public-body { background: #f1f5f9; min-height: 100vh; display: flex; flex-direction: column; color: #0f172a; }
.public-header { background: var(--public-accent, #1d4ed8); color: #fff; padding: 14px 16px; text-align: center; font-size: 1.05rem; }
.public-main { width: 100%; max-width: 560px; margin: 0 auto; padding: 16px; flex: 1; }
.public-card { background: #fff; border-radius: 14px; padding: 20px; margin-bottom: 14px; box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08); }
.public-icon { font-size: 3rem; color: var(--public-accent, #1d4ed8); }
.public-footer { text-align: center; font-size: 0.8rem; color: #64748b; padding: 16px; }
.public-gallery { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x mandatory; }
.public-gallery img { width: 100%; min-width: 100%; max-height: 320px; object-fit: contain; scroll-snap-align: start; background: #f8fafc; border-radius: 10px; }
.public-gallery a:only-child img { min-width: 0; }
.public-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.public-lang { display: flex; gap: 10px; font-size: 0.85rem; }
.public-lang a { color: #fff; opacity: 0.85; }
.public-lang span { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.public-brand { color: var(--public-accent-2, #64748b) !important; }
.public-section summary { cursor: pointer; list-style-position: outside; }
.verify-panel { border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; background: #fff; border: 2px solid; }
.verify-icon { font-size: 2.2rem; line-height: 1; }
.verify-success { border-color: #16a34a; background: #f0fdf4; } .verify-success .verify-icon { color: #16a34a; }
.verify-warning { border-color: #d97706; background: #fffbeb; } .verify-warning .verify-icon { color: #d97706; }
.verify-danger { border-color: #dc2626; background: #fef2f2; } .verify-danger .verify-icon { color: #dc2626; }
.verify-primary { border-color: var(--public-accent, #1d4ed8); } .verify-primary .verify-icon { color: var(--public-accent, #1d4ed8); }
.verify-secondary { border-color: #94a3b8; } .verify-secondary .verify-icon { color: #64748b; }
.public-body .btn-primary { background: var(--public-accent, #1d4ed8); border-color: var(--public-accent, #1d4ed8); }
.verify-info { border-color: #0284c7; background: #f0f9ff; }
.public-btn-accent { background: var(--public-accent, #1d4ed8); border-color: var(--public-accent, #1d4ed8); color: #fff; }
.public-btn-accent:hover, .public-btn-accent:focus-visible { filter: brightness(0.92); color: #fff; background: var(--public-accent, #1d4ed8); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.rating-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rating-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rating-input label { font-size: 2rem; color: #cbd5e1; cursor: pointer; line-height: 1; padding: 2px; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: #f59e0b; }
.rating-input input:focus-visible + label { outline: 2px solid var(--public-accent, #1d4ed8); outline-offset: 2px; border-radius: 4px; }
.lp-heading { margin: 8px 4px 14px; }
.lp-offer { border: 2px dashed var(--public-accent, #1d4ed8); }
.lp-code { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.08em; padding: 6px 12px; border-radius: 8px; background: #f1f5f9; }
.lp-figure img { max-height: 420px; object-fit: cover; }
.block-card .block-handle { color: var(--qrm-muted); }
.is-loading { opacity: 0.55; pointer-events: none; transition: opacity 0.15s; }

/* ---- auth, installer and error pages */
.auth-body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; background: var(--qrm-bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--qrm-surface); border: 1px solid var(--qrm-border); border-radius: 16px; padding: 32px; box-shadow: 0 10px 40px rgba(15, 23, 42, 0.07); }
.auth-card.wide { max-width: 760px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; margin-bottom: 24px; }
.auth-title { font-size: 1.35rem; font-weight: 700; margin-bottom: 6px; }
.auth-footer { margin-top: 18px; font-size: 0.8rem; color: var(--qrm-muted); }
.error-icon { font-size: 2.6rem; color: var(--qrm-primary); }
.error-code { font-size: 0.85rem; font-weight: 700; letter-spacing: 0.1em; color: var(--qrm-muted); }
.error-detail { white-space: pre-wrap; word-break: break-word; max-height: 320px; overflow: auto; }
.steps { display: flex; gap: 6px; margin-bottom: 24px; padding: 0; list-style: none; }
.steps li { flex: 1; height: 5px; border-radius: 999px; background: var(--qrm-border); }
.steps li.done { background: var(--qrm-primary); }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--qrm-border); }
.check-list li:last-child { border-bottom: 0; }

/* ---- responsive */
@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  .app-main { margin-left: 0; }
  body.sidebar-open .app-sidebar { transform: none; box-shadow: 0 0 40px rgba(0, 0, 0, 0.4); }
  body.sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); z-index: 1035; }
  .app-content { padding: 16px; }
  .app-topbar { padding: 0 12px; }
  .table td, .table th { padding: 10px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation-duration: 0.01ms !important; }
}
@media print {
  .app-sidebar, .app-topbar, .app-footer, .toast-container, .filter-card, .btn { display: none !important; }
  .app-main { margin: 0; }
  .card { border: 0; box-shadow: none; }
}

/* ---- Phase 7: branding, reports, print view, restore steps */
.brand-mark-logo { background: #fff; padding: 3px; overflow: hidden; }
.brand-mark-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.auth-logo { max-height: 56px; max-width: 220px; object-fit: contain; }
.branding-preview { display: inline-flex; align-items: center; justify-content: center; padding: 10px; border: 1px dashed var(--qrm-border); border-radius: 10px; background: #fff; }
.branding-preview img { max-height: 64px; max-width: 220px; object-fit: contain; }
.branding-preview-sm img { max-height: 32px; }
.report-tile { transition: border-color .15s, box-shadow .15s; color: inherit; }
.report-tile:hover, .report-tile:focus { border-color: var(--qrm-primary); box-shadow: 0 0 0 3px var(--qrm-primary-soft); }
.report-table td { white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.restore-steps li { color: var(--qrm-muted); }
.restore-steps li.active { color: var(--qrm-text); font-weight: 600; }
.restore-steps li.done { color: #15803d; }
.restore-steps li.done::after { content: " ✓"; }
.privacy-text p { margin-bottom: .75rem; }
.public-footer a { color: inherit; }
.print-body { background: #fff; color: #0f172a; padding: 16px; font-size: 12px; }
.print-toolbar { margin-bottom: 12px; }
.print-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; border-bottom: 2px solid #0f172a; padding-bottom: 8px; margin-bottom: 10px; }
.print-logo { max-height: 40px; max-width: 160px; object-fit: contain; }
.print-table { font-size: 11px; }
.print-table th { background: #f1f5f9 !important; }
@media print {
  .print-body { padding: 0; }
  .print-table thead { display: table-header-group; }
  .print-table tr { break-inside: avoid; }
  @page { size: landscape; margin: 12mm; }
}
