:root {
    --blue: #1769e0;
    --blue-dark: #0a3f9f;
    --blue-soft: #eaf2ff;
    --red: #e53935;
    --red-dark: #b71c1c;
    --green: #14a66a;
    --green-soft: #e8f8f0;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --text: #132033;
    --muted: #718096;
    --line: #e5eaf1;
    --shadow: 0 18px 55px rgba(25, 45, 75, .09);
    --radius: 24px;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    margin: 0;
    min-height: 100%;
    color: var(--text);
    background: linear-gradient(180deg, #f7fbff 0%, var(--bg) 45%, #eef3f8 100%);
}

button {
    font: inherit;
    cursor: pointer;
}

    button:disabled {
        cursor: not-allowed;
        opacity: .48;
    }

.hidden {
    display: none !important;
}

.app-shell {
    min-height: 100dvh;
    padding-bottom: 86px;
}

.topbar {
    height: 70px;
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(16px, 4vw, 54px);
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid rgba(215,223,232,.85);
    backdrop-filter: blur(18px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    font-size: 22px;
    font-weight: 900;
    background: linear-gradient(145deg, #247cf0, #0e54bd);
    box-shadow: 0 10px 24px rgba(23,105,224,.22);
}

.brand strong {
    display: block;
    font-size: 14px;
    letter-spacing: .35px;
}

.brand span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.top-status {
    display: flex;
    align-items: center;
}

.status-pill {
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
}

    .status-pill.online {
        color: #0d8956;
        background: var(--green-soft);
    }

    .status-pill.offline {
        color: #b71c1c;
        background: #fff0ef;
    }

    .status-pill i {
        width: 7px;
        height: 7px;
        display: inline-block;
        margin-right: 5px;
        border-radius: 50%;
        background: var(--green);
    }

main {
    width: min(1080px, calc(100% - 28px));
    margin: 0 auto;
}

.screen {
    display: none;
}

    .screen.active {
        display: block;
    }

.home-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 22px;
    padding: 28px 30px;
    border: 1px solid var(--line);
    border-radius: 28px;
    background: linear-gradient(135deg, #fff, #f7fbff);
    box-shadow: var(--shadow);
}

.hero-kicker, .section-label, .camera-kicker {
    color: var(--blue);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.7px;
}

.hero-copy h1 {
    margin: 7px 0 8px;
    font-size: clamp(28px, 5vw, 44px);
    line-height: 1.04;
    letter-spacing: -1.2px;
}

    .hero-copy h1 b {
        color: var(--blue);
    }

.hero-copy p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.hero-state {
    min-width: 120px;
    text-align: right;
}

    .hero-state .pulse-dot {
        width: 12px;
        height: 12px;
        display: inline-block;
        margin-right: 6px;
        border-radius: 50%;
        background: var(--green);
        box-shadow: 0 0 0 7px rgba(20,166,106,.1);
    }

    .hero-state b {
        font-size: 12px;
        color: var(--green);
    }

    .hero-state small {
        display: block;
        margin-top: 8px;
        color: var(--muted);
        font-size: 10px;
    }

.nfc-panel {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(255,255,255,.15);
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: 210px 1fr auto;
    align-items: center;
    gap: 28px;
    min-height: 245px;
    margin-top: 14px;
    padding: 30px;
    color: #fff;
    border-radius: 28px;
    background: linear-gradient(125deg, #07388f 0%, #1769e0 62%, #2483ef 100%);
    box-shadow: 0 22px 55px rgba(18,82,180,.24);
    outline: none;
}

    .nfc-panel::before, .nfc-panel::after {
        content: "";
        position: absolute;
        border: 1px solid rgba(255,255,255,.12);
        border-radius: 50%;
        pointer-events: none;
    }

    .nfc-panel::before {
        width: 430px;
        height: 430px;
        right: -180px;
        top: -250px;
    }

    .nfc-panel::after {
        width: 260px;
        height: 260px;
        left: -170px;
        bottom: -200px;
    }

.nfc-orbit {
    width: 170px;
    height: 170px;
    position: relative;
    display: grid;
    place-items: center;
    margin: auto;
    z-index: 1;
}

.orbit {
    position: absolute;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 50%;
    animation: orbitPulse 2.1s ease-in-out infinite;
}

.orbit-1 {
    inset: 10px;
}

.orbit-2 {
    inset: 34px;
    animation-delay: .45s;
}

.nfc-core {
    width: 82px;
    height: 82px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 25px;
    background: rgba(255,255,255,.14);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}

    .nfc-core span {
        font-size: 16px;
        font-weight: 900;
    }

@keyframes orbitPulse {
    50% {
        transform: scale(1.06);
        opacity: .55;
    }
}

.nfc-copy {
    position: relative;
    z-index: 2;
}

    .nfc-copy h2 {
        margin: 7px 0 8px;
        font-size: clamp(25px, 4vw, 36px);
        letter-spacing: -.8px;
    }

    .nfc-copy p {
        max-width: 520px;
        margin: 0;
        color: rgba(255,255,255,.82);
        font-size: 12px;
        line-height: 1.55;
    }

.uid-pill {
    width: fit-content;
    margin-top: 17px;
    padding: 8px 12px;
    border-radius: 10px;
    background: rgba(0,0,0,.16);
    color: rgba(255,255,255,.7);
    font-size: 9px;
    letter-spacing: 1px;
}

    .uid-pill strong {
        margin-left: 8px;
        color: #fff;
        font-size: 13px;
        letter-spacing: 1.4px;
    }

.nfc-listen {
    position: relative;
    z-index: 2;
    min-width: 155px;
    text-align: right;
}

    .nfc-listen span {
        display: block;
        color: #d8ffed;
        font-size: 10px;
        font-weight: 900;
    }

    .nfc-listen small {
        display: block;
        margin-top: 7px;
        color: rgba(255,255,255,.55);
        font-size: 8px;
        line-height: 1.4;
    }

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.quick-card {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 0;
    border-radius: 17px;
    color: #fff;
    text-align: left;
    box-shadow: 0 12px 25px rgba(22,42,70,.12);
}

    .quick-card.blue {
        background: linear-gradient(120deg, #2b7bf0, #1769e0);
    }

    .quick-card.red {
        background: linear-gradient(120deg, #ef4b46, #d92f2a);
    }

.quick-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: rgba(255,255,255,.16);
    font-size: 19px;
}

.quick-card span:nth-child(2) {
    flex: 1;
}

.quick-card b, .quick-card small {
    display: block;
}

.quick-card b {
    font-size: 12px;
}

.quick-card small {
    margin-top: 3px;
    color: rgba(255,255,255,.76);
    font-size: 9px;
}

.quick-card em {
    font-style: normal;
    font-size: 25px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 12px 0 0;
}

    .stats-grid > div {
        min-height: 78px;
        padding: 15px 17px;
        border: 1px solid var(--line);
        border-radius: 16px;
        background: var(--surface);
        box-shadow: 0 6px 20px rgba(30,50,75,.035);
    }

    .stats-grid span, .stats-grid small {
        color: var(--muted);
        font-size: 8px;
        font-weight: 900;
        letter-spacing: .7px;
    }

    .stats-grid strong {
        display: inline-block;
        margin-top: 5px;
        margin-right: 4px;
        font-size: 25px;
    }

    .stats-grid.report {
        margin-top: 20px;
    }

.bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    height: 72px;
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 7px 14px max(7px, env(safe-area-inset-bottom));
    background: rgba(255,255,255,.95);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
}

.nav {
    width: 150px;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: #8491a0;
}

    .nav span, .nav b {
        display: block;
    }

    .nav span {
        font-size: 19px;
        line-height: 20px;
    }

    .nav b {
        margin-top: 2px;
        font-size: 9px;
    }

    .nav.active {
        color: var(--blue);
        background: var(--blue-soft);
    }

.flow-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 0 13px;
}

.back-button {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    color: var(--text);
    font-size: 28px;
}

.flow-heading {
    flex: 1;
}

.mode-badge {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .8px;
}

    .mode-badge.blue {
        color: var(--blue);
        background: var(--blue-soft);
    }

    .mode-badge.red {
        color: var(--red-dark);
        background: #ffeded;
    }

.flow-heading h1 {
    margin: 5px 0 2px;
    font-size: clamp(26px, 5vw, 36px);
    letter-spacing: -.8px;
}

.flow-heading p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.flow-uid {
    min-width: 95px;
    padding: 9px 11px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
    text-align: right;
}

    .flow-uid span {
        display: block;
        color: var(--muted);
        font-size: 7px;
        font-weight: 900;
    }

    .flow-uid b {
        display: block;
        margin-top: 4px;
        font-size: 12px;
        letter-spacing: 1px;
    }

.transaction-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: #fff;
    box-shadow: var(--shadow);
}

    .transaction-card.in {
        border-top: 4px solid var(--blue);
    }

    .transaction-card.out {
        border-top: 4px solid var(--red);
    }

.transaction-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 2px 2px 13px;
}

    .transaction-head h2 {
        margin: 4px 0 0;
        font-size: 19px;
    }

.camera-pill {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 8px;
    font-weight: 900;
    white-space: nowrap;
}

    .camera-pill.starting {
        color: #8b6418;
        background: #fff6dd;
    }

    .camera-pill.ready {
        color: #08794a;
        background: var(--green-soft);
    }

    .camera-pill.captured {
        color: var(--blue);
        background: var(--blue-soft);
    }

    .camera-pill.error {
        color: #b71c1c;
        background: #ffeded;
    }

.vehicle-strip {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

    .vehicle-strip > div {
        padding: 10px 12px;
        border-radius: 12px;
        background: #f7f9fc;
        border: 1px solid #edf1f5;
    }

    .vehicle-strip span, .vehicle-strip b {
        display: block;
    }

    .vehicle-strip span {
        color: var(--muted);
        font-size: 7px;
        font-weight: 900;
    }

    .vehicle-strip b {
        margin-top: 4px;
        font-size: 11px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

.camera-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 245px;
    gap: 14px;
    align-items: start;
}

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

.camera-shell {
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 320px;
    border-radius: 21px;
    background: #06101e;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
    isolation: isolate;
}

    .camera-shell video, .camera-shell > .captured-image {
        width: 100%;
        height: 100%;
        display: block;
        min-height: 320px;
        background: #06101e;
        object-fit: contain;
        object-position: center;
        transition: opacity .2s ease;
    }

    .camera-shell > .captured-image {
        position: absolute;
        inset: 0;
        z-index: 1;
    }

.camera-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    transition: background .2s;
}

    .camera-overlay.waiting {
        background: rgba(4,12,25,.72);
    }

.corner {
    position: absolute;
    width: 44px;
    height: 44px;
    border-color: #4fe0b0;
    border-style: solid;
    filter: drop-shadow(0 0 7px rgba(79,224,176,.35));
}

    .corner.tl {
        top: 7%;
        left: 6%;
        border-width: 3px 0 0 3px;
        border-radius: 8px 0 0;
    }

    .corner.tr {
        top: 7%;
        right: 6%;
        border-width: 3px 3px 0 0;
        border-radius: 0 8px 0 0;
    }

    .corner.bl {
        bottom: 12%;
        left: 6%;
        border-width: 0 0 3px 3px;
        border-radius: 0 0 0 8px;
    }

    .corner.br {
        right: 6%;
        bottom: 12%;
        border-width: 0 3px 3px 0;
        border-radius: 0 0 8px;
    }

.scan-line {
    position: absolute;
    right: 9%;
    left: 9%;
    top: 45%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(79,224,176,.5), transparent);
    opacity: .65;
}

