/* Hermes Control Hub Design System */
:root {
  --bg-main: #090d16;
  --bg-surface: #111827;
  --bg-surface-elevated: #1a2337;
  --bg-input: #0e1422;
  
  --border-subtle: #1f293d;
  --border-focus: #3b82f6;
  
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --color-primary: #10b981;
  --color-primary-hover: #059669;
  --color-primary-subtle: rgba(16, 185, 129, 0.12);
  
  --color-accent: #3b82f6;
  --color-accent-subtle: rgba(59, 130, 246, 0.12);
  
  --color-danger: #ef4444;
  --color-warning: #f59e0b;
  
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Cinzel', serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  padding-left: 72px;
  transition: padding-left 0.2s ease;
}

/* ==========================================================================
   ELEGANT EXPANDABLE SIDEBAR (MNEMOSINE & AS MUSAS)
   ========================================================================== */
.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 72px;
  background: rgba(13, 17, 23, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: width 0.26s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.26s ease;
  overflow-x: hidden;
  overflow-y: auto;
}

.app-sidebar:hover {
  width: 285px;
  box-shadow: 12px 0 40px rgba(0, 0, 0, 0.75);
}

.sidebar-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1.25rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  min-height: 70px;
}

.sidebar-logo {
  width: 34px;
  height: 34px;
  min-width: 34px;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.45));
}

.sidebar-brand-text {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.2s ease 0.04s, transform 0.2s ease 0.04s;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.app-sidebar:hover .sidebar-brand-text {
  opacity: 1;
  transform: translateX(0);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1rem 0.65rem;
  flex: 1;
}

.sidebar-nav .tab-btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  border: 1px solid transparent;
  background: transparent;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: all 0.18s ease;
  width: 100%;
  text-decoration: none;
}

.sidebar-nav .tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.05);
}

.sidebar-nav .tab-btn.active {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), rgba(245, 158, 11, 0.08));
  border: 1px solid rgba(59, 130, 246, 0.4);
  color: #60a5fa;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.15);
}

.tab-icon {
  font-size: 1.3rem;
  min-width: 32px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-label {
  display: inline-flex;
  align-items: baseline;
  gap: 0.45rem;
  font-size: 0.92rem;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  flex: 1;
}

.tab-label strong {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.94rem;
  letter-spacing: 0.03em;
  color: #f8fafc;
}

.tab-label small {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.sidebar-nav .tab-btn.active .tab-label strong {
  color: #fef08a;
}

.sidebar-nav .tab-btn.active .tab-label small {
  color: #93c5fd;
}

.app-sidebar:hover .tab-label {
  opacity: 1;
  transform: translateX(0);
}

.tab-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(59, 130, 246, 0.25);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.35);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.app-sidebar:hover .tab-badge {
  opacity: 1;
}

.sidebar-footer {
  padding: 0.9rem 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.user-avatar-badge {
  font-size: 1.35rem;
  min-width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-full);
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.app-sidebar:hover .sidebar-user-info {
  opacity: 1;
  transform: translateX(0);
}

.sidebar-user-info .user-name {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-user-info .user-role {
  font-size: 0.68rem;
  font-weight: 700;
  color: #f59e0b;
  letter-spacing: 0.05em;
}

/* Top Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.2;
}

.mnemosine-brand {
  background: linear-gradient(135deg, #ffffff 0%, #fef08a 25%, #f59e0b 65%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.1em;
  filter: drop-shadow(0 0 14px rgba(245, 158, 11, 0.4));
}

.hermes-brand {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.ampersand {
  color: rgba(255, 255, 255, 0.4);
  font-family: var(--font-sans);
  font-weight: 300;
  font-size: 0.85em;
}

.musa-brand {
  background: linear-gradient(135deg, #fef08a 0%, #f59e0b 50%, #d97706 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: 0.08em;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.35));
}

.brand-subtitle {
  font-size: 0.73rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-status-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.status-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-primary);
  box-shadow: 0 0 8px var(--color-primary);
}

/* Container */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Tab Content */
.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Section Toolbar */
.section-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 280px;
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.search-box input {
  width: 100%;
  padding: 0.65rem 1rem 0.65rem 2.4rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s ease;
}

.search-box input:focus {
  outline: none;
  border-color: var(--border-focus);
}

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

select {
  padding: 0.65rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}

select:focus {
  outline: none;
  border-color: var(--border-focus);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

.btn-primary {
  background: var(--color-primary);
  color: #042f20;
}

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

.btn-secondary {
  background: var(--bg-surface-elevated);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

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

.btn-danger {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--color-danger);
}

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

/* Contacts Grid */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.25rem;
}

.contact-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: var(--shadow-sm);
}

.contact-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.3);
  box-shadow: var(--shadow-md);
}

