:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #eef2f6;
  --line: #e4e8ef;
  --line-strong: #d5dce6;
  --text: #26313f;
  --text-soft: #7a8597;
  --accent: #ff5f45;
  --accent-strong: #ef4427;
  --success: #16b364;
  --success-soft: rgba(22, 179, 100, 0.18);
  --warning: #f5a524;
  --warning-soft: rgba(245, 165, 36, 0.18);
  --danger: #f04438;
  --danger-soft: rgba(240, 68, 56, 0.12);
  --shadow-card: 0 16px 32px rgba(15, 23, 42, 0.06);
  --radius-lg: 22px;
  --radius-md: 16px;
}

html {
  min-height: 100%;
  font-size: 15px;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 95, 69, 0.08), transparent 24%),
    radial-gradient(circle at top right, rgba(22, 179, 100, 0.08), transparent 22%),
    linear-gradient(180deg, #f9fafc 0%, #f3f5f9 42%, #eef2f7 100%);
  font-family: "Segoe UI Variable Text", "Bahnschrift", "Segoe UI", sans-serif;
}

h1,
h2,
h3,
h4,
.display-title {
  font-family: "Segoe UI Variable Display", "Franklin Gothic Medium", "Bahnschrift", sans-serif;
  letter-spacing: -0.03em;
}

a {
  color: inherit;
  text-decoration: none;
}

code {
  color: #cf3f2e;
  background: rgba(255, 95, 69, 0.08);
  padding: 0.12rem 0.4rem;
  border-radius: 0.45rem;
}

.dashboard-page {
  min-height: 100vh;
  height: 100vh;
  overflow: hidden;
}

.app-shell {
  height: 100vh;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 1.25rem;
  padding: 1.25rem;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 92px minmax(0, 1fr);
}

.app-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 1.25rem;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  padding: 1.25rem;
  border-radius: 28px;
  background: rgba(14, 16, 24, 0.92);
  color: #f8fafc;
  box-shadow: 0 25px 60px rgba(15, 23, 42, 0.25);
}

.app-sidebar::-webkit-scrollbar {
  display: none;
}

body.sidebar-collapsed .app-sidebar {
  padding: 1rem 0.75rem;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.sidebar-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: -0.15rem;
  padding: 0.75rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(248, 250, 252, 0.88);
  font-weight: 700;
  transition: background 0.15s ease, transform 0.15s ease;
}

.sidebar-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
}

.sidebar-toggle svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

body.sidebar-collapsed .sidebar-toggle {
  justify-content: center;
  padding-inline: 0;
}

body.sidebar-collapsed .sidebar-toggle__label {
  display: none;
}

.brand-mark__logo {
  width: 84px;
  height: 84px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #2f9a43 0%, #6dbf41 100%);
  box-shadow: 0 12px 22px rgba(37, 116, 52, 0.18);
  flex: 0 0 auto;
}

.brand-mark__logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.brand-mark__content {
  display: grid;
  gap: 0.25rem;
}

.brand-mark__title {
  color: #17795e;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark__subtitle {
  display: grid;
  gap: 0.22rem;
  color: #6d7f98;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  text-transform: uppercase;
}

body.sidebar-collapsed .brand-mark {
  justify-content: center;
}

body.sidebar-collapsed .brand-mark__content {
  display: none;
}

body.sidebar-collapsed .brand-mark__logo {
  width: 60px;
  height: 60px;
}

body.sidebar-collapsed .brand-mark__logo img {
  width: 34px;
  height: 34px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.sidebar-card {
  padding: 1rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.03);
}

.sidebar-card--soft {
  background: rgba(255, 255, 255, 0.05);
}

.sidebar-label {
  color: rgba(248, 250, 252, 0.6);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.sidebar-collapsed .sidebar-label {
  display: none;
}

.sidebar-user {
  display: grid;
  gap: 0.25rem;
}

.sidebar-user strong {
  font-size: 1.05rem;
}

.sidebar-user span {
  color: rgba(248, 250, 252, 0.7);
}

.sidebar-note {
  color: rgba(248, 250, 252, 0.68);
  line-height: 1.6;
}

.sidebar-meta {
  margin-top: 0.2rem;
}

.sidebar-nav {
  display: grid;
  gap: 0.8rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #fff;
  transition: transform 0.15s ease, background 0.15s ease;
}

.sidebar-link:hover {
  transform: translateX(3px);
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-link__icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.22);
}

.sidebar-link__icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
  color: #fff;
}

.sidebar-link span {
  display: grid;
}

body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 0.9rem;
}

body.sidebar-collapsed .sidebar-link > span:last-child {
  display: none;
}

.sidebar-link strong {
  font-size: 0.96rem;
}

.sidebar-link small {
  color: rgba(248, 250, 252, 0.68);
  font-size: 0.82rem;
}

.sidebar-tile-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sidebar-mini-tile {
  padding: 0.85rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(148, 163, 184, 0.12);
}

.sidebar-mini-tile__label {
  display: block;
  color: rgba(248, 250, 252, 0.55);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
}

.sidebar-actions {
  margin-top: auto;
}

body.sidebar-collapsed .sidebar-actions {
  align-items: center;
}

.app-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
  max-height: calc(100vh - 2.5rem);
  overflow-y: auto;
  padding-right: 0.15rem;
}

.app-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: var(--shadow-card);
}

.app-topbar__title {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.page-kicker,
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-title,
.hero-banner__title,
.dashboard-title {
  margin: 0.45rem 0 0.35rem;
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.98;
}

.page-title--compact {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.1;
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 1rem;
}

.app-flash {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.app-flash.is-hiding {
  opacity: 0;
  transform: translateY(-8px);
}

.app-flash__message {
  flex: 1;
  min-width: 0;
}

.app-flash--dismissible .app-flash__close {
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.hero-banner,
.panel-card,
.page-card,
.auth-card,
.info-box,
.detail-card,
.empty-state,
.error-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(213, 220, 230, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.hero-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 1rem;
  padding: 1.6rem;
}

.hero-banner__copy {
  max-width: 50rem;
}

.hero-banner__text,
.page-subtitle,
.dashboard-subtitle,
.helper-text {
  color: var(--text-soft);
  line-height: 1.65;
}

.hero-banner__stats {
  display: grid;
  gap: 1rem;
}

.stat-card {
  padding: 1.1rem 1.2rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.07), rgba(255, 255, 255, 0.95));
  border: 1px solid rgba(196, 181, 253, 0.55);
}

.stat-card__label,
.metric-label,
.form-label {
  display: block;
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-card strong {
  display: block;
  margin-top: 0.6rem;
  font-size: 1.9rem;
  letter-spacing: -0.04em;
}

.panel-card,
.page-card,
.auth-card,
.info-box {
  padding: 1.3rem;
}

.panel-card__header,
.page-card__header,
.auth-card__header,
.grid-header,
.detail-heading,
.toolbar-strip {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.auth-card__header--stacked {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 0;
}

.panel-card__title,
.section-title,
.grid-title {
  margin: 0;
  font-size: 1.2rem;
}

.panel-card__subtitle,
.grid-subtitle {
  margin: 0.3rem 0 0;
  color: var(--text-soft);
}

.action-group,
.stack-actions,
.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.form-actions--end {
  justify-content: flex-end;
}

.knowledge-record-shell {
  overflow: hidden;
}

.knowledge-record-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  margin: -0.2rem -0.2rem 1.25rem;
  border: 1px solid rgba(173, 187, 209, 0.36);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(239, 244, 251, 0.96), rgba(255, 255, 255, 0.98));
}

.knowledge-record-header--danger {
  border-color: rgba(220, 79, 69, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 244, 242, 0.98), rgba(255, 255, 255, 0.98));
}

