/* ============================================================================
   RTT BACK OFFICE — layout + components (2026-10-29).
   NO literal colors, font families, radii or shadows here: everything comes from
   the theme file (wwwroot/css/theme-reysti.css). Spacing/sizes are layout, not theme.
   ============================================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-hover); }
code { font-family: var(--font-mono); font-size: .85em; color: var(--c-text-2); }
:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.bo-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bo-muted { color: var(--c-text-3); }
.bo-small { font-size: 12.5px; display: block; }
.bo-ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------------- shell ---------------- */
.bo-shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.bo-side {
    position: sticky; top: 0; height: 100vh;
    display: flex; flex-direction: column; gap: 28px;
    padding: 24px 16px; background: var(--c-bg-2); border-right: 1px solid var(--c-line);
}
.bo-brand { display: flex; align-items: center; gap: 12px; color: var(--c-text); padding: 0 8px; }
/* 2026-11-13 (Marc: show the app icon): the brand "r" icon (images/favicon.svg = BRAND/out/reysti-icon.svg) instead of a plain
   gradient square. was: background: var(--gradient-brand); */
.bo-brand-mark { width: 34px; height: 34px; border-radius: 22%; background: url('images/favicon.svg') center / cover no-repeat, var(--gradient-brand); flex: none; box-shadow: var(--sh-sm); }
.bo-brand-mark-lg { display: block; width: 72px; height: 72px; border-radius: 22%; } /* display:block: an inline span ignored the size */ /* 2026-11-13 was: 64px, border-radius: var(--r-lg) */
.bo-brand-txt { font-family: var(--font-display); font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.bo-brand-sub { display: block; font-family: var(--font-body); font-weight: 400; font-size: 12.5px; color: var(--c-text-3); letter-spacing: 0; }
.bo-nav { display: flex; flex-direction: column; gap: 4px; }
.bo-nav-a {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r-md);
    color: var(--c-text-2); font-weight: 500; transition: background .15s, color .15s;
}
.bo-nav-a svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; flex: none; }
.bo-nav-a:hover { background: var(--c-card-hover); color: var(--c-text); }
.bo-nav-a.active { background: var(--c-primary-soft); color: var(--c-primary); }
.bo-side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 12px; }
.bo-acc { display: flex; align-items: center; gap: 10px; padding: 0 8px; min-width: 0; }
.bo-acc-dot { width: 30px; height: 30px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--c-elev); color: var(--c-primary); font-weight: 700; font-size: 13px; flex: none; }
.bo-acc-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.bo-lang-dd { width: 100%; }
.bo-lang-inline .bo-lang-dd { width: 150px; }
.bo-logout { justify-content: flex-start; }
.bo-main { min-width: 0; background: var(--c-bg); background-image: var(--gradient-glow); background-attachment: fixed; }
.bo-bare { min-height: 100vh; }

@media (max-width: 960px) {
    .bo-shell { grid-template-columns: 1fr; }
    .bo-side {
        position: sticky; top: 0; z-index: 50; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center;
        gap: 8px 16px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--c-line);
    }
    .bo-brand-sub { display: none; }
    .bo-nav { flex-direction: row; flex: 1 1 auto; overflow-x: auto; }
    .bo-nav-a { padding: 8px 10px; white-space: nowrap; }
    .bo-side-foot { margin-top: 0; flex-direction: row; align-items: center; }
    .bo-acc { display: none; }
    .bo-lang-dd { width: 130px; }
}

