/* Stimmt designs dashboard. Values follow "Design Dashboard.dc.html" (screens 3a–3k). */

@font-face { font-family: 'Alliance No.2'; font-weight: 300; font-style: normal; font-display: swap; src: url('../fonts/alliance/AllianceNo2-Light.otf') format('opentype'); }
@font-face { font-family: 'Alliance No.2'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/alliance/AllianceNo2-Regular.otf') format('opentype'); }
@font-face { font-family: 'Alliance No.2'; font-weight: 500; font-style: normal; font-display: swap; src: url('../fonts/alliance/AllianceNo2-Medium.otf') format('opentype'); }

:root {
    --black: #000;
    --white: #fff;
    --red: #FF1C3A;
    --red-hover: #E5102C;
    --red-ink: #800E1D;
    --red-tint: rgba(255, 28, 58, .1);
    --red-wash: rgba(255, 28, 58, .06);
    --grey-text: #434343;
    --ground: #f4f4f4;
    --line: #e6e6e6;
    --rule: #f0f0f0;
    --media: #e6e6e6;
    --ease: cubic-bezier(.22, .61, .36, 1);
    --font: 'Alliance No.2', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--black); font-family: var(--font); font-size: 13px; font-weight: 400; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
img, svg, video { display: block; max-width: 100%; }
::selection { background: var(--red); color: var(--white); }
[x-cloak] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }

