/* v3 workspace and tenant administration. Keep all presentation overrides here. */
:root { --chat-background:#fff; }
.sidebar-group-row { display:flex; align-items:center; gap:9px; padding:9px 21px; border-bottom:1px solid var(--line); color:var(--muted); }
.sidebar-group-row>.icon { width:18px; height:18px; }
.group-filter { border:0; min-width:0; width:100%; padding:5px 0; font-size:12px; background:transparent; cursor:pointer; }
.sidebar-footer { gap:9px; padding:12px; }
.sidebar-footer>.icon-button { width:34px; height:36px; }
.admin-summary strong { max-width:100%; }
.latency-wifi { color:var(--green); width:15px; height:15px; }
.offline .latency-wifi { color:var(--muted); }
.connection-label { white-space:nowrap; font-variant-numeric:tabular-nums; }
.sidebar-splitter { position:absolute; left:calc(var(--sidebar) - 4px); top:0; bottom:0; width:8px; z-index:10; cursor:col-resize; touch-action:none; }
.sidebar-splitter::after { content:''; display:block; width:2px; height:100%; margin:auto; background:transparent; transition:background .15s; }
.sidebar-splitter:hover::after,.sidebar-splitter:focus-visible::after,.sidebar-splitter.dragging::after { background:var(--primary); }
.sidebar-splitter:focus-visible { outline:none; }
.resizing-sidebar,.resizing-sidebar * { cursor:col-resize!important; user-select:none!important; }
.workspace-placeholder { flex:1; display:grid; place-items:center; background:var(--surface); color:var(--muted); font-size:16px; font-weight:400; }
.conversation-body { background:#fff; background-size:cover; background-position:center; background-repeat:no-repeat; }
.conversation-body::before { display:none; }
.chat-background-text { position:absolute; inset:20% 10%; display:flex; align-items:center; justify-content:center; color:#50677a40; text-align:center; font-size:clamp(24px,4vw,60px); font-weight:650; line-height:1.6; overflow-wrap:anywhere; pointer-events:none; z-index:-1; white-space:pre-wrap; }
.chat-marquee { flex-shrink:0; overflow:hidden; height:34px; border-bottom:1px solid var(--line); background:var(--surface-soft); color:var(--primary); font-size:12px; white-space:nowrap; position:relative; }
.marquee-text { display:inline-block; min-width:100%; padding-left:100%; line-height:33px; animation:banner-scroll 24s linear infinite; }
.chat-marquee:hover .marquee-text { animation-play-state:paused; }
@keyframes banner-scroll { from { transform:translateX(0); } to { transform:translateX(-100%); } }
.guest-layout,.dark .guest-layout { background:#fff; --surface:#fff; --surface-soft:#f4f5f7; --text:#17212b; --muted:#85919c; --line:#edf0f3; --bubble-in:#fff; --bubble-out:#e3ffc8; color:var(--text); color-scheme:light; }
.guest-layout .conversation { max-width:1100px; box-shadow:none; }
.guest-layout .conversation-person { cursor:default; }
.guest-layout .composer-wrap { padding-bottom:max(16px,env(safe-area-inset-bottom)); }
.message-bubble { border:1px solid #17212b0a; }
.search-section-title { padding:12px 10px 7px; font-size:11px; color:var(--muted); font-weight:650; }
.search-progress { padding:24px 12px; color:var(--muted); line-height:1.7; font-size:12px; }
.search-message-result { width:100%; display:flex; flex-direction:column; gap:8px; padding:13px 12px; text-align:left; border-radius:10px; }
.search-message-result:hover { background:var(--surface-soft); }
.search-result-top { display:flex; justify-content:space-between; align-items:center; gap:8px; width:100%; }
.search-result-top strong { font-size:13px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.search-result-top time { font-size:10px; color:var(--muted); flex-shrink:0; }
.search-result-snippet { font-size:12px; line-height:1.7; overflow-wrap:anywhere; }
.search-message-result small { font-size:10px; }
.message-image>video { display:block; width:100%; height:100%; min-height:120px; max-height:360px; background:#111; }
.attachment-preview>video { width:100%; height:100%; object-fit:cover; pointer-events:none; }
.composer-quick { color:var(--primary); }
.settings-heading-row { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; }
.inline-form { display:flex; gap:10px; margin:18px 0; }
.inline-form>.input { flex:1; min-width:0; }
.check-label { display:flex!important; flex-direction:row!important; align-items:center; gap:10px; color:var(--text)!important; line-height:1.7; font-size:13px; }
.check-label input { width:17px; height:17px; accent-color:var(--primary); flex-shrink:0; }
.settings-list,.template-list { display:flex; flex-direction:column; gap:9px; }
.editable-list-row { display:flex; align-items:center; gap:5px; padding:8px 0; border-bottom:1px solid var(--line); }
.editable-list-row>.icon { width:18px; color:var(--muted); margin-right:3px; }
.editable-list-row .input { flex:1; min-width:65px; }
.editable-list-row .icon-button { width:32px; height:34px; }
.template-row { display:flex; align-items:center; gap:12px; padding:15px; border:1px solid var(--line); border-radius:12px; background:var(--surface); }
.template-row>.icon { color:var(--muted); cursor:grab; width:18px; }
.template-row.dragging { opacity:.45; }
.template-summary { flex:1; min-width:0; display:flex; flex-direction:column; gap:5px; }
.template-summary strong { font-size:14px; }
.template-summary p { font-size:12px; line-height:1.6; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.template-summary small { font-size:10px; }
.template-tools { display:flex; align-items:center; }
.template-tools .icon-button { width:32px; height:34px; }
.template-media-tray { display:grid; grid-template-columns:repeat(auto-fill,minmax(120px,1fr)); gap:12px; }
.template-media-tray:empty { display:none; }
.template-media-item { position:relative; aspect-ratio:4/3; border-radius:10px; background:var(--surface-soft); overflow:hidden; }
.template-media-item>img,.template-media-item>video { width:100%; height:100%; object-fit:contain; }
.template-media-item>.icon-button { position:absolute; top:4px; right:4px; width:27px; height:27px; background:#17212bb3; color:white; }
.quick-picker { display:flex; flex-direction:column; gap:9px; }
.quick-reply-choice { display:flex; flex-direction:column; gap:7px; padding:15px; text-align:left; border:1px solid var(--line); border-radius:12px; }
.quick-reply-choice:hover { background:var(--surface-soft); }
.quick-reply-choice>span { font-size:12px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.quick-reply-choice small { font-size:10px; }
.background-preview { width:100%; max-height:200px; object-fit:cover; border-radius:12px; background:var(--surface-soft); }
.callout { border:1px solid #3390ec30; border-radius:10px; background:var(--primary-soft); color:var(--text); padding:13px 15px; font-size:12px; line-height:1.85; }
.domain-layout.readonly { display:block; }
.super-shell { display:grid; grid-template-columns:250px minmax(0,1fr); min-height:100dvh; background:var(--surface-soft); }
.super-sidebar { display:flex; flex-direction:column; gap:24px; padding:28px 18px; border-right:1px solid var(--line); background:var(--surface); position:sticky; top:0; height:100dvh; }
.super-brand { display:flex; align-items:center; gap:10px; padding:0 10px; font-size:17px; font-weight:700; }
.super-brand .icon { color:var(--primary); }
.super-nav { display:flex; flex-direction:column; gap:6px; }
.super-nav>button { display:flex; align-items:center; gap:12px; padding:13px 14px; border-radius:10px; text-align:left; font-size:13px; }
.super-nav>button:hover,.super-nav>button.active { background:var(--primary-soft); color:var(--primary); }
.super-bottom { margin-top:auto; display:flex; flex-direction:column; gap:10px; }
.super-bottom .muted { font-size:11px; text-align:center; }
.super-content { padding:36px 40px; min-width:0; }
.super-content-header { display:flex; gap:20px; align-items:center; justify-content:space-between; margin-bottom:28px; }
.super-content-header h1 { font-size:26px; margin-bottom:8px; }
.super-content-header p { font-size:12px; }
.super-search { max-width:400px; margin-bottom:20px; }
.table-scroll { width:100%; overflow:auto; border:1px solid var(--line); border-radius:14px; background:var(--surface); margin-bottom:20px; }
.super-table { border-collapse:collapse; width:100%; white-space:nowrap; }
.super-table th { text-align:left; font-size:11px; font-weight:600; padding:16px; color:var(--muted); background:var(--surface); border-bottom:1px solid var(--line); }
.super-table td { padding:16px; font-size:12px; border-bottom:1px solid var(--line); }
.super-table tr:last-child td { border-bottom:0; }
.table-actions { display:flex; gap:8px; }
.monospace { font-family:ui-monospace,SFMono-Regular,Consolas,monospace; }
.account-state { display:inline-block; padding:5px 9px; font-size:11px; background:#e9f6ee; color:#328157; border-radius:6px; }
.account-state.warning { background:#fff3e7; color:#a36b23; }
.super-room-list { display:flex; flex-direction:column; }
.super-room-row { display:flex; align-items:center; justify-content:space-between; gap:14px; border-bottom:1px solid var(--line); padding:15px 0; }
.super-room-row>div { display:flex; flex-direction:column; gap:7px; min-width:0; }
.super-room-row strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.super-room-row small { font-size:11px; }
.dark .admin-layout .conversation-body { background-color:var(--surface); }
@media (max-width:1000px) {
  .super-shell { grid-template-columns:205px minmax(0,1fr); }
  .super-content { padding:25px 20px; }
  .super-brand { font-size:15px; }
}
@media (max-width:767px) {
  .sidebar-splitter { display:none; }
  .workspace-placeholder { display:none; }
  .super-shell { display:flex; flex-direction:column; }
  .super-sidebar { position:relative; width:100%; height:auto; padding:18px; gap:15px; }
  .super-nav { display:flex; flex-direction:row; flex-wrap:wrap; gap:6px; }
  .super-nav>button { padding:10px; font-size:12px; }
  .super-bottom { display:flex; flex-direction:row; flex-wrap:wrap; gap:7px; }
  .super-bottom>* { flex:1; }
  .super-bottom .muted { width:100%; flex-basis:100%; text-align:left; }
  .super-content { padding:22px 14px; }
  .super-content-header { align-items:flex-start; gap:12px; margin-bottom:20px; }
  .super-content-header h1 { font-size:21px; }
  .super-content-header>.button { flex-shrink:0; }
  .template-row { padding:11px; gap:8px; flex-wrap:wrap; }
  .template-tools { margin-left:auto; }
  .template-summary { min-width:120px; }
  .editable-list-row { gap:2px; }
  .editable-list-row>.icon { display:none; }
  .editable-list-row .icon-button { width:29px; }
  .template-media-tray { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (prefers-reduced-motion:reduce) {
  .marquee-text { animation:none; padding-left:12px; min-width:0; }
  .chat-marquee { overflow-x:auto; }
}

.super-key-status { color:var(--muted); font-size:11px; line-height:1.7; text-align:center; }
.super-brand strong { display:flex; flex-direction:column; gap:5px; }
.super-brand small { font-size:11px; color:var(--muted); font-weight:400; letter-spacing:3px; }
.super-login { min-height:100dvh; display:grid; place-items:center; padding:24px; background:var(--surface-soft); }
.super-login-card { width:min(440px,100%); padding:34px; background:var(--surface); border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow); }
.super-login-card>.icon { color:var(--primary); width:32px; height:32px; margin-bottom:18px; }
.super-login-card h1 { font-size:24px; margin-bottom:8px; }
.super-login-card .stack-form { margin:24px 0; }
.super-login-card>small { display:block; font-size:11px; }

.background-preview { overflow:hidden; display:grid; place-items:center; min-height:90px; }
.background-preview img { max-width:100%; max-height:200px; object-fit:contain; }
