:root {
  --bg: #eef2f5;
  --surface: #ffffff;
  --surface-soft: #f7f9fb;
  --ink: #1f2933;
  --muted: #64748b;
  --line: #dfe4ea;
  --sidebar: #18232c;
  --sidebar-deep: #101a21;
  --sidebar-text: #c8d6de;
  --primary: #0e7490;
  --primary-strong: #155e75;
  --primary-soft: #e0f2f4;
  --accent: #2563eb;
  --accent-soft: #e8efff;
  --success: #067647;
  --success-soft: #e6f4ea;
  --danger: #b42318;
  --danger-soft: #fee4e2;
  --warn: #b54708;
  --warn-soft: #fef0c7;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

code {
  font-family: Consolas, "Courier New", monospace;
}

/* ---------- Auth ---------- */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px 18px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 8px;
}

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: var(--shadow);
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.brand-mark svg.lucide {
  width: 24px;
  height: 24px;
}

.auth-title {
  font-size: 22px;
  font-weight: 700;
}

.auth-sub {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px 24px;
}

.auth-card h2 {
  font-size: 20px;
  font-weight: 700;
}

.auth-card .auth-subline {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
}

.auth-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: var(--bg);
  border-radius: var(--radius);
  padding: 3px;
  margin: 18px 0;
}

.auth-tab {
  height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  flex: 1 1 auto;
  min-width: 84px;
}

.auth-tab.active {
  background: var(--surface);
  color: var(--primary-strong);
  font-weight: 600;
  box-shadow: var(--shadow);
}

.test-card {
  width: 100%;
  max-width: 440px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.test-card h3 {
  margin: 0 0 10px;
  font-size: 14px;
}

.test-rows {
  display: grid;
  gap: 8px;
}

.test-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--surface-soft);
  font-size: 13px;
}

.test-row .role {
  color: var(--muted);
}

.test-row code {
  color: var(--primary-strong);
  font-size: 12px;
}

/* ---------- Forms ---------- */

.form-grid {
  display: grid;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.field .req {
  color: var(--danger);
}

.input,
.select {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus,
.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 116, 144, 0.12);
}

textarea.input {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn svg.lucide {
  width: 15px;
  height: 15px;
}

.btn:hover {
  background: var(--surface-soft);
  border-color: var(--primary);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-strong);
}

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #05603a;
}

.btn-danger {
  background: var(--danger-soft);
  border-color: #f4b5af;
  color: var(--danger);
}

.btn-danger:hover {
  background: #fcdad6;
}

.btn-ghost {
  color: var(--muted);
}

.btn-ghost:hover {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
}

.btn.stretch {
  width: 100%;
}

.notice {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  padding: 11px 13px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.55;
}

.notice svg.lucide {
  width: 16px;
  height: 16px;
  margin-top: 1px;
}

.notice-info {
  background: var(--accent-soft);
  color: #1d4ed8;
  border-left: 3px solid var(--accent);
}

.notice-warn {
  background: var(--warn-soft);
  color: var(--warn);
  border-left: 3px solid var(--warn);
}

.notice-success {
  background: var(--success-soft);
  color: var(--success);
  border-left: 3px solid var(--success);
}

.notice-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-left: 3px solid var(--danger);
}

/* ---------- Shell ---------- */

.shell {
  min-height: 100vh;
  display: flex;
}

.sidebar {
  width: 232px;
  flex: 0 0 232px;
  min-height: 100vh;
  background: var(--sidebar);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}

.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 2px 4px 18px;
  border-bottom: 1px solid rgba(200, 214, 222, 0.14);
  margin-bottom: 14px;
}

.sidebar .brand-mark {
  width: 38px;
  height: 38px;
}

.sidebar .brand-text h1 {
  margin: 0;
  font-size: 15px;
  color: #fff;
}

.sidebar .brand-text p {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--sidebar-text);
  opacity: 0.8;
}

.nav {
  display: grid;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--sidebar-text);
  font-size: 13px;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.nav-item svg.lucide {
  width: 17px;
  height: 17px;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-item.active {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(200, 214, 222, 0.14);
}

.sidebar-foot .user-line {
  font-size: 12px;
  color: var(--sidebar-text);
  padding: 4px 8px 10px;
}

.sidebar-foot .user-line b {
  color: #fff;
}

.main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  flex: 0 0 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 24px;
}

.topbar-title {
  font-size: 16px;
  font-weight: 700;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.role-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--muted);
}

.role-pill b {
  color: var(--primary-strong);
}

.content {
  flex: 1 1 auto;
  padding: 24px;
  max-width: 1240px;
  width: 100%;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.page-head h2 {
  margin: 0;
  font-size: 20px;
}

.page-head p {
  margin: 5px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ---------- Cards / stats ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 12px;
}

.card-head h3 {
  margin: 0;
  font-size: 15px;
}

.card-head svg.lucide {
  width: 18px;
  height: 18px;
  color: var(--primary);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
}

.stat-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-icon svg.lucide {
  width: 21px;
  height: 21px;
}

.stat-icon.amber {
  background: var(--warn-soft);
  color: var(--warn);
}

.stat-icon.green {
  background: var(--success-soft);
  color: var(--success);
}

.stat-icon.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.stat-meta b {
  display: block;
  font-size: 20px;
  line-height: 1.25;
}

.stat-meta span {
  font-size: 12px;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-card .product-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
  display: grid;
  place-items: center;
}

.product-card .product-icon svg.lucide {
  width: 18px;
  height: 18px;
}

.product-card h4 {
  margin: 0;
  font-size: 15px;
}

.product-card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.65;
  flex: 1 1 auto;
}

.tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--muted);
}

.clause-list {
  display: grid;
  gap: 10px;
}

.clause-item {
  display: flex;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 14px;
}

.clause-item .term {
  flex: 0 0 96px;
  font-weight: 700;
  color: var(--primary-strong);
}

.clause-item p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- Tables ---------- */

.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

th,
td {
  text-align: left;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  vertical-align: top;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
}

tr:last-child td {
  border-bottom: 0;
}

td .actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-pending {
  background: var(--warn-soft);
  color: var(--warn);
}

.badge-processed {
  background: var(--success-soft);
  color: var(--success);
}

.badge-closed {
  background: var(--line);
  color: var(--muted);
}

.badge-active {
  background: var(--success-soft);
  color: var(--success);
}

.badge-disabled {
  background: var(--danger-soft);
  color: var(--danger);
}

.empty {
  padding: 26px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

/* ---------- Voice page ---------- */

.voice-layout {
  display: grid;
  gap: 14px;
}

.voice-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 20px 24px;
  display: flex;
  align-items: center;
  gap: 22px;
  box-shadow: var(--shadow);
  flex-wrap: wrap;
}

.mic-btn {
  flex: 0 0 auto;
  width: 92px;
  height: 92px;
  border: none;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 8px 20px rgba(14, 116, 144, 0.28);
}

.mic-btn svg {
  width: 38px;
  height: 38px;
}

.mic-btn:hover {
  background: var(--primary-strong);
  transform: translateY(-2px);
}

.mic-btn.recording {
  background: var(--danger);
  box-shadow: 0 8px 24px rgba(180, 35, 24, 0.38);
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.1); opacity: 0.72; }
}

.voice-hint {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 200px;
}

.voice-hint strong {
  font-size: 18px;
}

.voice-hint span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.dialect-row {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dialect-row label {
  font-size: 13px;
  color: var(--muted);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px 20px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.panel-head h3 {
  margin: 0;
  font-size: 15px;
}

.step {
  width: 28px;
  height: 28px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.engine-tag {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 4px 8px;
  white-space: nowrap;
}

.panel-text {
  margin: 0;
  min-height: 52px;
  font-size: 15px;
  line-height: 1.8;
  white-space: pre-wrap;
  word-break: break-word;
}

.interim {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--danger);
}

.thinking {
  display: flex;
  gap: 6px;
  align-items: center;
  min-height: 24px;
  margin-top: 12px;
}

.thinking span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  animation: bounce 1.2s ease-in-out infinite;
}

.thinking span:nth-child(2) {
  animation-delay: 0.15s;
}

.thinking span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(-6px); opacity: 1; }
}

.action-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}

.text-btn svg {
  width: 14px;
  height: 14px;
}

.text-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.text-btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.text-btn.primary:hover {
  background: var(--primary-strong);
}

.text-btn.ghost {
  color: var(--muted);
}

.text-btn.ghost:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-row .input {
  flex: 1;
}

.chips {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.chip {
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 7px 13px;
  font-size: 13px;
  color: var(--ink);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.chip:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-strong);
}

.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.check-row input {
  accent-color: var(--primary);
}

/* ---------- Modal / toast ---------- */

.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 50;
}

.modal {
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.24);
  padding: 20px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.modal-head h3 {
  margin: 0;
  font-size: 17px;
}

.call-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 14px;
}

.call-status.active {
  background: var(--success-soft);
  color: var(--success);
}

.call-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  animation: pulse 1.2s ease-in-out infinite;
}

.call-status.active .call-dot {
  background: var(--success);
}

.modal audio {
  display: none;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.admin-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.admin-avatar {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary-strong);
  display: grid;
  place-items: center;
}

.admin-avatar svg.lucide {
  width: 18px;
  height: 18px;
}

.admin-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  gap: 3px;
}

.admin-meta b {
  font-size: 14px;
}

.admin-meta span {
  font-size: 12px;
  color: var(--muted);
}

.toast-root {
  position: fixed;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 8px;
  z-index: 60;
}

.toast {
  min-width: 220px;
  max-width: 360px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 11px 14px;
  font-size: 13px;
  animation: toast-in 0.2s ease-out;
}

.toast.success {
  border-left-color: var(--success);
}

.toast.danger {
  border-left-color: var(--danger);
}

.toast.warn {
  border-left-color: var(--warn);
}

@keyframes toast-in {
  from { transform: translateY(-8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .sidebar {
    width: 72px;
    flex-basis: 72px;
    padding: 14px 8px;
  }

  .sidebar .brand-text,
  .sidebar .nav-item span,
  .sidebar-foot .user-line {
    display: none;
  }

  .sidebar .nav-item {
    justify-content: center;
    padding: 12px;
  }

  .content {
    padding: 16px;
  }

  .stat-grid,
  .product-grid,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .voice-card {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .dialect-row {
    margin-left: 0;
    justify-content: center;
  }

  .input-row {
    flex-direction: column;
  }
}

/* ---------- Blue / Gold / Black tech theme ---------- */

:root {
  --bg: #04070d;
  --surface: #0a1522;
  --surface-soft: #0e1b2d;
  --ink: #ddeaf8;
  --muted: #8ea5c4;
  --line: rgba(76, 151, 255, 0.22);
  --sidebar: #050b14;
  --sidebar-deep: #02050a;
  --sidebar-text: #a3b8d3;
  --primary: #0c82ff;
  --primary-strong: #0764db;
  --primary-soft: rgba(16, 128, 255, 0.13);
  --accent: #35c8ff;
  --accent-soft: rgba(53, 200, 255, 0.12);
  --success: #0aa9d4;
  --success-soft: rgba(16, 170, 255, 0.12);
  --danger: #ff6156;
  --danger-soft: rgba(255, 97, 86, 0.12);
  --warn: #e6b84e;
  --warn-soft: rgba(230, 184, 78, 0.14);
  --gold: #f1c25d;
  --gold-strong: #d9a63c;
  --gold-soft: rgba(241, 194, 93, 0.14);
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.34);
  --radius: 0px;
}

body {
  background-color: #02040a;
  background-image:
    linear-gradient(rgba(36, 100, 190, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 100, 190, 0.05) 1px, transparent 1px),
    linear-gradient(165deg, rgba(9, 42, 90, 0.5), rgba(2, 5, 10, 0.2) 44%, rgba(10, 40, 92, 0.32)),
    linear-gradient(180deg, #050a13, #020409 56%, #08152a);
  background-size: 46px 46px, 46px 46px, 100% 100%, 100% 100%;
  color: #dbe7f5;
}

::selection {
  background: rgba(241, 194, 93, 0.32);
  color: #ffffff;
}

button:focus-visible,
.btn:focus-visible,
.chip:focus-visible,
.nav-item:focus-visible,
.auth-tab:focus-visible,
.mic-btn:focus-visible,
.text-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.auth-card,
.auth-tabs,
.test-card,
.card,
.panel,
.voice-card,
.stat-card,
.product-card,
.clause-item,
.admin-row,
.table-wrap,
.modal,
.toast,
.call-status {
  background: linear-gradient(150deg, rgba(14, 32, 61, 0.94), rgba(4, 9, 18, 0.98));
  border: 1px solid rgba(54, 140, 255, 0.22);
  border-radius: 0;
  box-shadow: var(--shadow);
}

.auth-card,
.card,
.panel,
.voice-card,
.table-wrap,
.modal,
.toast {
  position: relative;
}

.auth-card::before,
.card::before,
.panel::before,
.voice-card::before,
.table-wrap::before,
.modal::before,
.toast::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(241, 194, 93, 0.95) 0 12%, rgba(57, 150, 255, 0.78) 38%, rgba(241, 194, 93, 0) 80%);
  opacity: 0.85;
}

.product-card,
.stat-card,
.clause-item,
.admin-row {
  background: linear-gradient(160deg, rgba(16, 39, 73, 0.6), rgba(5, 11, 21, 0.92));
  border-color: rgba(44, 121, 255, 0.16);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.26);
}

