.field-hint {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 400;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 12px;
}

.btn-small {
    min-height: 44px;
    padding: 0 14px;
    font-size: 0.92rem;
}

.input-count {
    width: 96px;
    min-height: 48px;
    padding: 8px 10px;
    text-align: right;
}

.input-money {
    width: 130px;
}

.num {
    text-align: right !important;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.text-ok {
    color: var(--primary-dark);
    font-weight: 600;
}

.text-danger {
    color: var(--danger);
    font-weight: 600;
}

.notice {
    padding: 12px 14px;
    border-radius: var(--radius);
    font-weight: 600;
}

.notice-ok {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.modal-wide {
    width: min(860px, calc(100vw - 24px));
}

.table-compact th,
.table-compact td {
    padding: 8px 12px;
    font-size: 0.92rem;
}

.table tfoot th {
    border-top: 1px solid var(--border);
    border-bottom: 0;
    color: var(--text);
    font-size: 1rem;
}

.table tr.is-clickable {
    cursor: pointer;
}

.table tr.is-clickable:hover,
.table tr.is-clickable:focus-visible {
    background: var(--primary-soft);
    outline: 0;
}

.row-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.stat {
    display: grid;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
}

.stat-title {
    color: var(--muted);
    font-size: 0.88rem;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
}

.product-thumb {
    flex: none;
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    object-fit: cover;
    background: var(--bg);
}

.product-thumb-empty {
    display: grid;
    place-items: center;
    font-size: 2rem;
}

.product-photo {
    justify-self: center;
    max-width: 100%;
    max-height: 50dvh;
    border-radius: var(--radius);
}

.line-list {
    display: grid;
    gap: 8px;
}

.line-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.line-main {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    min-width: 0;
    flex: 1 1 200px;
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 5;
    display: grid;
    margin-top: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.search-result {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--touch);
    padding: 8px 14px;
    border: 0;
    border-bottom: 1px solid var(--border);
    background: transparent;
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

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

.search-result:hover,
.search-result:focus-visible {
    background: var(--primary-soft);
    outline: 0;
}

.search-empty {
    padding: 14px;
}

.page-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.label-stage {
    display: grid;
    place-items: center;
    min-height: 120px;
    padding: 16px;
    border-radius: var(--radius);
    background: var(--bg);
}

.label-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    width: min(320px, 100%);
    padding: 3%;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #ffffff;
    color: #000000;
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    line-height: 1.15;
    overflow: hidden;
}

.label-line {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
}

.label-line-lg,
.label-line-md {
    font-size: 1.05rem;
    font-weight: 700;
}

.label-line-sm {
    font-size: 0.8rem;
}

.label-bars {
    display: flex;
    flex: 1 1 auto;
    align-self: stretch;
    min-height: 40px;
    margin: 2px 8% 0;
}

.label-bar {
    flex: 1 1 0;
}

.label-bar.is-on {
    background: #000000;
}

.label-bars-plain {
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(90deg, #000000 0 2px, #ffffff 2px 5px);
    color: transparent;
}

.label-digits {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

.label-rows {
    display: grid;
    gap: 8px;
    max-height: 40dvh;
    overflow-y: auto;
}

.label-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.label-row-main {
    display: grid;
    gap: 2px;
    flex: 1 1 auto;
    min-width: 0;
    min-height: var(--touch);
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.label-row-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.panel h2 {
    margin-bottom: 4px;
}

.notice-warn {
    background: var(--warning-soft);
    color: #7a5200;
}

.picker-list {
    max-height: 40dvh;
    overflow-y: auto;
}

.search-result-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-price {
    font-weight: 600;
    white-space: nowrap;
}
