    /* AI Solutions Architect Chat Window (Liquid Glass Assistant) */
    .ai-chat-container {
      display: flex;
      flex-direction: column;
      flex: 1;
      min-height: 480px;
      background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.62) 0%,
        rgba(255, 255, 255, 0.38) 100%
      );
      backdrop-filter: blur(22px) saturate(185%);
      -webkit-backdrop-filter: blur(22px) saturate(185%);
      border: 1px solid rgba(255, 255, 255, 0.78);
      border-radius: 18px;
      overflow: hidden;
      box-shadow:
        0 12px 32px -10px rgba(18, 19, 22, 0.1),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.92);
    }

    .ai-chat-stream {
      flex: 1;
      padding: 1.35rem;
      overflow-y: auto;
      overscroll-behavior: contain;
      display: flex;
      flex-direction: column;
      gap: 1rem;
      scroll-behavior: smooth;
    }

    .chat-row {
      display: flex;
      align-items: flex-end;
      gap: 0.65rem;
      animation: stepFadeIn 240ms cubic-bezier(0.16, 1, 0.3, 1);
    }

    .chat-row.user {
      justify-content: flex-end;
    }

    .chat-avatar-ai {
      width: 32px;
      height: 32px;
      border-radius: 10px;
      background: var(--charcoal);
      border: 1px solid rgba(255, 90, 31, 0.45);
      color: #FF5A1F;
      font-family: var(--font-display);
      font-size: 0.8rem;
      font-weight: 800;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
      position: relative;
      box-shadow: 0 3px 8px rgba(18, 19, 22, 0.14);
    }

    .chat-avatar-ai::after {
      content: "";
      position: absolute;
      bottom: -2px;
      right: -2px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #16A34A;
      border: 1.5px solid #FFFFFF;
    }

    .chat-msg {
      max-width: 82%;
      padding: 0.9rem 1.1rem;
      border-radius: 15px;
      font-size: 0.88rem;
      line-height: 1.55;
      word-wrap: break-word;
    }

    .chat-msg p {
      margin: 0;
    }

    .chat-msg p + p {
      margin-top: 0.45rem;
    }

    .chat-msg-ai strong {
      color: var(--charcoal);
      font-weight: 700;
    }

    .chat-msg-user strong {
      color: #FFFFFF;
      font-weight: 700;
    }

    .chat-msg-ai {
      background: #FFFFFF;
      border: 1px solid var(--hairline);
      color: var(--charcoal);
      border-bottom-left-radius: 4px;
      box-shadow: 0 2px 8px rgba(18, 19, 22, 0.05);
    }

    .chat-msg-user {
      background: linear-gradient(135deg, #FF5A1F 0%, #E0531E 100%);
      color: #FFFFFF;
      border-bottom-right-radius: 4px;
      font-weight: 500;
      box-shadow: 0 6px 16px -6px rgba(255, 90, 31, 0.45);
    }

    .ai-quick-chips {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem;
      padding-left: 2.65rem;
    }

    .ai-quick-chip {
      background: #FFFFFF;
      border: 1px solid rgba(255, 90, 31, 0.35);
      color: var(--charcoal);
      padding: 0.48rem 0.9rem;
      border-radius: 10px;
      font-size: 0.79rem;
      font-weight: 600;
      cursor: pointer;
      display: inline-flex;
      align-items: center;
      gap: 0.38rem;
      box-shadow: 0 1px 3px rgba(18, 19, 22, 0.04);
      transition: all 150ms cubic-bezier(0.16, 1, 0.3, 1);
    }

    .ai-quick-chip:hover {
      background: var(--cadmium);
      border-color: var(--cadmium);
      color: #FFFFFF;
      transform: translateY(-1px);
    }

    .ai-quick-chip:active {
      transform: scale(0.96);
    }

    .ai-typing-bubble {
      align-self: flex-start;
      margin-left: 2.65rem;
      background: #FFFFFF;
      border: 1px solid var(--hairline);
      border-radius: 14px;
      border-bottom-left-radius: 4px;
      padding: 0.7rem 1rem;
      display: none;
      align-items: center;
      gap: 0.5rem;
      box-shadow: 0 2px 8px rgba(18, 19, 22, 0.05);
    }

    .ai-typing-bubble.visible {
      display: inline-flex;
    }

    .ai-escalation-card {
      align-self: stretch;
      background:
        linear-gradient(135deg, rgba(22, 163, 74, 0.08) 0%, #FFFFFF 100%);
      border: 1px solid rgba(22, 163, 74, 0.38);
      border-left: 3.5px solid #16A34A;
      border-radius: 13px;
      padding: 1.05rem 1.2rem;
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      box-shadow: 0 8px 24px -8px rgba(18, 19, 22, 0.1);
      animation: stepFadeIn 280ms cubic-bezier(0.16, 1, 0.3, 1);
    }

    .ai-chat-footer {
      padding: 0.85rem 1.15rem;
      background: #FFFFFF;
      border-top: 1px solid var(--hairline);
      display: flex;
      flex-direction: column;
      gap: 0.6rem;
    }

    /* Credit & Token Quota Limiter Bar */
    .ai-credit-bar-wrap {
      display: flex;
      flex-direction: column;
      gap: 0.3rem;
      padding: 0.35rem 0.55rem;
      background: rgba(18, 19, 22, 0.03);
      border-radius: 8px;
      border: 1px solid rgba(18, 19, 22, 0.06);
      transition: background-color 200ms ease, border-color 200ms ease;
    }

    .ai-credit-bar-wrap.warning {
      background: rgba(245, 158, 11, 0.08);
      border-color: rgba(245, 158, 11, 0.3);
    }

    .ai-credit-bar-wrap.locked {
      background: rgba(239, 68, 68, 0.08);
      border-color: rgba(239, 68, 68, 0.32);
    }

    .ai-credit-meta {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 0.5rem;
      font-size: 0.71rem;
      font-family: var(--font-body);
      color: var(--text-muted);
    }

    .ai-credit-label {
      display: inline-flex;
      align-items: center;
      gap: 0.32rem;
      font-weight: 600;
      color: var(--charcoal);
    }

    .ai-credit-bar-wrap.warning .ai-credit-label {
      color: #D97706;
    }

    .ai-credit-bar-wrap.locked .ai-credit-label {
      color: #DC2626;
    }

    .ai-credit-counter {
      font-family: var(--font-mono);
      font-size: 0.68rem;
      color: var(--text-muted);
      letter-spacing: -0.01em;
    }

    .ai-credit-progress-bg {
      width: 100%;
      height: 4px;
      border-radius: 99px;
      background: rgba(18, 19, 22, 0.08);
      overflow: hidden;
    }

    .ai-credit-progress-fill {
      height: 100%;
      width: 0%;
      background: linear-gradient(90deg, #10B981, #FF5A1F);
      border-radius: 99px;
      transition: width 350ms cubic-bezier(0.16, 1, 0.3, 1), background-color 300ms ease;
    }

    .ai-credit-bar-wrap.warning .ai-credit-progress-fill {
      background: #F59E0B;
    }

    .ai-credit-bar-wrap.locked .ai-credit-progress-fill {
      background: #EF4444;
    }

    .ai-chat-textarea:disabled {
      background: #F3F4F6;
      color: #9CA3AF;
      cursor: not-allowed;
      border-color: #E5E7EB;
    }

    .ai-send-btn:disabled {
      opacity: 0.45;
      cursor: not-allowed;
      filter: grayscale(0.5);
      pointer-events: none;
    }

    .ai-chat-input-row {
      display: flex;
      align-items: flex-end;
      gap: 0.6rem;
    }

    .ai-chat-textarea {
      flex: 1;
      background: var(--raw-bone);
      border: 1px solid var(--hairline);
      border-radius: 11px;
      padding: 0.7rem 0.95rem;
      color: var(--charcoal);
      font-family: var(--font-body);
      font-size: 0.88rem;
      line-height: 1.44;
      max-height: 100px;
      resize: none;
      transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
    }

    .ai-chat-textarea::placeholder {
      color: #8E929E;
    }

    .ai-chat-textarea:focus {
      outline: none;
      border-color: var(--cadmium);
      background: #FFFFFF;
      box-shadow: 0 0 0 3px rgba(255, 90, 31, 0.12);
    }

    .ai-send-btn {
      width: 42px;
      height: 42px;
      border-radius: 11px;
      border: none;
      background: linear-gradient(135deg, #FF5A1F, #E2541E);
      color: #FFFFFF;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      flex-shrink: 0;
      box-shadow: 0 6px 16px -4px rgba(255, 90, 31, 0.45);
      transition: transform 100ms ease-out, filter 140ms ease;
    }

    .ai-send-btn:hover {
      filter: brightness(1.06);
    }

    .ai-send-btn:active {
      transform: scale(0.94);
    }

    .ai-human-bar {
      display: flex;
      align-items: center;
      justify-content: flex-end;
      gap: 0.5rem;
      flex-wrap: wrap;
    }

    .ai-human-btn {
      background: rgba(22, 163, 74, 0.08);
      border: 1px solid rgba(22, 163, 74, 0.35);
      border-radius: 99px;
      color: #15803D;
      font-family: var(--font-body);
      font-size: 0.76rem;
      font-weight: 600;
      cursor: pointer;
      padding: 0.35rem 0.9rem;
      display: inline-flex;
      align-items: center;
      gap: 0.38rem;
      transition: all 140ms ease;
    }

    .ai-human-btn:hover {
      background: #16A34A;
      border-color: #16A34A;
      color: #FFFFFF;
    }

    /* Mobile Bottom-Sheet Adaptation (<640px) */
    @media (max-width: 640px) {
      .intake-backdrop {
        padding: 0;
        align-items: flex-end;
      }
      .intake-modal,
      .intake-modal.modal-wide {
        max-width: 100%;
        min-height: 82dvh;
        max-height: 94dvh;
        height: auto;
        border-radius: 22px 22px 0 0;
        transform: translate3d(0, 100%, 0);
      }
      .intake-backdrop.open .intake-modal {
        transform: translate3d(0, 0, 0);
      }
      .modal-drag-handle {
        display: block;
      }
      .intake-field-grid,
      .fork-grid {
        grid-template-columns: 1fr;
      }
      .fork-card {
        min-height: auto;
      }
      .wizard-node-label {
        display: none;
      }
      .ai-quick-chips {
        padding-left: 0;
      }
      .ai-typing-bubble {
        margin-left: 0;
      }
    }

    /* ==========================================================================
       OWNER SECURITY GATE MODAL (HIDDEN FOR REGULAR VISITORS)
       Unlocked via Ctrl+Shift+A / Cmd+Shift+A or ?owner=1
       ========================================================================== */
    .owner-gate-backdrop {
      position: fixed;
      inset: 0;
      z-index: 1100;
      background: rgba(18, 19, 22, 0.72);
      backdrop-filter: blur(8px);
      display: none;
      place-items: center;
      padding: 1.25rem;
    }

    .owner-gate-backdrop.open {
      display: grid;
    }

    .owner-gate-modal {
      width: min(410px, 100%);
      background: #FFFFFF;
      border: 1px solid var(--hairline);
      border-radius: 18px;
      padding: 1.65rem 1.5rem;
      box-shadow: 0 28px 68px rgba(18, 19, 22, 0.35);
      display: flex;
      flex-direction: column;
      gap: 0.9rem;
    }

    .owner-gate-badge {
      display: inline-flex;
      align-items: center;
      gap: 0.4rem;
      font-family: var(--font-mono);
      font-size: 0.68rem;
      font-weight: 700;
      color: var(--cadmium);
      background: rgba(255, 90, 31, 0.1);
      padding: 0.25rem 0.6rem;
      border-radius: 999px;
      width: fit-content;
    }

    /* ==========================================================================
       DARK MODE ADAPTATIONS FOR AI SOLUTIONS ARCHITECT CHAT & QUOTA MONITOR
       ========================================================================== */
    [data-theme="dark"] .ai-chat-container {
      background: linear-gradient(
        145deg,
        rgba(25, 30, 42, 0.85) 0%,
        rgba(16, 19, 28, 0.8) 100%
      );
      border-color: rgba(255, 255, 255, 0.12);
      box-shadow:
        0 12px 32px -10px rgba(0, 0, 0, 0.45),
        inset 0 1.5px 0 rgba(255, 255, 255, 0.14);
    }

    [data-theme="dark"] .chat-msg-ai {
      background: #1C212E;
      border-color: rgba(255, 255, 255, 0.1);
      color: #F5F4F0;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    }

    [data-theme="dark"] .chat-msg-ai strong {
      color: #FFFFFF;
    }

    [data-theme="dark"] .ai-quick-chip {
      background: #1E2432;
      border-color: rgba(255, 90, 31, 0.45);
      color: #F5F4F0;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    }

    [data-theme="dark"] .ai-quick-chip:hover {
      background: var(--cadmium);
      border-color: var(--cadmium);
      color: #FFFFFF;
    }

    [data-theme="dark"] .ai-typing-bubble {
      background: #1C212E;
      border-color: rgba(255, 255, 255, 0.1);
    }

    [data-theme="dark"] .ai-escalation-card {
      background: linear-gradient(135deg, rgba(22, 163, 74, 0.18) 0%, rgba(22, 28, 38, 0.95) 100%);
      border-color: rgba(22, 163, 74, 0.45);
    }

    [data-theme="dark"] .ai-chat-footer {
      background: #161A24;
      border-top-color: rgba(255, 255, 255, 0.08);
    }

    [data-theme="dark"] .ai-credit-bar-wrap {
      background: rgba(255, 255, 255, 0.05);
      border-color: rgba(255, 255, 255, 0.08);
    }

    [data-theme="dark"] .ai-credit-label {
      color: #F5F4F0;
    }

    [data-theme="dark"] .ai-credit-counter {
      color: #9EA3AE;
    }

    [data-theme="dark"] .ai-credit-progress-bg {
      background: rgba(255, 255, 255, 0.1);
    }

    [data-theme="dark"] .ai-chat-textarea {
      background: #1A1F2B;
      border-color: rgba(255, 255, 255, 0.14);
      color: #F5F4F0;
    }

    [data-theme="dark"] .ai-chat-textarea:focus {
      background: #202636;
      border-color: var(--cadmium);
    }

    [data-theme="dark"] .ai-chat-textarea:disabled {
      background: #13161F;
      color: #555963;
      border-color: rgba(255, 255, 255, 0.06);
    }

    [data-theme="dark"] .owner-gate-modal {
      background: #161A24;
      border-color: #262A33;
      color: #F5F4F0;
    }
