:root {
  --primary-color: #6366f1;
  --primary-hover: #4f46e5;
  --bg-color: #ffffff;
  --sidebar-bg: #f8fafc;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;
  --chart-grid: #e2e8f0;
  --success-color: #22c55e;
  --danger-color: #ef4444;
  --transition: all 0.3s ease;
  --shadow-soft: 0 20px 45px rgba(15, 23, 42, 0.12);
}

[data-theme="dark"] {
  --bg-color: #0f172a;
  --sidebar-bg: #1e293b;
  --text-color: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --card-bg: #1e293b;
  --chart-grid: #334155;
}

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

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
  background: #eef2f7;
  color: #222;
}

h4 {
  margin-top: 20px;
}

#app {
  display: flex;
  height: 100vh;
  background: #f7f9fb;
}

/* Sidebar Styles */
#sidebar {
  width: 220px;
  /*background: linear-gradient(180deg, #232b3b 0%, #2d3a53 100%);*/
  background: linear-gradient(180deg, #1e2528 0%, #1f262a 100%);
  color: #fff;
  padding: 32px 20px 20px 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-right: 1px solid #e3e8ee;
}

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

#sidebar h2 {
  margin-top: 0;
  font-size: 2em;
  font-weight: 800;
  letter-spacing: 1px;
  margin-bottom: 32px;
  color: #fff;
  display: flex;
  align-items: center;
}

#sidebar-logo {
  height: 50px;
  margin-right: 10px;
  filter: invert(1);
}

#account-name {
  font-size: 0.9em;
  margin-top: -20px;
  margin-bottom: 24px;
  color: #fff;
  opacity: 0.8;
}

#account-selector {
  font-size: 0.9em;
  margin-top: -20px;
  margin-bottom: 24px;
  color: #fff;
  opacity: 0.8;
  background: transparent;
  border: none;
  width: 100%;
}

.theme-toggle {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.5rem;
  transition: var(--transition);
}

.theme-toggle:hover {
  color: var(--text-color);
  background: var(--border-color);
}

#sidebar ul {
  list-style: none;
  padding: 0;
  width: 100%;
}

#sidebar li {
  cursor: pointer;
  padding: 12px 0 12px 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
  font-size: 1em;
  margin-bottom: 4px;
}

#sidebar li.active, #sidebar li:hover {
  background: #fff2;
  color: #7ec4fa;
  font-weight: 600;
}

#sidebar li i {
  width: 24px;
  text-align: center;
  font-size: 1.2em;
}

/* Main Content */
#content {
  flex: 1;
  padding: 36px 40px 36px 40px;
  overflow-y: auto;
  background: #eef2f7;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.page-title {
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0;
}

.page-subtitle {
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 1rem;
  max-width: 620px;
}

.section-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 20px 22px;
  box-shadow: var(--shadow-soft);
}

/* Analytics Styles */
.analytics-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  justify-content: end;
}

.date-range input {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  font-family: 'Inter', sans-serif;
  width: 140px;
  cursor: pointer;
}

.flatpickr-calendar {
  font-family: 'Inter', sans-serif;
  z-index: 200;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.inRange {
  background: var(--primary-color);
  color: #fff;
}

.flatpickr-day.startRange,
.flatpickr-day.endRange {
  border-radius: 50%;
}

.fp-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px;
}

.fp-buttons button {
  padding: 6px 12px;
  font-size: 0.9em;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.15s;
}

