:root {
    --invalid-color: #EBCDC9;
    --loading-overlay-color: rgba(255, 255, 255, 0.7);

    --b1: #e4f1fe;
    --b2: #8dc6ff;
    --b3: #22313f;
    --b4: #34495e;

    --grey1: #f7f7f7;
    --grey2: #eeeeee;
    --grey3: #cdd0d3;
    --grey4: #929aab;
    --grey5: #393e46;

    --invalid-color: #EBCDC9;
    --loading-overlay-color: rgba(255, 255, 255, 0.7);

    --header-color1: #0062ff;
    --header-color2: #3b82f6;
}

[data-bs-theme="dark"] {
    --b1: #1e3a5f;
    --b2: #3b82f6;
    --b3: #1e293b;
    --b4: #334155;
    
    --grey1: #1f2937;
    --grey2: #4b5563;
    --grey3: #374151;
    --grey4: #6b7280;
    --grey5: #9ca3af;

    --invalid-color: #66000a;
    --loading-overlay-color: rgba(0, 0, 0, 0.7);

    --header-color1: #3b82f6;
    --header-color2: #0062ff;
}

[data-bs-theme="dark"] .table .alternate-row td,
[data-bs-theme="dark"] .table .alternate-row th {
    background-color: #394046 !important;
}

[data-bs-theme="light"] .table .alternate-row td,
[data-bs-theme="light"] .table .alternate-row th {
    background-color: #f8f9fa !important;
}

[data-bs-theme="dark"] {
    --invalid-color: #66000a;
    --loading-overlay-color: rgba(0, 0, 0, 0.7);
}

[data-bs-theme="light"] .table th {
    background-color: rgba(33, 37, 41, 0.03);
}
[data-bs-theme="dark"] .table th {
    background-color: rgba(173, 181, 189, 0.03);
}

/*#region BUTTONS_DARK */
[data-bs-theme="dark"] .btn-secondary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #4C5257;
    --bs-btn-border-color: #3f4448;
    --bs-btn-hover-bg: #3f4448;
}
[data-bs-theme="dark"] .btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: #12633D;
    --bs-btn-border-color: #12633D;
    --bs-btn-hover-bg: #125b36;
}
[data-bs-theme="dark"] .btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: #08439B;
    --bs-btn-border-color: #08439B;
    --bs-btn-hover-bg: #083b8a;
}
[data-bs-theme="dark"] .btn-danger {
    --bs-btn-color: #fff;
    --bs-btn-bg: #66000a;
    --bs-btn-border-color: #66000a;
    --bs-btn-hover-bg: #5e0009;
}
[data-bs-theme="dark"] .btn-warning {
    --bs-btn-color: #000;
    --bs-btn-bg: #FFA500;
    --bs-btn-border-color: #FFA500;
    --bs-btn-hover-bg: #cc8500;
}
[data-bs-theme="dark"] .btn-info {
    --bs-btn-color: #000;
    --bs-btn-bg: #08839B;
    --bs-btn-border-color: #08839B;
    --bs-btn-hover-bg: #08738b;
}
[data-bs-theme="dark"] .btn-light {
    --bs-btn-color: #000000;
    --bs-btn-bg: #727c83;
    --bs-btn-border-color: #4C5257;
    --bs-btn-hover-bg: #4C5257;
}
[data-bs-theme="dark"] .btn-outline-dark {
    --bs-btn-color: #4C5257;
    --bs-btn-border-color: #4C5257;
}
[data-bs-theme="dark"] .btn-outline-info {
    --bs-btn-color: #08839B;
    --bs-btn-border-color: #08839B;
}
[data-bs-theme="dark"] .btn-outline-danger {
    --bs-btn-color: #66000a;
    --bs-btn-border-color: #66000a;
    --bs-btn-hover-bg: #66000a;
    --bs-btn-hover-border-color: #66000a;
}
[data-bs-theme="dark"] .btn-outline-success {
    --bs-btn-color: #12633D;
    --bs-btn-border-color: #12633D;
    --bs-btn-hover-bg: #12633D;
    --bs-btn-hover-border-color: #12633D;
}
[data-bs-theme="dark"] .btn-outline-warning {
    --bs-btn-color: #A37A00;
    --bs-btn-border-color: #A37A00;
    --bs-btn-hover-bg: #A37A00;
    --bs-btn-hover-border-color: #A37A00;
}
[data-bs-theme="dark"] .btn-outline-primary {
    --bs-btn-color: #08439B;
    --bs-btn-border-color: #08439B;
    --bs-btn-hover-bg: #08439B;
    --bs-btn-hover-border-color: #08439B;
}
[data-bs-theme="dark"] .btn-outline-secondary {
    --bs-btn-color: #4C5257;
    --bs-btn-border-color: #4C5257;
    --bs-btn-hover-bg: #4C5257;
    --bs-btn-hover-border-color: #4C5257;
}
/*#endregion */

/*#region ALERT */
.app-alert-overlay {
  position: fixed !important;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1080 !important;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.app-alert-content {
  background-color: var(--bs-body-bg);
  color: var(--bs-body-color);
  border-radius: 0.5rem;
  min-width: 400px;
  max-width: 90vw;
  max-height: 80vh;
  overflow: auto;
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.3);
  border: 1px solid var(--bs-border-color);
}

.app-alert-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem 0.75rem;
  border-bottom: 1px solid var(--bs-border-color);
  font-weight: bold;
}

.app-alert-header h5 {
  margin: 0;
  color: inherit;  /* Dziedziczy z body */
}

.app-alert-body {
  padding: 1rem;
  white-space: pre-line;  /* ← Konwertuje \n → nowe linie */
  line-height: 1.2;       /* Opcjonalnie lepsza czytelność */
  align-items: center;
  text-align: left;
}

.app-alert-footer {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--bs-border-color);
  text-align: right;
}

/*#endregion */

/*#region FILTERS */
.filters-layout {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
}

.filter-card {
  flex: 0 1 300px;
}

.filter-card-wide {
  flex: 0 1 400px;
}

@media (max-width: 992px) {
  .filter-card {
    flex: 0 1 260px;
  }

  .filter-card-wide {
    flex: 0 1 300px;
  }
}

@media (max-width: 768px) {
  .filter-card,
  .filter-card-wide {
    flex: 1 1 100%;
  }
}
/*#endregion */