.sidebar {
  background: linear-gradient(180deg, #0a1528 0%, #040913 52%, #01040a 100%);
  border-right: 1px solid rgba(45, 120, 255, 0.2);
}

.sidebar .brand {
  border-bottom-color: rgba(241, 194, 93, 0.16);
}

.sidebar .brand-text p,
.auth-sub,
.auth-subline,
.page-head p,
.voice-hint span,
.admin-meta span,
.field label,
.dialect-row label,
.check-row {
  color: #8ea5c4;
}

.auth-title,
.auth-card h2,
.sidebar .brand-text h1,
.topbar-title,
.page-head h2,
.card-head h3,
.panel-head h3,
.modal-head h3,
.stat-meta b,
.product-card h4,
.admin-meta b,
.voice-hint strong {
  color: #eef5ff;
}

.main {
  background: linear-gradient(180deg, rgba(10, 20, 38, 0.14), rgba(2, 5, 10, 0.44));
}

.topbar {
  background: rgba(7, 15, 28, 0.9);
  border-bottom-color: rgba(54, 140, 255, 0.2);
}

.brand-mark {
  border-radius: 0;
  background: linear-gradient(145deg, #0b66e6, #0a1d38 64%, #060c15);
  color: #f4c45c;
  box-shadow: none;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.btn {
  position: relative;
  border: 0;
  border-radius: 0;
  padding: 10px 18px;
  background: linear-gradient(180deg, rgba(34, 116, 233, 0.24), rgba(6, 15, 29, 0.96));
  color: #d9e9fb;
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 50%, calc(100% - 8px) 100%, 8px 100%, 0 50%);
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.btn::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 5px;
  bottom: 1px;
  height: 1px;
  background: linear-gradient(90deg, rgba(241, 194, 93, 0.85), rgba(241, 194, 93, 0) 58%);
  pointer-events: none;
}

.btn:hover {
  background: linear-gradient(180deg, rgba(31, 142, 255, 0.5), rgba(9, 29, 60, 0.96));
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-primary,
.btn-success,
.btn-danger,
.text-btn.primary {
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 50%, calc(100% - 15px) 100%, 0 100%);
}

.btn-primary {
  background: linear-gradient(115deg, #0044bb 0%, #0a6df0 42%, #00a6ff 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 10, 30, 0.35);
}

.btn-primary:hover {
  background: linear-gradient(115deg, #0a53c6 0%, #0084ff 100%);
}

.btn-success {
  background: linear-gradient(115deg, #b4862a 0%, #f1c25d 52%, #ffd982 100%);
  color: #141005;
}

.btn-success:hover {
  background: linear-gradient(115deg, #c9972e 0%, #ffd16c 100%);
}

.btn-danger {
  background: linear-gradient(115deg, #8e1716 0%, #e64c43 48%, #ff8d63 100%);
  color: #ffffff;
}

.btn-danger:hover {
  background: linear-gradient(115deg, #a9201b 0%, #ff6a4d 100%);
}

.btn-ghost {
  background: rgba(14, 34, 64, 0.42);
  color: #b6cae3;
}

.btn-ghost:hover {
  background: rgba(255, 97, 86, 0.16);
  color: #ffb9b4;
}

.btn-sm {
  padding: 6px 12px 6px 10px;
  font-size: 12px;
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 50%, calc(100% - 5px) 100%, 5px 100%, 0 50%);
}

.btn-sm.btn-primary,
.btn-sm.btn-success,
.btn-sm.btn-danger {
  clip-path: polygon(0 0, calc(100% - 11px) 0, 100% 50%, calc(100% - 11px) 100%, 0 100%);
}

.auth-tabs {
  background: rgba(3, 8, 15, 0.78);
  border-color: rgba(54, 140, 255, 0.18);
  border-radius: 0;
  padding: 4px;
  box-shadow: none;
}

.auth-tab {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #8ea5c4;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
  transition: background 0.15s ease, color 0.15s ease;
}

.auth-tab:hover {
  color: #d8e9ff;
  background: rgba(17, 108, 242, 0.22);
}

.auth-tab.active {
  background: linear-gradient(90deg, #0a69e0, #0e91ff);
  color: #ffffff;
  font-weight: 700;
}

/* ---------- Control-room refinement ---------- */
:root {
  --ui-radius: 10px;
  --ui-radius-sm: 7px;
  --ui-line: rgba(111, 168, 236, 0.19);
  --ui-glow: rgba(31, 144, 255, 0.2);
}

body {
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background: radial-gradient(circle at 78% 8%, rgba(42, 145, 255, 0.16), transparent 30%),
    radial-gradient(circle at 18% 88%, rgba(241, 194, 93, 0.07), transparent 28%);
  z-index: -1;
}

.shell {
  animation: shell-in 0.45s ease both;
}

@keyframes shell-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.sidebar {
  position: relative;
  box-shadow: 10px 0 34px rgba(0, 0, 0, 0.2);
}

.sidebar::after {
  content: "";
  position: absolute;
  top: 88px;
  right: -1px;
  width: 1px;
  height: 96px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  opacity: 0.8;
  animation: rail-pulse 3.4s ease-in-out infinite;
}

@keyframes rail-pulse {
  0%, 100% { transform: translateY(0); opacity: 0.28; }
  50% { transform: translateY(180px); opacity: 0.9; }
}

.topbar {
  position: relative;
  backdrop-filter: blur(12px);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 34%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  animation: signal-sweep 5s ease-in-out infinite;
}

@keyframes signal-sweep {
  0%, 100% { transform: translateX(0); opacity: 0.45; }
  50% { transform: translateX(190%); opacity: 1; }
}

.content > * {
  animation: content-in 0.42s cubic-bezier(.2, .8, .2, 1) both;
}

.content > *:nth-child(2) { animation-delay: 0.05s; }
.content > *:nth-child(3) { animation-delay: 0.1s; }
.content > *:nth-child(4) { animation-delay: 0.15s; }

@keyframes content-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card,
.panel,
.voice-card,
.table-wrap,
.auth-card,
.test-card,
.modal,
.toast,
.call-status {
  border-radius: var(--ui-radius);
  border-color: var(--ui-line);
  overflow: hidden;
  transition: border-color 0.22s ease, box-shadow 0.22s ease, transform 0.22s ease;
}

.card:hover,
.panel:hover,
.voice-card:hover,
.table-wrap:hover,
.stat-card:hover,
.product-card:hover {
  border-color: rgba(82, 168, 255, 0.46);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(52, 149, 255, 0.08);
}

.card::before,
.panel::before,
.voice-card::before,
.table-wrap::before,
.modal::before,
.toast::before {
  height: 1px;
  opacity: 0.62;
}

.btn {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid rgba(104, 164, 232, 0.24);
  border-radius: var(--ui-radius-sm);
  clip-path: none;
  background: rgba(20, 48, 85, 0.66);
  box-shadow: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.btn::after { display: none; }

.btn:hover {
  transform: translateY(-2px);
  border-color: rgba(92, 178, 255, 0.7);
  background: rgba(24, 76, 133, 0.78);
  box-shadow: 0 8px 20px rgba(0, 95, 208, 0.18);
}

.btn:active,
.text-btn:active,
.chip:active,
.nav-item:active {
  transform: translateY(0) scale(0.97);
}

.btn-primary,
.btn-success,
.btn-danger,
.text-btn.primary,
.btn-sm.btn-primary,
.btn-sm.btn-success,
.btn-sm.btn-danger {
  border-radius: var(--ui-radius-sm);
  clip-path: none;
}

.btn-primary { box-shadow: 0 7px 18px rgba(0, 108, 255, 0.18); }
.btn-success { box-shadow: 0 7px 18px rgba(220, 166, 44, 0.14); }

.btn-sm {
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 6px;
  clip-path: none;
}

.nav-item {
  position: relative;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--gold), 0 0 22px rgba(28, 122, 255, 0.12);
}

.nav-item.active::after {
  content: "";
  display: block !important;
  position: absolute;
  right: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.stat-card,
.product-card,
.clause-item,
.admin-row {
  border-radius: var(--ui-radius-sm);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.stat-card:hover,
.product-card:hover,
.clause-item:hover,
.admin-row:hover {
  transform: translateY(-3px);
}

.ripple {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-out 0.55s ease-out forwards;
  pointer-events: none;
}

@keyframes ripple-out {
  to { transform: translate(-50%, -50%) scale(18); opacity: 0; }
}

/* The login card should stay clean; remove its decorative top rule. */
.auth-card::before {
  display: none;
}

/* Keep the developer entry available but visually quiet until hovered. */
.auth-dev-entry {
  width: 30px;
  height: 30px;
  padding: 0;
  gap: 0;
  justify-content: center;
  border: 1px solid rgba(71, 99, 153, 0.16);
  border-radius: 50%;
  background: rgba(62, 85, 145, 0.18);
  color: rgba(47, 67, 117, 0.72);
  box-shadow: none;
  opacity: 0.38;
  font-size: 0;
  transition: width 0.2s ease, padding 0.2s ease, gap 0.2s ease, opacity 0.2s ease,
    background 0.2s ease, color 0.2s ease, border-radius 0.2s ease;
}

.auth-dev-entry svg {
  width: 14px;
  height: 14px;
}

.auth-dev-entry:hover,
.auth-dev-entry:focus-visible,
.auth-dev-entry.active {
  width: auto;
  height: 32px;
  padding: 0 10px;
  gap: 6px;
  border-radius: 8px;
  background: rgba(62, 85, 145, 0.88);
  color: #ffffff;
  opacity: 1;
  font-size: 12px;
}

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

/* Route-change typography: the new page title sweeps across the background before settling. */
#app.scene-enter .main {
  position: relative;
}

#app.scene-enter .main::before {
  content: var(--scene-label);
  position: absolute;
  z-index: 3;
  top: 66px;
  right: -18%;
  color: rgba(45, 107, 184, .14);
  font-size: clamp(72px, 11vw, 168px);
  font-weight: 800;
  letter-spacing: .08em;
  line-height: .9;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 0 24px rgba(44, 184, 255, .18);
  transform: translateX(-62%);
  animation: scene-type-sweep 1.05s cubic-bezier(.16, .8, .22, 1) both;
}

#app.scene-enter .main::after {
  content: "";
  position: absolute;
  z-index: 1;
  top: 62px;
  bottom: 0;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(62, 196, 255, .9), rgba(241, 194, 93, .7), transparent);
  box-shadow: 0 0 26px rgba(62, 196, 255, .45);
  pointer-events: none;
  transform: translateX(-10px);
  animation: scene-divider-sweep .9s cubic-bezier(.2, .8, .2, 1) both;
}

#app.scene-enter .topbar-title,
#app.scene-enter .page-head h2,
#app.scene-enter .page-head p {
  position: relative;
  z-index: 2;
  clip-path: inset(0 100% 0 0);
  animation: scene-text-wipe .72s cubic-bezier(.16, .8, .22, 1) both;
}

#app.scene-enter .page-head p { animation-delay: .1s; }

#app.scene-enter .content {
  position: relative;
  z-index: 2;
}

@keyframes scene-type-sweep {
  0% { opacity: 0; transform: translateX(-62%); filter: blur(8px); }
  18% { opacity: 1; }
  68% { opacity: .78; transform: translateX(4%); filter: blur(0); }
  100% { opacity: .16; transform: translateX(18%); }
}

@keyframes scene-divider-sweep {
  0% { opacity: 0; transform: translateX(-10px); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateX(calc(100vw - 90px)); }
}

@keyframes scene-text-wipe {
  0% { opacity: .1; clip-path: inset(0 100% 0 0); transform: translateX(-12px); }
  100% { opacity: 1; clip-path: inset(0 0 0 0); transform: translateX(0); }
}

/* Full-page scroll mode: replace the boxed left module switcher with a compact top identity bar. */
#app.scene-enter::before {
  display: none !important;
}

.shell {
  display: block !important;
  min-height: 100vh;
}

.sidebar {
  position: sticky !important;
  top: 0;
  z-index: 30;
  width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 12px 28px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 24px;
  border-right: 0 !important;
  border-bottom: 1px solid rgba(73, 177, 129, .2);
  box-shadow: 0 10px 30px rgba(35, 56, 111, .12) !important;
}

.sidebar .brand {
  flex: 0 0 auto;
  padding: 0 18px 0 0 !important;
  border-bottom: 0 !important;
  border-right: 1px solid rgba(232, 237, 255, .2);
}

.sidebar .nav,
.sidebar-foot {
  display: none !important;
}

.main {
  width: 100% !important;
  min-height: calc(100vh - 70px);
}

.topbar {
  position: relative !important;
  top: auto !important;
  z-index: 20;
}

.content {
  max-width: 1440px !important;
  min-height: calc(100vh - 130px);
  padding: clamp(28px, 5vw, 72px) clamp(22px, 6vw, 96px) 96px !important;
}

.home-hero {
  min-height: min(72vh, 720px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(34px, 7vw, 92px) !important;
  border-radius: 28px !important;
}

.home-hero h2 {
  font-size: clamp(34px, 5vw, 72px) !important;
  max-width: 760px;
  letter-spacing: -.04em;
}

.home-hero p {
  max-width: 620px;
  font-size: clamp(15px, 1.5vw, 20px) !important;
}

.btn-quick-consult {
  border-color: rgba(45, 107, 184, .24) !important;
  color: #2d6bb8 !important;
  background: rgba(255, 255, 255, .74) !important;
}

.btn-quick-consult:hover {
  color: #fff !important;
  background: #2d6bb8 !important;
}

@media (max-width: 760px) {
  .sidebar { padding: 10px 16px !important; }
  .sidebar .brand { border-right: 0; padding-right: 0 !important; }
  .topbar { top: auto !important; }
  .content { padding: 20px 14px 64px !important; }
  .home-hero { min-height: 68vh; padding: 28px !important; }
}

.btn-home-shortcut {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 12px !important;
  color: #2d6bb8 !important;
  background: rgba(255, 255, 255, .74) !important;
  border: 1px solid rgba(45, 107, 184, .2) !important;
  box-shadow: 0 4px 14px rgba(45, 107, 184, .1);
}

.btn-home-shortcut svg {
  width: 15px;
  height: 15px;
}

.btn-home-shortcut:hover {
  color: #fff !important;
  background: linear-gradient(100deg, #2d6bb8, #3fb4c7) !important;
  border-color: transparent !important;
  transform: translateY(-1px);
}

@media (max-width: 760px) {
  .btn-home-shortcut span { display: none; }
  .btn-home-shortcut { padding: 8px !important; }
}

/* Homepage hero and system overview section. */
.home-hero {
  min-height: calc(100vh - 142px) !important;
  width: 100%;
  margin-bottom: 30px !important;
  padding: clamp(44px, 7vw, 104px) clamp(34px, 7vw, 112px) !important;
  border-radius: 30px !important;
}

.home-hero > div:first-child {
  max-width: 78% !important;
}

.home-hero h2 {
  font-size: clamp(42px, 5.4vw, 78px) !important;
  line-height: 1.08 !important;
}

.home-hero p {
  max-width: 650px !important;
  font-size: clamp(17px, 1.55vw, 22px) !important;
  line-height: 1.75 !important;
}

.home-hero .page-actions {
  align-self: flex-start !important;
  margin-top: 22px;
}

.system-intro {
  position: relative;
  margin: 0 0 30px;
  padding: clamp(36px, 5vw, 68px);
  border: 1px solid rgba(83, 104, 169, .14);
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(237, 246, 255, .72));
  box-shadow: 0 22px 60px rgba(61, 86, 151, .1);
}

.system-intro::after {
  content: "INSURE / ASSIST / CLARIFY";
  position: absolute;
  right: -10px;
  top: 22px;
  color: rgba(45, 107, 184, .07);
  font-size: clamp(34px, 5vw, 76px);
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
  pointer-events: none;
}

.system-intro-head,
.system-intro-grid { position: relative; z-index: 1; }

.system-intro-head { max-width: 680px; }

.system-intro .eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: #3fb4c7;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .2em;
}

.system-intro h3 {
  margin: 0 0 12px;
  color: #25366e;
  font-size: clamp(28px, 3.4vw, 48px);
  line-height: 1.15;
}

.system-intro-head p {
  margin: 0;
  color: #60709a;
  font-size: 16px;
  line-height: 1.8;
}

.system-intro-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
}

.intro-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 20px;
  border: 1px solid rgba(83, 104, 169, .13);
  border-radius: 18px;
  background: rgba(255, 255, 255, .7);
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.intro-feature:hover {
  transform: translateY(-5px);
  border-color: rgba(63, 180, 199, .42);
  box-shadow: 0 14px 30px rgba(63, 180, 199, .15);
}

.intro-feature-icon {
  flex: 0 0 38px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #2d6bb8;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(45, 107, 184, .14), rgba(63, 180, 199, .18));
}

.intro-feature-icon svg { width: 19px; height: 19px; }
.intro-feature h4 { margin: 1px 0 7px; color: #2d3d72; font-size: 16px; }
.intro-feature p { margin: 0; color: #7180a4; font-size: 13px; line-height: 1.65; }

@media (max-width: 760px) {
  .home-hero { min-height: calc(100vh - 126px) !important; padding: 32px 24px !important; }
  .home-hero > div:first-child { max-width: 100% !important; }
  .home-hero h2 { font-size: clamp(36px, 11vw, 56px) !important; }
  .system-intro { padding: 30px 22px; }
  .system-intro-grid { grid-template-columns: 1fr; }
}

/* Compact navigation station in the top brand bar. */
.sidebar .nav {
  display: flex !important;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding: 0 !important;
}

.sidebar .nav .nav-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin: 0 !important;
  padding: 8px 12px;
  color: rgba(244, 248, 255, .88);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 10px;
}

.sidebar .nav .nav-item:hover,
.sidebar .nav .nav-item.active {
  color: #fff !important;
  background: linear-gradient(100deg, rgba(63, 180, 199, .46), rgba(83, 104, 169, .78)) !important;
  border-color: rgba(255, 255, 255, .26);
  box-shadow: 0 8px 20px rgba(10, 26, 72, .18) !important;
}

.sidebar .nav .nav-item svg { width: 15px; height: 15px; }

.system-intro-page {
  min-height: calc(100vh - 148px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.system-intro-page h2 {
  margin: 0 0 12px;
  color: #25366e;
  font-size: clamp(34px, 5vw, 68px);
  line-height: 1.12;
}

.system-intro-page {
  justify-content: flex-start !important;
  padding: clamp(28px, 4vw, 56px) !important;
}

.system-intro-page .system-intro-head p {
  max-width: 820px;
}

.intro-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 24px;
}

.intro-metrics div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 14px;
  background: rgba(255, 255, 255, .28);
}

.intro-metrics strong { color: #2d6bb8; font-size: 24px; }
.intro-metrics span { color: #68799f; font-size: 12px; }

.intro-flow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  color: #4669a0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
}

.intro-flow i { color: #3fb4c7; font-style: normal; font-size: 20px; }

.intro-original-content {
  margin-top: 30px;
}

.intro-original-content .stat-grid {
  margin-bottom: 18px;
}

.intro-original-content .card {
  margin-bottom: 18px;
}

.intro-original-content .product-card {
  min-height: 0;
}

@media (max-width: 760px) {
  .intro-metrics { grid-template-columns: repeat(2, 1fr); }
  .intro-flow { gap: 7px; font-size: 11px; }
}

@media (max-width: 760px) {
  .sidebar .nav { gap: 4px; overflow-x: auto; }
  .sidebar .nav .nav-item { padding: 7px 9px; white-space: nowrap; }
  .sidebar .nav .nav-item span { display: none; }
  .system-intro-page { min-height: calc(100vh - 126px); }
}

/* Full-bleed home hero: no card border, no rounded frame, edge-to-edge visual. */
.home-hero {
  width: 100vw !important;
  max-width: none !important;
  min-height: calc(100vh - 142px) !important;
  margin-top: calc(-1 * clamp(28px, 5vw, 72px)) !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  margin-bottom: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.home-hero::before,
.home-hero::after {
  border-radius: 0 !important;
}

@media (max-width: 760px) {
  .home-hero {
    min-height: calc(100vh - 126px) !important;
    margin-top: -20px !important;
  }
}

/* Demo mode: one static viewport, with voice text panels reserved for a later release. */
html,
body,
#app {
  height: 100%;
  overflow: hidden !important;
}

.shell {
  height: 100vh;
  overflow: hidden;
}

.main {
  height: calc(100vh - 70px);
  overflow: hidden !important;
}

.content {
  height: calc(100vh - 138px);
  min-height: 0 !important;
  overflow: hidden !important;
}

/* 文本展示框暂时注释隐藏，后续版本再启用。 */
.voice-layout .panel,
.voice-layout .input-row,
.voice-layout .panel-text,
.voice-layout .action-row {
  display: none !important;
}

.voice-layout {
  display: block !important;
}

.voice-layout .voice-card {
  min-height: min(62vh, 520px);
  max-width: 860px;
  margin: 0 auto;
}

/* The new AI response panel remains visible; only the legacy transcript panels stay hidden. */
.ai-answer .panel-text {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.ai-consult-layout {
  display: grid !important;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  gap: 22px;
  max-width: 1180px;
  margin: 0 auto;
}

.ai-console,
.ai-answer {
  min-width: 0;
  padding: clamp(24px, 3vw, 42px);
  border: 1px solid rgba(83, 104, 169, .14);
  border-radius: 24px;
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 42px rgba(52, 71, 135, .1);
}

.ai-console-head,
.ai-answer-head { display: flex; align-items: center; gap: 14px; }
.ai-console-head h3,
.ai-answer-head h3 { margin: 3px 0 0; color: #26366f; font-size: clamp(22px, 2.6vw, 34px); }
.ai-console-head p { margin: 5px 0 0; color: #7280a3; font-size: 14px; }
.ai-avatar { display: grid; flex: 0 0 54px; width: 54px; height: 54px; place-items: center; color: #fff; border-radius: 18px; background: linear-gradient(135deg, #3fb4c7, #5368a9); box-shadow: 0 9px 22px rgba(63, 180, 199, .26); }
.ai-avatar.small { flex-basis: 42px; width: 42px; height: 42px; border-radius: 14px; }
.ai-avatar svg { width: 26px; height: 26px; }
.ai-avatar.small svg { width: 20px; height: 20px; }
.ai-console .eyebrow,
.ai-answer .eyebrow { color: #3fb4c7; font-size: 10px; font-weight: 800; letter-spacing: .18em; }
.ai-console-controls { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 14px; align-items: center; margin-top: 30px; }
.ai-input-form { display: flex; min-width: 0; gap: 8px; }
.ai-input-form .input { min-width: 0; flex: 1; }
.ai-language-control { grid-column: 2; display: flex; align-items: center; gap: 10px; color: #65759d; font-size: 13px; }
.ai-language-control .select { width: 110px; }
.ai-console .chips { margin-top: 20px; }
.ai-answer { background: linear-gradient(145deg, rgba(245, 251, 255, .94), rgba(255, 255, 255, .82)); }
.ai-answer-head .engine-tag { margin-left: auto; }
.ai-user-query { margin: 26px 0 14px; padding: 12px 15px; color: #5f709a; border-left: 3px solid #3fb4c7; background: rgba(63, 180, 199, .08); border-radius: 0 10px 10px 0; font-size: 13px; }
.ai-answer .panel-text { min-height: 120px; margin: 0; color: #2c3d74; font-size: 18px; line-height: 1.85; }

@media (max-width: 680px) {
  .ai-consult-layout { grid-template-columns: 1fr; }
  .ai-answer .panel-text { min-height: 80px; }
}

/* PPT-like smooth page morph: soften the old/new snapshots instead of hard-cutting. */
html { view-transition-name: root; }

::view-transition-group(root) {
  animation-duration: .82s;
  animation-timing-function: cubic-bezier(.22, .72, .18, 1);
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .82s;
  animation-timing-function: cubic-bezier(.22, .72, .18, 1);
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  animation-name: morph-old-page;
}

::view-transition-new(root) {
  animation-name: morph-new-page;
}

@keyframes morph-old-page {
  from { opacity: 1; transform: scale(1); filter: blur(0); }
  to { opacity: 0; transform: scale(.985); filter: blur(2px); }
}

@keyframes morph-new-page {
  from { opacity: 0; transform: scale(1.015); filter: blur(2px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}

#app.scene-enter .shell,
#app.scene-enter .auth-card,
#app.scene-enter .home-hero,
#app.scene-enter .system-intro-page,
#app.scene-enter .stat-card,
#app.scene-enter .card {
  animation-duration: 1s !important;
  animation-timing-function: cubic-bezier(.22, .72, .18, 1) !important;
}

.auth-tab.active::after {
  content: "";
  position: absolute;
  left: 11%;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #f1c25d, rgba(241, 194, 93, 0));
  pointer-events: none;
}

.test-row,
.admin-row,
.clause-item {
  border-color: rgba(44, 121, 255, 0.16);
}

.test-row {
  background: rgba(11, 29, 57, 0.56);
  border-radius: 0;
}

.test-row code {
  color: #79c7ff;
}

.nav-item {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #a3b8d3;
  clip-path: polygon(7px 0, 100% 0, calc(100% - 7px) 100%, 0 100%);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
  background: rgba(20, 74, 154, 0.28);
  color: #ffffff;
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(11, 110, 242, 0.95), rgba(7, 45, 112, 0.58) 76%, rgba(7, 20, 45, 0.12));
  color: #ffffff;
  font-weight: 700;
}

.nav-item.active svg {
  color: #f1c25d;
}

.role-pill,
.engine-tag,
.badge,
.tag {
  border-radius: 0;
  clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 50%, calc(100% - 5px) 100%, 5px 100%, 0 50%);
}

.role-pill {
  background: rgba(10, 28, 56, 0.78);
  border-color: rgba(54, 140, 255, 0.2);
  color: #a9c2df;
  box-shadow: none;
}

.role-pill b {
  color: #f1c25d;
}

.engine-tag {
  background: rgba(3, 10, 20, 0.55);
  border-color: rgba(54, 140, 255, 0.2);
  color: #9db7d4;
}

.tag {
  background: rgba(13, 40, 80, 0.55);
  border: 1px solid rgba(56, 140, 255, 0.2);
  color: #a9c4e4;
}

.badge-pending,
.badge-processed,
.badge-closed,
.badge-active,
.badge-disabled {
  border: 0;
  color: #ffffff;
}

.badge-pending {
  background: rgba(230, 184, 78, 0.24);
  color: #f6dc99;
}

.badge-processed,
.badge-active {
  background: rgba(16, 170, 255, 0.22);
  color: #a8dbff;
}

.badge-closed {
  background: rgba(142, 165, 196, 0.16);
  color: #b8c9dc;
}

.badge-disabled {
  background: rgba(255, 97, 86, 0.18);
  color: #ffb9b4;
}

.step {
  border-radius: 0;
  background: linear-gradient(135deg, rgba(13, 110, 255, 0.92), rgba(4, 30, 75, 0.72));
  color: #ffffff;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.stat-icon,
.product-icon,
.admin-avatar {
  border-radius: 0;
  box-shadow: none;
  clip-path: polygon(50% 0, 100% 22%, 100% 78%, 50% 100%, 0 78%, 0 22%);
}

.stat-icon,
.product-icon {
  background: linear-gradient(135deg, rgba(14, 130, 255, 0.88), rgba(3, 36, 92, 0.7));
  color: #c6e8ff;
}

.stat-icon.green,
.stat-icon.red {
  background: linear-gradient(135deg, rgba(0, 190, 255, 0.82), rgba(4, 48, 120, 0.72));
  color: #d9f6ff;
}

.stat-icon.amber {
  background: linear-gradient(135deg, rgba(241, 194, 93, 0.95), rgba(113, 75, 14, 0.88));
  color: #fff6da;
}

.product-card .product-icon {
  background: linear-gradient(135deg, rgba(241, 194, 93, 0.9), rgba(84, 66, 22, 0.72));
  color: #241a06;
}

.clause-item .term {
  color: #f4d98d;
}

.text-btn {
  position: relative;
  border: 0;
  border-radius: 0;
  padding: 9px 16px;
  background: linear-gradient(180deg, rgba(24, 62, 118, 0.72), rgba(5, 12, 25, 0.96));
  color: #b9cee8;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
  transition: background 0.15s ease, color 0.15s ease;
}

.text-btn:hover {
  background: linear-gradient(180deg, rgba(22, 130, 255, 0.42), rgba(7, 25, 52, 0.96));
  color: #ffffff;
}

.text-btn.primary {
  background: linear-gradient(120deg, #0053c0, #0b9cff);
  color: #ffffff;
}

.text-btn.primary:hover {
  background: linear-gradient(120deg, #0760d6, #16a9ff);
}

.text-btn.ghost {
  background: rgba(18, 39, 74, 0.42);
  color: #aec4df;
}

.text-btn.ghost:hover {
  background: rgba(255, 97, 86, 0.16);
  color: #ffb9b4;
}

.chip {
  position: relative;
  border: 0;
  border-radius: 0;
  padding: 8px 15px;
  background: rgba(10, 26, 51, 0.72);
  color: #adc6e4;
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 7px 100%, 0 50%);
  transition: background 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.chip:hover {
  background: linear-gradient(115deg, #0a62d4, #0d9bff);
  color: #ffffff;
  transform: translateY(-1px);
}

.mic-btn {
  border: 0;
  border-radius: 0;
  background: linear-gradient(145deg, #1376ff 0%, #0a4ac2 48%, #06286f 100%);
  color: #ffffff;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  box-shadow: none;
  filter: drop-shadow(0 10px 22px rgba(15, 110, 255, 0.34));
  transition: transform 0.15s ease, filter 0.2s ease;
}

.mic-btn svg {
  width: 38px;
  height: 38px;
  stroke-width: 1.6;
}

.mic-btn:hover {
  background: linear-gradient(145deg, #1c8cff, #0754cc 54%, #07306e);
  transform: translateY(-2px);
  filter: drop-shadow(0 12px 26px rgba(24, 138, 255, 0.42));
}

.mic-btn.recording {
  background: linear-gradient(145deg, #f5c863, #e29a1d 55%, #9a5d0a);
  color: #241500;
  filter: drop-shadow(0 10px 22px rgba(241, 194, 93, 0.38));
}

.call-status {
  border-radius: 0;
  background: rgba(13, 60, 120, 0.2);
  border-color: rgba(56, 150, 255, 0.2);
  color: #a8d4ff;
}

.call-status.active {
  background: rgba(241, 194, 93, 0.12);
  border-color: rgba(241, 194, 93, 0.28);
  color: #f5d98d;
}

.call-dot {
  width: 10px;
  height: 10px;
  border-radius: 0;
  background: #f1c25d;
}

.call-status.active .call-dot {
  background: #35c8ff;
}

.input,
.select,
textarea.input {
  border-radius: 0;
  background: #050b14;
  border-color: rgba(70, 145, 255, 0.24);
  color: #e2ecf9;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.input::placeholder,
textarea.input::placeholder {
  color: #5f7898;
}

.input:focus,
.select:focus {
  border-color: rgba(241, 194, 93, 0.78);
  box-shadow: 0 0 0 2px rgba(241, 194, 93, 0.12), 0 0 0 4px rgba(14, 115, 255, 0.1);
  background: #07111f;
}

.select option {
  background: #081221;
  color: #e2ecf9;
}

.check-row input {
  accent-color: var(--gold);
}

.notice {
  border-radius: 0;
  border: 1px solid rgba(54, 140, 255, 0.16);
}

.notice-info {
  background: rgba(16, 120, 255, 0.12);
  color: #c8e5ff;
  border-left-color: #2aa8ff;
}

.notice-warn {
  background: rgba(241, 194, 93, 0.12);
  color: #f5d98d;
  border-left-color: #e6b84e;
}

.notice-success {
  background: rgba(16, 170, 255, 0.1);
  color: #b8e7ff;
  border-left-color: #35c8ff;
}

.notice-danger {
  background: rgba(255, 97, 86, 0.12);
  color: #ffc0bb;
  border-left-color: #ff6156;
}

th {
  background: rgba(14, 46, 90, 0.34);
  color: #a9c4e2;
  border-bottom-color: rgba(58, 135, 255, 0.18);
}

td {
  border-bottom-color: rgba(58, 135, 255, 0.12);
}

tr:hover td {
  background: rgba(15, 70, 150, 0.08);
}

.empty {
  color: #7e97b6;
}

.modal-mask {
  background: rgba(1, 4, 9, 0.78);
  backdrop-filter: blur(6px);
}

.modal {
  background: #081120;
  border-color: rgba(54, 140, 255, 0.24);
  border-radius: 0;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.55);
}

.toast {
  background: rgba(8, 18, 34, 0.98);
  border: 1px solid rgba(54, 140, 255, 0.24);
  border-left: 3px solid #2ea5ff;
  border-radius: 0;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  color: #dceaf8;
}

.toast.success {
  border-left-color: #f1c25d;
}

.toast.danger {
  border-left-color: #ff6156;
}

.toast.warn {
  border-left-color: #e6b84e;
}

.admin-avatar {
  background: linear-gradient(145deg, rgba(14, 130, 255, 0.9), rgba(4, 36, 92, 0.78));
  color: #c6e8ff;
}

.interim {
  color: #ffd28a;
}

.thinking span {
  border-radius: 0;
  background: #35c8ff;
}

.thinking span:nth-child(2) {
  background: #f1c25d;
}

.thinking span:nth-child(3) {
  background: #0c82ff;
}

.voice-card {
  align-items: center;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: #050a13;
}

::-webkit-scrollbar-thumb {
  background: #1c3f6c;
  border: 2px solid #050a13;
  border-radius: 0;
}

::-webkit-scrollbar-thumb:hover {
  background: #2f5f9e;
}

@media (max-width: 720px) {
  .btn {
    clip-path: polygon(5px 0, calc(100% - 5px) 0, 100% 50%, calc(100% - 5px) 100%, 5px 100%, 0 50%);
  }

  .btn-primary,
  .btn-success,
  .btn-danger {
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 50%, calc(100% - 10px) 100%, 0 100%);
  }

  .nav-item {
    clip-path: polygon(3px 0, calc(100% - 3px) 0, 100% 50%, calc(100% - 3px) 100%, 3px 100%, 0 50%);
  }
}

/* ---------- HUD top bar and live local time ---------- */

.topbar {
  position: relative;
  height: 68px;
  flex: 0 0 68px;
  gap: 18px;
  min-width: 0;
  overflow: hidden;
}

.topbar::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 22px;
  background: linear-gradient(180deg, rgba(12, 110, 255, 0.34), rgba(241, 194, 93, 0.06));
  opacity: 0.7;
  pointer-events: none;
}

.topbar-title {
  position: relative;
  min-width: 0;
  padding-left: 18px;
}

.topbar-title::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 50%;
  width: 7px;
  height: 7px;
  transform: translateY(-50%) rotate(45deg);
  background: var(--gold);
  box-shadow: 0 0 12px rgba(241, 194, 93, 0.78);
}

.topbar-right {
  min-width: 0;
}

.sys-clock {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  white-space: nowrap;
}

.top-clock,
.auth-clock {
  border: 1px solid rgba(70, 150, 255, 0.24);
  background: linear-gradient(90deg, rgba(9, 30, 60, 0.94), rgba(5, 13, 26, 0.96));
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 50%, calc(100% - 7px) 100%, 7px 100%, 0 50%);
  box-shadow: inset 0 1px 0 rgba(90, 170, 255, 0.08);
}

.top-clock {
  padding: 6px 15px 6px 18px;
}

.auth-clock {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 6;
  padding: 6px 16px 6px 18px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.36);
}

.clock-date {
  color: #94afd0;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  font-weight: 600;
}

.clock-time {
  color: #f6c95e;
  font-family: Consolas, "Courier New", monospace;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(241, 194, 93, 0.36);
}

.sidebar {
  position: relative;
  padding-top: 20px;
}

.sidebar::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 8%;
  bottom: 8%;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(241, 194, 93, 0.78), rgba(55, 190, 255, 0.3), transparent);
  pointer-events: none;
}

.sidebar .brand {
  position: relative;
  padding-bottom: 20px;
}

.sidebar .brand::after {
  content: "";
  position: absolute;
  left: 6px;
  right: 4px;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(241, 194, 93, 0.85), rgba(55, 190, 255, 0.22) 58%, transparent);
}

.nav {
  padding: 10px 0 14px;
}

.nav-item {
  margin-bottom: 4px;
  padding-left: 16px;
}

.nav-item::after {
  content: "";
  position: absolute;
  right: 8px;
  top: 50%;
  width: 5px;
  height: 5px;
  transform: translateY(-50%) rotate(45deg);
  background: transparent;
  box-shadow: none;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.nav-item:hover::after {
  background: rgba(241, 194, 93, 0.4);
}

.nav-item.active::after {
  background: var(--gold);
  box-shadow: 0 0 10px rgba(241, 194, 93, 0.85);
}

.sidebar-foot .user-line {
  color: #7f97b6;
}

.sidebar-foot .user-line b {
  color: #f2f7ff;
}

@media (max-width: 1180px) {
  .top-clock .clock-date,
  .auth-clock .clock-date {
    display: none;
  }
}

@media (max-width: 900px) {
  .topbar {
    height: auto;
    min-height: 60px;
    padding: 8px 14px;
  }

  .top-clock {
    padding: 5px 12px 5px 15px;
  }

  .clock-time {
    font-size: 15px;
  }
}

@media (max-width: 620px) {
  .topbar-right {
    gap: 7px;
  }

  .role-pill {
    display: none;
  }

  .auth-clock {
    top: 12px;
    right: 12px;
    padding: 4px 10px 4px 12px;
  }

  .top-clock {
    padding: 4px 9px 4px 12px;
    gap: 0;
  }

  .clock-time {
    font-size: 13px;
  }
}

/* ---------- Developer mode ---------- */

.dev-toggle-on {
  background: linear-gradient(115deg, #0a62d4, #0d9bff);
  color: #ffffff;
}

.dev-dock {
  position: relative;
  top: auto;
  right: auto;
  bottom: auto;
  width: 400px;
  flex: 0 0 400px;
  min-width: 0;
  height: 100vh;
  z-index: 20;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0a1424 0%, #050b16 60%, #02060d 100%);
  border-left: 1px solid rgba(241, 194, 93, 0.3);
  box-shadow: -14px 0 40px rgba(0, 0, 0, 0.28);
  animation: dev-dock-in 0.32s ease-out both;
}

@keyframes dev-dock-in {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.dev-dock-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 62px;
  padding: 0 15px 0 18px;
  border-bottom: 1px solid rgba(70, 150, 255, 0.22);
  background: linear-gradient(90deg, rgba(13, 60, 118, 0.55), rgba(4, 10, 20, 0.92));
}

.dev-dock-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #eef6ff;
  font-size: 15px;
  font-weight: 700;
}

.dev-dock-title svg {
  width: 19px;
  height: 19px;
  color: #35c8ff;
}

.dev-dock-tools {
  display: flex;
  gap: 7px;
}

.dev-icon-btn {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  background: rgba(11, 31, 60, 0.8);
  color: #9cb7d6;
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 50%, calc(100% - 4px) 100%, 4px 100%, 0 50%);
  transition: background 0.15s ease, color 0.15s ease;
}

.dev-icon-btn svg {
  width: 15px;
  height: 15px;
}

.dev-icon-btn:hover {
  background: rgba(22, 125, 255, 0.28);
  color: #ffffff;
}

.dev-key-panel {
  display: grid;
  gap: 8px;
  flex: 0 0 auto;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(70, 150, 255, 0.2);
  background: rgba(7, 17, 32, 0.86);
}

.dev-key-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dev-key-label {
  color: #8ea5c4;
  font-size: 11px;
  font-weight: 600;
}

.dev-key-mode {
  padding: 2px 9px;
  background: rgba(241, 194, 93, 0.22);
  color: #f7dd9e;
  font-size: 10px;
  font-weight: 700;
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 50%, calc(100% - 4px) 100%, 4px 100%, 0 50%);
}

.dev-key-mode.custom {
  background: rgba(15, 126, 255, 0.24);
  color: #b9e0ff;
}

.dev-key-value {
  display: block;
  padding: 9px 12px;
  border: 1px solid rgba(241, 194, 93, 0.28);
  background: #030910;
  color: #f6c95e;
  font-family: Consolas, "Courier New", monospace;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  word-break: break-all;
}

.dev-key-expire {
  color: #7f97b6;
  font-size: 11px;
  line-height: 1.4;
}

.dev-key-edit {
  display: grid;
  gap: 8px;
  margin-top: 3px;
}

.dev-key-input {
  font-family: Consolas, "Courier New", monospace;
}

.dev-key-validity {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px;
}

.dev-key-duration,
.dev-key-unit {
  min-width: 0;
}

.dev-key-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.dev-log {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 18px;
}

.dev-entry {
  padding: 10px 12px;
  border-left: 3px solid #35c8ff;
  background: rgba(14, 37, 70, 0.44);
}

.dev-entry-user {
  border-left-color: #f1c25d;
  background: rgba(241, 194, 93, 0.08);
}

.dev-entry-assistant {
  border-left-color: #35c8ff;
  background: rgba(22, 125, 255, 0.1);
}

.dev-entry-error {
  border-left-color: #ff6156;
  background: rgba(255, 97, 86, 0.1);
}

.dev-entry-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #7f97b6;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
}

.dev-entry-user .dev-entry-meta span {
  color: #f4c85f;
}

.dev-entry-assistant .dev-entry-meta span {
  color: #5fc8ff;
}

.dev-entry-error .dev-entry-meta span {
  color: #ff9289;
}

.dev-entry-text {
  margin-top: 7px;
  color: #dbe9f8;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.dev-thinking {
  display: flex;
  gap: 6px;
  padding: 8px 4px;
}

.dev-thinking span {
  width: 7px;
  height: 7px;
  background: #f1c25d;
  animation: bounce 1.2s ease-in-out infinite;
}

.dev-thinking span:nth-child(2) {
  background: #35c8ff;
  animation-delay: 0.15s;
}

.dev-thinking span:nth-child(3) {
  background: #0c82ff;
  animation-delay: 0.3s;
}

.dev-text-box {
  display: grid;
  gap: 10px;
  flex: 0 0 auto;
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(70, 150, 255, 0.2);
  background: rgba(5, 12, 23, 0.95);
}

.dev-textarea {
  min-height: 96px;
  line-height: 1.6;
  resize: vertical;
}

.dev-text-foot {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1250px) {
  .shell {
    flex-wrap: wrap;
  }

  .sidebar {
    min-height: 100vh;
  }

  .main {
    order: 1;
    width: 100%;
    min-width: 0;
  }

  .dev-dock {
    order: 2;
    width: 100%;
    flex: 0 0 auto;
    height: 62vh;
    min-height: 430px;
    border-left: 0;
    border-top: 1px solid rgba(241, 194, 93, 0.3);
    box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.38);
  }
}

/* Final override: the developer entry is icon-only so its label can never overflow. */
.auth-dev-entry {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  border-radius: 50% !important;
  opacity: 0.72 !important;
}

.auth-dev-entry svg {
  flex: 0 0 auto;
  color: #5368a9 !important;
  stroke: #304c97 !important;
  width: 16px !important;
  height: 16px !important;
  opacity: 0.9;
}

.auth-dev-entry:hover,
.auth-dev-entry:focus-visible {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}

.release-version {
  position: fixed;
  right: 18px;
  bottom: 12px;
  z-index: 5;
  color: rgba(74, 91, 140, .62);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  pointer-events: none;
  user-select: none;
}

/* Admin navigation labels stay in one row and receive enough horizontal room. */
.sidebar .nav {
  flex-wrap: nowrap !important;
  white-space: nowrap;
}

.sidebar .nav .nav-item {
  flex: 0 0 auto;
  width: auto !important;
  max-width: max-content;
  min-width: max-content;
  white-space: nowrap !important;
  word-break: keep-all;
  padding-left: 16px;
  padding-right: 16px;
}

.sidebar .nav .nav-item span {
  display: inline-block !important;
  white-space: nowrap !important;
}

@media (min-width: 761px) {
  .admin-shell .sidebar .nav .nav-item,
  .dev-shell .sidebar .nav .nav-item {
    min-width: 112px;
    justify-content: center;
  }
}

@media (max-width: 760px) {
  .sidebar .nav .nav-item { min-width: 44px; }
  .sidebar .nav .nav-item span { display: none !important; }
}

/* Stable updates: state changes keep the current page visually in place. */
#app.stable-render .shell,
#app.stable-render .content > *,
#app.stable-render .stat-card,
#app.stable-render .product-card,
#app.stable-render .panel,
#app.stable-render .voice-card,
#app.stable-render .ai-console,
#app.stable-render .ai-answer {
  animation: none !important;
}

/* Liquid glass surfaces for modules and navigation. */
.card,
.stat-card,
.product-card,
.system-intro,
.ai-console,
.ai-answer,
.voice-card,
.panel,
.requests-card,
.request-card,
.admin-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, .52), rgba(235, 246, 255, .24)) !important;
  border: 1px solid rgba(255, 255, 255, .58) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .78), inset 0 -1px 0 rgba(83, 104, 169, .08), 0 18px 42px rgba(52, 71, 135, .12) !important;
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  backdrop-filter: blur(22px) saturate(1.3);
}

.stat-card,
.product-card,
.card,
.system-intro,
.ai-console,
.ai-answer,
.voice-card,
.panel {
  position: relative;
  overflow: hidden;
}

.stat-card::before,
.product-card::before,
.card::before,
.system-intro::before,
.ai-console::before,
.ai-answer::before,
.voice-card::before,
.panel::before {
  content: "";
  position: absolute;
  top: -45%;
  left: -18%;
  width: 58%;
  height: 180%;
  pointer-events: none;
  opacity: .22;
  background: linear-gradient(115deg, transparent 25%, rgba(255, 255, 255, .9) 50%, transparent 74%);
  transform: rotate(8deg);
}

.sidebar .nav .nav-item,
.btn-home-shortcut,
.role-pill {
  background: linear-gradient(135deg, rgba(255, 255, 255, .2), rgba(255, 255, 255, .07)) !important;
  border: 1px solid rgba(255, 255, 255, .26) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 8px 20px rgba(22, 47, 108, .14) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.35);
  backdrop-filter: blur(16px) saturate(1.35);
}

.sidebar .nav .nav-item.active,
.sidebar .nav .nav-item:hover {
  background: linear-gradient(135deg, rgba(99, 211, 226, .46), rgba(83, 104, 169, .7)) !important;
}

.intro-feature:hover,
.stat-card:hover,
.product-card:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86), 0 22px 46px rgba(63, 180, 199, .2) !important;
}

