:root {
  --bg-primary: #0d0f14;
  --bg-secondary: #161922;
  --bg-tertiary: #1e222c;
  --border-color: #2a2f3a;
  --text-primary: #eef0f3;
  --text-secondary: #98a1ad;
  --accent: #6366f1;
  --accent-2: #a855f7;
  --accent-hover: #7c7ff5;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --user-bubble: #2f3a4a;
  --assistant-bubble: #1c202a;
  --success: #22c55e;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 70px rgba(0, 0, 0, 0.5);
}

* {
  box-sizing: border-box;
}

/* A [hidden] attribútumnak mindig hatnia kell, még akkor is, ha egy elemnek osztály-alapú
   display:flex/grid szabálya van (különben az elem "hidden" állapotban is látszódna). */
[hidden] {
  display: none !important;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(99, 102, 241, 0.12), transparent),
    radial-gradient(1000px 500px at 100% 0%, rgba(168, 85, 247, 0.1), transparent),
    var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* Vékony, sötét témához illő scrollbar minden görgethető területen */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #3a4150;
}

.app {
  display: flex;
  height: calc(100vh - 24px);
  width: calc(100vw - 24px);
  margin: 12px auto;
  overflow: hidden;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

/* --- Sidebar --- */
.sidebar {
  width: 268px;
  flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
}

.sidebar-header {
  margin-bottom: 26px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  box-shadow: 0 6px 16px var(--accent-glow);
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.agent-list-division {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  padding: 16px 12px 6px;
}

.agent-list-division:first-child {
  padding-top: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease;
}

.nav-item:hover:not(:disabled) {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.12));
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.35);
}

.nav-item:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.nav-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.nav-avatar {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.nav-item span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-footer {
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* --- Chat area --- */
.chat {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-primary);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 26px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.chat-header h1 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.1px;
}

.chat-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.knowledge-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-xl);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.knowledge-badge:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--text-primary);
}

.social-connect-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid #315a9f;
  border-radius: var(--radius-sm);
  background: rgba(24, 119, 242, 0.12);
  color: #b9d7ff;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.social-connect-button:hover {
  background: rgba(24, 119, 242, 0.2);
  color: white;
}

.facebook-mark {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #1877f2;
  color: white;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 16px;
  flex-shrink: 0;
}

.social-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 6, 10, 0.76);
  backdrop-filter: blur(6px);
}

.social-modal-panel {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-lg);
}

.social-modal-header,
.social-provider-heading,
.redirect-uri-row,
.facebook-connection-row {
  display: flex;
  align-items: center;
}

.social-modal-header {
  justify-content: space-between;
  margin-bottom: 22px;
}

