:root {
    --fp-text: #ffffff;
    --fp-placeholder: #94a3b8;
    --fp-field-bg: rgba(255, 255, 255, 0.08);
    --fp-field-border: rgba(255, 255, 255, 0.08);
    --fp-field-focus: rgba(255, 255, 255, 0.12);
    --fp-field-ring: rgba(34, 197, 94, 0.25);
    --fp-empty-border: rgba(148, 163, 184, 0.25);
    --fp-keyboard-inset: 0px;
}

body {
    font-family: "Segoe UI", sans-serif;
}

.form-control,
.form-select {
    min-height: 48px;
    background: var(--fp-field-bg);
    border: 1px solid var(--fp-field-border);
    color: var(--fp-text);
}

.form-control::placeholder {
    color: var(--fp-placeholder);
}

.form-control:focus,
.form-select:focus {
    background: var(--fp-field-focus);
    border-color: var(--fp-accent, #22c55e);
    box-shadow: 0 0 0 2px var(--fp-field-ring);
    color: var(--fp-text);
}

.form-select option {
    color: #0f172a;
}

button,
input,
select,
textarea {
    touch-action: manipulation;
}

.empty-state {
    padding: 18px;
    border-radius: 18px;
    color: var(--fp-placeholder);
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed var(--fp-empty-border);
    text-align: center;
}

.panel-modal-open {
    overflow: hidden;
}

.delete-confirm-modal[hidden] {
    display: none;
}

.delete-confirm-modal {
    position: fixed;
    inset: 0;
    z-index: 1300;
    display: grid;
    place-items: center;
    padding: 18px;
}

.delete-confirm-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    background:
        radial-gradient(circle at 50% 20%, rgba(239, 68, 68, 0.18), transparent 30%),
        rgba(2, 6, 23, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.delete-confirm-dialog {
    position: relative;
    width: min(440px, 100%);
    border-radius: 22px;
    border: 1px solid rgba(248, 113, 113, 0.22);
    background:
        radial-gradient(130% 160% at 0% 0%, rgba(239, 68, 68, 0.18), transparent 58%),
        radial-gradient(130% 160% at 100% 100%, rgba(56, 189, 248, 0.10), transparent 62%),
        linear-gradient(145deg, rgba(15, 23, 42, 0.96), rgba(3, 7, 18, 0.98));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 28px 70px rgba(0, 0, 0, 0.48);
    padding: 22px;
    color: #e5e7eb;
    opacity: 0;
    transform: translateY(10px) scale(0.98);
    transition: opacity 0.22s ease, transform 0.22s ease;
}

.delete-confirm-dialog:focus {
    outline: none;
}

.delete-confirm-modal.is-open .delete-confirm-backdrop,
.delete-confirm-modal.is-open .delete-confirm-dialog {
    opacity: 1;
}

.delete-confirm-modal.is-open .delete-confirm-dialog {
    transform: translateY(0) scale(1);
}

.delete-confirm-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: rgba(239, 68, 68, 0.16);
    border: 1px solid rgba(248, 113, 113, 0.26);
    color: #fecaca;
    margin-bottom: 16px;
}

.delete-confirm-mark svg {
    width: 23px;
    height: 23px;
}

.delete-confirm-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.18;
}

.delete-confirm-text {
    margin: 10px 0 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.55;
}

.delete-confirm-actions {
    display: flex;
    gap: 10px;
    margin-top: 22px;
}

.delete-confirm-actions .btn {
    flex: 1 1 0;
    min-height: 44px;
    border-radius: 12px;
    font-weight: 800;
}

.delete-confirm-cancel {
    border: 1px solid rgba(148, 163, 184, 0.32);
    background: rgba(15, 23, 42, 0.72);
    color: #dbeafe;
}

.delete-confirm-submit {
    border: 1px solid rgba(248, 113, 113, 0.48);
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #fff;
    box-shadow: 0 12px 24px rgba(127, 29, 29, 0.34);
}

.delete-confirm-cancel:hover,
.delete-confirm-cancel:focus-visible,
.delete-confirm-submit:hover,
.delete-confirm-submit:focus-visible {
    transform: translateY(-1px);
}

/* Shared admin page shell for list/detail screens. */
.panel-shell-container {
    position: relative;
    z-index: 1;
}

