/* ========================================
   Astronomer-inspired Dark Theme
   ======================================== */
:root {
  /* Backgrounds */
  --bg-body: #07080f;
  --bg-primary: #0d0f1a;
  --bg-surface: #131525;
  --bg-card: #181a2e;
  --bg-hover: #1e2140;
  --bg-elevated: #222545;

  /* Text */
  --text-primary: #f0f1f7;
  --text-secondary: #a0a4be;
  --text-muted: #6b6f8a;

  /* Borders */
  --border: #252845;
  --border-light: #1e2140;

  /* Accent — Purple / Violet */
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-light: rgba(124, 58, 237, 0.15);
  --accent-glow: rgba(124, 58, 237, 0.35);

  /* Gradient CTA */
  --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  --gradient-hover: linear-gradient(135deg, #6d28d9 0%, #4338ca 100%);

  /* Status colours */
  --danger: #ef4444;
  --danger-hover: #dc2626;
  --danger-light: rgba(239, 68, 68, 0.12);
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.12);
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.12);
  --gray: #6b7280;
  --gray-light: rgba(107, 114, 128, 0.12);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px var(--accent-glow);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 14px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* ========================================
   Sidebar
   ======================================== */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: 240px;
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.25s ease, width 0.25s ease;
}

.sidebar.collapsed {
  transform: translateX(-240px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
}

.sidebar-logo img {
  display: block;
  border-radius: 4px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-glow);
  flex-shrink: 0;
}

.sidebar-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #e0e2f0 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar-nav {
  list-style: none;
  padding: 0.75rem 0.75rem;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav-item {
  margin-bottom: 2px;
}

.sidebar-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: all var(--transition);
  cursor: pointer;
}

.sidebar-nav-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-nav-link.active {
  background: var(--accent-light);
  color: var(--accent);
}

.sidebar-nav-link.active svg {
  color: var(--accent);
}

.sidebar-nav-link svg {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: color var(--transition);
}

.sidebar-nav-link:hover svg {
  color: var(--text-primary);
}

/* Admin nav item special styling */
.sidebar-nav-admin {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.sidebar-nav-admin .sidebar-nav-link {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.1);
}

.sidebar-nav-admin .sidebar-nav-link:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}

.sidebar-nav-admin .sidebar-nav-link.active {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.sidebar-nav-admin .sidebar-nav-link svg {
  color: #ef4444;
}

.sidebar-footer {
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--border);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.5rem;
}

.sidebar-user-info {
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.sidebar-user-info .user-name {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-info .user-email {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* ========================================
   Layout
   ======================================== */
.app-shell.active {
  display: flex !important;
}

.main-content {
  flex: 1;
  margin-left: 240px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left 0.25s ease;
}

.sidebar.collapsed + .main-content {
  margin-left: 0;
}

/* ========================================
   Top Bar
   ======================================== */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.5rem;
  background: rgba(13, 15, 26, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  flex-wrap: wrap;
}

.top-bar-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.top-bar-left .page-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.sidebar-toggle {
  color: var(--text-secondary);
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ========================================
   Page Sections
   ======================================== */
.page-section {
  flex: 1;
}

#pageHome {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================================
   Daily Page
   ======================================== */
.daily-page {
  padding: 1.25rem 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.daily-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1rem;
}

.daily-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-sm);
}

.daily-card-full {
  margin-top: 1rem;
}

.daily-card-alert {
  border-color: var(--danger);
  border-width: 2px;
  margin-bottom: 1rem;
}

.daily-card-alert .daily-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.daily-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.35rem;
}

.daily-card-header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.daily-meeting-count {
  font-size: 2.2rem;
  line-height: 1.1;
  font-weight: 800;
  color: var(--accent);
  margin: 0.2rem 0 0.35rem;
}

.daily-muted {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.daily-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.daily-status {
  min-height: 1.2rem;
  margin-top: 0.6rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.daily-status-info {
  color: var(--accent);
}

.daily-status-success {
  color: var(--success);
}

.daily-status-error {
  color: var(--danger);
}

.daily-agenda-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.daily-agenda-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  background: var(--bg-card);
}

.daily-agenda-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.4rem;
}

.daily-agenda-title {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.daily-agenda-time {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}

.daily-agenda-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.daily-prep {
  border-top: 1px dashed var(--border);
  padding-top: 0.45rem;
}

.daily-prep-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  margin-bottom: 0.3rem;
}

.daily-prep-list {
  margin: 0;
  padding-left: 1rem;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.daily-prep-list li {
  margin: 0.2rem 0;
}

.daily-prep-empty {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.daily-prep-note {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.daily-prep-details-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  overflow: hidden;
}

.daily-prep-summary {
  cursor: pointer;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
  list-style: none;
}

.daily-prep-summary::-webkit-details-marker {
  display: none;
}

.daily-prep-summary::after {
  content: 'Show details';
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.1rem;
}

.daily-prep-details-block[open] .daily-prep-summary::after {
  content: 'Hide details';
}

.daily-prep-summary-label {
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: 700;
}

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

.daily-prep-details-content {
  padding: 0 0.65rem 0.65rem;
  border-top: 1px solid var(--border-light);
}

/* ========================================
   Notes Page (inline, not modal)
   ======================================== */
.notes-page {
  padding: 1.5rem 2rem;
  max-width: 960px;
  margin: 0 auto;
}

.notes-page-with-sidebar {
  display: flex;
  gap: 1.25rem;
  max-width: 1200px;
  padding: 1rem 1.5rem;
}

.notes-page-with-sidebar .notes-main {
  flex: 1;
  min-width: 0;
}

/* ── Notes Sidebar ──────────────────────── */
.notes-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding-right: 1rem;
  overflow-y: auto;
  max-height: calc(100vh - 120px);
  position: sticky;
  top: 0;
}

.notes-sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.5rem 0.5rem 0.75rem;
}

.notes-sidebar-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

.notes-sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.4rem 0.6rem 0.25rem;
}

.notes-folder-list,
.notes-tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notes-folder-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.84rem;
  color: var(--text-secondary);
  transition: background 0.15s, color 0.15s;
}

.notes-folder-item:hover {
  background: rgba(139, 92, 246, 0.08);
  color: var(--text-primary);
}

.notes-folder-item.active {
  background: rgba(139, 92, 246, 0.14);
  color: var(--accent);
  font-weight: 600;
}

.notes-folder-item span:first-of-type {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-count {
  font-size: 0.72rem;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.notes-folder-item.active .folder-count {
  background: rgba(139, 92, 246, 0.2);
  color: var(--accent);
}

.notes-folder-empty {
  padding: 0.4rem 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-style: italic;
}

/* ── Note Tags ──────────────────────────── */
.note-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  padding: 0.15rem 0 0.3rem;
}

.note-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent);
  letter-spacing: 0.01em;
}

/* ── Tag Input Row ──────────────────────── */
.notes-tag-input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0;
  color: var(--text-muted);
}

.notes-tag-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 0.82rem;
  padding: 0.3rem 0;
  outline: none;
  transition: border-color 0.2s;
}

.notes-tag-input-row input:focus {
  border-bottom-color: var(--accent);
}

.notes-tag-input-row input::placeholder {
  color: var(--text-muted);
  font-size: 0.78rem;
}

@media (max-width: 768px) {
  .notes-page-with-sidebar {
    flex-direction: column;
  }
  .notes-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 0.75rem;
    max-height: 200px;
    position: static;
  }
}

.notes-page-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.notes-search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  flex: 1;
  min-width: 200px;
  max-width: 420px;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.notes-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.notes-search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.notes-search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-primary);
  width: 100%;
}

.notes-search-box input::placeholder {
  color: var(--text-muted);
}

mark.search-highlight {
  background: rgba(124, 58, 237, 0.35);
  color: var(--text-primary);
  border-radius: 2px;
  padding: 0 2px;
}

.notes-page-timeline {
  max-height: none;
}

/* ── AI Panel ──────────────────────────── */
.ai-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.ai-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.ai-panel-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.ai-panel-title svg {
  color: var(--accent);
}

.ai-panel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ai-panel-actions select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.8rem;
  padding: 0.3rem 0.5rem;
  max-width: 200px;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  border: none;
}
.btn-accent:hover {
  background: var(--accent-hover);
  color: #fff;
}

.ai-ask-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.ai-ask-row input {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.45rem 0.65rem;
  font-size: 0.85rem;
  font-family: inherit;
}
.ai-ask-row input:focus {
  border-color: var(--accent);
  outline: none;
}
.ai-ask-row input::placeholder {
  color: var(--text-muted);
}

.ai-result {
  margin-top: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.ai-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0.75rem;
  background: rgba(124, 58, 237, 0.08);
  border-bottom: 1px solid var(--border);
}

.ai-result-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ai-result-close {
  font-size: 1.1rem;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0 0.25rem;
}
.ai-result-close:hover {
  color: var(--text-primary);
}

.ai-result-body {
  padding: 0.75rem;
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-height: 400px;
  overflow-y: auto;
  white-space: pre-wrap;
}

.ai-result-body p { margin: 0 0 0.5em; }
.ai-result-body ul, .ai-result-body ol { margin: 0 0 0.5em; padding-left: 1.5em; }
.ai-result-body li { margin-bottom: 0.25em; }
.ai-result-body strong { color: var(--text-primary); }
.ai-result-body h1, .ai-result-body h2, .ai-result-body h3,
.ai-result-body h4, .ai-result-body h5, .ai-result-body h6 {
  color: var(--text-primary);
  margin: 0.75em 0 0.35em;
  font-size: 0.9rem;
}
.ai-result-body code {
  background: rgba(124, 58, 237, 0.12);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.82em;
}

.ai-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-style: italic;
}

.ai-loading .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinning {
  animation: spin 0.7s linear infinite;
}

.settings-badge {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--accent);
  color: #fff;
  padding: 0.15em 0.5em;
  border-radius: var(--radius-sm);
}

/* ── Bulk Import Modal ─────────────────── */
.bulk-import-body {
  padding: 1.25rem;
}

.bulk-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2.5rem 1rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.bulk-upload-zone:hover,
.bulk-upload-zone.drag-over {
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.06);
}
.bulk-upload-zone svg { color: var(--text-muted); }
.bulk-upload-zone p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }
.bulk-upload-hint { font-size: 0.78rem !important; color: var(--text-muted) !important; }

.bulk-preview-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.bulk-dup-info {
  color: #f59e0b;
  font-size: 0.82rem;
}

.bulk-preview-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
}

.bulk-preview-item {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.bulk-preview-item:last-child {
  border-bottom: none;
}

.bulk-preview-item:hover {
  background: var(--hover-bg);
}

.bulk-preview-checkbox {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  cursor: pointer;
}

.bulk-preview-checkbox input[type="checkbox"] {
  margin-top: 0.25rem;
  cursor: pointer;
}

.bulk-preview-text {
  flex: 1;
  font-size: 0.9rem;
  line-height: 1.5;
}

.bulk-preview-structured {
  flex: 1;
}

.bulk-preview-structured > div {
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.bulk-preview-structured > div:last-child {
  margin-bottom: 0;
}

.bulk-preview-structured strong {
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bulk-preview-meta {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

.bulk-preview-table-wrap {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.bulk-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.bulk-preview-table th {
  background: var(--bg-secondary);
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.bulk-preview-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}
.bulk-preview-table tr:hover td {
  background: rgba(139, 92, 246, 0.04);
}
.bulk-preview-table tr.bulk-row-dup td {
  opacity: 0.5;
}
.bulk-check-col { width: 36px; text-align: center !important; }
.bulk-check-col input { cursor: pointer; }

.bulk-dup-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(245, 158, 11, 0.18);
  color: #f59e0b;
  padding: 0.15em 0.45em;
  border-radius: var(--radius-sm);
  margin-left: 0.35rem;
}

.bulk-new-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: rgba(16, 185, 129, 0.18);
  color: #10b981;
  padding: 0.15em 0.45em;
  border-radius: var(--radius-sm);
  margin-left: 0.35rem;
}

/* ========================================
   Responsive: collapse sidebar on small screens
   ======================================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-240px);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* ========================================
   Header (legacy compat)
   ======================================== */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* ========================================
   Search & Filter
   ======================================== */
.search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-box svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-primary);
  width: 180px;
}

.search-box input::placeholder {
  color: var(--text-muted);
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.filter-group select,
#status {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b6f8a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 2rem;
}

.filter-group select:focus,
#status:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--gradient-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: var(--danger-hover);
}