/* ---------------- page scaffolding ---------------- */
.bo-page { max-width: 1240px; margin: 0 auto; padding: 40px 40px 80px; }
.bo-page-narrow { max-width: 640px; }
.bo-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.bo-page-head-bar { position: sticky; top: 0; z-index: 20; padding: 16px 0; margin-bottom: 8px; background: var(--c-bg); border-bottom: 1px solid var(--c-line); }
.bo-page-acts { display: flex; align-items: center; gap: 12px; }
.bo-h1:focus { outline: none; } /* 2026-11-13: Blazor FocusOnNavigate focuses the heading for screen readers; no visible box on a heading */
.bo-showpw { display: inline-flex; align-items: center; gap: 8px; margin: -4px 0 14px; color: var(--c-text-2); font-size: 14px; cursor: pointer; }
.bo-h1 { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; letter-spacing: -.02em; margin: 0 0 6px; }
.bo-h2 { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.01em; margin: 0 0 6px; }
.bo-h3 { font-weight: 600; font-size: 16px; margin: 0 0 4px; }
.bo-lead { color: var(--c-text-2); margin: 0; max-width: 68ch; }
.bo-sec { margin-top: 44px; }
.bo-sec-lead { color: var(--c-text-2); margin: 0 0 18px; max-width: 70ch; }
.bo-card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r-xl); padding: 24px; }
.bo-loading { display: flex; align-items: center; gap: 14px; padding: 60px 0; color: var(--c-text-2); justify-content: center; }
.bo-empty { border: 1px dashed var(--c-line-2); border-radius: var(--r-xl); padding: 32px; text-align: center; color: var(--c-text-2); }
.bo-empty-ttl { color: var(--c-text); font-weight: 600; font-size: 17px; margin: 0 0 4px; }
.bo-note { background: var(--c-primary-soft); color: var(--c-text); border-radius: var(--r-md); padding: 12px 14px; margin: 12px 0; }
.bo-warn { background: var(--c-warn-soft); color: var(--c-text); border-left: 3px solid var(--c-warn); border-radius: var(--r-sm); padding: 10px 14px; margin: 12px 0; }
.bo-btn-link { display: inline-flex; align-items: center; font-weight: 600; padding: 8px 4px; }
.bo-btn-wide { width: 100%; }
.bo-btn-danger-flat.k-button { color: var(--c-error); }
.bo-details > summary { cursor: pointer; color: var(--c-text-2); font-weight: 500; padding: 8px 0; }

/* ---------------- forms (validation rule) ---------------- */
.bo-form { display: flex; flex-direction: column; gap: 4px; }
.bo-fld { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; min-width: 0; }
.bo-fld-lbl { font-size: 13.5px; font-weight: 500; color: var(--c-text-2); }
.bo-fld-hint { font-size: 12.5px; color: var(--c-text-3); }
.bo-fld-msg { font-size: 13px; color: var(--c-error); font-weight: 500; }
.bo-fld-err .k-input, .bo-fld-err .k-picker, .bo-fld-err .k-textarea, .bo-fld-err .bo-file-btn, .bo-fld-err .k-combobox {
    border-color: var(--c-error-line) !important; box-shadow: 0 0 0 3px var(--c-error-soft);
}
[aria-invalid="true"] { outline: none; }
.bo-msgbox { display: none; }
.bo-msgbox-on {
    display: flex; align-items: flex-start; gap: 10px; margin: 0 0 16px; padding: 12px 14px;
    background: var(--c-error-soft); border: 1px solid var(--c-error-line); border-radius: var(--r-md); color: var(--c-text);
}
.bo-msgbox svg { width: 20px; height: 20px; flex: none; fill: none; stroke: var(--c-error); stroke-width: 1.8; stroke-linecap: round; }

.bo-file-btn {
    position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    padding: 8px 14px; border: 1px solid var(--c-line-2); border-radius: var(--r-md); color: var(--c-text); font-weight: 500; font-size: 14px;
    background: var(--c-bg-3); transition: border-color .15s, background .15s;
}
.bo-file-btn:hover { border-color: var(--c-primary); }
.bo-file-btn:focus-within { box-shadow: var(--sh-glow); }
.bo-file-btn input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.bo-file-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.bo-file-btn.is-busy { opacity: .6; pointer-events: none; }