.fp-buttons button:first-child {
  background: transparent;
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.fp-buttons button:first-child:hover {
  background: #f0f0f0;
}

.fp-buttons button:last-child {
  background: var(--primary-color);
  color: #fff;
}

.fp-buttons button:last-child:hover {
  background: var(--primary-hover);
}

.kpi-boxes {
  display: flex;
  gap: 20px;
  margin-bottom: 0;
}

.kpi-box {
  flex: 1;
  background: #fff;
  padding: 8px 24px;
  text-align: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border 0.15s, box-shadow 0.15s, color 0.15s;
  min-width: 120px;
}

.kpi-box.active, .kpi-box:hover {
  border-bottom-color: #3b82f6;
  color: #3b82f6;
}

.kpi-icon {
  background: var(--primary-color);
  color: white;
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.kpi-content {
  flex: 1;
}

.kpi-value {
  font-size: 2.1em;
  font-weight: 800;
  margin-bottom: 4px;
}

.kpi-label {
  font-size: 1em;
  color: #888;
}

/* ----- Data overview ----- */
.data-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 1.5rem;
}

.data-overview .overview-item {
  flex: 1;
  min-width: 140px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.overview-icon {
  background: var(--primary-color);
  color: #fff;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.overview-value {
  font-size: 1.5rem;
  font-weight: 700;
}

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

.kpi-trend {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: 1rem;
}

.kpi-trend .fa-arrow-up {
  color: var(--success-color);
}

.kpi-trend .fa-arrow-down {
  color: var(--danger-color);
}

.chart-container, .analysis-row, .usage-section {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 2rem;
  margin-top: 1rem;
}

.chart-container h4, .analysis-row h4 {
  margin-bottom: 1rem;
  font-weight: 600;
}

.chart-wrapper {
  position: relative;
  width: 100%;
}

.kpi-title {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.2em;
  font-weight: 700;
}

.kpi-chart {
  width: 100%;
  min-height: 300px;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 18px;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: #fff;
  border: 1px solid #3b82f6;
  padding: 6px 12px;
  font-size: 13px;
  display: none;
  z-index: 20;
  border-radius: 6px;
  box-shadow: 0 2px 8px #3b82f633;
  color: #222;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 30;
  border-radius: inherit;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 4px solid #ccc;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

.terms-container {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 1rem;
  padding: 1.5rem;
}

.terms-container h4 {
  margin-bottom: 1rem;
  font-weight: 600;
}

.table-wrapper {
  overflow-x: auto;
}

#terms-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 18px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 6px #0001;
  overflow: hidden;
}

#terms-table th,
#terms-table td {
  border-bottom: 1px solid #f0f0f0;
  padding: 10px 14px;
  text-align: left;
}

#terms-table th {
  background: #f7f9fb;
  font-weight: 700;
}

#terms-table tr:last-child td {
  border-bottom: none;
}

#terms-table canvas {
  width: 100px;
  height: 40px;
}
/*
.analysis-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 18px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 6px #0001;
  overflow: hidden;
}
.analysis-table th,
.analysis-table td {
  border-bottom: 1px solid #f0f0f0;
  padding: 10px 14px;
  text-align: left;
}
.analysis-table th {
  background: #f7f9fb;
  font-weight: 700;
}
.analysis-table tr:last-child td {
  border-bottom: none;
}*/

.analysis-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 16px;
  position: relative;
}

.analysis-pie,
.analysis-stack {
  background: #fff;
  border-radius: 10px;
}

.analysis-pie {
  width: 160px;
  height: 160px;
}

.analysis-stack {
  flex: 1;
  min-width: 220px;
  height: 160px;
}

.color-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  justify-content: end;
}

.table-header h3{
  font-size: 1.5em;
}

.icon-btn {
  background: none;
  border: none;
  color: #3b82f6;
  font-size: 1.2em;
  cursor: pointer;
}

.icon-btn:hover {
  color: #2563eb;
}

.resource-table, .analysis-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  margin: 16px 0px;
  border-style: solid;
  border-width: 1px;
}

.resource-table th, .analysis-table th,
.resource-table td, .analysis-table td {
  border-bottom: 1px solid #f0f0f0;
  padding: 10px 14px;
  text-align: left;
}

.resource-table th, .analysis-table th {
  background: #1f2629;
  color: #fff;
  font-weight: 700;
}

.resource-table tr:last-child td, .analysis-table tr:last-child td {
  border-bottom: none;
}

.resource-table tbody tr:hover {
  background: #f0f4ff;
  cursor: pointer;
}

.resource-table td.actions {
  text-align: right;
}

.agent-pill {
  display: inline-block;
  background: #6366f1;
  color: #fff;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75em;
}

.agent-pill.more {
  background: #e5e7eb;
  color: #374151;
  padding: 2px 6px;
}

.add-agent-card {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2em;
  color: #6366f1;
  cursor: pointer;
}

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