.contact-card.is-favorite {
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.03) 0%, var(--bg-surface) 100%);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.08);
}

.btn-favorite-icon {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.1rem 0.3rem;
  border-radius: var(--radius-sm);
  transition: transform 0.15s ease, filter 0.15s ease;
  line-height: 1;
}

.btn-favorite-icon:hover {
  transform: scale(1.2);
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.6));
}

.btn-favorite-icon.active {
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.5));
}

.contact-header {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.contact-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--bg-surface-elevated);
  border: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--color-primary);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

.contact-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-title-group {
  flex: 1;
  min-width: 0;
}

.contact-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-company {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-family {
  background: rgba(236, 72, 153, 0.15);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.3);
}

.badge-owner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25) 0%, rgba(217, 119, 6, 0.35) 100%);
  color: #fef08a;
  border: 1px solid rgba(251, 191, 36, 0.6);
  font-weight: 700;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  letter-spacing: 0.02em;
}

.badge-producer {
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.badge-executive {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-colleague {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-stakeholder {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-vendor {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

/* Sentiment Badges and Timeline */
.sentiment-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.sentiment-positive {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.3);
}

.sentiment-confident {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border-color: rgba(59, 130, 246, 0.3);
}

.sentiment-neutral {
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.25);
}

.sentiment-urgent {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}

.sentiment-anxious {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.3);
}

.sentiment-frustrated {
  background: rgba(217, 70, 239, 0.15);
  color: #e879f9;
  border-color: rgba(217, 70, 239, 0.3);
}

.sentiments-history {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.sentiment-pill {
  cursor: help;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.72rem;
  transition: transform 0.15s ease;
}

.sentiment-pill:hover {
  transform: scale(1.05);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.contact-phone-link {
  color: var(--color-primary);
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.contact-phone-link:hover {
  text-decoration: underline;
}

.contact-projects {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.3rem;
}

.project-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.contact-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.85rem;
  margin-top: auto;
}

/* Dictionary Grid */
.dictionary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
}

.dict-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

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

.dict-term {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
}

.dict-expansion {
  font-size: 0.88rem;
  color: var(--color-accent);
  font-weight: 500;
}

.dict-variations {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.variation-chip {
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-family: var(--font-mono);
}

.dict-desc {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Query Tab */
.query-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.card-header h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.query-input-group {
  display: flex;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem 0;
}

.query-input-group input {
  flex: 1;
  padding: 0.85rem 1.2rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
}

.query-input-group input:focus {
  outline: none;
  border-color: var(--border-focus);
}

.quick-prompts {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.btn-chip {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

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

.query-result-box {
  margin-top: 2rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.5rem;
}

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

.result-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
}

.result-meta {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Infra Grid */
.infra-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.stat-icon {
  font-size: 1.8rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-primary);
  margin: 0.15rem 0;
}

.stat-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.mt-4 {
  margin-top: 1.5rem;
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

.topology-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.flow-step {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  min-width: 140px;
  flex: 1;
}

.step-num {
  display: inline-block;
  width: 24px;
  height: 24px;
  background: var(--color-primary-subtle);
  color: var(--color-primary);
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.flow-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
}

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

.modal-header h3 {
  font-size: 1.2rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
}

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

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

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }

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

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

.form-group input,
.form-group textarea,
.form-group select {
  padding: 0.65rem 0.9rem;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--border-focus);
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-left: 4px solid var(--color-primary);
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s ease;
  z-index: 150;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* Graph Interactive Section */
.graph-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.graph-legend {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.graph-wrapper {
  position: relative;
  background: #060911;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 650px;
}

.graph-canvas {
  width: 100%;
  height: 100%;
}

.node-detail-panel {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 320px;
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(8px);
  padding: 1.25rem;
  z-index: 10;
  max-height: calc(100% - 2rem);
  overflow-y: auto;
}

.node-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.node-detail-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-primary);
}

.btn-close-sm {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
}

.node-detail-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Tasks Section */
.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.task-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: all 0.15s ease;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

.task-card:hover {
  border-color: rgba(14, 165, 233, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
}

.task-card.task-done {
  opacity: 0.65;
  background: rgba(255, 255, 255, 0.02);
  border-color: rgba(255, 255, 255, 0.08);
}

.task-card.task-done .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-card.task-cancelled {
  opacity: 0.55;
  background: rgba(239, 68, 68, 0.03);
  border-color: rgba(239, 68, 68, 0.15);
}

.task-card.task-cancelled .task-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.task-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.task-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
}

.task-requester-box {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(14, 165, 233, 0.2);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
}

.task-requester-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
  color: #fff;
}

.task-requester-name {
  font-weight: 700;
  color: var(--text-primary);
}

.task-source-context {
  font-size: 0.83rem;
  color: var(--text-muted);
  background: var(--bg-surface-elevated);
  border-left: 3px solid #64748b;
  padding: 0.45rem 0.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  line-height: 1.45;
}

.task-tags-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.35rem;
}

.task-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: rgba(14, 165, 233, 0.1);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.25);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.task-tag:hover {
  background: rgba(14, 165, 233, 0.22);
  border-color: #38bdf8;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.2);
}

.task-notes-section {
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.task-notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.task-notes-textarea {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
  padding: 0.5rem 0.75rem;
  resize: vertical;
  min-height: 55px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.task-notes-textarea:focus {
  border-color: var(--color-primary);
}

.task-notes-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
}

.task-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.task-meta-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Messages Feed */
.messages-feed {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.message-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.message-item:hover {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.message-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.message-speaker-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.message-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  text-transform: uppercase;
}

.message-speaker-name {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.message-speaker-name a {
  color: #25d366;
  text-decoration: none;
  font-size: 0.85rem;
  transition: opacity 0.15s;
}

.message-speaker-name a:hover {
  opacity: 0.8;
}

.message-badges {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.message-transcription-box {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.message-transcription-tabs {
  display: flex;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.transcription-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.transcription-tab-btn.active {
  color: var(--color-primary);
  background: rgba(14, 165, 233, 0.12);
}

.message-text {
  font-size: 0.94rem;
  color: var(--text-primary);
  line-height: 1.55;
  white-space: pre-wrap;
}

.message-raw-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
}

.message-summary {
  font-size: 0.86rem;
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.08);
  border-left: 3px solid var(--color-primary);
  padding: 0.6rem 0.85rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.message-meta-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 0.75rem;
}

.message-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.message-task-mini {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.message-entities-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.message-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  font-size: 0.74rem;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
}

/* Botões e Badges de Cadastro em Clio (Calíope -> Clio) */
.btn-clio-register {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(217, 119, 6, 0.28));
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.45);
  padding: 0.2rem 0.55rem;
  font-size: 0.73rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.18s ease;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.btn-clio-register:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.35), rgba(217, 119, 6, 0.5));
  color: #fef08a;
  border-color: rgba(245, 158, 11, 0.8);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.25);
}

.btn-clio-register-bar {
  background: rgba(245, 158, 11, 0.12) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35) !important;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: all 0.18s ease;
}