/* ---------------- Telerik touch-ups (tokens only) ---------------- */
.k-button { font-family: var(--font-body); font-weight: 600; border-radius: var(--r-md); }
.k-button-solid-primary { color: var(--c-on-primary); }
.k-input, .k-picker { background: var(--c-input); border-color: var(--c-line-2); color: var(--c-text); border-radius: var(--r-md); }
.k-input:focus-within, .k-picker:focus-within { border-color: var(--c-primary); box-shadow: var(--sh-glow); }
.k-animation-container .k-popup, .k-list { background: var(--c-elev); color: var(--c-text); }
/* review 2026-10-29: UcSeg wrapper (carries the optional id; TelerikButtonGroup has no Id parameter) */
.bo-seg-host { display: contents; }
.pt-popup-host { display: contents; }   /* review 2026-10-29 (round 2): carries the synchronous window.open of the provider link */
.bo-seg.k-button-group .k-button { font-weight: 500; }
.bo-seg.k-button-group .k-button.k-selected { background: var(--c-primary-soft); color: var(--c-primary); border-color: var(--c-primary); }
.bo-notif .k-notification { border-radius: var(--r-md); box-shadow: var(--sh-md); font-family: var(--font-body); }
.k-grid { background: var(--c-bg-2); color: var(--c-text); border-color: var(--c-line); border-radius: var(--r-lg); }
.k-grid-header, .k-grid th { background: var(--c-bg-3); color: var(--c-text-2); }

/* ---------------- modal ---------------- */
.bo-modal-back { position: fixed; inset: 0; z-index: 900; background: var(--c-overlay); display: grid; place-items: center; padding: 20px; }
.bo-modal {
    width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto;
    background: var(--c-elev); border: 1px solid var(--c-line-2); border-radius: var(--r-xl); box-shadow: var(--sh-lg); padding: 24px;
}
.bo-modal-ttl { font-family: var(--font-display); font-size: 21px; margin: 0 0 12px; }
.bo-modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 18px; }

/* ---------------- login ---------------- */
.bo-login { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 100vh; }
.bo-login-art { background: var(--c-bg-2); background-image: var(--gradient-glow); display: grid; place-items: center; padding: 48px; border-right: 1px solid var(--c-line); }
.bo-login-art-inner { max-width: 420px; }
.bo-login-art-txt { font-family: var(--font-display); font-weight: 700; font-size: clamp(26px, 3vw, 38px); line-height: 1.2; letter-spacing: -.02em; margin-top: 24px; }
.bo-login-panel { padding: 48px clamp(24px, 6vw, 80px); display: flex; flex-direction: column; justify-content: center; max-width: 560px; width: 100%; }
.bo-login-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 48px; gap: 16px; }
.bo-login-panel .bo-lead { margin-bottom: 28px; }
.bo-login-help { color: var(--c-text-3); font-size: 13px; margin-top: 24px; }
@media (max-width: 860px) {
    .bo-login { grid-template-columns: 1fr; }
    .bo-login-art { display: none; }
    .bo-login-panel { margin: 0 auto; }
}

/* ---------------- designs gallery ---------------- */
.dz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 28px; }
.dz-card { display: flex; flex-direction: column; background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r-xl); overflow: hidden; transition: border-color .15s, transform .2s; }
.dz-card:hover { border-color: var(--c-line-2); transform: translateY(-2px); }
.dz-thumb { display: block; padding: 24px 40px 20px; background: var(--c-stage); }
.dz-thumb-sm { padding: 18px 26px 16px; border-radius: var(--r-lg); }
.dz-thumb-scale { max-width: 220px; margin: 0 auto; }
.dz-card-body { padding: 16px 18px 14px; }
.dz-card-ttl { font-weight: 600; font-size: 16px; margin: 0 0 2px; }
.dz-card-meta { color: var(--c-text-3); font-size: 13px; margin: 0 0 10px; }
.dz-card-acts { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; margin: 0 -8px; }
.dz-preset-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 220px); gap: 20px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x proximity; }
.dz-preset { scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px; }
.dz-preset .dz-card-ttl { margin-top: 8px; }
.dz-preset .k-button { align-self: flex-start; }
.dz-arch { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; gap: 4px; }
.dz-arch li { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--c-line); }
.dz-arch-name { flex: 1; }