/* Module-specific atmospheres: each page gets a visual metaphor tied to insurance work. */
#app[data-page="home"] .main {
  background: radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .86), transparent 32%), #e9f1ff !important;
}

#app[data-page="intro"] .main {
  background:
    linear-gradient(rgba(63, 180, 199, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(63, 180, 199, .08) 1px, transparent 1px),
    radial-gradient(circle at 84% 24%, rgba(63, 180, 199, .2), transparent 32%),
    #edf7ff !important;
  background-size: 34px 34px, 34px 34px, auto, auto;
}

#app[data-page="voice"] .main {
  background:
    radial-gradient(circle at 76% 24%, rgba(63, 180, 199, .24), transparent 24%),
    radial-gradient(circle at 82% 30%, rgba(83, 104, 169, .18) 1px, transparent 2px),
    repeating-radial-gradient(circle at 82% 30%, rgba(63, 180, 199, .1) 0 1px, transparent 1px 28px),
    #eef8ff !important;
}

#app[data-page="requests"] .main {
  background:
    linear-gradient(135deg, rgba(83, 104, 169, .08) 25%, transparent 25%) 0 0 / 32px 32px,
    radial-gradient(circle at 18% 20%, rgba(83, 104, 169, .2), transparent 28%),
    #f2f4ff !important;
}