.social-modal-eyebrow {
  margin: 0 0 5px;
  color: #7fb2ff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.social-modal-header h2,
.social-provider h3 {
  margin: 0;
  letter-spacing: 0;
}

.social-modal-header h2 { font-size: 20px; }
.social-provider h3 { font-size: 15px; }

.social-modal-close {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
}

.social-provider {
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.social-provider-heading { gap: 12px; }
.social-provider-heading p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.facebook-mark-large {
  width: 38px;
  height: 38px;
  font-size: 32px;
  line-height: 35px;
}

.facebook-setup {
  margin: 20px 0;
  padding: 16px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.facebook-setup label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.redirect-uri-row { gap: 8px; }
.redirect-uri-row code {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: #b9d7ff;
  font-size: 12px;
}

.facebook-setup > p {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.facebook-connections { margin: 18px 0; }
.facebook-connection-row {
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-color);
}

.facebook-connection-row strong,
.facebook-connection-row span { display: block; }
.facebook-connection-row strong { font-size: 13px; }
.facebook-connection-row span {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 11px;
}

.facebook-connect-action {
  width: 100%;
  gap: 8px;
  margin-top: 8px;
  background: #1877f2;
  color: white;
}

.facebook-connect-action:hover { background: #0f69d9; }
.facebook-connect-action.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.social-feedback {
  margin-bottom: 18px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.social-feedback.is-success {
  border: 1px solid #237a46;
  background: #153522;
  color: #86efac;
}

.social-feedback.is-error {
  border: 1px solid #7f2d2d;
  background: #34181a;
  color: #fca5a5;
}

.chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-xl);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-color);
  font-size: 12px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.status-indicator__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-indicator__label {
  white-space: nowrap;
}

.status-indicator.status--online .status-indicator__dot {
  background: #22c55e;
  animation: status-pulse-online 2s ease-in-out infinite;
}

.status-indicator.status--online .status-indicator__label {
  color: #22c55e;
}

.status-indicator.status--processing .status-indicator__dot {
  background: #f59e0b;
  animation: status-pulse-processing 1.1s ease-in-out infinite;
}

.status-indicator.status--processing .status-indicator__label {
  color: #f59e0b;
}

.status-indicator.status--error .status-indicator__dot {
  background: #ef4444;
  box-shadow: 0 0 8px rgba(239, 68, 68, 0.55);
}

.status-indicator.status--error .status-indicator__label {
  color: #ef4444;
}

.status-indicator.status--idle .status-indicator__dot {
  background: #6b7280;
}

.status-indicator.status--idle .status-indicator__label {
  color: #6b7280;
}

@keyframes status-pulse-online {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@keyframes status-pulse-processing {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.82); }
}

@media (max-width: 480px) {
  .status-indicator__label {
    display: none;
  }

  .status-indicator {
    padding: 8px;
  }
}

.chat-window {
  flex: 1;
  overflow-y: auto;
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.message {
  display: flex;
  max-width: 720px;
}

.message.user {
  align-self: flex-end;
  justify-content: flex-end;
}

.message.assistant {
  align-self: flex-start;
  align-items: flex-end;
  gap: 8px;
}

.message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.bubble {
  padding: 12px 17px;
  border-radius: var(--radius-lg);
  line-height: 1.55;
  font-size: 14.5px;
  white-space: pre-wrap;
  word-break: break-word;
  box-shadow: var(--shadow-sm);
}

.message.user .bubble {
  background: linear-gradient(135deg, var(--accent), #8b5cf6);
  color: white;
  border-bottom-right-radius: 6px;
  box-shadow: 0 8px 20px var(--accent-glow);
}

.message.assistant .bubble {
  background: var(--assistant-bubble);
  border: 1px solid var(--border-color);
  border-bottom-left-radius: 6px;
}

.message.error .bubble {
  background: #34181a;
  border: 1px solid #7f2d2d;
  color: #fca5a5;
}

/* Typing indicator */
.typing-indicator .bubble {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
}

.typing-indicator .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-secondary);
  animation: blink 1.4s infinite both;
}

.typing-indicator .dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-indicator .dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes blink {
  0%, 80%, 100% { opacity: 0.25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

/* --- Input bar --- */
.chat-input-bar {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 18px 26px 22px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-primary);
}

#chat-input {
  flex: 1;
  resize: none;
  max-height: 160px;
  padding: 13px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

#chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

#send-button {
  padding: 13px 22px;
  border-radius: var(--radius-lg);
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px var(--accent-glow);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

#send-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px var(--accent-glow);
}

#send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .app {
    margin: 0;
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border: none;
  }

  .chat-window {
    padding: 16px;
  }

  .chat-input-bar {
    padding: 12px 16px 16px;
  }

  .message {
    max-width: 90%;
  }

  .chat-header {
    padding: 12px 16px;
  }

  .chat-header-left { gap: 8px; }
  .social-connect-button span:last-child { display: none; }
  .social-connect-button { padding: 7px; }
  .knowledge-badge > span:first-child { font-size: 0; }
  .knowledge-badge > span:first-child::after { content: "📚"; font-size: 15px; }
}

@media (max-width: 520px) {
  .social-modal { padding: 0; }
  .social-modal-panel {
    max-height: 100vh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    padding: 22px 16px;
  }
  .redirect-uri-row { align-items: stretch; flex-direction: column; }
}

/* --- Shared buttons & links --- */
a {
  color: inherit;
  text-decoration: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  box-shadow: 0 8px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px var(--accent-glow);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--border-color);
  color: var(--text-primary);
}

.btn-outline:hover {
  background: var(--bg-tertiary);
  transform: translateY(-1px);
}

.btn-large {
  padding: 15px 30px;
  font-size: 16px;
  border-radius: var(--radius-lg);
}