.knowledge-record-header__mark {
  display: inline-flex;
  width: 3.1rem;
  min-width: 3.1rem;
  height: 3.1rem;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #4968ab;
  color: #fff;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.knowledge-record-header--danger .knowledge-record-header__mark {
  background: #c43b31;
}

.knowledge-record-header__body {
  min-width: 0;
}

.knowledge-record-header__topline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.knowledge-record-header__badge,
.knowledge-record-header__chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.85rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.knowledge-record-header__badge {
  background: rgba(73, 104, 171, 0.12);
  color: #3e5f9f;
}

.knowledge-record-header--danger .knowledge-record-header__badge {
  background: rgba(220, 79, 69, 0.12);
  color: #b8322a;
}

.knowledge-record-header__chip {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(173, 187, 209, 0.4);
  color: var(--text);
}

.knowledge-record-header__title {
  margin: 0;
  color: var(--text);
  font-size: 1.45rem;
  line-height: 1.15;
  font-weight: 900;
}

.knowledge-record-header__text {
  margin: 0.45rem 0 0;
  color: var(--text-soft);
  line-height: 1.6;
}

.knowledge-record-question {
  padding: 0.9rem 1rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  font-weight: 800;
  line-height: 1.45;
}

.knowledge-record-actions {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.knowledge-record-actions .btn {
  min-width: 6.5rem;
}

.stats-card {
  height: 100%;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.9));
  box-shadow: var(--shadow-card);
}

.stats-card__label {
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats-card__value {
  margin-top: 0.4rem;
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.topbar-chip,
.pill,
.status-badge,
.filter-chip,
.toolbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.15);
  color: var(--text);
  font-weight: 700;
}

.pill--compact {
  padding: 0.48rem 0.7rem;
  font-size: 0.82rem;
}

.topbar-chip--ghost {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

.topbar-chip__dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #39d98a 0%, #119f6e 100%);
}

.btn-dark {
  background: #111827;
  border-color: #111827;
}

.btn-soft,
.btn-outline-secondary {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
}

.btn-outline-dark {
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-outline-dark:hover {
  background: #111827;
  border-color: #111827;
  color: #fff;
}

.sidebar-logout {
  min-height: 3rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(248, 250, 252, 0.88);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.sidebar-logout__icon {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.sidebar-logout:hover,
.sidebar-logout:focus-visible {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

body.sidebar-collapsed .sidebar-logout {
  padding-inline: 0;
}

body.sidebar-collapsed .sidebar-logout__label {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.knowledge-header {
  align-items: center;
}

.knowledge-header .panel-card__title {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 95, 69, 0.08);
  border: 1px solid rgba(255, 95, 69, 0.12);
  color: #cf3f2e;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.knowledge-upload-header {
  align-items: center;
}

.knowledge-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.knowledge-upload-card {
  display: flex;
  min-height: 100%;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1.1rem;
  border: 1px solid rgba(213, 220, 230, 0.92);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.knowledge-upload-card--excel {
  border-color: rgba(22, 179, 100, 0.28);
}

.knowledge-upload-card__header {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.knowledge-upload-card__icon {
  display: inline-flex;
  width: 3rem;
  min-width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.knowledge-upload-card__title {
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
}

.knowledge-upload-card__text {
  margin: 0.35rem 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.knowledge-upload-card .knowledge-import-form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
}

.knowledge-upload-card .form-actions {
  margin-top: auto;
}

@media (max-width: 1199.98px) {
  .knowledge-upload-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .knowledge-upload-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-upload-header {
    align-items: flex-start;
  }
}

.knowledge-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: end;
  padding: 1rem;
  margin-top: 0.2rem;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
  border: 1px solid rgba(213, 220, 230, 0.78);
}

.knowledge-toolbar__fields {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  flex: 1 1 0;
  min-width: 0;
}

.knowledge-toolbar__fields--knowledge {
  grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr));
}

.knowledge-toolbar__field {
  min-width: 0;
}

.knowledge-toolbar__actions {
  display: flex;
  align-items: end;
}

.knowledge-toolbar__actions .action-group {
  flex-wrap: nowrap;
}

.knowledge-toolbar .form-label {
  margin-bottom: 0.45rem;
}

.knowledge-toolbar .form-control {
  background: #fefefe;
}

.knowledge-toolbar__actions .btn {
  min-height: 3rem;
}

.chat-history-toolbar .knowledge-toolbar__fields {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.btn-icon {
  width: 2.8rem;
  min-width: 2.8rem;
  height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 14px;
}

.btn-icon svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.btn-icon--soft {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.08);
  color: var(--text);
}

.btn-icon--soft:hover {
  background: rgba(15, 23, 42, 0.08);
}

.btn-icon--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-icon--primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  color: #fff;
}

.btn-icon--danger {
  background: rgba(240, 68, 56, 0.08);
  border-color: rgba(240, 68, 56, 0.18);
  color: #c03028;
}

.btn-icon--danger:hover {
  background: rgba(240, 68, 56, 0.14);
  border-color: rgba(240, 68, 56, 0.24);
  color: #a91d14;
}

.span-12 { grid-column: span 12; }
.span-7 { grid-column: span 7; }
.span-6 { grid-column: span 6; }
.span-4 { grid-column: span 4; }
.span-3 { grid-column: span 3; }
.span-2 { grid-column: span 2; }

.form-control,
.form-select {
  min-height: 3rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  padding: 0.8rem 0.95rem;
}

textarea.form-control {
  min-height: 10rem;
  resize: vertical;
}

.form-control:focus,
.form-select:focus,
.btn:focus,
.btn:active:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.18rem rgba(50, 180, 229, 0.16);
  border-color: rgba(50, 180, 229, 0.38);
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-weight: 700;
}

.helper-text {
  margin-top: 0.4rem;
  font-size: 0.9rem;
}

.details-list dt {
  color: var(--text-soft);
  font-weight: 700;
}

.details-list dd {
  margin-bottom: 1rem;
}

.dashboard-table {
  border-color: rgba(213, 220, 230, 0.72);
  table-layout: fixed;
}

.knowledge-table-shell {
  overflow: hidden;
  padding-bottom: 0.15rem;
}

.knowledge-table-shell .dataTables_wrapper {
  margin-top: 0.25rem;
}

.knowledge-table-shell .dataTables_scroll {
  display: flex;
  flex-direction: column;
  max-height: min(60vh, calc(100vh - 420px));
}

.knowledge-table-shell .dataTables_scrollHead {
  flex: 0 0 auto;
}

.knowledge-table-shell .dataTables_scrollBody {
  flex: 1 1 auto;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.knowledge-table-shell .dataTables_wrapper .row:last-child {
  margin-top: 0.85rem;
  padding: 0.65rem 0.05rem 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.92));
  border-top: 1px solid rgba(213, 220, 230, 0.6);
}

.knowledge-table-shell .dt-bottom-length {
  display: flex;
  justify-content: center;
}

.knowledge-table-shell .dt-bottom-length .dataTables_length {
  margin: 0;
}

.knowledge-table-shell .dt-bottom-length .dataTables_length label {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
}

.knowledge-table-shell .dataTables_length label,
.knowledge-table-shell .dataTables_info {
  color: var(--text-soft);
  font-weight: 600;
}

.knowledge-table-shell .dataTables_length select {
  border-radius: 12px;
  border-color: var(--line);
  min-height: 2.6rem;
  padding-left: 0.85rem;
  padding-right: 2rem;
}

.knowledge-table-shell .dataTables_paginate {
  margin-top: 0;
}

.knowledge-table-shell .page-item .page-link {
  border-radius: 12px;
  margin: 0 0.1rem;
  color: var(--text);
}

.knowledge-table-shell .page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.knowledge-table-shell .page-item.disabled .page-link {
  color: rgba(39, 49, 63, 0.42);
}

.knowledge-col--question {
  width: 50%;
  vertical-align: top;
}

.knowledge-col--source,
.knowledge-col--tags,
.knowledge-col--state,
.knowledge-col--actions {
  white-space: nowrap;
}

.knowledge-col--source {
  width: 140px;
}

.knowledge-col--tags {
  width: 190px;
}

.knowledge-col--state {
  width: 150px;
}

.knowledge-col--date {
  width: 150px;
}

.knowledge-col--actions {
  width: 126px;
}

.feedback-col--label {
  width: 48%;
}

.feedback-col--sort,
.feedback-col--status,
.feedback-col--date,
.feedback-col--actions {
  white-space: nowrap;
}

.feedback-col--sort {
  width: 110px;
}

.feedback-col--status {
  width: 150px;
}

.feedback-col--date {
  width: 160px;
}

.feedback-col--actions {
  width: 110px;
}

.feedback-overview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.feedback-delete-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(213, 220, 230, 0.78);
}

