:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #101622;
  --bg-card: rgba(20, 27, 41, 0.75);
  --bg-card-hover: rgba(28, 38, 58, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(99, 102, 241, 0.5);

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent-primary: #6366f1;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-subtle: 0 4px 20px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
}

/* ==============================================================================
   CUSTOM HIGH-VISIBILITY SCROLLBARS (Modern Accent Slide Bars)
   ============================================================================== */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 6px;
}

::-webkit-scrollbar-thumb {
  background: #6366f1;
  border-radius: 6px;
  border: 2px solid rgba(15, 23, 42, 0.7);
  transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: #818cf8;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: #6366f1 rgba(15, 23, 42, 0.7);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Layout */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar with Smooth Slide Collapse */
.sidebar {
  width: 270px;
  background-color: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}

.sidebar.collapsed {
  width: 76px;
  padding: 24px 10px;
}

.sidebar.collapsed .brand-text,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .nav-pill,
.sidebar.collapsed .status-info,
.sidebar.collapsed .badge-capsule {
  display: none !important;
}

.sidebar.collapsed .brand {
  justify-content: center;
  padding-left: 0;
}

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

.sidebar.collapsed .sidebar-status-card {
  justify-content: center;
  padding: 12px 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding-left: 8px;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: var(--shadow-glow);
}

.brand-text h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.badge-capsule {
  font-size: 0.72rem;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.12);
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
}

.nav-item.active {
  background: rgba(99, 102, 241, 0.14);
  color: #fff;
  border-color: rgba(99, 102, 241, 0.35);
  font-weight: 600;
}

.nav-icon {
  font-size: 1.15rem;
}

.nav-label {
  flex: 1;
}

.nav-pill {
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-muted);
}

.nav-pill.highlight {
  background: rgba(16, 185, 129, 0.18);
  color: var(--accent-emerald);
}

.sidebar-status-card {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
}

.status-info h4 {
  font-size: 0.8rem;
  font-weight: 600;
}

.status-info p {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(circle at 85% 15%, rgba(99, 102, 241, 0.08) 0%, transparent 40%),
              radial-gradient(circle at 10% 85%, rgba(6, 182, 212, 0.05) 0%, transparent 40%);
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(16, 22, 34, 0.7);
  backdrop-filter: blur(12px);
  gap: 16px;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.top-bar-title h1 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.top-bar-title p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.top-bar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Slide Bars (Interactive Range Sliders) */
.slider-group {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(255, 255, 255, 0.04);
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.slider-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.slider-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.slider-badge {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--accent-cyan);
  background: rgba(6, 182, 212, 0.1);
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  min-width: 42px;
  text-align: center;
}

input[type="range"].app-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.14);
  outline: none;
  cursor: pointer;
  transition: background 0.2s;
}

input[type="range"].app-slider:hover {
  background: rgba(99, 102, 241, 0.4);
}

input[type="range"].app-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 2px solid #fff;
  box-shadow: 0 0 6px rgba(99, 102, 241, 0.6);
  cursor: pointer;
  transition: transform 0.15s ease;
}

input[type="range"].app-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Buttons & Badges */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

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

.badge-tag {
  font-size: 0.74rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.badge-tag.highlight {
  background: rgba(99, 102, 241, 0.18);
  color: #a5b4fc;
}

.badge-tag.danger {
  background: rgba(244, 63, 94, 0.18);
  color: var(--accent-rose);
}

.badge-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-status.pass {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
}

/* Tabs */
.tab-pane {
  display: none;
  flex: 1;
  min-height: 0;
  padding: 16px 20px;
  overflow: hidden;
  box-sizing: border-box;
}

.tab-pane.active {
  display: flex;
  flex-direction: column;
}

#tab-evals.active {
  overflow-y: auto;
  display: block;
  padding-bottom: 50px;
}

