/* ==============================================================================
   TASKLET AI UI EXACT CLONE - NEETLY PLATFORM DESIGN SYSTEM
   ============================================================================== */

:root {
  --bg-app: #f9fafb;
  --bg-white: #ffffff;
  --bg-sidebar: #fafafa;
  --bg-hover: #f3f4f6;
  
  --border-subtle: #e5e7eb;
  --border-strong: #d1d5db;
  
  --primary-green: #15803d;
  --primary-green-light: #22c55e;
  --primary-green-bg: #f0fdf4;
  
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-dim: #9ca3af;

  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.03);
  --shadow-dropdown: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-primary);
  line-height: 1.5;
  height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.project-workspace { position:fixed; inset:0; z-index:9000; background:#f8faf9; display:flex; flex-direction:column; }
.project-workspace[hidden] { display:none; }.project-workspace-header { min-height:62px; display:flex; align-items:center; justify-content:space-between; padding:10px 18px; background:#fff; border-bottom:1px solid var(--border-subtle); }.project-workspace-header strong,.project-workspace-header small { display:block; }.project-workspace-header small { font-size:.75rem; color:var(--text-muted); margin-top:2px; }.project-workspace-header button { border:0; background:transparent; font-size:28px; color:#4b5563; cursor:pointer; }
.project-workspace-body { min-height:0; flex:1; display:grid; grid-template-columns:minmax(190px,18%) minmax(280px,32%) minmax(420px,1fr); }.project-navigator { min-width:0; overflow:auto; padding:14px 10px; background:#f3f6f4; border-right:1px solid var(--border-subtle); }.project-navigator-heading,.project-panel-heading { padding:4px 8px 11px; font:700 .74rem var(--font-sans); text-transform:uppercase; letter-spacing:.06em; color:#64748b; }.project-navigator-section { margin:0 0 18px; }.project-navigator-section h4 { margin:0 8px 7px; font-size:.74rem; color:#64748b; }.project-navigator-item { display:block; width:100%; text-align:left; border:0; background:transparent; padding:8px; border-radius:7px; color:#334155; cursor:pointer; font:500 .8rem var(--font-sans); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.project-navigator-item:hover,.project-navigator-item.active { background:#dcefe1; color:#166534; }.project-navigator-meta { display:block; margin-top:3px; color:#64748b; font-size:.68rem; }.project-chat-panel { min-height:0; display:flex; flex-direction:column; background:#fff; border-right:1px solid var(--border-subtle); }.project-history { flex:1; overflow:auto; padding:16px; }.project-message { margin-bottom:14px; max-width:94%; padding:10px 12px; border-radius:10px; background:#f3f4f6; font-size:.87rem; white-space:pre-wrap; }.project-message.user { margin-left:auto; background:#e7f4eb; }.project-message small { display:block; margin-top:5px; color:#6b7280; font-size:.7rem; }.project-event { margin:12px 0; padding:8px 10px; border-left:3px solid #15803d; background:#f0fdf4; font-size:.75rem; color:#166534; }.project-followup-form { padding:12px; border-top:1px solid var(--border-subtle); }.project-followup-form textarea { width:100%; min-height:76px; resize:vertical; border:1px solid #d1d5db; border-radius:9px; padding:9px; font:inherit; }.project-followup-form button,.project-artifact-tabs button { margin-top:8px; border:0; border-radius:7px; padding:8px 10px; background:#15803d; color:#fff; font:600 .78rem var(--font-sans); cursor:pointer; }
.project-artifact-panel { min-width:0; display:flex; flex-direction:column; }.project-artifact-tabs { display:flex; align-items:center; gap:6px; padding:8px 12px; border-bottom:1px solid var(--border-subtle); background:#fff; overflow:auto; }.project-artifact-tabs span { flex:1; }.project-artifact-tabs button { margin:0; background:#eef3ef; color:#166534; white-space:nowrap; }.project-artifact-tabs button.active { background:#15803d; color:#fff; }.project-artifact-pane { min-height:0; flex:1; overflow:auto; padding:16px; }.project-artifact-pane iframe { width:100%; height:100%; min-height:500px; border:1px solid #e5e7eb; border-radius:10px; background:#fff; }.project-file-row { display:flex; justify-content:space-between; gap:12px; padding:10px; border-bottom:1px solid #e5e7eb; }.project-file-row button { border:0; background:#e8f5eb; color:#166534; padding:5px 8px; border-radius:6px; cursor:pointer; }.project-mobile-tabs { display:none; }
.workspace-dashboard-section { border:1px solid #e5e7eb; border-radius:10px; padding:14px; margin:0 0 12px; background:#fff; }.workspace-dashboard-section h4 { margin:0 0 8px; }.workspace-dashboard-section label { display:block; margin:9px 0; font-size:.8rem; color:#374151; }.workspace-dashboard-section input,.workspace-dashboard-section textarea,.workspace-dashboard-section select { display:block; width:100%; box-sizing:border-box; margin-top:4px; padding:8px; border:1px solid #d1d5db; border-radius:7px; font:inherit; }.workspace-dashboard-section button { margin:5px 6px 0 0; }
@media (max-width: 1000px) { .project-workspace-body { grid-template-columns:minmax(220px,35%) 1fr; }.project-navigator { display:none; } }
@media (max-width: 760px) { .project-workspace-body { display:block; overflow:auto; }.project-chat-panel,.project-artifact-panel { min-height:calc(100vh - 112px); border-right:0; }.project-mobile-tabs { display:flex; gap:6px; overflow:auto; padding:8px 12px; border-bottom:1px solid var(--border-subtle); background:#fff; }.project-mobile-tabs button { border:0; background:#eef3ef; color:#166534; padding:7px 10px; border-radius:7px; white-space:nowrap; }.project-mobile-tabs button.active { color:#fff; background:#15803d; }.project-artifact-tabs { display:none; }.project-chat-panel[data-project-pane][hidden], .project-artifact-pane[data-project-pane][hidden] { display:none; }.project-artifact-panel { display:block; }.project-artifact-pane { min-height:calc(100vh - 160px); }.project-artifact-pane iframe { min-height:440px; } }

.artifact-card { margin-top: 16px; border: 1px solid #d9e8dc; border-radius: 14px; background: #fbfffc; overflow: hidden; box-shadow: var(--shadow-card); }
.artifact-card-head { display:flex; justify-content:space-between; gap:12px; padding:14px 16px; border-bottom:1px solid #e7f0e9; }
.artifact-card-head strong, .artifact-card-head small { display:block; }.artifact-card-head small { margin-top:3px; color:var(--text-muted); font-size:.78rem; }
.artifact-status { align-self:start; padding:3px 8px; border-radius:999px; color:#166534; background:#dcfce7; font-size:.72rem; font-weight:700; text-transform:capitalize; }
.artifact-files { padding:10px 16px; display:flex; flex-wrap:wrap; gap:8px; }.artifact-files button { max-width:100%; border:1px solid #dce8df; background:#fff; border-radius:8px; padding:6px 8px; color:#374151; cursor:pointer; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.artifact-files em { color:#6b7280; font-style:normal; font-size:.7rem; }
.artifact-actions { display:flex; gap:8px; padding:0 16px 14px; }.artifact-actions button { border:0; border-radius:8px; background:#15803d; color:#fff; cursor:pointer; font:600 .78rem var(--font-sans); padding:8px 10px; }.artifact-actions button+button { color:#166534; background:#e8f5eb; }
.artifact-actions .danger,.schedule-actions .danger { color:#b91c1c; background:#fef2f2; }
.message-content { line-height:1.62; overflow-wrap:anywhere; }.message-content h1,.message-content h2,.message-content h3,.message-content h4 { color:#172033; line-height:1.25; margin:1.05em 0 .45em; }.message-content h1 { font-size:1.45rem; }.message-content h2 { font-size:1.25rem; }.message-content h3 { font-size:1.1rem; }.message-content p { margin:.55em 0; }.message-content ul,.message-content ol { padding-left:1.35rem; margin:.55em 0; }.message-content li+li { margin-top:.25em; }.message-content blockquote { border-left:3px solid #86b996; margin:.8em 0; padding:.2em .85em; color:#52616b; background:#f6faf7; }.message-content pre { overflow:auto; padding:12px 14px; border-radius:9px; background:#16211b; color:#e8f5eb; }.message-content code { font-family:var(--font-mono,ui-monospace,monospace); background:#eef3ef; border-radius:4px; padding:.1em .32em; }.message-content pre code { padding:0; background:transparent; }.message-content table { display:block; max-width:100%; overflow:auto; border-collapse:collapse; margin:.8em 0; font-size:.88em; }.message-content th,.message-content td { border:1px solid #dbe5dd; padding:.5em .65em; text-align:left; vertical-align:top; }.message-content th { background:#f1f6f2; font-weight:700; }.message-content a { color:#13723a; text-decoration:underline; }
.schedules-modal-content { width:min(680px,calc(100vw - 28px)); max-height:min(78vh,760px); display:flex; flex-direction:column; }.schedules-modal-content .modal-header h3 { margin:0; }.schedules-modal-content .modal-header p { margin:3px 0 0; color:#64748b; font-size:.82rem; }.schedules-content { overflow:auto; padding:14px 2px; }.schedule-loading { color:#64748b; text-align:center; padding:26px; }.schedule-card { display:grid; grid-template-columns:1fr auto; gap:10px 14px; padding:14px; border:1px solid #e1e9e3; border-radius:12px; background:#fff; margin-bottom:10px; }.schedule-card strong,.schedule-card small { display:block; }.schedule-card strong { font-size:.92rem; color:#1f2937; }.schedule-card small { margin-top:4px; font-size:.76rem; color:#64748b; }.schedule-status { align-self:start; border-radius:999px; padding:3px 8px; font-size:.7rem; font-weight:700; background:#dcfce7; color:#166534; text-transform:capitalize; }.schedule-status.paused,.schedule-status.cancelled { background:#f1f5f9; color:#475569; }.schedule-actions { grid-column:1/-1; display:flex; gap:7px; }.schedule-actions button { border:0; border-radius:7px; padding:7px 9px; background:#e8f5eb; color:#166534; font:600 .76rem var(--font-sans); cursor:pointer; }.schedule-history { grid-column:1/-1; border-top:1px solid #e5e7eb; padding-top:9px; color:#475569; font-size:.78rem; }.schedule-history>div { padding:6px 0; border-bottom:1px solid #f1f5f9; }
.artifact-preview { border-top:1px solid #e7f0e9; padding:12px; background:#fff; }.artifact-preview img, .artifact-preview video, .artifact-preview iframe { display:block; width:100%; max-height:430px; border:0; object-fit:contain; }.artifact-preview iframe { min-height:300px; }.artifact-preview pre { max-height:430px; overflow:auto; white-space:pre-wrap; font:12px var(--font-mono); }
.artifact-table { overflow:auto; border:1px solid #e5e7eb; border-radius:8px; }.artifact-table>div { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(110px,1fr); border-bottom:1px solid #f0f1f2; }.artifact-table span { padding:6px 8px; border-right:1px solid #f0f1f2; font-size:.78rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.artifact-slide { margin:8px 0; padding:12px; border:1px solid #e5e7eb; border-radius:8px; }.artifact-slide p { margin-top:6px; white-space:pre-wrap; }
.artifact-dashboard { border-top:1px solid #e7f0e9; padding:14px; background:#fff; }.artifact-dashboard-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }.artifact-dashboard section { padding:12px; border:1px solid #e5e7eb; border-radius:10px; }.artifact-dashboard h4 { margin:0 0 8px; }.artifact-dashboard label { display:block; margin:8px 0; font-size:.76rem; color:#4b5563; }.artifact-dashboard input,.artifact-dashboard textarea { display:block; width:100%; margin-top:3px; padding:7px; border:1px solid #d1d5db; border-radius:6px; font:inherit; }.artifact-dashboard textarea { min-height:60px; }.artifact-dashboard button { margin:4px 4px 4px 0; padding:7px 9px; border:0; border-radius:6px; background:#15803d; color:white; font:600 .75rem var(--font-sans); cursor:pointer; }.artifact-dashboard p { font-size:.78rem; color:#4b5563; }.artifact-dashboard small { color:#6b7280; font-size:.72rem; }
@media (max-width: 760px) { .artifact-dashboard-grid { grid-template-columns:1fr; } }
@media (max-width: 640px) { .artifact-card-head { align-items:flex-start; }.artifact-actions { flex-wrap:wrap; }.artifact-preview iframe { min-height:240px; } }

/* Authentication is intentionally a small, task-focused gate rather than the
   application's landing page. It is shown only when an account action needs it. */
.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 36px 20px;
  background: #fafafa;
}

.auth-shell { width: min(100%, 560px); text-align: center; }
.auth-brand { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 38px; font-size: 26px; font-weight: 750; letter-spacing: -.04em; color: #111827; }
.auth-brand img { width: 30px; height: 30px; }
.auth-card { padding: 42px 40px; background: #fff; border: 1px solid #dedede; border-radius: 24px; box-shadow: 0 2px 5px rgba(0,0,0,.02); text-align: left; }
.auth-card h1 { margin: 0; text-align: center; color: #111827; font: 42px/1 var(--font-serif); letter-spacing: -.025em; }
.auth-subtitle { margin: 14px 0 30px; color: #657180; text-align: center; font-size: 15px; }
.auth-provider-button, .auth-submit { width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 11px; padding: 14px 18px; border: 1px solid #cfd5dc; border-radius: 12px; background: #fff; color: #111827; font: 600 16px var(--font-sans); cursor: pointer; transition: border-color .15s, background .15s; }
.auth-provider-button:hover { background: #f8faf9; border-color: #aeb8c2; }
.auth-envelope { font-size: 21px; line-height: 1; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: #697586; font-size: 14px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: #e2e6ea; }
.auth-card label { display: block; margin: 18px 0 7px; color: #344054; font-size: 13px; font-weight: 650; }
.auth-card input { width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #cfd5dc; border-radius: 10px; outline: none; color: #111827; font: 15px var(--font-sans); }
.auth-card input:focus { border-color: #15803d; box-shadow: 0 0 0 3px rgba(21,128,61,.12); }
.auth-submit { margin-top: 24px; border-color: #15803d; background: #15803d; color: white; }
.auth-submit:hover { background: #126d35; }
.auth-submit:disabled { opacity: .65; cursor: wait; }
.auth-back { margin: 0 0 22px; padding: 0; border: 0; background: transparent; color: #52606d; font: 600 14px var(--font-sans); cursor: pointer; }
.auth-switch { margin: 20px 0 0; color: #657180; text-align: center; font-size: 14px; }
.auth-switch button { border: 0; background: transparent; color: #13753a; font: 700 14px var(--font-sans); cursor: pointer; }
.auth-message { min-height: 20px; margin: 16px 0 0; color: #52606d; text-align: center; font-size: 13px; }
.auth-terms { margin: 22px 0 0; color: #7b8794; font-size: 12px; }

@media (max-width: 520px) {
  .auth-gate { padding: 24px 14px; align-items: flex-start; }
  .auth-brand { margin: 10px 0 24px; }
  .auth-card { padding: 30px 22px; border-radius: 18px; }
  .auth-card h1 { font-size: 36px; }
}

/* APP LAYOUT GRID */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ==============================================================================
   1. FAR-LEFT NARROW ICON RAIL
   ============================================================================== */
.icon-rail {
  width: 60px;
  background: var(--bg-white);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  z-index: 100;
  flex-shrink: 0;
}

.rail-top, .rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: 100%;
}

.rail-brand-icon {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-bottom: 8px;
}

.rail-item {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
  font-size: 1.1rem;
}

.rail-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.rail-item.active {
  background: var(--bg-white);
  border: 2px solid var(--primary-green-light);
  box-shadow: 0 2px 8px rgba(34, 197, 94, 0.15);
}

.handshake-icon {
  font-size: 1.2rem;
}

.plus-icon {
  font-size: 1.3rem;
  font-weight: 500;
}

.profile-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
}

/* ==============================================================================
   2. EXPANDED LEFT SIDEBAR PANEL
   ============================================================================== */
.sidebar-panel {
  width: 250px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

/* Workspace Selector */
.workspace-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid transparent;
}

.workspace-name-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.handshake-emoji {
  font-size: 1.1rem;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-subtle-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-subtle-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* New Thread Button */
.sidebar-action-wrap {
  padding: 0 16px 12px 16px;
}

.btn-new-thread {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-new-thread:hover {
  background: #e5e7eb;
}

/* Sidebar Menu */
.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 12px 12px 12px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s ease;
}

.menu-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.menu-item.text-muted {
  color: var(--text-muted);
}

.chevron-right {
  margin-left: auto;
  font-size: 1.1rem;
}

/* Sidebar Sections & Threads List */
.sidebar-scroll-area {
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 16px 12px;
}

.sidebar-scroll-area::-webkit-scrollbar {
  width: 4px;
}
.sidebar-scroll-area::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

.sidebar-section {
  margin-top: 16px;
}

.section-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  padding: 4px 12px;
  text-transform: capitalize;
}

.section-empty {
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 4px 12px;
}

.threads-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 4px;
}

.thread-item {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  transition: all 0.15s ease;
}

.thread-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.thread-item.active {
  background: var(--bg-white);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* ==============================================================================
   3. MAIN WORKSPACE CONTAINER & HEADER
   ============================================================================== */
.main-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--bg-white);
  height: 100vh;
  position: relative;
  overflow: hidden;
}

/* Top Header */
.top-header {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg-white);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot-green {
  width: 8px;
  height: 8px;
  background-color: var(--primary-green-light);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--primary-green-light);
}

.status-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.credits-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

.gift-icon {
  font-size: 0.95rem;
}

.credits-count {
  font-weight: 700;
  color: var(--primary-green);
  margin-left: 2px;
}

.header-icon-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--text-muted);
}

.header-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ==============================================================================
   4. CENTER WORKSPACE & HERO GREETING
   ============================================================================== */
.workspace-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 24px 40px 24px;
  overflow-y: auto;
  position: relative;
}

/* Hero Greeting Section */
.hero-greeting {
  text-align: center;
  max-width: 750px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.plan-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.upgrade-link {
  color: var(--primary-green);
  font-weight: 600;
  text-decoration: none;
}
.upgrade-link:hover {
  text-decoration: underline;
}

.greeting-heading {
  font-family: var(--font-serif);
  font-size: 2.8rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.greeting-heading .assistant-name {
  font-style: italic;
  color: var(--primary-green);
  font-weight: 400;
}

.sub-greeting {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.privacy-note {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ==============================================================================
   5. CENTERED FLOATING INPUT DOCK (CARD)
   ============================================================================== */
.input-dock-wrapper {
  width: 100%;
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.input-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-card:focus-within {
  border-color: var(--border-strong);
  box-shadow: 0 6px 25px -2px rgba(0, 0, 0, 0.08);
}

#chat-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  color: var(--text-primary);
  resize: none;
  line-height: 1.5;
}

#chat-input::placeholder {
  color: var(--text-dim);
}

.input-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-left, .footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-btn-icon {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
}

.dock-btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.reasoning-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
}

.reasoning-badge:hover {
  background: var(--bg-hover);
}

.mic-submit-btn {
  background: var(--primary-green);
  color: var(--bg-white);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.mic-submit-btn:hover {
  background: #166534;
  transform: scale(1.03);
}

/* ==============================================================================
   6. SUGGESTED PROMPT CARDS (Below Input Dock)
   ============================================================================== */
.suggested-prompts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.prompt-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s ease;
}

.prompt-card:hover {
  background: var(--bg-hover);
}

.prompt-card-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  flex-shrink: 0;
}

.gmail-icon { background: #fee2e2; color: #dc2626; }
.slack-icon { background: #fef3c7; color: #d97706; }
.notion-icon { background: #f3f4f6; color: #111827; }
.cal-icon { background: #e0f2fe; color: #0284c7; }
.shop-icon { background: #fef08a; color: #ca8a04; }
.compare-icon { background: #dcfce7; color: #15803d; }

.prompt-card-text {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ==============================================================================
   7. CHAT FEED & MESSAGE BUBBLES (ChatGPT / Claude Style Toolbar)
   ============================================================================== */
.chat-feed-container {
  width: 100%;
  max-width: 760px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 20px 0;
  margin-bottom: 20px;
}

.chat-row {
  display: flex;
  gap: 14px;
  width: 100%;
}

.user-row {
  flex-direction: row-reverse;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-subtle);
}

.user-avatar-badge {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.bubble {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  max-width: 85%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  font-size: 0.98rem;
  line-height: 1.6;
}

.user-bubble {
  background: var(--primary-green-bg);
  border-color: #bbf7d0;
  color: #14532d;
}

.bubble-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.bubble-author {
  font-weight: 700;
  color: var(--text-primary);
}

/* Toolbar Buttons Styling */
.chatgpt-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #f3f4f6;
}

.toolbar-icon-btn {
  background: transparent;
  border: none;
  color: #9ca3af;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.toolbar-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

@keyframes pulse {
  0% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 0.4; transform: scale(0.95); }
}

.open-live-tab-btn {
  background: var(--primary-green);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.open-live-tab-btn:hover {
  background: #166534;
}

/* ==============================================================================
   8. MODALS & IN-APP BROWSER TAKEOVER
   ============================================================================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 90vw;
  max-width: 520px;
  box-shadow: var(--shadow-dropdown);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
}

.input-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-secondary);
}

.input-group input {
  width: 100%;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  outline: none;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.primary-btn {
  background: var(--primary-green);
  color: white;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

.secondary-btn {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
}

/* In-App Browser Window Modal */
.inapp-browser-card {
  width: 92vw;
  max-width: 1100px;
  height: 85vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.inapp-browser-header {
  height: 44px;
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
}

.browser-controls {
  display: flex;
  gap: 6px;
}

.control-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }
.dot-green { background: #10b981; }

.browser-address-bar {
  flex: 1;
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 4px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary-green);
  overflow: hidden;
}

.inapp-browser-body {
  flex: 1;
  background: #ffffff;
}

.takeover-iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.inapp-browser-footer {
  height: 54px;
  background: var(--bg-white);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-handback-primary {
  background: var(--primary-green);
  color: white;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
}

/* Model Selector Badge & Modal Cards */
.model-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--bg-hover);
  padding: 5px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.15s ease;
}

.model-badge:hover {
  background: #e2e8f0;
  border-color: var(--border-strong);
}

.model-option-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.model-option-card:hover {
  border-color: #15803d;
  background: #f0fdf4;
}

.model-option-card.selected {
  border: 2px solid #15803d;
  background: #f0fdf4;
  box-shadow: 0 4px 12px rgba(21, 128, 61, 0.12);
}

.ability-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #374151;
}

.ability-tag.reasoning {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.ability-tag.vision {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.ability-tag.speed {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.review-entry { margin:12px 10px 18px; padding:12px; border:1px solid #dce9e0; border-radius:12px; background:#f5faf6; display:grid; gap:5px; font-size:.82rem; }
.review-entry span { color:#66776b; }
.review-entry button,.activity-actions button { width:max-content; border:0; background:#e2f1e7; color:#166534; border-radius:7px; padding:7px 10px; cursor:pointer; font:600 .78rem var(--font-sans); }
.activity-panel { position:fixed; z-index:8500; top:0; right:0; height:100dvh; width:min(440px,100vw); background:#fff; box-shadow:-12px 0 42px #0f172a25; padding:0 20px 24px; overflow:auto; }
.activity-panel[hidden],.activity-panel [hidden] { display:none; }
.activity-panel header { position:sticky; top:0; background:#fff; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid #e5e7eb; padding:17px 0; z-index:1; }
.activity-panel h2 { font-size:1.2rem; margin:0; }
.activity-panel header button { border:0; background:transparent; font-size:1.6rem; cursor:pointer; }
.activity-panel p { color:#475569; line-height:1.5; }
.artifact-card-simple { display:flex; align-items:center; gap:12px; padding:14px; border:1px solid #e2e8f0; border-radius:14px; background:#fff; margin:12px 0; max-width:690px; box-shadow:0 2px 8px #0f172a0a; }
.artifact-file-icon { flex:none; width:48px; height:48px; border-radius:10px; background:#e7f5ec; color:#08773d; display:grid; place-items:center; font-size:.68rem; font-weight:800; }
.artifact-card-thumbnail { flex:none; width:64px; height:48px; object-fit:contain; background:#f1f5f9; border-radius:6px; }
.artifact-card-main { min-width:0; flex:1; display:grid; gap:4px; }
.artifact-card-main strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.9rem; }
.artifact-card-main small { color:#64748b; font-size:.75rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.artifact-card-controls { display:flex; gap:5px; flex-wrap:wrap; }
.artifact-card-controls button { background:#f5f7f8; color:#146c3c; border:0; border-radius:8px; padding:8px 10px; cursor:pointer; font-weight:600; }
.artifact-card-controls button:hover { background:#e7f5ec; }
.artifact-viewer { position:fixed; z-index:8600; top:0; right:0; width:min(780px,100vw); height:100dvh; background:#f8fafc; box-shadow:-15px 0 45px #0f172a2e; display:flex; flex-direction:column; }
.artifact-viewer[hidden] { display:none; }
.artifact-viewer header { padding:16px 20px; background:#fff; border-bottom:1px solid #e2e8f0; display:flex; align-items:center; justify-content:space-between; }
.artifact-viewer header div { display:grid; gap:3px; min-width:0; }
.artifact-viewer header strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.artifact-viewer header small { color:#64748b; }
.artifact-viewer header button { border:0; background:transparent; font-size:1.8rem; cursor:pointer; }
.artifact-viewer-body { flex:1; overflow:auto; padding:22px; display:grid; align-content:start; justify-items:center; gap:18px; }
.artifact-viewer-body img { max-width:100%; height:auto; box-shadow:0 5px 18px #0f172a22; background:white; }
.artifact-viewer-body video { max-width:100%; }
.artifact-viewer-body audio { width:100%; }
.artifact-viewer-body pre { width:100%; white-space:pre-wrap; overflow-wrap:anywhere; background:#fff; padding:18px; border-radius:10px; }
.artifact-page-nav { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; }
.artifact-page-nav button { border:0; background:#e7f5ec; color:#08773d; border-radius:7px; padding:7px 11px; cursor:pointer; }
.artifact-page-nav button:disabled { opacity:.45; cursor:default; }
.artifact-viewer footer { padding:14px 20px; background:#fff; border-top:1px solid #e2e8f0; display:flex; gap:8px; }
.artifact-viewer footer button { border:0; border-radius:8px; background:#e7f5ec; color:#08773d; padding:9px 12px; cursor:pointer; font-weight:600; }
.mobile-sidebar-open { display:none; border:0; background:transparent; color:#14532d; font-size:1.4rem; cursor:pointer; }
@media(max-width:760px) {
  .icon-rail { width:48px; flex:none; }
  .sidebar-panel { display:none; position:fixed; z-index:8300; top:0; left:48px; bottom:0; width:min(280px,calc(100vw - 48px)); box-shadow:10px 0 30px #0f172a24; }
  .sidebar-panel.mobile-open { display:flex; }
  .main-workspace { min-width:0; width:calc(100vw - 48px); }
  .mobile-sidebar-open { display:block; }
  .top-header { padding:0 12px; gap:8px; }
  .workspace-body { min-width:0; padding:0 14px 24px; }
  .hero-greeting { max-width:100%; }
  .greeting-heading { font-size:2rem; }
  .sub-greeting { font-size:1.55rem; }
  .input-dock-wrapper,.chat-feed-container { max-width:100%; min-width:0; }
  .chat-row { min-width:0; }
  .input-card { padding:12px; }
  .footer-left,.footer-right { gap:4px; }
  .model-badge { max-width:110px; white-space:nowrap; padding:5px; }
  #selected-model-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .reasoning-badge { padding:5px 3px; }
  .reasoning-badge .lock-icon { display:none; }
}
@media(max-width:680px) { .artifact-card-simple { align-items:flex-start; flex-wrap:wrap; } .artifact-card-controls { width:100%; } .artifact-viewer-body { padding:12px; } }
.activity-actions { display:flex; flex-wrap:wrap; gap:7px; margin:12px 0; }
.review-finding,.task-list-item { padding:16px 0; border-bottom:1px solid #e5e7eb; font-size:.87rem; }
.review-finding strong,.task-list-item strong { display:block; line-height:1.35; }
.review-finding small,.task-list-item small { display:block; margin-top:5px; color:#64748b; }
.task-state { display:inline-block; margin-top:6px; padding:3px 8px; border-radius:99px; background:#e6f4eb; color:#166534; font-size:.7rem; text-transform:capitalize; }
.history-more { margin:8px 12px; padding:7px 10px; border:0; border-radius:7px; background:#eef5f0; color:#166534; cursor:pointer; font:600 .76rem var(--font-sans); }
.history-more[hidden] { display:none; }