.btn-small {
  padding: 7px 14px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-full {
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.user-email {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 10px;
  word-break: break-all;
}

/* --- Landing page --- */
.landing {
  height: auto;
  overflow-y: auto;
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  background: rgba(13, 15, 20, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
}

.navbar-actions {
  display: flex;
  gap: 12px;
}

.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 110px 24px 64px;
  text-align: center;
}

.hero h1 {
  font-size: 44px;
  line-height: 1.18;
  margin: 0 0 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--text-primary), #c7c9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 16.5px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0 0 40px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.features {
  max-width: 980px;
  margin: 0 auto;
  padding: 40px 24px 110px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 30px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(99, 102, 241, 0.35);
}

.feature-icon {
  font-size: 30px;
  display: block;
  margin-bottom: 14px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

.landing-footer {
  text-align: center;
  padding: 26px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 13px;
}

@media (max-width: 768px) {
  .navbar {
    padding: 14px 20px;
  }

  .hero {
    padding: 64px 20px 40px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .features {
    grid-template-columns: 1fr;
    padding: 20px 20px 64px;
  }
}

/* --- Auth pages (login / register) --- */
.auth-page {
  height: auto;
  min-height: 100vh;
  overflow-y: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.auth-card-wide {
  max-width: 660px;
}

.auth-logo {
  justify-content: center;
  margin-bottom: 22px;
}

.auth-card h1 {
  font-size: 21px;
  font-weight: 700;
  text-align: center;
  margin: 0 0 26px;
}

.form-section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 26px 0 14px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-row .form-group {
  flex: 1;
  min-width: 0;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

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

.radio-group {
  border: none;
  padding: 0;
  display: flex;
  gap: 22px;
}

.radio-group legend {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  padding: 0;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  cursor: pointer;
}

.radio-option input[type="radio"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.field-section {
  margin-bottom: 4px;
}

.form-error {
  background: #34181a;
  border: 1px solid #7f2d2d;
  color: #fca5a5;
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-size: 13px;
  margin-bottom: 16px;
}

.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-secondary);
  margin: 22px 0 0;
}

.auth-switch a {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .auth-card {
    padding: 26px 20px;
    border-radius: var(--radius-lg);
  }
}

/* --- Agent tooltip rendszer --- */
.tooltip {
  position: fixed;
  z-index: 1000;
  max-width: 260px;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  padding: 12px 14px;
  opacity: 0;
  transform: translateY(4px) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
  pointer-events: none;
}

.tooltip--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.agent-tooltip__title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.agent-tooltip__description {
  margin: 0 0 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
}

.agent-tooltip__badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

@media (max-width: 480px) {
  .tooltip {
    max-width: 200px;
  }
}

/* --- Quick Prompts (gyors indítás) --- */
.quick-prompts {
  max-width: 640px;
  width: 100%;
  align-self: center;
  margin: 12px auto 0;
  padding: 8px 4px;
  text-align: center;
  animation: quick-prompts-in 0.35s ease both;
}

@keyframes quick-prompts-in {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.quick-prompts__title {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px;
}

.quick-prompts__subtitle {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: 0 0 20px;
}

.quick-prompts__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.quick-prompt-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.quick-prompt-card:hover {
  transform: scale(1.03);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25), 0 8px 20px rgba(99, 102, 241, 0.18);
}

.quick-prompt-card:active {
  transform: scale(0.98);
}

.quick-prompt-card__icon {
  font-size: 18px;
  flex-shrink: 0;
}

.quick-prompt-card__label {
  line-height: 1.35;
}

@media (max-width: 640px) {
  .quick-prompts__grid {
    grid-template-columns: 1fr;
  }
}

/* --- Knowledge Base modal --- */
.kb-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  padding: 24px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.kb-overlay--visible {
  opacity: 1;
}

.kb-overlay--visible .kb-modal {
  opacity: 1;
  transform: scale(1);
}

.kb-modal {
  width: 100%;
  max-width: 720px;
  max-height: min(80vh, 760px);
  display: flex;
  flex-direction: column;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.kb-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid #374151;
}

.kb-modal__header h2 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.kb-modal__agent-name {
  color: var(--text-secondary);
  font-weight: 500;
}

.kb-modal__subtitle {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 480px;
}

.kb-close {
  background: transparent;
  border: 1px solid #374151;
  color: var(--text-secondary);
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

.kb-close:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
}

.kb-modal__body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.kb-dropzone {
  border: 2px dashed #374151;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  transition: border-color 0.15s ease, background 0.15s ease;
  margin-bottom: 16px;
}

.kb-dropzone--active {
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

.kb-dropzone__text {
  margin: 0 0 4px;
  font-size: 14.5px;
  font-weight: 600;
}

.kb-dropzone__hint {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

.kb-upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.kb-upload-progress__bar {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.kb-upload-progress__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}

.kb-upload-progress__label {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.kb-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.kb-search {
  flex: 1;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  border: 1px solid #374151;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
}

.kb-search:focus {
  border-color: var(--accent);
}

.kb-sort {
  padding: 9px 10px;
  border-radius: var(--radius-md);
  border: 1px solid #374151;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
}

.kb-bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  font-size: 13px;
}

.kb-document-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kb-doc-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.15s ease, transform 0.2s ease, opacity 0.2s ease;
  animation: kb-card-in 0.25s ease both;
}

.kb-doc-card:hover {
  background: rgba(255, 255, 255, 0.05);
}

@keyframes kb-card-in {
  from {
    opacity: 0;
    transform: translateX(-12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.kb-doc-card__checkbox {
  flex-shrink: 0;
}

.kb-doc-card__icon {
  font-size: 22px;
  flex-shrink: 0;
}

.kb-doc-card__info {
  flex: 1;
  min-width: 0;
}

.kb-doc-card__name {
  font-size: 14px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kb-doc-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-secondary);
}

.kb-doc-card__error {
  margin-top: 4px;
  font-size: 12px;
  color: #fca5a5;
}

.kb-status--ready {
  color: #22c55e;
}

.kb-status--error {
  color: #ef4444;
}

.kb-status--uploading,
.kb-status--indexing {
  color: #f59e0b;
}

.kb-doc-card__actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.kb-icon-btn {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: background 0.15s ease, color 0.15s ease;
}

.kb-icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

.kb-rename-input {
  width: 100%;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
}

.kb-empty {
  text-align: center;
  padding: 40px 20px;
}

.kb-empty__icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.kb-empty__title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 4px;
}

.kb-empty__subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 16px;
}

.kb-no-results {
  text-align: center;
  color: var(--text-secondary);
  font-size: 13.5px;
  padding: 24px 0;
}

.kb-modal__footer {
  padding: 14px 24px;
  border-top: 1px solid #374151;
}

.kb-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--text-secondary);
}

@media (max-width: 640px) {
  .kb-modal {
    max-height: 90vh;
  }

  .kb-toolbar {
    flex-direction: column;
  }

  .chat-header-left {
    gap: 8px;
  }

  .knowledge-badge {
    padding: 5px 9px;
    font-size: 11.5px;
  }
}

/* ==========================================================================
   Dashboard / AI Workforce shell - megosztott sidebar + topbar + widgetek
   ========================================================================== */

:root {
  --accent-blue: #3b82f6;
}

/* --- Sidebar: felső nav elemek (Dashboard / Lizi) + kollapszálható kategóriák --- */
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-close,
.sidebar-open {
  display: none;
  border: none;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  cursor: pointer;
}

.nav-item--top {
  width: 100%;
  margin-bottom: 4px;
}

.nav-item--general {
  gap: 10px;
}

.nav-item--general .nav-avatar {
  width: 26px;
  height: 26px;
}

.nav-item__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.nav-item__title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
}

.nav-item__subtitle {
  font-size: 11px;
  color: var(--text-secondary);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot--online {
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.18);
}

.agent-list-section__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.agent-list-division--toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
}

.agent-list-division__chevron {
  transition: transform 0.15s ease;
  color: var(--text-secondary);
}

.agent-list-division--toggle.is-collapsed .agent-list-division__chevron {
  transform: rotate(-90deg);
}

.agent-list-division--toggle:focus-visible,
.nav-item:focus-visible,
.btn:focus-visible,
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* --- Mobil sidebar drawer --- */
.sidebar-scrim {
  position: fixed;
  inset: 0;
  z-index: 190;
  background: rgba(4, 6, 10, 0.6);
  backdrop-filter: blur(2px);
}

@media (max-width: 768px) {
  .app--dashboard,
  .app {
    width: 100vw;
  }

  .sidebar-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .app .sidebar,
  .app--dashboard .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 200;
    width: min(300px, 84vw);
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    display: flex;
  }

  .sidebar.sidebar--open {
    transform: translateX(0);
  }

  .sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* --- Dashboard page layout --- */
.app--dashboard {
  display: flex;
  align-items: stretch;
}

.dashboard-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-primary);
  min-height: 100%;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 15, 20, 0.85);
  backdrop-filter: blur(10px);
}

