:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --panel: #ffffff;
  --ink: #192033;
  --muted: #687084;
  --line: #dfe4ee;
  --accent: #0f8b8d;
  --accent-dark: #0b686a;
  --coral: #e86f51;
  --green: #2d9b68;
  --shadow: 0 20px 60px rgba(25, 32, 51, 0.11);
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111827;
  --panel: #1f2937;
  --ink: #f3f4f6;
  --muted: #9ca3af;
  --line: #374151;
  --accent: #22d3ee;
  --accent-dark: #06b6d4;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px;
  background: #18212f;
  color: #fff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--accent);
  font-weight: 800;
}

.brand h1,
.brand p,
.view-header h2,
.view-header p {
  margin: 0;
}

.brand h1 {
  font-size: 1.25rem;
}

.brand p {
  color: #aeb8c9;
  margin-top: 3px;
}

.nav-tabs {
  display: grid;
  gap: 10px;
}

.sidebar-model {
  display: grid;
  gap: 5px;
}

.sidebar-model-label {
  color: #aeb8c9;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-model-select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.sidebar-model-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.3);
}

.sidebar-model-select option {
  background: #1a2332;
  color: #fff;
}

.tab {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  padding: 12px 14px;
  color: #dce3ef;
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
}

.tab.active {
  background: #fff;
  color: var(--ink);
}

[data-theme="dark"] .tab.active {
  background: var(--accent);
  color: #fff;
}

.status-panel {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: auto;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  position: relative;
}

[data-theme="dark"] .status-panel {
  background: rgba(255, 255, 255, 0.05);
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(45, 155, 104, 0.18);
}

.status-panel p {
  margin: 2px 0 0;
  color: #aeb8c9;
  font-size: 0.9rem;
}

.theme-toggle {
  margin-left: auto;
  border: 0;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  line-height: 1;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}

.workspace {
  padding: 30px;
  min-width: 0;
}

.view {
  display: none;
  height: calc(100vh - 60px);
}

