/* =============================================================================
   Door Station dev page (mw-ds-*) — mobile-first accreditation door UI.
   Built from docs/mockups/accreditation-door.html; fixed dark look (door duty
   happens at night, on a handheld). All selectors prefixed mw-ds-.
   ============================================================================= */

.mw-ds-page {
    --mw-ds-go: #34e08a;
    --mw-ds-go2: #22c977;
    --mw-ds-warn: #ffb03a;
    --mw-ds-info: #5b9dff;
    --mw-ds-bg: #0b0c10;
    --mw-ds-app: #111219;
    --mw-ds-s1: #181a23;
    --mw-ds-s2: #1f2230;
    --mw-ds-s3: #272b3c;
    --mw-ds-line: rgba(255, 255, 255, .08);
    --mw-ds-line2: rgba(255, 255, 255, .16);
    --mw-ds-tx: #eef0f5;
    --mw-ds-tx2: #9ba1b2;
    --mw-ds-tx3: #5f6678;

    min-height: var(--mw-full-height, 100vh);
    background: radial-gradient(900px 500px at 50% -5%, rgba(91, 157, 255, .10), transparent 60%), var(--mw-ds-bg);
    display: flex;
    justify-content: center;
    color: var(--mw-ds-tx);
}

.mw-ds-station {
    width: 100%;
    max-width: 520px;
    background: var(--mw-ds-app);
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* ── app bar ── */
.mw-ds-appbar {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 20px;
    flex: none;
}

.mw-ds-title {
    font-weight: 800;
    font-size: 19px;
    letter-spacing: -.02em;
}

.mw-ds-gate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--mw-ds-s2);
    border: 1px solid var(--mw-ds-line);
    border-radius: 8px;
    padding: 4px 9px;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--mw-ds-tx2);
    white-space: nowrap;
}

.mw-ds-gate-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mw-ds-tx3);
}

.mw-ds-gate-dot-on {
    background: var(--mw-ds-go);
    box-shadow: 0 0 8px var(--mw-ds-go);
}

.mw-ds-queue {
    margin-left: auto;
    text-align: right;
}

.mw-ds-queue b {
    font-family: 'JetBrains Mono', monospace;
    font-size: 18px;
}

.mw-ds-queue span {
    display: block;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--mw-ds-tx3);
}

.mw-ds-op {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 13px;
    background: linear-gradient(150deg, #6f8cff, #ee5aa6);
    color: #fff;
    flex: none;
}

.mw-ds-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 20px;
}

/* ── mode toggle ── */
.mw-ds-modes {
    display: flex;
    gap: 8px;
    background: var(--mw-ds-s1);
    border: 1px solid var(--mw-ds-line);
    border-radius: 14px;
    padding: 5px;
    margin-bottom: 16px;
}

.mw-ds-modes button {
    flex: 1;
    border: none;
    background: none;
    color: var(--mw-ds-tx2);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: .16s;
}

.mw-ds-modes button.mw-ds-mode-on {
    background: var(--mw-ds-s3);
    color: var(--mw-ds-tx);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}

/* ── scanner panel ── */
.mw-ds-scanner {
    aspect-ratio: 1 / 1;
    max-height: 46vh;
    border-radius: 20px;
    background: linear-gradient(160deg, #0c0e14, #05060a);
    position: relative;
    overflow: hidden;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    border: 1px solid var(--mw-ds-line);
}

.mw-ds-bracket {
    position: absolute;
    width: 64px;
    height: 64px;
    border: 3px solid var(--mw-ds-go);
}

.mw-ds-scanner:not(.mw-ds-scanning) .mw-ds-bracket {
    border-color: var(--mw-ds-line2);
}

.mw-ds-tl { top: 30px; left: 30px; border-right: none; border-bottom: none; border-radius: 14px 0 0 0; }
.mw-ds-tr { top: 30px; right: 30px; border-left: none; border-bottom: none; border-radius: 0 14px 0 0; }
.mw-ds-bl { bottom: 30px; left: 30px; border-right: none; border-top: none; border-radius: 0 0 0 14px; }
.mw-ds-br { bottom: 30px; right: 30px; border-left: none; border-top: none; border-radius: 0 0 14px 0; }

.mw-ds-scanline {
    position: absolute;
    left: 30px;
    right: 30px;
    height: 2.5px;
    background: linear-gradient(90deg, transparent, var(--mw-ds-go), transparent);
    box-shadow: 0 0 14px var(--mw-ds-go);
    top: 30px;
    animation: mw-ds-scan 2.4s ease-in-out infinite;
}

@keyframes mw-ds-scan {
    0%, 100% { top: 34px; }
    50% { top: calc(100% - 36px); }
}

.mw-ds-pulse {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: rgba(52, 224, 138, .12);
    display: grid;
    place-items: center;
    color: var(--mw-ds-go);
    animation: mw-ds-pulse 1.6s ease-in-out infinite;
}

.mw-ds-pulse .mud-icon-root {
    font-size: 42px;
    width: 42px;
    height: 42px;
}

.mw-ds-pulse-idle {
    background: rgba(255, 255, 255, .06);
    color: var(--mw-ds-tx3);
    animation: none;
}

@keyframes mw-ds-pulse {
    50% { transform: scale(1.08); background: rgba(52, 224, 138, .22); }
}

.mw-ds-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    color: var(--mw-ds-tx3);
    font-size: 12.5px;
    padding: 14px;
}