/* ---------------- studio ---------------- */
.st { padding: 0 24px 40px; }
.st-bar {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 12px 0; margin-bottom: 16px; background: var(--c-bg); border-bottom: 1px solid var(--c-line);
}
.st-back { display: inline-flex; align-items: center; gap: 4px; color: var(--c-text-2); font-weight: 500; }
.st-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.st-name { flex: 1 1 220px; max-width: 420px; }
.st-name .bo-fld { margin: 0; }
.st-name-in.k-input { font-family: var(--font-display); font-weight: 700; font-size: 18px; background: transparent; border-color: transparent; }
.st-name-in.k-input:hover { border-color: var(--c-line-2); }
.st-bar-acts { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.st-state { font-size: 13px; color: var(--c-text-3); padding: 0 6px; }
.st-state.is-dirty { color: var(--c-warn); }
.st-panel-switch { display: none; margin-bottom: 12px; }

.st-grid { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr) minmax(320px, 380px); gap: 20px; align-items: start; }
.st-zone { min-width: 0; }
.st-zone-ai, .st-zone-edit {
    position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow: auto;
    background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r-xl);
}
.st-zone-edit { padding: 6px 16px 16px; }
.st-pv-tools { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.st-pv-tools-r { display: flex; gap: 8px; align-items: center; }
.st-pv-lang { width: 140px; }
.st-pv-stage {
    position: relative; display: grid; place-items: center; padding: 36px 24px;
    background: var(--c-stage); border: 1px solid var(--c-line); border-radius: var(--r-xl); transition: opacity .3s;
}
.st-pv-stage.is-port .st-pv-fade { width: min(100%, 440px, calc((100vh - 260px) * 0.5625)); }
.st-pv-stage.is-land .st-pv-fade { width: min(100%, 860px); }
.st-pv-stage.is-dimmed .st-pv-fade { opacity: .45; filter: saturate(.6); }
.st-pv-fade { transition: opacity .35s, filter .35s; animation: st-xfade .6s ease-out; }
@keyframes st-xfade { from { opacity: .25; filter: blur(3px); } to { opacity: 1; filter: none; } }
.st-pv-busy {
    position: absolute; top: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; align-items: center;
    background: var(--c-elev); border: 1px solid var(--c-line-2); border-radius: var(--r-pill); padding: 8px 16px; box-shadow: var(--sh-md);
}
.st-pv-note { text-align: center; color: var(--c-text-3); font-size: 12.5px; margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .st-pv-fade { animation: none; } }

@media (max-width: 1279px) {
    .st-grid { grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); }
    .st-panel-switch { display: block; }
    .st-grid[data-panel="AI"] .st-zone-edit, .st-grid[data-panel="EDIT"] .st-zone-ai { display: none; }
    .st-zone-ai, .st-zone-edit { grid-column: 2; grid-row: 1; }
    .st-zone-preview { grid-column: 1; grid-row: 1; }
}
@media (max-width: 820px) {
    .st { padding: 0 16px 40px; }
    .st-grid { grid-template-columns: 1fr; }
    .st-zone-ai, .st-zone-edit, .st-zone-preview { grid-column: 1; grid-row: auto; position: static; max-height: none; }
    .st-hide-sm { display: none; }
}

