/* Phase 2 visual bridge: help, support and library surfaces. */
body.dashboard-client-flat-theme.help-body > .shell,
body.dashboard-client-flat-theme.support-tickets-body > .shell,
body.dashboard-client-flat-theme.help-agent-body > .shell,
body.dashboard-client-flat-theme > .shell {
  background: var(--lf-color-bg) !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .help-toolbar,
  .help-guide,
  .help-topic-card,
  .help-support-card,
  .library-hero,
  .library-card,
  .library-index,
  .library-step,
  .library-note,
  .ticket-stat,
  .ticket-list-panel,
  .ticket-detail-panel,
  .ticket-detail-meta div,
  .ticket-conversation,
  .ticket-note-box,
  .support-card,
  .support-panel,
  .support-side-card,
  .support-trust-strip
) {
  min-width: 0 !important;
  border: 1px solid var(--lf-color-border) !important;
  border-radius: var(--lf-radius-lg) !important;
  background: var(--lf-color-surface) !important;
  color: var(--lf-color-text) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .help-guide,
  .help-topic-card,
  .help-support-card,
  .library-card,
  .library-index,
  .ticket-detail-panel,
  .support-card,
  .support-panel,
  .support-side-card,
  .support-trust-strip
) {
  padding: var(--lf-space-5) !important;
}

body.dashboard-client-flat-theme > .shell :is(.library-hero) {
  padding: var(--lf-space-6) !important;
}

body.dashboard-client-flat-theme > .shell .library-hero::after {
  display: none !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .help-section-title,
  .help-topic-card h3,
  .help-guide h3,
  .help-support-card h3,
  .library-hero h1,
  .library-card h2,
  .library-index h3,
  .library-step strong,
  .ticket-stat strong,
  .ticket-detail-head h2,
  .ticket-detail-meta strong,
  .ticket-conversation p,
  .support-hero h1,
  .support-card h3,
  .support-panel h2,
  .support-side-card h3,
  .trust-item strong
) {
  color: var(--lf-color-text) !important;
  letter-spacing: 0 !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .library-hero h1,
  .support-hero h1
) {
  font-size: clamp(30px, 3vw, 42px) !important;
  line-height: var(--lf-line-tight) !important;
  font-weight: 900 !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .help-guide p,
  .help-topic-card p,
  .help-support-card p,
  .library-hero p,
  .library-card p,
  .library-step p,
  .library-checklist li,
  .ticket-stat span,
  .ticket-detail-meta span,
  .ticket-conversation span,
  .support-hero p,
  .support-card p,
  .support-panel p,
  .support-side-card p,
  .trust-item span
) {
  color: var(--lf-color-muted) !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .help-search,
  .support-admin-search,
  .ticket-list-controls select,
  .ticket-status-select,
  .ticket-note-box textarea
) {
  min-height: 42px !important;
  border: 1px solid var(--lf-color-border) !important;
  border-radius: var(--lf-radius-md) !important;
  background: var(--lf-color-surface) !important;
  color: var(--lf-color-text) !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .help-search input,
  .support-admin-search,
  .ticket-list-controls select,
  .ticket-status-select,
  .ticket-note-box textarea
) {
  color: var(--lf-color-text) !important;
  font-size: var(--lf-font-size-sm) !important;
  font-weight: 800 !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .help-search:focus-within,
  .support-admin-search:focus,
  .ticket-list-controls select:focus,
  .ticket-status-select:focus,
  .ticket-note-box textarea:focus
) {
  border-color: var(--lf-color-primary) !important;
  box-shadow: var(--lf-focus-ring) !important;
  outline: none !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .help-index a,
  .help-button,
  .library-button,
  .ticket-primary-button,
  .ticket-followup-link,
  .support-button,
  .support-link-button,
  .tickets-all-link,
  .ai-send-button
) {
  min-height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--lf-space-2) !important;
  border: 1px solid var(--lf-color-border) !important;
  border-radius: var(--lf-radius-md) !important;
  background: var(--lf-color-surface-muted) !important;
  color: var(--lf-color-text) !important;
  box-shadow: none !important;
  font-size: var(--lf-font-size-sm) !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-decoration: none !important;
  text-transform: none !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .help-button,
  .library-button.primary,
  .ticket-primary-button,
  .support-button,
  .support-link-button,
  .ai-send-button
) {
  border-color: transparent !important;
  background: var(--lf-color-primary) !important;
  color: #ffffff !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .help-index a:hover,
  .library-index a:hover,
  .library-index a.active,
  .ticket-row.is-active,
  .ticket-row:hover
) {
  border-color: color-mix(in srgb, var(--lf-color-primary) 22%, transparent) !important;
  background: var(--lf-color-primary-soft) !important;
  color: var(--lf-color-primary) !important;
}

