:root {
  --dd-sidebar: #0d1b31;
  --dd-sidebar-dark: #0a1222;
  --dd-sidebar-active: #1f4271;

  --dd-primary: #557ee8;
  --dd-primary-strong: #2563eb;
  --dd-primary-soft: rgba(37, 99, 235, 0.1);

  --dd-bg: #eef3f9;
  --dd-card-bg: rgba(255, 255, 255, 0.96);
  --dd-card-bg-solid: #ffffff;

  --dd-text: #07152d;
  --dd-muted: #64748b;
  --dd-border: rgba(15, 23, 42, 0.08);
  --dd-border-strong: rgba(148, 163, 184, 0.22);

  --dd-radius-sm: 10px;
  --dd-radius-md: 14px;
  --dd-radius-lg: 18px;
  --dd-radius-xl: 24px;
  --dd-radius-xxl: 28px;

  --dd-shadow-card: 0 14px 34px rgba(15, 23, 42, 0.06);
  --dd-shadow-card-soft: 0 10px 28px rgba(15, 23, 42, 0.06);
  --dd-shadow-hover: 0 18px 38px rgba(15, 23, 42, 0.1);

  --bs-primary: var(--dd-primary);
}

* {
  box-sizing: border-box;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--dd-text);
}

.app-body {
  background: var(--dd-bg);
}

a {
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

code {
  color: #d63384;
}

/* --------------------------------------------------------------------------
   Layout
-------------------------------------------------------------------------- */

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 286px;
  background: linear-gradient(180deg, var(--dd-sidebar), var(--dd-sidebar-dark));
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 26px 18px;
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;
}

.app-main {
  margin-left: 286px;
  width: calc(100% - 286px);
  min-width: 0;
}

.content-wrap {
  padding: 24px;
  min-width: 0;
  overflow-x: hidden;
}

.topbar {
  height: 58px;
  background: #fff;
  border-bottom: 1px solid #dfe5ee;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

/* --------------------------------------------------------------------------
   Sidebar
-------------------------------------------------------------------------- */

.brand-box {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 42px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: var(--dd-radius-lg);
  background: rgba(255, 255, 255, 0.12);
  display: grid;
  place-items: center;
  font-size: 27px;
}

.brand-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.brand-subtitle {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  opacity: 0.7;
}

.nav-section {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.6;
  margin: 24px 8px 9px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #e8f0ff;
  text-decoration: none;
  padding: 13px 14px;
  border-radius: var(--dd-radius-md);
  margin: 4px 0;
}

.nav-item i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.09);
}