.view.active {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.view-header h2 {
  margin-top: 4px;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
}

.chat-layout,
.knowledge-grid {
  min-height: 0;
  flex: 1;
}

.chat-layout {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.messages {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 22px;
  overflow: auto;
}

.message {
  width: min(760px, 92%);
  padding: 14px 16px;
  border-radius: 8px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.message.user {
  align-self: flex-end;
  background: var(--accent);
  color: #fff;
}

.message.assistant {
  align-self: flex-start;
  background: #eef3f7;
}

[data-theme="dark"] .message.assistant {
  background: #1e293b;
}

.message.assistant.thinking::after {
  content: "мисля...";
  animation: thinkingDots 1.2s steps(4, end) infinite;
  color: var(--muted);
  font-style: italic;
  font-size: 1.1rem;
  font-weight: 600;
}

@keyframes thinkingDots {
  0% { content: "мисля"; }
  25% { content: "мисля."; }
  50% { content: "мисля.."; }
  75% { content: "мисля..."; }
}

.message.tool-msg {
  align-self: flex-start;
  background: #fff3e0;
  color: #6d4c00;
  font-size: 0.82rem;
  font-style: italic;
  padding: 8px 12px;
}

[data-theme="dark"] .message.tool-msg {
  background: #2d2410;
  color: #f5c542;
}

.message h2, .message h3, .message h4 { margin: 0.5em 0 0.3em; line-height: 1.3; }
.message h2 { font-size: 1.2rem; }
.message h3 { font-size: 1.05rem; }
.message p { margin: 4px 0; }
.message ul, .message ol { margin: 4px 0; padding-left: 20px; }
.message li { margin: 2px 0; }
.message code { background: rgba(0,0,0,0.08); padding: 2px 5px; border-radius: 3px; font-size: 0.9em; }
.message pre { background: #1e293b; color: #e2e8f0; padding: 12px; border-radius: 6px; overflow-x: auto; margin: 8px 0; font-size: 0.85rem; }
.message pre code { background: none; padding: 0; }
.message blockquote { border-left: 3px solid var(--accent); padding-left: 12px; margin: 8px 0; color: var(--muted); }
.message strong { font-weight: 700; }
.message em { font-style: italic; }

.copy-btn {
  position: absolute;
  top: 6px;
  right: 8px;
  border: 0;
  border-radius: 4px;
  padding: 2px 6px;
  background: rgba(0,0,0,0.06);
  cursor: pointer;
  font-size: 0.85rem;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.copy-btn:hover { opacity: 1; background: rgba(0,0,0,0.12); }
.message.user .copy-btn { display: none; }

[data-theme="dark"] .copy-btn { background: rgba(255,255,255,0.1); }
[data-theme="dark"] .copy-btn:hover { background: rgba(255,255,255,0.2); }

.msg-img {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  margin: 8px 0;
  display: block;
  cursor: pointer;
  transition: transform 0.15s;
}

.msg-img:hover {
  transform: scale(1.02);
}

.msg-img-error {
  min-width: 220px;
  min-height: 72px;
  padding: 12px;
  border: 1px dashed var(--border);
  background: var(--bg-card);
  color: var(--muted);
  object-fit: contain;
}

.sources {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.source {
  border-left: 3px solid var(--accent);
  padding-left: 9px;
  color: var(--muted);
  font-size: 0.88rem;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.source-img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.composer {
  display: grid;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  background: #fbfcff;
}

[data-theme="dark"] .composer {
  background: #1a2332;
}

.composer-row {
  display: flex;
  align-items: center;
}

.model-select-inline {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 600;
  max-width: 260px;
  cursor: pointer;
}

.model-select-inline:focus {
  outline: 3px solid rgba(15, 139, 141, 0.18);
  border-color: var(--accent);
}

.composer-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.composer-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.voice-button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 12px;
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  min-height: 40px;
}

.voice-button.recording {
  background: var(--coral);
  color: #fff;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

textarea,
input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 13px;
  resize: vertical;
  color: var(--ink);
  background: var(--panel);
}

textarea:focus,
input:focus {
  outline: 3px solid rgba(15, 139, 141, 0.18);
  border-color: var(--accent);
}

.primary-button,
.ghost-button,
.danger-button,
.composer button,
.success-modal button {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 800;
}

.primary-button,
.composer button[type="submit"] {
  background: var(--accent);
  color: #fff;
}

.primary-button:hover,
.composer button[type="submit"]:hover {
  background: var(--accent-dark);
}

.composer button[type="submit"] {
  background: linear-gradient(135deg, #0f8b8d, #0b686a);
  box-shadow: 0 2px 8px rgba(15, 139, 141, 0.3);
  min-width: 100px;
}

.agent-send {
  border: 0;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 800;
  background: linear-gradient(135deg, #0f8b8d, #0b686a);
  box-shadow: 0 2px 8px rgba(15, 139, 141, 0.3);
  color: #fff;
  cursor: pointer;
  min-width: 100px;
}

.agent-send:hover { background: var(--accent-dark); }

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}

.danger-button {
  background: #fff1ee;
  color: #a9341e;
}

.knowledge-grid {
  display: grid;
  grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
  gap: 18px;
  min-height: 0;
}

.knowledge-sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
}

.doc-search {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.85rem;
}

.bulk-bar {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: #fef3cd;
  border-radius: 8px;
  border: 1px solid #f5c542;
}

.bulk-bar button {
  font-size: 0.78rem;
  min-height: 30px;
  padding: 0 10px;
}

.category-manager {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 12px;
}

.category-manager h4 {
  margin: 0 0 8px;
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.cat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}

.cat-row.cat-active {
  background: rgba(15, 139, 141, 0.08);
  margin: 0 -12px;
  padding: 5px 12px;
  border-radius: 4px;
}

.cat-name {
  cursor: pointer;
  flex: 1;
}

.cat-name:hover {
  color: var(--accent);
}

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

.cat-delete {
  border: 0;
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 0.72rem;
  color: var(--coral);
  background: none;
  cursor: pointer;
}

.cat-delete:hover { background: #fff1ee; }

.cat-count {
  color: var(--muted);
  font-size: 0.72rem;
  margin-left: 6px;
}

.document-list,
.editor,
.upload-panel,
.crawler-panel,
.quick-text-panel {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.document-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
}

.doc-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--panel);
  text-align: left;
}

.doc-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 139, 141, 0.14);
}

.doc-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.doc-check {
  width: auto;
  margin-top: 14px;
  align-self: flex-start;
  accent-color: var(--accent);
  transform: scale(1.2);
}

.doc-row .doc-card {
  flex: 1;
}

.doc-card strong {
  display: block;
  margin-bottom: 6px;
}

.doc-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.knowledge-tools {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
  height: 100%;
}

/* Sub-navigation inside Knowledge Tools */
.tools-nav {
  display: flex;
  gap: 6px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin-bottom: 2px;
}

.tool-tab {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.tool-tab:hover {
  color: var(--ink);
  background: #f1f3f7;
  border-color: #cbd5e1;
}

[data-theme="dark"] .tool-tab:hover {
  background: #283141;
  border-color: #475569;
}

.tool-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.tool-tab.active:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* Visibility toggling for the tool panels */
.tool-panel {
  display: none !important;
}

.upload-panel.tool-panel.active,
.crawler-panel.tool-panel.active {
  display: grid !important;
  align-content: start; /* Prevent vertical stretching of inputs and buttons */
  flex: 1;
  min-height: 0;
}

/* Custom Category Autocomplete Dropdown */
.category-row,
.editor .category-row {
  position: relative;
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

.category-input-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.category-input-wrapper input {
  width: 100%;
  padding: 10px 32px 10px 12px; /* Extra padding on right for the arrow */
  font-size: 0.85rem;
  height: 42px;
  box-sizing: border-box;
}

.category-dropdown-arrow {
  position: absolute;
  right: 10px;
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 0.65rem;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
}

.category-dropdown-arrow.open {
  transform: rotate(180deg);
}

.custom-category-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  z-index: 100;
  max-height: 220px;
  overflow-y: auto;
  display: none;
  animation: slideDown 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .custom-category-dropdown {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

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

.category-dropdown-option {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.1s ease;
  text-align: left;
}

.category-dropdown-option:hover {
  background: #f1f5f9;
}

[data-theme="dark"] .category-dropdown-option:hover {
  background: #334155;
}

.category-dropdown-option.no-results {
  color: var(--muted);
  cursor: default;
  font-style: italic;
}

.category-create {
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.editor.tool-panel.active {
  display: flex !important;
  flex: 1;
  min-height: 0;
}

.upload-panel,
.crawler-panel,
.quick-text-panel {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.upload-zone {
  display: grid;
  gap: 6px;
  border: 1px dashed #aeb8c9;
  border-radius: 8px;
  padding: 16px;
  color: var(--ink);
  background: #fbfcff;
}

[data-theme="dark"] .upload-zone {
  background: rgba(255, 255, 255, 0.02);
  border-color: #475569;
}

.upload-zone span,
.upload-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.upload-zone input {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.upload-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.quick-text-fields {
  display: grid;
  gap: 10px;
}

.category-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.category-create {
  min-width: 76px;
}

.editor {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
}

.editor label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.editor-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.success-modal {
  width: min(420px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 28px;
  color: var(--ink);
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.success-modal::backdrop {
  background: rgba(24, 33, 47, 0.42);
}

.modal-mark {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 900;
  font-size: 1.6rem;
}

.success-modal h3 {
  margin: 0 0 8px;
  font-size: 1.35rem;
}

.success-modal p {
  margin: 0 0 22px;
  color: var(--muted);
  line-height: 1.5;
}

.category-modal input {
  margin-bottom: 16px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.connectors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  overflow: auto;
  padding-bottom: 20px;
}

.connector-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "icon info badge"
    "icon info config";
  gap: 10px 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.connector-card.connected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(15, 139, 141, 0.12);
}

.connector-icon {
  grid-area: icon;
  font-size: 2rem;
  line-height: 1;
}

.connector-info {
  grid-area: info;
  min-width: 0;
}

.connector-info strong {
  display: block;
  margin-bottom: 4px;
}

.connector-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.connector-badge {
  grid-area: badge;
  justify-self: end;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-active {
  background: #d4f5e9;
  color: var(--green);
}

.badge-paused {
  background: #fef3cd;
  color: #856404;
}

.badge-none {
  background: #eef0f4;
  color: var(--muted);
}

.connector-configure {
  grid-area: config;
  justify-self: end;
  min-width: 90px;
}

.connector-modal {
  width: min(480px, calc(100vw - 32px));
}

.connector-modal h3 {
  margin: 0 0 16px;
  font-size: 1.25rem;
  text-align: left;
}

.connector-fields {
  display: grid;
  gap: 12px;
  margin-bottom: 10px;
}

.connector-fields label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.9rem;
}

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

.connector-status-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px 0;
}

.toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  cursor: pointer;
  color: var(--ink);
}

.toggle-label input[type="checkbox"] {
  width: auto;
  accent-color: var(--accent);
}

.chat-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.model-select {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  font-size: 0.82rem;
  min-width: 220px;
  cursor: pointer;
}

.model-select:focus {
  outline: 3px solid rgba(15, 139, 141, 0.18);
  border-color: var(--accent);
}

.header-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  overflow: auto;
}

.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.stat-card.wide {
  grid-column: 1 / -1;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 4px;
}

.stat-label {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 12px;
}

.query-list {
  display: grid;
  gap: 8px;
  max-height: 300px;
  overflow: auto;
}

.query-item {
  padding: 8px 10px;
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  font-size: 0.85rem;
  line-height: 1.4;
}

.q-model {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  margin-right: 6px;
  text-transform: uppercase;
}

.connector-sync {
  grid-area: config;
  justify-self: end;
  margin-left: 4px;
  min-width: 60px;
  background: #e8f5e9;
  color: var(--green);
  border-color: var(--green);
}

.gallery-layout {
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  flex: 1;
}

.gallery-layout .gallery-grid {
  overflow: auto;
}
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-width: 280px;
  font-size: 0.88rem;
}

.agent-layout {
  display: flex;
  gap: 12px;
  min-height: 0;
  flex: 1;
  overflow: hidden;
}

#agentView {
  overflow-y: auto;
  overflow-x: hidden;
}

#agentView .agent-layout {
  flex: 0 0 auto;
  align-items: flex-start;
  overflow: visible;
  padding-bottom: 24px;
}

.agent-main {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
  flex: 1;
  min-width: 0;
}

.agent-main .messages { border: none; border-radius: 0; }

#agentView .agent-main {
  grid-template-rows: auto auto;
  overflow: visible;
  min-height: 360px;
}

#agentView #agentMessages {
  min-height: 220px;
  overflow: visible;
}

.agent-log {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 0.75rem;
  width: 300px;
  flex-shrink: 0;
}

#agentView .agent-log {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;
  height: 400px;
  min-height: 200px;
  max-height: calc(100vh - 120px);
  z-index: 9999;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease;
  transform: scale(1) translateY(0);
  opacity: 1;
}

#agentView .agent-log.collapsed {
  transform: scale(0.9) translateY(40px);
  opacity: 0;
  pointer-events: none;
  width: 340px;
  min-width: 340px;
}