.feedback-delete-grid__label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.knowledge-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  border: 1px solid rgba(213, 220, 230, 0.78);
  background: rgba(248, 250, 252, 0.92);
}

.knowledge-col--tags .status-badge,
.knowledge-col--source .pill {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-history-col--title {
  width: 28%;
  vertical-align: top;
}

.chat-history-col--owner,
.chat-history-col--count,
.chat-history-col--feedback,
.chat-history-col--score,
.chat-history-col--status,
.chat-history-col--actions {
  white-space: nowrap;
}

.chat-history-col--owner {
  width: 18%;
}

.chat-history-col--count {
  width: 8%;
}

.chat-history-col--feedback {
  width: 16%;
}

.chat-history-col--score {
  width: 12%;
}

.chat-history-col--status {
  width: 12%;
}

.chat-history-col--date {
  width: 14%;
}

.chat-history-col--actions {
  width: 8%;
}

.chat-history-col--title .entity-line__content,
.chat-history-col--owner .knowledge-source-chip {
  min-width: 0;
}

.chat-history-col--title strong {
  display: block;
  overflow-wrap: anywhere;
}

.chat-history-col--title .entity-line__meta {
  margin-top: 0.35rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-history-col--owner .knowledge-source-chip {
  width: 100%;
}

.chat-feedback-summary,
.chat-feedback-overview__chips,
.chat-message-feedback__reason-list,
.chat-feedback-form__choice,
.chat-feedback-form__reasons,
.chat-feedback-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chat-feedback-summary {
  justify-content: flex-start;
}

.chat-feedback-overview {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.98), rgba(237, 243, 251, 0.95));
  border: 1px solid rgba(210, 220, 234, 0.88);
}

.chat-message-feedback {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(210, 220, 234, 0.88);
}

.chat-message-quality {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed rgba(210, 220, 234, 0.88);
}

.chat-message-quality__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.chat-message-quality__summary {
  margin: 0 0 0.75rem;
  color: var(--text-soft);
  line-height: 1.65;
}

.chat-message-quality__chips,
.chat-message-quality__actions,
.knowledge-source-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.chat-message-quality__actions {
  margin-top: 0.75rem;
  align-items: center;
}

.chat-message-feedback__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.chat-message-feedback__time {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.chat-message-feedback__details {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.chat-message-feedback__other {
  color: var(--text-soft);
  line-height: 1.6;
}

.chat-feedback-form {
  display: grid;
  gap: 0.85rem;
}

.chat-feedback-choice,
.chat-feedback-reason {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-radius: 14px;
  background: rgba(245, 248, 252, 0.96);
  border: 1px solid rgba(210, 220, 234, 0.88);
}

.chat-feedback-choice input,
.chat-feedback-reason input {
  margin: 0;
}

.chat-feedback-form__other {
  min-height: 6rem;
}

.knowledge-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  min-width: 0;
  padding: 0.52rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-weight: 700;
}

.knowledge-source-chip svg {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  fill: currentColor;
  color: var(--accent-strong);
}

.knowledge-source-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.knowledge-source-stack {
  align-items: center;
}

.knowledge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.knowledge-tag-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 95, 69, 0.08);
  border: 1px solid rgba(255, 95, 69, 0.14);
  color: #9f341d;
  font-weight: 700;
  white-space: nowrap;
}

.knowledge-tag-chip--more {
  background: rgba(15, 23, 42, 0.05);
  border-color: rgba(15, 23, 42, 0.08);
  color: var(--text-soft);
}

.knowledge-answer-cell {
  vertical-align: top;
}

.answer-preview {
  display: inline;
  min-width: 0;
}

.answer-preview__text {
  min-width: 0;
  color: var(--text);
  line-height: 1.55;
}

.answer-preview:not(.is-expanded) .answer-preview__text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

.answer-preview__toggle {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0 0 0 -0.08rem;
  color: var(--accent-strong);
  font-weight: 800;
  line-height: 1;
  vertical-align: baseline;
}

.answer-preview__toggle:hover,
.answer-preview__toggle:focus-visible {
  color: #c5301f;
  text-decoration: underline;
}

