:root {
  --ux-primary: #365cf5;
  --ux-muted: #64748b;
  --ux-surface: #f8fafc;
  --ux-border: #e2e8f0;
  --ux-radius: 12px;
  --ux-shadow: 0 12px 30px rgba(54, 92, 245, 0.08);
}

/* Alerts — PlainAdmin styles target .alert-box > .alert, but we render flat */
.alert-box.primary-alert,
.alert-box.success-alert,
.alert-box.danger-alert,
.alert-box.warning-alert,
.alert-box.info-alert {
  border-radius: var(--ux-radius);
  padding: 14px 44px 14px 16px;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  box-shadow: var(--ux-shadow);
}

.alert-box.primary-alert {
  color: #1e3a8a;
  background: #eef2ff;
  border: 1px solid #93c5fd;
  border-left: 4px solid var(--ux-primary);
}

.alert-box.success-alert {
  color: #14532d;
  background: #ecfdf5;
  border: 1px solid #86efac;
  border-left: 4px solid #219653;
}

.alert-box.danger-alert {
  color: #7f1d1d;
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-left: 4px solid #d50100;
}

.alert-box.warning-alert {
  color: #78350f;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-left: 4px solid #f59e0b;
}

.alert-box.info-alert {
  color: #1e3a5f;
  background: #eff6ff;
  border: 1px solid #93c5fd;
  border-left: 4px solid #3b82f6;
}

.alert-box .alert {
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  width: 100%;
}

.alert-dismissible {
  position: relative;
  padding-right: 2.75rem;
}

.alert-dismissible .alert-close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  font-size: 1.35rem;
  line-height: 1;
  opacity: 0.55;
  cursor: pointer;
  padding: 0 4px;
  color: inherit;
}

.alert-dismissible .alert-close:hover {
  opacity: 1;
}

/* Header */
.header-balance-widget {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  margin-right: 8px;
  max-width: 100%;
}

.header-balance-widget .balance-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--ux-surface);
  border: 1px solid var(--ux-border);
  font-size: 13px;
  color: #1e293b;
  text-decoration: none;
  white-space: nowrap;
}

.header-balance-widget .balance-item--trial {
  background: #eef2ff;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.header-balance-widget .balance-item--trial:hover {
  border-color: var(--ux-primary);
  color: var(--ux-primary);
}

.header-balance-widget a:hover {
  border-color: var(--ux-primary);
  color: var(--ux-primary);
}

.header-balance-widget .balance-label {
  color: var(--ux-muted);
  font-size: 12px;
}

.header-balance-widget .balance-limit {
  font-size: 11px;
  font-weight: 500;
  color: var(--ux-muted);
}

.header-tokens-summary {
  color: #475569;
}

@media (min-width: 1200px) {
  .menu-toggle-btn {
    display: none !important;
  }

  .sidebar-nav-wrapper {
    transform: translateX(0) !important;
  }

  .main-wrapper {
    margin-left: 250px;
  }

  .main-wrapper.active {
    margin-left: 250px;
  }
}

@media (max-width: 767px) {
  .header-balance-widget {
    gap: 4px;
    margin-right: 4px;
  }

  .header-balance-widget .balance-item--rub {
    display: none;
  }

  .header-balance-widget .balance-label {
    display: none;
  }

  .header-balance-widget .balance-item {
    padding: 5px 8px;
    font-size: 12px;
  }

  .header-right {
    flex-wrap: nowrap;
    justify-content: flex-end;
  }

  .profile-box .user-info {
    display: none;
  }
}

/* Guest landing */
.guest-hero {
  background: linear-gradient(135deg, #365cf5 0%, #5b7cfa 55%, #7c93fb 100%);
  border-radius: var(--ux-radius);
  color: #fff;
  padding: 40px 32px;
  margin-bottom: 30px;
}

.guest-hero h2 {
  color: #fff;
  margin-bottom: 12px;
}

.guest-hero p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 24px;
  max-width: 560px;
}

.guest-steps {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 30px;
}

.guest-step {
  background: #fff;
  border: 1px solid var(--ux-border);
  border-radius: var(--ux-radius);
  padding: 20px;
}

