/* Label Printing (GDEV-622): the standalone print pages (/Labels, /labels/kiosk/{token}) and the
   Label Printing admin page. One global sheet rather than scoped ones because the print workspace,
   the job tables and the admin tabs share these classes. Colours are app.css's tokens. */

.lp-shell {
    min-height: 100vh;
    background: var(--color-page-tint);
    font-family: Roboto, sans-serif;
    color: var(--color-text-dark);
    display: flex;
    flex-direction: column;
}

/* ── Header: standalone page, no nav rail ─────────────────────────────────────────── */
.lp-header {
    /* The brand anchor, not the lighter 400: on it the inactive tabs (#C3D2F9) and the 11px
       overline pass AA contrast, which they did not on #3A6AE0. */
    background: var(--color-primary);
    color: #fff;
    padding: 0 24px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 32px;
}
.lp-brand { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.lp-brand__text { display: flex; flex-direction: column; gap: 1px; }
.lp-brand__over { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; color: var(--color-primary-50); }
.lp-brand__title { font-size: 18px; font-weight: 500; }
.lp-tabs { display: flex; gap: 24px; flex-wrap: wrap; }
.lp-tab {
    font: 500 14px Roboto, sans-serif;
    background: none;
    border: 0;
    border-bottom: 3px solid transparent;
    padding: 14px 4px 11px;
    min-height: 44px;
    color: var(--color-primary-100);
    cursor: pointer;
}
@media (hover: hover) { .lp-tab:hover { color: #fff; } }
.lp-tab[aria-current="page"] { color: #fff; border-bottom-color: #fff; }
.lp-who { margin-left: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; padding: 12px 0; }
.lp-who__station { display: inline-flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, 0.14); border-radius: 999px; padding: 6px 12px; }

.lp-main { flex: 1; width: 100%; max-width: 1440px; margin: 0 auto; box-sizing: border-box; padding: 24px; }
.lp-main--guided { max-width: 1200px; }
/* /Labels inside the Central shell: the page and its tabs already give the width and the margin. */
.lp-page { padding: 0 1.5rem 1.5rem; }
.lp-main--page { max-width: none; padding: 16px 0 0; }
/* The kiosk's stand-alone screens (link not active, not connected): one panel in the middle. */
.lp-main--center { display: flex; align-items: center; }
.lp-main--center > .lp-panel { width: 100%; }

/* ── Building blocks ──────────────────────────────────────────────────────────────── */
.lp-panel {
    background: #fff;
    border: 1px solid #E4E9F2;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 32, 64, 0.04), 0 4px 16px rgba(16, 32, 64, 0.05);
    overflow: hidden;
}
.lp-panel__head { padding: 16px 20px 14px; border-bottom: 1px solid #E4E9F2; }
.lp-panel__head--row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px; }
.lp-panel__title { margin: 0; font-size: 17px; font-weight: 600; }
.lp-panel__sub { margin: 2px 0 0; font-size: 13px; color: #5B6878; max-width: 80ch; }
.lp-over { font-size: 11px; font-weight: 700; letter-spacing: 0.18em; color: #5B6878; text-transform: uppercase; }
.lp-guided .lp-panel__head { padding: 20px 24px 16px; }
.lp-guided .lp-panel__title { font-size: 26px; }
.lp-guided .lp-panel__sub { font-size: 14px; }
.lp-guided .lp-over { font-size: 13px; letter-spacing: 0.08em; }
/* A kiosk is a touchscreen read at arm's length. */
.lp-guided .lp-label--big { font-size: 16px; }
.lp-guided .lp-stage__note, .lp-guided .lp-printer-line { font-size: 14px; }
.lp-guided .lp-tab { font-size: 16px; min-height: 56px; }
.lp-guided .lp-btn--small { height: 48px; font-size: 15px; padding: 0 18px; }
.lp-guided .lp-link { font-size: 15px; }
.lp-guided .lp-table th { font-size: 14px; }
.lp-guided .lp-table td { font-size: 15px; }
.lp-guided .lp-chip { font-size: 14px; padding: 4px 12px; }

.lp-btn {
    font: 500 14px Roboto, sans-serif;
    border-radius: 8px;
    padding: 0 16px;
    height: 40px;
    border: 1px solid #C9D3E6;
    background: #fff;
    color: var(--color-text-dark);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    white-space: nowrap;
}
.lp-btn--confirm { background: var(--color-secondary-400); border-color: var(--color-secondary-400); color: #1C2B3A; font-weight: 700; }
.lp-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.lp-btn--primary { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
/* Hover only where there is a mouse, and never on a disabled button: on a touch kiosk a tapped
   button would otherwise keep its hover colour, and the armed confirm would turn white under it. */
@media (hover: hover) {
    .lp-btn:not(:disabled):hover { background: #F6F8FC; color: var(--color-text-dark); }
    .lp-btn--primary:not(:disabled):hover { background: var(--color-primary-800); color: #fff; }
    .lp-btn--confirm:not(:disabled):hover { background: var(--color-secondary-400); color: #1C2B3A; }
    .lp-btn--danger:not(:disabled):hover { background: #FDECEC; color: #B3261E; }
}
.lp-btn--big { height: 52px; font-size: 16px; padding: 0 24px; border-radius: 10px; }
.lp-btn--small { height: 34px; font-size: 13px; padding: 0 12px; }
.lp-btn--danger { color: #B3261E; border-color: #F0C4C3; }
/* Icon-only button: square and centred. Its name is in title and aria-label. The icon on an
   icon+text button sits before the text, spaced by .lp-btn's gap. */
.lp-btn--icon { width: 40px; padding: 0; flex: 0 0 auto; }
.lp-btn--icon.lp-btn--small { width: 34px; padding: 0; }
.lp-btn--icon.lp-btn--big { width: 52px; padding: 0; }
.lp-guided .lp-btn--icon, .lp-guided .lp-btn--icon.lp-btn--small { width: 48px; height: 48px; padding: 0; }
.lp-guided .lp-btn--icon.lp-btn--big { width: 52px; }
.lp-icon { flex: 0 0 auto; display: block; }
.lp-btn:focus-visible, .lp-tab:focus-visible, .lp-tile:focus-visible, .lp-step__btn:focus-visible, .lp-seg__btn:focus-visible {
    outline: 3px solid var(--color-primary-200);
    outline-offset: 2px;
}

.lp-input {
    font: 400 14px Roboto, sans-serif;
    height: 40px;
    border: 1px solid #C9D3E6;
    border-radius: 8px;
    padding: 0 12px;
    color: var(--color-text-dark);
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}
textarea.lp-input { height: auto; padding: 8px 12px; }
.lp-input--big { height: 52px; font-size: 18px; border-radius: 10px; }
.lp-input:focus { outline: 2px solid var(--color-primary-400); outline-offset: -1px; }
.lp-label { display: block; font: 500 12px Roboto, sans-serif; color: #5B6878; margin-bottom: 6px; }
.lp-label--big { font-size: 14px; color: var(--color-text-dark); }
.lp-mono { font-family: var(--font-mono); }
.lp-hint { margin: 0; font-size: 13px; color: #5B6878; }

.lp-note { border-radius: 8px; padding: 10px 12px; font-size: 13px; }
.lp-note--ok { background: var(--color-success-50); color: var(--color-success-800); }
.lp-note--warn { background: var(--color-secondary-50); color: var(--color-secondary-900); }
.lp-note--error { background: #FDECEC; color: #8C1D18; }

.lp-chip { font-size: 12px; font-weight: 500; border-radius: 999px; padding: 3px 10px; white-space: nowrap; display: inline-block; }
.lp-chip--blue { background: var(--color-primary-50); color: var(--color-primary-800); }
.lp-chip--amber { background: var(--color-secondary-50); color: var(--color-secondary-800); }
.lp-chip--green { background: var(--color-success-50); color: var(--color-success-800); }
.lp-chip--grey { background: #EEF1F6; color: #5B6878; }
.lp-chip--red { background: #FDECEC; color: #8C1D18; }
/* A row of chips, used in place of text joined with separators. */
.lp-chips { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.lp-muted { font-size: 12px; color: #5B6878; }

/* Toggle buttons: each one on or off on its own (a multi-choice in place of checkboxes). */
.lp-toggles { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lp-toggle { font: 500 13px Roboto, sans-serif; height: 34px; padding: 0 12px; border: 1px solid #C9D3E6; border-radius: 999px; background: #fff; color: var(--color-text-dark); cursor: pointer; white-space: nowrap; }
@media (hover: hover) { .lp-toggle:hover { background: #F6F8FC; } }
.lp-toggle[aria-pressed="true"] { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.lp-toggle:focus-visible { outline: 3px solid var(--color-primary-200); outline-offset: 2px; }

/* Blue-header striped desk table */
.lp-table-wrap { overflow-x: auto; }
.lp-table-wrap--boxed { border: 1px solid #E4E9F2; border-radius: 8px; }
.lp-table-wrap--scroll { max-height: 380px; overflow-y: auto; }
.lp-table { border-collapse: collapse; width: 100%; }
.lp-table th {
    text-align: left;
    font: 500 12px Roboto, sans-serif;
    color: #fff;
    background: var(--color-primary-400);
    padding: 10px 12px;
    white-space: nowrap;
    position: sticky;
    top: 0;
}
.lp-table td { font: 400 13px Roboto, sans-serif; color: var(--color-text-dark); padding: 10px 12px; border-top: 1px solid #E4E9F2; white-space: nowrap; }
.lp-table tbody tr:nth-child(odd) td { background: #F7F9FC; }
@media (hover: hover) { .lp-table tbody tr:hover td { background: var(--color-primary-50); } }
.lp-table tbody tr.lp-row--flag td { background: var(--color-secondary-50); }
.lp-table td.lp-td--wrap { white-space: normal; min-width: 220px; }
/* A long scanned value or label name is cut short in a list; the whole of it is in the title. */
.lp-table td.lp-td--clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
/* A second line under a status chip: what the printer said, and a stock mismatch. */
.lp-detail { font-size: 12px; color: #5B6878; margin-top: 3px; }
.lp-detail--warn { color: #8A520A; }
.lp-table input[type="checkbox"] { width: 18px; height: 18px; }
.lp-empty { padding: 28px 20px; text-align: center; font-size: 14px; color: #5B6878; }

/* ── The label itself ─────────────────────────────────────────────────────────────── */
.lp-preview { display: inline-block; line-height: 0; background: #fff; border-radius: 3px; box-shadow: 0 2px 8px rgba(16, 32, 64, 0.18); overflow: hidden; max-width: 100%; }
.lp-preview svg { display: block; width: 100%; height: auto; }
.lp-stage { background: #E9EDF5; border-radius: 12px; padding: 32px 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; overflow: hidden; min-width: 0; }
.lp-stage__note { font-size: 12px; color: #5B6878; text-align: center; }

/* ── Step bar (kiosk) ─────────────────────────────────────────────────────────────── */
.lp-steps { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.lp-steps li { display: flex; align-items: center; gap: 12px; }
.lp-step__btn { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 6px 4px; min-height: 44px; font: 500 15px Roboto, sans-serif; color: #5B6878; cursor: default; }
.lp-step__dot { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; background: #fff; color: #5B6878; border: 1.5px solid #C9D3E6; box-sizing: border-box; }
.lp-step--current .lp-step__btn { color: var(--color-text-dark); }
.lp-step--current .lp-step__dot { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.lp-step--done .lp-step__btn { color: var(--color-primary); cursor: pointer; }
.lp-step--done .lp-step__dot { background: var(--color-primary-50); color: var(--color-primary); border-color: var(--color-primary-50); }
.lp-step__line { width: 40px; height: 2px; background: #C9D3E6; }

/* ── Print: one arrangement for the kiosk, another for staff, the same sections ───── */
.lp-print--one { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; align-items: start; }
.lp-print--one > * { min-width: 0; }

.lp-tiles { padding: 20px 24px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.lp-print--one .lp-tiles { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.lp-tile {
    text-align: left;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    font-family: Roboto, sans-serif;
    color: var(--color-text-dark);
    width: 100%;
    box-sizing: border-box;
    min-height: 150px;
    gap: 8px;
    padding: 18px 20px;
    border: 1px solid #E4E9F2;
    border-radius: 12px;
    background: #fff;
}
@media (hover: hover) { .lp-tile:hover { border-color: var(--color-primary-400); background: #F6F8FC; } }
/* Two lines tall whatever the name, so a name that wraps does not push its preview out of line. */
.lp-tile__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; width: 100%; min-height: 2.6em; }
.lp-guided .lp-tile__foot { font-size: 14px; }
.lp-tile__name { font-size: 18px; font-weight: 600; }
.lp-tile__thumb { display: flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; border-radius: 8px; background: #E9EDF5; overflow: hidden; height: 116px; margin: 4px 0; padding: 10px; }
/* The frame is sized from the height cap and the label's own proportions, never wider than the
   label: capping only the drawing's height left tall labels in a frame too wide for them. */
.lp-tile__thumb .lp-preview { width: min(100%, calc(96px * var(--lp-ar))) !important; }
.lp-tile__thumb .lp-preview svg { width: 100%; height: auto; }
.lp-tile__foot { margin-top: auto; display: flex; gap: 4px 16px; font-size: 12px; color: #5B6878; flex-wrap: wrap; }
.lp-tile__foot .lp-mono { white-space: nowrap; }
.lp-print--one .lp-tile { min-height: 0; gap: 4px; padding: 12px 14px; border-radius: 10px; margin: 1px; }
.lp-print--one .lp-tile__name { font-size: 15px; }
.lp-print--one .lp-tile__thumb { height: 92px; margin: 2px 0; }
.lp-print--one .lp-tile__thumb .lp-preview { width: min(100%, calc(72px * var(--lp-ar))) !important; }
.lp-print--one .lp-tile[aria-pressed="true"] { border: 2px solid var(--color-primary); background: var(--color-primary-50); margin: 0; }

.lp-seg { display: inline-flex; border: 1px solid #C9D3E6; border-radius: 10px; overflow: hidden; flex-wrap: wrap; }
.lp-seg__btn { font: 500 14px Roboto, sans-serif; padding: 0 18px; height: 44px; border: 0; cursor: pointer; background: #fff; color: var(--color-text-dark); }
.lp-seg__btn[aria-pressed="true"] { background: var(--color-primary); color: #fff; }
.lp-seg--small .lp-seg__btn { height: 34px; font-size: 13px; padding: 0 14px; }
.lp-seg--icons .lp-seg__btn { display: inline-flex; align-items: center; justify-content: center; padding: 0 10px; }
.lp-seg__btn:disabled { color: #A9B4C6; cursor: not-allowed; }

.lp-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.lp-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 760px; }
.lp-fields--narrow { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.lp-drop { border: 1.5px dashed var(--color-primary-200); background: #F6F8FC; border-radius: 10px; padding: 16px 18px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lp-drop__text { flex: 1; min-width: 200px; }
.lp-drop__file { font-size: 15px; font-weight: 500; overflow-wrap: anywhere; }
.lp-drop__sum { font-size: 13px; color: #5B6878; }
.lp-file { position: relative; overflow: hidden; }
.lp-file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.lp-map { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-map__chip { font-size: 13px; border: 1px solid #E4E9F2; border-radius: 999px; padding: 6px 12px; }
.lp-map__chip span:first-child { color: #5B6878; }
.lp-map__chip .lp-mono { color: var(--color-primary); }
.lp-seq-line { font-size: 15px; }
.lp-foot { display: flex; justify-content: space-between; gap: 12px; padding: 16px 24px; background: #F6F8FC; border-top: 1px solid #E4E9F2; flex-wrap: wrap; }

.lp-check { padding: 24px; display: flex; flex-wrap: wrap; gap: 24px; }
.lp-check .lp-stage { flex: 1 1 460px; }
.lp-check__side { flex: 1 1 320px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.lp-print--one .lp-check .lp-stage { flex-basis: 100%; padding: 20px 12px; }
.lp-facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.lp-facts dt { color: #5B6878; }
.lp-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.lp-facts__count { font-weight: 700; font-size: 18px; }
/* The values a label prints, each its own element rather than joined with a separator. */
.lp-prints { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: inherit; gap: 4px 18px; }
/* What will print, restated large so it is checked rather than read off a small preview. */
.lp-facts__value { font-size: 22px; font-weight: 600; color: var(--color-text-dark); overflow-wrap: anywhere; }
.lp-stepper { display: flex; gap: 8px; align-items: stretch; }
.lp-stepper__btn { height: 52px; width: 52px; padding: 0; font-size: 24px; flex: 0 0 auto; border-radius: 10px; }
.lp-stepper__input { text-align: center; min-width: 0; }
.lp-guided .lp-stepper__btn { height: 56px; width: 56px; }
.lp-guided .lp-stepper__input { height: 56px; font-size: 22px; }
.lp-confirm { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.lp-done .lp-done__value { font-family: var(--font-mono); font-size: 24px; font-weight: 600; color: var(--color-text-dark); }
.lp-printer-line { display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; font-size: 13px; color: #5B6878; }
.lp-actions { display: flex; gap: 12px; margin-top: auto; flex-wrap: wrap; }
.lp-actions .lp-btn--primary { flex: 1; min-width: 200px; }

.lp-done { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.lp-done__mark { width: 64px; height: 64px; border-radius: 50%; background: var(--color-success-50); display: flex; align-items: center; justify-content: center; }
.lp-done h2 { margin: 0; font-size: 24px; font-weight: 600; }
.lp-done p { margin: 0; font-size: 15px; color: #5B6878; max-width: 52ch; }
.lp-done__actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

.lp-gap { margin-top: 20px; }
.lp-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.lp-link { background: none; border: 0; padding: 0; font: 400 13px Roboto, sans-serif; color: var(--color-primary); cursor: pointer; text-decoration: underline; min-height: 44px; }

/* ── Admin page (inside the normal shell) ─────────────────────────────────────────── */
.lp-admin { font-family: Roboto, sans-serif; color: var(--color-text-dark); }
.lp-admin__title { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 16px; }
.lp-admin__title h1 { margin: 2px 0 0; font-size: 24px; font-weight: 500; }
.lp-admin__tab { padding-top: 16px; display: flex; flex-direction: column; gap: 20px; }
.lp-split { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.lp-split__list { flex: 1 1 260px; max-width: 320px; }
.lp-split__main { flex: 999 1 560px; min-width: 0; }
.lp-tpl-row { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; min-height: 44px; border: 0; border-radius: 8px; cursor: pointer; font: 14px Roboto, sans-serif; color: var(--color-text-dark); background: transparent; text-align: left; }
.lp-tpl-row[aria-pressed="true"] { background: var(--color-primary-50); }
@media (hover: hover) { .lp-tpl-row:hover { background: #F6F8FC; } }
.lp-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.lp-grid--wide { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
/* Template settings: Data Source, Stations, Label Stock (Prints On under it) and Status, one row
   when there is room, two or one when there is not, every field the full width of its column. */
.lp-grid--settings { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; }
.lp-grid--settings > * { min-width: 0; }
.lp-field-stack { display: flex; flex-direction: column; gap: 10px; }
/* The two editor tables carry a form control in every cell, so they are set tighter than a read
   table and every control has a fixed width: the row fits the panel at desktop width. */
.lp-table--edit th, .lp-table--edit td { padding: 8px 6px; }
.lp-table--edit th:first-child, .lp-table--edit td:first-child { padding-left: 12px; }
.lp-el-input { height: 32px; font-size: 13px; padding: 0 6px; width: 120px; min-width: 0; }
.lp-el-input--num { width: 58px; }
.lp-el-input--sel { width: 84px; }
.lp-el-input--type { width: 104px; }
.lp-el-input--value { width: 170px; }
.lp-el-stack { display: flex; flex-direction: column; gap: 4px; }
/* Six narrow tracks: a number takes two, a select three, so a text element is two tidy rows. */
.lp-el-size { display: grid; grid-template-columns: repeat(6, 28px); gap: 4px; align-items: center; }
.lp-el-size > * { grid-column: span 2; width: 100%; }
.lp-el-size > .lp-el-input--sel { grid-column: span 3; }
.lp-el-size > label { grid-column: span 4; }
.lp-el-x { width: 34px; height: 34px; padding: 0; font-size: 16px; line-height: 1; }
.lp-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.lp-checks label { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.lp-linkcell { display: inline-flex; align-items: center; gap: 8px; }
.lp-linkcell .lp-mono { color: var(--color-primary); }
.lp-newlink { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lp-newlink code { font-family: var(--font-mono); font-size: 13px; overflow-wrap: anywhere; }

/* ── Label designer (Templates tab) ───────────────────────────────────────────────── */
.lp-dz-wrap { background: #E9EDF5; border-radius: 10px; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lp-dz { position: relative; width: 100%; background: #fff; border-radius: 3px; box-shadow: 0 2px 8px rgba(16, 32, 64, 0.18); line-height: 0; touch-action: none; user-select: none; }
.lp-dz:focus-visible { outline: 3px solid var(--color-primary-200); outline-offset: 3px; }
.lp-dz > svg { display: block; width: 100%; height: auto; pointer-events: none; }
.lp-dz--grid { background-image: linear-gradient(to right, rgba(58, 106, 224, 0.10) 1px, transparent 1px), linear-gradient(to bottom, rgba(58, 106, 224, 0.10) 1px, transparent 1px); }
.lp-dz__box { position: absolute; box-sizing: border-box; border: 1px dashed transparent; cursor: move; min-width: 8px; min-height: 8px; }
@media (hover: hover) { .lp-dz__box:hover { border-color: var(--color-primary-200); background: rgba(58, 106, 224, 0.05); } }
.lp-dz__box.is-selected { border: 2px solid var(--color-primary); background: rgba(5, 72, 203, 0.06); }
.lp-dz__box.is-off, .lp-dz__box.is-off:hover { border: 2px solid #B3261E; background: rgba(179, 38, 30, 0.10); }
.lp-dz__box.is-dragging { opacity: 0.85; border-style: solid; border-color: var(--color-primary); }
.lp-dz__tag { position: absolute; left: -2px; bottom: 100%; font: 500 11px Roboto, sans-serif; line-height: 1.5; color: #fff; background: var(--color-primary); padding: 0 6px; border-radius: 4px 4px 0 0; white-space: nowrap; }
.lp-dz__handle { position: absolute; width: 10px; height: 10px; box-sizing: border-box; background: #fff; border: 2px solid var(--color-primary); border-radius: 2px; touch-action: none; z-index: 1; }
.lp-dz__handle--tl { left: -6px; top: -6px; cursor: nwse-resize; }
.lp-dz__handle--br { right: -6px; bottom: -6px; cursor: nwse-resize; }
.lp-dz__handle--tr { right: -6px; top: -6px; cursor: nesw-resize; }
.lp-dz__handle--bl { left: -6px; bottom: -6px; cursor: nesw-resize; }
.lp-dz__ghost { position: absolute; box-sizing: border-box; border: 2px dashed var(--color-primary); background: rgba(5, 72, 203, 0.04); pointer-events: none; }
.lp-dz-align { display: flex; flex-wrap: wrap; gap: 4px; }
.lp-dz-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lp-dz-bar__label { font: 500 12px Roboto, sans-serif; color: #5B6878; }
.lp-dz-bar__sep { width: 1px; height: 24px; background: #E4E9F2; margin: 0 2px; }
.lp-dz-split { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.lp-dz-split__canvas { flex: 3 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.lp-dz-props { flex: 1 1 250px; max-width: 340px; border: 1px solid #E4E9F2; border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.lp-dz-props h3 { margin: 0; font-size: 14px; font-weight: 600; }
.lp-dz-props__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lp-dz-props .lp-input { height: 34px; font-size: 13px; }
.lp-dz-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-pic-pick { display: flex; gap: 6px; align-items: center; }
.lp-pic-pick select { flex: 1 1 auto; min-width: 0; }
.lp-pic-up { border: 1px solid #E4E9F2; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 8px; background: #F6F8FC; }
.lp-pic-up__img { background: #fff; border: 1px solid #E4E9F2; border-radius: 6px; padding: 8px; min-height: 48px; display: flex; align-items: center; justify-content: center; }
.lp-pic-up__img img { image-rendering: pixelated; max-width: 100%; max-height: 220px; object-fit: contain; }
.lp-dz-chip { font: 12px var(--font-mono); border: 1px solid #C9D3E6; background: #fff; color: var(--color-primary); border-radius: 999px; padding: 3px 10px; cursor: pointer; min-height: 28px; }
@media (hover: hover) { .lp-dz-chip:hover { background: var(--color-primary-50); } }
.lp-dz-chip:focus-visible, .lp-tpl-row:focus-visible, .lp-link:focus-visible, .lp-gs1__sum:focus-visible { outline: 3px solid var(--color-primary-200); outline-offset: 2px; }
details.lp-details > summary { cursor: pointer; font: 500 13px Roboto, sans-serif; color: var(--color-primary); padding: 6px 0; }

@media (max-width: 640px) {
    .lp-header { padding: 0 16px; gap: 0 16px; }
    .lp-who { margin-left: 0; padding-top: 0; }
    .lp-who > .lp-mono { display: none; }   /* the station's sign-in name: the station chip already says where */
    .lp-main { padding: 16px 12px; }
    .lp-body, .lp-check { padding: 16px; }
    .lp-tiles { padding: 12px; grid-template-columns: 1fr; }
    .lp-foot { padding: 12px 16px; }
    .lp-foot .lp-btn, .lp-actions .lp-btn { flex: 1; }
    .lp-foot .lp-btn--icon, .lp-actions .lp-btn--icon { flex: 0 0 auto; }
    .lp-step__line { width: 16px; }
    .lp-print--one { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: no-preference) {
    .lp-btn, .lp-tile, .lp-tab { transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease; }
}

/* GS1 builder (designer side panel): one row an AI, dropdown + value + remove. */
.lp-gs1 { display: flex; flex-direction: column; gap: 6px; }
.lp-gs1__row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 34px; gap: 6px; align-items: center; }
.lp-gs1__row .lp-input { height: 34px; font-size: 13px; min-width: 0; }
.lp-gs1__row .lp-btn--icon { width: 34px; height: 34px; padding: 0; }
.lp-gs1__hri { white-space: normal; word-break: break-all; }
.lp-gs1__sum { border: 0; cursor: pointer; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