#app[data-page="workbench"] .main,
#app[data-page="users"] .main,
#app[data-page="admins"] .main,
#app[data-page="calls"] .main {
  background:
    linear-gradient(120deg, rgba(241, 194, 93, .08), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(63, 180, 199, .16), transparent 28%),
    #eef5fb !important;
}

#app[data-page="broadcast"] .main,
#app[data-page="media"] .main {
  background:
    linear-gradient(115deg, rgba(83, 104, 169, .1), transparent 44%),
    repeating-linear-gradient(0deg, rgba(83, 104, 169, .05) 0 1px, transparent 1px 26px),
    #f1f4ff !important;
}

/* Tech navigation interaction: no left rail, full-card glow and a rightward sweep. */
.nav-item {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: color .24s ease, background .24s ease, transform .24s ease, box-shadow .24s ease;
}

.nav-item::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(44, 184, 255, 0) 0%, rgba(44, 184, 255, .28) 48%, rgba(241, 194, 93, .34) 100%);
  transform: translateX(-105%);
  transition: transform .36s cubic-bezier(.2, .8, .2, 1);
}

.nav-item:hover::before,
.nav-item.active::before {
  transform: translateX(0);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(23, 87, 168, .82), rgba(20, 58, 111, .62) 70%, rgba(10, 25, 54, .66)) !important;
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(24, 137, 255, .2), inset 0 0 0 1px rgba(91, 193, 255, .2) !important;
}