.topbar-search {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

.topbar-search input {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.topbar-icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 15px;
  cursor: pointer;
}

.topbar-icon-button__badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent-2);
  color: white;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

.topbar-profile {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 180px;
}

.topbar-profile__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 700;
  font-size: 13px;
}

.topbar-profile__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.topbar-profile__name {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-profile__role {
  font-size: 11px;
  color: var(--text-secondary);
}

.dashboard-content {
  flex: 1;
  overflow-y: auto;
  padding: 26px 26px 140px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.dashboard-main-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
  min-width: 0;
}

.dashboard-side-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* --- Welcome section --- */
.welcome-section {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.welcome-section h1 {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.welcome-subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14.5px;
}

.welcome-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.connected-platform-icons {
  display: flex;
  gap: 6px;
}

/* --- Stat cards --- */
.workforce-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: var(--shadow-sm);
}

.stat-card__icon {
  font-size: 22px;
  margin-bottom: 6px;
}

.stat-card__value {
  font-size: 28px;
  font-weight: 800;
}

.stat-card__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-card__info {
  font-size: 12px;
  color: var(--text-secondary);
}

.skeleton-card,
.skeleton-agent-card {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: linear-gradient(100deg, var(--bg-secondary) 30%, var(--bg-tertiary) 50%, var(--bg-secondary) 70%);
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

.skeleton-card { height: 108px; }
.skeleton-agent-card { height: 190px; min-width: 220px; }

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* --- Dashboard sections --- */
.dashboard-section__title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
}

/* --- Quick actions --- */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 16px;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.quick-action-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-sm);
}

