
  body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #020617;
    color: #e5e7eb;
  }
  .shell {
    max-width: 960px;
    margin: 0 auto;
    padding: 20px 16px 32px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
  }
  .logo-row {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .logo-dot {
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    box-shadow: 0 0 0 2px rgba(34,197,94,0.35);
  }
  .logo-text {
    font-weight: 600;
    letter-spacing: 0.02em;
  }
  .header-links a {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: none;
    margin-left: 14px;
  }
  .header-links a:hover {
    color: #e5e7eb;
  }

  /* Tabs under header */
  .tabs-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    border-bottom: 1px solid #111827;
    padding-bottom: 6px;
  }
  .tab-btn {
    border-radius: 999px;
    border: 1px solid #111827;
    padding: 5px 12px;
    font-size: 12px;
    cursor: pointer;
    background: #020617;
    color: #9ca3af;
  }
  .tab-btn-active {
    background: #111827;
    color: #e5e7eb;
    border-color: #1f2937;
  }

  .app-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.3fr) minmax(0, 1.5fr);
    gap: 16px;
    align-items: stretch;
    flex: 1;
    min-height: 0;
  }
  @media (max-width: 800px) {
    .app-layout {
      grid-template-columns: minmax(0, 1fr);
    }
  }
  .chat-card {
    background: #020617;
    border-radius: 14px;
    border: 1px solid #111827;
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .chat-header {
    padding: 10px 12px 8px;
    border-bottom: 1px solid #111827;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
  }
  .chat-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .chat-title {
    font-weight: 600;
    font-size: 14px;
  }
  .chat-subtitle {
    color: #9ca3af;
    font-size: 12px;
  }
  .chat-header-right {
    font-size: 12px;
    color: #9ca3af;
  }
  .badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: #111827;
    color: #e5e7eb;
    font-size: 11px;
    border: 1px solid #1f2937;
  }
  .chat-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 10px 12px 12px;
    font-size: 13px;
    background: radial-gradient(circle at top left, rgba(15,23,42,0.8), #020617 55%);
  }
  .chat-empty {
    color: #6b7280;
    font-size: 13px;
    padding: 8px 4px;
  }
  .chat-msg {
    margin-bottom: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    max-width: 90%;
    white-space: pre-wrap;
    line-height: 1.35;
  }
  .chat-msg-user {
    margin-left: auto;
    background: #0f172a;
    border: 1px solid #1f2937;
  }
  .chat-msg-assistant {
    margin-right: auto;
    background: #020617;
    border: 1px solid #111827;
  }
  .app-footer {
    padding: 10px 12px 12px;
    border-top: 1px solid #111827;
    font-size: 13px;
    background: #020617;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
  }
  .input-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .email-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }
  .email-row label {
    font-size: 12px;
    color: #9ca3af;
  }
  #appEmail {
    padding: 6px 8px;
    border-radius: 999px;
    border: 1px solid var(--border-strong);
    background: #ffffff;
    color: #111827;
    font-size: 13px;
    min-width: 220px;
  }
  #appEmail::placeholder {
    color: #6b7280;
  }
  .quick-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }
  .quick-actions-label {
    font-size: 12px;
    color: #9ca3af;
  }
  .quick-action-chip {
    border-radius: 999px;
    border: 1px solid #374151;
    background: #020617;
    color: #e5e7eb;
    font-size: 11px;
    padding: 4px 8px;
    cursor: pointer;
  }
  .textarea-row textarea {
    width: 100%;
    min-height: 80px;
    resize: vertical;
    border-radius: 10px;
    border: 1px solid #374151;
    background: #020617;
    color: #e5e7eb;
    padding: 8px 9px;
    font-size: 13px;
    box-sizing: border-box;
  }
  .textarea-row textarea::placeholder {
    color: #6b7280;
  }
  .footer-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
  }
  .btn-primary {
    border-radius: 999px;
    border: none;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #022c22;
  }
  .btn-secondary {
    border-radius: 999px;
    border: 1px solid #374151;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    background: #020617;
    color: #e5e7eb;
  }
  .status-label {
    font-size: 12px;
    color: #9ca3af;
  }
  .side-card {
    background: #020617;
    border-radius: 14px;
    border: 1px solid #111827;
    padding: 10px 12px 12px;
    font-size: 12px;
  }
  .side-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
  }
  .side-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
  }
  .side-label {
    color: #9ca3af;
  }
  .side-value {
    color: #e5e7eb;
  }
  .side-note {
    margin-top: 8px;
    color: #6b7280;
    font-size: 11px;
  }

  /* Account Settings / Tokens cards */
  .simple-card {
    background: #020617;
    border-radius: 14px;
    border: 1px solid #111827;
    padding: 14px 14px 12px;
    font-size: 13px;
  }
  .simple-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
  }
  .simple-subtitle {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 10px;
  }
  .simple-row {
    margin-bottom: 10px;
    font-size: 13px;
  }
  .simple-label {
    color: #9ca3af;
    font-size: 12px;
    margin-bottom: 2px;
    display: block;
  }
  .simple-input {
    width: 100%;
    padding: 7px 9px;
    border-radius: 999px;
    border: 1px solid #374151;
    background: #020617;
    color: #e5e7eb;
    font-size: 13px;
    box-sizing: border-box;
  }
  .simple-input[readonly] {
    opacity: 0.8;
    cursor: default;
  }
  .simple-status {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 6px;
    min-height: 16px;
  }
  #appPrompt {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: var(--border-strong) !important;
  }