/* ---- Buttons: the design system's Button at size sm (30px) ---------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 30px; min-height: 30px; padding: 6px 12px; font-size: 13px; font-weight: 500; letter-spacing: -.01em; line-height: 1; border-radius: 4px; border: 1px solid transparent; background: transparent; color: var(--black); cursor: pointer; white-space: nowrap; user-select: none; text-decoration: none; transition: transform 140ms var(--ease), background 260ms var(--ease), border-color 260ms var(--ease), opacity 260ms var(--ease); }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--red); }
.btn-accent { background: var(--red); border-color: var(--red); color: var(--white); }
.btn-accent:hover:not(:disabled) { background: var(--red-hover); border-color: var(--red-hover); }
.btn-secondary { border-color: rgba(0, 0, 0, .26); }
.btn-secondary:hover:not(:disabled) { border-color: var(--black); background: rgba(20, 20, 20, .04); }
.btn-ghost:hover:not(:disabled) { background: rgba(20, 20, 20, .05); }
.btn-lg { height: 34px; min-height: 34px; padding: 8px 12px; width: 100%; }
.btn[wire\:loading], .is-busy { opacity: .6; pointer-events: none; }

/* ---- App shell: black sidebar + grey ground -------------------------------------- */
.app { display: flex; min-height: 100vh; }
.sb { position: sticky; top: 0; height: 100vh; width: 208px; flex: none; background: var(--black); color: var(--white); display: flex; flex-direction: column; gap: 2px; padding: 16px 10px; transition: width 220ms var(--ease); overflow: hidden; z-index: 20; }
.sb-closed .sb { width: 56px; }
.sb-closed .sb-label, .sb-closed .sb-open-only { display: none !important; }
.sb-logo { height: 32px; padding: 0 8px; display: flex; align-items: center; margin-bottom: 14px; }
.sb-item { height: 32px; padding: 0 10px; border-radius: 4px; display: flex; align-items: center; gap: 10px; font-size: 13px; white-space: nowrap; overflow: hidden; color: rgba(255, 255, 255, .66); background: transparent; border: 0; width: 100%; cursor: pointer; text-align: left; transition: background 140ms var(--ease), color 140ms var(--ease); }
.sb-item:hover { color: var(--white); background: rgba(255, 255, 255, .06); }
.sb-item.is-active { color: var(--white); background: rgba(255, 255, 255, .1); }
.sb-icon { display: flex; flex: none; color: currentColor; }
.sb-item.is-active .sb-icon { color: var(--red); }
.sb-sub { height: 28px; padding: 0 10px 0 36px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--white); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-sub-dot { width: 6px; height: 6px; flex: none; border-radius: 50%; background: var(--red); }
.sb-designs { display: flex; flex-direction: column; padding: 4px 0 0 36px; overflow-y: auto; min-height: 0; }
.sb-designs a { height: 28px; flex: none; display: flex; align-items: center; font-size: 12px; color: rgba(255, 255, 255, .66); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: color 140ms var(--ease); }
.sb-designs a:hover, .sb-designs a.is-active { color: var(--white); }
.sb-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 10px; position: relative; }
.sb-user { height: 32px; padding: 0 8px; display: flex; align-items: center; gap: 10px; font-size: 13px; white-space: nowrap; overflow: hidden; border-radius: 4px; color: var(--white); background: transparent; border: 0; width: 100%; cursor: pointer; text-align: left; }
.sb-user:hover { background: rgba(255, 255, 255, .06); }
.sb-avatar { width: 20px; height: 20px; flex: none; border-radius: 4px; background: var(--red); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 500; }
.sb-avatar.is-client { background: var(--grey-text); }
.sb-menu { position: fixed; min-width: 188px; background: var(--white); color: var(--black); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding: 4px; z-index: 50; }
.sb-menu-head { padding: 6px 8px 8px; font-size: 12px; color: var(--grey-text); border-bottom: 1px solid var(--rule); margin-bottom: 4px; line-height: 1.4; }
.sb-menu-head strong { display: block; color: var(--black); font-weight: 500; font-size: 13px; }
.sb-menu button { width: 100%; height: 30px; padding: 0 8px; border: 0; background: transparent; border-radius: 4px; display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.sb-menu button:hover { background: var(--ground); }

.main { flex: 1; min-width: 0; background: var(--ground); padding: 28px 36px; display: flex; flex-direction: column; gap: 20px; }

/* ---- Page header ------------------------------------------------------------------ */
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.ph-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.ph-crumb { font-size: 12px; color: var(--grey-text); display: flex; align-items: center; gap: 4px; }
.ph-crumb a { color: var(--grey-text); }
.ph-crumb a:hover { color: var(--red); }
.ph-title-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ph-title { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -.01em; line-height: 1.6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ph-actions { display: flex; gap: 8px; align-items: center; flex: none; }

.pill { font-size: 11px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; background: var(--ground); color: var(--grey-text); line-height: 1.6; }
.pill-red { background: var(--red-tint); color: var(--red-ink); }

/* ---- Cards ------------------------------------------------------------------------ */
.card { background: var(--white); border-radius: 8px; }
.card-clip { overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px 0; }
.card-title { font-size: 13px; font-weight: 500; }
.card-meta { font-size: 12px; color: var(--grey-text); }
.card-link { font-size: 12px; color: var(--red-ink); background: none; border: 0; padding: 0; cursor: pointer; }
.card-link:hover { color: var(--red); }
.card-body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.muted-link { font-size: 12px; text-decoration: underline; color: var(--grey-text); background: none; border: 0; padding: 0; cursor: pointer; }
.muted-link:hover { color: var(--red); }
.danger-link { color: var(--red-ink); text-decoration: underline; font-size: 13px; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
.danger-link:hover { color: var(--red); }

.cols-side { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.cols-side-sm { grid-template-columns: minmax(0, 1fr) 280px; }
.cols-half { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ---- Fields ----------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label { font-size: 12px; color: var(--grey-text); }
.field-hint { font-size: 12px; color: var(--grey-text); }
.field-hint b { color: var(--black); font-weight: 400; }
.field-error { font-size: 12px; color: var(--red-ink); }
.input { height: 34px; width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; font-size: 13px; background: var(--white); outline: none; transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease); }
.input::placeholder { color: var(--grey-text); opacity: 1; }
.input:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 28, 58, .12); }
.input.has-error { border-color: var(--red-ink); }
.input-area { height: auto; min-height: 72px; padding: 8px 10px; resize: vertical; font-family: ui-monospace, Menlo, monospace; font-size: 12px; line-height: 1.5; }
select.input { appearance: none; padding-right: 32px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23434343' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center; cursor: pointer; }
.input-prefix { height: 34px; border: 1px solid var(--line); border-radius: 4px; display: flex; align-items: center; font-size: 13px; overflow: hidden; background: var(--white); transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease); }
.input-prefix:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 28, 58, .12); }
.input-prefix > span { padding: 0 10px; height: 100%; display: flex; align-items: center; background: var(--ground); color: var(--grey-text); white-space: nowrap; }
.input-prefix > input { flex: 1; min-width: 0; height: 100%; border: 0; outline: none; padding: 0 10px; font-size: 13px; background: transparent; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.span-all { grid-column: 1 / -1; }

.search { height: 30px; border: 1px solid var(--line); border-radius: 4px; padding: 0 10px; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--grey-text); background: var(--white); transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease); }
.search:focus-within { border-color: var(--red); box-shadow: 0 0 0 3px rgba(255, 28, 58, .12); }
.search svg { flex: none; }
.search input { flex: 1; min-width: 0; border: 0; outline: none; font-size: 13px; background: transparent; padding: 0; color: var(--black); }
.search input::placeholder { color: var(--grey-text); opacity: 1; }

