/* dashboards that wrap pages in overflow-x:hidden would stop the sticky action bar; clip does not */
body #wrapper #content-wrapper { overflow-x: clip; }

.ls {
    --ls-ink: #1d2023;
    --ls-muted: #5c6370;
    --ls-line: #d5d8de;
    --ls-soft: #e1e4e9;
    --ls-bg: #f5f6f8;
    --ls-blue: #2a56c6;
    --ls-blue-dark: #2146a6;
    font-family: inherit;
    color: var(--ls-ink);
    background: var(--ls-bg);
    min-height: 70vh;
    padding-bottom: 32px;
}
.ls *, .ls *::before, .ls *::after { box-sizing: border-box; }
.ls-wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.ls-sub { background: #fff; border-bottom: 1px solid var(--ls-soft); }
.ls-sub .ls-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 48px; }
.ls-sub a { color: var(--ls-ink); font-weight: 600; font-size: 14px; text-decoration: none; padding: 12px 0; margin-right: 22px; border-bottom: 2px solid transparent; }
.ls-sub a:hover { color: var(--ls-blue); text-decoration: none; }
.ls-sub a.is-on { border-bottom-color: var(--ls-blue); }
.ls-sub .ls-right a { margin: 0 0 0 22px; }

.ls h1 { font-size: 32px; font-weight: 700; letter-spacing: -0.5px; margin: 28px 0 6px; }
.ls .ls-lead { color: var(--ls-muted); margin: 0 0 18px; }
.ls-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }

