/* =========================================================
   Stringing App Cockpit Design System
   Einheitliche Darstellung für Admin, ProShop, Hersteller
   ========================================================= */

.cockpit-page {
  width: min(1320px, calc(100% - 2rem));
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 1rem;
  padding-bottom: 2rem;
}

.cockpit-header {
  margin-bottom: 1.5rem;
}

.cockpit-eyebrow {
  text-transform: uppercase;
  color: #6c757d;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: .25rem;
}

.cockpit-title {
  margin: 0;
  font-weight: 700;
}

.cockpit-subtitle {
  color: #6c757d;
  margin: .25rem 0 0;
}

.cockpit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.cockpit-kpi-card {
  border: 0;
  border-radius: .75rem;
  box-shadow: 0 .25rem .75rem rgba(15, 23, 42, .06);
  height: 100%;
}

.cockpit-kpi-card .card-body {
  min-height: 5.25rem;
}

.cockpit-kpi-label {
  color: #6c757d;
  font-size: .875rem;
  margin-bottom: .25rem;
}

.cockpit-kpi-value {
  font-size: 2rem;
  line-height: 1.1;
  font-weight: 700;
  margin: 0;
}

.cockpit-kpi-hint {
  color: #6c757d;
  font-size: .8125rem;
  margin-top: .25rem;
}

.cockpit-card {
  border: 0;
  border-radius: .75rem;
  box-shadow: 0 .25rem .75rem rgba(15, 23, 42, .06);
}

.cockpit-card-header {
  background: #fff;
  font-weight: 700;
  border-bottom: 1px solid rgba(0, 0, 0, .075);
  border-radius: .75rem .75rem 0 0 !important;
}

.cockpit-task-item {
  padding: .85rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, .075);
}

.cockpit-task-item:last-child {
  border-bottom: 0;
}

.cockpit-empty {
  border: 1px dashed rgba(0, 0, 0, .18);
  border-radius: .75rem;
  padding: 1.25rem;
  background: #f8f9fa;
}

.cockpit-section-title {
  font-weight: 700;
  margin-bottom: .75rem;
}

.cockpit-muted {
  color: #6c757d;
}

.cockpit-table-card .table {
  margin-bottom: 0;
}

.cockpit-table-card th {
  font-size: .875rem;
  white-space: nowrap;
}

.cockpit-table-card td {
  vertical-align: middle;
}

.cockpit-highlight-warning {
  border-left: .25rem solid #ffc107 !important;
}

.cockpit-highlight-info {
  border-left: .25rem solid #0dcaf0 !important;
}

.cockpit-highlight-success {
  border-left: .25rem solid #198754 !important;
}

.cockpit-highlight-danger {
  border-left: .25rem solid #dc3545 !important;
}

.cockpit-filter-card {
  border: 0;
  border-radius: .75rem;
  box-shadow: 0 .25rem .75rem rgba(15, 23, 42, .06);
  margin-bottom: 1.25rem;
}

.cockpit-soft-info {
  background: #eef7ff;
  border: 1px solid #cfe8ff;
  border-radius: .75rem;
  padding: 1rem;
}

.cockpit-compact-form .form-label {
  font-size: .875rem;
  color: #495057;
  margin-bottom: .35rem;
}

@media (max-width: 767.98px) {
  .cockpit-kpi-value {
    font-size: 1.6rem;
  }

  .cockpit-actions {
    width: 100%;
  }

  .cockpit-actions .btn {
    flex: 1 1 auto;
  }
}


/* =========================================================
   Globale Cockpit-Breite
   Alle Seiten mit .cockpit-page bekommen eine ruhige Arbeitsbreite.
   Verhindert ultrabreite Tabellen/Karten auf großen Monitoren.
   ========================================================= */

.cockpit-page {
  width: min(1320px, calc(100% - 2rem));
  max-width: 1320px;
  margin-left: auto;
  margin-right: auto;
  padding-top: 1rem;
  padding-bottom: 2rem;
}

.cockpit-page.container,
.cockpit-page.container-fluid,
.cockpit-page.container-xl,
.cockpit-page.container-lg {
  padding-left: 0;
  padding-right: 0;
}

.cockpit-page .row {
  max-width: 100%;
}

.cockpit-page .card {
  overflow: hidden;
}

.cockpit-page .table-responsive {
  border-radius: 0 0 .75rem .75rem;
}

@media (max-width: 767.98px) {
  .cockpit-page {
    width: calc(100% - 1rem);
  }
}


/* =========================================================
   Cockpit Escape-Fix
   Falls ein Template Inhalte versehentlich außerhalb von .cockpit-page rendert,
   werden direkte Seitenblöcke trotzdem auf die Cockpit-Breite begrenzt.
   ========================================================= */

body:has(.cockpit-page) main > .row,
body:has(.cockpit-page) main > .card,
body:has(.cockpit-page) main > .alert,
body:has(.cockpit-page) main > form,
body:has(.cockpit-page) main > .table-responsive,
body:has(.cockpit-page) main > .container,
body:has(.cockpit-page) main > .container-fluid,
body:has(.cockpit-page) main > .container-xl,
body:has(.cockpit-page) .content > .row,
body:has(.cockpit-page) .content > .card,
body:has(.cockpit-page) .content > .alert,
body:has(.cockpit-page) .content > form,
body:has(.cockpit-page) .content > .table-responsive,
body:has(.cockpit-page) .content > .container,
body:has(.cockpit-page) .content > .container-fluid,
body:has(.cockpit-page) .content > .container-xl {
  width: min(1320px, calc(100% - 2rem)) !important;
  max-width: 1320px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body:has(.cockpit-page) main > .row,
body:has(.cockpit-page) .content > .row {
  --bs-gutter-x: 1.5rem;
}

body:has(.cockpit-page) main > .card,
body:has(.cockpit-page) .content > .card {
  overflow: hidden;
}

@media (max-width: 767.98px) {
  body:has(.cockpit-page) main > .row,
  body:has(.cockpit-page) main > .card,
  body:has(.cockpit-page) main > .alert,
  body:has(.cockpit-page) main > form,
  body:has(.cockpit-page) main > .table-responsive,
  body:has(.cockpit-page) main > .container,
  body:has(.cockpit-page) main > .container-fluid,
  body:has(.cockpit-page) main > .container-xl,
  body:has(.cockpit-page) .content > .row,
  body:has(.cockpit-page) .content > .card,
  body:has(.cockpit-page) .content > .alert,
  body:has(.cockpit-page) .content > form,
  body:has(.cockpit-page) .content > .table-responsive,
  body:has(.cockpit-page) .content > .container,
  body:has(.cockpit-page) .content > .container-fluid,
  body:has(.cockpit-page) .content > .container-xl {
    width: calc(100% - 1rem) !important;
  }
}