.btn-clio-register-bar:hover {
  background: rgba(245, 158, 11, 0.25) !important;
  color: #fef08a !important;
  border-color: rgba(245, 158, 11, 0.65) !important;
}

.badge-unrecognized {
  font-size: 0.72rem;
  background: rgba(245, 158, 11, 0.15) !important;
  color: #fbbf24 !important;
  border: 1px solid rgba(245, 158, 11, 0.35);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.message-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}


/* ==========================================================================
   Analytics & Dashboard Executivo
   ========================================================================== */

.analytics-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.25rem;
}

.analytics-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.filter-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-select {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.form-select:focus {
  border-color: var(--color-primary);
}

/* 5 Hero KPI Cards */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: transform 0.15s, border-color 0.15s;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(14, 165, 233, 0.35);
}

.kpi-icon {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.kpi-body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.kpi-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.kpi-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.kpi-sub {
  font-size: 0.74rem;
  color: #38bdf8;
}

/* Summary Banner */
.analytics-summary-banner {
  background: rgba(14, 165, 233, 0.07);
  border: 1px solid rgba(14, 165, 233, 0.2);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  font-size: 0.88rem;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

/* Charts Grid */
.analytics-charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 1.25rem;
}

.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

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

.chart-tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
}

.chart-canvas-wrapper {
  position: relative;
  height: 260px;
  width: 100%;
}