/* Panels */
.panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-subtle);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.panel-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.panel-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.panel-subtitle {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Tab 1: Knowledge Brain Grid */
.kb-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.chat-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chat-bubble {
  max-width: 88%;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 0.88rem;
  line-height: 1.6;
}

.chat-bubble.assistant {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  align-self: flex-start;
  border-top-left-radius: 4px;
}

.chat-bubble.user {
  background: var(--accent-gradient);
  color: #fff;
  align-self: flex-end;
  border-top-right-radius: 4px;
}

.chat-input-wrapper {
  flex-shrink: 0;
  padding: 12px 18px;
  border-top: 1px solid var(--border-color);
  background: rgba(16, 22, 34, 0.6);
}

.quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.quick-chip {
  font-size: 0.74rem;
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-chip:hover {
  background: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
}

.quick-chip.warning:hover {
  background: rgba(244, 63, 94, 0.2);
  color: #fecdd3;
}

.chat-form {
  display: flex;
  gap: 10px;
}

.chat-form input {
  flex: 1;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  color: #fff;
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
}

.chat-form input:focus {
  border-color: var(--accent-primary);
}

.side-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.evidence-list {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.evidence-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  transition: all 0.2s ease;
}

.evidence-card:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.evidence-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: #a5b4fc;
  margin-bottom: 4px;
}

.evidence-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.evidence-snippet {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin-bottom: 8px;
}

.evidence-img-box {
  background: rgba(6, 182, 212, 0.08);
  border-left: 3px solid var(--accent-cyan);
  padding: 8px 10px;
  font-size: 0.75rem;
  border-radius: 4px;
  color: #67e8f9;
}

.escalation-box {
  margin: 16px;
  padding: 16px;
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.3);
  border-radius: var(--radius-md);
}

.escalation-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.escalation-box textarea {
  width: 100%;
  height: 60px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 8px;
  font-size: 0.8rem;
  font-family: inherit;
  margin: 10px 0;
}

/* Tab 2: Inbox Layout */
.inbox-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 20px;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.email-list-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.email-items-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.email-item {
  padding: 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.email-item:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(99, 102, 241, 0.3);
}

.email-item.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--accent-primary);
}

.email-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.email-sender {
  font-size: 0.88rem;
  font-weight: 700;
}

.email-subject {
  font-size: 0.82rem;
  color: var(--text-primary);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.email-preview {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.streak-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.16);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.email-detail-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.email-viewer-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.email-original-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.draft-box {
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
}

.draft-box textarea {
  width: 100%;
  min-height: 90px;
  height: 110px;
  max-height: 220px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 8px;
  resize: vertical;
}

.draft-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

/* Tab 3: Scope Layout */
.scope-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.transcript-selector-panel {
  flex-shrink: 0;
  height: auto;
  padding: 14px 18px;
}

.trans-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.trans-choice {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.trans-choice:hover {
  background: rgba(255, 255, 255, 0.03);
}

.trans-choice.active {
  background: rgba(99, 102, 241, 0.14);
  border-color: var(--accent-primary);
}

.trans-choice h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.trans-choice p {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.trans-action-bar {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.scope-workspace-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  flex: 1;
  min-height: 0;
  height: 100%;
  overflow: hidden;
}

.scope-workspace-grid .panel {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.req-cards-container,
.estimates-container {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.req-card {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
}

.req-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.req-id {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--accent-cyan);
}

.badge-feasibility {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
}

.badge-feasibility.config {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
}

.badge-feasibility.custom {
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
}

.badge-feasibility.limitation {
  background: rgba(245, 158, 11, 0.2);
  color: var(--accent-amber);
}

.diff-alert-box {
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 14px;
}

/* Tab 4: Evals & Tables */
.evals-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kpi-card.highlight {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.15) 100%);
  border-color: rgba(99, 102, 241, 0.4);
}

.kpi-value {
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.text-success {
  color: var(--accent-emerald);
}

.full-width {
  grid-column: 1 / -1;
  margin-top: 10px;
}

.evals-table-wrapper {
  padding: 16px;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  text-align: left;
}

.data-table th, .data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

/* ==============================================================================
   MULTIMODAL SCREENSHOT STAGING & IMAGE PREVIEWS
   ============================================================================== */
.staged-screenshot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(99, 102, 241, 0.08);
  border: 1px dashed rgba(99, 102, 241, 0.4);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  margin-bottom: 8px;
  animation: fadeIn 0.2s ease-out;
}

.screenshot-thumb-box {
  display: flex;
  align-items: center;
  gap: 12px;
}

.screenshot-thumb-box img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: transform 0.2s;
}

.screenshot-thumb-box img:hover {
  transform: scale(1.05);
}

.screenshot-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  display: block;
}

