/* Shared keyboard cheat sheet — high contrast for a busy till */

.pos-shortcut-fab {
    position: fixed;
    right: 1.1rem;
    bottom: 5.75rem;
    z-index: 70;
    width: 3.15rem;
    height: 3.15rem;
    border: 2px solid #fbbf24;
    border-radius: 9999px;
    background: #0b1220;
    color: #fefce8;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(251, 191, 36, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: pointer;
    padding: 0;
}

.pos-shortcut-fab:hover,
.pos-shortcut-fab:focus-visible {
    background: #1e293b;
    outline: none;
    transform: translateY(-1px);
}

.pos-shortcut-fab svg {
    width: 1.2rem;
    height: 1.2rem;
    stroke: #fde68a;
}

.pos-shortcut-fab-mark {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
    color: #fbbf24;
    margin-top: 1px;
}

.pos-shortcut-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(2, 6, 23, 0.62);
    display: none;
}

.pos-shortcut-overlay.is-open {
    display: block;
}

.pos-shortcut-panel {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: min(28.5rem, 100%);
    background: #020617;
    border-left: 1px solid #334155;
    box-shadow: -18px 0 40px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
}

.pos-shortcut-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.2rem 0.85rem;
    border-bottom: 1px solid #1e293b;
}

.pos-shortcut-header h2 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #fff;
}

.pos-shortcut-header p {
    margin: 0.3rem 0 0;
    font-size: 0.78rem;
    line-height: 1.4;
    color: #94a3b8;
}

.pos-shortcut-close {
    flex-shrink: 0;
    border: 1px solid #475569;
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 0.5rem;
    width: 2.25rem;
    height: 2.25rem;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.pos-shortcut-close:hover {
    border-color: #fbbf24;
    color: #fde68a;
}

.pos-shortcut-scroll {
    overflow-y: auto;
    padding: 0.75rem 1.1rem 1.4rem;
}

.pos-shortcut-note {
    margin: 0 0 0.85rem;
    font-size: 0.75rem;
    line-height: 1.45;
    color: #cbd5e1;
}

.pos-lowstock-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pos-lowstock-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 0.7rem 0.85rem;
    border-radius: 0.65rem;
    border: 1px solid #1e293b;
    background: #0b1220;
    color: #e2e8f0;
    text-align: left;
    cursor: pointer;
}

.pos-lowstock-row:hover,
.pos-lowstock-row:focus-visible,
.pos-lowstock-row.is-kbd-active {
    border-color: #b45309;
    background: rgba(245, 158, 11, 0.08);
    outline: none;
}

.pos-lowstock-title {
    min-width: 0;
    flex: 1 1 auto;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pos-lowstock-qty {
    flex-shrink: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.14);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    white-space: nowrap;
}

.pos-lowstock-empty {
    margin: 1.25rem 0 0;
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
}

.kbd-cheatsheet {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.kbd-cheatsheet caption {
    caption-side: top;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #fbbf24;
    padding: 0.85rem 0 0.4rem;
}

.kbd-cheatsheet th,
.kbd-cheatsheet td {
    padding: 0.52rem 0.45rem;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid #1e293b;
}

.kbd-cheatsheet thead th {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #94a3b8;
}

.kbd-cheatsheet tbody td {
    color: #f8fafc;
    font-weight: 500;
}

.kbd-cheatsheet tbody tr:nth-child(even) {
    background: #0b1220;
}

.kbd-cheatsheet tbody tr:nth-child(odd) {
    background: #020617;
}

.kbd-chip {
    display: inline-block;
    min-width: 2.4rem;
    padding: 0.18rem 0.42rem;
    border-radius: 0.35rem;
    border: 1px solid #fbbf24;
    border-bottom-width: 3px;
    background: #111827;
    color: #fffbeb;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: center;
    white-space: nowrap;
}

.help-cheatsheet-wrap {
    background: #020617;
    border: 1px solid #1e293b;
    border-radius: 0.85rem;
    padding: 0.4rem 0.9rem 1rem;
}

@media (max-width: 640px) {
    .pos-shortcut-fab {
        bottom: 6.25rem;
        right: 0.75rem;
    }
}

/* Universal mobile / touch layout (portal, login, attendance, production, web orders) */

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

.mobile-shell button[type="submit"],
.mobile-shell .touch-nav a,
.auth-screen button[type="submit"],
.auth-screen a.touch-nav {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-shell a.portal-card {
    min-height: 44px;
}

.auth-screen {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

.auth-screen .auth-card,
.auth-screen form.auth-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
}

.auth-screen input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.auth-screen select,
.auth-screen textarea {
    width: 100%;
    min-height: 44px;
    font-size: 16px;
}

.pin-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.5rem 0 1.25rem;
}

.pin-dot {
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 9999px;
    border: 2px solid #475569;
    background: transparent;
}

.pin-dot.is-filled {
    background: #22d3ee;
    border-color: #22d3ee;
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    width: 100%;
}

.pin-pad button {
    min-height: 64px;
    width: 100%;
    border-radius: 0.85rem;
    border: 1px solid #334155;
    background: #0f172a;
    color: #f8fafc;
    font-size: 1.45rem;
    font-weight: 600;
    line-height: 1;
}

.pin-pad button:active {
    background: #1e293b;
}

.pin-pad button.pin-pad-action {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mobile-shell input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.mobile-shell select {
    font-size: 16px;
}

@media (max-width: 767px) {
    .table-wrap {
        overflow: visible !important;
        border: none;
    }

    table.card-table {
        display: block;
        width: 100%;
        border: 0;
    }

    table.card-table thead {
        display: none;
    }

    table.card-table tbody {
        display: block;
        width: 100%;
    }

    table.card-table tbody tr {
        display: block;
        width: 100%;
        margin-bottom: 0.85rem;
        padding: 0.85rem 1rem;
        background: #0f172a;
        border: 1px solid #1e293b;
        border-radius: 0.85rem;
    }

    table.card-table tbody td {
        display: grid;
        grid-template-columns: minmax(6.5rem, 38%) 1fr;
        gap: 0.5rem;
        align-items: start;
        padding: 0.45rem 0;
        border: 0;
        text-align: left !important;
        white-space: normal;
    }

    table.card-table tbody td::before {
        content: attr(data-label);
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: #94a3b8;
        padding-top: 0.15rem;
    }

    table.card-table tbody td[colspan] {
        display: block;
        text-align: center !important;
    }

    table.card-table tbody td[colspan]::before {
        content: none;
        display: none;
    }
}