.btn-warning {
  background: #f59e0b;
  color: #fff;
}

.btn-warning:hover {
  background: #d97706;
}

.btn-success {
  background: #10b981;
  color: #fff;
}

.btn-success:hover {
  background: #059669;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-icon.add-note:hover {
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent);
}

.btn-icon.delete:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* ========================================
   Stats Bar
   ======================================== */
.stats-bar {
  display: flex;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  min-width: 110px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.stat-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-in-progress .stat-value { color: var(--accent); }
.stat-in-progress { border-color: rgba(124, 58, 237, 0.25); }
.stat-completed .stat-value { color: var(--success); }
.stat-completed { border-color: rgba(16, 185, 129, 0.2); }
.stat-on-hold .stat-value { color: var(--warning); }
.stat-on-hold { border-color: rgba(245, 158, 11, 0.2); }
.stat-failed .stat-value { color: var(--danger); }
.stat-failed { border-color: rgba(239, 68, 68, 0.2); }

/* ========================================
   Table
   ======================================== */
.table-container {
  padding: 0 1.5rem 2rem;
}

.table-toolbar {
  display: flex;
  justify-content: flex-end;
  padding-bottom: 0.75rem;
}

.poc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.poc-table th {
  background: var(--bg-secondary);
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.poc-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.poc-table th.sortable:hover {
  color: var(--accent);
}

.sort-icon::after {
  content: '\2195';
  margin-left: 4px;
  opacity: 0.35;
}

.poc-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}

.poc-table tbody tr:hover td {
  background: rgba(139, 92, 246, 0.04);
}

.poc-name {
  font-weight: 600;
  color: var(--text-primary);
}

.cell-text {
  color: var(--text-secondary);
  line-height: 1.5;
  white-space: pre-line;
  max-width: 280px;
}

.cell-date {
  color: var(--text-secondary);
  font-size: 0.85rem;
  white-space: nowrap;
}

.actions-col {
  width: 90px;
  text-align: center;
}

/* ── RAG (Red / Amber / Green) health indicator ── */
.rag-col {
  width: 48px;
  text-align: center;
}

.rag-cell {
  text-align: center;
  vertical-align: middle;
}

.rag-dot {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  vertical-align: middle;
  transition: box-shadow 0.2s;
}

.rag-dot.rag-green {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.rag-dot.rag-yellow {
  background: #eab308;
  box-shadow: 0 0 6px rgba(234, 179, 8, 0.5);
}

.rag-dot.rag-red {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.5);
}

.rag-dot.rag-none {
  background: var(--border);
  opacity: 0.35;
}

/* Clickable RAG button */
.rag-dot-btn {
  all: unset;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 4px;
  border-radius: 50%;
  transition: transform 0.15s, box-shadow 0.15s;
}

.rag-dot-btn:hover {
  transform: scale(1.3);
}

.rag-dot-btn:hover .rag-dot.rag-none {
  opacity: 0.7;
  background: var(--accent);
}

/* Loading spinner on RAG dot */
.rag-dot-btn.rag-loading .rag-dot {
  background: transparent !important;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  box-shadow: none;
  animation: ragSpin 0.7s linear infinite;
}

@keyframes ragSpin {
  to { transform: rotate(360deg); }
}

/* RAG select in modal */
.rag-select {
  padding-left: 0.5rem;
}

.rag-select option[value="green"]  { color: #22c55e; }
.rag-select option[value="yellow"] { color: #eab308; }
.rag-select option[value="red"]    { color: #ef4444; }

.row-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

/* ========================================
   Status Badge
   ======================================== */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.status-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-badge.not-started {
  background: var(--gray-light);
  color: #9ca3af;
}
.status-badge.not-started .dot { background: #9ca3af; }

.status-badge.in-progress {
  background: var(--accent-light);
  color: #a78bfa;
}
.status-badge.in-progress .dot { background: #a78bfa; }

.status-badge.completed {
  background: var(--success-light);
  color: #34d399;
}
.status-badge.completed .dot { background: #34d399; }

.status-badge.on-hold {
  background: var(--warning-light);
  color: #fbbf24;
}
.status-badge.on-hold .dot { background: #fbbf24; }

.status-badge.failed {
  background: var(--danger-light);
  color: #f87171;
}
.status-badge.failed .dot { background: #f87171; }

/* ========================================
   Empty State
   ======================================== */
.empty-state {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
}

.empty-state.visible {
  display: flex;
}

.empty-state svg {
  margin-bottom: 1rem;
  opacity: 0.25;
  color: var(--accent);
}

.empty-state h3 {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.empty-state p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.empty-state strong {
  color: var(--accent);
}

.empty-state-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.empty-state-content button {
  margin-top: 0.5rem;
}

.ai-search-response {
  background: var(--bg);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-height: 500px;
  overflow-y: auto;
}

/* ========================================
   Modal
   ======================================== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  overflow-y: auto;
}

/* Stacked modals - notes and criteria should appear above POC details */
#notesOverlay {
  z-index: 1100;
}

#criteriaOverlay {
  z-index: 1100;
}

#pptxCriteriaImportOverlay {
  z-index: 1200;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg), 0 0 60px rgba(124, 58, 237, 0.08);
  animation: slideUp 0.25s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-small {
  max-width: 420px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}

.modal-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-header-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-left: auto;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 1.4rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.modal-close:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* View/Edit Modal */
.modal-view-edit {
  max-width: 900px;
}

.modal-view-edit.modal-wide {
  max-width: 1200px;
}

.view-modal-body {
  padding: 1.5rem;
}

.view-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
}

.view-edit-grid-3col {
  grid-template-columns: repeat(3, 1fr);
}

.view-edit-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.view-edit-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.view-edit-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.view-edit-field-full {
  grid-column: 1 / -1;
}

.view-edit-field label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.view-edit-value {
  font-size: 0.95rem;
  color: var(--text-primary);
  padding: 0.5rem 0;
  min-height: 1.5rem;
}

.view-edit-input {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 0.92rem;
  transition: all var(--transition);
}

.view-edit-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
}

.view-edit-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
}

.view-edit-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text-primary);
}

.view-edit-note {
  flex-direction: column;
  gap: 0.5rem;
}

.view-edit-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.view-edit-note-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.5;
}

.view-edit-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  padding: 1rem;
}

.view-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}

.view-linked-opp {
  padding: 0.4rem 0.75rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 1024px) {
  .view-edit-grid-3col {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .view-edit-grid,
  .view-edit-grid-3col {
    grid-template-columns: 1fr;
  }

  .modal-view-edit,
  .modal-view-edit.modal-wide {
    max-width: 100%;
  }
}

/* ========================================
   Form
   ======================================== */
#pocForm {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.required {
  color: var(--danger);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--text-primary);
  background: var(--bg-surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
}

.checkbox-label span {
  font-size: 0.9rem;
  color: var(--text);
}

.checkbox-label:hover span {
  color: var(--text-primary);
}

/* ========================================
   File Upload Zone
   ======================================== */
.file-upload-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 0.35rem;
  background: var(--bg-primary);
}

.file-upload-zone:hover,
.file-upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
}

.file-upload-zone.drag-over {
  transform: scale(1.01);
  box-shadow: var(--shadow-glow);
}

.file-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.upload-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-secondary);
  pointer-events: none;
}

.upload-prompt svg {
  color: var(--text-muted);
  margin-bottom: 0.15rem;
}

.upload-prompt span {
  font-size: 0.85rem;
}

.upload-prompt strong {
  color: var(--accent);
}

.upload-hint {
  font-size: 0.75rem !important;
  color: var(--text-muted) !important;
}

/* Attached Files List */
.attached-files {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.attached-files:empty {
  display: none;
}

.attached-file {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.65rem;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  animation: fadeIn 0.2s ease;
}

.attached-file .file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  flex-shrink: 0;
}

.attached-file .file-icon.file-text { background: var(--accent-light); color: #a78bfa; }
.attached-file .file-icon.file-pdf { background: var(--danger-light); color: #f87171; }
.attached-file .file-icon.file-doc { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.attached-file .file-icon.file-spreadsheet { background: var(--success-light); color: #34d399; }
.attached-file .file-icon.file-image { background: var(--warning-light); color: #fbbf24; }
.attached-file .file-icon.file-other { background: var(--gray-light); color: #9ca3af; }

.attached-file .file-info {
  flex: 1;
  min-width: 0;
}

.attached-file .file-name {
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.attached-file .file-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.attached-file .file-actions {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-shrink: 0;
}

.attached-file .file-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
}

.attached-file .file-action-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.attached-file .file-action-btn.remove:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* Table attachment indicator */
.cell-criteria {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  max-width: 280px;
}

.cell-criteria .cell-text {
  max-width: none;
}

.attachment-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.attachment-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.15rem 0.5rem;
  background: var(--accent-light);
  color: #a78bfa;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: inherit;
}

.attachment-chip:hover {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.attachment-chip svg {
  flex-shrink: 0;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-row .form-group {
  flex: 1;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.modal-actions-spread {
  justify-content: space-between;
  align-items: center;
}

.modal-actions-right {
  display: flex;
  gap: 0.75rem;
}

.delete-message {
  padding: 1.25rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.delete-message strong {
  color: var(--text-primary);
}

.delete-message + .modal-actions {
  padding: 0 1.5rem 1.5rem;
}

/* ========================================
   Toast
   ======================================== */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s ease;
  pointer-events: auto;
  position: relative;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.toast-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.toast-title {
  font-weight: 600;
  font-size: 0.92rem;
}

.toast-message {
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.4;
  opacity: 0.9;
}

.toast-close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border: none;
  background: transparent;
  color: currentColor;
  opacity: 0.5;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.toast-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}

.toast.success {
  border-color: rgba(16, 185, 129, 0.5);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, var(--bg-card) 100%);
  color: #10b981;
}

.toast.success .toast-title {
  color: #059669;
}

.toast.success .toast-message {
  color: var(--text-primary);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.6);
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, var(--bg-card) 100%);
  color: #ef4444;
  border-width: 2px;
}

.toast.error .toast-title {
  color: #dc2626;
}

.toast.error .toast-message {
  color: var(--text-primary);
}

.toast.warning {
  border-color: rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, var(--bg-card) 100%);
  color: #f59e0b;
}

.toast.warning .toast-title {
  color: #d97706;
}

.toast.warning .toast-message {
  color: var(--text-primary);
}

/* ========================================
   Login Screen
   ======================================== */
.login-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-body);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-screen.active {
  display: flex;
}

.login-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  width: 100%;
  max-width: 420px;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
}

.login-logo img {
  display: block;
  border-radius: 6px;
  background: var(--gradient-primary);
  color: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-glow);
  margin-bottom: 0.25rem;
}

.login-title {
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(135deg, #e0e2f0 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

/* ── Auth Tabs ─────────────────────────── */
.auth-tabs {
  display: flex;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-surface);
}

.auth-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.auth-tab:hover {
  color: var(--text-secondary);
  background: var(--bg-hover);
}

.auth-tab.active {
  background: var(--accent-light);
  color: #a78bfa;
}

/* ── Login Panels ──────────────────────── */
.login-panel {
  display: none;
  width: 100%;
}

.login-panel.active {
  display: block;
  animation: fadeIn 0.2s ease;
}

#localLoginForm {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

#localLoginForm .form-group label {
  color: var(--text-secondary);
}

#localLoginForm .form-group input {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.75rem;
  font-size: 0.92rem;
}