.nav-item.active::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -35%;
  width: 28%;
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .56), transparent);
  transform: skewX(-18deg);
}

.nav-item.nav-sweep::before {
  animation: nav-wipe .56s cubic-bezier(.2, .8, .2, 1) both;
}

.nav-item.nav-sweep::after {
  animation: nav-glint .56s ease-out both;
}

.nav-item:active {
  transform: translateX(3px) scale(.985);
}

.nav-item svg,
.nav-item span {
  position: relative;
  z-index: 3;
}

@keyframes nav-wipe {
  0% { transform: translateX(-105%); filter: hue-rotate(0deg); }
  55% { transform: translateX(0); filter: hue-rotate(22deg); }
  100% { transform: translateX(105%); filter: hue-rotate(50deg); }
}

@keyframes nav-glint {
  0% { left: -35%; opacity: 0; }
  25% { opacity: 1; }
  100% { left: 125%; opacity: 0; }
}

/* Cinematic scene transition inspired by editorial product sites: a short energy-ring reveal. */
#app {
  position: relative;
}

#app.scene-enter::before {
  content: "";
  position: fixed;
  z-index: 80;
  left: 50%;
  top: 42%;
  width: 150px;
  height: 150px;
  border: 2px solid rgba(58, 196, 255, .72);
  border-right-color: rgba(241, 194, 93, .86);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.18) rotate(-35deg);
  box-shadow: 0 0 26px rgba(44, 184, 255, .22), inset 0 0 22px rgba(44, 184, 255, .12);
  animation: scene-ring-reveal .92s cubic-bezier(.2, .72, .2, 1) both;
}

#app.scene-enter::after {
  content: "";
  position: fixed;
  z-index: 79;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(115deg, transparent 38%, rgba(92, 207, 255, .12) 50%, transparent 62%);
  transform: translateX(-100%);
  animation: scene-scan .9s ease-out both;
}

#app.scene-enter .shell,
#app.scene-enter .auth-card {
  animation: scene-content-in .7s cubic-bezier(.2, .8, .2, 1) both;
}

#app.scene-enter .home-hero,
#app.scene-enter .voice-layout,
#app.scene-enter .requests-layout,
#app.scene-enter .stat-card,
#app.scene-enter .card,
#app.scene-enter .auth-card {
  animation: scene-card-in .65s cubic-bezier(.2, .8, .2, 1) both;
}

#app.scene-enter .stat-card:nth-child(2),
#app.scene-enter .product-card:nth-child(2) { animation-delay: .08s; }
#app.scene-enter .stat-card:nth-child(3),
#app.scene-enter .product-card:nth-child(3) { animation-delay: .14s; }
#app.scene-enter .stat-card:nth-child(4),
#app.scene-enter .product-card:nth-child(4) { animation-delay: .2s; }

@keyframes scene-ring-reveal {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.18) rotate(-35deg); }
  18% { opacity: .95; }
  72% { opacity: .42; transform: translate(-50%, -50%) scale(1.38) rotate(155deg); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(2.1) rotate(245deg); }
}

@keyframes scene-scan {
  0% { opacity: 0; transform: translateX(-100%); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateX(100%); }
}

@keyframes scene-content-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes scene-card-in {
  from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(4px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  #app.scene-enter::before,
  #app.scene-enter::after,
  #app.scene-enter .shell,
  #app.scene-enter .auth-card,
  #app.scene-enter .home-hero,
  #app.scene-enter .voice-layout,
  #app.scene-enter .requests-layout,
  #app.scene-enter .stat-card,
  #app.scene-enter .card {
    animation: none !important;
  }
}

.auth-login-actions {
  display: grid;
  gap: 9px;
  margin-top: 2px;
}

.auth-demo-login {
  width: 100%;
  min-height: 38px;
  justify-content: center;
  background: rgba(82, 105, 182, 0.08);
  border: 1px solid rgba(82, 105, 182, 0.22);
  color: var(--primary-strong);
  font-size: 13px;
}

.auth-demo-login:hover {
  background: rgba(82, 105, 182, 0.16);
  color: var(--primary-strong);
}

/* Final interaction pass: keep controls simple after the legacy theme layers. */
.btn,
.btn-primary,
.btn-success,
.btn-danger,
.btn-sm,
.text-btn.primary {
  border-radius: 8px;
  clip-path: none;
}

.btn {
  min-height: 36px;
  border: 1px solid rgba(83, 129, 201, 0.24);
  box-shadow: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(27, 68, 145, 0.16);
}

.btn::after,
.btn::before {
  display: none;
}

.card,
.panel,
.voice-card,
.table-wrap,
.auth-card,
.test-card,
.modal,
.toast,
.call-status,
.stat-card,
.product-card,
.clause-item,
.admin-row {
  border-radius: 12px;
}

.nav-item {
  border-radius: 8px;
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--gold), 0 0 22px rgba(28, 122, 255, 0.12);
}

.nav-item.active::after {
  content: "";
  position: absolute;
  right: 12px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold);
}

.content > * {
  animation: content-in 0.42s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes content-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.ripple {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%) scale(0);
  animation: ripple-out 0.55s ease-out forwards;
  pointer-events: none;
}

@keyframes ripple-out {
  to { transform: translate(-50%, -50%) scale(18); opacity: 0; }
}

@media (max-width: 720px) {
  .dev-dock {
    height: 68vh;
    min-height: 440px;
  }
}

/* ---------- Motion layer ---------- */

@keyframes tech-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes top-scan {
  0% {
    left: -90px;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    left: 105%;
    opacity: 0;
  }
}

@keyframes hud-breathe {
  0%, 100% {
    filter: drop-shadow(0 0 3px rgba(241, 194, 93, 0.24));
  }
  50% {
    filter: drop-shadow(0 0 9px rgba(241, 194, 93, 0.58));
  }
}

@keyframes hud-pulse {
  0%, 100% {
    transform: translateY(-50%) rotate(45deg) scale(1);
    box-shadow: 0 0 6px rgba(241, 194, 93, 0.7);
  }
  50% {
    transform: translateY(-50%) rotate(45deg) scale(1.35);
    box-shadow: 0 0 14px rgba(241, 194, 93, 1);
  }
}

@keyframes btn-flow {
  from {
    background-position: 130% 0;
  }
  to {
    background-position: -80% 0;
  }
}

@keyframes dev-line-in {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.content > * {
  animation: tech-rise 0.34s ease-out both;
}

.content > *:nth-child(2) {
  animation-delay: 0.04s;
}

.content > *:nth-child(3) {
  animation-delay: 0.08s;
}

.content > *:nth-child(4) {
  animation-delay: 0.12s;
}

.stat-grid > *,
.product-grid > *,
.voice-layout > * {
  animation: tech-rise 0.3s ease-out both;
}

.stat-grid > *:nth-child(2),
.product-grid > *:nth-child(2),
.voice-layout > *:nth-child(2) {
  animation-delay: 0.05s;
}

.stat-grid > *:nth-child(3),
.product-grid > *:nth-child(3),
.voice-layout > *:nth-child(3) {
  animation-delay: 0.1s;
}

.stat-grid > *:nth-child(4),
.product-grid > *:nth-child(4),
.voice-layout > *:nth-child(4) {
  animation-delay: 0.15s;
}

.topbar::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 72px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(241, 194, 93, 0.9), rgba(55, 200, 255, 0.15));
  opacity: 0;
  pointer-events: none;
  animation: top-scan 4.8s linear infinite;
}

.brand-mark {
  animation: hud-breathe 3.2s ease-in-out infinite;
}

.topbar-title::before,
.nav-item.active::after {
  animation: hud-pulse 2s ease-in-out infinite;
}

.btn::after {
  background-repeat: no-repeat;
  background-size: 220% 100%;
  animation: btn-flow 3.4s linear infinite;
}

.dev-entry {
  animation: dev-line-in 0.22s ease-out both;
}

.dev-entry:nth-child(2) {
  animation-delay: 0.03s;
}

.dev-entry:nth-child(3) {
  animation-delay: 0.06s;
}

.dev-entry:nth-child(4) {
  animation-delay: 0.09s;
}

/* ---------- Persistent text display and developer pages ---------- */

.auth-dev-entry {
  position: fixed;
  top: 16px;
  left: 18px;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: 0;
  padding: 9px 16px 9px 14px;
  background: linear-gradient(115deg, #0a62d4, #0d9bff);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 50%, calc(100% - 9px) 100%, 0 100%);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, transform 0.15s ease;
}

.auth-dev-entry svg {
  width: 16px;
  height: 16px;
}

.auth-dev-entry:hover {
  background: linear-gradient(115deg, #0c74ef, #19b3ff);
  transform: translateY(-1px);
}

.auth-dev-entry.active {
  background: linear-gradient(115deg, rgba(18, 39, 74, 0.94), rgba(4, 10, 22, 0.98));
  color: #f4d28b;
  border: 1px solid rgba(241, 194, 93, 0.3);
}

.broadcast-panel {
  position: relative;
  width: 360px;
  flex: 0 0 360px;
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0b1729 0%, #060d1a 60%, #02060d 100%);
  border-left: 1px solid rgba(55, 200, 255, 0.22);
  box-shadow: -14px 0 38px rgba(0, 0, 0, 0.3);
  animation: dev-dock-in 0.32s ease-out both;
}

.broadcast-panel-head {
  flex: 0 0 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px 0 18px;
  border-bottom: 1px solid rgba(70, 150, 255, 0.2);
  background: linear-gradient(90deg, rgba(13, 60, 118, 0.55), rgba(4, 10, 20, 0.9));
}

.broadcast-panel-title {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #edf6ff;
  font-size: 14px;
  font-weight: 700;
}

.broadcast-panel-title svg {
  width: 17px;
  height: 17px;
  color: #35c8ff;
}

.broadcast-live {
  width: 8px;
  height: 8px;
  background: #f1c25d;
  animation: live-blink 1.6s ease-in-out infinite;
}

@keyframes live-blink {
  0%, 100% {
    opacity: 0.5;
    box-shadow: 0 0 4px rgba(241, 194, 93, 0.4);
  }
  50% {
    opacity: 1;
    box-shadow: 0 0 12px rgba(241, 194, 93, 0.95);
  }
}

.broadcast-feed {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.broadcast-entry {
  padding: 11px 12px;
  border-left: 3px solid #35c8ff;
  background: rgba(18, 52, 96, 0.35);
  animation: tech-rise 0.28s ease-out both;
}

.broadcast-entry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #7f97b6;
  font-family: Consolas, "Courier New", monospace;
  font-size: 10px;
}

.broadcast-entry-head span {
  color: #f1c25d;
  font-weight: 700;
}

.broadcast-entry-text {
  margin-top: 7px;
  color: #dceaf8;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.broadcast-empty {
  min-height: 90px;
  border: 1px dashed rgba(55, 200, 255, 0.22);
  background: repeating-linear-gradient(135deg, rgba(18, 52, 96, 0.08) 0 8px, transparent 8px 16px);
}

.dev-shell .main {
  min-width: 0;
}

.dev-broadcast-layout,
.dev-media-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.dev-send-card,
.dev-history-card,
.dev-key-settings-card,
.media-toggle-card,
.media-upload-card,
.media-list-card {
  min-width: 0;
}

.dev-key-settings-card {
  grid-column: 1 / -1;
}

.dev-send-form {
  display: grid;
  gap: 12px;
}

.dev-broadcast-input {
  min-height: 150px;
  line-height: 1.7;
  resize: vertical;
}

.dev-send-actions,
.media-upload-actions {
  display: flex;
  justify-content: flex-end;
}

.broadcast-list {
  display: grid;
  gap: 10px;
  max-height: 520px;
  overflow-y: auto;
}

.media-toggle-card {
  text-align: left;
}

.media-toggle-btn {
  min-width: 130px;
}

.media-file-input {
  color-scheme: dark;
}

.media-file-input::file-selector-button {
  margin-right: 10px;
  border: 0;
  border-radius: 0;
  padding: 7px 12px;
  background: rgba(13, 110, 255, 0.85);
  color: #ffffff;
  clip-path: polygon(4px 0, calc(100% - 4px) 0, 100% 50%, calc(100% - 4px) 100%, 4px 100%, 0 50%);
}

.media-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 12px;
}

.splash-media-card {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(54, 140, 255, 0.2);
  background: rgba(7, 15, 30, 0.82);
}

.splash-media-preview {
  min-height: 110px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #02050b;
}

.splash-media-preview img,
.splash-media-preview video {
  width: 100%;
  max-height: 230px;
  object-fit: contain;
}

.splash-media-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #7f97b6;
  font-size: 11px;
}