.camera-message {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(85%, 360px);
    transform: translate(-50%, -50%);
    padding: 18px;
    border-radius: 17px;
    background: rgba(5,14,28,.72);
    color: #fff;
    text-align: center;
    backdrop-filter: blur(7px);
}

    .camera-message strong, .camera-message span {
        display: block;
    }

    .camera-message strong {
        font-size: 14px;
    }

    .camera-message span {
        margin-top: 6px;
        color: #bdc9d8;
        font-size: 10px;
        line-height: 1.45;
    }

.camera-bottom-state {
    position: absolute;
    right: 13px;
    bottom: 12px;
    left: 13px;
    display: flex;
    justify-content: space-between;
    color: #cbd8e5;
    font-size: 8px;
    font-weight: 800;
}

    .camera-bottom-state #cameraLiveDot {
        padding: 6px 8px;
        border-radius: 999px;
        background: rgba(0,0,0,.45);
    }

        .camera-bottom-state #cameraLiveDot i {
            width: 6px;
            height: 6px;
            display: inline-block;
            margin-right: 4px;
            border-radius: 50%;
            background: #788696;
        }

        .camera-bottom-state #cameraLiveDot.active i {
            background: #42e1a9;
            box-shadow: 0 0 8px #42e1a9;
        }

.capture-preview {
    margin-top: 11px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 17px;
    background: #f8fafc;
}