#agentView .agent-log.collapsed .agent-log-header,
#agentView .agent-log.collapsed .agent-log-list {
  display: flex;
}

#agentView .agent-log-list::-webkit-scrollbar {
  width: 6px;
}
#agentView .agent-log-list::-webkit-scrollbar-track {
  background: transparent;
}
#agentView .agent-log-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}
.theme-dark #agentView .agent-log-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
}
#agentView .agent-log-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

.ghost-button.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.agent-log.collapsed { width: 40px; min-width: 40px; }
.agent-log.collapsed .agent-log-header,
.agent-log.collapsed .agent-log-list { display: none; }

.agent-log-header {
  padding: 8px 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.7rem;
}

.agent-log-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  padding: 6px;
}

.agent-log-item {
  padding: 4px 6px;
  border-radius: 4px;
  margin-bottom: 3px;
  word-break: break-all;
}

.agent-log-item.idle { color: var(--muted); font-style: italic; }
.agent-log-item.processing { background: #fff3e0; color: #6d4c00; }
.agent-log-item.tool { background: #e3f2fd; color: #0d47a1; }
.agent-log-item.result { background: #e8f5e9; color: #1b5e20; }

.agent-log-item.opencode {
  padding: 8px;
  margin-bottom: 7px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  word-break: normal;
}

.agent-log-item.opencode.running { border-left: 3px solid #e0a800; }
.agent-log-item.opencode.completed { border-left: 3px solid #2e9d68; }
.agent-log-item.opencode.warning { border-left: 3px solid #e0a800; }
.agent-log-item.opencode.error { border-left: 3px solid #d9534f; }

.opencode-log-heading {
  font-weight: 700;
  margin-bottom: 5px;
}

.opencode-tool-badge {
  display: inline-block;
  padding: 2px 6px;
  margin-bottom: 5px;
  border-radius: 999px;
  background: #e3f2fd;
  color: #0d47a1;
  font-size: 0.68rem;
  font-weight: 700;
}

.opencode-log-detail {
  color: var(--muted);
  line-height: 1.35;
  white-space: pre-wrap;
}

.opencode-log-command,
.opencode-log-output pre {
  margin: 6px 0 0;
  padding: 7px;
  max-height: 180px;
  overflow: auto;
  border-radius: 5px;
  background: #111827;
  color: #d1fae5;
  font: 0.68rem/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
  word-break: break-word;
}

.opencode-log-output {
  margin-top: 6px;
}

.opencode-log-output summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 700;
}

.source-card {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 6px;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
}

.source-card:last-child { border-bottom: none; }

.source-card strong {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 2px;
}

.source-card small {
  color: var(--muted);
}

.source-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .agent-layout { flex-direction: column; }
  .agent-layout > .agent-log { width: 100%; max-height: 150px; }
  #agentView .agent-log {
    position: static;
    width: 100%;
    height: 180px;
    min-height: 180px;
    max-height: 180px;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    box-shadow: none;
    border-radius: 8px;
  }
  #agentView .agent-log.collapsed {
    display: none;
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  overflow: auto;
}

.gallery-item {
  display: grid;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s;
  background: var(--panel);
}

.gallery-item:hover {
  transform: scale(1.03);
  box-shadow: var(--shadow);
}

.gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
}

.gallery-label {
  padding: 6px 8px;
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 900px) {
  .app-shell,
  .knowledge-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .view {
    height: auto;
    min-height: 70vh;
  }

  .composer {
    grid-template-columns: 1fr;
  }

  .upload-panel {
    grid-template-columns: 1fr;
  }

  .upload-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .category-row {
    grid-template-columns: 1fr;
  }
}

/* Chat Threads Sidebar */
.agent-threads {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: 240px;
  flex-shrink: 0;
}

.agent-threads-header {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 8px;
}

.new-thread-btn {
  flex: 1;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
}

.new-thread-btn:hover {
  background: var(--accent-dark);
}

.thread-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.thread-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.85rem;
  color: var(--ink);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.thread-item:hover {
  background: rgba(15, 139, 141, 0.08);
}

[data-theme="dark"] .thread-item:hover {
  background: rgba(34, 211, 238, 0.08);
}

.thread-item.active {
  background: var(--accent);
  color: #fff;
}

.thread-title {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-right: 6px;
}

.thread-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.2s;
}

.thread-item:hover .thread-actions,
.thread-item.active .thread-actions {
  opacity: 1;
}

.thread-action-btn {
  background: transparent;
  border: none;
  padding: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.thread-item.active .thread-action-btn {
  color: rgba(255, 255, 255, 0.8);
}

.thread-action-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--ink);
}

.thread-item.active .thread-action-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

@media (max-width: 900px) {
  .agent-threads {
    width: 100%;
    max-height: 180px;
  }
}

/* Image Lightbox Modal */
#imageLightbox {
  border: none;
  background: transparent;
  padding: 0;
  max-width: 90vw;
  max-height: 90vh;
  outline: none;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

#imageLightbox::backdrop {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  transition: backdrop-filter 0.3s ease;
}