.splash-media-meta span {
  color: #f1c25d;
  font-weight: 700;
}

.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(1, 3, 7, 0.94);
  animation: tech-rise 0.4s ease-out both;
}

.splash-media {
  width: min(100%, 1180px);
  max-height: 88vh;
  display: grid;
  place-items: center;
}

.splash-media img,
.splash-media video {
  width: 100%;
  max-height: 84vh;
  object-fit: contain;
  box-shadow: 0 0 0 1px rgba(241, 194, 93, 0.32), 0 30px 80px rgba(0, 0, 0, 0.7);
}

.splash-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(11, 60, 118, 0.9);
  color: #ffffff;
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

.splash-close svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 1250px) {
  .broadcast-panel {
    order: 2;
    width: 100%;
    flex: 0 0 auto;
    height: 58vh;
    min-height: 420px;
    border-left: 0;
    border-top: 1px solid rgba(55, 200, 255, 0.22);
  }

  .dev-broadcast-layout,
  .dev-media-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .auth-dev-entry {
    top: 12px;
    left: 12px;
    padding: 8px 12px 8px 11px;
    font-size: 12px;
  }

  .broadcast-panel {
    height: 68vh;
  }
}

/* ---------- Blue-violet / green / gold visual system ---------- */

:root {
  --bg: #eaf0fb;
  --surface: #ffffff;
  --surface-soft: #f5f8fe;
  --ink: #25315a;
  --muted: #66739a;
  --line: #d8e1f3;
  --sidebar: #344787;
  --sidebar-deep: #2b3976;
  --sidebar-text: #e8edff;
  --primary: #455ba5;
  --primary-strong: #344787;
  --primary-soft: #e9edfb;
  --accent: #455ba5;
  --accent-soft: #eef1ff;
  --success: #49b181;
  --success-soft: #e7f7ef;
  --danger: #c4515d;
  --danger-soft: #fbeaec;
  --warn: #b77931;
  --warn-soft: #fbf1e4;
  --gold: #d59e55;
  --gold-strong: #bd8033;
  --gold-soft: #fbf1e4;
  --shadow: 0 12px 32px rgba(52, 71, 135, 0.13);
  --radius: 14px;
}

html,
body {
  background: var(--bg);
}

body {
  background-color: var(--bg);
  background-image: none;
  color: var(--ink);
}

::selection {
  background: rgba(69, 91, 165, 0.2);
  color: var(--primary-strong);
}

button:focus-visible,
.btn:focus-visible,
.chip:focus-visible,
.nav-item:focus-visible,
.auth-tab:focus-visible,
.mic-btn:focus-visible,
.text-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.auth-card,
.auth-tabs,
.test-card,
.card,
.panel,
.voice-card,
.stat-card,
.product-card,
.clause-item,
.admin-row,
.table-wrap,
.modal,
.toast,
.call-status {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card::before,
.card::before,
.panel::before,
.voice-card::before,
.table-wrap::before,
.modal::before,
.toast::before {
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--success) 58%, var(--gold));
  opacity: 0.95;
}

.product-card,
.stat-card,
.clause-item,
.admin-row {
  background: var(--surface);
  border-color: var(--line);
  box-shadow: 0 8px 24px rgba(52, 71, 135, 0.09);
}

.sidebar {
  background: linear-gradient(180deg, var(--primary-strong) 0%, #3e5297 52%, #2e3f7d 100%);
  border-right: 0;
}

.sidebar .brand {
  border-bottom-color: rgba(232, 237, 255, 0.2);
}

.sidebar .brand-text p,
.auth-sub,
.auth-subline,
.page-head p,
.voice-hint span,
.admin-meta span,
.field label,
.dialect-row label,
.check-row {
  color: var(--muted);
}

.sidebar .brand-text p,
.sidebar-foot .user-line {
  color: var(--sidebar-text);
  opacity: 0.82;
}

.auth-title,
.auth-card h2,
.sidebar .brand-text h1,
.topbar-title,
.page-head h2,
.card-head h3,
.panel-head h3,
.modal-head h3,
.stat-meta b,
.product-card h4,
.admin-meta b,
.voice-hint strong {
  color: var(--ink);
}

.sidebar .brand-text h1 {
  color: #fff;
}

.main {
  background: var(--bg);
}

.topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--line);
  box-shadow: 0 2px 12px rgba(52, 71, 135, 0.06);
}

.topbar::before {
  background: linear-gradient(180deg, rgba(69, 91, 165, 0.22), rgba(73, 177, 129, 0.05));
}

.brand-mark {
  border-radius: 12px;
  clip-path: none;
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  color: #fff;
  box-shadow: 0 8px 18px rgba(52, 71, 135, 0.2);
}

.btn {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 14px;
  background: var(--surface);
  color: var(--ink);
  clip-path: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.btn::after {
  display: none;
}

.btn:hover {
  background: var(--surface-soft);
  border-color: var(--primary);
  color: var(--primary-strong);
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  text-shadow: none;
}

.btn-primary:hover {
  background: var(--primary-strong);
  color: #fff;
}

.btn-success {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #369b6d;
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #a9414c;
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.btn-sm,
.btn-primary,
.btn-success,
.btn-danger,
.text-btn.primary,
.btn-sm.btn-primary,
.btn-sm.btn-success,
.btn-sm.btn-danger {
  clip-path: none;
  border-radius: 9px;
}

.auth-tabs {
  background: var(--primary-soft);
  border-color: transparent;
  border-radius: 11px;
  box-shadow: none;
}

.auth-tab {
  border-radius: 8px;
  clip-path: none;
  color: var(--muted);
}

.auth-tab:hover {
  background: rgba(69, 91, 165, 0.1);
  color: var(--primary-strong);
}

.auth-tab.active {
  background: var(--surface);
  color: var(--primary-strong);
  box-shadow: 0 3px 10px rgba(52, 71, 135, 0.12);
}

.auth-tab.active::after {
  background: var(--gold);
}

.test-row,
.admin-row,
.clause-item {
  border-color: var(--line);
}

.test-row {
  background: var(--surface-soft);
  border-radius: 9px;
}

.test-row code {
  color: var(--primary-strong);
}

.nav-item {
  border-radius: 9px;
  clip-path: none;
  color: var(--sidebar-text);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.nav-item.active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 3px 0 0 var(--gold);
}

.nav-item.active svg {
  color: #fff;
}

.nav-item::after,
.nav-item.active::after {
  display: none;
}

.role-pill,
.engine-tag,
.badge,
.tag {
  border-radius: 999px;
  clip-path: none;
}

.role-pill {
  background: var(--primary-soft);
  border-color: var(--line);
  color: var(--primary-strong);
  box-shadow: none;
}

.role-pill b {
  color: var(--primary-strong);
}

.engine-tag {
  background: var(--surface-soft);
  border-color: var(--line);
  color: var(--muted);
}

.tag {
  background: var(--primary-soft);
  border: 1px solid #d5ddf5;
  color: var(--primary-strong);
}

.badge-pending {
  background: var(--warn-soft);
  color: #9b6529;
}

.badge-processed,
.badge-active {
  background: var(--success-soft);
  color: #2f8f68;
}

.badge-closed {
  background: #eef1f7;
  color: var(--muted);
}

.badge-disabled {
  background: var(--danger-soft);
  color: var(--danger);
}

.step {
  border-radius: 50%;
  clip-path: none;
  background: var(--primary);
}

.stat-icon,
.product-icon,
.admin-avatar {
  border-radius: 12px;
  clip-path: none;
  box-shadow: none;
}

.stat-icon,
.product-icon {
  background: var(--primary-soft);
  color: var(--primary);
}

.stat-icon.green {
  background: var(--success-soft);
  color: var(--success);
}

.stat-icon.red {
  background: var(--danger-soft);
  color: var(--danger);
}

.stat-icon.amber,
.product-card .product-icon {
  background: var(--gold-soft);
  color: var(--gold-strong);
}

.clause-item .term {
  color: var(--primary-strong);
}

.text-btn,
.text-btn.primary,
.text-btn.ghost,
.chip {
  border-radius: 9px;
  clip-path: none;
}

.text-btn {
  background: var(--surface-soft);
  color: var(--primary-strong);
}

.text-btn:hover,
.text-btn.primary:hover {
  background: var(--primary-strong);
  color: #fff;
}

.text-btn.primary {
  background: var(--primary);
  color: #fff;
}

.text-btn.ghost {
  background: transparent;
  color: var(--muted);
}

.chip {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.chip:hover {
  background: var(--primary);
  color: #fff;
}

.mic-btn {
  border-radius: 50%;
  clip-path: none;
  background: linear-gradient(145deg, var(--primary), var(--primary-strong));
  box-shadow: 0 10px 22px rgba(52, 71, 135, 0.25);
}

.mic-btn:hover {
  background: var(--primary-strong);
  filter: drop-shadow(0 12px 26px rgba(52, 71, 135, 0.28));
}

.mic-btn.recording {
  background: var(--gold);
  color: #fff;
  filter: drop-shadow(0 10px 22px rgba(213, 158, 85, 0.3));
}

.call-status {
  background: var(--primary-soft);
  border-color: #d5ddf5;
  color: var(--primary-strong);
}

.call-status.active {
  background: var(--success-soft);
  border-color: #bde7d2;
  color: #2f8f68;
}

.call-dot {
  border-radius: 50%;
  background: var(--gold);
}

.call-status.active .call-dot {
  background: var(--success);
}

.input,
.select,
textarea.input {
  border-radius: 9px;
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.input::placeholder,
textarea.input::placeholder {
  color: #9aa6c2;
}

.input:focus,
.select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(69, 91, 165, 0.13);
  background: #fff;
}

.select option {
  background: #fff;
  color: var(--ink);
}

.check-row input {
  accent-color: var(--primary);
}

.notice {
  border-radius: 10px;
  border-color: var(--line);
}

.notice-info {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-left-color: var(--primary);
}

.notice-warn {
  background: var(--warn-soft);
  color: #986426;
  border-left-color: var(--gold);
}

.notice-success {
  background: var(--success-soft);
  color: #2f8f68;
  border-left-color: var(--success);
}

.notice-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-left-color: var(--danger);
}

th {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-bottom-color: var(--line);
}

td {
  border-bottom-color: var(--line);
}

tr:hover td {
  background: #f8faff;
}

.empty {
  color: var(--muted);
}

.modal-mask {
  background: rgba(37, 49, 90, 0.42);
  backdrop-filter: blur(6px);
}

.modal {
  background: var(--surface);
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: 0 26px 80px rgba(52, 71, 135, 0.22);
}

.toast {
  background: rgba(255, 255, 255, 0.98);
  border-color: var(--line);
  border-left: 3px solid var(--primary);
  border-radius: 10px;
  box-shadow: 0 14px 34px rgba(52, 71, 135, 0.18);
  color: var(--ink);
}

.toast.success {
  border-left-color: var(--success);
}

.toast.danger {
  border-left-color: var(--danger);
}

.toast.warn {
  border-left-color: var(--gold);
}

.admin-avatar {
  background: var(--primary-soft);
  color: var(--primary);
}

.interim {
  color: var(--gold-strong);
}

.thinking span {
  border-radius: 50%;
  background: var(--primary);
}

.thinking span:nth-child(2) {
  background: var(--success);
}

.thinking span:nth-child(3) {
  background: var(--gold);
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #bec9e3;
  border: 2px solid var(--bg);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #98a8d0;
}

.topbar::after {
  background: linear-gradient(90deg, transparent, rgba(73, 177, 129, 0.65), rgba(213, 158, 85, 0.18));
}

.topbar-title::before {
  background: var(--gold);
  box-shadow: 0 0 12px rgba(213, 158, 85, 0.48);
}

.top-clock,
.auth-clock {
  border-color: var(--line);
  background: var(--surface);
  clip-path: none;
  border-radius: 9px;
  box-shadow: 0 4px 12px rgba(52, 71, 135, 0.08);
}

.clock-date {
  color: var(--muted);
}

.clock-time {
  color: var(--primary-strong);
  text-shadow: none;
}

.sidebar::after {
  background: linear-gradient(180deg, transparent, rgba(213, 158, 85, 0.7), rgba(73, 177, 129, 0.38), transparent);
}

.sidebar .brand::after {
  background: linear-gradient(90deg, rgba(213, 158, 85, 0.85), rgba(73, 177, 129, 0.35) 58%, transparent);
}

.auth-dev-entry {
  border-radius: 9px;
  clip-path: none;
  background: var(--primary);
  box-shadow: 0 8px 20px rgba(52, 71, 135, 0.2);
}

.auth-dev-entry:hover {
  background: var(--primary-strong);
}

.auth-dev-entry.active {
  background: var(--primary-soft);
  color: var(--primary-strong);
  border-color: var(--line);
}

.broadcast-panel {
  background: var(--surface);
  border-left-color: var(--line);
  box-shadow: -12px 0 30px rgba(52, 71, 135, 0.08);
}

.broadcast-panel-head {
  border-bottom-color: var(--line);
  background: var(--primary-soft);
}

.broadcast-panel-title {
  color: var(--ink);
}

.broadcast-panel-title svg {
  color: var(--primary);
}

.broadcast-live {
  background: var(--success);
}

.broadcast-entry {
  border-left-color: var(--success);
  background: var(--success-soft);
}

.broadcast-entry-head {
  color: var(--muted);
}

.broadcast-entry-head span {
  color: var(--primary-strong);
}

.broadcast-entry-text {
  color: var(--ink);
}

.broadcast-empty {
  border-color: #cbd6ec;
  background: repeating-linear-gradient(135deg, rgba(69, 91, 165, 0.05) 0 8px, transparent 8px 16px);
}

.dev-toggle-on {
  background: var(--primary);
}

.dev-dock {
  background: linear-gradient(180deg, #f8faff 0%, #eef3fc 100%);
  border-left-color: #c9d4ed;
  box-shadow: -14px 0 40px rgba(52, 71, 135, 0.12);
}

.dev-dock-head {
  border-bottom-color: var(--line);
  background: linear-gradient(90deg, var(--primary-soft), #f8faff);
}

.dev-dock-title {
  color: var(--primary-strong);
}

.dev-dock-title svg {
  color: var(--primary);
}

.dev-dock-tools {
  align-items: center;
}

.dev-icon-btn {
  border-radius: 8px;
  clip-path: none;
  background: #e6ebf8;
  color: var(--muted);
}

.dev-icon-btn:hover {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.dev-reset-system-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(213, 158, 85, 0.2);
  transition: background 0.15s ease, transform 0.12s ease;
}

.dev-reset-system-btn:hover {
  background: var(--gold-strong);
  transform: translateY(-1px);
}

.dev-reset-system-btn svg {
  width: 14px;
  height: 14px;
}

.dev-key-panel,
.dev-text-box {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.splash-media-card {
  border-color: var(--line);
  background: var(--surface);
  border-radius: 10px;
}

.splash-media-preview {
  background: var(--surface-soft);
  border-radius: 8px;
}

.splash-media-meta {
  color: var(--muted);
}

.splash-media-meta span {
  color: var(--primary-strong);
}

.dev-key-label,
.dev-key-expire {
  color: var(--muted);
}

.dev-key-mode {
  background: var(--gold-soft);
  color: var(--gold-strong);
  clip-path: none;
  border-radius: 999px;
}

.dev-key-mode.custom {
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.dev-key-value {
  border-color: #e4cda8;
  background: #fffaf3;
  color: var(--gold-strong);
}

.dev-log {
  background: transparent;
}

.dev-entry {
  border-left-color: var(--primary);
  background: var(--primary-soft);
  border-radius: 8px;
}

.dev-entry-user {
  border-left-color: var(--gold);
  background: var(--gold-soft);
}

.dev-entry-assistant {
  border-left-color: var(--success);
  background: var(--success-soft);
}

.dev-entry-error {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.dev-entry-meta {
  color: var(--muted);
}

.dev-entry-user .dev-entry-meta span {
  color: var(--gold-strong);
}

.dev-entry-assistant .dev-entry-meta span {
  color: #2f8f68;
}

.dev-entry-error .dev-entry-meta span {
  color: var(--danger);
}

.dev-entry-text {
  color: var(--ink);
}

.dev-thinking span {
  background: var(--gold);
}

.dev-thinking span:nth-child(2) {
  background: var(--success);
}

.dev-thinking span:nth-child(3) {
  background: var(--primary);
}

.media-file-input {
  color-scheme: light;
}

.media-file-input::file-selector-button {
  border-radius: 8px;
  background: var(--primary);
}

.splash-overlay {
  background: rgba(37, 49, 90, 0.72);
}

.splash-media img,
.splash-media video {
  box-shadow: 0 0 0 1px rgba(213, 158, 85, 0.5), 0 30px 80px rgba(52, 71, 135, 0.35);
}

.splash-close {
  border-radius: 50%;
  clip-path: none;
  background: var(--primary);
}

@media (max-width: 1250px) {
  .dev-dock {
    border-left: 0;
    border-top-color: #c9d4ed;
  }

  .broadcast-panel {
    border-left: 0;
    border-top-color: var(--line);
  }
}

/* ---------- Premium insurance experience ---------- */

:root {
  --premium-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --premium-shadow: 0 18px 50px rgba(52, 71, 135, 0.15);
  --premium-shadow-hover: 0 24px 64px rgba(52, 71, 135, 0.22);
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 255, 255, 0.95), transparent 28%),
    radial-gradient(circle at 88% 16%, rgba(73, 177, 129, 0.09), transparent 24%),
    var(--bg);
}

.interactive-surface {
  --pointer-x: 50%;
  --pointer-y: 50%;
}

.auth-page {
  position: relative;
  isolation: isolate;
  align-items: flex-start;
  min-height: 100vh;
  overflow: hidden;
  padding: 82px clamp(28px, 8vw, 144px) 56px;
  background-image:
    linear-gradient(90deg, rgba(234, 240, 251, 0.98) 0%, rgba(234, 240, 251, 0.9) 32%, rgba(234, 240, 251, 0.56) 51%, rgba(234, 240, 251, 0.05) 78%),
    url("../assets/insurance-hero-bg.png");
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat;
  animation: premium-bg-reveal 0.9s var(--premium-ease) both;
}

.auth-page::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -18%;
  background:
    radial-gradient(circle at 20% 28%, rgba(255, 255, 255, 0.78), transparent 24%),
    radial-gradient(circle at 78% 74%, rgba(73, 177, 129, 0.13), transparent 20%),
    radial-gradient(circle at 58% 18%, rgba(213, 158, 85, 0.13), transparent 18%);
  animation: premium-ambient 12s ease-in-out infinite alternate;
  pointer-events: none;
}

.auth-page::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle 260px at var(--pointer-x) var(--pointer-y), rgba(255, 255, 255, 0.42), transparent 72%);
  transition: background 0.18s ease;
  pointer-events: none;
}

.auth-brand,
.auth-card {
  position: relative;
  z-index: 2;
  width: min(100%, 470px);
}

.auth-brand {
  margin-bottom: 12px;
  animation: premium-rise 0.7s 0.08s var(--premium-ease) both;
}

.auth-brand .brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(145deg, #5269b6, var(--primary-strong));
  box-shadow: 0 14px 32px rgba(52, 71, 135, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: premium-float 4.5s ease-in-out infinite;
}

.auth-title {
  font-size: clamp(24px, 2vw, 31px);
  letter-spacing: 0.02em;
  color: var(--primary-strong);
}

.auth-sub {
  color: #53638f;
  letter-spacing: 0.08em;
}

.auth-card {
  max-width: 470px;
  padding: 34px 36px 32px;
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 26px 70px rgba(52, 71, 135, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(22px) saturate(1.2);
  transition: transform 0.35s var(--premium-ease), box-shadow 0.35s var(--premium-ease);
  animation: premium-rise 0.75s 0.16s var(--premium-ease) both;
}

.auth-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 82px rgba(52, 71, 135, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.auth-card::before {
  left: 34px;
  right: 34px;
  top: 0;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, var(--primary), var(--success), var(--gold));
}

.auth-card h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: 0.02em;
}

.auth-tabs {
  padding: 5px;
  margin: 22px 0;
  border-radius: 13px;
  background: rgba(233, 237, 251, 0.88);
}

.auth-tab {
  min-height: 38px;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.auth-tab:hover {
  transform: translateY(-1px);
}

.auth-tab.active {
  background: #fff;
  box-shadow: 0 7px 18px rgba(52, 71, 135, 0.14);
}

.auth-card .btn.stretch {
  min-height: 48px;
  border-radius: 13px;
  font-size: 15px;
  letter-spacing: 0.06em;
}

.auth-clock,
.auth-dev-entry {
  z-index: 4;
  backdrop-filter: blur(14px);
}

.shell {
  animation: premium-shell-in 0.48s var(--premium-ease) both;
}

.sidebar {
  isolation: isolate;
  overflow: hidden;
  box-shadow: 16px 0 40px rgba(52, 71, 135, 0.13);
}

.sidebar::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 260px;
  height: 260px;
  left: -110px;
  bottom: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(73, 177, 129, 0.28), transparent 68%);
  animation: premium-orbit 9s ease-in-out infinite alternate;
  pointer-events: none;
}

.sidebar .brand-mark {
  animation: premium-float 4.8s ease-in-out infinite;
}

.nav-item {
  overflow: hidden;
  transition: transform 0.22s var(--premium-ease), background 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.nav-item:hover {
  transform: translateX(4px);
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--gold), 0 8px 20px rgba(28, 42, 93, 0.16);
}

.topbar {
  backdrop-filter: blur(18px) saturate(1.25);
}

.content {
  background:
    radial-gradient(circle at 90% 8%, rgba(73, 177, 129, 0.08), transparent 22%),
    radial-gradient(circle at 8% 92%, rgba(69, 91, 165, 0.07), transparent 28%);
}

.home-hero {
  position: relative;
  isolation: isolate;
  min-height: 286px;
  overflow: hidden;
  align-items: center;
  margin-bottom: 22px;
  padding: clamp(30px, 4vw, 52px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.93) 36%, rgba(255, 255, 255, 0.38) 64%, rgba(255, 255, 255, 0.03) 86%),
    url("../assets/insurance-hero-bg.png");
  background-position: center, center 56%;
  background-size: cover, cover;
  box-shadow: var(--premium-shadow);
  animation: premium-rise 0.65s var(--premium-ease) both;
}

.home-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(125deg, rgba(69, 91, 165, 0.06), transparent 50%, rgba(73, 177, 129, 0.08));
  pointer-events: none;
}