.guest-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(54, 92, 245, 0.12);
  color: var(--ux-primary);
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: 48px 24px;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(54, 92, 245, 0.1);
  color: var(--ux-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-bottom: 16px;
}

/* Token cost tooltip */
.token-cost {
  cursor: help;
  font-weight: 600;
}

.token-cost .token-symbol,
.token-symbol {
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Project domain link */
.project-domain-link {
  color: var(--ux-primary);
  font-weight: 600;
  text-decoration: none;
}

.project-domain-link:hover {
  color: #1e3a8a;
  text-decoration: underline;
}

.project-list-name-link {
  color: #1e40af;
  font-weight: 700;
  text-decoration: none;
}

.project-list-name-link:hover {
  color: #1e3a8a;
  text-decoration: underline;
}

.project-list-actions {
  min-width: 140px;
}

/* Project detail actions */
.project-actions-primary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.project-danger-zone {
  border-top: 1px solid var(--ux-border);
  padding-top: 16px;
  margin-top: 8px;
}

.project-danger-zone summary {
  cursor: pointer;
  color: var(--ux-muted);
  font-size: 13px;
  user-select: none;
}

.project-danger-zone .button-group {
  margin-top: 12px;
}

/* Background task progress */
.task-progress {
  height: 6px;
  background: var(--ux-border);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 6px;
}

.task-progress-bar {
  height: 100%;
  background: var(--ux-primary);
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* Billing plan cards */
.plan-card {
  border: 1px solid var(--ux-border);
  border-radius: var(--ux-radius);
  padding: 20px;
  height: 100%;
  background: #fff;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.plan-card.plan-card-active {
  border-color: var(--ux-primary);
  box-shadow: var(--ux-shadow);
}

.plan-card-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(54, 92, 245, 0.12);
  color: var(--ux-primary);
  margin-bottom: 10px;
}

.plan-card-benefits,
.plan-table-benefits {
  list-style: none;
  margin: 0;
  padding: 0;
}

.plan-card-benefits li,
.plan-table-benefits li {
  position: relative;
  padding-left: 1.35em;
  margin-bottom: 0.45em;
  line-height: 1.45;
}

.plan-card-benefits li:last-child,
.plan-table-benefits li:last-child {
  margin-bottom: 0;
}

.plan-card-benefits li::before,
.plan-table-benefits li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--ux-primary);
  font-weight: 700;
}

.plan-table-benefits {
  max-width: 320px;
}

.plan-table-benefits li {
  font-size: 12px;
  margin-bottom: 0.35em;
}

/* Billing page */
.billing-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.billing-stat-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--ux-border);
  border-radius: var(--ux-radius);
  background: #fff;
}

.billing-stat-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.billing-stat-icon--rub {
  background: #ecfdf5;
  color: #166534;
}

.billing-stat-icon--tokens {
  background: #eef2ff;
  color: #1e40af;
}

.billing-stat-icon--plan {
  background: #fffbeb;
  color: #92400e;
}

.billing-stat-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ux-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.billing-stat-value {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #0f172a;
}

.billing-stat-value--sm {
  font-size: 20px;
}

.billing-stat-unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--ux-muted);
}

.billing-stat-hint {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--ux-muted);
}

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

.billing-form-row--inline {
  max-width: 420px;
}

.billing-form-field {
  min-width: 0;
}

.billing-form-action {
  min-width: 200px;
}

.billing-form-action--auto {
  min-width: 160px;
}

.billing-details summary {
  cursor: pointer;
  user-select: none;
}

.billing-price-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.billing-plan-row--active {
  background: rgba(54, 92, 245, 0.04);
}

.billing-operations-table td,
.billing-services-table td,
.billing-plans-table td {
  vertical-align: middle;
}

.billing-amount {
  white-space: nowrap;
}

@media (max-width: 991px) {
  .billing-summary {
    grid-template-columns: 1fr;
  }

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

  .billing-form-action,
  .billing-form-action--auto {
    min-width: 0;
  }
}

/* Project form checklist */
.onboarding-checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.onboarding-checklist li {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ux-border);
  font-size: 14px;
  color: var(--ux-muted);
}