/* Heatmap Grid */
.heatmap-grid-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.heatmap-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.heatmap-day-label {
  width: 55px;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}

.heatmap-cell {
  flex: 1;
  min-width: 14px;
  height: 24px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.03);
  transition: transform 0.1s, opacity 0.1s;
  cursor: pointer;
}

.heatmap-cell:hover {
  transform: scale(1.15);
  z-index: 2;
}

.heatmap-hours-header {
  display: flex;
  margin-left: 55px;
  gap: 0.25rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.heatmap-hour-label {
  flex: 1;
  min-width: 14px;
  text-align: center;
}

/* WordMap Cloud */
.wordmap-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.legend-chip {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 12px;
  font-weight: 600;
}

.legend-gargalos { background: rgba(239, 68, 68, 0.18); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); }
.legend-agronegocio { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.35); }
.legend-zootecnia { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.35); }
.legend-logistica { background: rgba(249, 115, 22, 0.15); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.35); }
.legend-gestao { background: rgba(14, 165, 233, 0.15); color: #38bdf8; border: 1px solid rgba(14, 165, 233, 0.35); }
.legend-sistemas { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.35); }
.legend-tecnologia { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.35); }
.legend-pessoal { background: rgba(236, 72, 153, 0.15); color: #f472b6; border: 1px solid rgba(236, 72, 153, 0.35); }
.legend-operacoes { background: rgba(234, 179, 8, 0.15); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.35); }
.legend-temas { background: rgba(56, 189, 248, 0.12); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.25); }

/* Barra de Filtros Estratégicos por Pilar */
.wordmap-strategic-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.wordmap-filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 0.3rem 0.65rem;
  border-radius: 14px;
  font-size: 0.76rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.wordmap-filter-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.2);
}

.wordmap-filter-btn.active {
  background: rgba(245, 158, 11, 0.18);
  color: #fef08a;
  border-color: rgba(245, 158, 11, 0.5);
  font-weight: 600;
}

.wordmap-cloud-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.75rem;
  min-height: 200px;
  background: var(--bg-surface-elevated);
  border-radius: var(--radius-md);
}

.word-cloud-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
  user-select: none;
}

.word-cloud-tag.is-compound {
  border-width: 1.5px;
  box-shadow: 0 0 8px rgba(254, 240, 138, 0.15);
  font-weight: 700;
}

.word-cloud-tag:hover {
  transform: translateY(-3px) scale(1.06);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.word-tag-count {
  font-size: 0.75em;
  opacity: 0.85;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.12rem 0.45rem;
  border-radius: 10px;
}

/* =========================================================================
   Toggle Switch para Cartões de Contato (Permissão de Tarefas)
   ========================================================================= */
.toggle-tasks-wrapper {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.toggle-tasks-wrapper:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(14, 165, 233, 0.3);
}

.toggle-tasks-wrapper.active {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.4);
}

.toggle-switch-ui {
  position: relative;
  display: inline-block;
  width: 32px;
  height: 18px;
  flex-shrink: 0;
}

.toggle-switch-ui input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #334155;
  transition: 0.2s;
  border-radius: 18px;
}

.toggle-switch-slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 3px;
  bottom: 3px;
  background-color: #f8fafc;
  transition: 0.2s;
  border-radius: 50%;
}

.toggle-switch-ui input:checked + .toggle-switch-slider {
  background-color: #0ea5e9;
}

.toggle-switch-ui input:checked + .toggle-switch-slider:before {
  transform: translateX(14px);
}

.toggle-tasks-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.toggle-tasks-wrapper.active .toggle-tasks-label {
  color: #38bdf8;
}

/* =========================================================================
   Graph Controls & Filtros de Corte Temporal
   ========================================================================= */