.home-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(circle 220px at var(--pointer-x) var(--pointer-y), rgba(255, 255, 255, 0.55), transparent 72%);
  transition: background 0.16s ease;
  pointer-events: none;
}

.home-hero > div,
.home-hero .page-actions {
  position: relative;
  z-index: 1;
}

.home-hero > div:first-child {
  max-width: 52%;
}

.home-hero h2 {
  margin-bottom: 12px;
  font-size: clamp(27px, 3vw, 38px);
  line-height: 1.25;
  letter-spacing: 0.015em;
  color: var(--primary-strong);
}

.home-hero p {
  max-width: 540px;
  color: #52618a;
  font-size: 15px;
  line-height: 1.8;
}

.home-hero .page-actions {
  align-self: flex-end;
}

.card,
.panel,
.voice-card,
.stat-card,
.product-card,
.clause-item,
.admin-row,
.table-wrap {
  transition: transform 0.3s var(--premium-ease), box-shadow 0.3s var(--premium-ease), border-color 0.3s ease;
}

.card:hover,
.panel:hover,
.voice-card:hover,
.stat-card:hover,
.product-card:hover,
.clause-item:hover,
.admin-row:hover {
  transform: translateY(-5px);
  border-color: rgba(69, 91, 165, 0.3);
  box-shadow: var(--premium-shadow-hover);
}

.stat-card,
.product-card {
  position: relative;
  overflow: hidden;
}

.stat-card::after,
.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 25%, rgba(255, 255, 255, 0.72) 48%, transparent 70%);
  transform: translateX(-130%);
  transition: transform 0.72s var(--premium-ease);
  pointer-events: none;
}

.stat-card:hover::after,
.product-card:hover::after {
  transform: translateX(130%);
}

.stat-icon,
.product-icon {
  transition: transform 0.3s var(--premium-ease), box-shadow 0.3s ease;
}

.stat-card:hover .stat-icon,
.product-card:hover .product-icon {
  transform: translateY(-3px) rotate(-3deg) scale(1.08);
  box-shadow: 0 10px 22px rgba(52, 71, 135, 0.16);
}

.btn {
  isolation: isolate;
  overflow: hidden;
  box-shadow: 0 5px 14px rgba(52, 71, 135, 0.08);
  transition: transform 0.2s var(--premium-ease), box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.btn::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -70%;
  left: -30%;
  width: 45%;
  height: 240%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.52), transparent);
  transform: rotate(18deg) translateX(-190%);
  transition: transform 0.65s var(--premium-ease);
  pointer-events: none;
}

.btn:hover::before {
  transform: rotate(18deg) translateX(420%);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(52, 71, 135, 0.16);
}

.btn:active,
.auth-tab:active,
.nav-item:active,
.chip:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, #5269b6, var(--primary-strong));
  box-shadow: 0 10px 24px rgba(52, 71, 135, 0.25);
}

.btn-success {
  background: linear-gradient(135deg, #57bd8e, #31986c);
  box-shadow: 0 10px 24px rgba(73, 177, 129, 0.22);
}

.dev-dock,
.broadcast-panel {
  backdrop-filter: blur(18px) saturate(1.18);
}

.dev-reset-system-btn {
  animation: premium-reset-pulse 3s ease-in-out infinite;
}

.toast {
  animation: premium-toast-in 0.38s var(--premium-ease) both;
}

@keyframes premium-bg-reveal {
  from { opacity: 0; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes premium-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes premium-shell-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes premium-float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-6px) rotate(1.5deg); }
}

@keyframes premium-ambient {
  from { transform: translate3d(-1%, -1%, 0) rotate(-1deg); }
  to { transform: translate3d(2%, 1.5%, 0) rotate(1deg); }
}

@keyframes premium-orbit {
  from { transform: translate3d(-12px, 12px, 0) scale(0.92); }
  to { transform: translate3d(20px, -16px, 0) scale(1.08); }
}

@keyframes premium-reset-pulse {
  0%, 100% { box-shadow: 0 4px 12px rgba(213, 158, 85, 0.2); }
  50% { box-shadow: 0 8px 22px rgba(213, 158, 85, 0.38); }
}

@keyframes premium-toast-in {
  from { opacity: 0; transform: translateX(18px) scale(0.96); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@media (max-width: 920px) {
  .auth-page {
    align-items: center;
    padding: 88px 22px 42px;
    background-image:
      linear-gradient(180deg, rgba(234, 240, 251, 0.86), rgba(234, 240, 251, 0.95)),
      url("../assets/insurance-hero-bg.png");
    background-position: center, 66% center;
  }

  .home-hero {
    min-height: 330px;
    align-items: flex-start;
    background-image:
      linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.84) 68%, rgba(255, 255, 255, 0.32)),
      url("../assets/insurance-hero-bg.png");
    background-position: center, 65% center;
  }

  .home-hero > div:first-child {
    max-width: 78%;
  }
}

@media (max-width: 620px) {
  .auth-page {
    justify-content: flex-start;
    padding-top: 96px;
  }

  .auth-brand,
  .auth-card {
    width: 100%;
  }

  .auth-card {
    padding: 28px 22px 24px;
    border-radius: 19px;
  }

  .home-hero {
    min-height: 360px;
    padding: 28px 22px;
    background-position: center, 73% center;
  }

  .home-hero > div:first-child {
    max-width: 100%;
  }

  .home-hero h2 {
    font-size: 28px;
  }
}

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

/* Keep the workspace visible on common laptop and embedded-browser widths. */
@media (max-width: 1250px) {
  .shell {
    flex-wrap: nowrap;
  }

  .main {
    order: 0;
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .broadcast-panel {
    display: none;
  }

  .dev-dock {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    order: 0;
    width: min(400px, calc(100vw - 84px));
    height: 100vh;
    min-height: 0;
    border-top: 0;
    border-left: 1px solid #c9d4ed;
    box-shadow: -18px 0 50px rgba(52, 71, 135, 0.2);
  }
}

/* Final override: the developer entry is icon-only so its label can never overflow. */
.auth-dev-entry {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  border-radius: 50% !important;
  opacity: 0.72 !important;
}

.auth-dev-entry svg {
  flex: 0 0 auto;
  color: #5368a9 !important;
  stroke: #304c97 !important;
  display: block !important;
  fill: none !important;
  stroke-width: 2.4 !important;
}

.auth-dev-entry:hover,
.auth-dev-entry:focus-visible {
  width: 30px !important;
  min-width: 30px !important;
  height: 30px !important;
  padding: 0 !important;
  border-radius: 50% !important;
}

/* Final full-screen page art direction. */
#app[data-page="home"] .content {
  width: 100vw !important;
  max-width: none !important;
  height: calc(100vh - 143px) !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

#app[data-page="home"] .home-hero {
  width: 100vw !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: clamp(36px, 6vw, 86px) clamp(38px, 7vw, 108px) !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  overflow: hidden !important;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,.94) 0%, rgba(255,255,255,.82) 38%, rgba(237,246,255,.22) 68%, rgba(228,241,255,.08) 100%),
    url("../assets/insurance-hero-bg.png") !important;
  background-size: cover !important;
  background-position: center, center !important;
  background-repeat: no-repeat !important;
}