/* ---- 3b: clients table ------------------------------------------------------------ */
.toolbar { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--rule); }
.toolbar .search { width: 240px; }
.toolbar-note { margin-left: auto; font-size: 12px; color: var(--grey-text); }
.t-cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 24px; gap: 12px; }
.t-head { padding: 10px 18px; font-size: 12px; color: var(--grey-text); }
.t-row { padding: 0 18px; height: 52px; align-items: center; font-size: 13px; border-top: 1px solid var(--rule); transition: color 140ms var(--ease), background 140ms var(--ease); }
.t-row:hover { color: var(--red); }
.t-client { display: flex; align-items: center; gap: 10px; min-width: 0; }
.t-client-name { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.t-client-name strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-client-name small, .t-muted { font-size: 12px; color: var(--grey-text); }
.t-muted { font-size: 13px; }
.t-chev { color: var(--grey-text); display: flex; }
.tile { width: 28px; height: 28px; flex: none; border-radius: 4px; color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; }
.empty { padding: 12px 18px; font-size: 13px; color: var(--grey-text); }
.empty-lg { padding: 40px 18px; text-align: center; font-size: 13px; color: var(--grey-text); }

/* ---- People lists ------------------------------------------------------------------ */
.person { display: flex; align-items: center; gap: 10px; padding: 8px 18px; font-size: 13px; }
.person-sm { padding: 6px 18px; }
.person-text { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.person-text small { font-size: 12px; color: var(--grey-text); overflow: hidden; text-overflow: ellipsis; }
.avatar { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--black); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 11px; }
.avatar-sm { width: 24px; height: 24px; font-size: 10px; background: var(--media); color: var(--black); }
.icon-btn { width: 26px; height: 26px; flex: none; border-radius: 4px; display: flex; align-items: center; justify-content: center; color: var(--grey-text); cursor: pointer; background: transparent; border: 0; padding: 0; transition: background 140ms var(--ease), color 140ms var(--ease); }
.icon-btn:hover { background: var(--red-tint); color: var(--red-ink); }
.icon-btn-plain:hover { background: var(--ground); color: var(--black); }
.pager { display: flex; justify-content: space-between; align-items: center; padding: 10px 18px 14px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--grey-text); }
.pager-btns { display: flex; gap: 4px; }
.pager-btn { width: 28px; height: 28px; border-radius: 4px; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; cursor: pointer; background: var(--white); color: var(--black); padding: 0; }
.pager-btn:disabled { opacity: .4; cursor: default; }
.pager-btn:not(:disabled):hover { border-color: var(--black); }