/* Shared action links used on client-facing pages. */
.action-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 62px;
    padding: 11px 13px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        linear-gradient(
            135deg,
            var(--surface-1, rgba(15, 23, 42, 0.76)),
            var(--surface-2, rgba(15, 23, 42, 0.92))
        );
    color: #d8e1ee;
    text-decoration: none;
    text-align: left;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 8px 20px rgba(2, 6, 23, 0.24);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.action-link:hover {
    transform: translateY(-1px);
    border-color: rgba(148, 163, 184, 0.46);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03)),
        linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.93));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 12px 26px rgba(2, 6, 23, 0.3);
}

.action-link:active {
    transform: translateY(0);
}

.action-link:focus-visible {
    outline: 2px solid rgba(148, 163, 184, 0.74);
    outline-offset: 2px;
}

.action-link-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.action-link-title {
    font-size: 13px;
    font-weight: 750;
    color: #e2e8f0;
    line-height: 1.2;
    white-space: nowrap;
}

.action-link-hint {
    font-size: 11px;
    color: #98a8bc;
    line-height: 1.2;
}

.action-link-arrow {
    color: #b7c4d7;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    opacity: 0.92;
}

.action-link-icon {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.54);
}

.action-link-icon svg {
    width: 16px;
    height: 16px;
    stroke: #c3d0e0;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.action-link-text {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.top-link {
    border-color: rgba(34, 197, 94, 0.4);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02)),
        linear-gradient(135deg, rgba(21, 128, 61, 0.2), rgba(15, 23, 42, 0.9) 58%, rgba(5, 150, 105, 0.16));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 8px 20px rgba(2, 6, 23, 0.24),
        0 0 18px rgba(34, 197, 94, 0.16);
}

.top-link:hover {
    border-color: rgba(34, 197, 94, 0.62);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
        linear-gradient(135deg, rgba(21, 128, 61, 0.28), rgba(15, 23, 42, 0.92) 55%, rgba(5, 150, 105, 0.22));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 10px 24px rgba(2, 6, 23, 0.26),
        0 0 24px rgba(34, 197, 94, 0.22);
}

.history-list {
    display: grid;
    gap: 10px;
}

.history-title {
    font-size: 15px;
    font-weight: 600;
}