body.dashboard-client-flat-theme > .shell :is(
  .help-kicker,
  .library-eyebrow,
  .ticket-pill,
  .library-step span,
  .help-steps span
) {
  min-height: 26px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: var(--lf-space-1) !important;
  width: fit-content !important;
  padding: 4px 9px !important;
  border: 1px solid color-mix(in srgb, var(--lf-color-primary) 18%, transparent) !important;
  border-radius: var(--lf-radius-pill) !important;
  background: var(--lf-color-primary-soft) !important;
  color: var(--lf-color-primary) !important;
  font-size: var(--lf-font-size-xs) !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}

body.dashboard-client-flat-theme > .shell :is(.ticket-pill--open) {
  border-color: color-mix(in srgb, var(--lf-color-success) 22%, transparent) !important;
  background: color-mix(in srgb, var(--lf-color-success) 10%, transparent) !important;
  color: var(--lf-color-success) !important;
}

body.dashboard-client-flat-theme > .shell :is(.ticket-pill--waiting) {
  border-color: color-mix(in srgb, var(--lf-color-warning) 26%, transparent) !important;
  background: color-mix(in srgb, var(--lf-color-warning) 12%, transparent) !important;
  color: var(--lf-color-warning) !important;
}

body.dashboard-client-flat-theme > .shell :is(.ticket-pill--done) {
  border-color: color-mix(in srgb, var(--lf-color-muted) 22%, transparent) !important;
  background: var(--lf-color-surface-muted) !important;
  color: var(--lf-color-muted) !important;
}

body.dashboard-client-flat-theme > .shell :is(.help-topic-icon, .support-card-icon) {
  width: 46px !important;
  min-width: 46px !important;
  height: 46px !important;
  display: inline-grid !important;
  place-items: center !important;
  border: 1px solid color-mix(in srgb, var(--lf-color-primary) 18%, transparent) !important;
  border-radius: var(--lf-radius-md) !important;
  background: var(--lf-color-primary-soft) !important;
  color: var(--lf-color-primary) !important;
  box-shadow: none !important;
}

body.dashboard-client-flat-theme > .shell :is(.help-steps li, .library-step, .library-note) {
  border: 1px solid var(--lf-color-border) !important;
  border-radius: var(--lf-radius-md) !important;
  background: var(--lf-color-surface-muted) !important;
}

body.dashboard-client-flat-theme > .shell :is(.ticket-admin-table, .ticket-table) {
  width: 100% !important;
  border-collapse: collapse !important;
}

body.dashboard-client-flat-theme > .shell :is(.ticket-admin-table th, .ticket-admin-table td, .ticket-table th, .ticket-table td) {
  padding: var(--lf-space-3) var(--lf-space-4) !important;
  border-bottom: 1px solid var(--lf-color-border) !important;
  color: var(--lf-color-text) !important;
}

body.dashboard-client-flat-theme > .shell :is(.ticket-admin-table th, .ticket-table th) {
  color: var(--lf-color-muted) !important;
  font-size: var(--lf-font-size-xs) !important;
  font-weight: 900 !important;
  letter-spacing: 0.02em !important;
  text-transform: uppercase !important;
}

body.dashboard-client-flat-theme > .shell :is(.support-admin-grid, .help-agent-layout, .library-shell) {
  min-width: 0 !important;
}

@media (max-width: 980px) {
  body.dashboard-client-flat-theme > .shell :is(.support-admin-page, .help-page, .help-agent-page) {
    padding-inline: var(--lf-space-4) !important;
  }

  body.dashboard-client-flat-theme > .shell :is(.help-support-card, .ticket-detail-head, .support-hero) {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  body.dashboard-client-flat-theme > .shell :is(.ticket-list-controls, .ticket-detail-meta) {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 720px) {
  body.dashboard-client-flat-theme > .shell .dashboard-welcome-title {
    font-size: 24px !important;
  }

  body.dashboard-client-flat-theme > .shell :is(.panel, .lf-panel) {
    padding: var(--lf-space-4) !important;
  }
}