.knowledge-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: nowrap;
}

.knowledge-actions .btn {
  box-shadow: none;
}

.knowledge-actions .btn-icon {
  width: 2.35rem;
  min-width: 2.35rem;
  height: 2.35rem;
  border-radius: 12px;
}

.knowledge-actions .btn-icon svg {
  width: 0.9rem;
  height: 0.9rem;
}

.dashboard-table thead th {
  border-bottom-width: 1px;
  color: var(--text-soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.entity-line {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.entity-line__avatar {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(124, 58, 237, 0.1);
  color: #4f46e5;
  font-weight: 800;
}

.entity-line__avatar--soft {
  background: rgba(255, 95, 69, 0.08);
  color: #ef4427;
}

.entity-line__content strong {
  display: block;
}

.entity-line__meta {
  margin-top: 0.2rem;
  color: var(--text-soft);
  font-size: 0.88rem;
}

.filter-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.filter-chip {
  background: rgba(255, 95, 69, 0.07);
  border-color: rgba(255, 95, 69, 0.14);
}

.status-badge--success {
  background: var(--success-soft);
  border-color: rgba(22, 179, 100, 0.22);
  color: #0f7a43;
}

.status-badge--warning {
  background: var(--warning-soft);
  border-color: rgba(245, 165, 36, 0.22);
  color: #9a6411;
}

.status-badge--danger {
  background: var(--danger-soft);
  border-color: rgba(240, 68, 56, 0.18);
  color: #b42318;
}

.empty-state {
  padding: 2rem;
  text-align: center;
}

.auth-page {
  min-height: 100vh;
}

.auth-shell {
  width: min(1220px, calc(100% - 1.25rem));
  min-height: calc(100vh - 2.5rem);
  margin: 1.25rem auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 0.78fr);
  gap: 1rem;
}

.auth-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2.25rem;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(124, 58, 237, 0.26), transparent 28%),
    radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.16), transparent 24%),
    linear-gradient(180deg, rgba(14, 16, 24, 0.98), rgba(18, 20, 31, 0.98));
  color: #fff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

.auth-hero__orb {
  position: absolute;
  inset: auto -8% -20% auto;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(132, 204, 22, 0.26), rgba(132, 204, 22, 0.06) 55%, transparent 72%);
  filter: blur(2px);
  opacity: 0.8;
}

.auth-hero__badge {
  position: relative;
  z-index: 1;
  width: 132px;
  height: 132px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
}

.auth-hero__badge img {
  width: 100px;
  height: 100px;
  object-fit: contain;
}

.auth-hero__copy {
  position: relative;
  z-index: 1;
  max-width: 18rem;
}