.shot-status-badge {
  font-size: 0.68rem;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}

.btn-remove-shot {
  background: rgba(244, 63, 94, 0.2);
  color: var(--accent-rose);
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-weight: bold;
  font-size: 14px;
  transition: all 0.15s ease;
}

.btn-remove-shot:hover {
  background: var(--accent-rose);
  color: #fff;
}

.chat-bubble img.attached-user-shot {
  max-width: 240px;
  max-height: 150px;
  border-radius: var(--radius-md);
  margin-top: 8px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  cursor: pointer;
  display: block;
  transition: transform 0.2s;
}

.chat-bubble img.attached-user-shot:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-glow);
}

.quick-chip.multimodal {
  border-color: rgba(6, 182, 212, 0.4);
  background: rgba(6, 182, 212, 0.1);
  color: #67e8f9;
}

.btn-icon {
  padding: 8px 12px;
  font-size: 1rem;
}

/* Image Zoom Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.image-modal.open {
  display: flex;
}

.image-modal-content {
  position: relative;
  max-width: 85vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-modal-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-color);
}

.image-modal-close {
  position: absolute;
  top: -36px;
  right: 0;
  font-size: 30px;
  color: #fff;
  cursor: pointer;
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 3px 8px;
  font-size: 0.72rem;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
}

.copy-btn:hover {
  background: rgba(99, 102, 241, 0.25);
  color: #fff;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==============================================================================
   TOP RIGHT PROFILE AVATAR (Standard Web UX - Facebook/LinkedIn/Gmail style)
   ============================================================================== */
.user-profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  margin-left: 6px;
}

.user-profile-header:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.4);
}

.avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.user-meta-header {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.user-name-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.user-role-badge {
  font-size: 0.68rem;
  color: var(--accent-cyan);
}

/* ==============================================================================
   THOUGHT PROCESS COLLAPSIBLE (Knowledge Brain AI Reasoning Engine)
   ============================================================================== */
.thinking-box {
  background: rgba(99, 102, 241, 0.06);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.thinking-header {
  padding: 8px 12px;
  background: rgba(99, 102, 241, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: #a5b4fc;
}

.thinking-header:hover {
  background: rgba(99, 102, 241, 0.2);
}

.thinking-steps {
  padding: 10px 14px;
  font-size: 0.78rem;
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid rgba(99, 102, 241, 0.15);
  line-height: 1.45;
}

.thinking-step-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.thinking-step-num {
  font-family: var(--font-mono);
  color: var(--accent-cyan);
  font-weight: 700;
  flex-shrink: 0;
}

/* ==============================================================================
   GMAIL WORKSPACE (Authentic Webmail UX - Left Folders, Middle List, Right Viewer)
   ============================================================================== */
.gmail-workspace {
  display: grid;
  grid-template-columns: 210px 1fr 1.35fr;
  gap: 16px;
  height: calc(100vh - 120px);
}

.gmail-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 16px 10px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
}

.gmail-compose-btn {
  background: linear-gradient(135deg, #c2e7ff 0%, #a5d8ff 100%);
  color: #001d35;
  font-weight: 700;
  font-size: 0.88rem;
  border: none;
  border-radius: 18px;
  padding: 12px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
  transition: transform 0.15s, box-shadow 0.15s;
}

.gmail-compose-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(194, 231, 255, 0.3);
}

.gmail-nav-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gmail-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}

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

.gmail-nav-item.active {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
  font-weight: 700;
  border-left: 3px solid var(--accent-primary);
}

.gmail-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.gmail-nav-badge {
  font-size: 0.72rem;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

.gmail-nav-item.active .gmail-nav-badge {
  background: var(--accent-primary);
  color: #fff;
}

.gmail-labels-section {
  border-top: 1px solid var(--border-color);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gmail-labels-header {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.threshold-pill {
  cursor: pointer;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.68rem;
  transition: background 0.15s;
}

.threshold-pill:hover {
  background: rgba(99, 102, 241, 0.4);
}

.gmail-label-items {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.gmail-label-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.76rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}

.gmail-label-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.gmail-label-item.active {
  background: rgba(99, 102, 241, 0.2);
  color: #fff;
  font-weight: 600;
}

.label-streak-badge {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}

.label-streak-badge.autonomous {
  background: rgba(16, 185, 129, 0.25);
  color: var(--accent-emerald);
  font-weight: 700;
}

.gmail-list-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gmail-toolbar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  background: rgba(20, 27, 41, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.gmail-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.gmail-search-box {
  flex: 1;
  max-width: 240px;
}

.gmail-search-box input {
  width: 100%;
  background: rgba(10, 13, 20, 0.7);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  color: #fff;
  font-size: 0.78rem;
  outline: none;
}

.gmail-emails-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.gmail-row {
  display: grid;
  grid-template-columns: 24px 24px 130px 1fr 65px;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s;
}

.gmail-row:hover {
  background: rgba(255, 255, 255, 0.03);
}

.gmail-row.selected {
  background: rgba(99, 102, 241, 0.14);
}

.gmail-row.unread {
  font-weight: 700;
  color: #fff;
}

.star-icon {
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s;
}

.star-icon.starred {
  color: #f59e0b;
}

.gmail-row-sender {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gmail-row-body-preview {
  font-size: 0.78rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gmail-row-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

.gmail-detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gmail-compose-window {
  position: fixed;
  bottom: 15px;
  right: 25px;
  width: 520px;
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gmail-compose-header {
  padding: 10px 14px;
  background: #1f2937;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}

.gmail-compose-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* SITEMAP INSPECTION CARD */
.inspection-card {
  background: rgba(16, 22, 34, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.speed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.speed-badge-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}

.speed-badge-item .num {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent-cyan);
}

.speed-badge-item .lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* ==============================================================================
   MODAL: SITEMAPS MANAGEMENT
   ============================================================================== */
.app-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 8, 16, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.app-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.app-modal-dialog {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 660px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(99, 102, 241, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-modal-backdrop.open .app-modal-dialog {
  transform: translateY(0) scale(1);
}

.app-modal-header {
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-color);
  background: rgba(20, 27, 41, 0.6);
}

.app-modal-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: color 0.15s;
}

.app-modal-close:hover {
  color: #fff;
}

.app-modal-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-height: 65vh;
  overflow-y: auto;
}

.sitemap-list-section h4,
.sitemap-add-section h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sitemap-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 170px;
  overflow-y: auto;
  padding-right: 4px;
}

.sitemap-card-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: border-color 0.2s;
}

.sitemap-card-item:hover {
  border-color: rgba(99, 102, 241, 0.4);
}

.sitemap-card-url {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #e2e8f0;
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sitemap-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.sitemap-del-btn {
  background: transparent;
  border: 1px solid rgba(244, 63, 94, 0.3);
  color: var(--accent-rose);
  padding: 3px 7px;
  border-radius: 4px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
}

.sitemap-del-btn:hover {
  background: rgba(244, 63, 94, 0.15);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.form-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.form-textarea {
  width: 100%;
  min-height: 80px;
  background: rgba(10, 13, 20, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  color: #fff;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  resize: vertical;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-textarea:focus,
.form-input:focus,
.form-select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

.form-input,
.form-select {
  width: 100%;
  background: rgba(10, 13, 20, 0.75);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  color: #fff;
  font-size: 0.82rem;
  outline: none;
  transition: border-color 0.2s;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  margin-top: 4px;
}

.app-modal-footer {
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  background: rgba(16, 22, 34, 0.8);
}

.crawl-progress-banner {
  font-size: 0.78rem;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Top Right User Profile Avatar (Standard Web UX - Facebook/LinkedIn/Yahoo/Gmail) */
.user-profile-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}
.user-profile-header:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: var(--accent-primary);
}
.avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #06b6d4);
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}
.user-meta-header {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}
.user-name-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}
.user-role-badge {
  font-size: 0.68rem;
  color: var(--accent-cyan);
}

/* Sitemap Inspection & Speed Estimation Card */
.inspection-card {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
.speed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}
.speed-badge-item {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 8px;
  text-align: center;
}
.speed-badge-item .num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent-cyan);
  font-family: var(--font-mono);
}
.speed-badge-item .lbl {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
}

/* AI Reasoning Engine Collapsible Thinking Box */
.thinking-box {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(99, 102, 241, 0.35);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
  overflow: hidden;
  font-size: 0.8rem;
}
.thinking-header {
  background: rgba(99, 102, 241, 0.12);
  padding: 8px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #a5b4fc;
  user-select: none;
}
.thinking-header:hover {
  background: rgba(99, 102, 241, 0.2);
}
.thinking-content {
  padding: 12px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  line-height: 1.5;
  white-space: pre-wrap;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  max-height: 220px;
  overflow-y: auto;
}

/* Authentic Gmail UI/UX Engine Layout */
.gmail-workspace {
  display: grid;
  grid-template-columns: 240px 1fr 1.3fr;
  height: calc(100vh - 120px);
  gap: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Gmail Left Sidebar */
.gmail-sidebar {
  background: rgba(10, 13, 20, 0.95);
  border-right: 1px solid var(--border-color);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}
.gmail-compose-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  color: #1e293b;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 12px 22px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: all 0.2s ease;
  width: fit-content;
}
.gmail-compose-btn:hover {
  background: #f1f5f9;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.2);
}
.gmail-nav-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gmail-nav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-radius: 0 20px 20px 0;
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
  user-select: none;
}
.gmail-nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.gmail-nav-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: #818cf8;
  font-weight: 700;
}
.gmail-nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.gmail-nav-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}
.gmail-nav-item.active .gmail-nav-badge {
  background: var(--accent-primary);
  color: #fff;
}

/* Gmail Labels Section */
.gmail-labels-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
}
.gmail-labels-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  padding: 0 8px;
}
.threshold-pill {
  font-size: 0.7rem;
  background: rgba(99, 102, 241, 0.2);
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(99, 102, 241, 0.4);
}
.threshold-pill:hover {
  background: rgba(99, 102, 241, 0.35);
}
.gmail-label-items {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.gmail-label-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-secondary);
  transition: all 0.15s ease;
}
.gmail-label-item:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}
.gmail-label-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  font-weight: 600;
}
.label-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