#app[data-page="home"] .home-hero::before,
#app[data-page="home"] .home-hero::after {
  display: none !important;
}

#app[data-page="home"] .home-hero > div:first-child {
  max-width: min(760px, 64vw) !important;
}

#app[data-page="home"] .home-hero h2 {
  font-size: clamp(38px, 5.2vw, 76px) !important;
  white-space: normal;
}

.fraud-glass {
  position: absolute;
  top: clamp(28px, 5vw, 64px);
  left: clamp(28px, 6vw, 96px);
  width: min(300px, 32vw);
  padding: 15px 18px;
  border: 1px solid rgba(255, 255, 255, .62);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .42), rgba(236, 248, 255, .18));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 14px 32px rgba(52, 71, 135, .1);
  -webkit-backdrop-filter: blur(18px) saturate(1.28);
  backdrop-filter: blur(18px) saturate(1.28);
}

.fraud-glass-head {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2d6bb8;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
}

.fraud-glass-head svg { width: 17px; height: 17px; color: #3fb4c7; }
.fraud-glass-head em { margin-left: auto; color: rgba(45, 107, 184, .45); font-size: 9px; font-style: normal; letter-spacing: .14em; }
.fraud-tip-refresh { display: inline-flex; align-items: center; justify-content: center; margin-left: 4px; width: 24px; height: 24px; padding: 0; border: 1px solid rgba(63, 180, 199, .28); border-radius: 50%; color: #2d6bb8; background: rgba(255,255,255,.38); cursor: pointer; transition: transform .25s ease, background .2s ease, color .2s ease; }
.fraud-tip-refresh svg { width: 13px; height: 13px; }
.fraud-tip-refresh:hover { color: #fff; background: #3e76bc; transform: rotate(180deg); }
.fraud-glass p { margin: 10px 0 4px; color: #344a7e; font-size: 13px; line-height: 1.55; }
.fraud-glass small { color: #7180a4; font-size: 10px; }
.fraud-home-link { display: inline-flex; align-items: center; gap: 5px; margin-top: 10px; padding: 5px 8px; border: 0; border-radius: 8px; color: #2d6bb8; background: rgba(255,255,255,.4); font-size: 10px; font-weight: 700; cursor: pointer; transition: .2s ease; }
.fraud-home-link svg { width: 13px; height: 13px; }
.fraud-home-link:hover { color: #fff; background: #3e76bc; transform: translateY(-1px); }

.fraud-checker {
  position: absolute;
  top: clamp(28px, 5vw, 64px);
  right: clamp(28px, 5vw, 76px);
  width: min(340px, 34vw);
  padding: 16px 18px 14px;
  border: 1px solid rgba(255, 255, 255, .58);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .44), rgba(218, 240, 255, .2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .74), 0 16px 34px rgba(52, 71, 135, .12);
  -webkit-backdrop-filter: blur(20px) saturate(1.34);
  backdrop-filter: blur(20px) saturate(1.34);
  z-index: 2;
}
.fraud-checker-head { display: flex; align-items: center; gap: 9px; }
.fraud-checker-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; color: #2571c4; background: rgba(255,255,255,.54); }
.fraud-checker-icon svg { width: 17px; height: 17px; }
.fraud-checker-head strong { display: block; color: #2e4a88; font-size: 14px; letter-spacing: .04em; }
.fraud-checker-head span { display: block; margin-top: 2px; color: #7283a9; font-size: 10px; }
.fraud-checker-head em { margin-left: auto; color: rgba(45,107,184,.5); font-size: 10px; font-style: normal; letter-spacing: .16em; }
.fraud-check-form { display: flex; align-items: center; gap: 6px; margin-top: 12px; }
.fraud-check-form .input { min-width: 0; height: 34px; padding: 0 10px; border-color: rgba(96, 137, 190, .24); background: rgba(255,255,255,.56); font-size: 11px; }
.fraud-check-form .btn { height: 34px; padding: 0 10px; white-space: nowrap; font-size: 11px; }
.fraud-check-form .btn svg { width: 14px; height: 14px; }
.fraud-mic-btn { display: inline-flex; flex: 0 0 32px; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 1px solid rgba(65, 119, 184, .25); border-radius: 10px; color: #3d70b6; background: rgba(255,255,255,.58); cursor: pointer; transition: .2s ease; }
.fraud-mic-btn svg { width: 15px; height: 15px; }
.fraud-mic-btn:hover { color: #fff; background: #4075bd; transform: translateY(-1px); }
.fraud-mic-btn.recording { color: #fff; background: #df6f72; box-shadow: 0 0 0 5px rgba(223,111,114,.15); animation: micPulse 1.2s ease-in-out infinite; }
.fraud-check-result { min-height: 54px; margin-top: 10px; padding: 9px 10px; border-radius: 11px; color: #344a7e; background: rgba(255,255,255,.34); font-size: 11px; line-height: 1.55; white-space: pre-line; }
.fraud-check-result.is-busy { color: #5272a5; }
.fraud-check-loading { display: inline-flex; align-items: center; gap: 4px; }
.fraud-check-loading i { width: 5px; height: 5px; border-radius: 50%; background: #4a8bc8; animation: fraudDot 1s ease-in-out infinite; }
.fraud-check-loading i:nth-child(2) { animation-delay: .14s; }
.fraud-check-loading i:nth-child(3) { animation-delay: .28s; }
.fraud-check-note { display: block; margin-top: 7px; color: #7180a4; font-size: 9px; line-height: 1.35; }
@keyframes fraudDot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }

#app[data-page="fraud"] .content { background-position: center, 64% center !important; }
.fraud-page-head { align-items: end; }
.fraud-page-head h2 { margin-top: 4px; }
.fraud-page-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .85fr); gap: 18px; max-width: 1080px; margin: 18px auto 0; }
.liquid-panel { border: 1px solid rgba(255,255,255,.58); border-radius: 22px; background: linear-gradient(135deg, rgba(255,255,255,.56), rgba(220,239,255,.28)); box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 18px 42px rgba(45,71,132,.12); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3); }
.fraud-analysis-card { padding: clamp(22px, 3vw, 34px); }
.fraud-analysis-card .fraud-checker-head strong { font-size: 18px; }
.fraud-analysis-card .fraud-checker-head span { font-size: 12px; }
.fraud-check-form-large { display: block; margin-top: 22px; }
.fraud-check-textarea { display: block; width: 100%; min-height: 138px; resize: vertical; padding: 14px; border-color: rgba(73,116,174,.24); background: rgba(255,255,255,.54); font-size: 14px; line-height: 1.65; }
.fraud-form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin-top: 12px; }
.fraud-form-actions .fraud-mic-btn { width: auto; padding: 0 12px; gap: 6px; white-space: nowrap; }
.fraud-check-result-large { min-height: 120px; margin-top: 18px; padding: 16px; font-size: 14px; line-height: 1.8; background: rgba(255,255,255,.4); }
.fraud-source-badge { display: inline-block; margin-bottom: 8px; padding: 3px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; line-height: 1.4; }
.fraud-source-badge.is-model { color: #236b9c; background: rgba(63,180,199,.16); border: 1px solid rgba(63,180,199,.3); }
.fraud-source-badge.is-local { color: #8a651d; background: rgba(241,194,93,.18); border: 1px solid rgba(190,145,43,.28); }
.fraud-risk { display: inline-block; margin: 0 2px 5px 0; padding: 2px 9px; border-radius: 999px; font-weight: 800; line-height: 1.45; }
.fraud-risk-high { color: #a52f3a; background: rgba(239, 91, 103, .18); border: 1px solid rgba(211, 71, 86, .32); }
.fraud-risk-medium { color: #9a6518; background: rgba(236, 170, 62, .2); border: 1px solid rgba(211, 145, 34, .3); }
.fraud-risk-low { color: #24734e; background: rgba(65, 180, 125, .18); border: 1px solid rgba(47, 155, 104, .3); }
.fraud-guide-card { align-self: stretch; padding: clamp(22px, 3vw, 30px); color: #344a7e; }
.fraud-guide-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: #2f72bb; background: rgba(255,255,255,.56); }
.fraud-guide-icon svg { width: 22px; height: 22px; }
.fraud-guide-card h3 { margin: 16px 0 18px; color: #2e4a88; font-size: 18px; }
.fraud-guide-card ol { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: fraud-step; }
.fraud-guide-card li { display: grid; grid-template-columns: 32px 1fr; gap: 10px; align-items: start; counter-increment: fraud-step; }
.fraud-guide-card li b { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; color: #fff; background: linear-gradient(135deg,#4c81c4,#5bb2bd); font-size: 13px; }
.fraud-guide-card li span { padding-top: 4px; font-size: 13px; line-height: 1.55; }
.fraud-example-tip { margin-top: 24px; padding: 12px; border-radius: 12px; color: #526c9c; background: rgba(255,255,255,.34); font-size: 11px; line-height: 1.55; }

/* Full-page rightward wipe used when switching modules. */
#app.scene-enter.page-swipe::before {
  display: block;
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(105deg, transparent 0%, transparent 34%, rgba(83, 202, 255, .16) 43%, rgba(255, 255, 255, .94) 49%, rgba(241, 194, 93, .86) 50.5%, rgba(83, 202, 255, .18) 56%, transparent 68%, transparent 100%);
  transform: translateX(-115%);
  will-change: transform, opacity;
  box-shadow: 0 0 34px rgba(77, 180, 238, .32);
  animation: page-right-wipe .9s cubic-bezier(.18, .78, .2, 1) both;
}
#app.scene-enter.page-swipe::after {
  opacity: .24;
  animation: page-right-scan .9s cubic-bezier(.18, .78, .2, 1) both;
}
@keyframes page-right-wipe {
  0% { opacity: 0; transform: translateX(-115%); }
  16% { opacity: 1; }
  72% { opacity: .9; }
  100% { opacity: 0; transform: translateX(115%); }
}
@keyframes page-right-scan {
  0% { transform: translateX(-100%); }
  20% { opacity: .5; }
  100% { transform: translateX(100%); opacity: 0; }
}

/* Keep the AI question and answer aligned in one desktop viewport. */
#app[data-page="voice"] .ai-consult-layout {
  grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  height: min(60vh, 560px);
  align-items: stretch;
}
#app[data-page="voice"] .ai-console,
#app[data-page="voice"] .ai-answer {
  height: 100%;
  min-height: 0;
}
#app[data-page="voice"] .ai-answer {
  overflow-y: auto;
  scrollbar-width: thin;
}
#app[data-page="voice"] .ai-answer-head h3 { font-size: clamp(21px, 2.2vw, 30px); white-space: nowrap; }

@media (max-width: 680px) {
  #app[data-page="voice"] .ai-consult-layout { grid-template-columns: 1fr; height: auto; }
  #app[data-page="voice"] .ai-console,
  #app[data-page="voice"] .ai-answer { height: auto; }
}

@media (max-width: 760px) {
  .fraud-glass { top: 24px; left: 22px; width: min(250px, calc(100vw - 44px)); padding: 12px 14px; }
  .fraud-glass p { margin-top: 7px; font-size: 12px; }
  .fraud-checker { top: auto; right: 18px; bottom: 24px; width: min(330px, calc(100vw - 36px)); }
  .fraud-page-grid { grid-template-columns: 1fr; margin-top: 12px; }
  .fraud-guide-card { display: none; }
  .fraud-page-head { align-items: start; }
}

/* Every module uses the same full-image language as the homepage, with page-specific framing. */
#app:not([data-page="home"]) .content {
  position: relative;
  isolation: isolate;
  width: 100vw !important;
  max-width: none !important;
  height: calc(100vh - 143px) !important;
  padding: clamp(24px, 4vw, 54px) clamp(28px, 6vw, 84px) !important;
  margin: 0 !important;
  overflow: hidden !important;
  background-image:
    linear-gradient(110deg, rgba(244,249,255,.94), rgba(235,246,255,.72) 48%, rgba(220,238,255,.38)),
    url("../assets/insurance-hero-bg.png") !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

#app[data-page="intro"] .content { background-position: center, 70% center !important; }
#app[data-page="voice"] .content { background-position: center, 58% center !important; }
#app[data-page="requests"] .content { background-position: center, 82% center !important; }
#app[data-page="workbench"] .content,
#app[data-page="users"] .content,
#app[data-page="admins"] .content,
#app[data-page="calls"] .content { background-position: center, 74% center !important; }
#app[data-page="broadcast"] .content,
#app[data-page="media"] .content { background-position: center, 62% center !important; }

/* Only the system introduction is a readable long-form page; all other modules remain fixed. */
#app[data-page="intro"] .content {
  height: calc(100vh - 143px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  scrollbar-width: thin;
  scrollbar-color: rgba(83, 104, 169, .35) transparent;
}

#app[data-page="intro"] .system-intro-page {
  min-height: calc(100vh - 198px);
  margin-bottom: 28px;
}

@media (max-width: 760px) {
  #app[data-page="home"] .content,
  #app:not([data-page="home"]) .content { height: calc(100vh - 130px) !important; }
  #app[data-page="home"] .home-hero { padding: 28px 22px !important; background-position: center, 66% center !important; }
  #app[data-page="home"] .home-hero > div:first-child { max-width: 100% !important; }
  #app[data-page="home"] .home-hero h2 { font-size: clamp(34px, 10vw, 52px) !important; }
  #app[data-page="intro"] .content { height: calc(100vh - 130px) !important; }
}
/* Cloud forum entry: scoped to preserve the existing application. */
.forum-entry { max-width: 940px; background: var(--surface, #fff); border: 1px solid var(--line, #dfe4ea); border-radius: 14px; overflow: hidden; }
.forum-entry-brand { display: flex; align-items: center; gap: 20px; padding: 30px; background: #edf6f7; color: #155e75; }
.forum-entry-brand img { flex: 0 0 auto; border-radius: 14px; }
.forum-entry-brand h2 { margin: 0 0 9px; font-size: 25px; }
.forum-entry-brand p { margin: 0; font-size: 14px; color: #456a76; }
.forum-entry-content { padding: 30px; line-height: 1.9; }
.forum-entry-content h3 { margin: 0 0 14px; font-size: 19px; }
.forum-entry-content p, .forum-entry-content li { font-size: 14px; }
.forum-entry-content ul { padding-left: 22px; margin: 20px 0; }
.forum-entry-note { color: #526c78; padding: 17px 20px; border-radius: 8px; background: #f4f8fa; }
.forum-entry-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 25px; align-items: center; }
.forum-entry-address { color: #526c78; overflow-wrap: anywhere; font-size: 12px !important; margin-top: 16px; }
.forum-entry-status { color: #526c78; margin: 22px 0 15px; }
@media (max-width: 650px) { .forum-entry-brand { padding: 23px 20px; gap: 14px; align-items: flex-start; } .forum-entry-brand h2 { font-size: 20px; } .forum-entry-brand img { width: 48px; height: 48px; } .forum-entry-content { padding: 23px 20px; } }