.search-input {
  padding: 6px 8px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.sortable {
  cursor: pointer;
}

.sort-icon {
  margin-left: 4px;
  color: #aaa;
}

.sortable.sort-asc .sort-icon {
  transform: rotate(180deg);
  color: #1e293b;
}

.sortable.sort-desc .sort-icon {
  color: #1e293b;
}

.progress-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.progress-container {
  width: 60px;
  height: 6px;
  background: #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--primary-color);
}

.detail-row td {
  background: #f7f9fb;
}

.detail-row .details {
  padding: 10px 14px;
}
.detail-row .details pre {
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 10px;
  background: white;
  padding: 10px;
  border-style: solid;
  border-radius: 10px;
  border-width: 1px;
}

.details-subtable {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
}

.details-subtable td {
  padding: 4px 5px;
  background: white;
  border-radius: 10px;
}
.pagination {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 6px;
  justify-content: end;
}
.pagination button {
  background: #f1f5f9;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
}
.pagination button:disabled {
  opacity: 0.5;
  cursor: default;
}

.source-row {
  margin-top: 10px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.askvio-product-card {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  padding: 4px;
  font-size: 12px;
  text-decoration: none;
  color: inherit;
}

.askvio-product-card img {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
}

.askvio-product-info {
  display: flex;
  flex-direction: column;
}

.askvio-product-name {
  font-weight: bold;
}

.askvio-product-price {
  color: var(--user-bubble-color, #da291c);
}

.empty-msg {
  text-align: center;
  color: #666;
  margin-bottom: 16px;
}

.create-btn {
  background: #fff;
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  cursor: pointer;
}

.create-btn i {
  margin-right: 6px;
}

.custom-group {
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-soft);
}

.custom-group-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  align-items: center;
}

.customization-hero {
  margin-bottom: 22px;
}

.group-subtitle {
  margin: 6px 0 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.customization-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.customization-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  box-shadow: var(--shadow-soft);
}

.customization-card i {
  font-size: 1.4rem;
  color: var(--primary-color);
  background: #eef2ff;
  border-radius: 12px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customization-card h5 {
  margin: 0 0 6px 0;
  font-size: 1rem;
}

.customization-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.theme-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px;
  text-align: left;
  cursor: pointer;
  transition: border 0.2s, box-shadow 0.2s, transform 0.2s;
}

.theme-card:hover {
  border-color: var(--primary-color);
  box-shadow: 0 6px 18px #3b82f622;
  transform: translateY(-2px);
}

.theme-card.active {
  border-color: var(--primary-color);
  box-shadow: 0 6px 20px #3b82f633;
}

.theme-preview {
  background: var(--theme-widget, #f8fafc);
  border-radius: 14px;
  padding: 12px;
  height: 110px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.theme-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--theme-gradient, linear-gradient(135deg, rgba(255,255,255,0.8), rgba(255,255,255,0)));
  opacity: 0.7;
}

.theme-preview-bar {
  width: 70%;
  height: 10px;
  border-radius: 999px;
  background: var(--theme-chat, #ffffff);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.theme-preview-row {
  display: flex;
  gap: 6px;
}

.theme-preview-pill {
  width: 36px;
  height: 12px;
  border-radius: 999px;
  background: var(--theme-accent, #22c55e);
  opacity: 0.65;
}

.theme-preview-bubbles {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.theme-preview-bubble {
  width: 46px;
  height: 18px;
  border-radius: 999px;
  background: var(--theme-ai, #e2e8f0);
}

.theme-preview-bubble.user {
  background: var(--theme-user, #6366f1);
}

.theme-meta {
  margin-top: 10px;
}

.theme-title {
  font-weight: 700;
  font-size: 0.95rem;
}

.theme-desc {
  color: var(--text-muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

/* ----- Installation blocks ----- */
.install-block {
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 18px;
  box-shadow: 0 1px 4px #0001;
}

.install-block ul {
  margin: 20px;
}

.custom-group label {
  display: block;
  margin: 8px 0;
  font-size: 1.05em;
}

.custom-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.custom-group-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.custom-group-title i {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.custom-group-header h4 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.mode-tabs {
  display: inline-flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 999px;
  background: #f1f5f9;
}

.mode-tab {
  border: none;
  background: transparent;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--text-muted);
  font-weight: 600;
}

.mode-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.12);
}

.settings-table {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 12px 16px;
}

.setting-name {
  font-weight: 600;
  align-self: anchor-center;
}

.setting-control {
  text-align: left;
  display: flex;
  align-items: center;
  gap: 6px;
}

.setting-control.gradient-control {
  align-items: flex-start;
}

.color-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #f8fafc;
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px solid #e5e7eb;
}

.color-field.compact {
  padding: 6px 8px;
}

.color-preview {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
}

.color-hex {
  width: 140px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 6px 8px;
  font-family: monospace;
  font-size: 0.85rem;
  background: #fff;
}

.color-picker {
  width: 36px;
  height: 32px;
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
}

.alpha-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  background: #fff;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

.alpha-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 600;
}

.alpha-range {
  width: 90px;
}

.color-swatches {
  display: flex;
  gap: 6px;
}

.color-swatch-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #cbd5f5;
  background: var(--swatch, #fff);
  cursor: pointer;
  transition: transform 0.15s;
}

.color-swatch-btn:hover {
  transform: scale(1.1);
}

.gradient-builder {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.gradient-arrow {
  font-weight: 700;
  color: var(--text-muted);
}

.gradient-angle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.gradient-angle input[type="range"] {
  width: 120px;
}

.gradient-preview {
  width: 90px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: linear-gradient(90deg, #fff, #f3f4f6);
}

.range-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.save-custom-wrap {
  position: sticky;
  bottom: 16px;
  padding: 12px 0 4px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0), #f8fafc 60%);
  z-index: 5;
}

#save-custom {
  width: 100%;
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  background: var(--primary-color);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

#save-custom.saved {
  background: #22c55e;
  color: #fff;
}

.range-field input[type="range"] {
  width: 160px;
}

.range-field input[type="number"] {
  width: 70px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 6px;
}

.range-field .unit {
  color: var(--text-muted);
  font-size: 0.9rem;
}

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

.icon-options .emoji-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  font-size: 1.1rem;
}

.checkbox-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.85rem;
  cursor: pointer;
}

.checkbox-pill input {
  margin: 0;
}

.align-options {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.align-options label {
  border: 1px solid #d1d5db;
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  background: #fff;
}

.align-options input {
  display: none;
}

.align-options label.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.align-options label.active .align-icon {
  border-color: #fff;
  color: #fff;
}

.align-options label.active .align-label {
  color: #fff;
}

.align-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid #cbd5f5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.color-options {
  display: flex;
  gap: 6px;
  align-items: center;
}

.color-choice input {
  display: none;
}

.color-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid #ccc;
  display: inline-block;
  cursor: pointer;
}

.hex-box {
  width: 60px;
  height: 24px;
  line-height: 24px;
  border-radius: 4px;
  font-family: monospace;
  text-align: center;
}

.color-choice input:checked + .color-swatch {
  outline: 2px solid #2563eb;
}

.custom-input {
  width: 36px;
  height: 24px;
  padding: 0;
  border: none;
  display: none;
  margin-left: 4px;
}


.icon-options {
  display: flex;
  gap: 6px;
}

.icon-options label {
  cursor: pointer;
}

.icon-options i {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 4px;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-options input {
  display: none;
}

.icon-options input:checked + i {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.icon-options input:checked + .emoji-icon {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.number-switch {
  display: flex;
  gap: 6px;
}

.number-switch label {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
}

.number-switch input {
  display: none;
}

.number-switch input:checked + span {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

.radius-demo {
  display: inline-block;
  width: 30px;
  height: 18px;
  border: 1px solid #ddd;
}

.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

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

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

.switch .slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: #3b82f6;
}

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

#placeholder {
  padding: 4px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  width: 220px;
}

#save-custom {
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 24px;
  font-size: 1.1em;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px #3b82f633;
  transition: background 0.15s, box-shadow 0.15s;
}

#save-custom:hover {
  background: #2563eb;
  box-shadow: 0 4px 16px #3b82f655;
}

.item-list {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.item-box {
  border: 1px solid #e3e8ee;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 4px #0001;
  padding: 16px 10px;
  width: 150px;
  text-align: center;
  transition: box-shadow 0.15s, border 0.15s;
  cursor: pointer;
}
.integration-card{
  width: 300px;
  display:flex;
  align-items:center;
  text-align:left;
  gap:12px;
}
.integration-card .integration-icon{
  width: 50px;
  height: 50px;
  margin-right: 10px;
  margin-left: 10px; 
}
.integration-card .integration-content{
  flex:1;
}

.item-box.add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
  font-size: 1.5em;
  border: 2px dashed #3b82f6;
  background: #f0f6ff;
}

.item-box:hover {
  box-shadow: 0 4px 16px #3b82f622;
  border-color: #3b82f6;
}

.item-title {
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 1.1em;
}
.edit-icon {
  margin-left: 6px;
  cursor: pointer;
}
.delete-icon {
  margin-left: 6px;
  color: var(--danger-color);
  cursor: pointer;
}
.rerun-icon {
  margin-left: 6px;
  cursor: pointer;
}
.schedule-indicator {
  margin-left: 6px;
  color: var(--primary-color);
}
.integration-status {
  margin-top: 8px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.status-green { color: var(--success-color); }
.status-yellow { color: #f59e0b; }
.status-red { color: var(--danger-color); }

.plan {
  border: 1.5px solid #e3e8ee;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px #0001;
  padding: 18px 10px;
  width: 170px;
  text-align: center;
  margin-right: 18px;
  display: inline-block;
  transition: border 0.15s, box-shadow 0.15s;
}

.plan.current {
  border-color: #3b82f6;
  box-shadow: 0 4px 16px #3b82f622;
}

.plan button {
  margin-top: 12px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.plan button:hover:not([disabled]) {
  background: #2563eb;
}

/* ----- Billing usage monitor ----- */
.usage-monitor {
  margin-bottom: 24px;
}

.usage-item {
  margin-bottom: 20px;
}

.usage-label {
  font-weight: 600;
  margin-bottom: 4px;
}

.usage-bar {
  width: 100%;
  height: 20px;
  background: #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.usage-bar-fill {
  height: 100%;
  background: #3b82f6;
  width: 0;
  transition: width 0.3s;
}

.usage-bar-text {
  margin-top: 8px;
  text-align: center;
  font-weight: 600;
}

#manage-subscription {
  margin-top: 20px;
  background: none;
  color: black;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  cursor: pointer;
  width: 100%;
  text-decoration: underline;
  font-size: 15px;
}

/* ----- Pricing cards (from homepage) ----- */
.pricing-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px;
  width: 100%;
  justify-items: center;
}

.pricing-card {
  background: #fff;
  border-radius: 16px;
  /*box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);*/
  border: 1px solid var(--border-color);
  padding: 44px 32px 36px 32px;
  min-width: 260px;
  max-width: 340px;
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.pricing-card .plan-icon {
  font-size: 2.5rem;
  margin-bottom: 18px;
  color: #007bff;
}

.pricing-card .plan-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.pricing-card .plan-price {
  font-size: 2.2rem;
  font-weight: 800;
  color: #007bff;
  margin-bottom: 8px;
}

.pricing-card .plan-desc {
  color: #555;
  margin-bottom: 18px;
}

.pricing-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 18px 0;
  color: #444;
}

.pricing-card li {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pricing-card .plan-cta {
  margin-top: auto;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 10px 28px;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.pricing-card .plan-cta:hover {
  background: #0056b3;
}
/*
.pricing-card.featured {
  border: 2px solid #007bff;
  box-shadow: 0 4px 18px rgba(0, 123, 255, 0.08);
}*/
.pricing-table-wrapper {
  margin-top: 40px;
  overflow-x: auto;
  display: none;
}
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
.pricing-table th,
.pricing-table td {
  border: 1px solid #e0e0e0;
  padding: 14px 12px;
  text-align: center;
}
.pricing-table th.plan {
  background: #fff;
  border-bottom: 2px solid #007bff;
  vertical-align: bottom;
}
.pricing-table th.plan .plan-name {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 4px;
}
.pricing-table th.plan .plan-price {
  font-size: 1.4rem;
  font-weight: 800;
  color: #007bff;
}
.pricing-table th.feature {
  background: #f8f9fb;
  font-weight: 700;
}
.pricing-table td:first-child {
  text-align: left;
  font-weight: 600;
}
.pricing-table tr:nth-child(even) td {
  background: #fcfcfc;
}
.pricing-table tfoot td {
  border: none;
  padding-top: 20px;
}
.pricing-table .plan-cta {
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 20px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}
.pricing-table .plan-cta:hover {
  background: #0056b3;
}

@media (max-width: 900px) {
  .pricing-cards-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}


.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(6px);
}

.modal-content {
  background: #fff;
  padding: 28px 26px;
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  width: 440px;
  border: 1px solid rgba(148, 163, 184, 0.25);
}

.modal-content.modal-lg {
  width: 520px;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: #eef2ff;
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.modal-subtitle {
  margin: 4px 0 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.modal-section {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
}

.toggle-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  margin-top: 10px;
}

.toggle-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  margin-bottom: 6px;
}

.toggle-title i {
  color: var(--primary-color);
}

.toggle-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.modal-content label {
  display: block;
  margin-bottom: 12px;
  margin-top: 12px;
  font-size: 1.05em;
}

.modal-content input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #e3e8ee;
  font-size: 1em;
}

.modal-content textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #e3e8ee;
  font-size: 1em;
  resize: vertical;
}

.modal-content button {
  margin-right: 10px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.modal-content button:hover {
  background: #2563eb;
}
.modal-buttons {
  text-align: center;
  margin-top: 10px;
}
.modal-buttons .confirm-btn {
  background: var(--success-color);
}
.modal-buttons .confirm-btn:hover {
  background: #16a34a;
}
.modal-buttons .cancel-btn {
  background: var(--danger-color);
}
.modal-buttons .cancel-btn:hover {
  background: #dc2626;
}

/* Generic confirm/cancel buttons */
.confirm-btn {
  background: var(--success-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  cursor: pointer;
}
.confirm-btn:hover {
  background: #16a34a;
}
.cancel-btn {
  background: var(--danger-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  cursor: pointer;
}
.cancel-btn:hover {
  background: #dc2626;
}

.ga-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  margin-top:10px;
}
.modal-actions{
  margin-top:10px;
  display:flex;
  justify-content:center;
  gap:10px;
}
.btn-green{
  background: var(--success-color);
}
.btn-green:hover{
  background:#16a34a;
}
.btn-red{
  background: var(--danger-color);
}
.btn-red:hover{
  background:#dc2626;
}

#agent-modal .modal-content.agent-modal{
  width:800px;
  max-width:90vw;
}
#agent-modal .agent-modal-body{
  display:flex;
  gap:20px;
}
#agent-modal .agent-col-left,
#agent-modal .agent-col-right{
  flex:1;
  display:flex;
  flex-direction:column;
}
#agent-modal .agent-col-right{
  overflow-y:auto;
  max-height:60vh;
}
#agent-modal textarea{
  min-height:150px;
}
#agent-modal .agent-collapse{
  margin-top:10px;
}
#agent-modal .agent-collapse>summary{
  cursor:pointer;
  font-weight:600;
  margin-bottom:6px;
}