.auth-hero__eyebrow {
  margin: 0 0 0.35rem;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.auth-hero__text {
  margin: 0;
  color: rgba(248, 250, 252, 0.76);
  font-size: 1rem;
  line-height: 1.7;
}

.auth-card {
  align-self: center;
  padding: 2rem;
  border-radius: 30px;
}

.auth-login {
  display: grid;
  gap: 1.25rem;
}

.auth-login__brand {
  display: flex;
  justify-content: center;
}

.auth-login__logo {
  width: min(160px, 46vw);
  height: auto;
  object-fit: contain;
}

.auth-card__header--stacked {
  margin-bottom: 0;
}

.page-title--auth {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 0.25rem;
}

.auth-form .validation-summary-valid {
  display: none;
}

.auth-form .validation-summary-errors {
  margin-bottom: 0.5rem;
}

.auth-form__summary {
  margin-bottom: 0.5rem;
}

.auth-input {
  background: #edf4ff;
  border-color: #d6def0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.auth-input:focus {
  background: #fff;
  border-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 0 0 0.2rem rgba(79, 70, 229, 0.12);
}

.auth-submit {
  padding-block: 0.9rem;
  border-radius: 14px;
  font-weight: 700;
}

.auth-form__footer {
  margin-top: 1rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.site-main__inner {
  width: min(1280px, calc(100% - 1rem));
}

.page-card,
.info-box {
  background: rgba(255, 255, 255, 0.92);
}

@media (max-width: 1199.98px) {
  .dashboard-page {
    height: auto;
    overflow: auto;
  }

  .knowledge-toolbar__fields--knowledge,
  .chat-history-toolbar .knowledge-toolbar__fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell {
    height: auto;
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    order: 2;
    position: static;
    max-height: none;
    overflow: visible;
  }

  .app-content {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .hero-banner,
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: 240px;
  }
}

@media (max-width: 767.98px) {
  .app-shell {
    padding: 0.75rem;
  }

  .app-topbar,
  .hero-banner,
  .panel-card,
  .page-card,
  .auth-card,
  .info-box,
  .auth-hero {
    border-radius: 20px;
  }

  .app-topbar,
  .panel-card__header,
  .page-card__header,
  .auth-card__header,
  .detail-heading,
  .grid-header,
  .toolbar-strip {
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-12,
  .span-7,
  .span-6,
  .span-4,
  .span-3,
  .span-2 {
    grid-column: auto;
  }

  .knowledge-header,
  .knowledge-toolbar {
    align-items: stretch;
  }

  .knowledge-toolbar__fields {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .feedback-delete-grid {
    grid-template-columns: 1fr;
  }

  .knowledge-toggle-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .knowledge-toolbar__actions {
    width: 100%;
  }

  .knowledge-toolbar__actions .action-group {
    width: 100%;
  }

  .knowledge-toolbar__actions .action-group .btn:not(.btn-icon) {
    flex: 1 1 0;
  }

  .knowledge-toolbar__actions .action-group .btn-icon {
    flex: 0 0 auto;
  }

  .knowledge-actions {
    justify-content: flex-start;
  }

  .chat-message-feedback__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-shell {
    width: calc(100% - 1rem);
    margin: 0.5rem auto;
  }

  .auth-card {
    padding: 1.25rem;
  }

  .page-title--auth {
    font-size: 1.9rem;
  }
}

/* Blue-green theme override to match the provided reference image. */
:root {
  --bg: #e7eef7;
  --surface: #ffffff;
  --surface-soft: #f5f8fc;
  --surface-muted: #e4edf7;
  --line: #d2dceb;
  --line-strong: #bcc8d8;
  --text: #1f2b49;
  --text-soft: #6e7d95;
  --accent: #5d7fc0;
  --accent-strong: #4363a8;
  --success: #53b147;
  --success-soft: rgba(83, 177, 71, 0.16);
  --warning: #98b56a;
  --warning-soft: rgba(152, 181, 106, 0.18);
  --danger: #d95f57;
  --danger-soft: rgba(217, 95, 87, 0.12);
  --shadow-card: 0 18px 42px rgba(52, 76, 122, 0.12);
}

body {
  background:
    radial-gradient(circle at top left, rgba(111, 143, 198, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(95, 178, 78, 0.14), transparent 22%),
    linear-gradient(180deg, #edf3fb 0%, #e7eef7 48%, #dfe8f4 100%);
  color: var(--text);
}

.app-shell {
  gap: 1rem;
}

.app-sidebar {
  background: linear-gradient(180deg, #dfe8f5 0%, #d4dfef 100%);
  border: 1px solid rgba(166, 181, 204, 0.34);
  color: var(--text);
  box-shadow: 0 18px 42px rgba(74, 98, 136, 0.14);
}

.brand-mark {
  width: 100%;
  min-height: 228px;
  padding: 1.15rem 1rem 1.1rem;
  border-radius: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.82rem;
  text-align: center;
  background: linear-gradient(180deg, #edf3fb 0%, #dbe5f3 100%);
  border: 1px solid rgba(175, 189, 210, 0.44);
  box-shadow: 0 14px 34px rgba(74, 98, 136, 0.12);
}

.brand-mark__logo {
  width: 86px;
  height: 86px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: linear-gradient(180deg, #319841 0%, #76c344 100%);
  box-shadow: 0 12px 22px rgba(37, 116, 52, 0.18);
  flex: 0 0 auto;
}

.brand-mark__logo img {
  width: 46px;
  height: 46px;
  object-fit: contain;
  display: block;
  filter: brightness(0) invert(1);
}

.brand-mark__content {
  display: grid;
  gap: 0.2rem;
}

.brand-mark__title {
  color: #17795e;
  font-size: 1.42rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
  text-transform: uppercase;
}

.brand-mark__subtitle {
  display: grid;
  gap: 0.22rem;
  color: #6d7f98;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.38;
  text-transform: uppercase;
}

body.sidebar-collapsed .brand-mark {
  min-height: 84px;
  padding: 0.75rem 0.5rem;
}

body.sidebar-collapsed .brand-mark__content {
  display: none;
}

body.sidebar-collapsed .brand-mark__logo {
  width: 60px;
  height: 60px;
}

body.sidebar-collapsed .brand-mark__logo img {
  width: 34px;
  height: 34px;
}

.sidebar-toggle,
.sidebar-link,
.sidebar-logout {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(164, 180, 202, 0.4);
  color: var(--text);
}

.sidebar-toggle:hover,
.sidebar-link:hover,
.sidebar-logout:hover,
.sidebar-logout:focus-visible {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(132, 157, 194, 0.5);
  color: var(--text);
}

.sidebar-link__icon {
  background: linear-gradient(180deg, #edf5ff 0%, #e4edf9 100%);
  color: #476cae;
}

.sidebar-link__icon svg,
.sidebar-toggle svg,
.sidebar-logout__icon {
  color: currentColor;
}

.sidebar-label,
.sidebar-link small {
  color: #60718a;
}

.sidebar-actions {
  margin-top: auto;
}

.app-topbar,
.hero-banner,
.panel-card,
.page-card,
.auth-card,
.info-box,
.detail-card,
.empty-state,
.error-panel {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(210, 220, 234, 0.95);
}

.app-topbar {
  box-shadow: 0 12px 30px rgba(74, 98, 136, 0.12);
}

.page-title,
.hero-banner__title,
.dashboard-title,
.section-title,
.grid-title {
  color: var(--text);
}

.page-subtitle,
.dashboard-subtitle,
.helper-text,
.hero-banner__text,
.panel-card__subtitle,
.grid-subtitle {
  color: var(--text-soft);
}

.topbar-chip,
.pill,
.status-badge,
.filter-chip,
.toolbar-pill {
  background: rgba(92, 126, 191, 0.08);
  border-color: rgba(92, 126, 191, 0.16);
  color: var(--text);
}

.topbar-chip__dot {
  background: linear-gradient(180deg, #6dd17c 0%, #37a85f 100%);
}

.btn-primary,
.btn-icon--primary {
  background: linear-gradient(180deg, #5e80c2 0%, #4968ab 100%);
  border-color: #4d6fae;
  color: #fff;
}

.btn-primary:hover,
.btn-icon--primary:hover {
  background: linear-gradient(180deg, #4f72b5 0%, #3e5f9f 100%);
  border-color: #3e5f9f;
  color: #fff;
}

.btn-soft,
.btn-outline-secondary,
.btn-icon--soft {
  background: rgba(239, 244, 251, 0.95);
  border-color: rgba(173, 187, 209, 0.5);
  color: var(--text);
}

.btn-soft:hover,
.btn-outline-secondary:hover,
.btn-icon--soft:hover {
  background: rgba(226, 235, 246, 0.95);
  border-color: rgba(154, 172, 196, 0.55);
  color: var(--text);
}

.btn-outline-dark {
  border-color: rgba(160, 176, 198, 0.65);
  color: var(--text);
}

.btn-outline-dark:hover {
  background: #556f9d;
  border-color: #556f9d;
  color: #fff;
}

.btn-danger {
  background: linear-gradient(180deg, #dc4f45 0%, #c43b31 100%);
  border-color: #c43b31;
  color: #fff;
}

.btn-danger:hover {
  background: linear-gradient(180deg, #c9453c 0%, #ad3028 100%);
  border-color: #ad3028;
  color: #fff;
}

.btn-outline-danger {
  background: rgba(220, 79, 69, 0.08);
  border-color: rgba(220, 79, 69, 0.28);
  color: #b8322a;
}

.btn-outline-danger:hover {
  background: #c43b31;
  border-color: #c43b31;
  color: #fff;
}

.form-control,
.form-select,
.knowledge-toolbar .form-control,
.auth-input {
  background: #fbfdff;
  border-color: rgba(205, 215, 229, 0.95);
  color: var(--text);
}

.form-control:focus,
.form-select:focus,
.btn:focus,
.btn:active:focus,
.form-check-input:focus,
.auth-input:focus {
  box-shadow: 0 0 0 0.18rem rgba(93, 127, 192, 0.16);
  border-color: rgba(93, 127, 192, 0.42);
}

.knowledge-header .panel-card__title,
.knowledge-tag-chip,
.filter-chip,
.status-badge {
  background: rgba(83, 177, 71, 0.08);
  border-color: rgba(83, 177, 71, 0.14);
  color: #1e7a5a;
}

.knowledge-source-chip svg,
.entity-line__avatar,
.entity-line__avatar--soft {
  color: #4b72b8;
}

.knowledge-source-chip,
.entity-line__avatar,
.entity-line__avatar--soft {
  background: rgba(92, 126, 191, 0.08);
  border-color: rgba(92, 126, 191, 0.16);
}

.knowledge-table-shell .page-item.active .page-link {
  background: #5e80c2;
  border-color: #5e80c2;
}

.sidebar-logout {
  color: var(--text);
}

.auth-hero {
  background:
    radial-gradient(circle at top right, rgba(95, 178, 78, 0.22), transparent 28%),
    radial-gradient(circle at bottom left, rgba(92, 126, 191, 0.18), transparent 24%),
    linear-gradient(180deg, #f8fbff 0%, #eaf1fa 100%);
  color: var(--text);
  box-shadow: 0 18px 46px rgba(74, 98, 136, 0.14);
}

.auth-hero__orb {
  background: radial-gradient(circle, rgba(95, 178, 78, 0.18), rgba(95, 178, 78, 0.05) 55%, transparent 72%);
}

.auth-hero__text,
.auth-hero__eyebrow {
  color: var(--text-soft);
}

.auth-hero__badge {
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(193, 204, 220, 0.55);
}

.auth-input {
  background: #f3f7fc;
}

.auth-input:focus {
  background: #fff;
}

.account-eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.account-overview,
.account-form-shell,
.account-profile-shell {
  display: grid;
  gap: 1rem;
}

.account-overview {
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
}

.account-overview__hero,
.account-form-hero,
.account-profile-hero,
.account-delete-card {
  padding: 1.5rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(131, 221, 133, 0.22), transparent 24%),
    linear-gradient(135deg, #264a78 0%, #355f94 52%, #4f8f78 100%);
  color: #fff;
  box-shadow: 0 22px 48px rgba(46, 79, 126, 0.24);
}

.account-overview__title,
.account-form-hero__title,
.account-profile-title,
.account-delete__title {
  margin: 0.85rem 0 0.45rem;
  color: #fff;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
}

.account-overview__text,
.account-form-hero__text,
.account-profile-text,
.account-delete__text {
  max-width: 42rem;
  margin: 0;
  color: rgba(244, 248, 255, 0.82);
  line-height: 1.7;
}

.account-overview__stats {
  display: grid;
  gap: 1rem;
}

.account-metric,
.account-panel,
.account-form-card,
.account-side-card,
.account-main-card {
  padding: 1.3rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(210, 220, 234, 0.95);
  box-shadow: 0 14px 34px rgba(74, 98, 136, 0.12);
}

.account-metric {
  display: grid;
  gap: 0.3rem;
}

.account-metric__label {
  color: var(--text-soft);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-metric__value {
  font-size: 2rem;
  line-height: 1;
}

.account-metric__hint {
  color: var(--text-soft);
  line-height: 1.5;
}

.account-panel__header,
.account-main-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.account-panel__title,
.account-main-card__title,
.account-side-card__title,
.account-form-card__title {
  margin: 0.45rem 0 0.25rem;
  font-size: 1.3rem;
}

.account-panel__text,
.account-main-card__text,
.account-toggle__text {
  color: var(--text-soft);
  line-height: 1.6;
}

.account-empty-state {
  padding: 2rem 1.5rem;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.98), rgba(237, 243, 251, 0.95));
  border: 1px dashed rgba(154, 172, 196, 0.58);
}

.account-empty-state h3 {
  margin-bottom: 0.55rem;
}

.account-empty-state p {
  margin: 0 0 1rem;
  color: var(--text-soft);
}

.account-table-shell {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(210, 220, 234, 0.85);
}

.account-table {
  margin-bottom: 0;
  border-color: rgba(213, 220, 230, 0.72);
}

.account-table thead th {
  padding: 1rem;
  background: #f3f7fc;
  color: #71839d;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(210, 220, 234, 0.95);
}

.account-table tbody td {
  padding: 1rem;
}

.account-table__row--inactive {
  background: rgba(246, 249, 253, 0.78);
}

.account-user-cell {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.account-user-cell__avatar,
.account-profile-avatar {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: inherit;
  font-size: 1.15rem;
  font-weight: 800;
}

.account-user-cell__avatar {
  background: linear-gradient(180deg, rgba(91, 128, 194, 0.14), rgba(77, 147, 123, 0.14));
  border-color: rgba(92, 126, 191, 0.18);
  color: #3f66a6;
}

.account-user-cell__body {
  display: grid;
  gap: 0.18rem;
}

.account-user-cell__body strong {
  font-size: 1rem;
}

.account-user-cell__body span {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.account-role-badge,
.account-status-badge,
.account-form-mode {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  white-space: nowrap;
}

.account-role-badge--admin {
  background: rgba(68, 112, 181, 0.1);
  border-color: rgba(68, 112, 181, 0.18);
  color: #345f9e;
}

.account-role-badge--user {
  background: rgba(79, 151, 122, 0.12);
  border-color: rgba(79, 151, 122, 0.18);
  color: #216a54;
}

.account-status-badge--active {
  background: rgba(83, 177, 71, 0.12);
  border-color: rgba(83, 177, 71, 0.18);
  color: #2f7d36;
}

.account-status-badge--inactive {
  background: rgba(217, 95, 87, 0.1);
  border-color: rgba(217, 95, 87, 0.16);
  color: #b14d46;
}

.account-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.account-form-hero,
.account-profile-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.account-form-mode {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.account-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 1rem;
  margin-top: 0.85rem;
}

.account-form-main {
  display: grid;
  gap: 1.25rem;
  min-width: 0;
}

.account-form-side {
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.account-form-card--full {
  grid-column: 1 / -1;
}

.account-form-card__header {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.account-form-card__text {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.65;
}

.prompt-editor {
  min-height: 12rem;
  font-family: "Consolas", "SFMono-Regular", monospace;
  line-height: 1.65;
  resize: vertical;
}

.prompt-token-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.account-form-card--soft {
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.98), rgba(238, 244, 250, 0.95));
}

.account-toggle {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(239, 244, 251, 0.9);
  border: 1px solid rgba(173, 187, 209, 0.42);
}

.account-toggle .form-check {
  margin: 0;
  padding-left: 0;
}

.account-toggle .form-check-input {
  width: 3rem;
  height: 1.6rem;
  margin: 0;
  float: none;
}

.account-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}

.account-checklist li {
  position: relative;
  padding-left: 1.2rem;
  color: var(--text-soft);
  line-height: 1.6;
}

.account-checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #5e80c2 0%, #53b147 100%);
}

.account-form__summary {
  margin-bottom: 0;
}

.account-profile-hero__identity,
.account-profile-hero__badges {
  display: flex;
  gap: 1rem;
}

.account-profile-hero__identity {
  align-items: center;
}

.account-profile-hero__badges {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-side-card,
.account-main-card {
  height: 100%;
}

.account-profile-meta {
  display: grid;
  gap: 0.85rem;
}

.account-profile-meta__item,
.account-delete__meta > div {
  padding: 1rem;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.96), rgba(237, 243, 251, 0.94));
  border: 1px solid rgba(210, 220, 234, 0.82);
}

.account-profile-meta__item span,
.account-delete__meta span {
  display: block;
  margin-bottom: 0.3rem;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.account-profile-meta__item strong,
.account-delete__meta strong {
  font-size: 1rem;
}

.account-delete-shell {
  max-width: 980px;
}

.account-delete__alert {
  margin: 1rem 0;
  padding: 1rem 1.1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff5f3;
}

.account-delete__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.25rem;
}

.account-delete__meta > div {
  background: rgba(255, 255, 255, 0.92);
}

@media (max-width: 1199.98px) {
  .account-overview,
  .account-form-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .account-form-hero,
  .account-profile-hero {
    flex-direction: column;
  }

  .account-profile-hero__badges {
    justify-content: flex-start;
  }

  .account-delete__meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .account-overview__hero,
  .account-form-hero,
  .account-profile-hero,
  .account-delete-card,
  .account-metric,
  .account-panel,
  .account-form-card,
  .account-side-card,
  .account-main-card {
    border-radius: 20px;
  }

  .account-profile-hero__identity {
    align-items: flex-start;
  }

  .account-profile-hero__identity,
  .account-user-cell,
  .account-toggle {
    flex-direction: column;
  }

  .account-actions {
    justify-content: flex-start;
  }
}

.chat-history-hero,
.chat-history-panel,
.chat-analysis-card {
  border-radius: 26px;
  border: 1px solid rgba(210, 220, 234, 0.92);
  box-shadow: 0 16px 36px rgba(74, 98, 136, 0.12);
}

.chat-history-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top right, rgba(131, 221, 133, 0.2), transparent 24%),
    linear-gradient(135deg, #25456f 0%, #3f6daa 52%, #5f8f68 100%);
  color: #fff;
}

.chat-history-hero__eyebrow {
  display: inline-flex;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.chat-history-hero__title {
  margin: 0.8rem 0 0.4rem;
  color: #fff;
  font-size: clamp(2rem, 3vw, 2.8rem);
  line-height: 1;
}

.chat-history-hero__text {
  max-width: 44rem;
  margin: 0;
  color: rgba(244, 248, 255, 0.82);
  line-height: 1.7;
}

.chat-history-panel {
  height: 100%;
  padding: 1.3rem;
  background: rgba(255, 255, 255, 0.95);
}

.chat-history-panel__header {
  margin-bottom: 1rem;
}

.chat-history-panel__title {
  margin: 0.45rem 0 0.2rem;
  font-size: 1.35rem;
}

.chat-history-panel__subtitle {
  margin: 0;
  color: var(--text-soft);
}

.chat-history-table-shell {
  overflow: hidden;
  border-radius: 20px;
  border: 1px solid rgba(210, 220, 234, 0.86);
}

.chat-history-table thead th {
  background: #f3f7fc;
}

.chat-history-table__row--active {
  background: rgba(226, 236, 249, 0.65);
}

.chat-detail-modal .modal-content {
  border: 1px solid rgba(210, 220, 234, 0.92);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 22px 48px rgba(74, 98, 136, 0.18);
}

.chat-detail-modal .modal-header,
.chat-detail-modal .modal-footer {
  border-color: rgba(210, 220, 234, 0.88);
  background: rgba(255, 255, 255, 0.96);
}

.chat-detail-modal .modal-body {
  background: rgba(249, 251, 254, 0.98);
  max-height: min(70vh, 780px);
  overflow-y: auto;
}

.chat-history-empty {
  padding: 1.2rem 0.35rem;
  color: var(--text-soft);
}

.chat-history-empty h3 {
  margin-bottom: 0.45rem;
  color: var(--text);
}

.chat-analysis-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, rgba(244, 248, 253, 0.98), rgba(236, 243, 250, 0.95));
}

.chat-analysis-card.risk-high {
  border-color: rgba(217, 95, 87, 0.4);
}

.chat-analysis-card.risk-medium {
  border-color: rgba(245, 165, 36, 0.4);
}

.chat-analysis-card.risk-low {
  border-color: rgba(83, 177, 71, 0.38);
}

.chat-analysis-card__score {
  min-width: 92px;
  display: grid;
  place-items: center;
  padding: 1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, #edf3fb 0%, #dce7f6 100%);
  color: #2e5a97;
}

.chat-analysis-card__score strong {
  font-size: 2.3rem;
  line-height: 1;
}

.chat-analysis-card__score span {
  color: var(--text-soft);
  font-weight: 700;
}

.chat-analysis-card__content {
  min-width: 0;
}

.chat-analysis-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.chat-analysis-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 0.76rem;
  border-radius: 999px;
  background: rgba(83, 177, 71, 0.12);
  border: 1px solid rgba(83, 177, 71, 0.18);
  color: #216a54;
  font-weight: 700;
}

.chat-analysis-badge--muted {
  background: rgba(92, 126, 191, 0.08);
  border-color: rgba(92, 126, 191, 0.14);
  color: var(--text);
}

.chat-analysis-card__summary {
  margin: 0 0 0.85rem;
  color: var(--text);
  line-height: 1.65;
}

.chat-analysis-card__meta {
  margin: 0 0 0.85rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.chat-analysis-signals {
  margin: 0;
  padding-left: 1rem;
  color: var(--text-soft);
}

.chat-analysis-signals li + li {
  margin-top: 0.4rem;
}

.chat-thread {
  display: grid;
  gap: 0.85rem;
}

.chat-thread__item {
  padding: 1rem 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(210, 220, 234, 0.88);
  background: linear-gradient(180deg, rgba(247, 250, 253, 0.98), rgba(239, 244, 250, 0.95));
}

.chat-thread__item--assistant {
  background: linear-gradient(180deg, rgba(237, 243, 252, 0.98), rgba(228, 237, 249, 0.95));
}

.chat-thread__item--user {
  background: linear-gradient(180deg, rgba(245, 249, 246, 0.98), rgba(236, 244, 238, 0.95));
}

.chat-thread__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
}

.chat-thread__meta strong {
  font-size: 0.96rem;
}

.chat-thread__meta span {
  color: var(--text-soft);
  font-size: 0.88rem;
}

.chat-thread__content {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
}

@media (max-width: 767.98px) {
  .chat-history-hero,
  .chat-thread__meta,
  .chat-message-quality__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .chat-analysis-card {
    grid-template-columns: 1fr;
  }
}

.dashboard-landing-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 1rem;
  padding: 1.6rem;
  border-radius: 28px;
  background:
    radial-gradient(circle at top right, rgba(131, 221, 133, 0.22), transparent 24%),
    linear-gradient(135deg, #25456f 0%, #3f6daa 52%, #5f8f68 100%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(46, 79, 126, 0.22);
}

.dashboard-landing-hero__eyebrow {
  display: inline-flex;
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dashboard-landing-hero__title {
  margin: 0.85rem 0 0.45rem;
  color: #fff;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1;
}

.dashboard-landing-hero__text {
  max-width: 46rem;
  margin: 0;
  color: rgba(244, 248, 255, 0.84);
  line-height: 1.75;
}

.dashboard-landing-hero__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.1rem;
}

.dashboard-landing-hero__chips .toolbar-pill {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.dashboard-landing-hero__aside {
  display: flex;
  align-items: stretch;
}

.dashboard-hero-highlight {
  width: 100%;
  padding: 1.25rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(10px);
}

.dashboard-hero-highlight__label {
  display: block;
  color: rgba(244, 248, 255, 0.72);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-hero-highlight strong {
  display: block;
  margin-top: 0.85rem;
  font-size: 3rem;
  line-height: 1;
}

.dashboard-hero-highlight p {
  margin: 0.75rem 0 0;
  color: rgba(244, 248, 255, 0.8);
  line-height: 1.6;
}

.dashboard-filter-card {
  padding-bottom: 1.5rem;
}

.dashboard-filter-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 220px)) auto;
  gap: 1rem;
  align-items: end;
}

.dashboard-filter-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.dashboard-metric-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-metric-card {
  padding: 1.15rem 1.1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(210, 220, 234, 0.95);
  box-shadow: 0 14px 34px rgba(74, 98, 136, 0.12);
}

.dashboard-metric-card--primary {
  background: linear-gradient(180deg, rgba(235, 242, 252, 0.98), rgba(224, 234, 248, 0.96));
}

.dashboard-metric-card--quality {
  background: linear-gradient(180deg, rgba(238, 249, 242, 0.98), rgba(228, 244, 234, 0.96));
}

.dashboard-metric-card--pending {
  background: linear-gradient(180deg, rgba(255, 249, 233, 0.98), rgba(250, 240, 215, 0.96));
}

.dashboard-metric-card--risk {
  background: linear-gradient(180deg, rgba(254, 240, 238, 0.98), rgba(249, 227, 223, 0.96));
}

.dashboard-metric-card__label {
  display: block;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-metric-card strong {
  display: block;
  margin-top: 0.7rem;
  font-size: 2.15rem;
  line-height: 1;
}

.dashboard-metric-card p {
  margin: 0.65rem 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 1rem;
}

.dashboard-trend-card,
.dashboard-priority-card {
  height: 100%;
}

.dashboard-trend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  gap: 0.85rem;
  align-items: end;
  min-height: 260px;
}

.dashboard-trend__item {
  display: grid;
  gap: 0.65rem;
  justify-items: center;
}

.dashboard-trend__bars {
  width: 100%;
  min-height: 210px;
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.8rem 0.25rem;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.98), rgba(237, 243, 251, 0.95));
  border: 1px solid rgba(210, 220, 234, 0.88);
}

.dashboard-trend__bar {
  width: 0.85rem;
  border-radius: 999px 999px 0 0;
  min-height: 10px;
}

.dashboard-trend__bar--total {
  background: linear-gradient(180deg, #6b8fd0 0%, #4a6fb4 100%);
}

.dashboard-trend__bar--quality {
  background: linear-gradient(180deg, #78c98c 0%, #44a25f 100%);
}

.dashboard-trend__bar--pending {
  background: linear-gradient(180deg, #f0c96a 0%, #d79d26 100%);
}

.dashboard-trend__meta {
  display: grid;
  gap: 0.1rem;
  text-align: center;
}

.dashboard-trend__meta strong {
  font-size: 1rem;
}

.dashboard-trend__meta span {
  color: var(--text-soft);
  font-size: 0.85rem;
}

.dashboard-trend-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.dashboard-trend-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.dashboard-trend-legend__dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 999px;
  display: inline-block;
}

.dashboard-trend-legend__dot--total {
  background: #5a7dc0;
}

.dashboard-trend-legend__dot--quality {
  background: #53b147;
}

.dashboard-trend-legend__dot--pending {
  background: #d79d26;
}

.dashboard-priority-list {
  display: grid;
  gap: 0.9rem;
}

.dashboard-priority-list--scrollable {
  max-height: min(68vh, 840px);
  overflow-y: auto;
  padding-right: 0.35rem;
}

.dashboard-priority-list--scrollable::-webkit-scrollbar {
  width: 0.45rem;
}

.dashboard-priority-list--scrollable::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(92, 126, 191, 0.22);
}

.dashboard-priority-item {
  padding: 1rem;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(247, 250, 253, 0.98), rgba(239, 244, 250, 0.95));
  border: 1px solid rgba(210, 220, 234, 0.88);
}

.dashboard-priority-item__head,
.dashboard-priority-item__meta,
.dashboard-priority-item__actions {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-priority-item__head {
  align-items: flex-start;
}

.dashboard-priority-item__head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.dashboard-priority-item__head p,
.dashboard-priority-item__summary {
  margin: 0.35rem 0 0;
  color: var(--text-soft);
  line-height: 1.55;
}

.dashboard-priority-item__badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.dashboard-priority-item__meta {
  flex-wrap: wrap;
  margin-top: 0.75rem;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.dashboard-priority-item__summary {
  margin-top: 0.8rem;
}

.dashboard-priority-item__actions {
  margin-top: 0.9rem;
  justify-content: flex-end;
}

.dashboard-status {
  display: inline-flex;
  align-items: center;
  padding: 0.48rem 0.76rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-status--quality {
  background: rgba(83, 177, 71, 0.12);
  border-color: rgba(83, 177, 71, 0.18);
  color: #216a54;
}

.dashboard-status--pending {
  background: rgba(245, 165, 36, 0.12);
  border-color: rgba(245, 165, 36, 0.2);
  color: #a06b12;
}

.dashboard-status--risk {
  background: rgba(217, 95, 87, 0.1);
  border-color: rgba(217, 95, 87, 0.16);
  color: #b14d46;
}

.dashboard-status--neutral {
  background: rgba(92, 126, 191, 0.08);
  border-color: rgba(92, 126, 191, 0.16);
  color: var(--text);
}

.dashboard-empty-state {
  padding: 2rem 1.25rem;
  border-radius: 22px;
  text-align: center;
  background: linear-gradient(180deg, rgba(245, 248, 252, 0.98), rgba(237, 243, 251, 0.95));
  border: 1px dashed rgba(154, 172, 196, 0.58);
}

.dashboard-empty-state h3 {
  margin-bottom: 0.45rem;
}

.dashboard-empty-state p {
  margin: 0;
  color: var(--text-soft);
}

@media (max-width: 1399.98px) {
  .dashboard-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .dashboard-landing-hero,
  .dashboard-grid,
  .dashboard-filter-form {
    grid-template-columns: 1fr;
  }

  .dashboard-priority-item__head,
  .dashboard-priority-item__actions {
    flex-direction: column;
  }

  .dashboard-priority-item__actions {
    justify-content: flex-start;
  }
}

@media (max-width: 767.98px) {
  .dashboard-metric-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-landing-hero,
  .dashboard-metric-card,
  .dashboard-priority-item,
  .dashboard-empty-state {
    border-radius: 20px;
  }

  .dashboard-trend {
    grid-template-columns: repeat(auto-fit, minmax(48px, 1fr));
  }
}
