[hidden] { display: none !important; }

form[aria-busy="true"] { cursor: progress; }
form[aria-busy="true"] button[type="submit"] { opacity: .72; cursor: wait; }

.connectivity-banner {
    position: fixed; z-index: 200; top: max(8px, env(safe-area-inset-top)); left: 50%;
    width: min(620px, calc(100vw - 24px)); padding: 11px 14px; border: 1px solid #f3c676;
    border-radius: 12px; color: #713f12; background: #fff7df; box-shadow: 0 12px 35px rgba(45, 30, 5, .18);
    font-size: 13px; font-weight: 750; line-height: 1.45; opacity: 0; pointer-events: none;
    transform: translate(-50%, -16px); transition: opacity .18s ease, transform .18s ease;
}
.connectivity-banner.show { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.is-offline form button[type="submit"] { opacity: .68; }

.catalog-more,
.catalog-more-mobile {
    width: 100%;
    min-height: 46px;
    margin-top: 12px;
    border: 1px solid #c9d6e7;
    border-radius: 12px;
    background: #fff;
    color: #17345f;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}
.catalog-more:hover { background: #f4f8fc; border-color: #91aac8; }

.qr-dialog {
    width: min(520px, calc(100vw - 24px));
    max-width: none;
    padding: 0;
    border: 0;
    border-radius: 20px;
    color: #13213a;
    background: transparent;
    box-shadow: 0 24px 70px rgba(3, 18, 42, .32);
}
.qr-dialog::backdrop { background: rgba(4, 16, 34, .7); backdrop-filter: blur(5px); }
.qr-dialog-card { padding: 18px; background: #fff; border-radius: 20px; }
.qr-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.qr-dialog-head strong { display: block; font-size: 20px; }
.qr-dialog-head span { display: block; margin-top: 4px; color: #66758b; font-size: 13px; line-height: 1.45; }
.qr-dialog-head button { width: 38px; height: 38px; border: 0; border-radius: 10px; background: #eef3f8; color: #29405f; font-size: 24px; cursor: pointer; }
.qr-camera { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 15px; background: #071525; }
.qr-camera video { width: 100%; height: 100%; object-fit: cover; }
.qr-guide { position: absolute; inset: 18%; border: 3px solid #6ee7b7; border-radius: 16px; box-shadow: 0 0 0 999px rgba(0, 0, 0, .18); }
.qr-status { min-height: 40px; margin: 12px 2px 8px; color: #52647c; font-size: 13px; line-height: 1.5; }
.qr-manual { display: grid; gap: 6px; }
.qr-manual label { font-size: 12px; font-weight: 800; color: #41536a; }
.qr-manual > div { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.qr-manual input { min-width: 0; min-height: 44px; padding: 9px 12px; border: 1px solid #cbd6e4; border-radius: 10px; font: inherit; }
.qr-manual button { min-width: 72px; border: 0; border-radius: 10px; background: #174f9a; color: #fff; font-weight: 800; cursor: pointer; }

.admin-command-bar {
    position: sticky;
    z-index: 24;
    top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 9px;
    border: 1px solid rgba(198, 211, 227, .92);
    border-radius: 12px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 10px 28px rgba(20, 40, 70, .1);
    backdrop-filter: blur(14px);
}
.admin-command-bar form { display: flex; flex: 1 1 280px; gap: 7px; padding: 0; background: none; }
.admin-command-bar input { min-width: 120px; min-height: 38px; }
.admin-command-bar button { min-height: 38px; white-space: nowrap; }

.qr-scan-mobile {
    min-height: 46px;
    border: 1px solid #bdd0e7;
    border-radius: 13px;
    background: #eff6ff;
    color: #123f78;
    font: inherit;
    font-weight: 850;
}
.search-topline .qr-scan-mobile {
    min-width: 74px;
    padding: 0 12px;
    border-color: #b8cce5;
    border-radius: 15px;
    background: #e9f2ff;
    box-shadow: 0 5px 16px rgba(16,34,63,.05);
}
.search-topline .qr-scan-mobile span { margin-right: 3px; }
.availability-preview { min-height: 22px; margin: 5px 0 0; color: #315d91; font-size: 13px; line-height: 1.45; }
.availability-preview[data-state="ok"] { color: #08725a; }
.availability-preview[data-state="error"] { color: #b42318; }
.availability-preview.good { color: #08725a; }
.availability-preview.bad { color: #b42318; }

@media (max-width: 720px) {
    .qr-dialog-card { padding: 14px; }
    .admin-command-bar { overflow-x: auto; top: 4px; margin-inline: -2px; }
    .admin-command-bar form { min-width: 240px; }
}

@media (prefers-reduced-motion: reduce) {
    .qr-dialog::backdrop { backdrop-filter: none; }
}