#details-content table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
}

#details-content th, #details-content td {
  border-bottom: 1px solid #f0f0f0;
  padding: 6px 8px;
  text-align: left;
}

#details-content tr:last-child td {
  border-bottom: none;
}

#unauthorized {
  text-align: center;
  margin-top: 40px;
  color: #e53e3e;
  font-size: 1.2em;
  font-weight: 600;
}

#logout-btn {
  margin-top: 24px;
  background: #fff2;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

#logout-btn:hover {
  background: #fff4;
}

#preview {
  width: 370px;
  border-left: 1.5px solid #e3e8ee;
  padding: 28px 20px 20px 20px;
  box-sizing: border-box;
  position: relative;
  display: flex;
  flex-direction: column;
  background: #f7f9fb;
  min-width: 320px;
}

#preview-handle {
  position: absolute;
  left: -7px;
  top: 0;
  bottom: 0;
  width: 14px;
  cursor: ew-resize;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

#preview-handle i {
  background: white;
  padding: 9px 3px;
  color: gray;
  border-radius: 5px;
  box-shadow: 0 0 10px 0px #d5d3d3;
}

#address-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  margin-bottom: 10px;
}

#address-bar input {
  flex: 1;
  padding: 7px 10px;
  border-radius: 6px;
  border: 1px solid #e3e8ee;
  font-size: 1em;
}

