:root {
  color-scheme: light dark;
  --bg: var(--tg-theme-bg-color, #0e1621);
  --surface: var(--tg-theme-secondary-bg-color, #17212b);
  --surface-2: color-mix(in srgb, var(--surface) 88%, white 12%);
  --surface-3: color-mix(in srgb, var(--surface) 78%, black 22%);
  --text: var(--tg-theme-text-color, #f5f7fa);
  --muted: var(--tg-theme-hint-color, #8c98a4);
  --link: var(--tg-theme-link-color, #5aa7e8);
  --accent: var(--tg-theme-button-color, #0a84ff);
  --accent-text: var(--tg-theme-button-text-color, #ffffff);
  --separator: color-mix(in srgb, var(--muted) 24%, transparent);
  --hairline: color-mix(in srgb, var(--muted) 18%, transparent);
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --danger: #ff6675;
  --danger-soft: rgba(255,102,117,.12);
  --warning: #f3c969;
  --warning-soft: rgba(243,201,105,.12);
  --success: #72d572;
  --success-soft: rgba(114,213,114,.12);
  --radius-xl: 18px;
  --radius-lg: 14px;
  --radius-md: 11px;
  --tap: 46px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; min-width: 0; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; width: 100%; max-width: 100%; min-width: 320px; min-height: 100%; background: var(--bg); color: var(--text); overflow-x: hidden; }
html { overscroll-behavior-x: none; }
body { font-size: 15px; line-height: 1.42; -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%; }
button, input, select, textarea { font: inherit; }
button, select, input, textarea { max-width: 100%; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { opacity: .42; cursor: not-allowed; }
a { color: var(--link); }
h1, h2, h3, p { margin-top: 0; }
h1 { margin: 0; font-size: 22px; line-height: 1.12; letter-spacing: -.025em; }
h2 { margin: 0 0 7px; font-size: clamp(22px, 5vw, 30px); line-height: 1.15; letter-spacing: -.025em; }
h3 { margin: 0; font-size: 18px; line-height: 1.2; letter-spacing: -.012em; }
code { color: var(--accent); overflow-wrap: anywhere; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.app-shell { width: 100%; min-height: 100dvh; background: var(--bg); }
.shell { width: 100%; max-width: 980px; margin: 0 auto; padding: 10px clamp(10px, 3.5vw, 20px) calc(36px + var(--safe-bottom)); overflow-x: clip; }
.main { min-height: 100dvh; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin: -10px calc(clamp(10px, 3.5vw, 20px) * -1) 8px;
  padding: 10px clamp(10px, 3.5vw, 20px);
  background: color-mix(in srgb, var(--bg) 91%, transparent);
  border-bottom: 1px solid var(--separator);
  backdrop-filter: saturate(160%) blur(18px); -webkit-backdrop-filter: saturate(160%) blur(18px);
}
.app-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-mark { flex: 0 0 38px; width: 38px; height: 38px; object-fit: cover; border-radius: 11px; box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 4px 14px rgba(0,0,0,.18); }
.app-identity > div { min-width: 0; }
.app-identity h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-identity p { margin: 2px 0 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.status-cluster { display: flex; align-items: center; gap: 7px; }
.status-label { color: var(--muted); font-size: 12px; }
.status-dot { flex: 0 0 8px; width: 8px; height: 8px; border-radius: 50%; background: #66717d; }
.status-dot.online { background: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }

.tabs {
  position: sticky; top: 59px; z-index: 25;
  display: flex; gap: 4px; width: 100%; margin: 0 0 14px; padding: 4px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scrollbar-width: none;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border: 1px solid var(--separator); border-radius: 13px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs button {
  flex: 0 0 auto; min-width: 82px; min-height: 38px; padding: 8px 12px;
  border: 0; border-radius: 10px; color: var(--muted); background: transparent; box-shadow: none;
  font-weight: 560; scroll-snap-align: center; white-space: nowrap;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.tabs button:active { transform: scale(.985); }
.tabs button.active { color: var(--text); background: color-mix(in srgb, var(--accent) 18%, var(--surface)); font-weight: 700; }

.page-heading { display: grid; gap: 4px; padding: 7px 2px 14px; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.eyebrow { color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.content { width: 100%; }
.loading { min-height: 240px; display: grid; place-items: center; align-content: center; gap: 12px; color: var(--muted); padding: 24px; text-align: center; }
.loading::before { content: ""; width: 24px; height: 24px; border: 2px solid color-mix(in srgb, var(--muted) 26%, transparent); border-top-color: var(--accent); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.grid { display: grid; gap: 12px; }
.grid.stats { grid-template-columns: repeat(4, minmax(0,1fr)); margin-bottom: 12px; }
.grid.two { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.section-gap { margin-top: 12px; }

.card, .entity-card {
  width: 100%; max-width: 100%; min-width: 0;
  background: var(--surface); border: 1px solid var(--separator); border-radius: var(--radius-xl);
  box-shadow: 0 1px 0 rgba(255,255,255,.025) inset;
}
.card { padding: clamp(15px, 3.6vw, 20px); overflow: hidden; }
.entity-card { padding: 15px; }
.card h2, .card h3 { margin-bottom: 10px; }
.card h2 { font-size: 18px; }
.card h3, .entity-card h3 { font-size: 16px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.card-head h2, .card-head h3 { margin: 0; }
.stat-card { min-height: 106px; padding: 15px; display: grid; align-content: space-between; gap: 8px; }
.stat-label, .stat-note { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.stat-value { font-size: clamp(22px,4vw,28px); line-height: 1.08; font-weight: 700; letter-spacing: -.035em; }

.toolbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .spacer { margin-left: auto; }
.button {
  min-height: 42px; padding: 9px 14px; border: 0; border-radius: var(--radius-md);
  color: var(--text); background: color-mix(in srgb, var(--surface) 74%, white 8%);
  box-shadow: inset 0 0 0 1px var(--separator);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-weight: 620; transition: opacity .15s ease, transform .15s ease, background .15s ease;
}
.button:active { transform: scale(.985); }
.button.primary { color: var(--accent-text); background: var(--accent); box-shadow: none; font-weight: 700; }
.button.danger { color: #ffb7be; background: var(--danger-soft); box-shadow: inset 0 0 0 1px rgba(255,102,117,.38); }
.button.success { color: #b9f0b9; background: var(--success-soft); box-shadow: inset 0 0 0 1px rgba(114,213,114,.28); }
.button.ghost { background: transparent; box-shadow: inset 0 0 0 1px var(--separator); }
.button.small { min-height: 34px; padding: 7px 10px; border-radius: 9px; font-size: 12px; }
.button.full { width: 100%; }
.icon-button { min-height: 40px; padding: 8px 12px; border-radius: 10px; }
.refresh-symbol { display: none; font-size: 20px; line-height: 1; }

.badge {
  display: inline-flex; align-items: center; justify-content: center; min-height: 25px; max-width: 100%;
  padding: 4px 8px; border-radius: 999px; font-size: 11px; line-height: 1; font-weight: 700;
  background: color-mix(in srgb, var(--surface) 82%, white 9%); color: var(--muted); white-space: nowrap;
}
.badge.running,.badge.active,.badge.transferred,.badge.completed,.badge.ready { color: var(--success); background: var(--success-soft); }
.badge.failed,.badge.error,.badge.stopped { color: #ffadb6; background: var(--danger-soft); }
.badge.paused,.badge.dialing,.badge.queued,.badge.transferring,.badge.retry { color: var(--warning); background: var(--warning-soft); }

.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; border-radius: 12px; }
table { width: 100%; min-width: 700px; border-collapse: collapse; }
th, td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--separator); font-size: 13px; vertical-align: middle; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
td { overflow-wrap: anywhere; }
tr:last-child td { border-bottom: 0; }
.clickable { cursor: pointer; }
.clickable:active td { background: color-mix(in srgb,var(--accent) 7%, transparent); }

.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.field { display: grid; gap: 7px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 600; }
.field.full { grid-column: 1/-1; }
.field label { color: var(--muted); font-size: 12px; font-weight: 600; }
.field small { color: var(--muted); font-size: 11px; line-height: 1.4; font-weight: 400; }
.field input, .field textarea, .field select, .toolbar select {
  width: 100%; min-height: 44px; padding: 10px 12px; color: var(--text); background: var(--surface-3);
  border: 1px solid var(--separator); border-radius: 10px; outline: none;
}
.field textarea { min-height: 112px; resize: vertical; line-height: 1.45; }
.field input:focus, .field textarea:focus, .field select:focus, .toolbar select:focus { border-color: color-mix(in srgb, var(--accent) 65%, transparent); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 10px 11px; border-radius: 10px; color: var(--text); background: color-mix(in srgb, var(--surface) 82%, white 4%); }
.switch-row small { display: block; margin-top: 3px; }
.switch { position: relative; width: 45px; height: 27px; flex: 0 0 auto; }
.switch input { opacity: 0; position: absolute; }
.switch i { position: absolute; inset: 0; background: #74777d; border-radius: 999px; transition: .18s; }
.switch i::after { content: ""; position: absolute; width: 23px; height: 23px; left: 2px; top: 2px; background: white; border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: .18s; }
.switch input:checked + i { background: #34c759; }
.switch input:checked + i::after { transform: translateX(18px); }

.wizard-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 12px; align-items: start; }
.wizard-steps { padding: 7px; display: grid; align-content: start; gap: 3px; background: var(--surface); border: 1px solid var(--separator); border-radius: var(--radius-xl); }
.wizard-step { min-height: 42px; border: 0; background: transparent; box-shadow: none; color: var(--text); padding: 8px 9px; border-radius: 10px; display: flex; align-items: center; gap: 9px; text-align: left; font-size: 12px; }
.wizard-step b { width: 25px; height: 25px; flex: 0 0 25px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; color: var(--muted); font-size: 10px; }
.wizard-step.active { background: color-mix(in srgb,var(--accent) 18%,var(--surface)); color: var(--text); font-weight: 700; }
.wizard-step.active b, .wizard-step.done b { background: var(--accent); color: var(--accent-text); }
.wizard-content { padding: clamp(15px,3.6vw,20px); background: var(--surface); border: 1px solid var(--separator); border-radius: var(--radius-xl); }
.wizard-actions { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.step-description { color: var(--muted); font-size: 12px; line-height: 1.5; margin: -3px 0 18px; }
.diagnostics { display: grid; gap: 0; }
.diagnostic { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--separator); }
.diagnostic:last-child { border-bottom: 0; }
.diagnostic-state { font-size: 11px; color: var(--muted); }

.list-cards { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 10px; }
.entity-card h3 { margin: 0 0 8px; }
.entity-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; color: var(--muted); font-size: 11px; }
.entity-actions { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.empty { color: var(--muted); text-align: center; padding: 28px 12px; font-size: 12px; }
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 5px; }

.transcript { display: grid; gap: 9px; }
.bubble { width: min(84%,640px); background: var(--surface-3); border: 1px solid var(--separator); border-radius: 16px 16px 16px 5px; padding: 10px 12px; font-size: 12px; line-height: 1.45; }
.bubble.assistant { margin-left: auto; background: color-mix(in srgb,var(--accent) 13%,var(--surface)); border-radius: 16px 16px 5px 16px; }
.bubble small { display: block; color: var(--muted); margin-top: 5px; font-size: 9px; }

.voice-test-layout { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 12px; }
.voice-control { padding: clamp(16px,4vw,22px); }
.voice-orb-wrap { display: grid; justify-items: center; gap: 12px; margin: 24px 0 18px; }
.voice-orb { width: 150px; height: 150px; border-radius: 50%; display: grid; place-items: center; position: relative; color: white; background: radial-gradient(circle at 40% 34%, #49b5ff, #0a84ff 50%, #5e5ce6 100%); box-shadow: 0 16px 42px rgba(10,132,255,.22), inset 0 1px 1px rgba(255,255,255,.45); }
.voice-orb::before,.voice-orb::after { content:""; position:absolute; border-radius:50%; border:1px solid color-mix(in srgb,var(--accent) 28%,transparent); }
.voice-orb::before { inset:-12px; }
.voice-orb::after { inset:-23px; opacity:.5; }
.voice-orb span { font-size:34px; font-weight:300; }
.voice-meter { width:min(100%,360px); height:8px; background:var(--surface-3); border-radius:999px; overflow:hidden; }
.voice-meter i { display:block; height:100%; width:2%; transform-origin:left center; border-radius:inherit; background:var(--accent); transition:transform 65ms linear; }
.voice-state { display:flex; align-items:center; gap:8px; font-size:13px; }
.voice-status-dot { width:9px; height:9px; border-radius:50%; background:var(--muted); box-shadow:0 0 0 5px color-mix(in srgb,var(--muted) 10%,transparent); }
.voice-status-dot.listening { background:var(--success); box-shadow:0 0 0 5px var(--success-soft); }
.voice-status-dot.thinking,.voice-status-dot.transcribing,.voice-status-dot.synthesizing { background:var(--accent); box-shadow:0 0 0 5px var(--accent-soft); }
.voice-status-dot.error { background:var(--danger); }
.voice-actions { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.voice-actions .primary { grid-column:1/-1; }
.voice-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:16px; }
.voice-metrics > div { border:1px solid var(--separator); border-radius:13px; padding:10px; background:var(--surface-3); }
.voice-metrics small { display:block; color:var(--muted); font-size:9px; margin-bottom:5px; }
.voice-metrics strong { font-size:13px; }
.voice-dialog-card { min-height:520px; display:flex; flex-direction:column; }
.voice-transcript { flex:1; min-height:330px; max-height:570px; overflow:auto; display:flex; flex-direction:column; gap:9px; padding:5px 2px 10px; }
.voice-message { align-self:flex-start; max-width:86%; background:var(--surface-3); border-radius:16px 16px 16px 5px; padding:10px 12px; font-size:12px; line-height:1.45; }
.voice-message.assistant { align-self:flex-end; background:color-mix(in srgb,var(--accent) 13%,var(--surface)); border-radius:16px 16px 5px 16px; }
.voice-message.system { align-self:center; max-width:94%; color:var(--muted); background:transparent; font-size:10px; text-align:center; }
.voice-message-role { color:var(--muted); font-size:9px; margin-bottom:3px; font-weight:600; }
.voice-message small { display:block; color:var(--muted); margin-top:4px; font-size:9px; }
.voice-empty { color:var(--muted); text-align:center; margin:auto; font-size:11px; }
.voice-note,.voice-warning { margin-top:10px; color:var(--muted); font-size:10px; line-height:1.45; }
.voice-warning { color:var(--warning); }

.modal { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:20px; }
.modal-backdrop { position:absolute; inset:0; background:rgba(0,0,0,.32); backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }
.modal-panel { position:relative; width:min(720px,100%); max-height:min(86dvh,860px); overflow:hidden; background:color-mix(in srgb,var(--surface) 96%,transparent); border:1px solid var(--separator); border-radius:20px; box-shadow:0 28px 80px rgba(0,0,0,.30); }
.modal-header { padding:13px 15px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--separator); }
.modal-header h2 { margin:0; font-size:17px; }
.modal-close { width:38px; height:38px; padding:0; font-size:23px; }
.modal-body { padding:17px; overflow:auto; max-height:calc(86dvh - 64px); }

.toast-container { position:fixed; left:50%; bottom:max(16px,var(--safe-bottom)); transform:translateX(-50%); z-index:120; display:grid; gap:8px; width:min(430px,calc(100vw - 24px)); pointer-events:none; }
.toast { color:var(--text); background:color-mix(in srgb,var(--surface) 92%,black 8%); border:1px solid var(--separator); border-radius:13px; padding:12px 14px; box-shadow:0 12px 32px rgba(0,0,0,.30); font-size:12px; white-space:pre-wrap; overflow-wrap:anywhere; backdrop-filter:blur(18px); }
.toast.error { color:#ffb6bd; border-color:rgba(255,102,117,.38); }
.toast.success { color:#b8efb8; border-color:rgba(114,213,114,.32); }

.auth-gate { position:fixed; inset:0; z-index:200; display:grid; place-items:center; padding:20px; background:var(--bg); }
.auth-card { width:min(390px,100%); background:var(--surface); border:1px solid var(--separator); border-radius:22px; padding:26px; text-align:center; }
.auth-logo { width:72px; height:72px; object-fit:cover; border-radius:20px; margin:0 auto 16px; box-shadow:0 12px 30px rgba(0,0,0,.22); }
.auth-card h1 { margin:5px 0 8px; font-size:23px; }
.auth-card p { color:var(--muted); line-height:1.5; font-size:12px; }
.auth-card input { width:100%; min-height:44px; margin:9px 0; border:1px solid var(--separator); border-radius:10px; padding:10px 12px; background:var(--surface-3); color:var(--text); outline:none; }

@media (max-width: 800px) {
  .grid.stats { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .voice-test-layout { grid-template-columns:1fr; }
  .voice-dialog-card { min-height:420px; }
  .wizard-layout { grid-template-columns:1fr; }
  .wizard-steps { display:flex; overflow-x:auto; scrollbar-width:none; scroll-snap-type:x proximity; }
  .wizard-steps::-webkit-scrollbar { display:none; }
  .wizard-step { flex:0 0 auto; min-width:126px; scroll-snap-align:start; }
}

@media (max-width: 640px) {
  .shell { padding-left:10px; padding-right:10px; }
  .topbar { margin-left:-10px; margin-right:-10px; padding-left:10px; padding-right:10px; }
  .status-label { display:none; }
  .refresh-label { display:none; }
  .refresh-symbol { display:inline; }
  .refresh-control { width:40px; padding:0; }
  .tabs { top:59px; border-radius:12px; margin-bottom:12px; }
  .tabs button { min-width:76px; padding-inline:10px; }
  .page-heading { padding-top:5px; }
  .form-grid { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .grid.two,.grid.three { grid-template-columns:1fr; }
  .card,.wizard-content,.wizard-steps { border-radius:16px; }
  .wizard-actions { display:grid; grid-template-columns:1fr 1fr; }
  .wizard-actions .primary { grid-column:1/-1; }
  .modal { align-items:end; padding:0; }
  .modal-panel { width:100%; max-height:89dvh; border-radius:22px 22px 0 0; border-bottom:0; }
  .modal-body { max-height:calc(89dvh - 58px); padding-bottom:calc(18px + var(--safe-bottom)); }
  .toast-container { bottom:calc(14px + var(--safe-bottom)); }
  .voice-control { padding:16px; }
  .voice-orb { width:132px; height:132px; }

  .table-wrap table { min-width:0; }
  .table-wrap thead { display:none; }
  .table-wrap tbody { display:grid; gap:10px; }
  .table-wrap tr { display:grid; padding:6px 13px; border:1px solid var(--separator); border-radius:13px; background:var(--surface-3); }
  .table-wrap td { display:grid; grid-template-columns:minmax(96px,.75fr) minmax(0,1.25fr); gap:10px; padding:9px 0; border-bottom:1px solid var(--separator); text-align:right; }
  .table-wrap td:last-child { border-bottom:0; }
  .table-wrap td::before { color:var(--muted); text-align:left; font-size:11px; }
  .table-wrap td:nth-child(1)::before { content:'Дата'; }
  .table-wrap td:nth-child(2)::before { content:'Контакт'; }
  .table-wrap td:nth-child(3)::before { content:'Кампания'; }
  .table-wrap td:nth-child(4)::before { content:'Статус'; }
  .table-wrap td:nth-child(5)::before { content:'Результат'; }
  .table-wrap td:nth-child(6)::before { content:'Время'; }
}

@media (max-width: 420px) {
  body { font-size:14px; }
  .app-mark { flex-basis:36px; width:36px; height:36px; }
  .app-identity h1 { font-size:20px; }
  .app-identity p { max-width:210px; }
  h2 { font-size:23px; }
  .card,.wizard-content { padding:14px; }
  .stat-card { min-height:96px; padding:13px; }
  .stat-value { font-size:21px; }
  .voice-metrics { gap:6px; }
}

@media (max-width: 360px) {
  .app-identity p { display:none; }
  .tabs button { min-width:72px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; transition-duration:.01ms !important; animation-duration:.01ms !important; }
}

/* ===== v3.3.1 mobile repair: single SmartMoney/Apple shell ===== */
html.ui-v331, html.ui-v331 body { overflow-x: hidden !important; }
.ui-v331 .sidebar,
.ui-v331 .sidebar-overlay,
.ui-v331 .mobile-bottom-nav,
.ui-v331 .bottom-nav,
.ui-v331 .bottom-navigation,
.ui-v331 .legacy-nav,
.ui-v331 #bottomNav,
.ui-v331 #mobileNav,
.ui-v331 [data-legacy-nav] { display: none !important; visibility: hidden !important; pointer-events: none !important; }
.ui-v331 .app-shell { display: block !important; width: 100% !important; max-width: none !important; min-height: 100dvh !important; padding: 0 !important; margin: 0 !important; }
.ui-v331 .shell { display: block !important; width: 100% !important; max-width: 980px !important; margin: 0 auto !important; padding: 10px clamp(10px,3.5vw,20px) calc(28px + env(safe-area-inset-bottom,0px)) !important; overflow: clip !important; }
.ui-v331 .topbar { min-height: 58px !important; }
.ui-v331 .tabs { display: flex !important; flex-flow: row nowrap !important; align-items: center !important; width: 100% !important; max-width: 100% !important; overflow-x: auto !important; overflow-y: hidden !important; -webkit-overflow-scrolling: touch !important; }
.ui-v331 .tabs > button { appearance: none !important; -webkit-appearance: none !important; flex: 0 0 auto !important; width: auto !important; max-width: none !important; margin: 0 !important; border: 0 !important; box-shadow: none !important; background: transparent !important; color: var(--muted) !important; white-space: nowrap !important; }
.ui-v331 .tabs > button.active { background: color-mix(in srgb,var(--accent) 18%,var(--surface)) !important; color: var(--text) !important; }
.ui-v331 .page-heading { position: relative !important; z-index: 1 !important; margin: 0 !important; }
.ui-v331 .content { position: relative !important; z-index: 1 !important; padding-bottom: 0 !important; }
.ui-v331 .wizard-layout { width: 100% !important; max-width: 100% !important; }
.ui-v331 .wizard-content { min-width: 0 !important; }
.ui-v331 .field input,
.ui-v331 .field select,
.ui-v331 .field textarea { font-size: 16px !important; }

@media (max-width: 640px) {
  .ui-v331 .shell { padding-left: 12px !important; padding-right: 12px !important; }
  .ui-v331 .topbar { margin-left: -12px !important; margin-right: -12px !important; padding: 9px 12px !important; }
  .ui-v331 .app-identity { gap: 9px !important; }
  .ui-v331 .app-identity p { display: none !important; }
  .ui-v331 .app-identity h1 { font-size: 18px !important; max-width: 210px !important; }
  .ui-v331 .app-mark { width: 36px !important; height: 36px !important; flex-basis: 36px !important; }
  .ui-v331 .tabs { top: 56px !important; margin: 0 0 12px !important; padding: 4px !important; border-radius: 12px !important; }
  .ui-v331 .tabs > button { min-width: auto !important; min-height: 36px !important; padding: 7px 11px !important; border-radius: 9px !important; font-size: 13px !important; }
  .ui-v331 .page-heading { padding: 5px 2px 12px !important; }
  .ui-v331 .page-heading .eyebrow { display: none !important; }
  .ui-v331 .page-heading h2 { font-size: 25px !important; margin-bottom: 4px !important; }
  .ui-v331 .page-heading p { font-size: 13px !important; }
  .ui-v331 .wizard-layout { grid-template-columns: 1fr !important; gap: 10px !important; }
  .ui-v331 .wizard-steps { display: flex !important; flex-flow: row nowrap !important; overflow-x: auto !important; padding: 5px !important; }
  .ui-v331 .wizard-step { flex: 0 0 auto !important; min-width: 112px !important; min-height: 38px !important; padding: 6px 8px !important; }
  .ui-v331 .wizard-step b { width: 24px !important; height: 24px !important; flex-basis: 24px !important; }
  .ui-v331 .wizard-content { padding: 16px !important; }
  .ui-v331 .wizard-actions { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 9px !important; }
  .ui-v331 .wizard-actions .primary { grid-column: 1 / -1 !important; }
  .ui-v331 .card, .ui-v331 .entity-card { border-radius: 16px !important; }
  .ui-v331 .voice-test-layout { grid-template-columns: 1fr !important; }
  .ui-v331 .toast-container { bottom: calc(14px + env(safe-area-inset-bottom,0px)) !important; }
}

@media (max-width: 380px) {
  .ui-v331 .app-identity h1 { max-width: 175px !important; }
  .ui-v331 .status-cluster { display: none !important; }
  .ui-v331 .tabs > button { padding-inline: 10px !important; font-size: 12.5px !important; }
}