.lightbox-content {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 12px;
  background: rgba(25, 32, 51, 0.95);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s;
  cursor: pointer;
  z-index: 10;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

.lightbox-img {
  max-width: 100%;
  max-height: 82vh;
  object-fit: contain;
  border-radius: 6px;
  display: block;
}

/* Web Crawler Styling */
.crawler-panel h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--ink);
}

.crawler-fields {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
}

.crawler-fields label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink);
}

.crawler-fields input {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

.crawler-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.crawler-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}

.crawler-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.crawler-status {
  font-size: 0.85rem;
  color: var(--muted);
}

.crawler-log {
  max-height: 120px;
  overflow-y: auto;
  padding: 8px 10px;
  background: #f8f9fa;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: monospace;
  font-size: 0.78rem;
  color: #495057;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ==========================================
   STUNNING SAAS LANDING PAGE STYLES (PREMIUM)
   ========================================== */
.landing-page {
  --landing-bg: #070a13;
  --landing-card: rgba(15, 23, 42, 0.65);
  --landing-border: rgba(255, 255, 255, 0.06);
  --landing-text: #f8fafc;
  --landing-muted: #94a3b8;
  --landing-accent: #22d3ee;
  --landing-accent-rgb: 34, 211, 238;
  --landing-glow: rgba(34, 211, 238, 0.08);

  background: radial-gradient(circle at top, #0f172a 0%, #020617 60%, var(--landing-bg) 100%);
  color: var(--landing-text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Outfit', 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
  position: relative;
}

/* Glowing background blobs */
.landing-glow-1 {
  position: absolute;
  top: -10%;
  left: 10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(15, 139, 141, 0.15) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
  filter: blur(40px);
}
.landing-glow-2 {
  position: absolute;
  top: 40%;
  right: -5%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.1) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
  filter: blur(40px);
  animation: float 10s ease-in-out infinite alternate;
}
.landing-glow-3 {
  position: absolute;
  bottom: -5%;
  left: 5%;
  width: 40vw;
  height: 40vw;
  background: radial-gradient(circle, rgba(15, 139, 141, 0.08) 0%, transparent 70%);
  z-index: 1;
  pointer-events: none;
  filter: blur(40px);
}

.landing-header {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 10;
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

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

.landing-brand-name {
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -0.75px;
  background: linear-gradient(135deg, #ffffff 40%, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-logo-icon {
  background: linear-gradient(135deg, #0f8b8d, #06b6d4);
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.landing-hero {
  max-width: 900px;
  margin: 100px auto 60px auto;
  padding: 0 24px;
  text-align: center;
  z-index: 10;
  position: relative;
}

.landing-badge {
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: #22d3ee;
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(34, 211, 238, 0.05);
}

.landing-title {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -1.8px;
  margin-bottom: 24px;
  background: linear-gradient(to bottom, #ffffff 40%, #cbd5e1 90%, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  color: var(--landing-muted);
  max-width: 750px;
  margin: 0 auto 48px auto;
  line-height: 1.65;
  font-weight: 400;
}

.landing-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  z-index: 11;
  position: relative;
}

.landing-btn-primary {
  background: linear-gradient(135deg, #0f8b8d, #06b6d4);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 16px 40px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 12px;
  box-shadow: 0 6px 28px rgba(6, 182, 212, 0.35);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.landing-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(6, 182, 212, 0.55);
  border-color: rgba(255, 255, 255, 0.3);
}

.landing-btn-secondary {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--landing-border);
  color: #fff;
  padding: 16px 40px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  backdrop-filter: blur(10px);
}

.landing-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

/* Section Headers */
.landing-section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 60px auto;
  padding: 0 24px;
}

.landing-section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
  background: linear-gradient(to right, #ffffff, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.landing-section-subtitle {
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: var(--landing-muted);
  line-height: 1.6;
}

/* ==========================================
   INTERACTIVE SHOWCASE SIMULATOR
   ========================================== */
.landing-showcase-section {
  max-width: 1200px;
  width: 100%;
  margin: 60px auto;
  padding: 0 24px;
  z-index: 10;
  position: relative;
}

.landing-showcase-container {
  display: grid;
  grid-template-columns: 380px minmax(0, 1fr);
  gap: 32px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid var(--landing-border);
  border-radius: 24px;
  padding: 24px;
  backdrop-filter: blur(20px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Showcase Tabs (Left Column) */
.landing-showcase-tabs {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.showcase-tab {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
  color: inherit;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
}

.showcase-tab:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(34, 211, 238, 0.2);
  transform: translateX(5px);
}

.showcase-tab.active {
  background: rgba(6, 182, 212, 0.09);
  border-color: rgba(6, 182, 212, 0.4);
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.1);
}

.tab-icon-box {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  transition: all 0.3s ease;
}

.showcase-tab.active .tab-icon-box {
  background: linear-gradient(135deg, #0f8b8d, #06b6d4);
  color: #fff;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

.tab-content-box h4 {
  margin: 0 0 4px 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.tab-content-box p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--landing-muted);
  line-height: 1.4;
}

.tab-arrow {
  margin-left: auto;
  font-size: 1.1rem;
  color: var(--landing-muted);
  opacity: 0;
  transition: all 0.3s ease;
}

.showcase-tab:hover .tab-arrow,
.showcase-tab.active .tab-arrow {
  opacity: 1;
  transform: translateX(3px);
  color: #22d3ee;
}

/* Virtual Console (Right Column) */
.landing-showcase-console {
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  height: 460px;
  overflow: hidden;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.console-header {
  background: #0f1422;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.console-dots {
  display: flex;
  gap: 8px;
}

.console-dot-item {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.console-dot-item.red { background: #ef4444; }
.console-dot-item.yellow { background: #f59e0b; }
.console-dot-item.green { background: #10b981; }

.console-title-text {
  font-size: 0.8rem;
  font-family: monospace;
  color: #64748b;
}

.console-badge {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #f87171;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.console-pulse {
  width: 6px;
  height: 6px;
  background: #ef4444;
  border-radius: 50%;
  display: inline-block;
  animation: pulse-red 1.5s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.console-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  flex: 1;
  min-height: 0;
}

.console-chat-area {
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 0.88rem;
  line-height: 1.5;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

/* Chat Messages */
.console-msg {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 85%;
  animation: fadeInMsg 0.3s ease forwards;
}

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

.console-msg.user {
  align-self: flex-end;
  align-items: flex-end;
}

.console-msg.assistant {
  align-self: flex-start;
  align-items: flex-start;
}

.console-bubble {
  padding: 12px 16px;
  border-radius: 14px;
  font-size: 0.88rem;
}

.console-msg.user .console-bubble {
  background: linear-gradient(135deg, #0f8b8d, #087f81);
  color: #fff;
  border-bottom-right-radius: 2px;
}

.console-msg.assistant .console-bubble {
  background: #151d30;
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  border-bottom-left-radius: 2px;
}

.console-sender-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 700;
  text-transform: uppercase;
}

/* Assistant Reasoning elements */
.console-thinking {
  background: rgba(34, 211, 238, 0.03);
  border-left: 3px solid #22d3ee;
  padding: 10px 14px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8rem;
  color: #22d3ee;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: fadeInMsg 0.3s ease forwards;
}

.console-action {
  background: rgba(244, 63, 94, 0.04);
  border-left: 3px solid #f43f5e;
  padding: 10px 14px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.8rem;
  color: #fda4af;
  width: 100%;
  margin-top: 5px;
  animation: fadeInMsg 0.3s ease forwards;
}

.console-action pre {
  margin: 6px 0 0 0;
  background: #05070c;
  padding: 8px;
  border-radius: 6px;
  color: #a7f3d0;
  overflow-x: auto;
  border: 1px solid rgba(255, 255, 255, 0.02);
}

.console-indicator-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid rgba(34, 211, 238, 0.2);
  border-top-color: #22d3ee;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  flex-shrink: 0;
}

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

/* Console Sidebar */
.console-sidebar {
  background: #0d121f;
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.console-sidebar-title {
  font-size: 0.72rem;
  font-weight: 800;
  color: #475569;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.console-tools-list,
.console-sources-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.console-tool-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  color: #94a3b8;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.01);
  border-radius: 6px;
  border: 1px solid transparent;
}

.console-tool-item.active {
  color: #fff;
  background: rgba(34, 211, 238, 0.04);
  border-color: rgba(34, 211, 238, 0.1);
}

.tool-status-dot {
  width: 7px;
  height: 7px;
  background: #334155;
  border-radius: 50%;
  display: inline-block;
}

.console-tool-item.active .tool-status-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
  animation: pulse-dot 1s infinite alternate;
}

@keyframes pulse-dot {
  from { opacity: 0.4; }
  to { opacity: 1; }
}

.console-source-item {
  font-size: 0.78rem;
  color: #64748b;
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 4px 6px;
  background: rgba(0,0,0,0.2);
  border-radius: 4px;
}

.console-source-item.highlight {
  color: #22d3ee;
  background: rgba(6,182,212,0.08);
}

/* ==========================================
   STATS SHOWCASE
   ========================================== */
.landing-stats-section {
  max-width: 1200px;
  width: 100%;
  margin: 40px auto;
  padding: 0 24px;
  z-index: 10;
  position: relative;
}

.landing-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.00));
  border: 1px solid var(--landing-border);
  border-radius: 20px;
  padding: 40px 32px;
  backdrop-filter: blur(10px);
}

.landing-stat-card {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.landing-stat-card:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

@media (max-width: 768px) {
  .landing-stat-card:not(:last-child) {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 24px;
  }
}

.landing-stat-number {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, #22d3ee, #0f8b8d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -1.5px;
}

.landing-stat-text {
  font-size: 0.85rem;
  color: var(--landing-muted);
  line-height: 1.5;
  max-width: 200px;
  margin: 0 auto;
}

/* ==========================================
   ENHANCED FEATURES & MOCKUPS
   ========================================== */
.landing-features-section {
  max-width: 1200px;
  width: 100%;
  margin: 80px auto;
  padding: 0 24px;
  z-index: 10;
  position: relative;
}

.landing-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 30px;
  margin-top: 20px;
}

.landing-feature-card {
  background: var(--landing-card);
  border: 1px solid var(--landing-border);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.landing-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 10%, rgba(34, 211, 238, 0.05), transparent 60%);
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.landing-feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(34, 211, 238, 0.35);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35), 0 0 30px rgba(6, 182, 212, 0.12);
}

.landing-feature-card:hover::before {
  opacity: 1;
}

/* Feature Mockups Container */
.feature-mockup-wrapper {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  height: 130px;
  width: 100%;
  margin-bottom: 24px;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}

/* Mockup 1: RAG Flow */
.mockup-rag {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.8rem;
}

.mockup-doc {
  background: #1e293b;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 8px 12px;
  border-radius: 6px;
  color: #fff;
}

.mockup-arrow {
  color: #22d3ee;
  font-weight: bold;
  animation: pulse-arrow 1.5s infinite;
}

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

.mockup-vector {
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.3);
  padding: 8px 12px;
  border-radius: 6px;
  color: #22d3ee;
  box-shadow: 0 0 15px rgba(6, 182, 212, 0.2);
}

/* Mockup 2: Agent Terminal */
.mockup-agent {
  width: 85%;
  background: #090d16;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px;
  font-family: monospace;
  font-size: 0.72rem;
  text-align: left;
  box-shadow: 0 10px 20px rgba(0,0,0,0.4);
}

.mockup-terminal-line {
  color: #38bdf8;
  margin-bottom: 4px;
}

.mockup-terminal-output {
  color: #34d399;
}

/* Mockup 3: Integrations */
.mockup-integrations {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  width: 80%;
  justify-content: center;
}

.integration-badge {
  background: #1e293b;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid rgba(255,255,255,0.06);
}

.integration-badge.woo {
  color: #96588a;
  border-color: rgba(150, 88, 138, 0.3);
  background: rgba(150, 88, 138, 0.05);
}

.integration-badge.rag {
  color: #22d3ee;
  border-color: rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.05);
}

.integration-line {
  flex: 1;
  height: 2px;
  background: linear-gradient(to right, rgba(150, 88, 138, 0.5), rgba(6, 182, 212, 0.5));
  position: relative;
}

.integration-line::after {
  content: '';
  position: absolute;
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  top: -2px;
  left: 0;
  animation: movePulse 2s infinite linear;
  box-shadow: 0 0 8px #fff;
}

@keyframes movePulse {
  0% { left: 0%; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { left: 100%; opacity: 0; }
}

/* Mockup 4: SaaS User Roles */
.mockup-saas {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 70%;
}

.saas-user {
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 700;
  text-align: center;
}

.saas-user.admin {
  background: rgba(245, 158, 11, 0.05);
  border-color: rgba(245, 158, 11, 0.25);
  color: #f59e0b;
}

.saas-user.editor {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.25);
  color: #3b82f6;
}

.saas-user.viewer {
  background: rgba(148, 163, 184, 0.05);
  border-color: rgba(148, 163, 184, 0.2);
  color: #94a3b8;
}

/* Mockup 5: Analytics */
.mockup-analytics {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 70px;
  width: 60%;
}

.analytics-bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  background: linear-gradient(to top, rgba(6, 182, 212, 0.2), #22d3ee);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.2);
  animation: growBar 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: bottom;
}

@keyframes growBar {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

/* Mockup 6: Voicewave */
.mockup-voice {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 50px;
}

.voice-wave-bar {
  width: 4px;
  height: 20px;
  background: #22d3ee;
  border-radius: 2px;
  animation: soundWave 1.2s ease-in-out infinite alternate;
}

.voice-wave-bar:nth-child(1) { height: 10px; animation-delay: 0.1s; }
.voice-wave-bar:nth-child(2) { height: 28px; animation-delay: 0.3s; }
.voice-wave-bar:nth-child(3) { height: 40px; animation-delay: 0.5s; }
.voice-wave-bar:nth-child(4) { height: 24px; animation-delay: 0.2s; }
.voice-wave-bar:nth-child(5) { height: 12px; animation-delay: 0.4s; }

@keyframes soundWave {
  0% { transform: scaleY(0.4); }
  100% { transform: scaleY(1.2); }
}

.landing-feature-name {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #fff;
  letter-spacing: -0.5px;
}

.landing-feature-desc {
  font-size: 0.92rem;
  color: var(--landing-muted);
  line-height: 1.6;
}

/* ==========================================
   PRICING & TOGGLE
   ========================================== */
.landing-pricing-section {
  max-width: 1100px;
  width: 100%;
  margin: 100px auto 60px auto;
  padding: 0 24px;
  z-index: 10;
  position: relative;
  text-align: center;
}

.pricing-toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 40px 0;
}

.pricing-toggle-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--landing-muted);
  transition: color 0.3s ease;
}

.pricing-toggle-label.active {
  color: #fff;
}

.pricing-switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 30px;
}

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

.pricing-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1e293b;
  border: 1px solid rgba(255,255,255,0.08);
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 34px;
}

.pricing-slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.pricing-switch input:checked + .pricing-slider {
  background-color: #0f8b8d;
}

.pricing-switch input:focus + .pricing-slider {
  box-shadow: 0 0 1px #0f8b8d;
}

.pricing-switch input:checked + .pricing-slider:before {
  transform: translateX(26px);
}

.pricing-discount-badge {
  background: linear-gradient(135deg, rgba(235, 111, 81, 0.15), rgba(232, 111, 81, 0.3));
  border: 1px solid rgba(232, 111, 81, 0.3);
  color: #e86f51;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 20px;
  margin-left: 6px;
  letter-spacing: 0.5px;
}

.landing-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.landing-price-card {
  background: var(--landing-card);
  border: 1px solid var(--landing-border);
  border-radius: 24px;
  padding: 48px 36px;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.25);
}