/* ── buttons ── */
.mw-ds-bigbtn {
    width: 100%;
    border: none;
    border-radius: 16px;
    padding: 17px;
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: .16s;
}

.mw-ds-bigbtn:active {
    transform: scale(.985);
}

.mw-ds-btn-go {
    background: linear-gradient(180deg, var(--mw-ds-go), var(--mw-ds-go2));
    color: #04130b;
    box-shadow: 0 10px 28px -6px rgba(52, 224, 138, .5);
}

.mw-ds-btn-go:disabled {
    background: var(--mw-ds-s3);
    color: var(--mw-ds-tx3);
    box-shadow: none;
    cursor: not-allowed;
}

.mw-ds-btn-alt {
    background: var(--mw-ds-s2);
    color: var(--mw-ds-tx);
    border: 1px solid var(--mw-ds-line);
}

.mw-ds-linkbtn {
    display: block;
    width: 100%;
    text-align: center;
    background: none;
    border: none;
    color: var(--mw-ds-tx2);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 14px;
    cursor: pointer;
}

.mw-ds-linkbtn:hover {
    color: var(--mw-ds-tx);
}

/* ── unknown chip card ── */
.mw-ds-unknown {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(91, 157, 255, .08);
    border: 1px solid rgba(91, 157, 255, .25);
    border-radius: 13px;
    padding: 13px;
    margin-bottom: 12px;
    color: var(--mw-ds-info);
}

.mw-ds-unknown-title {
    font-weight: 700;
    font-size: 14px;
}

.mw-ds-unknown-bind {
    margin-left: auto;
    width: auto;
    padding: 10px 14px;
    font-size: 13px;
    border-radius: 11px;
}

/* ── search ── */
.mw-ds-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--mw-ds-s1);
    border: 1px solid var(--mw-ds-line);
    border-radius: 13px;
    padding: 0 14px;
    margin-bottom: 12px;
    color: var(--mw-ds-tx3);
}

.mw-ds-search:focus-within {
    border-color: var(--mw-ds-line2);
}

.mw-ds-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--mw-ds-tx);
    font: inherit;
    font-size: 15px;
    padding: 14px 0;
}

.mw-ds-search input::placeholder {
    color: var(--mw-ds-tx3);
}

.mw-ds-plist {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mw-ds-prow {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--mw-ds-s1);
    border: 1px solid var(--mw-ds-line);
    border-radius: 13px;
    padding: 11px 13px;
    cursor: pointer;
    transition: .14s;
}

.mw-ds-prow:active {
    background: var(--mw-ds-s2);
}

.mw-ds-av {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 15px;
    color: #fff;
    flex: none;
}

.mw-ds-av-lg {
    width: 58px;
    height: 58px;
    border-radius: 17px;
    font-size: 20px;
}

.mw-ds-nm {
    font-weight: 700;
    font-size: 15px;
}

.mw-ds-sub {
    font-size: 12px;
    color: var(--mw-ds-tx2);
    margin-top: 1px;
}

.mw-ds-meta {
    margin-left: auto;
    text-align: right;
}

.mw-ds-statepill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    padding: 4px 9px;
    background: rgba(155, 161, 178, .13);
    color: var(--mw-ds-tx2);
}

.mw-ds-statepill.mw-ds-in {
    background: rgba(52, 224, 138, .14);
    color: var(--mw-ds-go);
}