#localLoginForm .form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.btn-login {
  width: 100%;
  justify-content: center;
  padding: 0.7rem;
  margin-top: 0.25rem;
  font-size: 0.95rem;
}

.login-error {
  display: none;
  padding: 0.6rem 0.75rem;
  background: var(--danger-light);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: var(--radius-sm);
  color: #f87171;
  font-size: 0.85rem;
  font-weight: 500;
}

.login-error.visible {
  display: block;
}

/* ── Okta not configured fallback ──────── */
.okta-not-configured {
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.okta-not-configured p {
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.okta-not-configured .hint {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.okta-not-configured code {
  background: var(--bg-surface);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.85rem;
  color: #a78bfa;
}

/* Okta Sign-In Widget dark theme overrides */
#okta-signin-widget {
  width: 100%;
}

#okta-signin-widget .okta-sign-in-header {
  display: none;
}

#okta-signin-widget .auth-org-logo {
  display: none;
}

#okta-signin-widget .o-form-head {
  display: none;
}

#okta-sign-in {
  margin: 0 !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--bg-card) !important;
  box-shadow: var(--shadow-lg) !important;
  font-family: 'Inter', -apple-system, sans-serif !important;
  color: var(--text-primary) !important;
}

#okta-sign-in .auth-content {
  padding: 1.5rem !important;
}

#okta-sign-in .o-form .input-fix input,
#okta-sign-in .o-form .input-fix textarea {
  background: var(--bg-surface) !important;
  border: 1px solid var(--border) !important;
  color: var(--text-primary) !important;
  border-radius: var(--radius-sm) !important;
  font-family: inherit !important;
}

#okta-sign-in .o-form .input-fix input:focus,
#okta-sign-in .o-form .input-fix textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px var(--accent-light) !important;
}

#okta-sign-in .o-form-label-inline label,
#okta-sign-in .o-form label {
  color: var(--text-secondary) !important;
}

#okta-sign-in .button-primary {
  background: var(--gradient-primary) !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 2px 8px var(--accent-glow) !important;
  font-weight: 500 !important;
}

#okta-sign-in .button-primary:hover {
  background: var(--gradient-hover) !important;
  box-shadow: 0 6px 20px var(--accent-glow) !important;
}

#okta-sign-in a.link {
  color: var(--accent) !important;
}

#okta-sign-in .infobox-error {
  background: var(--danger-light) !important;
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #f87171 !important;
}

#okta-sign-in .okta-form-title {
  color: var(--text-primary) !important;
}

/* ========================================
   App Shell
   ======================================== */
.app-shell {
  display: none;
}

/* .app-shell.active is set above in Layout section as display: flex */

/* ========================================
   User Profile (header)
   ======================================== */
.header-divider {
  width: 1px;
  height: 28px;
  background: var(--border);
  margin: 0 0.25rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.user-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient-primary);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--bg-primary);
}

.user-info {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

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

.user-email {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.btn-icon.settings:hover {
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent);
}

.btn-icon.logout:hover {
  background: var(--danger-light);
  color: var(--danger);
}

/* ── Small button variant ──────────────── */
.btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.82rem;
}

/* ── Role badge (header + table) ───────── */
.user-name-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.role-badge {
  display: none;
  padding: 0.1rem 0.45rem;
  border-radius: 100px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-badge.visible,
.user-list-table .role-badge {
  display: inline-block;
}

.role-badge.role-admin {
  background: var(--accent-light);
  color: #a78bfa;
}

.role-badge.role-manager {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
}

.role-badge.role-user {
  background: var(--gray-light);
  color: #9ca3af;
}

/* ── User Management Modal ─────────────── */
.modal-wide {
  max-width: 720px;
}

.user-mgmt-body {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.user-mgmt-body h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.add-user-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.add-user-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.add-user-grid .form-group-btn {
  display: flex;
  align-items: flex-end;
}

.add-user-grid .form-group-btn .btn {
  width: 100%;
  justify-content: center;
}

.user-list-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.user-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.user-list-table th {
  background: var(--bg-secondary);
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.user-list-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}

.user-list-table tr:hover td {
  background: rgba(139, 92, 246, 0.04);
}

.cell-username {
  font-weight: 600;
  color: var(--text-primary);
}

.user-actions-cell {
  display: flex;
  gap: 0.25rem;
}

.user-list-table .btn-icon.reset-pw:hover {
  background: var(--warning-light);
  color: var(--warning);
}

/* ========================================
   Scrollbar
   ======================================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 100px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* ========================================
   Import Modal
   ======================================== */
.import-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.import-instructions {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.92rem;
  line-height: 1.6;
}

.import-instructions .import-hint {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.import-instructions .import-hint strong {
  color: var(--text-secondary);
}

.import-drop-zone {
  margin-bottom: 1rem;
}

.import-template-row {
  display: flex;
  justify-content: center;
  padding-top: 0.25rem;
}

.import-step.hidden {
  display: none;
}

/* Preview header */
.import-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.import-file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.import-file-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.import-row-count {
  color: var(--text-muted);
  font-size: 0.82rem;
  padding: 0.2rem 0.6rem;
  background: rgba(139, 92, 246, 0.12);
  border-radius: 20px;
  color: var(--accent);
  font-weight: 500;
}

/* Preview table */
.import-preview-wrapper {
  max-height: 340px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.import-preview-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.import-preview-table th {
  background: var(--bg-secondary);
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.import-preview-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.import-preview-table tr:hover td {
  background: rgba(139, 92, 246, 0.04);
}

.import-check-col {
  width: 36px;
  text-align: center !important;
}

.import-check-col input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

.cell-criteria-preview {
  max-width: 180px;
}

/* Import footer actions */
.import-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.import-selected-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.import-action-btns {
  display: flex;
  gap: 0.75rem;
}

.import-action-btns .btn svg {
  margin-right: 0.3rem;
  vertical-align: -2px;
}

/* Sheet selector */
.sheet-selector-controls {
  display: flex;
  align-items: center;
  margin-bottom: 0.6rem;
}

.sheet-select-all-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  font-weight: 500;
}

.sheet-select-all-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

.sheet-selector-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
  max-height: 280px;
  overflow-y: auto;
}

.sheet-selector-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: left;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}

.sheet-selector-item:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.06);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.15);
}

.sheet-selector-item:has(.sheet-checkbox:checked) {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
}

.sheet-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}

.sheet-selector-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent);
  flex-shrink: 0;
}

.sheet-selector-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}

.sheet-selector-name {
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-selector-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ── Inline sheet picker (inside POC modal file zone) ── */
.inline-sheet-picker {
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  padding: 0.85rem;
  animation: fadeIn 0.2s ease;
}

.inline-picker-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.inline-picker-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.inline-picker-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(139, 92, 246, 0.12);
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
}

.inline-picker-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: 200px;
  overflow-y: auto;
  margin-bottom: 0.65rem;
}

.inline-sheet-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.inline-sheet-item:hover {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.06);
}

.inline-sheet-item:has(.inline-sheet-check:checked) {
  border-color: var(--accent);
  background: rgba(139, 92, 246, 0.08);
}

.inline-sheet-check {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.inline-sheet-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  flex: 1;
  min-width: 0;
}

.inline-sheet-name {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-sheet-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inline-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

/* Sheet badge in preview table */
.import-sheet-col {
  white-space: nowrap;
}

.sheet-badge {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 20px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========================================
   Criteria Link (main table)
   ======================================== */
.criteria-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.65rem;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: inherit;
}

.criteria-link:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: var(--accent);
}

.criteria-count {
  font-size: 0.85rem;
  font-weight: 700;
}

.criteria-mini-bar {
  display: inline-block;
  width: 40px;
  height: 4px;
  background: rgba(139, 92, 246, 0.15);
  border-radius: 2px;
  overflow: hidden;
}

.criteria-mini-fill {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width 0.3s ease;
}

.criteria-label {
  color: var(--text-muted);
  font-weight: 500;
}

.text-muted {
  color: var(--text-muted) !important;
}

/* ========================================
   Notes
   ======================================== */
/* Notes cell in main table */
.notes-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.notes-open-link {
  display: block;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s;
}

.notes-open-link:hover {
  background: var(--bg-hover);
}

.notes-open-link:hover .notes-latest-text {
  color: var(--accent);
}

.notes-latest-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notes-count-link {
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s ease;
}

.notes-count-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* Notes add row (used in both modal and view) */
.notes-add-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}

.notes-add-row textarea {
  flex: 1;
  padding: 0.55rem 0.75rem;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  resize: vertical;
  min-height: 2.4rem;
  transition: border-color 0.15s ease;
}

.notes-add-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.notes-add-row textarea::placeholder {
  color: var(--text-muted);
}

.notes-add-row .btn {
  margin-top: 2px;
  white-space: nowrap;
}

/* Notes history list */
.notes-history-list {
  max-height: 200px;
  overflow-y: auto;
  margin-top: 0.6rem;
}

/* ── Notes Modal (redesigned) ──────── */
.notes-modal {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

.notes-compose {
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}

.notes-compose textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font-size: 0.88rem;
  font-family: inherit;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  resize: vertical;
  min-height: 52px;
  max-height: 160px;
  transition: border-color 0.15s ease;
}
.notes-compose textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.notes-compose textarea::placeholder {
  color: var(--text-muted);
}

.notes-compose-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.55rem;
  gap: 0.5rem;
}

.notes-import-sources {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.notes-import-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  margin-right: 0.15rem;
}

.notes-source-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}
.notes-source-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
  background: rgba(124, 58, 237, 0.06);
}
.notes-source-btn svg {
  flex-shrink: 0;
}

.notes-send-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.notes-view-body {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem 1.25rem 1.25rem;
}

.notes-view-list {
  max-height: none;
  overflow-y: visible;
}