/* ---------------- AI designer ---------------- */
.ai { display: flex; flex-direction: column; min-height: 100%; }
.ai-head { padding: 18px 18px 8px; border-bottom: 1px solid var(--c-line); }
.ai-ttl { font-family: var(--font-display); font-size: 18px; margin: 0; display: flex; align-items: center; gap: 10px; }
.ai-spark { width: 22px; height: 22px; border-radius: var(--r-sm); background: var(--gradient-brand); }
.ai-sub { color: var(--c-text-3); font-size: 13px; margin: 4px 0 6px; }
.ai-imgleft { color: var(--c-text-3); font-size: 12.5px; margin: 0 0 6px; }
.ai-log { flex: 1; padding: 16px 14px; display: flex; flex-direction: column; gap: 10px; min-height: 220px; overflow: auto; }
.ai-msg { max-width: 92%; padding: 10px 13px; border-radius: var(--r-lg); font-size: 14px; }
.ai-msg p { margin: 0; }
.ai-msg-ai { align-self: flex-start; background: var(--c-elev); border: 1px solid var(--c-line); }
.ai-msg-me { align-self: flex-end; background: var(--c-primary-soft); }
.ai-msg-pending { opacity: .7; }
.ai-msg-err { align-self: flex-start; background: var(--c-error-soft); border: 1px solid var(--c-error-line); }
.ai-msg-img { display: block; border-radius: var(--r-sm); margin-bottom: 6px; object-fit: cover; }
.ai-thinking { display: flex; align-items: center; gap: 10px; color: var(--c-text-2); }
.ai-dots { display: inline-flex; gap: 4px; }
.ai-dots i { width: 6px; height: 6px; border-radius: var(--r-pill); background: var(--c-primary); animation: ai-dot 1.2s infinite ease-in-out; }
.ai-dots i:nth-child(2) { animation-delay: .15s; }
.ai-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.ai-ex { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ai-ex-chip {
    font: inherit; font-size: 13px; color: var(--c-text); background: var(--c-bg-3); border: 1px solid var(--c-line-2);
    border-radius: var(--r-pill); padding: 6px 12px; cursor: pointer; text-align: left;
}
.ai-ex-chip:hover { border-color: var(--c-primary); }
.ai-compose { padding: 12px 14px 14px; border-top: 1px solid var(--c-line); position: sticky; bottom: 0; background: var(--c-bg-2); }
.ai-input-fld { margin-bottom: 10px; }
.ai-listening.k-textarea { border-color: var(--c-coral); box-shadow: 0 0 0 3px var(--c-error-soft); }
.ai-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ai-send { margin-left: auto; }
.ai-mic {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px;
    padding: 9px 16px; border-radius: var(--r-pill); border: 1px solid var(--c-line-2); background: var(--c-bg-3); color: var(--c-text);
}
.ai-mic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.ai-mic:hover { border-color: var(--c-primary); }
.ai-mic.is-on { background: var(--c-coral); border-color: var(--c-coral); color: var(--c-on-primary); animation: ai-pulse 1.4s infinite; }
@keyframes ai-pulse { 0%, 100% { box-shadow: 0 0 0 0 var(--c-error-soft); } 50% { box-shadow: 0 0 0 8px var(--c-error-soft); } }
.ai-hint { font-size: 12.5px; color: var(--c-text-3); margin: 8px 0 0; }
.ai-att { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; padding: 8px; background: var(--c-bg-3); border-radius: var(--r-md); }
.ai-att img { border-radius: var(--r-sm); object-fit: cover; }
.ai-att-file { font-size: 13px; color: var(--c-text-2); }
.ai-att-mode { flex: 1; min-width: 200px; }

/* ---------------- token editor ---------------- */
.te-grp { border-bottom: 1px solid var(--c-line); padding: 6px 0; }
.te-grp:last-child { border-bottom: 0; }
.te-grp > summary { cursor: pointer; list-style: none; font-weight: 600; padding: 12px 2px; display: flex; justify-content: space-between; }
.te-grp > summary::after { content: "+"; color: var(--c-text-3); }
.te-grp[open] > summary::after { content: "–"; }
.te-colors { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; margin-bottom: 12px; }
.te-color { display: flex; align-items: center; gap: 8px; min-width: 0; }
.te-color-lbl { display: flex; flex-direction: column; font-size: 13px; line-height: 1.25; min-width: 0; }
.te-color-lbl code { font-size: 11.5px; color: var(--c-text-3); }
.te-contrast { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 4px; font-size: 12.5px; }
.te-contrast li { display: flex; justify-content: space-between; padding: 4px 8px; border-radius: var(--r-sm); }
.te-ok { background: var(--c-success-soft); }
.te-low { background: var(--c-warn-soft); }
.te-note { font-size: 12.5px; color: var(--c-text-3); margin: 4px 0 12px; }
.te-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.te-row-stack { flex-direction: column; align-items: stretch; }
.te-lbl { font-size: 13.5px; color: var(--c-text-2); display: flex; justify-content: space-between; gap: 8px; }
.te-lbl b { color: var(--c-text); font-weight: 600; }
.te-slider { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; }
.te-slider .k-slider { width: 100%; }
.te-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--c-text-2); margin-top: 6px; cursor: pointer; }
.te-font-sample { font-family: var(--te-font-sample); font-size: 16px; }
.te-img-row { display: flex; align-items: center; gap: 12px; }
.te-img-thumb { width: 96px; height: 64px; border-radius: var(--r-sm); overflow: hidden; background: var(--c-bg-3); flex: none; border: 1px solid var(--c-line); }
.te-img-thumb img { width: 100%; height: 100%; object-fit: cover; }
.te-img-empty { border-style: dashed; }
.te-img-acts { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.te-langs { margin-bottom: 14px; flex-wrap: wrap; }

/* ---------------- assignments ---------------- */
.as-order { margin-bottom: 24px; }
.as-sec { margin-bottom: 24px; }
.as-dd { max-width: 420px; }
.as-rule { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.as-rule-del { margin-bottom: 16px; }
.bo-table-wrap { overflow-x: auto; }
.bo-table { width: 100%; border-collapse: collapse; }
.bo-table th { text-align: left; font-size: 12.5px; color: var(--c-text-3); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--c-line); }
.bo-table td { padding: 10px; border-bottom: 1px solid var(--c-line); vertical-align: top; }
.bo-table td .bo-fld { margin: 0; }
.bo-table tr.is-dirty td { background: var(--c-primary-soft); }
.as-ktable td { min-width: 150px; }
.as-res { display: block; font-weight: 600; }
.as-src { display: inline-block; margin-top: 4px; font-size: 12px; padding: 2px 8px; border-radius: var(--r-pill); background: var(--c-bg-3); color: var(--c-text-2); }
.as-src-device { background: var(--c-primary-soft); color: var(--c-primary); }
.as-src-none { color: var(--c-text-3); }
@media (max-width: 760px) {
    .as-rule { grid-template-columns: 1fr; gap: 0; }
    .as-ktable thead { display: none; }
    .as-ktable, .as-ktable tbody, .as-ktable tr, .as-ktable td { display: block; width: 100%; }
    .as-ktable tr { border: 1px solid var(--c-line); border-radius: var(--r-lg); margin-bottom: 12px; padding: 6px; }
    .as-ktable td { border: 0; }
    .as-ktable td::before { content: attr(data-label); display: block; font-size: 12px; color: var(--c-text-3); }
}

/* ---------------- terminals ---------------- */
.pt-edit { margin-bottom: 28px; }
.pt-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; margin-top: 12px; }
.pt-form-acts { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.pt-test { margin: 4px 0 16px; }
.pt-step { border-top: 1px solid var(--c-line); margin-top: 22px; padding-top: 18px; }
.pt-inline { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.pt-inline .bo-fld { flex: 1 1 220px; max-width: 320px; }
.pt-inline .k-button { margin-bottom: 16px; }
.pt-code { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; }
.pt-code b { font-family: var(--font-mono); font-size: 30px; letter-spacing: .12em; color: var(--c-primary); }
.pt-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 20px; }
.pt-card-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.pt-card-ttl { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.pt-badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill); background: var(--c-bg-3); color: var(--c-text-2); margin-right: 6px; }
.pt-badge-sumup, .pt-badge-square { background: var(--c-primary-soft); color: var(--c-primary); }
.pt-badge-castles { background: var(--c-warn-soft); color: var(--c-warn); }
.pt-badge-legacy { background: var(--c-bg-3); color: var(--c-text-2); border: 1px dashed var(--c-line-2); }
.pt-badge-test { background: var(--c-error-soft); color: var(--c-error); }
.pt-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.pt-dot { width: 9px; height: 9px; border-radius: var(--r-pill); background: var(--c-text-3); }
.pt-st-online .pt-dot { background: var(--c-success); }
.pt-st-busy .pt-dot { background: var(--c-warn); }
.pt-st-offline .pt-dot, .pt-st-not_init .pt-dot { background: var(--c-error); }
.pt-facts { margin: 16px 0; display: grid; gap: 8px; }
.pt-facts > div { display: grid; grid-template-columns: 130px 1fr; gap: 8px; font-size: 13.5px; }
.pt-facts dt { color: var(--c-text-3); }
.pt-facts dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.pt-kchip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 10px; border-radius: var(--r-pill); background: var(--c-bg-3); font-size: 13px; }
.pt-kchip-x { border: 0; background: transparent; color: var(--c-text-3); cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px; border-radius: var(--r-pill); }
.pt-kchip-x:hover { color: var(--c-error); background: var(--c-error-soft); }
.pt-assign { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.pt-assign .bo-fld { flex: 1 1 200px; margin-bottom: 8px; }
.pt-card-acts { display: flex; flex-wrap: wrap; gap: 4px; border-top: 1px solid var(--c-line); padding-top: 10px; margin: 6px -8px 0; }
.pt-test-msg { font-size: 13px; color: var(--c-text-2); margin: 8px 0 0; }
.pt-prov-fixed { margin: 0 0 8px; }

/* ---------------- menu import ---------------- */
.mi-step { margin-bottom: 24px; }
.mi-pick { display: flex; gap: 10px; flex-wrap: wrap; }
.mi-photos { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.mi-photos li { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 12px; background: var(--c-bg-3); border-radius: var(--r-pill); font-size: 13px; }
.mi-grid .mi-row-low td { background: var(--c-warn-soft); }
/* review 2026-10-29 (round 2): faulty row (form-validation rule): red edge + message in the cell */
.mi-grid tr.mi-row-err td { background: var(--c-error-soft); box-shadow: inset 0 1px 0 var(--c-error), inset 0 -1px 0 var(--c-error); }
.mi-grid tr.mi-row-err td:first-child { box-shadow: inset 3px 0 0 var(--c-error), inset 0 1px 0 var(--c-error), inset 0 -1px 0 var(--c-error); }
.mi-grid .mi-row-off td { opacity: .45; }
.mi-conf { font-variant-numeric: tabular-nums; }
.mi-conf.is-low { color: var(--c-warn); font-weight: 600; }
.mi-pic { border-radius: var(--r-sm); object-fit: cover; vertical-align: middle; margin-right: 6px; }
.mi-opts { margin-top: 16px; }
.mi-opts ul { padding-left: 18px; color: var(--c-text-2); }
.mi-ba { display: flex; gap: 14px; flex-wrap: wrap; margin: 12px 0; }
.mi-ba figure { margin: 0; padding: 6px; border: 2px solid transparent; border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 6px; align-items: center; }
.mi-ba figure.is-chosen { border-color: var(--c-primary); }
.mi-ba img { width: 200px; height: 200px; object-fit: cover; border-radius: var(--r-md); }

@media (max-width: 760px) {
    .bo-page { padding: 24px 16px 64px; }
    .te-colors { grid-template-columns: 1fr; }
    .pt-list { grid-template-columns: 1fr; }
}

/* 2026-10-29 kiosk languages (UcTokenEditor, token Langs): checked rows in kiosk order, unchecked below */
.te-langs-venue { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--c-text-2); }
.te-langlist { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.te-langrow { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 10px; background: var(--c-card); } /* was: var(--c-surface-2, transparent) — review 2026-10-29: token does not exist in theme-reysti.css */
.te-langrow .te-check { flex: 1 1 auto; margin-top: 0; }
.te-langrow .te-check img { border-radius: 50%; object-fit: cover; }
.te-langrow.is-off { opacity: .55; }
.te-langpos { min-width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; background: var(--c-primary, currentColor); color: var(--c-on-primary, inherit); }

/* =================================================================================================================
   V4 KD 2026-11-12 (stream KD): design studio additions (reset to preset, logo colours, custom font, tablet frame,
   import) and the scheduled-designs editor of PgAssign (UcDesignSchedule weekly timeline). Theme tokens only.
   ================================================================================================================= */
.st-pv-stage.is-port.is-tab .st-pv-fade { width: min(100%, 560px, calc((100vh - 260px) * 0.75)); }
.st-import { min-height: 0; padding: 6px 12px; }

.te-inline { display: flex; align-items: center; gap: 6px; }
.te-inline > .k-dropdownlist, .te-inline > .k-picker { flex: 1 1 auto; min-width: 0; }
.te-reset { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; margin-left: 4px; padding: 0; vertical-align: middle;
    border: 1px solid var(--c-line); border-radius: var(--r-pill); background: transparent; color: var(--c-text-2); cursor: pointer; }
.te-reset:hover { color: var(--c-primary); border-color: var(--c-primary); }
.te-reset:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.te-reset svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.te-logo-colors { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.te-swatch { width: 22px; height: 22px; border-radius: var(--r-pill); background: var(--te-swatch); box-shadow: inset 0 0 0 1px var(--c-line-2); }

/* ---- scheduled designs (UcDesignSchedule) ---- */
.kds-tl { display: flex; flex-direction: column; gap: 4px; margin: 12px 0 8px; overflow-x: auto; }
.kds-tl-head, .kds-tl-row { display: grid; grid-template-columns: 64px minmax(320px, 1fr); align-items: center; gap: 8px; }
.kds-tl-day { font-size: 12.5px; color: var(--c-text-2); white-space: nowrap; }
.kds-tl-row.is-today .kds-tl-day { color: var(--c-primary); font-weight: 700; }
.kds-tl-scale { position: relative; height: 18px; font-size: 11px; color: var(--c-text-3); }
.kds-tl-scale span { position: absolute; top: 0; transform: translateX(-2px); }
.kds-tl-track { position: relative; height: 34px; border-radius: var(--r-sm); background: var(--c-bg-3);
    background-image: linear-gradient(90deg, var(--c-line) 1px, transparent 1px); background-size: 25% 100%; }
.kds-tl-bar { position: absolute; height: 6px; border-radius: var(--r-pill); min-width: 3px; }
.kds-tl-bar.is-dates { height: 6px; box-shadow: 0 0 0 1px var(--c-text-3); }
.kds-tl-now { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--c-error); }
.kds-c0 { background: var(--c-primary); } .kds-c1 { background: var(--c-amber); } .kds-c2 { background: var(--c-coral); } .kds-c3 { background: var(--c-magenta); }
.kds-c4 { background: var(--c-violet); } .kds-c5 { background: var(--c-success); } .kds-c6 { background: var(--c-info); } .kds-c7 { background: var(--c-warn); }
.kds-now { font-size: 13px; color: var(--c-text-2); margin: 4px 0 12px; }
.kds-rule { border: 1px solid var(--c-line); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 12px; background: var(--c-card); }
.kds-rule.is-off { opacity: .6; }
.kds-rule-top { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.kds-rule-top .kds-name { flex: 1 1 220px; }
.kds-chip { flex: none; width: 14px; height: 14px; border-radius: var(--r-pill); margin-bottom: 26px; }
.kds-rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; }
.kds-days { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; grid-column: 1 / -1; margin-bottom: 8px; }
.kds-day { min-width: 44px; height: 36px; padding: 0 8px; border: 1px solid var(--c-line); border-radius: var(--r-pill); background: transparent; color: var(--c-text-2); font: inherit; font-size: 13px; cursor: pointer; }
.kds-day.is-on { background: var(--c-primary-soft); border-color: var(--c-primary); color: var(--c-text); }
.kds-day:focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }
.kds-quick { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; grid-column: 1 / -1; }
.kds-add { display: flex; gap: 8px; flex-wrap: wrap; }
.kds-src-now { background: var(--c-primary-soft); color: var(--c-primary); margin-left: 4px; }
@media (max-width: 640px) {
    .kds-tl-head, .kds-tl-row { grid-template-columns: 48px minmax(260px, 1fr); }
}
