* {
    box-sizing: border-box;
}

:root {
    font-family: Arial, Helvetica, sans-serif;
    color: #111827;
    background: #eef2f7;
}

body {
    margin: 0;
    min-height: 100vh;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

.app-shell {
    width: min(100%, 720px);
    margin: 0 auto;
    padding: 24px 16px 48px;
}

header {
    margin-bottom: 20px;
}

.eyebrow {
    margin: 0 0 4px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 0;
    font-size: clamp(2rem, 8vw, 3.5rem);
}

.panel {
    background: white;
    border-radius: 18px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(17, 24, 39, 0.1);
}

.hidden {
    display: none;
}

label {
    display: block;
    margin: 18px 0 7px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 58px;
    border: 2px solid #cbd5e1;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 1.2rem;
}

input:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, 0.18);
}

button {
    min-height: 54px;
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
}

.primary-button {
    background: #111827;
    color: white;
}

.secondary-button {
    background: #e2e8f0;
    color: #111827;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

#startButton {
    width: 100%;
    margin-top: 22px;
}

.cart-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.label {
    margin-bottom: 2px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cart-number {
    margin-bottom: 0;
    font-size: clamp(2rem, 12vw, 4.4rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.05em;
}

.compact {
    min-height: 44px;
    padding: 8px 14px;
}

.count-card {
    margin-top: 24px;
    border-radius: 14px;
    padding: 18px;
    background: #f1f5f9;
}

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

.count-card strong {
    margin: 4px 0 12px;
    font-size: 2.8rem;
}

.capacity-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: #cbd5e1;
}

.capacity-fill {
    width: 0;
    height: 100%;
    background: #2563eb;
    transition: width 150ms ease;
}

.barcode-input {
    min-height: 74px;
    font-size: 1.55rem;
    font-weight: 700;
    text-align: center;
}

.status-box {
    min-height: 66px;
    margin-top: 16px;
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
}

.status-box.neutral {
    background: #e2e8f0;
}

.status-box.success {
    background: #dcfce7;
    color: #166534;
}

.status-box.warning {
    background: #fef3c7;
    color: #92400e;
}

.status-box.error {
    background: #fee2e2;
    color: #991b1b;
}

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

dialog {
    width: min(calc(100% - 32px), 520px);
    border: 0;
    border-radius: 18px;
    padding: 24px;
}

dialog::backdrop {
    background: rgba(15, 23, 42, 0.7);
}

.dialog-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 22px;
}

@media (max-width: 520px) {
    .button-grid {
        grid-template-columns: 1fr;
    }
}

.mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 20px;
    padding: 5px;
    border-radius: 14px;
    background: #e2e8f0;
}

.mode-button {
    min-height: 46px;
    background: transparent;
    color: #475569;
}

.mode-button.active {
    background: white;
    color: #111827;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.full-width {
    width: 100%;
    margin-top: 12px;
}