.onboarding-checklist li:last-child {
  border-bottom: 0;
}

.onboarding-checklist .step-num {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ux-surface);
  border: 1px solid var(--ux-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
}

/* Tools search */
.tools-search-wrap {
  margin-bottom: 24px;
}

.tools-search-wrap input {
  max-width: 420px;
}

.tool-card-link.tool-hidden {
  display: none;
}

.tools-recent {
  margin-bottom: 30px;
}

/* Mobile project cards */
.project-mobile-card {
  border: 1px solid var(--ux-border);
  border-radius: var(--ux-radius);
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
}

/* Focus visible */
.main-btn:focus-visible,
.form-control:focus-visible,
a:focus-visible {
  outline: 2px solid var(--ux-primary);
  outline-offset: 2px;
}

/* Sitemap summary */
.sitemap-summary {
  font-size: 13px;
}

/* Project pages table — keywords & row actions */
.project-pages-table td {
  vertical-align: middle;
}

.project-pages-table__url-col {
  width: 52px;
  text-align: center;
}

.project-pages-table__count-col {
  width: 72px;
  text-align: center;
  white-space: nowrap;
}

.project-pages-table__actions-col {
  min-width: 200px;
}

.project-pages-table__actions-col .page-row-actions {
  flex-wrap: wrap;
  gap: 6px;
}

.page-url-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: var(--ux-primary);
  background: rgba(54, 92, 245, 0.08);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.page-url-link:hover {
  color: #fff;
  background: var(--ux-primary);
}

.page-keyword-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--ux-primary);
  background: rgba(54, 92, 245, 0.1);
}

.project-pages-keywords {
  min-width: 220px;
}

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

.keyword-list-empty {
  margin: 0 0 4px;
}

.keyword-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.keyword-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  background: rgba(54, 92, 245, 0.1);
  color: var(--ux-primary);
  max-width: 100%;
  word-break: break-word;
}

.chip-actions,
.page-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.page-row-actions {
  justify-content: flex-start;
}

.page-row-action-form {
  display: inline-flex;
  margin: 0;
}

.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--ux-border);
  border-radius: 8px;
  background: #fff;
  color: var(--ux-muted);
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.icon-action:hover {
  text-decoration: none;
}

.icon-action--primary:hover,
.icon-action--primary:focus-visible {
  color: var(--ux-primary);
  border-color: rgba(54, 92, 245, 0.35);
  background: rgba(54, 92, 245, 0.06);
}

.icon-action--warn:hover,
.icon-action--warn:focus-visible {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}

.icon-action--danger:hover,
.icon-action--danger:focus-visible {
  color: #dc3545;
  border-color: rgba(220, 53, 69, 0.35);
  background: rgba(220, 53, 69, 0.06);
}

.keyword-add-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ux-primary);
  text-decoration: none;
}

.keyword-add-link:hover {
  text-decoration: underline;
}

.keyword-add-cost .token-cost {
  font-size: 12px;
  font-weight: 600;
  color: var(--ux-muted);
}

.page-row-action-hint {
  margin: 4px 0 0;
  font-size: 11px;
  color: var(--ux-muted);
  line-height: 1.2;
}

.page-row-action-hint .token-cost {
  cursor: default;
  font-weight: 600;
}

/* Project keywords table */
.project-keywords-table td {
  vertical-align: middle;
}

/* Onboarding & keyword preview */
.project-onboarding-card,
.project-create-guide {
  border: 1px solid var(--ux-border);
  border-radius: var(--ux-radius);
  padding: 20px;
  background: #fff;
}

.project-onboarding-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-onboarding-step {
  border: 1px solid var(--ux-border);
  border-radius: var(--ux-radius);
  padding: 16px;
  background: var(--ux-surface);
}

.project-onboarding-step.is-current {
  border-color: var(--ux-primary);
  background: rgba(54, 92, 245, 0.04);
  box-shadow: var(--ux-shadow);
}

.project-onboarding-step.is-done {
  opacity: 0.85;
}

.project-onboarding-step-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.project-onboarding-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--ux-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--ux-primary);
}

