@import url('/fonts.css');

/* SiteVue brand tokens — design.sitevue.ai. Color is reserved for live status. */
:root {
  color-scheme: dark;
  --sv-ink: #10011b;
  --sv-ink-2: #1e1028;
  --sv-fg-1: #fff;
  --sv-fg-2: rgb(255 255 255 / 80%);
  --sv-fg-3: rgb(255 255 255 / 70%);
  --sv-fg-4: rgb(255 255 255 / 50%);
  --sv-surface-1: rgb(255 255 255 / 3%);
  --sv-surface-2: rgb(255 255 255 / 6%);
  --sv-surface-3: rgb(255 255 255 / 10%);
  --sv-border-1: rgb(255 255 255 / 12%);
  --sv-border-2: rgb(255 255 255 / 25%);
  --sv-green: #55bf3b;
  --sv-yellow: #eeb10a;
  --sv-red: #df5353;
  --error-text: #ff9898;
  --sidebar-width: 224px;
  --assistant-height: 93px;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-synthesis: none;
  color: var(--sv-fg-1);
  background: var(--sv-ink);
}
:root[data-theme='light'] {
  color-scheme: light;
  --sv-ink: #fff;
  --sv-ink-2: #fafafa;
  --sv-fg-1: #000;
  --sv-fg-2: rgb(0 0 0 / 80%);
  --sv-fg-3: rgb(0 0 0 / 70%);
  --sv-fg-4: rgb(0 0 0 / 50%);
  --sv-surface-1: rgb(0 0 0 / 2%);
  --sv-surface-2: rgb(0 0 0 / 4%);
  --sv-surface-3: rgb(0 0 0 / 6%);
  --sv-border-1: rgb(0 0 0 / 12%);
  --sv-border-2: rgb(0 0 0 / 25%);
  --sv-green: #34cb0f;
  --sv-red: #fc4545;
  --error-text: #b22222;
}
* { box-sizing: border-box; }
body { margin: 0; font-size: 14px; line-height: 1.5; }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, a, input, select, summary { outline-offset: 4px; }
:focus-visible { outline: 2px solid var(--sv-fg-1); }
input:focus-visible, select:focus-visible { outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; font-weight: 600; letter-spacing: -.7px; line-height: 1.25; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -.2px; }
h3 { font-size: 15px; font-weight: 600; }
.skip-link { position: fixed; left: 16px; top: -60px; z-index: 100; background: var(--sv-fg-1); color: var(--sv-ink); padding: 12px; border-radius: 4px; }
.skip-link:focus { top: 12px; }
.shell { min-height: 100dvh; }
.sidebar { width: var(--sidebar-width); position: fixed; inset: 0 auto 0 0; border-right: 1px solid var(--sv-border-1); padding: 28px 16px 16px; display: flex; flex-direction: column; background: var(--sv-ink); z-index: 20; }
.brand { display: inline-flex; align-items: center; min-height: 36px; margin: 0 12px; }
.brand img { display: block; width: 135px; height: auto; filter: invert(1); }
[data-theme='light'] .brand img { filter: none; }
.product-name { margin: 10px 12px 32px; color: var(--sv-fg-3); font-size: 12px; font-weight: 500; }
nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item { display: flex; align-items: center; gap: 12px; text-align: left; border: 0; border-radius: 6px; padding: 12px; width: 100%; min-height: 48px; font-size: 13px; font-weight: 500; color: var(--sv-fg-3); background: transparent; }
.nav-item .icon { opacity: .8; }
.nav-item.active { color: var(--sv-fg-1); background: var(--sv-surface-2); }
.nav-item:hover, .icon-button:hover, .identity:hover { background: var(--sv-surface-3); }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.identity { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; border-top: 1px solid var(--sv-border-1); background: transparent; padding: 18px 8px 4px; text-align: left; font-size: 12px; }
#my-name { flex: 1; overflow-wrap: anywhere; }
.identity .icon { color: var(--sv-fg-3); font-size: 18px; }
.avatar { width: 36px; height: 36px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: var(--sv-surface-2); border: 1px solid var(--sv-border-1); font-size: 12px; font-weight: 500; color: var(--sv-fg-2); flex-shrink: 0; }
main { margin-left: var(--sidebar-width); min-width: 0; }
main:focus { outline: none; }
.topbar { min-height: 65px; padding: 10px 32px; border-bottom: 1px solid var(--sv-border-1); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.breadcrumb { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--sv-fg-3); }
.breadcrumb span:last-child { color: var(--sv-fg-1); }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.system-state { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--sv-fg-2); }
.status-dot { height: 6px; width: 6px; flex-shrink: 0; border-radius: 50%; background: var(--sv-fg-4); }
.status-dot.online { background: var(--sv-green); }
.icon-button { background: transparent; border: 0; border-radius: 5px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--sv-fg-2); }
.page { max-width: 1500px; margin: auto; padding: 28px 32px 48px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; margin-bottom: 24px; }
.button { min-height: 44px; padding: 10px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; border: 1px solid var(--sv-fg-1); border-radius: 5px; background: var(--sv-fg-1); color: var(--sv-ink); font-size: 13px; font-weight: 600; line-height: 1.4; }
.button:hover:enabled { opacity: .85; }
.button.secondary { border-color: var(--sv-border-2); background: transparent; color: var(--sv-fg-1); font-weight: 500; }
.button.secondary:hover:enabled { background: var(--sv-surface-2); opacity: 1; }
.button.end-call { background: var(--sv-surface-2); border-color: var(--sv-border-2); color: var(--sv-fg-1); }
.button.end-call:hover { background: var(--sv-surface-3); }
.button[aria-pressed='true'] { box-shadow: inset 0 0 0 2px var(--sv-fg-1); background: var(--sv-ink-2); color: var(--sv-fg-1); }
.hint, .field-hint { font-size: 12px; line-height: 1.6; color: var(--sv-fg-3); }
.field-hint { margin-top: 6px; }
#page-connect { padding-bottom: calc(var(--assistant-height) + 32px); }
.assistant-card { position: fixed; z-index: 21; left: var(--sidebar-width); right: 0; bottom: 0; display: grid; gap: 12px; padding: 12px 32px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--sv-border-1); background: var(--sv-ink); }
.talk-button { width: 100%; min-height: 64px; font-size: 16px; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.assistant-feedback { min-width: 0; max-height: 30dvh; overflow-y: auto; padding: 3px; margin: -3px; }
.assistant-feedback:has(.route-options:empty):has(.assistant-response[hidden]) { display: none; }
input::placeholder { color: var(--sv-fg-3); opacity: 1; }
.route-options { display: flex; flex-wrap: wrap; gap: 8px; }
.route-options button { min-height: 44px; padding: 8px 12px; border: 1px solid var(--sv-border-2); border-radius: 5px; color: var(--sv-fg-1); background: var(--sv-surface-2); font-size: 12px; }
.operations-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.panel { border: 1px solid var(--sv-border-1); border-radius: 8px; min-width: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; }
.count { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--sv-fg-3); }
.directory-search { display: flex; align-items: center; gap: 10px; padding: 0 12px; margin: 0 20px 16px; border: 1px solid var(--sv-border-2); border-radius: 5px; color: var(--sv-fg-3); }
.directory-search:focus-within { outline: 2px solid var(--sv-fg-1); outline-offset: 2px; }
.directory-search input { min-width: 0; width: 100%; min-height: 44px; border: 0; padding: 10px 0; color: var(--sv-fg-1); background: transparent; font-size: 12px; outline: none; }
.directory-columns { display: grid; grid-template-columns: minmax(0, 1fr) 76px 72px; gap: 12px; padding: 9px 20px; color: var(--sv-fg-3); font-size: 11px; background: var(--sv-surface-1); border-block: 1px solid var(--sv-border-1); }
.person-card { display: grid; grid-template-columns: 36px minmax(0, 1fr) 76px 72px; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--sv-border-1); }
.person-card:last-child { border-bottom: 0; }
.person-card h3 { font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }
.person-card p { font-size: 11px; color: var(--sv-fg-3); margin-top: 4px; overflow-wrap: anywhere; }
.person-state { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; color: var(--sv-fg-2); }
.person-state .status-dot { width: 5px; height: 5px; }
.person-card .button { padding: 9px; font-size: 12px; }
.person-card .button .icon { width: 16px; font-size: 16px; height: 16px; }
.empty-state { padding: 38px 24px; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-state h3 { font-size: 13px; font-weight: 500; }
.empty-state p { font-size: 12px; color: var(--sv-fg-3); margin-top: 6px; max-width: 300px; }
.call-card { background: var(--sv-surface-1); }
.call-state { color: var(--sv-fg-3); font-size: 11px; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.call-card[data-state='connected'] .call-state::before, .call-card[data-state='incoming'] .call-state::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--sv-green); }
.call-card[data-state='incoming'] { border-color: var(--sv-fg-2); }
.call-idle { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 190px; padding: 24px 20px 32px; }
.call-idle>.icon { color: var(--sv-fg-3); margin-bottom: 16px; }
.call-idle h3 { font-size: 14px; font-weight: 500; }
.call-idle p { font-size: 12px; color: var(--sv-fg-3); margin-top: 6px; }
#call-active { padding: 0 20px 20px; }
.call-person { display: flex; align-items: center; gap: 12px; margin: 8px 0 20px; }
.call-avatar { width: 44px; height: 44px; font-size: 15px; }
.call-person>div:last-child { min-width: 0; }
.call-person h3 { overflow-wrap: anywhere; }
.call-person p { font-size: 12px; color: var(--sv-fg-3); margin-top: 4px; }
.call-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.call-actions .button { flex: 1 1 auto; }
.call-language { display: flex; align-items: center; gap: 8px; color: var(--sv-fg-2); font-size: 12px; }
.call-language .icon { font-size: 18px; }
.language-setting { border: 0; border-top: 1px solid var(--sv-border-1); border-radius: 0 0 8px 8px; display: flex; width: 100%; min-height: 54px; align-items: center; gap: 9px; padding: 12px 20px; background: transparent; font-size: 12px; text-align: left; color: var(--sv-fg-3); }
.language-setting:hover { background: var(--sv-surface-2); }
.language-setting strong { color: var(--sv-fg-1); font-weight: 500; margin-left: auto; }
#remote-video-panel { position: relative; border-radius: 5px; overflow: hidden; background: #10011b; margin: 16px 0; }
#remote-video { display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain; }
#video-label { position: absolute; bottom: 8px; left: 8px; color: #fff; background: #10011bcc; padding: 4px 8px; border-radius: 3px; font-size: 11px; }
.activity-section { margin-top: 24px; }
summary { min-height: 52px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 500; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary .icon { color: var(--sv-fg-3); }
details[open]>summary .icon { transform: rotate(180deg); }
.activity-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-top: 1px solid var(--sv-border-1); color: var(--sv-fg-3); font-size: 11px; }
.text-button { min-height: 44px; padding: 8px; border: 0; background: transparent; color: var(--sv-fg-2); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.activity { padding: 0 20px 12px; max-height: 300px; overflow: auto; }
.activity-empty { color: var(--sv-fg-3); font-size: 12px; }
.activity-row { display: grid; grid-template-columns: 66px minmax(60px, 140px) 1fr; gap: 12px; font-size: 12px; padding: 10px 0; border-bottom: 1px solid var(--sv-border-1); }
.activity-row:last-child { border: 0; }
.activity-row time { color: var(--sv-fg-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.activity-row .speaker { font-weight: 500; overflow-wrap: anywhere; }
.activity-row .message { color: var(--sv-fg-2); overflow-wrap: anywhere; }
.diagnostics { display: flex; flex-wrap: wrap; gap: 8px 20px; border-top: 1px solid var(--sv-border-1); padding: 12px 20px; font-size: 11px; color: var(--sv-fg-3); font-variant-numeric: tabular-nums; }
.diagnostics span:empty { display: none; }
.settings-grid { display: grid; grid-template-columns: minmax(0, 520px) minmax(0, 380px); gap: 40px; align-items: start; }
.settings-card { padding: 24px; }
.settings-card>h2 { margin-bottom: 12px; }
.settings-card label, dialog label { display: block; font-size: 12px; font-weight: 500; color: var(--sv-fg-2); margin: 20px 0 8px; }
.settings-card input:not([type='checkbox']), .settings-card select, dialog input, dialog select { width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--sv-border-2); border-radius: 5px; background: var(--sv-ink); color: var(--sv-fg-1); font-size: 14px; }
.settings-card .button { margin-top: 24px; }
.settings-card>p[role='status']:not(:empty) { margin-top: 12px; }
.checkbox { display: flex !important; align-items: center; gap: 10px; min-height: 44px; margin-top: 8px !important; }
.checkbox input { accent-color: var(--sv-fg-1); width: 18px; height: 18px; margin: 0; }
.form-divider { border-top: 1px solid var(--sv-border-1); margin-top: 20px; }
.advanced { border-block: 1px solid var(--sv-border-1); margin-top: 24px; }
.advanced summary { padding-inline: 0; }
.advanced[open] { padding-bottom: 16px; }
.advanced label { margin-top: 8px; }
.connected-devices { margin-bottom: 24px; }
.device-row { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-top: 1px solid var(--sv-border-1); }
.device-row>div { flex: 1; min-width: 0; }
.device-row h3 { font-size: 13px; overflow-wrap: anywhere; }
.device-row p { font-size: 12px; color: var(--sv-fg-3); margin-top: 3px; }
.empty-device { padding: 0 20px 20px; font-size: 13px; color: var(--sv-fg-3); }
.control-list { margin: 0; padding: 0 24px 8px; }
.control-list>div { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--sv-border-1); font-size: 13px; }
.control-list dt { font-weight: 500; }
.control-list dd { margin: 0; color: var(--sv-fg-2); }
.control-list>div:last-child { border-bottom: 0; }
dialog { border: 1px solid var(--sv-border-2); border-radius: 8px; background: var(--sv-ink); color: var(--sv-fg-1); width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 28px; }
dialog::backdrop { background: rgb(0 0 0 / 65%); }
dialog h2 { font-size: 20px; margin-bottom: 24px; }
dialog .hint { margin-top: 16px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; }
#profile-error { color: var(--error-text); font-size: 12px; margin-top: 12px; }
#profile-error:empty { display: none; }
.toast { position: fixed; z-index: 100; bottom: 24px; right: 24px; max-width: min(460px, calc(100% - 32px)); background: var(--sv-fg-1); color: var(--sv-ink); border-radius: 6px; box-shadow: 0 4px 24px #0002; padding: 16px 20px; font-size: 13px; }
@media (max-width: 1150px) {
  :root { --sidebar-width: 200px; }
  .sidebar { padding-inline: 12px; }
  .page, .topbar { padding-inline: 24px; }
  .operations-grid { gap: 16px; }
  .person-card { grid-template-columns: minmax(0, 1fr) 60px 64px; gap: 10px; padding-inline: 16px; }
  .person-card>.avatar { display: none; }
  .directory-columns { grid-template-columns: minmax(0, 1fr) 60px 64px; gap: 10px; padding-inline: 16px; }
  .person-card .button { gap: 5px; }
  .assistant-card { padding-inline: 24px; }
  .settings-grid { gap: 24px; }
}
@media (max-width: 900px) {
  :root { --sidebar-width: 180px; }
  .nav-item { gap: 8px; padding-inline: 10px; font-size: 12px; }
  .brand { margin-inline: 10px; }
  .brand img { width: 125px; }
  .call-idle { min-height: 125px; padding: 20px; }
  .call-idle>.icon { display: none; }
  .person-card { grid-template-columns: 36px minmax(0, 1fr) 76px 72px; }
  .person-card>.avatar { display: inline-flex; }
  .directory-columns { grid-template-columns: minmax(0, 1fr) 76px 72px; }
  .settings-grid { grid-template-columns: 1fr; }
  .topbar-right { gap: 8px; }
  .breadcrumb>span:not(:last-child) { display: none; }

}
@media (max-width: 640px) {
  :root { --sidebar-width: 0px; }
  .sidebar { inset: auto 0 0; width: 100%; height: calc(66px + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom); border: 0; border-top: 1px solid var(--sv-border-1); }
  .sidebar .brand, .product-name, .sidebar-bottom { display: none; }
  nav { flex-direction: row; gap: 4px; height: 65px; }
  .nav-item { flex: 1; justify-content: center; flex-direction: column; gap: 4px; width: auto; min-height: 56px; font-size: 10px; border-radius: 0; padding: 7px 2px; }
  .nav-item.active { box-shadow: inset 0 2px 0 var(--sv-fg-1); }
  .topbar { min-height: 58px; padding: 6px 16px; }
  .breadcrumb { font-weight: 600; font-size: 13px; }
  .breadcrumb>span:first-child { display: inline; }
  .breadcrumb>span:last-child { display: none; }
  .system-state { font-size: 10px; gap: 6px; }
  .topbar-right { gap: 6px; }
  .page { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .page-heading { margin-bottom: 20px; }
  h1 { font-size: 24px; }
  .button { font-size: 12px; padding-inline: 12px; }
  #page-connect { padding-bottom: calc(var(--assistant-height) + 90px + env(safe-area-inset-bottom)); }
  .assistant-card { bottom: calc(66px + env(safe-area-inset-bottom)); padding: 12px 16px; }
  .talk-button { min-height: 68px; font-size: 16px; }
  .directory-search input, .settings-card input:not([type='checkbox']), .settings-card select, dialog input, dialog select { font-size: 16px; }
  .directory-search input::placeholder { font-size: 13px; }
  .panel-heading { padding: 16px; }
  .panel-heading h2 { font-size: 14px; }
  .directory-search { margin-inline: 16px; }
  .directory-columns { grid-template-columns: minmax(0, 1fr) 68px 68px; gap: 8px; }
  .person-card { grid-template-columns: minmax(0, 1fr) 68px 68px; gap: 8px; }
  .person-card>.avatar { display: none; }
  .person-card .button { padding: 10px 6px; }
  #call-active { padding-inline: 16px; }
  .call-person { margin-top: 4px; }
  .call-actions .button { min-height: 48px; }
  .language-setting { padding-inline: 16px; }
  .activity-section { margin-top: 16px; }
  summary { padding-inline: 16px; }
  .activity-row { grid-template-columns: 58px 1fr; gap: 6px 10px; }
  .activity-row .message { grid-column: 2; }
  .activity-toolbar, .diagnostics { padding-inline: 16px; }
  .activity { padding-inline: 16px; }
  .settings-card { padding: 20px; }
  .settings-card .button { width: 100%; }
  .toast { right: 16px; bottom: calc(82px + env(safe-area-inset-bottom)); }
  body:has(#page-connect:not([hidden])) .toast { bottom: calc(var(--assistant-height) + 82px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
.assistant-response { font-size: 12px; color: var(--sv-fg-2); margin-top: 12px; max-height: 110px; overflow: auto; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .call-card:not([data-state='incoming']):not([data-state='calling']):not([data-state='connected']) .call-idle { display: none; }
}
.remote-activity { padding: 14px 0 4px; border-block: 1px solid var(--sv-border-1); color: var(--sv-fg-2); }
.remote-activity-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; font-size: 11px; min-height: 20px; }
#remote-speech-label { overflow-wrap: anywhere; }
#translation-progress { color: var(--sv-fg-1); font-weight: 600; }
#remote-waveform { display: block; width: 100%; height: 42px; margin-top: 8px; }
#enable-call-sound { font-size: 11px; }
@media (max-width: 640px) { .topbar:has(#enable-call-sound:not([hidden])) .breadcrumb { display: none; } .topbar:has(#enable-call-sound:not([hidden])) .topbar-right { width: 100%; justify-content: space-between; } }