#address-bar button {
  padding: 7px 16px;
  border-radius: 6px;
  border: none;
  background: #3b82f6;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
#address-bar button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#address-bar button:hover {
  background: #2563eb;
}

#preview h3 {
  display: flex;
  align-items: center;
  gap: 6px;
}

.info-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  cursor: pointer;
}

.info-icon .tooltip {
  position: absolute;
  right: 0;
  top: 20px;
  width: 220px;
  background: #111827;
  color: #f8fafc;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.75em;
  line-height: 1.4;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
  z-index: 20;
}

.info-icon:hover .tooltip,
.info-icon:focus-within .tooltip {
  opacity: 1;
  transform: translateY(0);
}

#preview-image-btn {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 1px solid #e3e8ee;
  background: #fff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border 0.15s;
}

#preview-image-btn:hover {
  background: #eff6ff;
}

#preview-image-btn.remove {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

#preview-container {
  flex: 1;
  position: relative;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 6px #0001;
  overflow: hidden;
}

#preview-container iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

#site-frame {
  border: none;
  z-index: 1;
}

#site-screenshot {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  z-index: 1;
  display: none;
}

#preview-static {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
  display: none;
}

#widget-frame {
  z-index: 2;
  background: transparent;
  border: none;
}

/* ----- Installation code snippet ----- */
.code-wrapper {
  position: relative;
  margin-bottom: 1rem;
}
.code-wrapper pre {
  background: #000;
  color: #fff;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 16px;
  overflow-x: auto;
  line-height: 1.45;
  text-wrap: auto;
}
.code-wrapper .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 1rem;
}
.code-wrapper .copy-btn:hover {
  color: lightgray;
}