.project-onboarding-step.is-current .project-onboarding-step-num {
  background: var(--ux-primary);
  border-color: var(--ux-primary);
  color: #fff;
}

.project-onboarding-hints {
  margin: 0;
  padding-left: 18px;
}

.project-onboarding-hints li {
  margin-bottom: 6px;
}

.project-onboarding-limits summary {
  cursor: pointer;
  color: var(--ux-muted);
}

.keyword-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.keyword-chip--muted {
  background: var(--ux-surface);
  color: var(--ux-muted);
  border: 1px dashed var(--ux-border);
}

.page-row-actions--stacked {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

#page-keywords-modal .modal-body textarea {
  min-height: 200px;
  font-size: 14px;
  line-height: 1.5;
}

/* Softer, high-contrast buttons (override PlainAdmin neon fills) */
.main-btn {
  font-weight: 600;
  border-radius: 8px;
  box-shadow: none;
  padding: 10px 18px;
  font-size: 14px;
  line-height: 1.35;
  gap: 8px;
}

.main-btn i {
  color: inherit;
  opacity: 0.95;
}

.main-btn.primary-btn {
  background: #1e40af;
  border-color: #1e40af;
  color: #fff;
}

.main-btn.primary-btn:hover,
.main-btn.primary-btn:focus-visible {
  background: #1e3a8a;
  border-color: #1e3a8a;
  color: #fff;
}

.main-btn.secondary-btn {
  background: #fff;
  border-color: #93c5fd;
  color: #1e3a8a;
}

.main-btn.secondary-btn:hover,
.main-btn.secondary-btn:focus-visible {
  background: #eff6ff;
  border-color: #60a5fa;
  color: #1e3a8a;
}

.main-btn.warning-btn {
  background: #fffbeb;
  border-color: #d97706;
  color: #92400e;
}

.main-btn.warning-btn:hover,
.main-btn.warning-btn:focus-visible {
  background: #fef3c7;
  border-color: #b45309;
  color: #78350f;
}

.main-btn.danger-btn {
  background: #fff;
  border-color: #fca5a5;
  color: #991b1b;
}

.main-btn.danger-btn:hover,
.main-btn.danger-btn:focus-visible {
  background: #fef2f2;
  border-color: #f87171;
  color: #7f1d1d;
}

.main-btn.light-btn {
  background: #fff;
  border-color: #cbd5e1;
  color: #334155;
}

.main-btn.light-btn:hover,
.main-btn.light-btn:focus-visible {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #1e293b;
}

.main-btn.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  gap: 6px;
}

.main-btn.btn-sm i {
  font-size: 15px;
}

/* Status pills in tables — less neon */
.status-btn.success-btn {
  background: #ecfdf5;
  color: #166534;
  border: 1px solid #86efac;
}

.status-btn.active-btn {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #93c5fd;
}

.status-btn.danger-btn {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.status-btn.light-btn {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* Project progress wizard */
.project-progress-card {
  border-left: 4px solid #1e40af;
  background: linear-gradient(135deg, #eff6ff 0%, #fff 55%);
}

.project-progress-card--done {
  border-left-color: #166534;
  background: linear-gradient(135deg, #ecfdf5 0%, #fff 55%);
}

.project-progress-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 14px;
}

.project-progress-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #1e40af;
  color: #fff;
}

.project-progress-badge--done {
  background: #166534;
}

.project-progress-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.project-progress-segment {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
}

.project-progress-segment--done {
  background: #22c55e;
}

.project-progress-segment--current {
  background: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.project-progress-labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
}

.project-progress-label {
  font-size: 11px;
  color: var(--ux-muted);
  text-align: center;
  line-height: 1.3;
}

.project-progress-label--current {
  color: #1e40af;
  font-weight: 600;
}

.project-progress-label--done {
  color: #166534;
}

.project-progress-now {
  padding: 14px 16px;
  border-radius: var(--ux-radius);
  background: #fff;
  border: 1px solid #bfdbfe;
}

.project-progress-now-title {
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
  margin: 0;
}

.project-onboarding-summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  list-style: none;
}

.project-onboarding-summary::-webkit-details-marker {
  display: none;
}

.project-step-tag {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #166534;
}

.project-step-tag--now {
  background: #dbeafe;
  color: #1e40af;
}

.project-onboarding-step--current {
  border-color: #93c5fd;
  background: rgba(59, 130, 246, 0.06);
}

.project-onboarding-step--done {
  opacity: 0.92;
}

.user-avatar {
  overflow: hidden;
  border-radius: 50%;
  background: #eef2ff;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
}

.header .profile-info .user-avatar {
  width: 44px;
  height: 44px;
}

.header .author-info .user-avatar {
  width: 40px;
  height: 40px;
}

.user-avatar--profile {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
}

.trial-welcome-modal {
  border: 0;
  border-radius: var(--ux-radius);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.16);
}

