:root {
    --nojo-navy: #124E78;
    --nojo-cream: #F0F0C9;
    --nojo-yellow: #F2BB05;
    --nojo-orange: #D74E09;
    --nojo-red: #6E0E0A;
    --page-bg: #f6f7f9;
    --card-bg: #ffffff;
    --text-main: #17202a;
    --text-muted: #667085;
    --border-soft: #e5e7eb;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page-bg);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

.mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    min-height: 64px;
    padding: 12px 16px;
    background: var(--nojo-navy);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.brand-title {
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
}

.brand-subtitle {
    font-size: 12px;
    opacity: 0.85;
    margin-top: 2px;
}

.topbar-link {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
}

.mobile-main {
    padding: 14px;
}

.mobile-shell {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
}

.session-pill {
    display: inline-flex;
    align-items: center;
    padding: 7px 11px;
    border-radius: 999px;
    background: #fff8dc;
    color: #7a4b00;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    border: 1px solid #f4df8a;
}

.app-card {
    background: var(--card-bg);
    border-radius: 22px;
    padding: 18px;
    border: 1px solid var(--border-soft);
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}

.page-title {
    font-size: 26px;
    line-height: 1.1;
    font-weight: 850;
    margin-bottom: 6px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 18px;
}

.section-title {
    font-size: 18px;
    font-weight: 800;
}

.form-label {
    font-size: 14px;
    font-weight: 750;
    color: #344054;
}

.mobile-input,
.count-input {
    border-radius: 16px;
    border: 1px solid #cfd4dc;
}

.mobile-input {
    min-height: 52px;
}

.count-input {
    min-height: 64px;
    font-size: 28px;
    font-weight: 800;
    text-align: center;
}

.search-results {
    margin-top: 8px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    display: none;
}

.search-result-item {
    padding: 13px 14px;
    background: #fff;
    border-bottom: 1px solid var(--border-soft);
    cursor: pointer;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:active {
    background: #eef6fb;
}

.search-result-name {
    font-size: 15px;
    font-weight: 800;
}

.search-result-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.selected-product {
    padding: 14px;
    border-radius: 18px;
    background: #eef6fb;
    border: 1px solid #c9e2f2;
}

.selected-label {
    font-size: 12px;
    color: var(--nojo-navy);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.selected-name {
    font-size: 18px;
    font-weight: 850;
    margin-top: 4px;
}

.selected-sku {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.current-count {
    margin-top: 10px;
    font-size: 16px;
    font-weight: 850;
    color: var(--nojo-red);
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.action-btn {
    min-height: 56px;
    border-radius: 16px;
    font-size: 18px;
    font-weight: 850;
}

.small-link {
    color: var(--nojo-navy);
    font-weight: 800;
    text-decoration: none;
}

.entry-list,
.result-list {
    display: grid;
    gap: 10px;
}

.entry-item,
.result-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 13px;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    background: #fff;
}

.entry-name,
.result-name {
    font-size: 15px;
    font-weight: 800;
}

.entry-meta,
.result-meta {
    font-size: 12px;
    color: var(--text-muted);
    word-break: break-word;
}

.entry-note {
    font-size: 12px;
    color: #344054;
    margin-top: 4px;
}

.entry-qty,
.result-count {
    flex: 0 0 auto;
    min-width: 64px;
    text-align: right;
    font-size: 22px;
    font-weight: 900;
}

.entry-qty.add {
    color: #16803c;
}

.entry-qty.subtract {
    color: var(--nojo-orange);
}

.entry-qty.set {
    color: var(--nojo-navy);
}

.result-count {
    color: var(--nojo-red);
}

.btn-primary {
    background: var(--nojo-navy);
    border-color: var(--nojo-navy);
}

.btn-primary:active,
.btn-primary:hover {
    background: #0d3d5e;
    border-color: #0d3d5e;
}

.btn-warning {
    background: var(--nojo-yellow);
    border-color: var(--nojo-yellow);
    color: #3b2a00;
}

@media (min-width: 768px) {
    body {
        background:
            linear-gradient(rgba(18, 78, 120, 0.08), rgba(18, 78, 120, 0.08)),
            var(--page-bg);
    }

    .mobile-main {
        padding-top: 28px;
    }

    .app-card {
        padding: 24px;
    }

    .action-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}



.end-session-card {
    background: #fff5f5;
    border-color: #fecaca;
}

.count-help-text {
    margin-top: 7px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.35;
}

.btn-danger {
    background: var(--nojo-red);
    border-color: var(--nojo-red);
}

.btn-danger:hover,
.btn-danger:active {
    background: #520905;
    border-color: #520905;
}