.note-item {
  padding: 0.75rem 0.85rem;
  margin-bottom: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.note-item:last-child {
  margin-bottom: 0;
}

.note-item:hover {
  border-color: rgba(124, 58, 237, 0.25);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.note-item-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.note-item-author {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.note-item-date {
  font-size: 0.72rem;
  color: var(--text-muted);
  flex: 1;
}

.note-delete-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.note-item:hover .note-delete-btn {
  opacity: 1;
}

.note-delete-btn:hover {
  color: #f87171;
}

.note-item-text {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 150px;
  overflow-y: auto;
}

.notes-empty {
  padding: 1rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-style: italic;
}

/* All Notes timeline */
.all-notes-toolbar {
  margin-bottom: 0.75rem;
}

.all-notes-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.all-notes-timeline {
  max-height: none;
}

.all-notes-date-header {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.5rem 0.75rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.all-note-item .note-item-header {
  gap: 0.4rem;
}

.all-note-poc-badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 600;
  border-radius: 20px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent);
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

/* Clickable note items */
.clickable-note-item {
  cursor: pointer;
  transition: all 0.15s ease;
}

.clickable-note-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  border-color: var(--accent-muted);
}

.clickable-note-item:active {
  transform: translateY(0);
}

/* ========================================
   Note Detail Modal
   ======================================== */
.note-detail-body {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.note-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.note-detail-meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.note-detail-meta-item svg {
  opacity: 0.6;
}

.note-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.note-detail-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  min-height: 100px;
  max-height: 500px;
  overflow-y: auto;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

/* Note Sections (for structured Gong content) */
.note-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--border);
}

.note-section:last-child {
  margin-bottom: 0;
}

.note-header {
  background: transparent;
  border-left: none;
  padding: 0;
  margin-bottom: 1rem;
  font-weight: 500;
}

.note-section-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.75rem 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.note-section-content {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

.note-section-action {
  border-left-color: #3b82f6;
  background: rgba(59, 130, 246, 0.05);
}

.note-section-question {
  border-left-color: #8b5cf6;
  background: rgba(139, 92, 246, 0.05);
}

.note-section-next {
  border-left-color: #10b981;
  background: rgba(16, 185, 129, 0.05);
}

.note-section-summary {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.note-section-key {
  border-left-color: #eab308;
  background: rgba(234, 179, 8, 0.05);
}

.note-section-transcript {
  border-left-color: var(--border);
  background: var(--bg-secondary);
}

.note-section-transcript .note-section-content {
  font-size: 0.85rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  max-height: 300px;
  overflow-y: auto;
}

.note-section-outcome {
  border-left-color: #06b6d4;
  background: rgba(6, 182, 212, 0.05);
}

.note-section-topics {
  border-left-color: #ec4899;
  background: rgba(236, 72, 153, 0.05);
}

.note-section-speakers {
  border-left-color: #14b8a6;
  background: rgba(20, 184, 166, 0.05);
}

.note-section-comments {
  border-left-color: #64748b;
  background: rgba(100, 116, 139, 0.05);
}

.note-transcript-content {
  font-size: 0.85rem;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
  max-height: 400px;
  overflow-y: auto;
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: var(--radius-sm);
}

.note-overview-content {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  white-space: pre-wrap;
}

/* ========================================
   Criteria Detail Modal
   ======================================== */
.modal-criteria {
  max-width: 800px;
}

.criteria-modal-title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.criteria-modal-title h2 {
  margin: 0;
}

.criteria-owner {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 400;
}

.criteria-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

/* Progress summary */
.criteria-summary {
  margin-bottom: 1rem;
}

.criteria-progress-info {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.criteria-progress-text {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.criteria-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-surface);
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.criteria-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

/* Criteria table */
.criteria-table-wrapper {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.criteria-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.criteria-table th {
  background: var(--bg-secondary);
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.criteria-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}

.criteria-table tr:hover td {
  background: rgba(139, 92, 246, 0.04);
}

.criteria-num-col {
  width: 36px;
  text-align: center !important;
  color: var(--text-muted) !important;
  font-weight: 500;
}

.criteria-status-select {
  padding: 0.3rem 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.criteria-status-select:focus {
  outline: none;
  border-color: var(--accent);
}

.criteria-status-select.not-started { color: var(--text-muted); }
.criteria-status-select.in-progress { color: #60a5fa; }
.criteria-status-select.completed { color: #34d399; }
.criteria-status-select.on-hold { color: #fbbf24; }
.criteria-status-select.failed { color: #f87171; }

.criteria-notes-input {
  width: 100%;
  padding: 0.3rem 0.5rem;
  font-size: 0.82rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  transition: all 0.15s ease;
}

.criteria-notes-input:hover {
  background: var(--bg-surface);
  border-color: var(--border);
}

.criteria-notes-input:focus {
  outline: none;
  background: var(--bg-surface);
  border-color: var(--accent);
}

.criteria-notes-input::placeholder {
  color: var(--text-muted);
}

.criteria-empty {
  text-align: center;
  padding: 2rem !important;
  color: var(--text-muted);
  font-style: italic;
}

/* Add criteria row */
.criteria-add-row {
  display: flex;
  gap: 0.5rem;
}

.criteria-add-input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.criteria-add-input:focus {
  outline: none;
  border-color: var(--accent);
}

.criteria-add-input::placeholder {
  color: var(--text-muted);
}

.criteria-import-hint {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.criteria-import-hint svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: #3b82f6;
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes slideInRight {
  from { 
    opacity: 0; 
    transform: translateX(100px);
  }
  to { 
    opacity: 1; 
    transform: translateX(0);
  }
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 900px) {
  .app-header {
    padding: 0.85rem 1rem;
  }

  .stats-bar {
    padding: 1rem;
  }

  .table-container {
    padding: 0 1rem 1rem;
    overflow-x: auto;
  }

  .poc-table {
    min-width: 700px;
  }

  .search-box input {
    width: 140px;
  }
}

@media (max-width: 600px) {
  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .stats-bar {
    gap: 0.5rem;
  }

  .stat-card {
    padding: 0.5rem 0.75rem;
    min-width: 80px;
  }

  .stat-value {
    font-size: 1.2rem;
  }
}

/* ── Admin Dashboard ───────────────────── */
/* ── Admin Page ────────────────────────── */
.admin-page {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.admin-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem;
}

.admin-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

.admin-tab-nav {
  display: flex;
  width: fit-content;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.3rem;
  margin: 0 auto 1.5rem;
}

.admin-tab-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.admin-tab-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.admin-tab-btn.active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #6d4aff);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
}

.admin-sections {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

.admin-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

.admin-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.admin-section-header svg {
  color: var(--accent);
  flex-shrink: 0;
}

.admin-section-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-section-desc {
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
}

.admin-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.admin-action-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  transition: all var(--transition);
}

.admin-action-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.admin-action-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-action-icon-poc {
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent);
}

.admin-action-icon-opp {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.admin-action-icon-users {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.admin-action-icon-gong {
  background: rgba(99, 102, 241, 0.1);
  color: #6366f1;
}

.admin-action-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.admin-action-content h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.admin-action-content p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.admin-action-content .btn {
  align-self: flex-start;
  margin-top: 0.25rem;
}

/* ── API Configuration ────────────────────── */
.admin-api-config {
  margin-top: 0.5rem;
}

.api-config-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.api-config-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.api-config-label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  cursor: default;
}

.api-config-label-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text-primary);
}

.api-config-label-header svg {
  color: var(--accent);
  flex-shrink: 0;
}

.api-config-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin: 0;
  padding-left: 1.65rem;
}

.api-config-input-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.api-config-input {
  flex: 1;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: 'Monaco', 'Courier New', monospace;
  transition: all var(--transition);
}

.api-config-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
}

.api-config-input::placeholder {
  color: var(--text-muted);
  font-family: inherit;
}

.api-config-textarea {
  min-height: 96px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.45;
}

.admin-sso-flags {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.65rem;
}

.admin-sso-flag {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.7rem;
}

.admin-sso-flag input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
}

.admin-sso-flag-warning {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.06);
  color: #fcd34d;
}

.admin-sso-actions {
  flex-wrap: wrap;
}

.api-toggle-visibility {
  padding: 0.5rem;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.api-toggle-visibility:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

.api-toggle-visibility svg {
  color: var(--text-secondary);
}

.api-config-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.api-config-status {
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.api-config-status.success {
  color: #22c55e;
}

.api-config-status.error {
  color: #ef4444;
}

/* ── Admin Permissions ────────────────────── */
.admin-permissions-layout {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(340px, 1fr);
  gap: 1rem;
}

.admin-permissions-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
}

.admin-permissions-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.admin-permissions-panel-head h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-permissions-table-wrap {
  overflow-x: auto;
}

.admin-permissions-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.admin-permissions-table th,
.admin-permissions-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0.45rem;
  text-align: left;
  vertical-align: middle;
}

.admin-permissions-table th {
  color: var(--text-secondary);
  font-weight: 600;
}

.admin-perm-role-select {
  min-width: 110px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.45rem;
}

.admin-perm-role-select:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-perm-user-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.admin-perm-you-badge {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border-radius: 999px;
  padding: 0.08rem 0.35rem;
}

.admin-create-team-form {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.admin-team-input {
  flex: 1;
  min-width: 160px;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
}

.admin-team-input:focus {
  outline: none;
  border-color: var(--accent);
}

.admin-teams-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.admin-team-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  padding: 0.75rem;
}

.admin-team-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.admin-team-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.admin-team-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.admin-team-members {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.admin-team-member-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
  background: rgba(124, 58, 237, 0.08);
}

.admin-team-member-remove {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.82rem;
  cursor: pointer;
  line-height: 1;
  padding: 0;
}

.admin-team-member-remove:hover {
  color: #ef4444;
}

.admin-team-add-row {
  display: flex;
  gap: 0.45rem;
}

.admin-team-select {
  flex: 1;
  min-width: 140px;
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.38rem 0.5rem;
}

.admin-team-select:focus {
  outline: none;
  border-color: var(--accent);
}

@media (max-width: 768px) {
  .admin-action-grid {
    grid-template-columns: 1fr;
  }
  
  .admin-page {
    padding: 1rem;
  }

  .admin-tab-nav {
    display: flex;
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .admin-tab-btn {
    flex: 1;
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .api-config-input {
    font-size: 0.85rem;
  }

  .admin-permissions-layout {
    grid-template-columns: 1fr;
  }

  .admin-create-team-form {
    flex-direction: column;
  }

  .admin-team-add-row {
    flex-direction: column;
  }
}

/* ── Admin Dashboard ────────────────────── */
.admin-dashboard {
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.dashboard-header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Overview cards */
.dashboard-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dash-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1rem;
  text-align: center;
  transition: border-color 0.15s;
}

.dash-card:hover {
  border-color: var(--accent);
}

.dash-card-accent {
  border-color: rgba(139, 92, 246, 0.3);
  background: rgba(139, 92, 246, 0.05);
}

.dash-card-opportunity {
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.05);
}

.dash-card-opportunity .dash-card-value {
  color: #22c55e;
}

.dash-card-meeting {
  border-color: rgba(59, 130, 246, 0.3);
  background: rgba(59, 130, 246, 0.05);
}

.dash-card-meeting .dash-card-value {
  color: #3b82f6;
}

.dash-card-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.dash-card-accent .dash-card-value {
  color: var(--accent);
}

.dash-card-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 0.3rem;
}

/* Panels row */
.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
}

.dashboard-panel h3 {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dashboard-panel-full {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.dashboard-panel-full h3 {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Status bars */
.dash-status-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.dash-status-label {
  min-width: 120px;
  flex-shrink: 0;
}

.dash-status-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}

.dash-status-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.dash-status-bar-fill.status-not-started { background: var(--text-muted); }
.dash-status-bar-fill.status-in-progress { background: #3b82f6; }
.dash-status-bar-fill.status-completed { background: var(--success); }
.dash-status-bar-fill.status-on-hold { background: #f59e0b; }
.dash-status-bar-fill.status-failed { background: var(--danger); }

.dash-status-count {
  min-width: 28px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Activity list */
.dash-activity-list {
  max-height: 260px;
  overflow-y: auto;
}

.dash-activity-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.82rem;
}

.dash-activity-item:last-child {
  border-bottom: none;
}

.dash-activity-poc {
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-activity-owner {
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.dash-activity-date {
  color: var(--text-muted);
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Opportunities Stats */
.dash-opp-stats {
  max-height: 260px;
  overflow-y: auto;
}

.dash-stat-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.dash-stat-label {
  min-width: 120px;
  flex-shrink: 0;
  font-size: 0.82rem;
  color: var(--text-primary);
}

.dash-stat-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
}

.dash-stat-bar-fill {
  height: 100%;
  background: #22c55e;
  border-radius: 4px;
  transition: width 0.4s ease;
}

.dash-stat-count {
  min-width: 28px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

/* Meetings Stats */
.dash-meetings-stats {
  max-height: 260px;
  overflow-y: auto;
}

.dash-meeting-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.dash-meeting-row:last-child {
  border-bottom: none;
}

.dash-meeting-time {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 90px;
  flex-shrink: 0;
}

.dash-meeting-day {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dash-meeting-day.today {
  color: #3b82f6;
}

.dash-meeting-hour {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.dash-meeting-title {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* POC-Opportunity Links */
.dash-poc-opp-stats {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.dash-link-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.dash-link-card {
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.dash-link-card.dash-link-unlinked {
  background: rgba(107, 114, 128, 0.08);
  border-color: rgba(107, 114, 128, 0.2);
}

.dash-link-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1;
}

.dash-link-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.dash-link-sublabel {
  font-size: 0.7rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
  font-style: italic;
}

.dash-link-progress {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dash-link-progress-bar {
  height: 12px;
  background: var(--bg-input);
  border-radius: 6px;
  overflow: hidden;
}

.dash-link-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #10b981);
  border-radius: 6px;
  transition: width 0.4s ease;
}

.dash-link-progress-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-align: center;
}

/* Meeting Activity Summary */
.dash-meeting-activity {
  display: flex;
  flex-direction: column;
}

.dash-meeting-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.dash-meeting-stat {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.dash-meeting-stat-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: #3b82f6;
  line-height: 1;
}

.dash-meeting-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Chart panel */
.dash-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dash-chart-header h3 {
  margin: 0;
}

.dash-chart-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dash-chart-toggle {
  display: flex;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.dash-toggle-btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  font-family: inherit;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.dash-toggle-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.dash-toggle-btn.active {
  background: var(--accent);
  color: #fff;
}

.dash-chart-wrapper {
  position: relative;
  height: 320px;
}

/* User table */
.dash-user-table-wrapper {
  overflow-x: auto;
}

.dash-user-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.dash-user-table th {
  background: var(--bg-secondary);
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.dash-user-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}

.dash-user-table tr:hover td {
  background: rgba(139, 92, 246, 0.04);
}

/* Active button state for dashboard toggle */
.btn-active {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

@media (max-width: 768px) {
  .dashboard-row {
    grid-template-columns: 1fr;
  }

  .dashboard-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Granola Integration ───────────────── */

/* User Settings modal */
.user-settings-body {
  padding: 0 1.5rem 1.5rem;
}

.settings-section {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  background: var(--bg-input);
}

.settings-section-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.settings-section-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.settings-section-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.settings-section-desc a {
  color: var(--accent);
  text-decoration: none;
}

.settings-section-desc a:hover {
  text-decoration: underline;
}

.settings-deprecated-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.settings-deprecated-notice svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: #3b82f6;
}

.settings-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.form-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-style: italic;
}

.granola-key-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.granola-key-row input {
  flex: 1;
}

.granola-status {
  min-height: 1.2rem;
  font-size: 0.8rem;
  margin: 0.5rem 0;
  padding: 0;
  border-radius: 6px;
  line-height: 1.4;
}

.granola-status:empty {
  display: none;
}

.granola-status-info {
  color: var(--accent);
}

.granola-status-success {
  color: var(--success);
}

.granola-status-error {
  color: var(--danger);
}

/* Browser modal */
.granola-browser-body {
  padding: 0 1.5rem 1.5rem;
}

.granola-browser-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.granola-browser-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.granola-browser-filters input[type="date"] {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.6rem;
  font-size: 0.82rem;
  color: var(--text-primary);
  font-family: inherit;
}

.granola-filter-sep {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.granola-result-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.granola-notes-list {
  max-height: 240px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-input);
  margin-bottom: 0.75rem;
}

.granola-loading {
  color: var(--accent);
  font-style: normal;
}

.granola-note-item {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
}

.granola-note-item:last-child {
  border-bottom: none;
}

.granola-note-item:hover {
  background: var(--bg-hover);
}

.granola-note-item.granola-note-selected {
  background: rgba(139, 92, 246, 0.1);
  border-left: 3px solid var(--accent);
}

.granola-note-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.granola-note-meta {
  display: flex;
  gap: 0.6rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.granola-note-owner {
  font-weight: 500;
}

.granola-browser-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem 0;
}

/* Preview pane */
.granola-preview-pane {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  padding: 1rem;
  margin-bottom: 1rem;
}

.granola-preview-pane.hidden {
  display: none;
}

.granola-preview-header {
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.granola-preview-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}

.granola-preview-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.granola-preview-summary {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 160px;
  overflow-y: auto;
}

.granola-preview-attendees {
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.granola-preview-attendees strong {
  color: var(--text-secondary);
}

/* Granola source badge on notes */
.granola-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.08rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 20px;
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.gong-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.08rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 20px;
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.note-item-granola {
  border-left: 3px solid #f59e0b;
}

.note-item-gong {
  border-left: 3px solid #818cf8;
}

.note-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12em 0.4em;
  border-radius: var(--radius-sm);
}

.note-source-badge-granola {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
}

.note-source-badge-gong {
  background: rgba(129, 140, 248, 0.15);
  color: #818cf8;
}

.note-source-badge-salesforce {
  background: rgba(16, 185, 129, 0.15);
  color: #10b981;
}

.note-access-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12em 0.4em;
  border-radius: var(--radius-sm);
}

.note-access-shared {
  background: rgba(34, 197, 94, 0.14);
  color: #22c55e;
}

.note-access-private {
  background: rgba(239, 68, 68, 0.14);
  color: #ef4444;
}

.note-access-team {
  background: rgba(59, 130, 246, 0.14);
  color: #60a5fa;
}

.note-access-users {
  background: rgba(245, 158, 11, 0.14);
  color: #f59e0b;
}

.note-access-btn {
  border: 1px solid var(--border);
  background: rgba(124, 58, 237, 0.08);
  color: var(--text-secondary);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.08rem 0.45rem;
  cursor: pointer;
}

.note-access-btn:hover {
  border-color: rgba(124, 58, 237, 0.35);
  color: var(--accent);
}

/* Notes add actions row */
.notes-add-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.granola-import-trigger {
  white-space: nowrap;
}

/* Granola Link Import */
.granola-link-body {
  padding: 0 1.5rem 1.5rem;
}

.granola-link-actions-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.granola-link-status {
  min-height: 1.2rem;
  font-size: 0.8rem;
  margin: 0.5rem 0;
  line-height: 1.4;
}

.granola-link-status:empty {
  display: none;
}

.granola-link-status-info {
  color: var(--accent);
}

.granola-link-status-success {
  color: var(--success);
}

.granola-link-status-error {
  color: var(--danger);
}

.granola-link-preview {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  padding: 1rem;
  margin-bottom: 1rem;
}

.granola-link-preview.hidden {
  display: none;
}

.granola-link-preview h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}

.granola-link-preview-content {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 200px;
  overflow-y: auto;
}

.granola-link-fallback {
  border: 1px solid rgba(245, 158, 11, 0.25);
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.04);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.granola-link-fallback.hidden {
  display: none;
}

.granola-fallback-header {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.granola-fallback-steps {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

.granola-fallback-steps a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.granola-fallback-steps a:hover {
  text-decoration: underline;
}

.granola-fallback-steps kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-size: 0.72rem;
  font-family: inherit;
  font-weight: 600;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   OPPORTUNITIES PAGE
   ═══════════════════════════════════════════ */

.opp-page {
  padding: 1rem 1.5rem;
}

.opp-toolbar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.opp-search-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.7rem;
  flex: 0 1 260px;
}

.opp-search-box input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  width: 100%;
}

.opp-filters {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.opp-filters label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.opp-filters select {
  font-size: 0.82rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.opp-count {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Summary cards */
.opp-summary {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.opp-summary-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 120px;
}

.opp-summary-val {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
}

.opp-summary-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.opp-summary-types {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

/* Table */
.opp-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.opp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.opp-table th {
  background: var(--bg-secondary);
  padding: 0.55rem 0.65rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.opp-sortable {
  cursor: pointer;
  user-select: none;
}

.opp-sortable:hover {
  color: var(--accent);
}

.opp-table td {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  vertical-align: top;
}

.opp-table tr:hover td {
  background: rgba(139, 92, 246, 0.04);
}

.opp-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.opp-page-size {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 0.25rem;
}

.opp-page-size label {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 600;
}

.opp-page-size select {
  font-size: 0.82rem;
  padding: 0.2rem 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.opp-page-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 110px;
  text-align: center;
}

.opp-account {
  font-weight: 600;
  color: var(--text-primary);
}

.opp-name {
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.opp-next-steps {
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.cell-number {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  white-space: nowrap;
}

/* Stage badge */
.opp-stage-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

/* Type chip */
.opp-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.08);
  color: var(--text-secondary);
}

.opp-type-chip strong {
  color: var(--accent);
}

.opp-type-chip-sm {
  font-size: 0.73rem;
  color: var(--text-muted);
}

/* POV indicator */
.opp-pov-yes {
  font-size: 0.72rem;
  font-weight: 700;
  color: #22c55e;
}

.opp-pov-no {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.opp-pov-status {
  font-size: 0.7rem;
  color: var(--accent);
}

/* Risk badges */
.opp-risk-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.opp-risk-red { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.opp-risk-yellow { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.opp-risk-green { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.opp-risk-none { color: var(--text-muted); }

/* Empty state */
.opp-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.opp-empty svg {
  opacity: 0.3;
  margin-bottom: 1rem;
}

/* Import modal */
.opp-import-modal {
  max-width: 900px;
}

/* ═══════════════════════════════════════════
   MEETINGS PAGE
   ═══════════════════════════════════════════ */

.mtg-page { padding: 1rem 1.5rem; }

.mtg-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.mtg-search-box {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.7rem;
  flex: 0 1 220px;
}
.mtg-search-box input {
  border: none; background: transparent; color: var(--text-primary);
  font-size: 0.85rem; outline: none; width: 100%;
}

.mtg-date-range {
  display: flex; align-items: center; gap: 0.35rem;
}
.mtg-date-range input[type="date"] {
  padding: 0.3rem 0.5rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-secondary);
  color: var(--text-primary); font-size: 0.82rem;
}
.mtg-date-sep { font-size: 0.8rem; color: var(--text-muted); }

.mtg-tabs {
  display: flex; gap: 0.2rem;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.15rem;
}
.mtg-tab {
  padding: 0.28rem 0.6rem; border: none; background: transparent;
  color: var(--text-muted); font-size: 0.76rem; font-weight: 600;
  border-radius: 6px; cursor: pointer; transition: background 0.15s, color 0.15s;
}
.mtg-tab:hover { color: var(--text-primary); }
.mtg-tab.active { background: var(--accent); color: #fff; }

.mtg-count {
  font-size: 0.78rem; color: var(--text-muted); margin-left: auto;
}

/* Status messages */
.mtg-status { margin-bottom: 0.75rem; font-size: 0.84rem; }
.mtg-status-loading { color: var(--text-muted); }
.mtg-status-error { color: #ef4444; }
.mtg-status-connect { color: var(--text-muted); padding: 0.75rem; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 10px; }

.mtg-empty {
  text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); font-size: 0.9rem;
}

/* Meeting list */
.mtg-group { margin-bottom: 0.4rem; }
.mtg-group-date {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-muted);
  padding: 0.4rem 0.75rem; background: var(--bg-secondary);
  border: 1px solid var(--border); border-bottom: none;
  border-radius: 10px 10px 0 0;
}
.mtg-group-items {
  border: 1px solid var(--border); border-radius: 0 0 10px 10px;
  overflow: hidden;
}

.mtg-item {
  display: flex; align-items: center; gap: 0.75rem; width: 100%;
  padding: 0.7rem 0.85rem; border: none;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  background: transparent; color: var(--text-primary);
  text-align: left; cursor: pointer; transition: background 0.1s;
}
.mtg-item:last-child { border-bottom: none; }
.mtg-item:hover { background: rgba(139, 92, 246, 0.05); }
.mtg-item.mtg-item-now { border-left: 3px solid #22c55e; background: rgba(34, 197, 94, 0.04); }
.mtg-item.mtg-item-past { opacity: 0.55; }

.mtg-item-time {
  display: flex; flex-direction: column; align-items: flex-end;
  flex-shrink: 0; min-width: 55px;
}
.mtg-item-start { font-size: 0.84rem; font-weight: 700; }
.mtg-item-end { font-size: 0.7rem; color: var(--text-muted); }

.mtg-item-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 0.1rem; }
.mtg-item-title {
  font-size: 0.9rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mtg-item-meta { display: flex; gap: 0.5rem; font-size: 0.72rem; color: var(--text-muted); flex-wrap: wrap; }
.mtg-item-conf { color: #22c55e; font-weight: 600; }
.mtg-item-notes-badge {
  background: rgba(139, 92, 246, 0.12); color: var(--accent);
  padding: 0.05rem 0.35rem; border-radius: 999px; font-weight: 600;
}

.mtg-live-badge {
  flex-shrink: 0; font-size: 0.65rem; font-weight: 800; text-transform: uppercase;
  padding: 0.15rem 0.5rem; border-radius: 999px; background: #22c55e; color: #fff;
  animation: pulse 2s infinite;
}

.mtg-join-btn {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.3rem 0.65rem; border-radius: 8px;
  background: rgba(34, 197, 94, 0.1); color: #22c55e;
  font-size: 0.75rem; font-weight: 600; text-decoration: none;
  transition: background 0.15s;
}
.mtg-join-btn:hover { background: rgba(34, 197, 94, 0.25); }

/* ── Meeting Detail Modal ──────────────────── */
.mtg-detail-modal { max-width: 800px; }
.mtg-detail-body { padding: 0 1rem 1rem; }

.mtg-detail-top {
  display: flex; gap: 1.5rem; margin-bottom: 1rem;
  flex-wrap: wrap;
}
.mtg-detail-info { flex: 1; min-width: 200px; }

.mtg-detail-datetime { margin-bottom: 0.5rem; }
.mtg-d-date { font-size: 0.92rem; font-weight: 700; color: var(--text-primary); }
.mtg-d-time { font-size: 0.88rem; color: var(--text-secondary); margin-left: 0.5rem; }
.mtg-d-duration { font-size: 0.78rem; color: var(--text-muted); margin-left: 0.3rem; }

.mtg-detail-location, .mtg-detail-organizer {
  font-size: 0.84rem; color: var(--text-secondary); margin-bottom: 0.35rem;
  display: flex; align-items: center; gap: 0.3rem;
}

.mtg-detail-links {
  display: flex; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.5rem;
}
.mtg-d-link {
  display: inline-flex; align-items: center; gap: 0.3rem;
  font-size: 0.8rem; font-weight: 600; padding: 0.3rem 0.65rem;
  border-radius: 8px; background: rgba(139, 92, 246, 0.08);
  color: var(--accent); text-decoration: none; transition: background 0.15s;
}
.mtg-d-link:hover { background: rgba(139, 92, 246, 0.18); }
.mtg-d-link-video { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.mtg-d-link-video:hover { background: rgba(34, 197, 94, 0.22); }

/* Attendees in detail */
.mtg-detail-attendees { flex: 0 0 260px; }
.mtg-detail-attendees h4 {
  margin: 0 0 0.4rem; font-size: 0.82rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted);
}
.mtg-attendee-list { list-style: none; padding: 0; margin: 0; }
.mtg-attendee-list li {
  font-size: 0.82rem; color: var(--text-secondary); padding: 0.2rem 0;
  display: flex; align-items: center; gap: 0.3rem;
}
.mtg-you { font-size: 0.7rem; color: var(--accent); }
.mtg-rsvp { font-size: 0.68rem; color: var(--text-muted); margin-left: auto; }
.mtg-no-attendees { color: var(--text-muted); font-style: italic; }

/* Description */
.mtg-detail-description h4 {
  margin: 0 0 0.3rem; font-size: 0.82rem; text-transform: uppercase;
  letter-spacing: 0.04em; color: var(--text-muted);
}
.mtg-desc-text {
  font-size: 0.84rem; color: var(--text-secondary);
  padding: 0.65rem; background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm); max-height: 180px; overflow-y: auto;
  border: 1px solid var(--border);
}

/* ── Meeting Notes Section in Detail ──────── */
.mtg-detail-notes-section {
  margin-top: 1.2rem; border-top: 1px solid var(--border); padding-top: 1rem;
}
.mtg-detail-notes-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 0.65rem; flex-wrap: wrap;
}
.mtg-detail-notes-header h4 {
  margin: 0; font-size: 0.92rem; color: var(--text-primary);
}
.mtg-detail-notes-link-poc {
  display: flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; color: var(--text-muted);
}
.mtg-detail-notes-link-poc select {
  font-size: 0.8rem; padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--bg-secondary); color: var(--text-primary);
  max-width: 200px;
}

.mtg-notes-empty {
  text-align: center; padding: 1rem; font-size: 0.82rem; color: var(--text-muted);
}

.mtg-note-item {
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 0.4rem; background: rgba(255,255,255,0.015);
}
.mtg-note-header {
  display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem;
  margin-bottom: 0.25rem;
}
.mtg-note-author { font-weight: 700; color: var(--text-primary); }
.mtg-note-date { color: var(--text-muted); }
.mtg-note-poc-link {
  font-size: 0.7rem; background: rgba(139, 92, 246, 0.1); color: var(--accent);
  padding: 0.1rem 0.4rem; border-radius: 999px; font-weight: 600;
}
.mtg-note-delete {
  margin-left: auto; background: none; border: none;
  color: var(--text-muted); font-size: 1.1rem; cursor: pointer;
  line-height: 1; padding: 0 0.2rem;
}
.mtg-note-delete:hover { color: #ef4444; }
.mtg-note-text { font-size: 0.84rem; color: var(--text-secondary); line-height: 1.45; }

.mtg-detail-notes-compose {
  display: flex; gap: 0.5rem; align-items: flex-start; margin-top: 0.5rem;
}
.mtg-detail-notes-compose textarea {
  flex: 1; padding: 0.5rem 0.65rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-secondary);
  color: var(--text-primary); font-size: 0.84rem; font-family: inherit;
  resize: vertical; min-height: 56px;
}
.mtg-detail-notes-compose textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.15);
  outline: none;
}
.mtg-detail-notes-compose .btn {
  flex-shrink: 0; align-self: flex-end;
}

@media (max-width: 700px) {
  .mtg-detail-top { flex-direction: column; }
  .mtg-detail-attendees { flex: auto; }
}

/* ═══════════════════════════════════════════
   GOOGLE CALENDAR BROWSER
   ═══════════════════════════════════════════ */

.gcal-browser-body {
  padding: 0.75rem 1rem;
}

.gcal-browser-toolbar {
  margin-bottom: 0.75rem;
}

.gcal-browser-filters {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gcal-browser-filters input[type="date"] {
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.82rem;
}

.gcal-browser-to {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.gcal-search-input {
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.82rem;
  flex: 1;
  min-width: 120px;
}

.gcal-browser-content {
  display: flex;
  gap: 0.75rem;
  min-height: 300px;
}

.gcal-browser-hint {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  width: 100%;
}

.gcal-empty {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.gcal-event-list {
  flex: 0 0 44%;
  overflow-y: auto;
  max-height: 400px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.gcal-event-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background 0.1s;
}

.gcal-event-item:hover {
  background: rgba(139, 92, 246, 0.06);
}

.gcal-event-item.active {
  background: rgba(139, 92, 246, 0.12);
  border-left: 3px solid var(--accent);
}

.gcal-event-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  min-width: 70px;
}

.gcal-event-day {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.gcal-event-time {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.gcal-event-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.gcal-event-title {
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gcal-event-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.gcal-conf-badge {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 600;
}

/* Detail panel */
.gcal-event-detail {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-y: auto;
  max-height: 400px;
}

.gcal-event-detail h3 {
  margin: 0 0 0.6rem;
  font-size: 1.1rem;
  color: var(--text-primary);
}

.gcal-meta-row {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.gcal-meta-row a {
  color: var(--accent);
}

.gcal-attendee-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0;
}

.gcal-attendee-list li {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.15rem 0;
}

.gcal-desc-content {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-top: 0.35rem;
  padding: 0.5rem;
  background: rgba(255,255,255,0.02);
  border-radius: var(--radius-sm);
  max-height: 150px;
  overflow-y: auto;
}

/* Settings status */
.google-cal-status {
  margin: 0.5rem 0;
}

.google-cal-status-text {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.gcal-status-ok {
  color: #22c55e;
  font-weight: 600;
}

.gcal-status-info {
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   HOME / LANDING PAGE
   ═══════════════════════════════════════════ */

.home-page {
  width: min(100%, 1100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.home-hero {
  text-align: center;
  margin-bottom: 2.5rem;
}

.home-greeting {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 0 0 0.4rem;
  letter-spacing: -0.02em;
}

.home-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
}

/* Search */
.home-search-wrap {
  position: relative;
  width: 100%;
  max-width: 700px;
  margin-bottom: 2.5rem;
  margin-left: auto;
  margin-right: auto;
}

.home-search {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.5rem;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
}

.home-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}

.home-search svg {
  flex-shrink: 0;
  color: var(--text-muted);
}

.home-search input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 1.1rem;
  outline: none;
}

.home-search input::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

/* Search Results Dropdown */
.home-search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  max-height: 400px;
  overflow-y: auto;
  z-index: 50;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.home-search-empty {
  padding: 1.2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.home-search-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border: none;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.home-search-item:last-child {
  border-bottom: none;
}

.home-search-item:hover {
  background: rgba(139, 92, 246, 0.08);
}

.home-search-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.home-search-icon-poc { background: rgba(139, 92, 246, 0.12); color: var(--accent); }
.home-search-icon-opp { background: rgba(34, 197, 94, 0.12); color: #22c55e; }
.home-search-icon-note { background: rgba(59, 130, 246, 0.12); color: #3b82f6; }

.home-search-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.home-search-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-search-item-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-search-type-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.home-search-type-poc { background: rgba(139, 92, 246, 0.1); color: var(--accent); }
.home-search-type-opp { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.home-search-type-note { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }

/* Quick Link Cards */
.home-quick-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.home-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  min-width: 150px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
  color: var(--text-muted);
}

.home-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.12);
  color: var(--accent);
}

.home-card-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-primary);
}

.home-card-count {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}

/* Home Meetings Section */
.home-meetings-section {
  width: 100%;
  max-width: 700px;
  margin-top: 2rem;
}

.home-meetings-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.home-meetings-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.home-meetings-title svg {
  color: var(--accent);
}

.home-meetings-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.2rem;
}

.home-meetings-tab {
  padding: 0.3rem 0.75rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.home-meetings-tab:hover {
  color: var(--text-primary);
}

.home-meetings-tab.active {
  background: var(--accent);
  color: #fff;
}

.home-meetings-status {
  margin-bottom: 0.5rem;
}

.home-meetings-loading {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.home-meetings-error {
  font-size: 0.82rem;
  color: #ef4444;
}

.home-meetings-connect {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.home-meetings-connect svg {
  flex-shrink: 0;
  color: var(--accent);
}

.home-meetings-empty {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--text-muted);
}

.home-meetings-empty svg {
  opacity: 0.3;
  margin-bottom: 0.75rem;
}

.home-meetings-empty p {
  font-size: 0.9rem;
  margin: 0;
}

/* Meeting list */
/* Meetings Header with Tabs */
.home-meetings-header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.home-meeting-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-secondary);
  padding: 0.2rem;
  border-radius: var(--radius-sm);
}

.home-meeting-tab {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.home-meeting-tab:hover {
  color: var(--text-primary);
}

.home-meeting-tab.active {
  background: var(--accent);
  color: white;
}

.home-meetings-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 200px;
  flex: 1;
}

.home-meetings-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-y: auto;
  max-height: 500px;
}

.home-meetings-group {
  margin-bottom: 0.5rem;
}

.home-meetings-date-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  padding: 0.35rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: 8px 8px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}

.home-meeting-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-top: none;
  background: transparent;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  transition: background 0.1s;
}

.home-meeting-item:first-of-type {
  border-top: 1px solid var(--border);
}

.home-meeting-item:last-child {
  border-radius: 0 0 8px 8px;
}

.home-meeting-item:hover {
  background: rgba(139, 92, 246, 0.05);
}

.home-meeting-item.home-meeting-now {
  border-left: 3px solid #22c55e;
  background: rgba(34, 197, 94, 0.04);
}

.home-meeting-item.home-meeting-past {
  opacity: 0.6;
}

.home-meeting-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
  min-width: 55px;
}

.home-meeting-start {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.home-meeting-end {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.home-meeting-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.home-meeting-title {
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-meeting-meta {
  display: flex;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.home-meeting-conf {
  color: #22c55e;
  font-weight: 600;
}

.home-meeting-live-badge {
  flex-shrink: 0;
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #22c55e;
  color: #fff;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.home-meeting-join {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
  transition: background 0.15s;
}

.home-meeting-join:hover {
  background: rgba(34, 197, 94, 0.25);
}

/* Meeting detail panel */
.home-meeting-detail {
  position: relative;
  margin-top: 0.75rem;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  animation: slideDown 0.2s ease-out;
}

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

.home-meeting-detail-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.2rem;
  line-height: 1;
}

.home-meeting-detail-close:hover {
  color: var(--text-primary);
}

.home-meeting-detail h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--text-primary);
}

.home-meeting-detail-meta .gcal-meta-row {
  font-size: 0.82rem;
}

/* Search result meeting type */
.home-search-icon-meeting { background: rgba(234, 179, 8, 0.12); color: #eab308; }
.home-search-type-meeting { background: rgba(234, 179, 8, 0.1); color: #eab308; }

@media (max-width: 600px) {
  .home-greeting {
    font-size: 1.5rem;
  }
  .home-search-wrap {
    max-width: 100%;
  }
  .home-quick-links {
    flex-direction: column;
    align-items: stretch;
  }
  .home-card {
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem 1.2rem;
  }
  .home-meetings-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════
   LINK BADGES (POC ↔ Opportunity)
   ═══════════════════════════════════════════ */

.link-cell {
  white-space: nowrap;
}

.link-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-badge:active {
  transform: scale(0.96);
}

.link-badge-poc {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent);
}

.link-badge-poc:hover {
  background: rgba(139, 92, 246, 0.3);
}

.link-badge-opp {
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
}

.link-badge-opp:hover {
  background: rgba(34, 197, 94, 0.25);
}

.link-badge-none {
  background: transparent;
  color: var(--text-muted);
  cursor: default;
  font-weight: 400;
  padding: 0;
}

/* Row highlight animation (when navigating from a link) */
@keyframes rowHighlight {
  0%   { background: rgba(139, 92, 246, 0.25); }
  100% { background: transparent; }
}

tr.row-highlight td {
  animation: rowHighlight 2s ease-out;
}

/* ========================================
   Enhanced Home Page - Sales Engineer Dashboard
   ======================================== */

/* Quick Actions Panel */
.home-quick-actions-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.quick-action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-action-btn svg {
  color: var(--accent);
}

.quick-action-primary {
  background: var(--gradient-primary);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.quick-action-primary:hover {
  background: var(--gradient-hover);
  transform: translateY(-2px) scale(1.02);
}

.quick-action-primary svg {
  color: #fff;
}

/* Search Enhancement */
.home-search {
  position: relative;
}

.search-hint {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.78rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-hint kbd {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-family: monospace;
}

/* Dashboard Grid */
.home-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.home-dashboard-grid-two-col {
  grid-template-columns: repeat(2, 1fr);
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  gap: 1rem;
}

.home-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.home-section-full-width {
  grid-column: 1 / -1;
}

.home-section-primary {
  grid-column: span 1;
}

.home-section-alert {
  border-color: var(--danger);
  border-width: 2px;
  min-height: 400px;
}

.home-section-stats,
.home-section-activity {
  grid-column: span 1;
}

.home-section-meetings {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-card) 0%, rgba(139, 92, 246, 0.02) 100%);
  min-height: 400px;
}

.home-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.home-section-header h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.home-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.home-alert-count {
  background: var(--danger-light);
  color: var(--danger);
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 600;
}

/* Active POCs Widget */
.home-active-pocs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
  max-height: 400px;
}

.home-poc-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: all var(--transition);
}

.home-poc-card:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
  transform: translateX(4px);
}

.home-poc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.home-poc-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.home-poc-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.home-poc-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.home-poc-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
}

.home-poc-progress-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.home-poc-progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Today's Agenda */
.home-agenda {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.home-agenda-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  background: var(--bg-surface);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.home-agenda-time {
  font-weight: 600;
  color: var(--accent);
  min-width: 60px;
}

.home-agenda-title {
  flex: 1;
  color: var(--text-primary);
}

.home-agenda-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 2rem 1rem;
  font-size: 0.9rem;
}

/* Alerts / Needs Attention */
.home-alerts {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
  overflow-y: auto;
  max-height: 500px;
}

.home-alert-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--danger-light);
  border-left: 3px solid var(--danger);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.home-alert-item:hover {
  background: rgba(239, 68, 68, 0.2);
}

.home-alert-icon {
  color: var(--danger);
  flex-shrink: 0;
  margin-top: 2px;
}

.home-alert-content {
  flex: 1;
}

.home-alert-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.home-alert-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Quick Stats Grid */
.home-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.home-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  text-align: center;
  transition: all var(--transition);
}

.home-stat-card:hover {
  background: var(--bg-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.home-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.home-stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Activity Feed */
.home-activity-feed {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow-y: auto;
  max-height: 300px;
}

.home-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.home-activity-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 8px;
}

.home-activity-content {
  flex: 1;
}

.home-activity-title {
  color: var(--text-primary);
  margin-bottom: 0.15rem;
  font-weight: 500;
}

.home-activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Floating Action Button */
.fab-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
}

.fab-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gradient-primary);
  border: none;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.fab-main:hover {
  background: var(--gradient-hover);
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.5);
}

.fab-main:active {
  transform: scale(0.95) rotate(90deg);
}

.fab-menu {
  position: absolute;
  bottom: 70px;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.5rem;
  min-width: 180px;
  animation: fabMenuSlideUp 0.2s ease;
}

@keyframes fabMenuSlideUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fab-menu-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 500;
  width: 100%;
  cursor: pointer;
  transition: all var(--transition);
  text-align: left;
}

.fab-menu-item:hover {
  background: var(--bg-hover);
  color: var(--accent);
}

.fab-menu-item svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.fab-menu-item:hover svg {
  color: var(--accent);
}

/* Quick Note Modal */
.modal-quick-note {
  max-width: 600px;
}

.quick-note-body {
  padding: 1rem 0;
}

.quick-note-templates {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.template-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Keyboard Shortcuts Hint */
.keyboard-hint {
  position: fixed;
  bottom: 1rem;
  left: calc(50% + 120px);
  transform: translateX(-50%);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  box-shadow: var(--shadow-md);
  z-index: 50;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.sidebar.collapsed ~ .keyboard-hint {
  left: 50%;
}

.keyboard-hint:hover {
  opacity: 1;
}

.keyboard-hint kbd {
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  font-family: monospace;
  color: var(--accent);
  font-weight: 600;
}

/* Empty States */
.home-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.home-empty-state svg {
  opacity: 0.3;
  margin-bottom: 1rem;
}

.home-empty-state p {
  font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .home-dashboard-grid-two-col {
    grid-template-columns: 1fr;
  }
  
  .home-section-primary,
  .home-section-alert {
    grid-column: 1;
  }
  
  .home-dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .home-meetings-header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

@media (max-width: 768px) {
  .home-quick-actions-panel {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .home-meetings-header-left {
    width: 100%;
  }
  
  .home-meeting-tabs {
    width: 100%;
  }
  
  .home-meeting-tab {
    flex: 1;
    text-align: center;
  }
  
  .fab-container {
    bottom: 1rem;
    right: 1rem;
  }
  
  .keyboard-hint {
    display: none;
  }
}

/* ── ICS Calendar Import Styles ────────────────────────── */
.ics-upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.ics-upload-zone:hover {
  border-color: var(--primary);
  background: var(--bg-card);
}

.ics-upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.ics-upload-zone svg {
  color: var(--text-secondary);
}

.ics-upload-zone span {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.ics-upload-zone strong {
  color: var(--primary);
}

.ics-file-status,
.ics-status {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.875rem;
  display: none;
}

.ics-file-status.active,
.ics-status.active {
  display: block;
}

.ics-file-status.success,
.ics-status.success {
  background: var(--success-light);
  color: var(--success-dark);
  border: 1px solid var(--success);
}

.ics-file-status.error,
.ics-status.error {
  background: var(--error-light);
  color: var(--error-dark);
  border: 1px solid var(--error);
}

.ics-file-status.info,
.ics-status.info {
  background: var(--bg-secondary);
  color: var(--text);
  border: 1px solid var(--border);
}

.mtg-source-badge {
  display: inline-block;
  margin-right: 0.375rem;
  font-size: 0.875rem;
  opacity: 0.8;
}

/* ── Meeting View Toggle ──────────────────────────── */
.mtg-view-toggle {
  display: flex;
  gap: 0.25rem;
  background: var(--bg-secondary);
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.mtg-view-btn {
  background: transparent;
  border: none;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.mtg-view-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.mtg-view-btn.active {
  background: var(--primary);
  color: white;
}

/* ── Calendar View ──────────────────────────── */
.mtg-calendar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-top: 1rem;
}

.mtg-calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.mtg-calendar-month {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.mtg-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.mtg-cal-day-header {
  background: var(--bg-secondary);
  padding: 0.75rem;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.mtg-cal-day {
  background: var(--bg-card);
  min-height: 100px;
  padding: 0.5rem;
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
}

.mtg-cal-day:hover {
  background: var(--bg-hover);
}

.mtg-cal-day.other-month {
  background: var(--bg-secondary);
  opacity: 0.5;
}

.mtg-cal-day.today {
  background: var(--primary-light);
}

.mtg-cal-day.has-events {
  font-weight: 600;
}

.mtg-cal-day-number {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.375rem;
  font-weight: 500;
}

.mtg-cal-day.today .mtg-cal-day-number {
  background: var(--primary);
  color: white;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.mtg-cal-events {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mtg-cal-event {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  padding: 0.25rem 0.375rem;
  border-radius: 3px;
  font-size: 0.75rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: all 0.2s;
}

.mtg-cal-event:hover {
  background: var(--primary);
  color: white;
  transform: translateX(2px);
}

.mtg-cal-event.event-ics {
  background: #e8f5e9;
  border-left-color: #4caf50;
}

.mtg-cal-event.event-ics:hover {
  background: #4caf50;
}

.mtg-cal-event-time {
  font-weight: 600;
  margin-right: 0.25rem;
}

.mtg-cal-more {
  font-size: 0.75rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 0.25rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.mtg-cal-more:hover {
  text-decoration: underline;
  background: var(--bg-hover);
}

/* Day Events Modal */
.modal-day-events {
  max-width: 600px;
}

.day-events-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: 60vh;
  overflow-y: auto;
}

.day-event-item {
  display: flex;
  gap: 1rem;
  padding: 0.875rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s;
}

.day-event-item:hover {
  background: var(--bg-hover);
  border-color: var(--primary);
  transform: translateX(4px);
}

.day-event-time {
  font-weight: 600;
  color: var(--primary);
  min-width: 60px;
  font-size: 0.875rem;
}

.day-event-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.day-event-title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.9375rem;
}

.day-event-location,
.day-event-attendees {
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.day-event-location {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Responsive calendar */
@media (max-width: 1024px) {
  .mtg-calendar-grid {
    gap: 0;
  }
  
  .mtg-cal-day {
    min-height: 80px;
    padding: 0.375rem;
  }
  
  .mtg-cal-day-number {
    font-size: 0.75rem;
  }
  
  .mtg-cal-event {
    font-size: 0.7rem;
    padding: 0.2rem 0.3rem;
  }
}

@media (max-width: 768px) {
  .mtg-calendar {
    padding: 1rem;
  }
  
  .mtg-cal-day {
    min-height: 60px;
    padding: 0.25rem;
  }
  
  .mtg-cal-event {
    display: none;
  }
  
  .mtg-cal-day.has-events::after {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    position: absolute;
    bottom: 0.25rem;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ────────────────────────────────────────────
   Page Tabs (for combined pages like Opportunities/POCs)
   ──────────────────────────────────────────── */
.page-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 2rem 0;
  background: var(--bg);
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}

.page-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  bottom: -2px;
}

.page-tab:hover {
  color: var(--text);
  background: var(--bg-secondary);
}

.page-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}

.page-tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tab-pin-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  margin-left: 0.25rem;
  background: transparent;
  border: none;
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.page-tab:hover .tab-pin-btn {
  display: flex;
}

.page-tab.pinned .tab-pin-btn {
  display: flex;
  color: var(--primary);
  background: var(--bg-secondary);
}

.tab-pin-btn:hover {
  background: var(--primary);
  color: white;
}

.tab-pin-btn svg {
  width: 12px;
  height: 12px;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ────────────────────────────────────────────
   Opportunity View Tabs
   ──────────────────────────────────────────── */
.opp-view-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0 0 1rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}

.opp-view-tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  bottom: -1rem;
  margin-bottom: -1rem;
}

.opp-view-tab:hover {
  color: var(--text);
  background: var(--bg-secondary);
}

.opp-view-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background: transparent;
}

.opp-view-tab svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.opp-view-tab-content {
  display: none;
}

.opp-view-tab-content.active {
  display: block;
}

/* ────────────────────────────────────────────
   Sizing Questionnaire
   ──────────────────────────────────────────── */
.sizing-questionnaire {
  padding: 0;
}

.sizing-import-section {
  background: var(--bg-secondary);
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.sizing-import-options {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-top: 1rem;
}

.sizing-import-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sizing-import-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
  justify-content: center;
}

.sizing-import-label:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sizing-import-label svg {
  width: 18px;
  height: 18px;
}

.sizing-import-divider {
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.sizing-gdrive-input-group {
  display: flex;
  gap: 0.5rem;
}

.sizing-gdrive-input-group input {
  flex: 1;
}

.sizing-import-hint {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
}

@media (max-width: 768px) {
  .sizing-import-options {
    flex-direction: column;
    gap: 1rem;
  }
  
  .sizing-import-divider {
    transform: rotate(0deg);
  }
}

.sizing-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 1.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.sizing-section-title:first-child {
  margin-top: 0;
}

.sizing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.sizing-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sizing-field-full {
  grid-column: 1 / -1;
}

.sizing-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.sizing-field input,
.sizing-field select,
.sizing-field textarea {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
}

.sizing-field textarea {
  resize: vertical;
  min-height: 80px;
}

.sizing-field input:focus,
.sizing-field select:focus,
.sizing-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

@media (max-width: 768px) {
  .sizing-grid {
    grid-template-columns: 1fr;
  }
  
  .sizing-field-full {
    grid-column: 1;
  }
}

/* ────────────────────────────────────────────────
   POC View Enhancements
   ──────────────────────────────────────────────── */

/* POC View Header Card */
.poc-view-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 1.5rem;
  border-radius: var(--radius);
  color: white;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.poc-view-title-section {
  flex: 1;
}

.poc-view-name {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 0.75rem 0;
  color: white;
}

.poc-view-name-input {
  font-size: 1.5rem;
  font-weight: 600;
  padding: 0.5rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  width: 100%;
  margin-bottom: 0.75rem;
}

.poc-view-name-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.poc-view-meta {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.poc-view-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  opacity: 0.95;
}

.poc-view-meta-item svg {
  opacity: 0.8;
}

.poc-view-inline-input {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: var(--radius-sm);
  color: white;
  padding: 0.25rem 0.5rem;
  font-size: 0.9rem;
}

.poc-view-inline-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.poc-view-badges {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.poc-view-status-select {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Progress Bar */
.poc-view-progress {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.poc-view-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.poc-view-progress-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.poc-view-progress-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.poc-view-progress-bar {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 999px;
  overflow: hidden;
}

.poc-view-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success) 0%, var(--success-dark) 100%);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* POC View Tabs */
.poc-view-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border);
  margin-bottom: 1.5rem;
}

.poc-view-tab {
  background: none;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s ease;
}

.poc-view-tab:hover {
  color: var(--text);
  background: var(--bg-hover);
}

.poc-view-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.poc-view-tab svg {
  opacity: 0.7;
}

.poc-view-tab.active svg {
  opacity: 1;
}

.poc-view-tab .tab-badge {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.poc-view-tab.active .tab-badge {
  background: var(--primary-light);
  color: var(--primary);
}

/* POC View Tab Content */
.poc-view-tab-content {
  display: none;
}

.poc-view-tab-content.active {
  display: block;
}

/* POC View Grid Layout */
.poc-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.poc-view-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.poc-view-card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem 0;
}

/* Date Fields */
.poc-view-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.poc-view-date-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.poc-view-date-value {
  font-size: 0.95rem;
  color: var(--text);
  padding: 0.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
}

/* Next Action */
.poc-view-next-action {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  min-height: 80px;
}

/* Linked Opportunities */
.poc-view-linked-opps {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.poc-view-linked-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text);
  transition: all 0.2s ease;
  cursor: pointer;
}

.poc-view-linked-item:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.poc-view-linked-item svg {
  color: var(--primary);
  flex-shrink: 0;
}

.clickable-poc-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}

.clickable-poc-item:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  border-color: var(--accent-muted);
}

.poc-view-linked-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.poc-view-linked-name {
  font-weight: 600;
  flex: 1;
}

.poc-view-linked-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding-left: 1.75rem;
}

.poc-view-linked-pocs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.poc-view-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

.poc-view-empty {
  padding: 2rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Quick Actions */
.poc-view-quick-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 1rem;
}

/* Criteria List */
.poc-view-criteria-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.poc-criteria-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s ease;
}

.poc-criteria-item:hover {
  border-color: var(--primary-light);
}

.poc-criteria-status {
  flex-shrink: 0;
}

.poc-criteria-content {
  flex: 1;
}

.poc-criteria-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.poc-criteria-notes {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0.5rem 0.75rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  margin-top: 0.5rem;
}

/* Criteria Table */
.poc-criteria-table-wrapper {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
}

.poc-criteria-table {
  width: 100%;
  border-collapse: collapse;
}

.poc-criteria-table thead {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--border);
}

.poc-criteria-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.poc-criteria-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

.poc-criteria-table tbody tr:last-child {
  border-bottom: none;
}

.poc-criteria-table tbody tr:hover {
  background: var(--hover-bg);
}

.poc-criteria-table td {
  padding: 0.875rem 1rem;
  vertical-align: top;
  font-size: 0.9rem;
  color: var(--text);
}

.poc-criteria-table .poc-criteria-text {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.poc-criteria-table .poc-criteria-notes {
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

.poc-criteria-table .delete-criterion {
  opacity: 0.6;
  transition: opacity 0.2s, color 0.2s;
}

.poc-criteria-table tr:hover .delete-criterion {
  opacity: 1;
}

.poc-criteria-table .delete-criterion:hover {
  color: #ef4444;
}

/* Notes List */
.poc-view-notes-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.poc-note-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.poc-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.poc-note-author {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}

.poc-note-author svg {
  color: var(--primary);
}

.poc-note-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.poc-note-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.poc-note-source {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Timeline */
.poc-timeline-view {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.poc-timeline-header h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1.5rem 0;
}

.poc-timeline-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
}

.poc-timeline-list::before {
  content: '';
  position: absolute;
  left: 11px;
  top: 30px;
  bottom: 30px;
  width: 2px;
  background: var(--border);
}

.poc-timeline-item {
  display: flex;
  gap: 1rem;
  position: relative;
}

.poc-timeline-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.poc-timeline-created .poc-timeline-icon {
  border-color: var(--primary);
  background: var(--primary-light);
}

.poc-timeline-created .poc-timeline-icon svg {
  color: var(--primary);
}

.poc-timeline-start .poc-timeline-icon {
  border-color: var(--success);
  background: var(--success-light);
}

.poc-timeline-start .poc-timeline-icon svg {
  color: var(--success);
}

.poc-timeline-criteria .poc-timeline-icon {
  border-color: var(--success);
  background: var(--success-light);
}

.poc-timeline-criteria .poc-timeline-icon svg {
  color: var(--success);
}

.poc-timeline-note .poc-timeline-icon {
  border-color: var(--text-secondary);
  background: var(--bg-secondary);
}

.poc-timeline-note .poc-timeline-icon svg {
  color: var(--text-secondary);
}

.poc-timeline-rag .poc-timeline-icon {
  border-color: var(--primary);
  background: var(--primary-light);
}

.poc-timeline-rag .poc-timeline-icon svg {
  color: var(--primary);
}

.poc-timeline-icon svg {
  width: 12px;
  height: 12px;
}

.poc-timeline-content {
  flex: 1;
  padding-bottom: 0.5rem;
}

.poc-timeline-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.poc-timeline-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.poc-timeline-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* RAG Assessment in Overview */
.poc-view-rag-assessment {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.poc-view-rag-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.poc-view-rag-emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.poc-view-rag-label {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.poc-view-rag-date {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.poc-view-rag-reason {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
  padding: 0.5rem;
  background: var(--bg-secondary);
  border-radius: 4px;
  border-left: 3px solid var(--primary);
}

.poc-view-rag-meta {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Home Search AI Button */
.home-search-ai-btn {
  border-top: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--card-bg) 100%);
}

.home-search-ai-btn:hover {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--bg-secondary) 100%);
}

.home-search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

/* Empty State */
.poc-view-empty-state {
  padding: 4rem 2rem;
  text-align: center;
}

.poc-view-empty-state p {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Section Footer */
.poc-view-section-footer {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
  .poc-view-header {
    flex-direction: column;
  }
  
  .poc-view-grid {
    grid-template-columns: 1fr;
  }
  
  .poc-view-dates {
    grid-template-columns: 1fr;
  }
  
  .poc-view-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .poc-view-tab {
    white-space: nowrap;
  }
}

/* ========================================
   Google Integration Styles
   ======================================== */
#googleIntegrationContainer {
  margin-top: 1rem;
}

.google-connected,
.google-not-connected {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--bg-hover);
  border: 1px solid var(--border);
}

.google-connected {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
}

.google-connected p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  color: var(--success);
  font-weight: 500;
}

.google-not-connected p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

#googleConnectBtn,
#googleDisconnectBtn {
  margin-top: 0.5rem;
}