.trial-welcome-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ux-primary);
}

.trial-welcome-lead {
  color: var(--ux-muted);
  font-size: 14px;
  line-height: 1.5;
}

.trial-welcome-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.trial-welcome-list li {
  padding: 14px 16px;
  border: 1px solid var(--ux-border);
  border-radius: var(--ux-radius);
  background: var(--ux-surface);
}

.trial-welcome-list__label {
  display: block;
  font-size: 13px;
  color: var(--ux-muted);
  margin-bottom: 4px;
}

.trial-welcome-list__value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #0f172a;
}

.trial-welcome-list__hint {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--ux-muted);
}

.queries-view-tabs .main-btn {
  min-width: 120px;
}

.queries-by-page {
  display: grid;
  gap: 12px;
}

.queries-page-group {
  border: 1px solid var(--ux-border);
  border-radius: var(--ux-radius);
  background: #fff;
  overflow: hidden;
}

.queries-page-group__summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  padding: 14px 16px;
}

.queries-page-group__summary::-webkit-details-marker {
  display: none;
}

.queries-page-group__url {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 10px;
  min-width: 0;
}

.queries-page-group__title {
  color: #0f172a;
  font-size: 15px;
  font-weight: 600;
}

.queries-page-group__body {
  border-top: 1px solid var(--ux-border);
  padding: 0 16px 16px;
}

.queries-page-group--unlinked .queries-page-group__summary {
  background: var(--ux-surface);
}

/* ========== Mobile layout fixes ========== */
.min-width-0 {
  min-width: 0;
}

body.sidebar-open {
  overflow: hidden;
}

@media (max-width: 767px) {
  .header {
    padding: 12px 0;
  }

  .header .header-left .menu-toggle-btn .main-btn {
    padding: 8px 10px;
    font-size: 13px;
  }

  .header .header-left .menu-toggle-btn .menu-toggle-label {
    display: none;
  }

  .header .header-right {
    flex-wrap: wrap;
    gap: 6px;
    max-width: 100%;
  }

  .header .header-right .dropdown-menu {
    width: min(350px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
  }

  .title-wrapper.pt-30 {
    padding-top: 16px !important;
  }

  .title-wrapper h2 {
    font-size: 1.35rem;
    line-height: 1.3;
    word-break: break-word;
  }

  .breadcrumb-wrapper .breadcrumb {
    flex-wrap: wrap;
    word-break: break-word;
  }

  .guest-hero {
    padding: 28px 20px;
  }

  .card-style {
    padding: 16px;
  }

  .queries-view-tabs .main-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    justify-content: center;
  }

  .project-progress-labels,
  .project-progress-track {
    gap: 4px;
  }

  .project-progress-label {
    font-size: 10px;
  }

  .table td,
  .table th {
    word-break: break-word;
  }

  .table-wrapper {
    -webkit-overflow-scrolling: touch;
  }

  .main-btn.btn-hover {
    max-width: 100%;
  }

  .modal-dialog {
    margin: 12px;
    max-width: calc(100vw - 24px);
  }

  .messages-flash.container-fluid {
    padding-left: 20px;
    padding-right: 20px;
  }

  .background-task-mobile-card .status-btn {
    flex-shrink: 0;
  }
}

@media (max-width: 399px) {
  .header-balance-widget .balance-item {
    padding: 4px 6px;
    font-size: 11px;
  }

  .project-progress-labels {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .project-progress-label {
    text-align: left !important;
  }
}