.mw-ds-statepill .mud-icon-root {
    font-size: 13px;
    width: 13px;
    height: 13px;
}

.mw-ds-empty {
    text-align: center;
    color: var(--mw-ds-tx3);
    padding: 40px 10px;
    font-size: 13.5px;
}

/* ── detail ── */
.mw-ds-back {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    color: var(--mw-ds-tx2);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 4px 0 14px;
    cursor: pointer;
}

.mw-ds-identified {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(52, 224, 138, .12);
    border: 1px solid rgba(52, 224, 138, .3);
    border-radius: 10px;
    padding: 7px 11px;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--mw-ds-go);
    margin-bottom: 12px;
}

.mw-ds-phead {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 6px;
}

.mw-ds-phead h2 {
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0;
}

.mw-ds-em {
    font-size: 12.5px;
    color: var(--mw-ds-tx2);
    font-family: 'JetBrains Mono', monospace;
    margin-top: 2px;
}

.mw-ds-pills {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 7px;
}

.mw-ds-sec {
    margin-top: 18px;
}

.mw-ds-sh {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: var(--mw-ds-tx3);
    font-weight: 700;
    margin-bottom: 10px;
}

/* ── chip card ── */
.mw-ds-chipcard {
    background: var(--mw-ds-s1);
    border: 1px solid var(--mw-ds-line);
    border-radius: 15px;
    padding: 16px;
}

.mw-ds-chip-idle {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.mw-ds-chip-ring {
    width: 78px;
    height: 78px;
    border-radius: 50%;
    background: rgba(91, 157, 255, .1);
    display: grid;
    place-items: center;
    color: var(--mw-ds-info);
}

.mw-ds-chip-ring .mud-icon-root {
    font-size: 38px;
    width: 38px;
    height: 38px;
}

.mw-ds-chip-ring-live {
    animation: mw-ds-ring 1s ease-in-out infinite;
}

@keyframes mw-ds-ring {
    50% { transform: scale(1.08); background: rgba(91, 157, 255, .22); }
}

.mw-ds-chip-hint {
    font-weight: 600;
    font-size: 14.5px;
}

.mw-ds-chip-bound {
    display: flex;
    align-items: center;
    gap: 13px;
}

.mw-ds-chip-ok {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: rgba(52, 224, 138, .14);
    display: grid;
    place-items: center;
    color: var(--mw-ds-go);
    flex: none;
}

.mw-ds-uid {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 14px;
}

/* ── warn box ── */
.mw-ds-warnbox {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: rgba(255, 176, 58, .08);
    border: 1px solid rgba(255, 176, 58, .25);
    border-radius: 12px;
    padding: 12px;
    font-size: 12.5px;
    color: var(--mw-ds-warn);
    line-height: 1.45;
    margin-bottom: 14px;
}

/* ── footer ── */
.mw-ds-footer-space {
    height: 90px;
}

.mw-ds-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    background: linear-gradient(transparent, var(--mw-ds-app) 26%);
}

/* ── success overlay ── */
.mw-ds-success {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #0e2a1c, var(--mw-ds-app));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    text-align: center;
    gap: 6px;
    transform: translateY(100%);
    transition: transform .35s cubic-bezier(.3, 0, .1, 1);
    z-index: 5;
}

.mw-ds-success.mw-ds-show {
    transform: none;
}

.mw-ds-success-big {
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background: rgba(52, 224, 138, .16);
    display: grid;
    place-items: center;
    color: var(--mw-ds-go);
    margin-bottom: 18px;
    animation: mw-ds-pop .4s both;
}

.mw-ds-success-big .mud-icon-root {
    font-size: 64px;
    width: 64px;
    height: 64px;
}

@keyframes mw-ds-pop {
    from { transform: scale(.6); opacity: 0; }
}

.mw-ds-success h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.02em;
    margin: 0;
}

.mw-ds-success-who {
    font-size: 16px;
    color: var(--mw-ds-tx2);
    margin-top: 2px;
}

.mw-ds-success-summary {
    margin: 22px 0;
    background: rgba(255, 255, 255, .04);
    border: 1px solid var(--mw-ds-line);
    border-radius: 14px;
    padding: 14px 18px;
    width: 100%;
    max-width: 340px;
    font-size: 13px;
}

.mw-ds-success-ln {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.mw-ds-success-ln span:first-child {
    color: var(--mw-ds-tx3);
}

.mw-ds-next {
    max-width: 280px;
}