.landing-price-card.popular {
  border-color: rgba(6, 182, 212, 0.5);
  box-shadow: 0 20px 40px rgba(6, 182, 212, 0.08), 0 0 30px rgba(6, 182, 212, 0.05);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.6));
}

.landing-price-card.popular::after {
  content: 'НАЙ-ПРЕДПОЧИТАН';
  position: absolute;
  top: -14px;
  background: linear-gradient(135deg, #0f8b8d, #06b6d4);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 5px 16px;
  border-radius: 30px;
  letter-spacing: 1px;
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
  border: 1px solid rgba(255,255,255,0.15);
}

.landing-price-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255,255,255,0.15);
}

.landing-price-card.popular:hover {
  border-color: rgba(6, 182, 212, 0.8);
  box-shadow: 0 25px 50px rgba(6, 182, 212, 0.15), 0 0 40px rgba(6, 182, 212, 0.1);
}

.landing-price-name {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.landing-price-subtext {
  font-size: 0.85rem;
  color: var(--landing-muted);
  margin-bottom: 24px;
}

.landing-price-amount {
  font-size: 3rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 30px;
  letter-spacing: -1.5px;
}

.landing-price-amount span {
  font-size: 1rem;
  color: var(--landing-muted);
  font-weight: 500;
  letter-spacing: 0;
}

.landing-price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 40px 0;
  text-align: left;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.landing-price-features li {
  font-size: 0.92rem;
  color: #e2e8f0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.4;
}

.landing-price-features li::before {
  content: '✓';
  color: #10b981;
  font-weight: 900;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================
   FAQ ACCORDION
   ========================================== */
.landing-faq-section {
  max-width: 850px;
  width: 100%;
  margin: 100px auto 120px auto;
  padding: 0 24px;
  z-index: 10;
  position: relative;
}

.landing-faq-accordion {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 40px;
}

.landing-faq-item {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--landing-border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.landing-faq-item:hover {
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

.landing-faq-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 22px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  gap: 20px;
}

.faq-icon-arrow {
  font-size: 0.8rem;
  color: var(--landing-muted);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.landing-faq-item.active {
  border-color: rgba(6, 182, 212, 0.3);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.landing-faq-item.active .faq-icon-arrow {
  transform: rotate(180deg);
  color: #22d3ee;
}

.landing-faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s ease;
  padding: 0 28px;
  color: var(--landing-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.landing-faq-item.active .landing-faq-content {
  padding-bottom: 24px;
  max-height: 300px; /* Safe limit for FAQ answers */
}

/* ==========================================
   HUBSPOT TOP 10 SECTION
   ========================================== */
.hubspot-subtab {
  background: rgba(255, 109, 45, 0.05);
  border: 1px solid rgba(255, 109, 45, 0.15);
  color: var(--muted);
  padding: 10px 24px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.hubspot-subtab:hover {
  background: rgba(255, 109, 45, 0.1);
  border-color: rgba(255, 109, 45, 0.3);
  color: #ff6d2d;
}

.hubspot-subtab.active {
  background: rgba(255, 109, 45, 0.15);
  border-color: rgba(255, 109, 45, 0.5);
  color: #ff6d2d;
  box-shadow: 0 4px 15px rgba(255, 109, 45, 0.2);
}

.top10-card {
  transition: all 0.3s ease;
}

.top10-card:hover {
  border-color: rgba(255, 109, 45, 0.3) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(-2px);
}

/* ==========================================
   FOOTER
   ========================================== */
.landing-footer {
  margin-top: auto;
  padding: 50px 24px;
  border-top: 1px solid var(--landing-border);
  text-align: center;
  font-size: 0.88rem;
  color: var(--landing-muted);
  z-index: 10;
  position: relative;
  background: rgba(2, 6, 23, 0.4);
  backdrop-filter: blur(10px);
}

.landing-footer p {
  margin: 0;
}

/* Powered by Brain Donors */
.braindonors-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding: 10px 22px;
  border-radius: 100px;
  background: rgba(255, 109, 45, 0.06);
  border: 1px solid rgba(255, 109, 45, 0.12);
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.braindonors-badge:hover {
  background: rgba(255, 109, 45, 0.12);
  border-color: rgba(255, 109, 45, 0.35);
  box-shadow: 0 0 30px rgba(255, 109, 45, 0.1), 0 6px 20px rgba(0,0,0,0.3);
  transform: translateY(-1px);
}
.bd-powered {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--landing-muted);
  transition: color 0.3s;
}
.braindonors-badge:hover .bd-powered {
  color: #ff6d2d;
}
.bd-logo-svg {
  height: 18px;
  width: auto;
  opacity: 0.75;
  transition: opacity 0.3s, filter 0.3s;
  filter: brightness(0) invert(1);
}
.braindonors-badge:hover .bd-logo-svg {
  opacity: 1;
  filter: none;
}

/* ==========================================
   HOW IT WORKS FLOW CHART (LANDING)
   ========================================== */
.landing-flow-section {
  max-width: 1200px;
  width: 100%;
  margin: 100px auto 60px auto;
  padding: 0 24px;
  z-index: 10;
  position: relative;
}

.landing-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 28px;
  margin-top: 40px;
  position: relative;
}

.landing-flow-card {
  background: var(--landing-card);
  border: 1px solid var(--landing-border);
  border-radius: 20px;
  padding: 36px 28px;
  backdrop-filter: blur(12px);
  position: relative;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.landing-flow-card:hover {
  transform: translateY(-5px);
  border-color: rgba(34, 211, 238, 0.25);
  box-shadow: 0 15px 35px rgba(6, 182, 212, 0.08);
}

.flow-step-num {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, #0f8b8d, #06b6d4);
  color: #fff;
  font-weight: 800;
  font-size: 1.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 24px;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.flow-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 12px;
  color: #fff;
}

.flow-card-desc {
  font-size: 0.88rem;
  color: var(--landing-muted);
  line-height: 1.6;
}

/* Connective arrows for flow on desktop */
@media (min-width: 992px) {
  .landing-flow-card:not(:last-child)::after {
    content: '→';
    position: absolute;
    right: -20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: rgba(34, 211, 238, 0.2);
    font-weight: 300;
    pointer-events: none;
  }
}

/* ==========================================
   SUPPORTED FORMATS & DATA SOURCES
   ========================================== */
.landing-formats-section {
  max-width: 1200px;
  width: 100%;
  margin: 100px auto 60px auto;
  padding: 0 24px;
  z-index: 10;
  position: relative;
}

.landing-formats-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 40px;
}

@media (max-width: 768px) {
  .landing-formats-container {
    grid-template-columns: 1fr;
  }
}

.formats-column {
  background: var(--landing-card);
  border: 1px solid var(--landing-border);
  border-radius: 24px;
  padding: 40px;
  backdrop-filter: blur(12px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.formats-column-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 24px;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  padding-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.formats-grid-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.format-pill {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 18px;
  border-radius: 30px;
  font-size: 0.88rem;
  color: #e2e8f0;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.format-pill:hover {
  background: rgba(34, 211, 238, 0.06);
  border-color: rgba(34, 211, 238, 0.3);
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 5px 15px rgba(6, 182, 212, 0.08);
}

.format-pill-icon {
  font-size: 1.1rem;
}

/* ==========================================
   BUSINESS USE CASES
   ========================================== */
.landing-use-cases-section {
  max-width: 1200px;
  width: 100%;
  margin: 100px auto 60px auto;
  padding: 0 24px;
  z-index: 10;
  position: relative;
}

.use-cases-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.use-case-card {
  background: var(--landing-card);
  border: 1px solid var(--landing-border);
  border-radius: 24px;
  padding: 40px 32px;
  backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 15px 35px rgba(0,0,0,0.2);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.use-case-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, #0f8b8d, #06b6d4);
  opacity: 0.7;
}

.use-case-card:hover {
  transform: translateY(-6px);
  border-color: rgba(34, 211, 238, 0.25);
  box-shadow: 0 25px 45px rgba(0,0,0,0.35);
}

.use-case-badge {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #22d3ee;
  margin-bottom: 16px;
  display: inline-block;
}

.use-case-title {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 14px;
  color: #fff;
}

.use-case-desc {
  font-size: 0.9rem;
  color: var(--landing-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.use-case-example {
  margin-top: auto;
  font-size: 0.82rem;
  font-style: italic;
  color: #22d3ee;
  background: rgba(6, 182, 212, 0.05);
  border-left: 2px solid #06b6d4;
  padding: 8px 12px;
  border-radius: 0 6px 6px 0;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .landing-showcase-container {
    grid-template-columns: 1fr;
  }
  .landing-showcase-tabs {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 12px;
  }
  .showcase-tab {
    flex-shrink: 0;
    width: 280px;
  }
}

@media (max-width: 600px) {
  .landing-showcase-tabs {
    flex-direction: column;
  }
  .showcase-tab {
    width: 100%;
  }
  .console-body {
    grid-template-columns: 1fr;
  }
  .console-sidebar {
    display: none; /* Hide tools sidebar on small mobile for space */
  }
  .landing-pricing-grid {
    grid-template-columns: 1fr;
  }
}