/* Gmail Center List Panel */
.gmail-list-panel {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-color);
  background: rgba(15, 23, 42, 0.5);
  min-width: 0;
}
.gmail-toolbar {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(10, 13, 20, 0.6);
  gap: 10px;
}
.gmail-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gmail-search-box {
  flex: 1;
  max-width: 220px;
}
.gmail-search-box input {
  width: 100%;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 0.78rem;
  color: #fff;
  outline: none;
}
.gmail-emails-scroll {
  flex: 1;
  overflow-y: auto;
}
.gmail-row {
  display: grid;
  grid-template-columns: 28px 24px 130px 1fr 60px;
  align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 0.82rem;
  gap: 8px;
}
.gmail-row:hover {
  background: rgba(255, 255, 255, 0.04);
}
.gmail-row.active {
  background: rgba(99, 102, 241, 0.12);
  border-left: 3px solid var(--accent-primary);
}
.gmail-star {
  cursor: pointer;
  font-size: 0.95rem;
  color: var(--text-muted);
  user-select: none;
  transition: transform 0.1s;
}
.gmail-star.starred {
  color: #f59e0b;
}
.gmail-sender-col {
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gmail-snippet-col {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gmail-snippet-col strong {
  color: var(--text-primary);
  font-weight: 600;
}
.gmail-date-col {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: right;
  white-space: nowrap;
}

/* Gmail Detail / Review Panel */
.gmail-detail-panel {
  display: flex;
  flex-direction: column;
  background: rgba(10, 13, 20, 0.4);
  overflow-y: auto;
  padding: 16px;
}
.streak-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.35);
}
.streak-badge.autonomous {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.4);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.25);
}

/* Floating Gmail Compose Window */
.gmail-compose-window {
  position: fixed;
  bottom: 0;
  right: 40px;
  width: 480px;
  background: #0f172a;
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 12px 12px 0 0;
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.6);
  z-index: 1000;
  overflow: hidden;
}
.gmail-compose-header {
  background: #1e293b;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  border-bottom: 1px solid var(--border-color);
}
.gmail-compose-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