.code-wrapper code .client-id {
  color: #ef4444;
}

#installation p {
  margin-bottom: 1rem;
  margin-top: 1rem;
  line-height: 1.6;
}

.gtm-steps {
  margin-bottom: 1rem;
  margin-left: 1.25rem;
}

.gtm-steps li {
  margin-bottom: 0.5rem;
}

.danger-btn {
  background: var(--danger-color);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin: 0;
}
.danger-btn:hover {
  background: #dc2626;
}

/* ----- Collapsible Data Sections ----- */
.data-section {
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 10px;
  margin-top: 24px;
}
.data-section .section-toggle {
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.data-section .title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 1.2em;
}
.data-section .count-badge {
  background: #6366f1;
  color: white;
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 0.85em;
  margin-left: 8px;
}
.data-section .chevron {
  margin-left: 8px;
  transition: transform 0.2s;
}
.data-section.collapsed .chevron {
  transform: rotate(-90deg);
}
.data-section .section-content {
  padding: 16px;
}
.data-section.collapsed .section-content {
  display: none;
}
#data {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.data-section.danger-zone {
  border-color: var(--danger-color);
  background: #fef2f2;
  /*margin-top: auto;*/
}
.data-section.danger-zone .section-toggle {
  color: var(--danger-color);
}
.data-section.danger-zone .section-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}
.data-section.danger-zone.collapsed .section-content {
  display: none;
}
.data-section.danger-zone h4 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  margin-bottom: 8px;
}
.hint-text {
  color: var(--text-muted);
  font-size: 0.9em;
  margin: 8px 0 16px;
}
.upgrade-note {
  background: #fef3c7;
  color: #92400e;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.9em;
  margin: 10px 0;
}
.suggestions-grid {
  display: grid;
  gap: 16px;
}
@media (min-width: 900px) {
  .suggestions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.suggestion-card {
  border: 1px solid var(--border-color);
  background: #f8fafc;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.suggestion-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.suggestion-card-header h4 {
  margin: 0 0 4px;
}
.suggestion-card-header p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9em;
}
.suggestion-card .pill-count {
  background: #e2e8f0;
  color: #334155;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 600;
  font-size: 0.85em;
}
.manual-suggestions-card.is-disabled {
  opacity: 0.45;
  filter: grayscale(0.4);
  pointer-events: none;
}
.suggestion-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
}
.suggestion-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.9em;
  color: #0f172a;
}
.suggestion-pill .pill-remove {
  border: none;
  background: #e2e8f0;
  color: #0f172a;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}
.suggestion-entry {
  display: flex;
  gap: 10px;
  align-items: center;
}
.suggestion-entry input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 0.95em;
}