.quick-action-card__icon {
  font-size: 22px;
}

.quick-action-card__title {
  font-size: 14px;
  font-weight: 700;
}

.quick-action-card__description {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
}

/* --- AI Team --- */
.ai-team-row {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.agent-card {
  flex: 0 0 220px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.agent-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: var(--shadow-sm);
}

.agent-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.agent-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.agent-card__avatar--initial {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 700;
}

.agent-card__name {
  margin: 4px 0 0;
  font-size: 14.5px;
  font-weight: 700;
}

.agent-card__role {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
}

.agent-card__description {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.45;
  flex: 1;
}

.agent-card__chat-button {
  margin-top: 8px;
  width: 100%;
}

/* --- Side panels: connected platforms + knowledge widget --- */
.side-panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.connected-platforms-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.platform-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.platform-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  color: white;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.platform-mark--instagram { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.platform-mark--linkedin { background: #0a66c2; }
.platform-mark--x { background: #0f1419; border: 1px solid var(--border-color); }

.platform-row__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.platform-row__text strong {
  font-size: 13px;
}

.platform-row__subtitle {
  font-size: 11.5px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-row__status {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.platform-row__status.is-connected {
  color: var(--success);
  font-weight: 600;
}

.knowledge-widget__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
  border-bottom: 1px solid var(--border-color);
}

.knowledge-widget__row:last-of-type {
  border-bottom: none;
}

.knowledge-widget__open {
  width: 100%;
  margin-top: 12px;
}

.knowledge-widget__loading,
.knowledge-widget__error,
.connected-platforms-list__loading {
  font-size: 13px;
  color: var(--text-secondary);
}

.knowledge-badge--sidebar {
  width: 100%;
  justify-content: center;
  margin-bottom: 12px;
}

/* --- Sticky global AI input --- */
.global-input-bar {
  position: sticky;
  bottom: 0;
  padding: 14px 26px 20px;
  border-top: 1px solid var(--border-color);
  background: rgba(13, 15, 20, 0.92);
  backdrop-filter: blur(10px);
}

.global-input-bar__prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  max-width: 1440px;
  margin-inline: auto;
}

.prompt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.prompt-chip:hover {
  background: rgba(99, 102, 241, 0.14);
  border-color: rgba(99, 102, 241, 0.35);
  color: var(--text-primary);
}

.global-input-bar__row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 1440px;
  margin-inline: auto;
}

.global-input-bar__attach {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: not-allowed;
}

#global-input {
  flex: 1;
  resize: none;
  max-height: 160px;
  padding: 13px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

#global-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.global-input-bar__send {
  flex-shrink: 0;
}

/* --- Responsive: dashboard --- */
@media (max-width: 1024px) {
  .dashboard-content {
    grid-template-columns: 1fr;
  }

  .dashboard-side-column {
    order: 3;
  }

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

@media (max-width: 768px) {
  .topbar-search {
    max-width: none;
  }

  .topbar-profile__text {
    display: none;
  }

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

  .dashboard-content {
    padding: 18px 16px 150px;
  }
}

@media (max-width: 480px) {
  .workforce-stats {
    grid-template-columns: 1fr;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .welcome-section h1 {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Ikon-badge szín-rendszer - stat kártyák, gyors műveletek, sidebar és AI csapat ikonjaihoz
   ========================================================================== */

.icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  font-size: 19px;
  margin-bottom: 4px;
  flex-shrink: 0;
}

.icon-badge--purple { background: rgba(99, 102, 241, 0.16); color: #a5aaff; }
.icon-badge--blue { background: rgba(59, 130, 246, 0.16); color: #93c5fd; }
.icon-badge--green { background: rgba(34, 197, 94, 0.16); color: #86efac; }
.icon-badge--orange { background: rgba(249, 115, 22, 0.16); color: #fdba74; }
.icon-badge--pink { background: rgba(236, 72, 153, 0.16); color: #f9a8d4; }

.stat-card__info--purple { color: #a5aaff; }
.stat-card__info--blue { color: #93c5fd; }
.stat-card__info--green { color: #86efac; }
.stat-card__info--orange { color: #fdba74; }

.nav-icon-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  flex-shrink: 0;
}

.nav-icon-badge--purple { background: rgba(99, 102, 241, 0.18); }
.nav-icon-badge--blue { background: rgba(59, 130, 246, 0.18); }
.nav-icon-badge--green { background: rgba(34, 197, 94, 0.18); }
.nav-icon-badge--orange { background: rgba(249, 115, 22, 0.18); }
.nav-icon-badge--pink { background: rgba(236, 72, 153, 0.18); }

.agent-card__avatar--purple,
.agent-card__avatar--blue,
.agent-card__avatar--green,
.agent-card__avatar--orange,
.agent-card__avatar--pink {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.agent-card__avatar--purple { background: rgba(99, 102, 241, 0.18); color: #a5aaff; }
.agent-card__avatar--blue { background: rgba(59, 130, 246, 0.18); color: #93c5fd; }
.agent-card__avatar--green { background: rgba(34, 197, 94, 0.18); color: #86efac; }
.agent-card__avatar--orange { background: rgba(249, 115, 22, 0.18); color: #fdba74; }
.agent-card__avatar--pink { background: rgba(236, 72, 153, 0.18); color: #f9a8d4; }

/* --- Topbar: keyboard shortcut hint + profile dropdown --- */
.topbar-search__shortcut {
  padding: 2px 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 11px;
}

.topbar-profile-wrapper {
  position: relative;
}

.topbar-profile {
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 200px;
  padding: 4px;
  border-radius: var(--radius-md);
}

.topbar-profile:hover {
  background: var(--bg-tertiary);
}

.topbar-profile__chevron {
  color: var(--text-secondary);
  font-size: 12px;
}

.topbar-profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 220px;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-md);
  z-index: 30;
}

.topbar-profile-menu__email {
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
}

.topbar-profile-menu__logout {
  width: 100%;
  padding: 8px 10px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.topbar-profile-menu__logout:hover {
  background: var(--bg-tertiary);
}

/* --- Dashboard section headers with a secondary action link --- */
.dashboard-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dashboard-section__header .dashboard-section__title {
  margin: 0;
}

.side-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.side-panel__header .dashboard-section__title {
  margin: 0 0 2px;
}

.side-panel__subtitle {
  margin: 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.side-panel__link {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--accent-blue);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.side-panel__link:hover {
  text-decoration: underline;
}

/* --- Connected platform icon stack (welcome section) --- */
.connected-platform-icons__item {
  border: 2px solid var(--bg-primary);
}

/* --- Knowledge widget: summary + real progress bar --- */
.knowledge-widget__summary {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.knowledge-widget__summary strong {
  font-size: 13.5px;
  display: block;
}

.knowledge-widget__updated {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.knowledge-widget__progress {
  margin-bottom: 14px;
}

.knowledge-widget__progress-bar {
  height: 6px;
  border-radius: 3px;
  background: var(--bg-tertiary);
  overflow: hidden;
}

.knowledge-widget__progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success), #4ade80);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.knowledge-widget__progress-label {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* --- Global input: pill shape matching the reference design --- */
.global-input-bar__pill {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 1440px;
  margin-inline: auto;
  padding: 8px 8px 8px 16px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.global-input-bar__pill:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.global-input-bar__sparkle {
  padding-bottom: 12px;
  font-size: 16px;
}

.global-input-bar__pill #global-input {
  border: none;
  background: transparent;
  box-shadow: none;
  padding: 12px 0;
}

.global-input-bar__pill #global-input:focus {
  border: none;
  box-shadow: none;
}

.global-input-bar__attach {
  width: 40px;
  height: 40px;
}