.ls-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--ls-ink); background: #fff; color: var(--ls-ink); border-radius: 8px; padding: 9px 18px; font: inherit; font-weight: 600; font-size: 15px; line-height: 1.2; cursor: pointer; text-decoration: none; transition: background .12s, color .12s, border-color .12s; }
.ls-btn:hover { text-decoration: none; color: var(--ls-ink); background: #f0f2f5; }
.ls-btn-primary { background: var(--ls-blue); border-color: var(--ls-blue); color: #fff; }
.ls-btn-primary:hover { background: var(--ls-blue-dark); border-color: var(--ls-blue-dark); color: #fff; }
.ls-btn-block { width: 100%; padding: 12px 18px; }
.ls-btn-danger { background: #c0392b; border-color: #c0392b; color: #fff; }
.ls-btn-danger:hover { background: #a93226; border-color: #a93226; color: #fff; }
.ls-btn[disabled] { opacity: .6; cursor: default; }

.ls-pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.ls-pill { border: 1px solid #aeb3bc; background: #fff; border-radius: 999px; padding: 7px 18px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ls-ink); }
.ls-pill:hover { border-color: var(--ls-ink); }
.ls-pill.is-on { background: var(--ls-ink); border-color: var(--ls-ink); color: #fff; }

.ls-search { display: none; margin-bottom: 18px; }
.ls-search.is-open { display: block; }
.ls-input { width: 100%; border: 1px solid #aeb3bc; border-radius: 8px; padding: 11px 14px; font: inherit; font-size: 15px; color: var(--ls-ink); background: #fff; }
.ls-input:focus { outline: none; border-color: var(--ls-blue); box-shadow: 0 0 0 3px rgba(42, 86, 198, .15); }
textarea.ls-input { resize: vertical; }

.ls-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.ls-card { background: #fff; border: 1px solid var(--ls-soft); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; }
.ls-card h3 { font-size: 18px; font-weight: 700; margin: 16px 0 4px; }
.ls-card p { color: var(--ls-muted); font-size: 14px; margin: 0 0 16px; flex: 1; }
.ls-card .ls-btn { align-self: flex-start; }
.ls-card:hover .ls-btn { background: var(--ls-blue); border-color: var(--ls-blue); color: #fff; }
.ls-empty { text-align: center; color: var(--ls-muted); padding: 48px 12px; }
.ls-empty .ls-btn { margin-top: 14px; }

.ls-thumbbox { background: #e8eaee; border-radius: 10px; height: 190px; overflow: hidden; position: relative; }

.ls-fit { position: relative; width: 100%; overflow: hidden; }
.ls-pages { width: 420px; transform-origin: 0 0; position: absolute; top: 0; left: 0; }
.ls-fit[data-fit="width"] .ls-pages { position: relative; }

.ls-page { position: relative; width: 420px; height: 594px; background: #fff; border: 1px solid #cfd3da; padding: 38px; display: flex; flex-direction: column; font-family: 'LS-cambria',  Cambria, Georgia, serif; font-kerning: none; font-variant-ligatures: none; color: #1c1f23; overflow: hidden; margin-bottom: 14px; text-align: left; box-sizing: border-box; }
.ls-page > * { flex-shrink: 0; }
.ls-logo { height: 54px; display: flex; justify-content: center; }
.ls-logo img { display: block; object-fit: contain; }
.ls-logo i { width: 45px; height: 45px; background: #e5e7eb; border-radius: 8px; display: block; }
.ls-i { line-height: 1.2; text-align: center; overflow-wrap: break-word; }
.ls-pair { display: flex; justify-content: center; align-items: baseline; white-space: nowrap; }
.ls-pi { line-height: 1.2; }
.ls-kv { display: grid; align-items: start; }
.ls-kl, .ls-kc, .ls-kvv { line-height: 1.2; }
.ls-kl { white-space: nowrap; }
.ls-kvv { overflow-wrap: break-word; min-width: 0; }
.ls-stack { display: flow-root; }
.ls-tb { position: relative; }
.ls-tb-sizer { visibility: hidden; }
.ls-tb-vis { position: absolute; left: 0; right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; }
.ls-ph { color: #a2a7b0; }

.ls-edit { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 48px; padding: 28px 0 24px; align-items: start; }
.ls-form { background: #fff; border: 1px solid var(--ls-soft); border-radius: 14px; padding: 26px 26px 10px; }
.ls-tplline { font-style: italic; color: var(--ls-muted); font-size: 14px; }
.ls-tplline a { color: inherit; text-decoration: underline; }
.ls-form h2 { font-size: 26px; font-weight: 700; margin: 4px 0 4px; letter-spacing: -.3px; }
.ls-row { display: flex; gap: 16px; }
.ls-col { flex: 1; min-width: 0; margin-bottom: 18px; }
.ls label.ls-l, .ls-col label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ls-cap { text-align: center; font-style: italic; color: var(--ls-muted); font-size: 14px; margin-bottom: 14px; }
.ls-bar { position: sticky; bottom: 0; z-index: 20; background: #fff; border-top: 1px solid var(--ls-soft); padding: 14px 0; }
.ls-bar .ls-wrap { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ls-bar .ls-grp { display: flex; gap: 12px; flex-wrap: wrap; }

.ls-item { display: flex; align-items: center; gap: 20px; background: #fff; border: 1px solid var(--ls-soft); border-radius: 14px; padding: 18px 22px; margin-bottom: 16px; }
.ls-item .ls-thumbbox { width: 74px; height: 104px; flex: none; border-radius: 8px; }
.ls-item .ls-info { flex: 1; min-width: 0; }
.ls-item h3 { font-size: 20px; font-weight: 700; margin: 0 0 4px; overflow-wrap: anywhere; }
.ls-item h3 a { color: inherit; text-decoration: none; }
.ls-item .ls-meta-line { color: var(--ls-muted); font-size: 15px; }
.ls-item .ls-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

.ls-note { font-size: 13px; color: var(--ls-muted); font-style: italic; margin-top: 12px; }
.ls-err { color: #b3261e; font-size: 14px; margin-top: 10px; display: none; }
.ls-err.is-on { display: block; }
.ls-check { display: flex; align-items: center; gap: 12px; font-size: 16px; margin: 12px 0; cursor: pointer; }
.ls-check input { width: 16px; height: 16px; margin: 0; }

.ls-modal .modal-content { border: 0; border-radius: 20px; padding: 14px 16px 10px; font-family: inherit; color: var(--ls-ink); }
.ls-modal .modal-body { padding: 18px 20px 14px; }
.ls-modal h2 { font-size: 26px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.3px; }
.ls-modal .ls-sub-t { color: var(--ls-muted); margin-bottom: 18px; }
.ls-modal .ls-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 14px; }
.ls-linkrow { display: flex; gap: 12px; margin-bottom: 14px; }
.ls-linkrow .ls-input { flex: 1; }
.ls-sharebtns { display: flex; gap: 12px; margin: 14px 0 6px; }
.ls-sharebtns .ls-btn { flex: 1; }
.ls-ogcard { display: flex; gap: 16px; align-items: center; background: var(--ls-bg); border: 1px solid var(--ls-soft); border-radius: 12px; padding: 16px 18px; margin-top: 8px; }
.ls-ogcard i, .ls-ogcard img { width: 64px; height: 64px; border-radius: 8px; background: #e5e7eb; flex: none; object-fit: contain; }
.ls-ogcard b { display: block; font-size: 17px; }
.ls-ogcard span { color: var(--ls-muted); font-size: 15px; }

.ls-toast { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%) translateY(20px); background: var(--ls-ink); color: #fff; padding: 11px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 2000; max-width: 90vw; }
.ls-toast.is-on { opacity: 1; transform: translateX(-50%) translateY(0); }

.ls-landing { display: grid; grid-template-columns: minmax(0, 390px) minmax(0, 560px); gap: 56px; padding: 8px 0 24px; align-items: start; }
.ls-landing .ls-form h2 { font-size: 24px; }

@media (max-width: 991px) {
    .ls-edit, .ls-landing { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .ls-preview { order: -1; }
    .ls-preview .ls-fit { max-width: 420px; margin: 0 auto; }
    .ls-landing .ls-preview { order: 2; }
}
@media (max-width: 575px) {
    .ls h1 { font-size: 26px; }
    .ls-head { flex-direction: column; }
    .ls-row { flex-direction: column; gap: 0; }
    .ls-item { flex-wrap: wrap; }
    .ls-item .ls-info { flex-basis: calc(100% - 100px); }
    .ls-item .ls-acts { width: 100%; justify-content: flex-start; }
    .ls-bar .ls-grp { width: 100%; }
    .ls-bar .ls-grp .ls-btn { flex: 1; padding-left: 10px; padding-right: 10px; }
    .ls-sharebtns { flex-direction: column; }
}

.ls-style { border-top: 1px solid var(--ls-soft); margin: 4px 0 18px; padding-top: 18px; }
.ls-style h3 { font-size: 18px; font-weight: 700; margin: 0 0 4px; }
.ls-style .ls-grp-l { font-size: 14px; font-weight: 600; margin: 14px 0 8px; }
.ls-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ls-chip { border: 1px solid #aeb3bc; background: #fff; border-radius: 10px; padding: 8px 14px; font-size: 17px; line-height: 1.2; cursor: pointer; color: var(--ls-ink); text-align: left; }
.ls-chip small { display: block; font-family: inherit; font-size: 11px; color: var(--ls-muted); margin-top: 2px; }
.ls-chip:hover { border-color: var(--ls-ink); }
.ls-chip.is-on { border-color: var(--ls-blue); box-shadow: 0 0 0 2px rgba(42, 86, 198, .25); background: #f3f6fd; }
.ls-seg { display: inline-flex; border: 1px solid #aeb3bc; border-radius: 8px; overflow: hidden; }
.ls-seg button { border: 0; background: #fff; padding: 8px 18px; font: inherit; font-weight: 600; color: var(--ls-ink); cursor: pointer; border-right: 1px solid #aeb3bc; }
.ls-seg button:last-child { border-right: 0; }
.ls-seg button.is-on { background: var(--ls-ink); color: #fff; }
.ls-style .ls-check { margin: 14px 0 6px; }

.ls-logorow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ls-logorow .ls-btn { margin: 0; cursor: pointer; }
.ls-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.ls-file:focus + .ls-btn, .ls-logorow label:focus-within { outline: 2px solid var(--ls-blue); }
.ls-logosize { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.ls-logosize label { font-weight: 600; margin: 0; }
.ls-logosize input[type=range] { flex: 1; }
.ls-logosize span { min-width: 40px; text-align: right; color: var(--ls-muted); }

.ls-fsub { font-size: 14px; font-weight: 700; margin: 2px 0 8px; padding-top: 8px; border-top: 1px solid var(--ls-soft); }
.ls-fld { margin-bottom: 16px; }
.ls-fld label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.ls-col .ls-fld { margin-bottom: 0; }
.ls-inrow { display: flex; gap: 8px; }
.ls-inrow .ls-input { flex: 1; min-width: 0; }
.ls-aa { flex: none; border: 1px solid #aeb3bc; background: #fff; border-radius: 8px; padding: 0 10px; font-weight: 700; color: var(--ls-ink); cursor: pointer; }
.ls-aa:hover { border-color: var(--ls-ink); }
.ls-aa.is-changed { border-color: var(--ls-blue); color: var(--ls-blue); background: #f3f6fd; }
.ls-aa[aria-expanded="true"] { background: var(--ls-ink); color: #fff; border-color: var(--ls-ink); }
.ls-sty { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.ls-sty[hidden] { display: none; }
.ls-sty select, .ls-sty input { border: 1px solid #aeb3bc; border-radius: 8px; padding: 6px 8px; font: inherit; background: #fff; color: var(--ls-ink); }
.ls-sty select { flex: 1; min-width: 120px; }
.ls-sty input[type=number] { width: 68px; }
.ls-tg { border: 1px solid #aeb3bc; background: #fff; border-radius: 8px; width: 38px; color: var(--ls-ink); cursor: pointer; }
.ls-tg.is-on { background: var(--ls-ink); color: #fff; border-color: var(--ls-ink); }
.ls-tg:disabled { opacity: .4; cursor: not-allowed; }
.ls-fs { border: 0; padding: 0; margin: 0 0 4px; min-width: 0; }
.ls-fs:disabled { opacity: .45; }
.ls-space { display: flex; align-items: center; gap: 10px; margin: 2px 0 16px; padding: 8px 12px; background: #f5f6f8; border-radius: 10px; }
.ls-space label { margin: 0; font-size: 13px; font-weight: 600; color: var(--ls-muted); flex: none; max-width: 42%; }
.ls-space input[type=range] { flex: 1; min-width: 0; }
.ls-space span { min-width: 28px; text-align: right; color: var(--ls-muted); font-size: 13px; }
.ls-overflow { color: #b3261e; font-style: normal; font-weight: 600; }
.ls-datefmt select { max-width: 260px; }
.ls-form .ls-check { display: flex; align-items: center; gap: 8px; margin: 4px 0 12px; }
.ls-form .ls-blankchk { margin: 8px 0 0; font-size: 14px; }

/* Compact editor: form and preview share one height, form scrolls on its own */
.ls-edit { height: var(--ls-edit-h, calc(100vh - 290px)); min-height: 460px; padding: 14px 0 12px; align-items: stretch; gap: 24px; }
.ls-edit .ls-form { height: 100%; overflow-y: auto; padding: 14px 18px 6px; border-radius: 12px; }
.ls-edit .ls-preview { height: 100%; display: flex; flex-direction: column; min-height: 0; }
.ls-edit .ls-preview .ls-fit { flex: 1; min-height: 0; background: #e8eaee; border-radius: 12px; }
.ls-edit .ls-cap { margin-bottom: 8px; }
.ls-form h2 { font-size: 20px; margin: 2px 0 2px; }
.ls-form .ls-lead { font-size: 13px; margin-bottom: 10px; }
.ls-tplline { font-size: 13px; }
.ls-form .ls-input { padding: 7px 11px; font-size: 14px; }
.ls-fld { margin-bottom: 8px; }
.ls-fld label { font-size: 12.5px; margin-bottom: 3px; }
.ls-row { gap: 10px; margin-bottom: 8px; }
.ls-row .ls-col { margin-bottom: 0; }
.ls-aa { padding: 0 9px; }
.ls-sty { margin-top: 6px; gap: 6px; }
.ls-sty select, .ls-sty input { padding: 4px 8px; font-size: 13px; }
.ls-tg { width: 34px; }
.ls-space { margin: 0 0 8px; padding: 4px 10px; }
.ls-form .ls-check { margin: 4px 0 8px; font-size: 14px; }
.ls-form .ls-blankchk { margin: 5px 0 0; font-size: 13px; }
.ls-form .ls-logorow { margin-top: 0; }
.ls-form .ls-logosize { margin-top: 8px; }
.ls-dfmt { flex: none; width: 150px; border: 1px solid #aeb3bc; border-radius: 8px; padding: 0 8px; font-size: 13px; background: #fff; color: var(--ls-ink); }
.ls-t.is-hl { background: rgba(255, 207, 51, .55); box-shadow: 0 0 0 2px rgba(255, 207, 51, .55); border-radius: 2px; }
.ls-sp.is-hl { background: rgba(42, 86, 198, .16); }
.ls-logo.is-hl { background: rgba(255, 207, 51, .35); }
.ls-fs[hidden] { display: none; }
@media (max-width: 991px) {
    .ls-edit { height: auto; min-height: 0; }
    .ls-edit .ls-form { height: auto; overflow: visible; }
    .ls-edit { padding-top: calc(40vh + 10px); }
    .ls-edit .ls-preview { position: fixed; top: 0; left: 0; right: 0; z-index: 1035; height: 40vh; background: #f7f8fa; padding: 6px 8px 8px; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); border-bottom: 1px solid #d5d9e0; }
    .ls-edit .ls-preview .ls-cap { display: none; }
    .ls-edit .ls-preview .ls-fit { max-width: none; margin: 0; }
    .ls-edit .ls-zoom { display: flex; }
}
@media (max-width: 575px) {
    .ls-dfmt { width: 100%; }
    .ls-inrow { flex-wrap: wrap; }
    .ls-inrow .ls-input { flex: 1 1 100%; }
}
.ls-color { width: 38px; height: 32px; padding: 2px !important; border: 1px solid #aeb3bc; border-radius: 8px; background: #fff; cursor: pointer; }

.ls-zoom { display: none; position: absolute; right: 14px; bottom: 16px; gap: 4px; z-index: 2; }
.ls-zoom button { min-width: 36px; height: 34px; border: 1px solid #aeb3bc; border-radius: 8px; background: rgba(255, 255, 255, .95); color: #1c1f24; font-size: 18px; line-height: 1; padding: 0 8px; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }
.ls-zoom button[data-z="fit"] { font-size: 13px; }

.ls-sec { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--ls-muted); margin: 14px 0 8px; padding-top: 10px; border-top: 2px solid var(--ls-soft); }
#lsFields > .ls-sec:first-child { margin-top: 4px; border-top: 0; padding-top: 0; }
.ls-form .ls-row { flex-direction: row; gap: 10px; }
.ls-form .ls-row .ls-col { min-width: 0; }
.ls-form .ls-logosize { margin: 0 0 8px; }
.ls-form .ls-logorow .ls-btn { padding: 6px 10px; font-size: 13px; }

.ls-dfrow { margin-top: 6px; }
.ls-dfrow label { display: block; font-size: 12.5px; font-weight: 600; margin: 0 0 3px; }
.ls-dfrow .ls-dfmt { width: 100%; height: 36px; }
@media (min-width: 992px) {
    .ls-edit .ls-preview { position: relative; }
    .ls-edit .ls-zoom { display: flex; bottom: 14px; right: 14px; }
    .ls-edit .ls-fit { cursor: grab; }
}

.ls-aa { font-size: 17px; line-height: 1; min-width: 46px; color: #111; }
.ls-aa b { font-weight: 800; color: #111; }
.ls-aa i { font-style: italic; font-weight: 600; color: #d6336c; margin-left: 1px; }
.ls-aa:hover { border-color: #d6336c; }
.ls-aa.is-changed { border-color: #d6336c; background: #fff0f5; color: #111; }
.ls-aa[aria-expanded="true"] { background: #fff0f5; border-color: #d6336c; color: #111; }
.ls-aa[aria-expanded="true"] b, .ls-aa[aria-expanded="true"] i { color: inherit; }
.ls-aa[aria-expanded="true"] i { color: #d6336c; }
.ls-aa-demo { white-space: nowrap; } .ls-aa-demo b { color: #111; font-weight: 800; } .ls-aa-demo i { color: #d6336c; font-weight: 600; }

/* v6: compact grid rows, date row, mobile polish */
.ls-form .ls-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ls-form .ls-row3 { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.15fr) minmax(0, .9fr); margin-bottom: 4px; }
.ls-form .ls-col label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-dfld select { width: 100%; height: 38px; }
.ls-row3 input[type=date] { font-size: 13px; padding-left: 8px; padding-right: 4px; }
.ls-form .ls-blankchk { margin: 0 0 8px; }
@media (max-width: 575px) {
    .ls-form .ls-row.ls-lv { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
    .ls-form .ls-row3 { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); }
    .ls-form .ls-row3 .ls-col:nth-child(3) { grid-column: 1 / -1; }
    .ls-form .ls-input, .ls-form .ls-dfmt, .ls-sty select, .ls-sty input { font-size: 16px; }
    .ls-row3 input[type=date] { font-size: 16px; padding-left: 8px; padding-right: 4px; }
    .ls-form .ls-inrow { flex-wrap: nowrap; gap: 6px; }
    .ls-form .ls-inrow .ls-input { flex: 1 1 0; min-width: 0; }
    .ls-aa { min-width: 40px; min-height: 40px; padding: 0 6px; }
    .ls-form .ls-input { padding: 9px 10px; }
    .ls-form input, .ls-form select, .ls-form .ls-aa { scroll-margin-top: calc(40vh + 24px); scroll-margin-bottom: 110px; }
    .ls-edit .ls-form { padding: 12px 12px 6px; }
    /* Bottom bar on phones: buttons are as wide as their text (long labels wrap at ~120px). Back shows only if it fits on the same line. */
    .ls-bar { padding: 8px 0; }
    .ls-bar .ls-wrap { flex-wrap: wrap; justify-content: space-between; align-items: stretch; gap: 8px; }
    .ls-bar .ls-wrap > span:empty { display: none; }
    .ls-bar .ls-wrap > a.ls-btn { flex: none; padding: 8px 14px; font-size: 13px; line-height: 1.2; min-height: 46px; }
    .ls-bar.ls-noback .ls-wrap > a.ls-btn { display: none; }
    .ls-bar .ls-grp { width: auto; flex: 0 1 auto; flex-wrap: nowrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
    .ls-bar.ls-noback .ls-grp { flex: 1 1 auto; justify-content: space-between; margin-left: 0; }
    .ls-bar .ls-grp .ls-btn { flex: 0 1 auto; max-width: 120px; padding: 8px 12px; font-size: 13px; line-height: 1.2; min-height: 46px; text-align: center; }
}

/* two teachers: row layout */
.ls-tb-vis.ls-tb-top { justify-content: flex-start; }
.ls-tlay { margin: 0 0 6px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ls-tlay-h { font-size: 12.5px; font-weight: 700; margin: 0; }
.ls-tlay-opts { display: flex; gap: 6px; }
.ls-tlopt { position: relative; margin: 0; cursor: pointer; }
.ls-tlopt input { position: absolute; opacity: 0; pointer-events: none; }
.ls-tlopt span { display: flex; align-items: center; gap: 6px; border: 1px solid #aeb3bc; border-radius: 8px; padding: 5px 11px; font-size: 13px; font-weight: 700; background: #fff; line-height: 1.2; }
.ls-tlopt input:checked + span { border-color: var(--ls-blue); background: #f3f6fd; box-shadow: 0 0 0 1px var(--ls-blue); }
.ls-tlopt input:focus-visible + span { outline: 2px solid var(--ls-blue); outline-offset: 2px; }
.ls-ic { display: block; width: 18px; height: 14px; }
.ls-ic-col { background: linear-gradient(#6b7280, #6b7280) center 1px / 14px 5px no-repeat, linear-gradient(#6b7280, #6b7280) center 8px / 14px 5px no-repeat; }
.ls-ic-row { background: linear-gradient(#6b7280, #6b7280) 1px center / 7px 12px no-repeat, linear-gradient(#6b7280, #6b7280) 10px center / 7px 12px no-repeat; }
.ls-tlay [data-gapwrap], .ls-tlay [data-gapwrapc] { flex: 1 1 100%; }
.ls-tlay [data-gapwrap] .ls-space, .ls-tlay [data-gapwrapc] .ls-space { margin: 0; }
.ls-tb-row { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); width: max-content; max-width: 100%; margin: 0 auto; align-items: start; }
.ls-tb-row .ls-stack { min-width: 0; }
[data-wrapnot][hidden] { display: none; }

/* page header button: aligned with the title on desktop, full-width with proper spacing on phones */
.ls-head > .ls-btn { margin-top: 28px; flex: none; }
@media (max-width: 575px) {
    .ls-head { gap: 0; }
    .ls-head > .ls-btn { margin-top: 4px !important; margin-bottom: 16px; width: 100%; text-align: center; justify-content: center; }
    .ls-head .ls-lead { margin-bottom: 8px; }
    .ls-search { margin-bottom: 14px; }
    .ls-pills { gap: 8px; margin-bottom: 18px; }
    .ls-searchbar { flex-wrap: wrap; }
    .ls-searchbar > .ls-input { flex: 1 1 100%; }
    .ls-searchbar .ls-btn { flex: 1 1 0; text-align: center; }
}

/* text style bar: stays inside its own field (field width). Desktop: one row. Phones: font + size, then B / I / colour */
.ls-sty { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; margin-top: 6px; padding: 6px; background: #f3f5f8; border: 1px solid #e1e4ea; border-radius: 10px; }
.ls-sty[hidden] { display: none; }
.ls-sty-a, .ls-sty-b { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ls-sty-a { flex: 1 1 auto; }
.ls-sty-b { flex: none; }
.ls-sty-a select { flex: 1 1 0; min-width: 60px; width: 100%; padding: 4px 4px; font-size: 13px; text-overflow: ellipsis; }
.ls-step { flex: none; display: flex; align-items: stretch; border: 1px solid #aeb3bc; border-radius: 8px; background: #fff; overflow: hidden; }
.ls-step button { border: 0; background: #eef0f4; width: 26px; font-size: 17px; line-height: 1; font-weight: 700; color: var(--ls-ink); cursor: pointer; padding: 0; }
.ls-step button:hover { background: #dfe3ea; }
.ls-step input[type=number] { width: 32px; border: 0 !important; border-radius: 0 !important; text-align: center; padding: 4px 0 !important; -moz-appearance: textfield; appearance: textfield; }
.ls-step input::-webkit-outer-spin-button, .ls-step input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.ls-tg { flex: none; width: 30px; }
.ls-sty-b .ls-color { width: 32px; height: 32px; }
/* narrow field (e.g. the date columns): same two-row layout as phones */
.ls-form .ls-fld { container-type: inline-size; }
@container (max-width: 285px) {
    .ls-sty { flex-direction: column; align-items: stretch; }
    .ls-sty-a select { min-width: 0; }
    .ls-sty-b { width: 100%; }
    .ls-sty-b .ls-tg { flex: 1 1 0; width: auto; }
    .ls-sty-b .ls-color { flex: 1 1 0; width: auto; }
}
@media (max-width: 575px) {
    .ls-sty { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px; }
    .ls-sty-a select { font-size: 16px; min-height: 40px; }
    .ls-step button { width: 40px; font-size: 20px; }
    .ls-step input[type=number] { width: 44px; font-size: 16px; }
    .ls-sty-b { width: 100%; gap: 8px; }
    .ls-sty-b .ls-tg { flex: 1 1 0; width: auto; height: 40px; }
    .ls-sty-b .ls-color { flex: 1 1 0; width: auto; height: 40px; }
}

.ls-styrow { margin: -4px 0 8px; }
.ls-styrow[hidden] { display: none; }
.ls-styrow .ls-sty { margin-top: 0; }

/* University logo picker (searchable list): a compact box in the same row as Upload logo / Remove, wrapping when narrow */
.ls-logorow { align-items: stretch; }
.ls-combo { position: relative; flex: none; }
.ls-form .ls-logorow .ls-combo-btn { width: auto; display: inline-flex; align-items: center; gap: 8px; height: 100%; padding: 6px 10px; font-size: 13px; font-weight: 700; line-height: 1.2; text-align: left; cursor: pointer; white-space: nowrap; }
.ls-combo-btn i { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid #6b7280; flex: none; }
.ls-combo-panel { position: absolute; z-index: 30; left: 0; top: calc(100% + 4px); width: 320px; max-width: calc(100vw - 48px); background: #fff; border: 1px solid #d6dae1; border-radius: 12px; box-shadow: 0 10px 30px rgba(15, 23, 42, .18); padding: 8px; }
.ls-combo-panel > .ls-input { margin-bottom: 6px; }
.ls-combo-list { max-height: 230px; overflow-y: auto; }
.ls-combo-opt { padding: 8px 10px; border-radius: 8px; font-size: 14px; line-height: 1.3; cursor: pointer; }
.ls-combo-opt:hover, .ls-combo-opt.is-on { background: #eef2ff; }
.ls-combo-opt.is-on { font-weight: 600; }
.ls-combo-none { padding: 10px; color: #6b7280; font-size: 14px; }
.ls-combo-count { font-size: 11px; color: #6b7280; padding: 6px 10px 0; }

/* Logo row: wider logo column so the box, Upload logo and Remove sit on one line; stacked on phones where they wrap */
.ls-form .ls-row.ls-row-logo { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.ls-form .ls-row-logo .ls-logorow { gap: 6px; }
@media (max-width: 575px) {
    .ls-form .ls-row.ls-row-logo { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

/* Staff All templates: user filter beside the search box (overlay list, same look as the university picker) */
.ls-searchbar { align-items: stretch; }
.ls-searchbar > .ls-input { flex: 1 1 auto; min-width: 0; }
.ls-ufilter .ls-combo-btn { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; height: 100%; padding: 9px 12px; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.2; white-space: nowrap; background: #fff; border: 1px solid #aeb3bc; border-radius: 8px; color: var(--ls-ink); cursor: pointer; }
.ls-ufilter .ls-combo-btn:focus { outline: 2px solid var(--ls-blue); outline-offset: 1px; }
.ls-ufilter .ls-combo-panel { left: auto; right: 0; width: 300px; }
.ls-combo-opt span { color: #6b7280; }
@media (max-width: 575px) {
    .ls-searchbar > .ls-ufilter { flex: 1 1 0; min-width: 0; }
    .ls-ufilter .ls-combo-btn { width: 100%; }
    .ls-ufilter .ls-combo-panel { left: 0; right: auto; width: calc(100vw - 32px); max-width: 340px; }
    .ls-searchbar > .ls-btn { flex: 0 0 auto; }
}