.history-meta {
    color: var(--history-meta-color, var(--text-muted, var(--muted, #94a3b8)));
    font-size: 13px;
}

.history-note {
    color: #cbd5e1;
    font-size: 13px;
}

@media (max-width: 640px) {
    .action-link {
        min-height: 48px;
        padding: 8px 8px;
    }

    .action-link-title {
        font-size: 11px;
    }

    .action-link-hint {
        display: none;
    }

    .action-link-icon {
        width: 24px;
        height: 24px;
        flex-basis: 24px;
        border-radius: 7px;
    }

    .action-link-icon svg {
        width: 14px;
        height: 14px;
    }

    .action-link-arrow {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .form-control,
    .form-select {
        min-height: 48px;
        font-size: 16px;
    }

    .btn,
    button {
        min-height: 44px;
    }

    .delete-confirm-modal {
        align-items: end;
        padding: 12px;
    }

    .delete-confirm-dialog {
        width: 100%;
        border-radius: 24px;
        padding: 20px;
        transform: translateY(18px) scale(0.99);
    }

    .delete-confirm-title {
        font-size: 20px;
    }

    .delete-confirm-actions {
        flex-direction: column-reverse;
    }
}

.inline-alert {
    border: none;
    border-radius: 16px;
    margin-bottom: 24px;
    padding: 14px 18px;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.floating-alert {
    position: fixed;
    top: 114px;
    right: 18px;
    z-index: 1200;
    width: min(360px, calc(100vw - 24px));
    margin-bottom: 0;
    padding: 14px 16px;
    border-radius: 18px;
    box-shadow: 0 16px 38px rgba(1, 12, 25, .32);
}

.floating-alert.alert-success {
    background: linear-gradient(125deg, #1d3b4c, #102937);
    color: #eaf3ff;
    border: 1px solid #426575;
}

.floating-alert.alert-danger {
    background: linear-gradient(125deg, #1d3b4c, #102937);
    color: #eaf3ff;
    border: 1px solid #82616a;
}

.panel-alert-stack {
    --panel-alert-top: 114px;
    position: fixed;
    z-index: 1200;
    top: max(var(--panel-alert-top), env(safe-area-inset-top, 0px));
    right: var(--panel-alert-right, max(18px, env(safe-area-inset-right, 0px)));
    left: var(--panel-alert-left, auto);
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: min(400px, calc(100vw - 36px));
    max-height: calc(100dvh - var(--panel-alert-top) - max(18px, env(safe-area-inset-bottom, 0px)) - var(--fp-keyboard-inset, 0px));
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    pointer-events: none;
}

.panel-alert {
    --panel-alert-accent: #64e6af;
    --panel-alert-icon-bg: #173e39;
    position: relative;
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    gap: 11px;
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 15px 12px 16px 15px;
    overflow: hidden;
    border: 1px solid #426575;
    border-radius: 16px;
    background: linear-gradient(125deg, #1d3b4c, #102937);
    color: #eaf3ff;
    box-shadow: inset 0 1px 0 #e2f5ff0a, 0 14px 35px #010c1940;
    pointer-events: auto;
    animation: panelToastIn .22s ease-out;
    transition: opacity .18s ease, transform .18s ease;
}

.panel-alert-queue-note { padding: 9px 12px; border: 1px solid #304f65; border-radius: 10px; background: #102937; color: #b8cedf; font-size: 12px; line-height: 1.5; }

.panel-alert.floating-alert { position: relative; inset: auto; width: 100%; margin: 0; border-radius: 16px; }
.panel-alert.alert-danger { --panel-alert-accent: #ffaaaa; --panel-alert-icon-bg: #48323a; border-color: #82616a; }
.panel-alert.alert-warning { --panel-alert-accent: #ffd277; --panel-alert-icon-bg: #463e2e; }
.panel-alert.alert-info { --panel-alert-accent: #94d4ff; --panel-alert-icon-bg: #244257; }
.panel-alert-icon { display: grid; flex: 0 0 34px; place-items: center; width: 34px; height: 34px; border: 1px solid color-mix(in srgb, var(--panel-alert-accent) 32%, #253f4c); border-radius: 11px; background: var(--panel-alert-icon-bg); color: var(--panel-alert-accent); }
.panel-alert-icon svg { width: 19px; height: 19px; }
.panel-alert-content { flex: 1; min-width: 0; padding-top: 6px; }
.panel-alert-message { display: block; color: #f0f7ff; font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.panel-alert-detail { display: block; margin-top: 4px; color: #b8cedf; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.panel-alert .panel-alert-close { display: grid; flex: 0 0 32px; place-items: center; width: 32px; min-height: 32px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: #b8cedf; }
.panel-alert-close svg { width: 17px; height: 17px; }
.panel-alert .panel-alert-close:hover { background: #304c60; color: #f0f7ff; }
.panel-alert-close:focus-visible { outline: 2px solid #64e6af; outline-offset: -2px; }
.panel-alert-progress { position: absolute; right: 15px; bottom: 0; left: 15px; height: 2px; overflow: hidden; background: #314956; }
.panel-alert-progress > span { display: block; width: 100%; height: 100%; background: var(--panel-alert-accent); transform-origin: left; animation: panelAlertCountdown var(--panel-alert-duration, 5000ms) linear forwards; }
.panel-alert.is-paused .panel-alert-progress > span { animation-play-state: paused; }
.panel-alert.panel-alert-contextual { margin-top: 14px; border-left: 3px solid var(--panel-alert-accent); background: #142f3c; box-shadow: inset 0 1px 0 #e2f5ff05; }
form > .panel-alert.panel-alert-contextual { margin-top: 0; }
.panel-alert-contextual .panel-alert-icon { flex-basis: 26px; width: 26px; height: 30px; border: 0; background: transparent; }
.panel-alert-contextual .panel-alert-content { padding-top: 4px; }
.panel-alert-contextual .panel-alert-progress { display: none; }
.panel-alert.panel-alert-compact { align-items: center; padding-top: 10px; padding-bottom: 10px; }
.panel-alert-compact .panel-alert-icon { width: 28px; height: 28px; flex-basis: 28px; border-radius: 50%; }
.panel-alert-compact .panel-alert-content { padding-top: 0; }
.panel-alert-compact .panel-alert-message { font-weight: 500; }

@keyframes panelAlertCountdown { to { transform: scaleX(0); } }

.inline-alert.is-hiding {
    opacity: 0;
    transform: translateY(-6px);
}

.floating-alert.is-hiding {
    transform: translateY(-8px);
}

@keyframes panelToastIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .floating-alert {
        top: 88px;
        right: 12px;
        left: 12px;
        width: auto;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .panel-alert-stack { right: max(12px, env(safe-area-inset-right, 0px)); left: max(12px, env(safe-area-inset-left, 0px)); width: auto; }
    .panel-alert { gap: 9px; padding: 12px 9px 13px 12px; }
    .panel-alert-icon { flex-basis: 30px; width: 30px; height: 30px; }
    .panel-alert-content { padding-top: 4px; }
    .panel-alert-message { font-size: 13px; }
    .panel-alert-detail { font-size: 12px; }
}

@media (pointer: coarse) {
    .panel-alert .panel-alert-close { flex-basis: 44px; width: 44px; min-height: 44px; margin: -5px -4px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .panel-alert-progress { display: none; }
}

.fp-offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1250;
    padding: 8px 16px;
    background:
        radial-gradient(120% 180% at 0% 0%, rgba(248, 113, 113, 0.32), transparent 64%),
        linear-gradient(135deg, rgba(127, 29, 29, 0.96), rgba(153, 27, 27, 0.92));
    color: #fef2f2;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-align: center;
    border-bottom: 1px solid rgba(254, 202, 202, 0.22);
    box-shadow: 0 12px 28px rgba(127, 29, 29, 0.32);
    transform: translateY(-100%);
    transition: transform 0.22s ease;
    pointer-events: none;
    visibility: hidden;
}

.fp-offline-banner.is-visible {
    transform: translateY(0);
    pointer-events: auto;
    visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }

    .fp-offline-banner {
        transform: translateY(-100%);
    }

    .fp-offline-banner.is-visible {
        transform: translateY(0);
    }
}

/* Мобильная боковая мини-панель (быстрый доступ к /info). На десктопе скрыта. */
@media (min-width: 901px) {
    .admin-edge-dock {
        display: none !important;
    }
}

@media (max-width: 900px) {
    .admin-edge-dock-backdrop {
        position: fixed;
        inset: 0;
        z-index: 1228;
        background: rgba(2, 6, 23, 0.42);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.34s cubic-bezier(0.4, 0, 0.2, 1);
        -webkit-tap-highlight-color: transparent;
    }

    .admin-edge-dock--open .admin-edge-dock-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    .admin-edge-dock-inner {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 1230;
        display: flex;
        flex-direction: row;
        align-items: center;
        padding-right: env(safe-area-inset-right, 0);
        pointer-events: none;
    }

    .admin-edge-dock-tab {
        position: relative;
        pointer-events: auto;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        min-height: 96px;
        margin: 0;
        padding: 0;
        color: #bae6fd;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        appearance: none;
        background: transparent;
        border: 0;
    }

    .admin-edge-dock-tab::before {
        content: "";
        position: absolute;
        inset: 0 0 0 auto;
        width: 15px;
        border-radius: 10px 0 0 10px;
        background:
            linear-gradient(180deg, rgba(56, 189, 248, 0.22), rgba(15, 23, 42, 0.52)),
            rgba(15, 23, 42, 0.36);
        backdrop-filter: blur(14px) saturate(160%);
        -webkit-backdrop-filter: blur(14px) saturate(160%);
        border: 1px solid rgba(56, 189, 248, 0.35);
        border-right: none;
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.14),
            -4px 0 18px rgba(2, 6, 23, 0.35);
        pointer-events: none;
    }

    .admin-edge-dock-tab:focus-visible {
        outline: 2px solid rgba(56, 189, 248, 0.65);
        outline-offset: 2px;
    }

    .admin-edge-dock-tab-lines {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        margin-left: auto;
        margin-right: 6px;
    }

    .admin-edge-dock-tab-lines span {
        display: block;
        width: 3px;
        height: 3px;
        border-radius: 50%;
        background: currentColor;
        opacity: 0.9;
    }

    .admin-edge-dock-panel {
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 0;
        max-width: 0;
        overflow: hidden;
        opacity: 0;
        padding: 0;
        margin: 0;
        transition:
            width 0.4s cubic-bezier(0.32, 0.72, 0, 1),
            max-width 0.4s cubic-bezier(0.32, 0.72, 0, 1),
            opacity 0.36s cubic-bezier(0.4, 0, 0.2, 1),
            padding 0.4s cubic-bezier(0.32, 0.72, 0, 1);
    }

    .admin-edge-dock--open .admin-edge-dock-panel {
        width: 72px;
        max-width: 72px;
        opacity: 1;
        padding: 0 6px 0 10px;
        pointer-events: auto;
    }

    .admin-edge-dock-actions {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .admin-edge-dock-link,
    .admin-edge-dock-qr {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 48px;
        flex: 0 0 auto;
        border-radius: 14px;
        color: #e0f2fe;
        background:
            linear-gradient(180deg, rgba(56, 189, 248, 0.22), rgba(15, 23, 42, 0.75)),
            rgba(15, 23, 42, 0.9);
        border: 1px solid rgba(56, 189, 248, 0.38);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.08),
            0 6px 16px rgba(2, 6, 23, 0.35);
        transform: scale(0.82);
        opacity: 0;
        transition:
            border-color 0.22s ease,
            background 0.22s ease,
            color 0.22s ease,
            transform 0.42s cubic-bezier(0.34, 1.2, 0.64, 1),
            opacity 0.38s cubic-bezier(0.4, 0, 0.2, 1);
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .admin-edge-dock-qr {
        margin: 0;
        padding: 0;
        cursor: pointer;
        font: inherit;
        appearance: none;
    }

    .admin-edge-dock-link {
        text-decoration: none;
    }

    .admin-edge-dock--open .admin-edge-dock-link {
        transform: scale(1);
        opacity: 1;
        transition-delay: 0s, 0s, 0s, 0.08s, 0.08s;
    }

    .admin-edge-dock--open .admin-edge-dock-qr {
        transform: scale(1);
        opacity: 1;
        transition-delay: 0s, 0s, 0s, 0.14s, 0.14s;
    }

    .admin-edge-dock-link:hover,
    .admin-edge-dock-qr:hover {
        border-color: rgba(125, 211, 252, 0.55);
        color: #f8fafc;
    }

    .admin-edge-dock-link:focus-visible,
    .admin-edge-dock-qr:focus-visible {
        outline: 2px solid rgba(56, 189, 248, 0.7);
        outline-offset: 2px;
    }

    .admin-edge-dock-icon {
        width: 24px;
        height: 24px;
    }

    .admin-edge-dock-qr-modal[hidden] {
        display: none !important;
    }

    .admin-edge-dock-qr-modal:not([hidden]) {
        position: fixed;
        inset: 0;
        z-index: 1250;
        display: flex;
        align-items: center;
        justify-content: center;
        padding:
            max(16px, env(safe-area-inset-top, 0))
            max(16px, env(safe-area-inset-right, 0))
            max(16px, env(safe-area-inset-bottom, 0))
            max(16px, env(safe-area-inset-left, 0));
        opacity: 0;
        animation: admin-edge-qr-modal-in 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    @keyframes admin-edge-qr-modal-in {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    .admin-edge-dock-qr-backdrop {
        position: absolute;
        inset: 0;
        margin: 0;
        padding: 0;
        border: none;
        background: rgba(2, 6, 23, 0.55);
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .admin-edge-dock-qr-dialog {
        position: relative;
        z-index: 1;
        width: min(92vw, 300px);
        margin: auto;
        padding: 20px 18px 18px;
        border-radius: 16px;
        background:
            linear-gradient(180deg, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.94)),
            rgba(15, 23, 42, 0.92);
        border: 1px solid rgba(56, 189, 248, 0.35);
        box-shadow:
            0 20px 40px rgba(2, 6, 23, 0.45),
            inset 0 1px 0 rgba(255, 255, 255, 0.08);
        text-align: center;
    }

    .admin-edge-dock-qr-close {
        position: absolute;
        top: 8px;
        right: 8px;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0;
        padding: 0;
        border: none;
        border-radius: 10px;
        background: rgba(15, 23, 42, 0.55);
        color: #e0f2fe;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
    }

    .admin-edge-dock-qr-close-icon {
        display: block;
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .admin-edge-dock-qr-close:hover {
        background: rgba(51, 65, 85, 0.7);
        color: #f8fafc;
    }

    .admin-edge-dock-qr-close:focus-visible {
        outline: 2px solid rgba(56, 189, 248, 0.7);
        outline-offset: 2px;
    }

    .admin-edge-dock-qr-title {
        margin: 0 0 12px;
        padding: 0 42px;
        font-size: 15px;
        font-weight: 600;
        color: #f8fafc;
        letter-spacing: 0.01em;
        box-sizing: border-box;
    }

    .admin-edge-dock-qr-img {
        display: block;
        width: min(220px, 72vw);
        height: auto;
        margin: 0 auto;
        border-radius: 12px;
        background: #fff;
        padding: 10px;
        box-sizing: border-box;
    }

    .admin-edge-dock-qr-hint {
        margin: 14px 0 0;
        font-size: 12px;
        line-height: 1.45;
        color: #cbd5e1;
    }
}

@media (max-width: 900px) and (prefers-reduced-motion: reduce) {
    .admin-edge-dock-backdrop,
    .admin-edge-dock-panel {
        transition: none !important;
    }

    .admin-edge-dock-link,
    .admin-edge-dock-qr {
        transition: none !important;
        transform: none;
        opacity: 1;
    }

    .admin-edge-dock-qr-modal:not([hidden]) {
        animation: none;
        opacity: 1;
    }
}