.graph-filter-select, .graph-search-input {
  background: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  outline: none;
  transition: border-color 0.15s;
}

.graph-filter-select:focus, .graph-search-input:focus {
  border-color: var(--color-primary);
}

/* =========================================================================
   Task Accordion (Sanfona de Contexto Original "De quem foi ➔ Pra quem foi")
   ========================================================================= */
.task-accordion {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transition: border-color 0.15s;
}

.task-accordion:hover {
  border-color: rgba(14, 165, 233, 0.3);
}

.task-accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  text-align: left;
  font-family: inherit;
  flex-wrap: wrap;
  gap: 0.5rem;
  transition: background 0.15s;
}

.task-accordion-header:hover {
  background: rgba(255, 255, 255, 0.03);
}

.task-accordion-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
}

.accordion-chevron {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--color-primary);
  transition: transform 0.2s ease;
}

.accordion-chevron.expanded {
  transform: rotate(90deg);
}

.task-flow-pills {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.74rem;
  flex-wrap: wrap;
}

.flow-pill {
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.flow-pill.flow-from {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.flow-pill.flow-to {
  background: rgba(14, 165, 233, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(14, 165, 233, 0.25);
}

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

.task-accordion-content {
  border-top: 1px solid var(--border-subtle);
  padding: 0.85rem;
  background: rgba(15, 23, 42, 0.4);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  font-size: 0.83rem;
}

.task-participants-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0.5rem 0.75rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
}

.task-original-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.task-original-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.task-original-text {
  font-style: italic;
  line-height: 1.5;
  color: var(--text-primary);
  margin: 0;
}

.task-summary-callout {
  padding: 0.5rem 0.75rem;
  background: rgba(245, 158, 11, 0.08);
  border-left: 3px solid #f59e0b;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.8rem;
  color: #fde68a;
  line-height: 1.4;
}

/* ==========================================================================
   PAGINATION & LIMIT CONTROL BARS
   ========================================================================== */
.list-pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem 1.25rem;
  margin-top: 1.5rem;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.pagination-info {
  font-size: 0.86rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.pagination-info strong {
  color: var(--color-primary);
}

.pagination-controls-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pagination-select {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
}

.pagination-select:focus {
  border-color: var(--color-accent);
}

/* ==========================================================================
   PANTEÃO DE MNEMOSINE & LORE DAS MUSAS
   ========================================================================== */
.lore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}

.lore-card {
  background: linear-gradient(145deg, rgba(26, 35, 55, 0.9) 0%, rgba(17, 24, 39, 0.95) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.lore-card:hover {
  transform: translateY(-3px);
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.lore-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.lore-icon {
  font-size: 1.8rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
}

.lore-musa-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fef08a;
  margin: 0;
  letter-spacing: 0.04em;
}

.lore-musa-domain {
  font-size: 0.76rem;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.lore-card-body {
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.lore-card-body strong {
  display: block;
  color: var(--text-primary);
  font-size: 0.88rem;
  margin-bottom: 0.25rem;
}

/* ==============================================================================
   AUTH OVERLAY & LOGIN CARD (WhisperZap Access Protection)
   ============================================================================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 29, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.auth-card {
  background: #111827;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.8), 0 0 35px rgba(217, 119, 6, 0.15);
  animation: authCardIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.auth-image-frame {
  width: 92px;
  height: 92px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #fef08a, #d97706, #3b82f6);
  box-shadow: 0 0 25px rgba(217, 119, 6, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-mnemosine-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2px solid #0f172a;
}

.auth-title {
  font-family: 'Cinzel', serif;
  font-size: 1.45rem;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 0.12em;
  margin: 0 0 0.25rem 0;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.auth-greek-tagline {
  font-family: 'Cinzel', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fef08a;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 12px rgba(254, 240, 138, 0.45);
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1.5rem 0;
  line-height: 1.45;
}

.auth-input-wrapper {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.auth-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
  background: rgba(255, 255, 255, 0.08);
}

.auth-error-text {
  margin-top: 1rem;
  color: #f87171;
  font-size: 0.84rem;
  font-weight: 500;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ==========================================================================
   Euterpe Mini-Terminal & Sincronização de Contatos
   ========================================================================== */
.euterpe-terminal-screen {
  background: #060911;
  border: 1px solid #1a2337;
  border-radius: var(--radius-md);
  padding: 1.1rem 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #38bdf8;
  height: 280px;
  overflow-y: auto;
  line-height: 1.65;
  white-space: pre-wrap;
  box-shadow: inset 0 2px 12px rgba(0, 0, 0, 0.75);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.euterpe-terminal-screen .terminal-line {
  word-break: break-word;
}

.euterpe-terminal-screen .terminal-line.success {
  color: #10b981;
}

.euterpe-terminal-screen .terminal-line.error {
  color: #ef4444;
}

.euterpe-terminal-screen .terminal-line.warning {
  color: #f59e0b;
}

.euterpe-terminal-screen .terminal-line.info {
  color: #38bdf8;
}

/* ==========================================================================
   Euterpe Environments & Configuration Consoles Hub
   ========================================================================== */
.env-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.25rem;
}

.env-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(8px);
}

.env-card:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.env-card-header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.env-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.env-header-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.env-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.env-badge {
  font-size: 0.7rem;
  font-family: var(--font-mono);
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  width: fit-content;
}

.badge-active {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.env-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.env-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.25);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.env-meta span {
  display: flex;
  justify-content: space-between;
}

.env-meta strong {
  color: var(--text-secondary);
}

.env-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.env-btn {
  flex: 1;
  text-align: center;
  justify-content: center;
  white-space: nowrap;
  font-size: 0.78rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

@media (max-width: 768px) {
  .hide-mobile {
    display: none !important;
  }
  .garden-grid-responsive,
  .radar-grid-responsive {
    grid-template-columns: 1fr !important;
  }
}

/* ==========================================================================
   TERPSÍCORE: SUBNAV, VAULT, JARDIM DE REALIZAÇÕES & RADAR
   ========================================================================== */
.subnav-btn {
  border-radius: var(--radius-full);
  padding: 0.4rem 1rem;
  font-size: 0.82rem;
  transition: all 0.2s ease;
}

.subnav-btn.active {
  background: var(--color-primary);
  color: #090d16;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

.task-quick-actions {
  display: flex;
  gap: 0.35rem;
  align-items: center;
}

.btn-pill-action {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 0.2rem 0.6rem;
  font-size: 0.72rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.15s ease;
}

.btn-pill-action:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-primary);
}

.btn-pill-action.active-fav {
  background: rgba(234, 179, 8, 0.2);
  border-color: #eab308;
  color: #fef08a;
  font-weight: 600;
}

.btn-pill-action.active-epic {
  background: rgba(168, 85, 247, 0.2);
  border-color: #a855f7;
  color: #e9d5ff;
  font-weight: 600;
}

.btn-pill-action.active-idea {
  background: rgba(59, 130, 246, 0.2);
  border-color: #3b82f6;
  color: #bfdbfe;
  font-weight: 600;
}

.task-vault-highlight {
  background: rgba(234, 179, 8, 0.08);
  border: 1px solid rgba(234, 179, 8, 0.25);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.75rem;
  margin-top: 0.5rem;
  font-size: 0.78rem;
  color: #fef08a;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.garden-harvest-item-card {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  transition: transform 0.15s ease;
}

.garden-harvest-item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 185, 129, 0.4);
}

.garden-constellation-card {
  background: rgba(59, 130, 246, 0.05);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
}

.radar-insight-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.85rem;
  font-size: 0.82rem;
  line-height: 1.4;
}

/* ==========================================================================
   Central de Segurança & Botão FIDO2 / WebAuthn
   ========================================================================== */

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.2rem 0;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-subtle);
}

.auth-divider span {
  padding: 0 0.75rem;
  font-weight: 600;
}

.btn-fido2 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.8rem 1rem;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.25));
  border: 1px solid rgba(245, 158, 11, 0.4);
  color: #fef3c7;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.1);
}

.btn-fido2:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.4));
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.25);
  transform: translateY(-1px);
}

.btn-fido2:active {
  transform: translateY(0);
}

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

.fido2-status-text {
  margin-top: 0.75rem;
  font-size: 0.82rem;
  text-align: center;
  line-height: 1.4;
}

.security-modal-tabs .btn.active {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #bae6fd;
}