.nav-item:hover,
.nav-item.active {
  background: var(--dd-sidebar-active);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Einheitliche Cards / Panels
-------------------------------------------------------------------------- */

.card-soft,
.kpi-card,
.page-header-card,
.sync-hero,
.sync-action-card,
.sync-info-card,
.sync-jobs-card,
.rules-hero,
.rule-card,
.rule-help-card,
.dash-hero,
.dash-card,
.dash-kpi {
  background: var(--dd-card-bg);
  border: 1px solid var(--dd-border);
  border-radius: var(--dd-radius-lg);
  box-shadow: var(--dd-shadow-card-soft);
  min-width: 0;
}

.page-header-card,
.dash-hero {
  border-radius: var(--dd-radius-xl);
}

.card-soft,
.kpi-card,
.sync-action-card,
.sync-info-card,
.sync-jobs-card,
.rule-card,
.rule-help-card,
.dash-card {
  padding: 18px;
}

.page-header-card,
.dash-hero {
  padding: 24px;
}

.card-soft,
.rule-card,
.dash-card {
  overflow: hidden;
}

.card-soft code {
  color: #1f4fd8;
  background: rgba(78, 115, 223, 0.08);
  border-radius: 8px;
  padding: 0.15rem 0.35rem;
}

/* --------------------------------------------------------------------------
   Buttons / Forms
-------------------------------------------------------------------------- */

.btn-primary {
  background: var(--dd-primary);
  border-color: var(--dd-primary);
  font-weight: 700;
  border-radius: 13px;
}

.btn-primary:hover {
  background: #456ed4;
  border-color: #456ed4;
}

.btn-outline-primary,
.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-warning,
.btn-outline-info {
  border-radius: 12px;
}

.form-control,
.form-select {
  background-color: #edf3ff;
  border-color: #d7e0ef;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(85, 126, 232, 0.65);
  box-shadow: 0 0 0 0.2rem rgba(85, 126, 232, 0.15);
}

/* --------------------------------------------------------------------------
   Badges
-------------------------------------------------------------------------- */

.badge.sev-critical {
  background: #dc3545;
}

.badge.sev-warning {
  background: #f0ad21;
  color: #1d1d1d;
}

.badge.sev-info {
  background: #2a9d69;
}

.text-bg-warning {
  color: #111827 !important;
}

/* --------------------------------------------------------------------------
   Login
-------------------------------------------------------------------------- */

.login-body {
  min-height: 100vh;
  background: linear-gradient(135deg, #edf4ff, #dbe6f5);
  display: grid;
  place-items: center;
}

.login-shell {
  width: min(1120px, 92vw);
}

.login-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  background: #fff;
  border-radius: var(--dd-radius-xxl);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(13, 27, 49, 0.18);
}

.login-left {
  background: linear-gradient(145deg, #12213b, #234a85);
  color: #fff;
  padding: 58px;
}

.brand-large {
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 58px;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.25em;
  opacity: 0.7;
  margin-bottom: 14px;
}

.login-left h1 {
  font-size: 42px;
  line-height: 1.06;
  font-weight: 850;
  margin-bottom: 22px;
}

.login-left p {
  font-size: 18px;
  opacity: 0.88;
}

.login-left ul {
  list-style: none;
  padding: 0;
  margin: 34px 0 0;
}

.login-left li {
  margin: 18px 0;
  display: flex;
  gap: 12px;
  align-items: center;
}

.login-right {
  padding: 70px 56px;
}

.login-right h2 {
  font-weight: 850;
  font-size: 34px;
}

/* --------------------------------------------------------------------------
   Tabellen
-------------------------------------------------------------------------- */

.table-responsive {
  max-width: 100%;
  overflow-x: auto;
}

.table {
  width: max-content;
  min-width: 100%;
  margin-bottom: 0;
}

.table th,
.table td {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.table td {
  white-space: nowrap;
}

.table td pre,
.table td code {
  white-space: pre-wrap;
}

.card-soft .table,
.rule-card .table,
.dash-card .table {
  --bs-table-bg: transparent;
}

.card-soft .table thead th,
.rule-card .table thead th,
.dash-card .table thead th {
  color: #63708a;
  font-size: 0.82rem;
  font-weight: 700;
  border-bottom-color: rgba(10, 25, 47, 0.1);
}

.card-soft .table tbody td,
.rule-card .table tbody td,
.dash-card .table tbody td {
  border-bottom-color: rgba(10, 25, 47, 0.07);
}

/* --------------------------------------------------------------------------
   Utilities
-------------------------------------------------------------------------- */

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.tiny {
  font-size: 12px;
}

.break-anywhere {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.min-w-0 {
  min-width: 0;
}

.raw-json {
  max-height: 680px;
  overflow: auto;
  font-size: 12px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   Explorer
-------------------------------------------------------------------------- */

.explorer-list {
  max-height: 620px;
  overflow: auto;
}

.explorer-resource-item {
  border-left: 0;
  border-right: 0;
}

.explorer-resource-item.active {
  background: #eaf1ff;
  color: #0f172a;
  border-color: rgba(47, 101, 246, 0.18);
}

.explorer-resource-item.active .text-secondary,
.explorer-resource-item.active .tiny {
  color: #375985 !important;
}

/* --------------------------------------------------------------------------
   KPI Klassiker
-------------------------------------------------------------------------- */

.kpi-card {
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--dd-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #eef3ff;
  color: #2f65f6;
  font-size: 20px;
  flex: 0 0 auto;
}

.kpi-label {
  color: var(--dd-muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.kpi-value {
  color: #001f4e;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.1;
}

/* --------------------------------------------------------------------------
   Sync
-------------------------------------------------------------------------- */

.sync-page {
  max-width: 100%;
}

.sync-hero {
  padding: 22px 24px;
}

.sync-hero-text {
  max-width: 820px;
}

.sync-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sync-action-card {
  padding: 20px;
}

.sync-action-card-primary {
  border-color: rgba(37, 99, 235, 0.22);
  background:
    linear-gradient(180deg, rgba(37, 99, 235, 0.045), rgba(255, 255, 255, 0.92)),
    #fff;
}

.sync-action-card-header {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.sync-action-icon,
.sync-info-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--dd-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dd-primary-soft);
  color: var(--dd-primary-strong);
  font-size: 22px;
  flex: 0 0 auto;
}

.sync-action-list {
  display: grid;
  gap: 10px;
}

.sync-action-button {
  width: 100%;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: #fff;
  border-radius: var(--dd-radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #0f172a;
  text-align: left;
  transition: all 0.15s ease;
}

.sync-action-button span {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.sync-action-button:hover {
  border-color: rgba(37, 99, 235, 0.45);
  background: rgba(37, 99, 235, 0.04);
  color: #1d4ed8;
  transform: translateY(-1px);
}

.sync-action-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.sync-action-button-strong {
  background: var(--dd-primary-strong);
  border-color: var(--dd-primary-strong);
  color: #fff;
}

.sync-action-button-strong:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.sync-info-card {
  padding: 18px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.sync-jobs-card {
  padding: 18px;
}

#syncResult .alert,
#syncResult pre {
  border-radius: var(--dd-radius-md);
}

/* --------------------------------------------------------------------------
   Rules
-------------------------------------------------------------------------- */

.rules-hero {
  padding: 22px 24px;
}

.rule-card {
  padding: 20px;
}

.rule-card-disabled {
  opacity: 0.72;
  background:
    linear-gradient(180deg, rgba(148, 163, 184, 0.06), rgba(255, 255, 255, 0.95)),
    #fff;
}

.rule-json-field {
  line-height: 1.45;
  background: #f8fafc;
  border-color: rgba(15, 23, 42, 0.12);
  resize: vertical;
}

.rule-help-card {
  padding: 20px;
}

.rule-builder-box,
.rule-advanced {
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: var(--dd-radius-md);
  padding: 14px;
  background: #f8fafc;
}

.rule-help-list {
  display: grid;
  gap: 16px;
}

.rule-advanced {
  padding: 12px 14px;
}

.rule-advanced summary {
  cursor: pointer;
  font-weight: 600;
  color: #334155;
}

/* --------------------------------------------------------------------------
   Dashboard
-------------------------------------------------------------------------- */

.dashboard-v2 {
  --dash-card-radius: var(--dd-radius-lg);
}

.dash-hero-content {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.dash-hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dash-kpi {
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 116px;
  color: inherit;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.dash-kpi-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--dd-shadow-hover);
  color: inherit;
}

.dash-kpi-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--dd-radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--dd-primary-soft);
  color: var(--dd-primary-strong);
  font-size: 1.35rem;
  flex: 0 0 auto;
}

.dash-kpi-icon.danger {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.dash-kpi-icon.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.dash-kpi-label {
  color: var(--dd-muted);
  font-size: 0.86rem;
  margin-bottom: 3px;
}

.dash-kpi-value {
  font-size: clamp(1.65rem, 2vw, 2.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

.dash-kpi-sub {
  color: var(--dd-muted);
  font-size: 0.82rem;
  margin-top: 4px;
}

.dash-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}

.dash-chart-shell {
  height: 270px;
  position: relative;
}

.dash-chart-tall {
  height: 330px;
}

.dash-chart-compact {
  height: 220px;
}

.dash-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dash-mini-stat {
  border: 1px solid var(--dd-border);
  border-radius: 15px;
  padding: 14px;
  background: #f8fafc;
}

.dash-progress-list {
  display: grid;
  gap: 12px;
}

.dash-progress {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.dash-progress .progress-bar {
  background: linear-gradient(90deg, var(--dd-primary-strong), #06b6d4);
}

.dash-findings-list {
  display: grid;
  gap: 10px;
}

.dash-finding-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 13px 0;
  border-top: 1px solid rgba(15, 23, 42, 0.07);
}

.dash-finding-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.dash-finding-main {
  min-width: 0;
}

.dash-finding-message {
  color: #475569;
  font-size: 0.88rem;
  line-height: 1.35;
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-finding-meta {
  min-width: 140px;
  display: grid;
  justify-items: end;
  gap: 6px;
}

.dash-margin-negative {
  color: #dc3545;
  font-weight: 800;
}

.dash-next-list {
  display: grid;
  gap: 16px;
}

.dash-next-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.dash-next-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--dd-radius-md);
  background: var(--dd-primary-soft);
  color: var(--dd-primary-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

/* Dashboard Qualitätskarten */

.dash-quality-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1rem;
}

.dash-quality-card {
  border: 1px solid var(--dd-border-strong);
  border-radius: var(--dd-radius-lg);
  padding: 1rem;
  background: #fff;
  min-height: 100%;
  overflow: hidden;
}

.dash-quality-card-head,
.dash-quality-footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.dash-quality-title {
  line-height: 1.25;
}

.dash-quality-body {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 1rem;
  align-items: center;
  margin: 1rem 0;
}

.dash-donut-wrap {
  width: 132px;
  height: 132px;
  position: relative;
}

.dash-quality-main {
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.dash-quality-mini {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.dash-quality-mini > div,
.dash-tech-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dash-quality-mini span,
.dash-tech-row span {
  font-size: 0.85rem;
}

.dash-quality-mini strong,
.dash-tech-row strong {
  font-weight: 700;
}

.dash-quality-footer {
  align-items: center;
  border-top: 1px solid rgba(148, 163, 184, 0.18);
  padding-top: 0.75rem;
}

.dash-focus-rule {
  border-radius: var(--dd-radius-lg);
  background: rgba(37, 99, 235, 0.04);
  padding: 1rem;
}

.dash-tech-list {
  display: grid;
  gap: 0.75rem;
}

/* --------------------------------------------------------------------------
   Ertragsanalyse
-------------------------------------------------------------------------- */

.profit-page .profit-loss-scroll {
  max-height: 620px;
  overflow: auto;
}

.profit-page .table td,
.profit-page .table th {
  vertical-align: middle;
}

.profit-loss-item-clean {
  align-items: stretch;
}

.profit-loss-item-clean .dash-finding-main {
  min-width: 0;
  width: 100%;
}

.profit-loss-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.profit-loss-facts > div,
.profit-loss-fact-row > div {
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  padding: 8px 10px;
  background: #f8fafc;
}

.profit-loss-facts span,
.profit-loss-fact-row span {
  display: block;
  color: var(--dd-muted);
  font-size: 0.78rem;
  line-height: 1.2;
  margin-bottom: 3px;
}

.profit-loss-facts strong,
.profit-loss-fact-row strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.profit-loss-card-list {
  display: grid;
  gap: 14px;
}

.profit-loss-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  border: 1px solid var(--dd-border-strong);
  background: #fff;
  border-radius: var(--dd-radius-lg);
  padding: 16px;
  overflow: hidden;
}

.profit-loss-card:hover {
  background: #f8fafc;
}

.profit-loss-card-main {
  min-width: 0;
}

.profit-loss-card-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.profit-loss-invoice {
  font-weight: 800;
  color: #020617;
}

.profit-loss-amount {
  text-align: right;
  white-space: nowrap;
}

.profit-loss-context {
  display: grid;
  grid-template-columns: minmax(180px, 0.35fr) minmax(260px, 1fr);
  gap: 16px;
  margin-bottom: 12px;
}

.profit-loss-reason {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.profit-loss-reason .badge {
  flex: 0 0 auto;
}

.profit-loss-fact-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.profit-loss-card-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 92px;
}

/* --------------------------------------------------------------------------
   Reports
-------------------------------------------------------------------------- */

.reports-page .dash-card {
  border-radius: var(--dd-radius-xl);
}

.reports-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.reports-metric {
  border: 1px solid var(--dd-border-strong);
  border-radius: var(--dd-radius-md);
  padding: 0.75rem;
  background: rgba(248, 250, 252, 0.8);
}

.reports-metric span {
  display: block;
  color: var(--dd-muted);
  font-size: 0.82rem;
  margin-bottom: 0.2rem;
}

.reports-metric strong {
  display: block;
  font-size: 1.4rem;
  line-height: 1;
}

.reports-export-list {
  display: grid;
  gap: 0.5rem;
}

.reports-export-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--dd-radius-md);
  padding: 0.65rem 0.75rem;
  text-decoration: none;
  background: rgba(37, 99, 235, 0.03);
  color: #1d4ed8;
}

.reports-export-link:hover {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.reports-export-link span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.reports-idea {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border: 1px solid var(--dd-border-strong);
  border-radius: var(--dd-radius-lg);
  padding: 0.9rem;
  height: 100%;
  background: rgba(248, 250, 252, 0.75);
}

.reports-idea i {
  color: var(--bs-primary);
  font-size: 1.25rem;
}

.reports-idea strong {
  display: block;
  margin-bottom: 0.2rem;
}

.reports-idea span {
  display: block;
  color: var(--dd-muted);
  font-size: 0.86rem;
}

/* --------------------------------------------------------------------------
   Responsive
-------------------------------------------------------------------------- */

@media (min-width: 768px) {
  .dash-quality-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .dash-quality-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1500px) {
  .profit-loss-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1400px) {
  .profit-loss-fact-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .dash-hero-content,
  .dash-card-header {
    flex-direction: column;
  }

  .dash-hero-actions {
    justify-content: flex-start;
  }

  .dash-finding-item {
    grid-template-columns: 1fr;
  }

  .dash-finding-meta {
    justify-items: start;
  }

  .profit-loss-card {
    grid-template-columns: 1fr;
  }

  .profit-loss-card-actions {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .profit-loss-context {
    grid-template-columns: 1fr;
  }

  .profit-loss-fact-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profit-loss-card-top {
    display: block;
  }

  .profit-loss-amount {
    text-align: left;
    margin-top: 8px;
  }
}

@media (max-width: 900px) {
  .app-sidebar {
    display: none;
  }

  .app-main {
    margin-left: 0;
    width: 100%;
  }

  .login-card {
    grid-template-columns: 1fr;
  }

  .login-left {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .sync-hero {
    padding: 18px;
  }

  .sync-hero-actions,
  .sync-hero-actions .btn {
    width: 100%;
  }

  .sync-action-card,
  .sync-jobs-card {
    padding: 16px;
  }
}

@media (max-width: 575.98px) {
  .content-wrap {
    padding: 16px;
  }

  .dash-quality-body {
    grid-template-columns: 1fr;
  }

  .dash-donut-wrap {
    margin: 0 auto;
  }

  .reports-metric-grid,
  .dash-mini-grid {
    grid-template-columns: 1fr;
  }
}

.app-sidebar {
  width: 286px;
  background: linear-gradient(180deg, var(--dd-sidebar), var(--dd-sidebar-dark));
  color: #fff;
  display: flex;
  flex-direction: column;
  padding: 26px 18px;
  position: fixed;
  inset: 0 auto 0 0;
  overflow-y: auto;

  /* Firefox */
  scrollbar-width: none;

  /* IE/Edge Legacy */
  -ms-overflow-style: none;
}

/* Chrome, Edge, Safari */
.app-sidebar::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.nav-section {
  margin: 18px 8px 7px;
}

.nav-item {
  padding: 10px 14px;
  margin: 2px 0;
}

.brand-box {
  margin-bottom: 30px;
}