.file-dropzone {
  border: 2px dashed #cbd5f5;
  background: #f8fafc;
  border-radius: 14px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  margin: 12px 0 20px;
}
.file-dropzone.is-dragging {
  border-color: #6366f1;
  background: #eef2ff;
}
.file-dropzone-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}
.file-drop-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #e0e7ff;
  color: #4338ca;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.file-drop-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.file-drop-text span {
  color: var(--text-muted);
  font-size: 0.9em;
}
.file-drop-name {
  font-size: 0.9em;
  color: #475569;
}

/* ----- Onboarding ----- */
.onboarding-container {
  display: none;
  height: 100vh;
}
.onboarding-wrapper {
  display: flex;
  height: 100%;
}
.onboarding-left,
.onboarding-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.onboarding-left img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.onboarding-right {
  flex-direction: column;
  background: #f7f9fb;
  text-align: left;
  padding: 0 20px;
  align-items: center;
}
.invite-logo {
  max-width: 200px;
  margin-bottom: 20px;
}
.onboarding-right h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}
.onboarding-right p {
  font-size: 1.2rem;
  color: #555;
  margin-bottom: 24px;
}
.onboarding-form {
  display: flex;
  gap: 8px;
  align-items: center;
  width: min(420px, 100%);
}
.onboarding-form input {
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 100%;
}
.onboarding-submit {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 20%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background 0.15s;
}
.onboarding-submit:hover {
  background: var(--primary-hover);
}
.onboarding-note {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
  margin-top: 24px;
  width: min(420px, 100%);
}
.onboarding-note h3 {
  margin: 0 0 6px 0;
  font-size: 1.1rem;
}
.onboarding-note p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
}
@media (max-width: 800px) {
  .onboarding-wrapper {
    flex-direction: column;
  }
  .onboarding-left {
    order: 2;
  }
}

