    :root {
      --bg: #f6fbff;
      --card: rgba(255, 255, 255, 0.78);
      --card-soft: rgba(244, 248, 255, 0.82);
      --line: rgba(120, 154, 191, 0.18);
      --text: #173455;
      --muted: #64809f;
      --accent: #0e7ef8;
      --warn: #f59e0b;
      --danger: #ef4444;
      --ok: #10b981;
      --radius: 14px;
      --shadow: 0 20px 48px rgba(15, 42, 77, 0.11);
    }

    * { box-sizing: border-box; }
    body {
      margin: 0;
      color: var(--text);
      background:
        radial-gradient(circle at 8% 8%, rgba(177, 217, 255, 0.82), transparent 28%),
        radial-gradient(circle at 92% 10%, rgba(255, 218, 176, 0.74), transparent 22%),
        linear-gradient(180deg, #f6fbff, #edf5ff 52%, #f9fbff);
      font-family: "Poppins", "Segoe UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
      min-height: 100vh;
    }
    body.auth-pending {
      visibility: hidden;
    }
    body.auth-ready {
      visibility: visible;
    }

    .app-shell {
      max-width: 1400px;
      margin: 0 auto;
      padding: 18px 20px 20px;
    }

    .topbar {
      margin-bottom: 12px;
      border: 1px solid var(--line);
      border-radius: 28px;
      background: rgba(255, 255, 255, 0.78);
      box-shadow: var(--shadow);
      backdrop-filter: blur(10px);
      padding: 14px 18px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }
    .topbar-start {
      display: flex;
      align-items: center;
      gap: 12px;
      flex: 0 1 auto;
      min-width: 0;
    }
    .topbar strong {
      font-size: 16px;
      letter-spacing: 0.01em;
      color: #143050;
      white-space: nowrap;
      flex: 0 0 auto;
    }
    .topbar .actions {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 8px;
      flex-wrap: nowrap;
      flex: 1 1 auto;
      margin-left: auto;
      min-width: 0;
    }
    .nav-group {
      display: flex;
      align-items: center;
      gap: 8px;
      flex: 0 0 auto;
      flex-wrap: nowrap;
    }
    .nav-link {
      background: rgba(255, 255, 255, 0.84);
      border-color: rgba(15, 42, 77, 0.12);
      color: #173455;
      box-shadow: 0 12px 24px rgba(15, 42, 77, 0.08);
    }
    .nav-link.active,
    .nav-link[aria-current="page"] {
      background: linear-gradient(180deg, #0e7ef8, #0a69d0);
      border-color: #0e7ef8;
      color: #ffffff;
      box-shadow: 0 16px 30px rgba(14, 126, 248, 0.24);
    }
    .nav-link.active:disabled,
    .nav-link[aria-current="page"]:disabled {
      opacity: 1;
      cursor: default;
    }
    .current-user {
      font-size: 12px;
      color: var(--muted);
      flex: 1 1 220px;
      min-width: 120px;
      max-width: 280px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .language-switch {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      flex: 0 0 auto;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.74);
      border: 1px solid rgba(15, 42, 77, 0.08);
      box-shadow: 0 10px 20px rgba(15, 42, 77, 0.06);
    }
    .language-switch .form-select {
      min-width: 118px;
      border: 0;
      padding-top: 0;
      padding-bottom: 0;
      background-color: transparent;
      box-shadow: none;
    }

    .shell {
      display: grid;
      gap: 16px;
      grid-template-columns: 380px 1fr;
    }

    .qa-panel {
      margin-top: 16px;
    }

    .qa-grid {
      display: grid;
      gap: 12px;
      grid-template-columns: 1fr 1fr;
      padding: 12px;
    }

    .qa-full-panel {
      overflow: hidden;
    }
    .qa-head {
      border-bottom: none;
      padding-bottom: 8px;
    }
    .qa-tab-row {
      display: flex;
      gap: 8px;
      padding: 0 16px 10px;
      border-bottom: 1px solid var(--line);
    }
    .qa-tab {
      border-radius: 999px;
      padding: 6px 12px;
      font-size: 12px;
      background: #102235;
    }
    .qa-tab.active {
      border-color: #38bdf8;
      background: #0e7490;
    }
    .qa-toolbar {
      display: flex;
      justify-content: space-between;
      align-items: flex-end;
      gap: 10px;
      padding: 12px 16px;
      border-bottom: 1px solid var(--line);
    }
    .qa-toolbar-left {
      display: grid;
      gap: 6px;
    }
    .qa-toolbar-left input {
      width: min(360px, 100%);
    }
    .inline-toggle {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      min-height: 40px;
      padding: 0 14px;
      border: 1px solid #27384d;
      border-radius: 999px;
      background: rgba(15, 29, 47, 0.82);
      color: #d8e7f7;
      font-size: 12px;
      line-height: 1.4;
    }
    .qa-toolbar select {
      min-width: 240px;
    }
    .toolbar-status {
      margin: 10px 16px 0;
      padding: 10px 14px;
      border-radius: 14px;
      border: 1px solid rgba(120, 154, 191, 0.26);
      background: rgba(244, 249, 255, 0.88);
      color: #42617f;
      font-size: 13px;
      line-height: 1.5;
    }
    .toolbar-status.is-pending {
      border-color: rgba(58, 124, 202, 0.24);
      background: rgba(232, 242, 255, 0.92);
      color: #26507f;
    }
    .toolbar-status.is-success {
      border-color: rgba(57, 132, 96, 0.24);
      background: rgba(236, 248, 242, 0.94);
      color: #276347;
    }
    .toolbar-status.is-neutral {
      border-color: rgba(120, 154, 191, 0.26);
      background: rgba(244, 249, 255, 0.88);
      color: #42617f;
    }
    .toolbar-status.is-error {
      border-color: rgba(189, 86, 86, 0.24);
      background: rgba(255, 241, 241, 0.94);
      color: #9a3f3f;
    }
    .qa-page-list {
      padding: 12px 16px 16px;
      max-height: calc(100vh - 260px);
      overflow: auto;
    }
    .qa-context-summary {
      margin: 12px 16px 0;
      padding: 12px 14px;
      border: 1px solid #294866;
      border-radius: 12px;
      background: linear-gradient(135deg, rgba(8, 32, 51, 0.95), rgba(13, 61, 82, 0.78));
      color: #d8ecf8;
      display: grid;
      gap: 6px;
    }
    .qa-context-summary .summary-title {
      font-size: 13px;
      font-weight: 700;
      color: #f0f9ff;
    }
    .qa-context-summary .summary-meta {
      font-size: 12px;
      color: #b7d3e7;
      line-height: 1.5;
      white-space: pre-wrap;
    }
    .shop-item {
      border: 1px solid #2a3b52;
      border-radius: 10px;
      background: #122033;
      padding: 10px;
      margin-bottom: 8px;
    }
    .shop-item .shop-title {
      font-size: 13px;
      font-weight: 700;
      color: #dbeafe;
    }
    .shop-item .shop-meta {
      font-size: 12px;
      color: var(--muted);
      margin-top: 4px;
    }
    .config-item {
      border: 1px solid #2a3b52;
      border-radius: 12px;
      background: #122033;
      padding: 12px;
      display: grid;
      gap: 10px;
      margin-bottom: 10px;
    }
    .config-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
    }
    .config-block {
      border: 1px solid #27384d;
      border-radius: 10px;
      background: #0f1d2f;
      padding: 10px;
      display: grid;
      gap: 6px;
    }
    .config-value {
      font-size: 14px;
      font-weight: 700;
      color: #e0f2fe;
      word-break: break-word;
    }
    .config-key {
      font-size: 12px;
      color: #cbd5f5;
      word-break: break-all;
    }
    .config-meta {
      font-size: 12px;
      color: var(--muted);
    }
    .account-item {
      border: 1px solid #2a3b52;
      border-radius: 12px;
      background: #122033;
      padding: 12px;
      display: grid;
      gap: 10px;
      margin-bottom: 10px;
    }
    .account-top {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
    }
    .account-name {
      font-size: 14px;
      font-weight: 700;
      color: #dbeafe;
    }
    .account-meta {
      font-size: 12px;
      color: var(--muted);
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .modal-mask {
      position: fixed;
      inset: 0;
      background: rgba(2, 8, 23, 0.68);
      display: grid;
      place-items: center;
      z-index: 30;
      padding: 14px;
    }
    .modal-card {
      width: min(680px, 100%);
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #0d1725;
      overflow: hidden;
      box-shadow: var(--shadow);
    }
    .authorize-modal-card {
      width: min(560px, 100%);
    }
    .authorize-modal-body {
      gap: 16px;
    }
    .authorize-modal-desc {
      margin: 0;
      color: #64809f;
      line-height: 1.65;
      font-size: 14px;
    }
    .authorize-status-panel {
      display: grid;
      gap: 10px;
      padding: 16px 18px;
      border-radius: 18px;
      border: 1px solid rgba(120, 154, 191, 0.18);
      background: rgba(255, 255, 255, 0.7);
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.42);
    }
    .authorize-status-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
      color: #173455;
      font-size: 14px;
    }
    .authorize-status-row code {
      padding: 4px 10px;
      border-radius: 999px;
      background: rgba(14, 126, 248, 0.08);
      border: 1px solid rgba(14, 126, 248, 0.12);
      color: #0a69d0;
      font-size: 12px;
      word-break: break-all;
    }
    .authorize-status-value {
      color: #0a69d0;
      font-size: 15px;
      font-weight: 700;
    }
    .authorize-status-message {
      min-height: 18px;
      line-height: 1.5;
    }

    .panel {
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: linear-gradient(180deg, var(--card), #0f1723);
      box-shadow: var(--shadow);
      overflow: hidden;
    }

    .head {
      padding: 14px 16px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }

    .head h2 {
      margin: 0;
      font-size: 16px;
      letter-spacing: 0.02em;
    }

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

    .queue-head {
      display: grid;
      gap: 12px;
      align-items: stretch;
    }
    .queue-head-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .queue-controls {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px 12px;
      align-items: end;
    }
    .queue-field {
      display: grid;
      gap: 6px;
      min-width: 0;
    }
    .queue-toggle-field {
      align-self: end;
    }
    .queue-field input,
    .queue-field select {
      width: 100%;
      min-width: 0;
    }
    .queue-search-field {
      grid-column: 1 / -1;
    }
    .queue-actions {
      grid-column: 1 / -1;
      display: flex;
      justify-content: flex-end;
      gap: 8px;
    }
    .queue-actions button {
      min-width: 84px;
    }

    select, input, textarea, button {
      border-radius: 10px;
      border: 1px solid var(--line);
      background: #0c1521;
      color: var(--text);
      padding: 8px 10px;
      font: inherit;
    }

    button {
      cursor: pointer;
      transition: transform .12s ease, background .12s ease;
      background: #12283c;
    }
    button:hover { transform: translateY(-1px); }
    button:disabled {
      cursor: not-allowed;
      opacity: 0.55;
      transform: none;
    }
    button.primary { background: #0e7490; border-color: #38bdf8; }
    button.warn { background: #5b3c08; border-color: #f59e0b; }
    button.danger { background: #571414; border-color: #ef4444; }
    input:not([type="checkbox"]):focus,
    select:focus,
    textarea:focus {
      outline: none;
      border-color: #38bdf8;
      box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
    }
    .form-select {
      width: 100%;
      color: var(--text);
      background-color: #0c1521;
      border-color: var(--line);
    }
    .form-select:not([multiple]) {
      appearance: none;
      -webkit-appearance: none;
      padding-right: 40px;
      background-image:
        linear-gradient(45deg, transparent 50%, #8fb9d8 50%),
        linear-gradient(135deg, #8fb9d8 50%, transparent 50%);
      background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 12px) calc(50% - 2px);
      background-size: 6px 6px;
      background-repeat: no-repeat;
    }
    .form-select-multi {
      appearance: none;
      -webkit-appearance: none;
      min-height: 216px;
      padding: 8px;
      background-image: none;
    }
    .form-select-multi option {
      margin: 2px 0;
      padding: 10px 12px;
      border-radius: 8px;
      background: #102235;
      color: #dbeafe;
    }
    .form-select-multi option:checked {
      background: linear-gradient(180deg, #0e7490, #155e75);
      color: #f0f9ff;
    }
    .select-field {
      display: grid;
      gap: 6px;
    }

    .queue-list {
      max-height: calc(100vh - 180px);
      overflow: auto;
      padding: 8px;
    }
    .queue-summary {
      padding: 8px 16px 0;
    }
    .queue-more {
      padding: 10px 8px 16px;
      text-align: center;
      color: var(--muted);
      font-size: 12px;
    }

    .queue-item {
      border: 1px solid var(--line);
      background: var(--card-soft);
      border-radius: 12px;
      padding: 10px;
      margin-bottom: 8px;
      cursor: pointer;
    }
    .queue-item.active { border-color: var(--accent); background: #0f2a42; }

    .item-top {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      font-size: 12px;
    }
    .item-title { font-weight: 700; font-size: 13px; margin: 6px 0 4px; }
    .item-preview { color: var(--muted); font-size: 12px; line-height: 1.45; }

    .badge {
      display: inline-flex;
      align-items: center;
      padding: 2px 8px;
      border-radius: 999px;
      border: 1px solid var(--line);
      font-size: 11px;
      white-space: nowrap;
    }
    .badge.bot_active { color: #7dd3fc; border-color: #0ea5e9; }
    .badge.in_human { color: #fca5a5; border-color: #ef4444; }
    .badge.send_failed { color: #fcd34d; border-color: #f59e0b; }

    .detail-grid {
      display: grid;
      grid-template-columns: 1fr 330px;
      gap: 12px;
      padding: 12px;
    }

    .card {
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #0d1725;
      overflow: hidden;
    }
    .card-head {
      padding: 10px 12px;
      border-bottom: 1px solid var(--line);
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
    }
    .card .title {
      padding: 10px 12px;
      border-bottom: 1px solid var(--line);
      font-size: 13px;
      font-weight: 700;
      color: #cfe2f7;
    }
    .card-head .title {
      padding: 0;
      border-bottom: 0;
    }
    .detail-refresh-btn {
      min-width: 84px;
      background: #102235;
      border-color: #27425a;
      color: #dbeafe;
    }

    .qa-controls {
      padding: 12px;
      display: grid;
      gap: 8px;
      border-bottom: 1px solid var(--line);
    }
    .qa-controls input,
    .qa-controls textarea,
    .qa-controls select {
      width: 100%;
    }
    .qa-controls textarea {
      min-height: 74px;
      resize: vertical;
    }
    .qa-controls select[multiple] {
      min-height: 144px;
    }
    .qa-form-grid {
      display: grid;
      gap: 8px;
      grid-template-columns: 1fr 1fr;
    }
    .shop-toggle-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }
    .toggle-stack {
      display: grid;
      grid-template-columns: 1fr;
      gap: 12px;
    }
    .shop-toggle-card,
    .toggle-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      min-height: 56px;
      padding: 0 16px;
      border: 1px solid #26384d;
      border-radius: 14px;
      background: rgba(15, 29, 47, 0.78);
      cursor: pointer;
      transition: border-color .16s ease, background .16s ease, transform .16s ease;
    }
    .toggle-copy {
      display: grid;
      gap: 3px;
      min-width: 0;
    }
    .shop-toggle-title,
    .toggle-title {
      color: #dbeafe;
      font-size: 13px;
      font-weight: 600;
      letter-spacing: 0.01em;
    }
    .toggle-hint {
      color: var(--muted);
      font-size: 12px;
    }
    .qa-controls .shop-toggle-input,
    .qa-controls .toggle-input,
    .inline-toggle .toggle-input {
      appearance: none;
      -webkit-appearance: none;
      width: 44px;
      min-width: 44px;
      height: 24px;
      margin: 0;
      padding: 0;
      border-radius: 999px;
      border: 1px solid #35506d;
      background: #09121d;
      position: relative;
      transition: background .16s ease, border-color .16s ease;
      cursor: pointer;
    }
    .qa-controls .shop-toggle-input::before,
    .qa-controls .toggle-input::before,
    .inline-toggle .toggle-input::before {
      content: "";
      position: absolute;
      top: 2px;
      left: 2px;
      width: 18px;
      height: 18px;
      border-radius: 50%;
      background: #d7e5f5;
      box-shadow: 0 2px 6px rgba(2, 6, 23, 0.28);
      transition: transform .16s ease;
    }
    .qa-controls .shop-toggle-input:checked,
    .qa-controls .toggle-input:checked,
    .inline-toggle .toggle-input:checked {
      background: linear-gradient(90deg, #0e7490, #0891b2);
      border-color: #22d3ee;
    }
    .qa-controls .shop-toggle-input:checked::before,
    .qa-controls .toggle-input:checked::before,
    .inline-toggle .toggle-input:checked::before {
      transform: translateX(20px);
      background: #f8fdff;
    }
    .shop-toggle-card:has(.shop-toggle-input:checked),
    .toggle-card:has(.toggle-input:checked) {
      border-color: #2e6f90;
      background: rgba(14, 40, 59, 0.9);
    }
    .shop-toggle-card:hover,
    .toggle-card:hover,
    .inline-toggle:hover {
      border-color: #335a78;
      transform: translateY(-1px);
    }
    .qa-list {
      max-height: 360px;
      overflow: auto;
      padding: 10px;
    }
    .qa-item {
      border: 1px solid #2a3b52;
      border-radius: 10px;
      background: #122033;
      padding: 10px;
      display: grid;
      gap: 8px;
      margin-bottom: 8px;
    }
    .qa-item .qa-question {
      font-size: 13px;
      font-weight: 700;
      color: #dbeafe;
    }
    .qa-item .qa-answer {
      font-size: 12px;
      color: #e2e8f0;
      white-space: pre-wrap;
    }
    .qa-item .qa-actions {
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
    }

    .timeline { max-height: 440px; overflow: auto; padding: 12px; }
    .timeline-tip {
      margin-bottom: 10px;
      text-align: center;
      font-size: 11px;
      color: var(--muted);
    }
    .eventline { max-height: 260px; overflow: auto; padding: 10px; }

    .msg {
      padding: 10px;
      border: 1px solid #2a3b52;
      border-radius: 10px;
      margin-bottom: 8px;
      background: #122033;
    }
    .msg .meta { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
    .msg .text { font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
    .msg .token-usage {
      margin-top: 8px;
      padding-top: 8px;
      border-top: 1px dashed #2a3b52;
      display: grid;
      gap: 5px;
    }
    .msg .token-row {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
      flex-wrap: wrap;
      font-size: 11px;
    }
    .msg .token-model { color: #93c5fd; }
    .msg .token-count { color: #c7d2fe; }

    .controls {
      padding: 12px;
      display: grid;
      gap: 8px;
    }
    .controls label {
      font-size: 11px;
      color: var(--muted);
      margin-bottom: 2px;
      display: block;
    }
    .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .actions { display: flex; gap: 8px; flex-wrap: wrap; }
    .toolbar-pill {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      min-height: 42px;
      padding: 0 16px 0 12px;
      border-radius: 999px;
      border: 1px solid rgba(15, 42, 77, 0.12);
      background: rgba(255, 255, 255, 0.84);
      color: #173455;
      box-shadow: 0 12px 24px rgba(15, 42, 77, 0.08);
      font-weight: 700;
      letter-spacing: 0.01em;
      white-space: nowrap;
    }
    .toolbar-pill:hover {
      background: rgba(255, 255, 255, 0.92);
      box-shadow: 0 16px 28px rgba(15, 42, 77, 0.1);
      transform: translateY(-1px);
    }
    .toolbar-pill:disabled {
      background: rgba(255, 255, 255, 0.72);
      color: #6e87a4;
      box-shadow: 0 8px 18px rgba(15, 42, 77, 0.05);
    }
    .toolbar-pill-icon {
      width: 28px;
      height: 28px;
      border-radius: 999px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      background: rgba(14, 126, 248, 0.1);
      border: 1px solid rgba(14, 126, 248, 0.08);
      color: #0b66cb;
      flex: 0 0 auto;
    }
    .toolbar-pill-icon svg {
      width: 14px;
      height: 14px;
      fill: currentColor;
      display: block;
    }
    .topbar-authorize {
      flex: 0 0 auto;
      white-space: nowrap;
    }
    .readonly-field {
      border-radius: 10px;
      border: 1px solid var(--line);
      background: #0c1521;
      color: var(--text);
      padding: 8px 10px;
      min-height: 38px;
      display: flex;
      align-items: center;
    }

    .send-box { padding: 10px; border-top: 1px solid var(--line); }
    .send-box textarea { width: 100%; min-height: 84px; resize: vertical; }

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

    .ops-page .topbar,
    .ops-page .panel,
    .ops-page .card,
    .ops-page .modal-card {
      border: 1px solid rgba(120, 154, 191, 0.18);
      background: rgba(255, 255, 255, 0.78);
      box-shadow: 0 20px 48px rgba(15, 42, 77, 0.11);
      backdrop-filter: blur(10px);
    }
    .ops-page .topbar {
      border-radius: 28px;
      background: rgba(255, 255, 255, 0.74);
    }
    .ops-page .panel,
    .ops-page .modal-card {
      border-radius: 28px;
    }
    .ops-page .card {
      border-radius: 22px;
      background: rgba(255, 255, 255, 0.74);
    }
    .ops-page .head,
    .ops-page .card-head,
    .ops-page .card .title,
    .ops-page .qa-tab-row,
    .ops-page .qa-toolbar,
    .ops-page .qa-controls {
      border-color: rgba(120, 154, 191, 0.18);
    }
    .ops-page .head h2,
    .ops-page .card .title,
    .ops-page .item-title,
    .ops-page .account-name,
    .ops-page .config-value,
    .ops-page .shop-item .shop-title,
    .ops-page .qa-item .qa-question,
    .ops-page .shop-toggle-title,
    .ops-page .toggle-title {
      color: #173455;
    }
    .ops-page .muted,
    .ops-page .config-meta,
    .ops-page .item-preview,
    .ops-page .shop-item .shop-meta,
    .ops-page .toggle-hint,
    .ops-page .msg .meta,
    .ops-page .msg .token-count,
    .ops-page .queue-more,
    .ops-page .empty {
      color: #64809f;
    }
    .ops-page .qa-tab,
    .ops-page .inline-toggle,
    .ops-page .shop-toggle-card,
    .ops-page .toggle-card,
    .ops-page .readonly-field,
    .ops-page .config-block,
    .ops-page .queue-item,
    .ops-page .qa-item,
    .ops-page .config-item,
    .ops-page .account-item,
    .ops-page .shop-item,
    .ops-page .msg {
      border-color: rgba(120, 154, 191, 0.16);
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 248, 255, 0.72));
      box-shadow: 0 16px 34px rgba(15, 42, 77, 0.08);
    }
    .ops-page .queue-item.active,
    .ops-page .shop-toggle-card:has(.shop-toggle-input:checked),
    .ops-page .toggle-card:has(.toggle-input:checked) {
      border-color: rgba(14, 126, 248, 0.32);
      background:
        radial-gradient(circle at top right, rgba(255, 214, 171, 0.22), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(234, 244, 255, 0.84));
      box-shadow: 0 18px 36px rgba(14, 126, 248, 0.12);
    }
    .ops-page .qa-context-summary {
      border: 1px solid rgba(120, 154, 191, 0.18);
      border-radius: 22px;
      background:
        radial-gradient(circle at top right, rgba(255, 214, 171, 0.24), transparent 24%),
        rgba(255, 255, 255, 0.82);
      color: #173455;
      box-shadow: 0 16px 34px rgba(15, 42, 77, 0.08);
    }
    .ops-page .qa-context-summary .summary-title {
      color: #173455;
    }
    .ops-page .qa-context-summary .summary-meta,
    .ops-page .qa-item .qa-answer,
    .ops-page .msg .text,
    .ops-page .config-key {
      color: #5f7896;
    }
    .ops-page .msg .token-model {
      color: #0b66cb;
    }
    .ops-page .badge {
      border-color: rgba(120, 154, 191, 0.18);
      background: rgba(255, 255, 255, 0.7);
    }
    .ops-page .badge.bot_active {
      color: #0b66cb;
      border-color: rgba(14, 126, 248, 0.36);
      background: rgba(14, 126, 248, 0.08);
    }
    .ops-page .badge.in_human {
      color: #c14545;
      border-color: rgba(193, 69, 69, 0.28);
      background: rgba(193, 69, 69, 0.08);
    }
    .ops-page .badge.send_failed {
      color: #b56600;
      border-color: rgba(245, 158, 11, 0.32);
      background: rgba(245, 158, 11, 0.1);
    }
    .ops-page select,
    .ops-page input,
    .ops-page textarea,
    .ops-page button {
      border-radius: 14px;
      border: 1px solid rgba(15, 42, 77, 0.12);
      background: rgba(255, 255, 255, 0.88);
      color: #173455;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 22px rgba(15, 42, 77, 0.08);
    }
    .ops-page input::placeholder,
    .ops-page textarea::placeholder {
      color: #93a7bf;
    }
    .ops-page input:not([type="checkbox"]):focus,
    .ops-page select:focus,
    .ops-page textarea:focus {
      border-color: rgba(14, 126, 248, 0.58);
      box-shadow: 0 0 0 4px rgba(14, 126, 248, 0.12), 0 14px 28px rgba(14, 126, 248, 0.12);
    }
    .ops-page button {
      background: rgba(255, 255, 255, 0.84);
      color: #173455;
    }
    .ops-page button.primary {
      border-color: #0e7ef8;
      background: linear-gradient(180deg, #0e7ef8, #0a69d0);
      color: #ffffff;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 14px 28px rgba(14, 126, 248, 0.24);
    }
    .ops-page button.warn {
      border-color: rgba(245, 158, 11, 0.2);
      background: rgba(255, 244, 229, 0.94);
      color: #b56600;
    }
    .ops-page button.danger {
      border-color: rgba(193, 69, 69, 0.2);
      background: rgba(255, 238, 238, 0.94);
      color: #c14545;
    }
    .ops-page .detail-refresh-btn,
    .ops-page .nav-link {
      background: rgba(255, 255, 255, 0.84);
      color: #173455;
    }
    .ops-page .form-select {
      background-color: rgba(255, 255, 255, 0.88);
      border-color: rgba(15, 42, 77, 0.12);
      color: #173455;
    }
    .ops-page .form-select:not([multiple]) {
      background-image:
        linear-gradient(45deg, transparent 50%, #7fa3c7 50%),
        linear-gradient(135deg, #7fa3c7 50%, transparent 50%);
    }
    .ops-page .form-select-multi option {
      background: rgba(255, 255, 255, 0.84);
      color: #173455;
    }
    .ops-page .form-select-multi option:checked {
      background: linear-gradient(180deg, #0e7ef8, #0a69d0);
      color: #ffffff;
    }
    .ops-page .qa-controls .shop-toggle-input,
    .ops-page .qa-controls .toggle-input,
    .ops-page .inline-toggle .toggle-input {
      border-color: rgba(120, 154, 191, 0.3);
      background: rgba(228, 237, 248, 0.92);
      box-shadow: none;
    }
    .ops-page .qa-controls .shop-toggle-input::before,
    .ops-page .qa-controls .toggle-input::before,
    .ops-page .inline-toggle .toggle-input::before {
      background: #ffffff;
      box-shadow: 0 2px 8px rgba(15, 42, 77, 0.16);
    }
    .ops-page .qa-controls .shop-toggle-input:checked,
    .ops-page .qa-controls .toggle-input:checked,
    .ops-page .inline-toggle .toggle-input:checked {
      background: linear-gradient(90deg, #0e7ef8, #0a69d0);
      border-color: rgba(14, 126, 248, 0.3);
    }
    .ops-page .timeline,
    .ops-page .eventline,
    .ops-page .queue-list,
    .ops-page .qa-page-list {
      scrollbar-color: rgba(120, 154, 191, 0.45) transparent;
    }
    .ops-page .modal-mask {
      background: rgba(22, 45, 75, 0.18);
      backdrop-filter: blur(8px);
    }

    .login-shell {
      min-height: 100vh;
      display: grid;
      place-items: center;
      padding: 20px;
      background:
        radial-gradient(circle at 8% 10%, rgba(177, 217, 255, 0.75), transparent 28%),
        radial-gradient(circle at 92% 14%, rgba(255, 223, 191, 0.72), transparent 24%),
        linear-gradient(180deg, #f7fbff, #edf5ff 56%, #f8fbff);
    }
    .login-card {
      width: min(440px, 100%);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      background: linear-gradient(180deg, var(--card), #0f1723);
      box-shadow: var(--shadow);
      overflow: hidden;
    }
    .login-card .head {
      border-bottom: 1px solid var(--line);
    }
    .login-card form {
      padding: 14px;
      display: grid;
      gap: 10px;
    }
    .login-card input {
      width: 100%;
    }
    .login-hint {
      min-height: 18px;
      font-size: 12px;
      color: #fca5a5;
    }
    .login-card-split {
      width: min(1080px, 100%);
      display: grid;
      grid-template-columns: minmax(0, 1.08fr) minmax(340px, .92fr);
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.78) 42%, transparent 72%),
        linear-gradient(135deg, rgba(245, 250, 255, 0.96), rgba(236, 244, 255, 0.84));
      border: 1px solid rgba(120, 154, 191, 0.26);
      box-shadow: 0 24px 64px rgba(22, 45, 75, 0.18);
      color: #143050;
      overflow: hidden;
    }
    .login-aside {
      position: relative;
      padding: 42px 40px 38px;
      background:
        radial-gradient(circle at 0% 0%, rgba(14, 126, 248, 0.16), transparent 34%),
        radial-gradient(circle at 100% 0%, rgba(255, 185, 110, 0.22), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(246, 250, 255, 0.72));
      border-right: 1px solid rgba(120, 154, 191, 0.18);
    }
    .login-kicker {
      display: inline-flex;
      align-items: center;
      height: 30px;
      padding: 0 12px;
      border-radius: 999px;
      background: rgba(14, 126, 248, 0.1);
      color: #0b66cb;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
    }
    .login-aside h1 {
      margin: 18px 0 14px;
      font-size: clamp(32px, 4vw, 46px);
      line-height: 1.08;
      color: #143050;
      letter-spacing: -0.03em;
    }
    .login-intro {
      margin: 0;
      max-width: 560px;
      color: #516b8b;
      font-size: 15px;
      line-height: 1.8;
    }
    .login-feature-list {
      display: grid;
      gap: 12px;
      margin-top: 28px;
    }
    .login-feature-item {
      display: grid;
      gap: 4px;
      padding: 14px 16px;
      border-radius: 18px;
      border: 1px solid rgba(120, 154, 191, 0.18);
      background: rgba(255, 255, 255, 0.74);
      box-shadow: 0 14px 28px rgba(17, 38, 64, 0.08);
    }
    .login-feature-item strong {
      color: #163558;
      font-size: 14px;
    }
    .login-feature-item span {
      color: #607996;
      font-size: 13px;
      line-height: 1.6;
    }
    .login-form-pane {
      display: grid;
      align-content: center;
      padding: 28px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(248, 251, 255, 0.78));
    }
    .login-form-pane .head {
      display: grid;
      justify-content: start;
      gap: 8px;
      padding: 0 0 18px;
      border-bottom: 0;
    }
    .login-form-pane .head h2 {
      color: #173455;
      font-size: 24px;
    }
    .login-subtitle {
      margin: 0;
      color: #6a819d;
      font-size: 13px;
      line-height: 1.6;
    }
    .login-card-split form {
      padding: 0;
      gap: 12px;
    }
    .login-card-split label {
      display: grid;
      gap: 6px;
    }
    .login-card-split .muted {
      color: #5f7591;
      font-size: 12px;
      font-weight: 600;
    }
    .login-card-split input,
    .login-card-split .form-select,
    .login-card-split button {
      border-radius: 14px;
      border: 1px solid rgba(15, 42, 77, 0.12);
      background: rgba(255, 255, 255, 0.88);
      color: #173455;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 22px rgba(15, 42, 77, 0.08);
    }
    .login-card-split input::placeholder {
      color: #93a7bf;
    }
    .login-card-split input:focus,
    .login-card-split select:focus,
    .login-card-split textarea:focus {
      border-color: rgba(14, 126, 248, 0.58);
      box-shadow: 0 0 0 4px rgba(14, 126, 248, 0.12), 0 14px 28px rgba(14, 126, 248, 0.12);
    }
    .login-card-split button.primary {
      margin-top: 4px;
      border-color: #0e7ef8;
      background: linear-gradient(180deg, #0e7ef8, #0a69d0);
      color: #ffffff;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 14px 28px rgba(14, 126, 248, 0.24);
    }
    .login-card-split button.primary:hover {
      background: linear-gradient(180deg, #1990ff, #0d74e4);
    }
    .login-card-split .login-hint {
      color: #c14545;
    }

    .home-page {
      background:
        radial-gradient(circle at 8% 8%, rgba(177, 217, 255, 0.82), transparent 28%),
        radial-gradient(circle at 92% 10%, rgba(255, 218, 176, 0.74), transparent 22%),
        linear-gradient(180deg, #f6fbff, #edf5ff 52%, #f9fbff);
      color: #163558;
      font-family: "Poppins", "Segoe UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
    }
    .home-shell {
      max-width: 1240px;
      margin: 0 auto;
      padding: 24px 20px 48px;
    }
    .home-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 28px;
    }
    .home-brand {
      display: inline-flex;
      align-items: center;
      gap: 14px;
      text-decoration: none;
      color: inherit;
    }
    .home-brand-mark {
      width: 52px;
      height: 52px;
      border-radius: 18px;
      display: grid;
      place-items: center;
      font-size: 18px;
      font-weight: 800;
      letter-spacing: 0.06em;
      color: #143050;
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.88), transparent 48%),
        linear-gradient(135deg, #ffd8b1, #c8e6ff 58%, #fff2e5);
      box-shadow: 0 18px 32px rgba(15, 42, 77, 0.14);
    }
    .home-brand-copy {
      display: grid;
      gap: 2px;
    }
    .home-brand-copy strong {
      font-size: 16px;
      letter-spacing: 0.01em;
    }
    .home-brand-copy span {
      font-size: 13px;
      color: #64809f;
    }
    .home-nav {
      display: flex;
      align-items: center;
      gap: 10px;
      flex-wrap: wrap;
    }
    .home-nav a {
      text-decoration: none;
      color: #4e6888;
      font-size: 13px;
      font-weight: 600;
      padding: 10px 14px;
      border-radius: 999px;
      transition: background .18s ease, color .18s ease, transform .18s ease;
    }
    .home-nav a:hover {
      transform: translateY(-1px);
      background: rgba(255, 255, 255, 0.74);
      color: #173455;
    }
    .home-nav .home-nav-cta {
      color: #ffffff;
      background: linear-gradient(180deg, #0e7ef8, #0a69d0);
      box-shadow: 0 14px 28px rgba(14, 126, 248, 0.24);
    }
    .marketing-nav {
      justify-content: flex-end;
    }
    .site-language {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.74);
      border: 1px solid rgba(15, 42, 77, 0.08);
      color: #4e6888;
      font-size: 12px;
      font-weight: 600;
      box-shadow: 0 10px 20px rgba(15, 42, 77, 0.06);
    }
    .site-language select {
      min-width: 118px;
      border: 0;
      padding: 0;
      background: transparent;
      color: #173455;
      box-shadow: none;
    }
    .home-main {
      display: grid;
      gap: 26px;
    }
    .hero-panel,
    .home-section,
    .access-card {
      border: 1px solid rgba(120, 154, 191, 0.18);
      border-radius: 28px;
      background: rgba(255, 255, 255, 0.78);
      box-shadow: 0 20px 48px rgba(15, 42, 77, 0.11);
      backdrop-filter: blur(10px);
    }
    .hero-panel {
      display: grid;
      grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
      gap: 22px;
      padding: 34px;
    }
    .hero-copy {
      display: grid;
      align-content: start;
      gap: 16px;
    }
    .hero-kicker {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      height: 30px;
      padding: 0 12px;
      border-radius: 999px;
      background: rgba(14, 126, 248, 0.1);
      color: #0b66cb;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .hero-copy h1 {
      margin: 0;
      font-size: clamp(34px, 5vw, 58px);
      line-height: 1.02;
      letter-spacing: -0.04em;
      color: #143050;
      max-width: 9.5em;
    }
    .hero-lead {
      margin: 0;
      max-width: 640px;
      font-size: 15px;
      line-height: 1.9;
      color: #5a7392;
    }
    .hero-actions {
      display: flex;
      gap: 12px;
      flex-wrap: wrap;
      margin-top: 8px;
    }
    .hero-actions a,
    .access-actions a {
      text-decoration: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 48px;
      padding: 0 18px;
      border-radius: 14px;
      font-size: 14px;
      font-weight: 700;
      transition: transform .18s ease, box-shadow .18s ease;
    }
    .hero-actions a:hover,
    .access-actions a:hover {
      transform: translateY(-1px);
    }
    .hero-primary,
    .access-actions a:first-child {
      color: #ffffff;
      background: linear-gradient(180deg, #0e7ef8, #0a69d0);
      box-shadow: 0 16px 30px rgba(14, 126, 248, 0.24);
    }
    .hero-secondary,
    .access-actions a:not(:first-child) {
      color: #173455;
      background: rgba(255, 255, 255, 0.84);
      border: 1px solid rgba(15, 42, 77, 0.12);
      box-shadow: 0 12px 24px rgba(15, 42, 77, 0.08);
    }
    .hero-note {
      color: #6a819d;
      font-size: 13px;
      line-height: 1.7;
    }
    .hero-preview {
      display: grid;
      gap: 14px;
    }
    .preview-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
    }
    .preview-card {
      display: grid;
      gap: 10px;
      padding: 18px;
      border-radius: 22px;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 248, 255, 0.72));
      border: 1px solid rgba(120, 154, 191, 0.16);
      box-shadow: 0 16px 34px rgba(15, 42, 77, 0.08);
    }
    .preview-card-primary {
      background:
        radial-gradient(circle at top right, rgba(255, 214, 171, 0.44), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(240, 247, 255, 0.8));
    }
    .preview-card-head {
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
    }
    .preview-card h3,
    .workflow-step h3,
    .feature-card strong {
      margin: 0;
      color: #173455;
    }
    .preview-card p,
    .workflow-step p,
    .feature-card p,
    .access-card p {
      margin: 0;
      color: #5f7896;
      line-height: 1.7;
      font-size: 13px;
    }
    .preview-badge {
      display: inline-flex;
      align-items: center;
      width: fit-content;
      min-height: 28px;
      padding: 0 10px;
      border-radius: 999px;
      background: rgba(14, 126, 248, 0.12);
      color: #0b66cb;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.08em;
      text-transform: uppercase;
    }
    .preview-badge.soft { background: rgba(14, 126, 248, 0.1); color: #0b66cb; }
    .preview-badge.warm { background: rgba(255, 178, 89, 0.18); color: #b56600; }
    .preview-badge.success { background: rgba(27, 156, 102, 0.14); color: #137349; }
    .preview-badge.info { background: rgba(96, 121, 152, 0.14); color: #455b78; }
    .preview-meta {
      color: #7a90a7;
      font-size: 12px;
      font-weight: 600;
    }
    .preview-list {
      margin: 0;
      padding-left: 18px;
      color: #5f7896;
      font-size: 13px;
      line-height: 1.8;
    }
    .home-section {
      padding: 28px;
    }
    .section-heading {
      display: grid;
      gap: 8px;
      margin-bottom: 18px;
    }
    .section-heading span,
    .section-mini {
      color: #0b66cb;
      font-size: 12px;
      font-weight: 700;
      letter-spacing: 0.1em;
      text-transform: uppercase;
    }
    .section-heading h2,
    .access-card h2 {
      margin: 0;
      font-size: clamp(24px, 3.5vw, 36px);
      letter-spacing: -0.03em;
      color: #143050;
    }
    .feature-grid,
    .workflow-grid {
      display: grid;
      gap: 14px;
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .feature-card,
    .workflow-step {
      padding: 18px;
      border-radius: 20px;
      border: 1px solid rgba(120, 154, 191, 0.16);
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 248, 255, 0.72));
      box-shadow: 0 16px 34px rgba(15, 42, 77, 0.08);
    }
    .workflow-section {
      background:
        radial-gradient(circle at top right, rgba(255, 214, 171, 0.24), transparent 24%),
        rgba(255, 255, 255, 0.82);
    }
    .workflow-step span {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 38px;
      height: 38px;
      border-radius: 14px;
      margin-bottom: 12px;
      font-size: 13px;
      font-weight: 800;
      color: #173455;
      background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.88), transparent 46%),
        linear-gradient(135deg, #ffd8b1, #c8e6ff 58%, #fff4e9);
      box-shadow: 0 12px 24px rgba(15, 42, 77, 0.12);
    }
    .access-card {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 18px;
      padding: 26px 28px;
    }
    .access-actions {
      display: flex;
      gap: 10px;
      flex-wrap: wrap;
      justify-content: flex-end;
    }
    .marketing-footer {
      margin-top: 26px;
      padding: 26px 28px;
      border-radius: 28px;
      border: 1px solid rgba(120, 154, 191, 0.18);
      background: rgba(255, 255, 255, 0.78);
      box-shadow: 0 20px 48px rgba(15, 42, 77, 0.11);
    }
    .marketing-footer-grid {
      display: grid;
      grid-template-columns: 1.2fr .8fr .8fr .9fr;
      gap: 18px;
    }
    .footer-block {
      display: grid;
      align-content: start;
      gap: 10px;
    }
    .footer-block h3 {
      margin: 0;
      color: #173455;
      font-size: 14px;
    }
    .footer-block a,
    .footer-block p {
      margin: 0;
      color: #5f7896;
      font-size: 13px;
      line-height: 1.7;
      text-decoration: none;
    }
    .footer-block a:hover {
      color: #173455;
    }
    .footer-block p strong {
      display: block;
      color: #173455;
      font-size: 12px;
      margin-bottom: 2px;
    }
    .footer-brand {
      margin-bottom: 4px;
    }
    .marketing-footer-bottom {
      margin-top: 18px;
      padding-top: 18px;
      border-top: 1px solid rgba(120, 154, 191, 0.18);
      color: #7a90a7;
      font-size: 12px;
    }
    .legal-hero {
      padding: 28px 30px;
      border-radius: 28px;
      border: 1px solid rgba(120, 154, 191, 0.18);
      background:
        radial-gradient(circle at top right, rgba(255, 214, 171, 0.24), transparent 24%),
        rgba(255, 255, 255, 0.82);
      box-shadow: 0 20px 48px rgba(15, 42, 77, 0.11);
    }
    .legal-updated {
      margin-top: 10px;
      color: #7a90a7;
      font-size: 12px;
      font-weight: 600;
    }
    .legal-content,
    .contact-grid {
      display: grid;
      gap: 14px;
    }
    .legal-card {
      padding: 20px 22px;
      border-radius: 22px;
      border: 1px solid rgba(120, 154, 191, 0.16);
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 248, 255, 0.72));
      box-shadow: 0 16px 34px rgba(15, 42, 77, 0.08);
    }
    .legal-card h2 {
      margin: 0 0 8px;
      color: #173455;
      font-size: 18px;
    }
    .legal-card p {
      margin: 0;
      color: #5f7896;
      font-size: 14px;
      line-height: 1.8;
    }
    .contact-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .contact-value {
      margin-top: 12px;
      color: #173455;
      font-size: 14px;
      font-weight: 700;
      word-break: break-word;
    }

    @media (max-width: 1060px) {
      .app-shell { padding: 14px; }
      .topbar { flex-direction: column; align-items: flex-start; }
      .topbar-start {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
      }
      .topbar .actions {
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
        justify-content: flex-start;
      }
      .nav-group {
        flex-wrap: wrap;
      }
      .shell { grid-template-columns: 1fr; }
      .queue-list { max-height: 240px; }
      .queue-controls { grid-template-columns: 1fr; }
      .queue-actions { justify-content: flex-start; }
      .detail-grid { grid-template-columns: 1fr; }
      .qa-grid { grid-template-columns: 1fr; }
      .qa-form-grid { grid-template-columns: 1fr; }
      .config-grid { grid-template-columns: 1fr; }
      .shop-toggle-grid,
      .toggle-stack { grid-template-columns: 1fr; }
      .qa-toolbar {
        flex-direction: column;
        align-items: stretch;
      }
      .qa-toolbar .actions {
        justify-content: flex-start;
      }
      .qa-toolbar select {
        min-width: 100%;
      }
      .login-card-split {
        grid-template-columns: 1fr;
      }
      .login-aside {
        padding: 28px 24px 22px;
        border-right: 0;
        border-bottom: 1px solid rgba(120, 154, 191, 0.18);
      }
      .login-form-pane {
        padding: 22px;
      }
      .hero-panel,
      .access-card {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
      }
      .preview-grid,
      .feature-grid,
      .workflow-grid {
        grid-template-columns: 1fr 1fr;
      }
      .home-header {
        flex-direction: column;
        align-items: flex-start;
      }
      .home-nav {
        width: 100%;
      }
      .marketing-footer-grid,
      .contact-grid {
        grid-template-columns: 1fr 1fr;
      }
      .access-actions {
        justify-content: flex-start;
      }
    }

    @media (max-width: 720px) {
      .preview-grid,
      .feature-grid,
      .workflow-grid {
        grid-template-columns: 1fr;
      }
      .hero-panel,
      .home-section,
      .access-card,
      .marketing-footer,
      .legal-hero {
        padding: 22px 18px;
        border-radius: 22px;
      }
      .marketing-footer-grid,
      .contact-grid {
        grid-template-columns: 1fr;
      }
      .home-shell {
        padding: 18px 14px 36px;
      }
      .hero-copy h1 {
        max-width: 100%;
      }
      .hero-actions,
      .access-actions {
        width: 100%;
      }
      .hero-actions a,
      .access-actions a {
        width: 100%;
      }
      .site-language {
        width: 100%;
        justify-content: space-between;
      }
      .site-language select {
        min-width: 0;
        width: 100%;
      }
    }