/* ---- 3e: design rows --------------------------------------------------------------- */
.d-row { display: grid; grid-template-columns: 64px 1fr auto 70px 16px; gap: 14px; padding: 8px 18px; align-items: center; font-size: 13px; transition: color 140ms var(--ease); }
.d-row:hover { color: var(--red); }
.d-row-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.d-row-text strong { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-row-text small { font-size: 12px; color: var(--grey-text); }
.d-row-date { color: var(--grey-text); text-align: right; }
.d-row .thumb { height: 40px; }
.details { padding: 10px 18px 16px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.details-row { display: flex; justify-content: space-between; gap: 12px; }
.details-row span:first-child { color: var(--grey-text); }

/* ---- Thumbnails: a 1440px-wide page scaled to its box, or a grey block ----------- */
.thumb { position: relative; display: block; overflow: hidden; border-radius: 4px; background: var(--media); }
.thumb iframe { position: absolute; top: 0; left: 0; width: 1440px; height: 1800px; border: 0; transform-origin: 0 0; transform: scale(var(--s, .1)); pointer-events: none; background: var(--white); }

/* ---- 3g / 3k: card grids ------------------------------------------------------------ */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dcard { background: var(--white); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; transition: transform 260ms var(--ease), box-shadow 260ms var(--ease); }
.dcard:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0, 0, 0, .06); }
.dcard .thumb { aspect-ratio: 16 / 9; margin: 8px 8px 0; }
.cards-4 .dcard .thumb { aspect-ratio: 16 / 10; }
.dcard-meta { padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.cards-4 .dcard-meta { padding: 10px 12px; font-size: 13px; }
.dcard-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; line-height: 1.4; }
.dcard-text strong { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcard-text small { font-size: 12px; color: var(--grey-text); }
.dcard:hover .dcard-text strong { color: var(--red); }

/* ---- 3h / 3i: upload -------------------------------------------------------------- */
.file-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 4px; background: var(--ground); font-size: 13px; }
.file-row .file-icon { display: flex; color: var(--red); flex: none; }
.file-row .file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .file-name span { color: var(--grey-text); }
.drop { display: flex; align-items: center; gap: 12px; padding: 18px 12px; border-radius: 4px; border: 1px dashed rgba(0, 0, 0, .2); background: var(--ground); font-size: 13px; cursor: pointer; transition: border-color 140ms var(--ease), background 140ms var(--ease); }
.drop:hover, .drop.is-over { border-color: var(--red); background: var(--red-wash); }
.drop .file-icon { display: flex; color: var(--red); }
.drop small { display: block; font-size: 12px; color: var(--grey-text); }
.progress { height: 3px; border-radius: 999px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--red); transition: width 140ms linear; }
.pages-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 10px 12px 14px; }
.page-opt { display: flex; align-items: center; gap: 10px; height: 34px; padding: 0 8px; border-radius: 4px; font-size: 13px; cursor: pointer; background: transparent; border: 0; text-align: left; width: 100%; min-width: 0; }
.page-opt span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page-opt:hover { background: var(--ground); }
.radio { width: 14px; height: 14px; flex: none; border-radius: 50%; border: 1px solid var(--grey-text); display: flex; align-items: center; justify-content: center; }
.radio::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.is-picked .radio::after { background: var(--black); }
.preview { aspect-ratio: 4 / 3; }
.version-text { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.4; }
.version-text small { font-size: 12px; color: var(--grey-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Modal (delete confirmations) -------------------------------------------------- */
.modal-back { position: fixed; inset: 0; background: rgba(0, 0, 0, .4); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 60; }
.modal { width: 100%; max-width: 400px; background: var(--white); border-radius: 8px; padding: 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); }
.modal h2 { margin: 0; font-size: 15px; font-weight: 500; line-height: 1.4; }
.modal p { margin: 0; font-size: 13px; color: var(--grey-text); }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ---- Toast ---------------------------------------------------------------------- */
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--black); color: var(--white); font-size: 13px; padding: 8px 14px; border-radius: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); z-index: 70; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.toast::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }

/* ---- 3a: sign in -------------------------------------------------------------------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 420px 1fr; }
.auth-side { background: var(--black); color: var(--white); padding: 32px; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side span { font-size: 13px; color: rgba(255, 255, 255, .66); }
.auth-main { background: var(--white); display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-card { width: 320px; max-width: 100%; display: flex; flex-direction: column; gap: 16px; background: var(--ground); padding: 28px; border-radius: 8px; }
.auth-title { display: flex; flex-direction: column; gap: 4px; }
.auth-title h1 { margin: 0; font-size: 22px; font-weight: 500; line-height: 1.6; }
.auth-title p { margin: 0; font-size: 12px; color: var(--grey-text); line-height: 1.5; }
.auth-link { font-size: 12px; color: var(--grey-text); text-decoration: underline; align-self: center; }
.auth-link:hover { color: var(--red); }
.auth-or { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--grey-text); margin: -4px 0; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.btn-google { background: var(--white); border-color: var(--line); gap: 10px; }
.btn-google:hover:not(:disabled) { border-color: var(--black); }
.auth-status { font-size: 12px; color: var(--black); background: var(--white); border-radius: 4px; padding: 8px 10px; }
.input[readonly] { color: var(--grey-text); background: var(--ground); }

/* ---- 3j / 3k: the viewer's black bar ----------------------------------------------- */
.viewer { height: 100vh; display: flex; flex-direction: column; }
.vbar { height: 44px; flex: none; background: var(--black); color: var(--white); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 0 12px; position: relative; z-index: 30; }
.vbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.vbar-back { font-size: 13px; color: rgba(255, 255, 255, .8); display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.vbar-back:hover { color: var(--white); }
.vbar-center { display: flex; align-items: center; gap: 6px; font-size: 13px; min-width: 0; position: relative; }
.vbar-name { color: rgba(255, 255, 255, .66); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.vbar-sep { color: rgba(255, 255, 255, .4); }
.vbar-chip { height: 28px; padding: 0 10px; border-radius: 4px; background: rgba(255, 255, 255, .1); display: flex; align-items: center; gap: 6px; cursor: pointer; border: 0; color: var(--white); font-size: 13px; white-space: nowrap; transition: background 140ms var(--ease); }
.vbar-chip:hover { background: rgba(255, 255, 255, .16); }
.vbar-chip .chev { display: flex; color: rgba(255, 255, 255, .66); }
.vbar-sq { width: 28px; height: 28px; border-radius: 4px; background: rgba(255, 255, 255, .1); display: flex; align-items: center; justify-content: center; color: var(--white); transition: background 140ms var(--ease); }
a.vbar-sq:hover { background: rgba(255, 255, 255, .16); }
.vbar-sq.is-off { opacity: .35; }
.vbar-right { display: flex; justify-content: flex-end; gap: 6px; align-items: center; font-size: 13px; }
.vbar-btn { height: 28px; padding: 0 10px; border-radius: 4px; display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--white); background: rgba(255, 255, 255, .1); white-space: nowrap; transition: background 140ms var(--ease); }
.vbar-btn:hover { background: rgba(255, 255, 255, .16); }
.vbar-btn.is-active { color: var(--black); background: var(--white); }
.vbar-title { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pmenu { position: absolute; top: 36px; left: 50%; transform: translateX(-50%); width: 220px; max-height: min(70vh, 520px); overflow-y: auto; background: var(--white); color: var(--black); border-radius: 8px; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding: 4px; display: flex; flex-direction: column; z-index: 40; }
.pmenu a { height: 30px; flex: none; padding: 0 8px; border-radius: 4px; font-size: 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pmenu a span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pmenu a:hover { background: var(--ground); }
.pmenu a.is-current { background: var(--ground); }
.stage { flex: 1; background: var(--media); position: relative; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: var(--white); }
.vmain { flex: 1; overflow-y: auto; background: var(--ground); padding: 28px 36px; display: flex; flex-direction: column; gap: 20px; }

/* ---- Viewer home: a person with access to several clients ------------------------- */
.home { max-width: 1040px; }

/* ---- Small screens ----------------------------------------------------------------- */
@media (max-width: 1100px) {
    .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cards-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .main, .vmain { padding: 20px 16px; }
    .cols-side, .cols-side-sm, .cols-half { grid-template-columns: minmax(0, 1fr); }
    .cards, .cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ph { flex-wrap: wrap; align-items: flex-start; }
    .t-cols { grid-template-columns: 2fr 1fr 24px; }
    .t-cols > :nth-child(3), .t-cols > :nth-child(4) { display: none; }
    .toolbar .search { width: auto; flex: 1; }
    .toolbar-note { display: none; }
    .auth { grid-template-columns: 1fr; }
    .auth-side { padding: 20px 16px; flex-direction: row; align-items: center; }
    .vbar { grid-template-columns: auto 1fr auto; }
    .vbar-name, .vbar-sep, .vbar-back span, .vbar-btn span { display: none; }
}
@media (max-width: 560px) {
    .cards, .cards-4 { grid-template-columns: minmax(0, 1fr); }
    .grid-2, .pages-pick { grid-template-columns: 1fr; }
    .sb { width: 56px; }
    .sb .sb-label, .sb .sb-open-only { display: none !important; }
}

/* ---- Hidden pages and versions ------------------------------------------------------ */
.page-row { display: flex; align-items: center; gap: 4px; border-radius: 4px; min-width: 0; }
.page-row.is-picked { background: var(--red-wash); }
.page-row .page-opt { flex: 1; }
.page-row > .icon-btn { margin-right: 4px; }
.is-hidden, .page-opt.is-hidden span:last-child { color: var(--grey-text); text-decoration: line-through; text-decoration-color: rgba(0, 0, 0, .3); }
.icon-btn.is-hidden { color: var(--red-ink); }
.icon-btn.is-off { opacity: .35; cursor: default; }
.icon-btn.is-off:hover { background: transparent; color: var(--grey-text); }
.versions { padding: 8px 0; }
.v-row { display: flex; align-items: center; gap: 12px; padding: 8px 18px; font-size: 13px; }
.v-row + .v-row { border-top: 1px solid var(--rule); }
.v-num { width: 28px; height: 28px; flex: none; border-radius: 4px; background: var(--ground); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 500; }
.v-row.is-current .v-num { background: var(--red); color: var(--white); }
.v-actions { display: flex; align-items: center; gap: 6px; flex: none; }