.crawl-tabs {
  margin-top: 10px;
  border: 1px solid var(--border-color);
  padding: 10px;
  border-radius: 8px;
}
.tab-buttons {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}
.tab-btn {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border-color);
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
}
.tab-btn.active {
  background: var(--primary-color);
  color: #fff;
}
.tab-content label,
.tab-content textarea {
  display: block;
  margin-bottom: 12px;
}
.sitemap-row {
  display: flex;
  align-items: end;
  gap: 6px;
  margin-bottom: 6px;
}
.sitemap-status {
  font-size: 0.85em;
  color: var(--success-color);
}
.schedule-section {
  background: #f8f8f8;
  padding: 8px;
  border-radius: 8px;
  margin-top: 8px;
}
.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-style: solid;
  border-radius: 10px;
  padding: 10px;
  border-width: 1px;
}
#crawler-interval-unit {
  padding: 6px 8px;
  border-radius: 6px;
}

.usage-section {
  display: flex;
  gap: 40px;
}

.usage-stats {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.usage-graph {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.month-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 8px;
}

.month-nav-btn {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 4px 8px;
  cursor: pointer;
}

.month-nav-btn:hover {
  background: var(--border-color);
}

#query-month {
  border-radius: 6px;
  padding: 4px 6px;
  border-width: 1px;
  border-color: lightgray;
  border-style: solid;
  font-family: sans-serif;
}

#query-chart {
  width: 100%;
}

.query-count-wrapper {
  text-align: left;
  margin-bottom: 16px;
}

.query-count {
  font-size: 2.4rem;
  font-weight: 700;
}

.query-limit {
  color: var(--text-muted);
}

.gauge-row {
  display: flex;
  gap: 24px;
  margin-top: 10px;
  justify-content: flex-start;
}

.usage-gauge {
  text-align: center;
}

.gauge {
  position: relative;
  --pct: 0;
  --gauge-color: #3b82f6;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: conic-gradient(var(--gauge-color) calc(var(--pct)*100%), #e5e7eb 0);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-weight: 600;
}

.gauge::after {
  content: "";
  position: absolute;
  inset: 15%;
  background: #fff;
  border-radius: 50%;
  z-index: 0;
}

.gauge i {
  position: relative;
  z-index: 1;
  font-size: 1.4rem;
  color: var(--text-color);
}

.gauge.gold {
  --gauge-color: #d4af37;
}


.pricing-card.current-plan {
  border: 2px solid #007bff;
  box-shadow: 0 4px 18px rgba(0, 123, 255, 0.08);
}

.pricing-card.current-plan .plan-cta {
  background: var(--success-color);
  cursor: default;
}
.lock-msg {
  border: 1px dashed #ccc;
  padding: 24px;
  margin: 20px 0;
  text-align: center;
  background: #fafafa;
  border-radius: 8px;
}
.lock-msg button {
  margin-top: 10px;
}

.icon-select {
  font-family: "Font Awesome 6 Free", Arial, sans-serif;
  font-weight: 900;
}

.icon-select option {
  font-family: "Font Awesome 6 Free", Arial, sans-serif;
}