.preview-title {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 8px;
    font-weight: 900;
}

    .preview-title b {
        color: #8b97a4;
    }

        .preview-title b.ok {
            color: var(--green);
        }

.preview-box {
    min-height: 110px;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 12px;
    background: #edf1f5;
    color: #9aa6b2;
    font-size: 9px;
}

    .preview-box img {
        width: 100%;
        max-height: 240px;
        display: block;
        object-fit: contain;
        background: #07101c;
    }

.transaction-side {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.match-card {
    padding: 14px;
    border-radius: 15px;
    background: #fff5f4;
    border: 1px solid #ffd7d5;
}

    .match-card.blue-card {
        background: #f0f6ff;
        border-color: #d8e7ff;
    }

    .match-card span, .match-card strong, .match-card small {
        display: block;
    }

    .match-card span {
        color: var(--muted);
        font-size: 7px;
        font-weight: 900;
        letter-spacing: .8px;
    }

    .match-card strong {
        margin-top: 7px;
        color: var(--red-dark);
        font-size: 19px;
    }

    .match-card.blue-card strong {
        color: var(--blue);
    }

    .match-card small {
        margin-top: 5px;
        color: var(--muted);
        font-size: 9px;
        line-height: 1.45;
    }

.action-btn {
    min-height: 49px;
    width: 100%;
    border: 0;
    border-radius: 14px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .25px;
}

    .action-btn.secondary {
        color: var(--text);
        background: #eef2f6;
    }

    .action-btn.capture {
        color: #fff;
        background: linear-gradient(135deg, #287cf0, #1769e0);
    }

    .action-btn.primary {
        color: #fff;
        background: linear-gradient(135deg, #16b477, #0a995f);
        box-shadow: 0 10px 24px rgba(20,166,106,.18);
    }

    .action-btn.danger {
        color: #fff;
        background: linear-gradient(135deg, #ef4b46, #cf2824);
        box-shadow: 0 10px 24px rgba(229,57,53,.18);
    }

.camera-note {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 11px;
    color: var(--muted);
    background: #f5f8fb;
    font-size: 8px;
}

    .camera-note span {
        color: var(--green);
        margin-right: 5px;
    }

.stats-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    padding: 28px 0 5px;
}

    .stats-head span {
        color: var(--blue);
        font-size: 9px;
        font-weight: 900;
        letter-spacing: 1.3px;
    }

    .stats-head h1 {
        margin: 6px 0 0;
        font-size: 34px;
    }

    .stats-head time {
        color: var(--muted);
        font-size: 10px;
    }

.toast {
    position: fixed;
    right: 50%;
    bottom: 86px;
    z-index: 100;
    transform: translateX(50%);
    max-width: min(92vw, 480px);
    padding: 12px 16px;
    border-radius: 13px;
    color: #fff;
    background: #142337;
    box-shadow: 0 16px 35px rgba(0,0,0,.22);
    font-size: 10px;
    font-weight: 800;
    text-align: center;
}

    .toast[data-type="success"] {
        background: #0b9b62;
    }

    .toast[data-type="error"] {
        background: #c72d29;
    }

@media (max-width: 820px) {
    main {
        width: min(100% - 20px, 680px);
    }

    .home-hero {
        padding: 22px 20px;
    }

    .nfc-panel {
        grid-template-columns: 145px 1fr;
        gap: 18px;
        padding: 22px 18px;
    }

    .nfc-orbit {
        width: 135px;
        height: 135px;
    }

    .nfc-listen {
        grid-column: 1 / -1;
        text-align: left;
        min-width: 0;
    }

    .camera-layout {
        grid-template-columns: 1fr;
    }

    .transaction-side {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .match-card {
        grid-column: 1 / -1;
    }

    .action-btn.primary, .action-btn.danger {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .topbar {
        height: 62px;
        padding: 0 12px;
    }

    .brand-logo {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .brand strong {
        font-size: 12px;
    }

    .brand span {
        font-size: 8px;
    }

    main {
        width: calc(100% - 14px);
    }

    .home-hero {
        margin-top: 10px;
        padding: 18px 15px;
        border-radius: 21px;
    }

    .hero-copy h1 {
        font-size: 27px;
    }

    .hero-copy p {
        font-size: 10px;
    }

    .hero-state {
        min-width: 70px;
    }

        .hero-state small {
            font-size: 8px;
        }

    .nfc-panel {
        grid-template-columns: 1fr;
        min-height: 300px;
        text-align: center;
        padding: 20px 15px;
        gap: 8px;
        border-radius: 22px;
    }

    .nfc-orbit {
        width: 125px;
        height: 125px;
    }

    .nfc-copy p {
        margin: auto;
        max-width: 320px;
    }

    .uid-pill {
        margin: 12px auto 0;
    }

    .nfc-listen {
        text-align: center;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        gap: 7px;
    }

        .stats-grid > div {
            min-height: 68px;
            padding: 11px 10px;
        }

        .stats-grid strong {
            font-size: 21px;
        }

    .bottom-nav {
        height: 67px;
    }

    .flow-top {
        padding: 13px 0 9px;
    }

    .flow-uid {
        min-width: 84px;
    }

    .flow-heading h1 {
        font-size: 25px;
    }

    .transaction-card {
        padding: 11px;
        border-radius: 21px;
    }

    .vehicle-strip {
        grid-template-columns: 1fr 1fr;
    }

        .vehicle-strip > div:last-child {
            grid-column: 1 / -1;
        }

    .camera-shell, .camera-shell video, .camera-shell > .captured-image {
        min-height: 270px;
    }

    .transaction-side {
        grid-template-columns: 1fr 1fr;
    }

    .action-btn {
        min-height: 47px;
    }

    .camera-note {
        line-height: 1.45;
    }
}


/* =========================================================
   CYB PARKING - RUGGED ANDROID CAMERA FLOW
   Compact live preview + capture controls immediately below
   the camera so the operator never has to hunt for CHỤP HÌNH.
   iPhone/desktop layout remains unchanged.
   ========================================================= */

@media (max-width: 560px) and (max-height: 700px) {
    .camera-layout {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Flatten the two internal columns only on short rugged screens. */
    .camera-main,
    .transaction-side {
        display: contents;
    }

    .camera-shell {
        order: 1;
        min-height: 220px;
        height: 220px;
        max-height: 220px;
        border-radius: 17px;
    }

        .camera-shell video,
        .camera-shell > .captured-image {
            min-height: 220px;
            height: 220px;
            max-height: 220px;
        }

    .transaction-side .match-card {
        order: 2;
        margin: 0;
        padding: 10px 12px;
    }

    #captureButton {
        order: 3;
        min-height: 46px;
    }

    #retakeButton {
        order: 4;
        min-height: 44px;
    }

    #confirmButton {
        order: 5;
        min-height: 46px;
    }

    .capture-preview {
        order: 6;
        margin-top: 0;
    }

    .preview-box {
        min-height: 80px;
        max-height: 140px;
    }

        .preview-box img {
            max-height: 140px;
        }

    .camera-note {
        margin-top: 8px;
    }
}

/* === PHOTO SLOTS (gọn) + FULL CAMERA === */

.slots-card {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

.slots-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding: 0 2px;
}

.slots-back {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: #eef2f7;
    color: #1e293b;
    font-size: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.slots-bar-info {
    flex: 1;
    min-width: 0;
}

.slots-bar-info b {
    display: block;
    font-size: 15px;
    color: #0f172a;
}

.slots-bar-info span {
    font-size: 11px;
    color: #64748b;
}

.slots-pill {
    font-size: 10px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.slots-pill.in {
    background: #dbeafe;
    color: #1d4ed8;
}

.slots-pill.out {
    background: #fee2e2;
    color: #b91c1c;
}

.dual-slots {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}

.slot {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.slot-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.4px;
    color: #64748b;
    margin-bottom: 6px;
    text-align: center;
}

.slot-label em {
    color: #ef4444;
    font-style: normal;
}

.slot-label em.opt {
    color: #94a3b8;
    font-weight: 600;
}

.slot-frame {
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
    border: 2px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color .15s, transform .1s;
}

.slot-frame.has-photo {
    border-style: solid;
    border-color: #0ea5e9;
}

.slot:active .slot-frame {
    transform: scale(0.97);
}

.slot-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slot-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
}

.slot-empty span {
    font-size: 26px;
}

.slot-empty small {
    font-size: 10px;
    font-weight: 600;
}

.btn-confirm {
    width: 100%;
    min-height: 52px;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.3px;
    color: #fff;
    cursor: pointer;
}

.btn-confirm:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-confirm.in {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
}

.btn-confirm.out {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

/* FULL SCREEN CAMERA */
.full-camera {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #000;
    display: flex;
    flex-direction: column;
}

.full-camera-top {
    position: absolute;
    top: 0; left: 0; right: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    padding-top: max(12px, env(safe-area-inset-top));
    background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent);
}

.cam-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.18);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.cam-title {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
}

.cam-live {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,.35);
    font-size: 0;
}

.cam-live.on {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.full-camera-body {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #000;
}

.full-camera-body video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.full-camera-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.cam-corner {
    position: absolute;
    width: 34px;
    height: 34px;
    border-color: rgba(255,255,255,.9);
    border-style: solid;
}

.cam-corner.tl { top: 16%; left: 7%; border-width: 3px 0 0 3px; }
.cam-corner.tr { top: 16%; right: 7%; border-width: 3px 3px 0 0; }
.cam-corner.bl { bottom: 20%; left: 7%; border-width: 0 0 3px 3px; }
.cam-corner.br { bottom: 20%; right: 7%; border-width: 0 3px 3px 0; }

.full-camera-msg {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    background: rgba(0,0,0,.55);
    padding: 10px 16px;
    border-radius: 10px;
    text-align: center;
}

.full-camera-msg.hidden { display: none; }

.full-camera-bottom {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 16px;
    padding-bottom: max(22px, env(safe-area-inset-bottom));
    background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
}

.cam-shutter {
    width: 74px;
    height: 74px;
    border-radius: 50%;
    border: 4px solid #fff;
    background: transparent;
    padding: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cam-shutter:disabled { opacity: 0.35; }

.shutter-ring {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #fff;
    transition: transform .1s;
}

.cam-shutter:active .shutter-ring {
    transform: scale(0.86);
}

.cam-shutter-label {
    margin-top: 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* 4 khung đối chiếu XE RA */
.compare-section {
    margin-bottom: 12px;
}

.compare-title {
    font-size: 11px;
    font-weight: 800;
    color: #475569;
    margin-bottom: 8px;
    letter-spacing: 0.3px;
}

.compare-title small {
    font-weight: 600;
    color: #94a3b8;
    margin-left: 4px;
}

.compare-in .slot-frame {
    border-color: #e2e8f0;
    background: #f8fafc;
}

.compare-in .slot-empty {
    color: #94a3b8;
}

.compare-in .slot-empty span {
    font-size: 22px;
}

.slot.readonly {
    cursor: default;
}

.slot.readonly:active .slot-frame {
    transform: none;
}

.placeholder-in {
    border-style: solid !important;
    border-color: #e2e8f0 !important;
}

/* DASHBOARD THỐNG KÊ */
.dash-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.dash-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.8px;
    color: #64748b;
}

.dash-head h1 {
    margin: 2px 0 0;
    font-size: 22px;
    color: #0f172a;
}

.dash-head time {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}

.dash-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

.dash-card {
    background: #fff;
    border-radius: 16px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.dash-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.dash-card-top span {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

.dash-card-top i {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: normal;
    font-size: 13px;
    font-weight: 800;
}

.dash-card strong {
    display: block;
    font-size: 26px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.dash-card small {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 600;
}

.dash-card.in .dash-card-top i { background: #dcfce7; color: #16a34a; }
.dash-card.out .dash-card-top i { background: #fee2e2; color: #dc2626; }
.dash-card.park .dash-card-top i { background: #e0f2fe; color: #0284c7; }
.dash-card.rev .dash-card-top i { background: #f3e8ff; color: #7c3aed; }

.dash-card.in { border-left: 3px solid #16a34a; }
.dash-card.out { border-left: 3px solid #dc2626; }
.dash-card.park { border-left: 3px solid #0284c7; }
.dash-card.rev { border-left: 3px solid #7c3aed; }

.dash-section {
    margin-bottom: 16px;
}

.dash-section h3 {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
    margin: 0 0 8px;
}

.dash-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-empty {
    background: #f8fafc;
    border: 1px dashed #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

.dash-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 12px;
}

.dash-item .di-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.dash-item.in .di-icon { background: #dcfce7; }
.dash-item.out .di-icon { background: #fee2e2; }

.dash-item .di-body {
    flex: 1;
    min-width: 0;
}

.dash-item .di-body b {
    display: block;
    font-size: 13px;
    color: #0f172a;
}

.dash-item .di-body span {
    font-size: 11px;
    color: #64748b;
}

.dash-item .di-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}

.dash-item.in .di-badge { background: #dcfce7; color: #15803d; }
.dash-item.out .di-badge { background: #fee2e2; color: #b91c1c; }

/* ===== LOGIN ===== */
.login-screen {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #e8f0fe 0%, #f5f7fb 45%, #ffffff 100%);
    padding: 24px 18px;
}

.login-wrap {
    width: 100%;
    max-width: 380px;
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.logo-badge {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    background: #fff;
    padding: 14px 20px;
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
    margin-bottom: 10px;
}

.logo-cyb {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #dc2626, #ef4444);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.logo-smart {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.3px;
    background: linear-gradient(90deg, #0ea5e9, #059669);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.login-sub {
    margin: 0;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
}

.login-card {
    background: #fff;
    border-radius: 20px;
    padding: 22px 18px 18px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    border: 1px solid #e2e8f0;
}

.login-field {
    display: block;
    margin-bottom: 14px;
}

.login-field span {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 6px;
}

.login-field input {
    width: 100%;
    height: 48px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    padding: 0 14px;
    font-size: 15px;
    background: #f8fafc;
    outline: none;
    box-sizing: border-box;
    transition: border-color .15s;
}

.login-field input:focus {
    border-color: #2563eb;
    background: #fff;
}

.login-btn {
    width: 100%;
    height: 50px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-top: 6px;
}

.login-btn:active {
    opacity: 0.9;
}

.login-error {
    margin: 10px 0 0;
    text-align: center;
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
}

.login-error.hidden { display: none; }

.login-ver {
    text-align: center;
    margin-top: 18px;
    font-size: 11px;
    color: #94a3b8;
}

/* Brand in topbar */
.brand-logo-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border-radius: 10px;
    padding: 4px 8px;
    border: 1px solid #e2e8f0;
    line-height: 1.05;
}

.bl-cyb {
    font-size: 11px;
    font-weight: 900;
    color: #dc2626;
}

.bl-sp {
    font-size: 8px;
    font-weight: 800;
    color: #059669;
}

/* Account */
.account-wrap {
    padding: 12px 4px;
}

.account-logo {
    text-align: center;
    padding: 24px 0 20px;
}

.account-logo p {
    margin: 12px 0 2px;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

.account-logo small {
    color: #64748b;
    font-size: 12px;
}

.account-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    cursor: pointer;
}

.account-item em {
    margin-left: auto;
    color: #94a3b8;
    font-style: normal;
}

.ai-icon.out {
    color: #dc2626;
}

.hidden { display: none !important; }

/* Home không còn hero dài */
#parking.screen {
    padding-top: 8px;
}

/* ===== APP ICON LOGO (giống SmartPark) ===== */
.app-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    background: linear-gradient(145deg, #1e88e5 0%, #1565c0 55%, #0d47a1 100%);
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.35), inset 0 1px 0 rgba(255,255,255,.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.app-icon::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.2), transparent 55%);
    pointer-events: none;
}

.ai-cyb {
    font-size: 13px;
    font-weight: 900;
    color: #ef4444;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 0 rgba(0,0,0,.15);
    z-index: 1;
}

.ai-sp {
    font-size: 7px;
    font-weight: 800;
    color: #e0f2fe;
    letter-spacing: -0.2px;
    z-index: 1;
    margin-top: 1px;
}

.brand-text strong {
    display: flex;
    gap: 4px;
    align-items: baseline;
    font-size: 14px;
}

.bt-cyb {
    color: #dc2626;
    font-weight: 900;
}

.bt-sp {
    color: #059669;
    font-weight: 800;
}

.brand-text span {
    display: block;
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
}

/* ===== 2 NÚT CÂN BẰNG ===== */
.quick-row.balanced {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 12px 0 8px;
}

.quick-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 88px;
    border: none;
    border-radius: 16px;
    padding: 14px 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.quick-btn:active {
    transform: scale(0.97);
}

.qb-icon {
    font-size: 22px;
    line-height: 1;
}

.quick-btn b {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.3px;
}

.quick-btn small {
    font-size: 10px;
    font-weight: 600;
    opacity: 0.85;
}

.q-camera {
    background: linear-gradient(145deg, #0ea5e9, #0284c7);
    color: #fff;
}

.q-nocard {
    background: linear-gradient(145deg, #f97316, #ea580c);
    color: #fff;
}


/* OCR badge trên frame ảnh */
.slot-frame {
    position: relative;
}
.ocr-badge {
    position: absolute;
    left: 6px;
    right: 6px;
    bottom: 6px;
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-align: center;
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(4px);
    z-index: 2;
}
.ocr-badge.ok {
    background: rgba(2, 132, 199, 0.92);
}
.ocr-badge.wait {
    background: rgba(100, 116, 139, 0.85);
    font-size: 11px;
    letter-spacing: 0;
}

/* Lang + location header */
.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.lang-btn {
    min-width: 36px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 11px;
    font-weight: 800;
    color: #0f172a;
    cursor: pointer;
}
.brand-loc, .loc-line {
    display: block;
    font-size: 10px;
    color: #64748b;
    font-weight: 600;
    margin-top: 1px;
}

/* Dashboard panels */
.dash-panel {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
}
.dash-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.dash-panel-head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}
.peak-tag {
    font-size: 11px;
    font-weight: 700;
    color: #0284c7;
    background: #e0f2fe;
    padding: 4px 10px;
    border-radius: 20px;
}

/* Hour chart */
.hour-chart {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 110px;
    padding: 0 2px;
    overflow-x: auto;
}
.hb {
    flex: 1;
    min-width: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}
.hb-bars {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 1px;
}
.hb-in, .hb-out {
    width: 45%;
    min-height: 2px;
    border-radius: 3px 3px 0 0;
}
.hb-in { background: #34d399; }
.hb-out { background: #94a3b8; }
.hb.peak .hb-in { background: #059669; }
.hb.peak .hb-out { background: #64748b; }
.hb small {
    font-size: 8px;
    color: #94a3b8;
    margin-top: 4px;
}
.hb.peak small { color: #0284c7; font-weight: 700; }

.hour-legend {
    display: flex;
    gap: 14px;
    margin-top: 10px;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}
.hour-legend i {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 4px;
    vertical-align: middle;
}
.lg-in { background: #34d399; }
.lg-out { background: #94a3b8; }

/* Zone ring */
.zone-row {
    display: flex;
    align-items: center;
    gap: 16px;
}
.zone-ring {
    width: 96px;
    height: 96px;
    position: relative;
    flex-shrink: 0;
}
.zone-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.zr-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 3.5;
}
.zr-fg {
    fill: none;
    stroke: #0ea5e9;
    stroke-width: 3.5;
    stroke-linecap: round;
    stroke-dasharray: 97.4;
    stroke-dashoffset: 97.4;
    transition: stroke-dashoffset .4s ease;
}
.zr-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.zr-center b {
    font-size: 16px;
    color: #0f172a;
}
.zr-center small {
    font-size: 9px;
    color: #64748b;
    font-weight: 600;
}
.zone-stats {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.zone-stats div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
}
.zone-stats b {
    font-size: 14px;
    color: #0f172a;
}

/* ===== HOME SERVICES (bank-style) ===== */
.home-services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin: 4px 0 14px;
    padding: 12px 8px;
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e8eef5;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}
.svc {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px 2px;
    -webkit-tap-highlight-color: transparent;
}
.svc:active { transform: scale(0.96); }
.svc-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: #f1f5f9;
}
.svc-icon.nfc { background: linear-gradient(145deg, #dbeafe, #bfdbfe); }
.svc-icon.cam { background: linear-gradient(145deg, #e0f2fe, #bae6fd); }
.svc-icon.card { background: linear-gradient(145deg, #ffedd5, #fed7aa); }
.svc-icon.st { background: linear-gradient(145deg, #dcfce7, #bbf7d0); }
.svc b {
    font-size: 10px;
    font-weight: 700;
    color: #334155;
    text-align: center;
    line-height: 1.2;
}

/* Bottom nav 4 items */
.bottom-nav {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr);
}
.bottom-nav .nav {
    min-width: 0;
}
.bottom-nav .nav b {
    font-size: 10px;
}

/* Redeem */
.redeem-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.redeem-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 20px 14px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
}
.rc-icon { font-size: 28px; display: block; margin-bottom: 8px; }
.redeem-card b { display: block; font-size: 14px; color: #0f172a; }
.redeem-card small { color: #94a3b8; font-size: 11px; }

/* Settings */
.settings-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.set-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 14px 16px;
    width: 100%;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.set-item b { display: block; font-size: 14px; color: #0f172a; }
.set-item small { font-size: 11px; color: #64748b; }
.set-item.danger b { color: #dc2626; }
.set-item > span:first-child { font-size: 20px; }


.set-item.col {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}
.set-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.cfg-input {
    width: 100%;
    height: 44px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: 0 12px;
    font-size: 14px;
    box-sizing: border-box;
    background: #f8fafc;
}
.cfg-input:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
}
.cfg-save {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}


.nfc-panel.nfc-ok {
    background: linear-gradient(125deg, #065f46 0%, #059669 60%, #10b981 100%) !important;
}
.nfc-panel.nfc-err {
    background: linear-gradient(125deg, #7f1d1d 0%, #dc2626 60%, #f87171 100%) !important;
}
.nfc-panel.nfc-busy {
    background: linear-gradient(125deg, #1e3a8a 0%, #2563eb 60%, #38bdf8 100%) !important;
}
.nfc-panel.nfc-wait {
    /* default blue */
}
/* ===== REDEMPTION BILL (không ảnh hưởng parking) ===== */
.redeem-card.clickable {
    cursor: pointer;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

    .redeem-card.clickable:active {
        transform: scale(0.98);
    }

    .redeem-card.clickable:hover {
        border-color: #0ea5e9;
        box-shadow: 0 4px 16px rgba(14,165,233,.12);
    }

.rb-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.rb-back {
    width: 40px;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-size: 20px;
    cursor: pointer;
    flex-shrink: 0;
}

.rb-top b {
    display: block;
    font-size: 15px;
    color: #0f172a;
}

.rb-top small {
    font-size: 11px;
    color: #64748b;
}

.rb-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 12px;
}

.rb-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 8px;
}

    .rb-label em {
        color: #dc2626;
        font-style: normal;
    }

.rb-card-row {
    display: flex;
    gap: 8px;
}

.rb-input {
    flex: 1;
    height: 44px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    background: #f8fafc;
    box-sizing: border-box;
}

    .rb-input:focus {
        outline: none;
        border-color: #2563eb;
        background: #fff;
    }

.rb-nfc-btn {
    height: 44px;
    padding: 0 14px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.rb-card-info {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

    .rb-card-info.ok {
        background: #dcfce7;
        color: #15803d;
    }

    .rb-card-info.err {
        background: #fee2e2;
        color: #b91c1c;
    }

.rb-photo {
    position: relative;
    width: 100%;
    min-height: 160px;
    border-radius: 14px;
    background: #0f172a;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rb-photo-empty {
    text-align: center;
    color: #94a3b8;
}

    .rb-photo-empty span {
        font-size: 32px;
        display: block;
        margin-bottom: 6px;
    }

.rb-photo img {
    width: 100%;
    max-height: 280px;
    object-fit: contain;
    display: block;
}

.rb-ocr-btn {
    width: 100%;
    height: 42px;
    margin-top: 10px;
    border: 1.5px solid #0ea5e9;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0369a1;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

    .rb-ocr-btn:disabled {
        opacity: .45;
        cursor: not-allowed;
    }

.rb-fields {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rb-field span {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 4px;
}

    .rb-field span em {
        color: #dc2626;
        font-style: normal;
    }

.rb-hint {
    margin: 10px 0 0;
    font-size: 11px;
    color: #94a3b8;
    line-height: 1.4;
}

.rb-confirm {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #059669, #10b981);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    margin: 4px 0 20px;
}

    .rb-confirm:disabled {
        opacity: .45;
        cursor: not-allowed;
    }