@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600;700&family=Roboto:wght@300;400;500;700&display=swap');

body {
  font-family: 'Open Sans', sans-serif;
  color: #333333;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Roboto', sans-serif;
  color: #1f2937;
}

/* ── Fixed top navbar ─────────────────────────────────────────────────────── */

.app-navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 80px;
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
}

.app-navbar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 600;
}

.app-navbar img {
  height: 60px;
  object-fit: contain;
}

/* ── Tile layout ──────────────────────────────────────────────────────────── */

.tile {
  background-color: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 0;
  box-shadow: none;
  padding: 16px;
  margin-bottom: 16px;
}

.tile.tile-noborder {
  border: none;
  background-color: transparent;
  box-shadow: none;
  padding-left: 0;
  padding-right: 0;
}

.tile h2 {
  margin-top: 0px;
  margin-bottom: 20px;
  font-weight: 700;
  font-size: 1.5rem;
  color: #CC1E1C; /* Caritas Red */
}

.tab-content-wrapper {
  padding: 20px;
}

/* ── Auth screens ─────────────────────────────────────────────────────────── */

.auth-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 150px);
}

/* Login card (no-token screen) */
.auth-card {
  width: 100%;
  max-width: 400px;
  padding: 30px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #ffffff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Error / expired-token card */
.auth-card-error {
  width: 100%;
  max-width: 600px;
  padding: 40px;
  border: 2px solid #CC1E1C;
  border-radius: 8px;
  background-color: #fff5f5;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-card-error h2 {
  color: #CC1E1C;
  margin-bottom: 20px;
}

.auth-card-error p {
  font-size: 1.1rem;
  margin-bottom: 15px;
}

/* Centering wrapper for the form inside wide error cards */
.auth-form-centered {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

/* Large intro text on the anonymous landing screen */
.auth-intro-text {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1.5rem;
  max-width: 600px;
  color: #555;
}

/* Feedback / status message below the submit button */
.auth-feedback {
  margin-top: 15px;
  min-height: 20px;
  font-size: 0.9rem;
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */

/* Caritas-branded primary button (overrides Bootstrap defaults) */
.btn-caritas {
  background-color: #CC1E1C !important;
  border-color: #CC1E1C !important;
  color: #ffffff !important;
  font-weight: 500;
}

/* ── Legend ───────────────────────────────────────────────────────────────── */

.legend-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.legend-swatch {
  display: inline-block;
  width: 20px;
  height: 15px;
  margin-right: 5px;
  border-radius: 3px;
  vertical-align: middle;
}

.legend-swatch-qualitaetsprobleme { background-color: #ffffcc; }
.legend-swatch-deaktiviert      { background-color: #d3d3d3; }
.legend-swatch-nicht-eingeladen { background-color: #ffcccc; }
.legend-swatch-eingeladen       { background-color: #ccccff; }
.legend-swatch-uebertragen      { background-color: #ccffcc; }

/* ── Forecast block ───────────────────────────────────────────────────────── */

.forecast-block {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e0e0e0;
}

.forecast-label {
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 5px;
}

.forecast-value {
  color: #555;
}

/* ── DiRef contact block ──────────────────────────────────────────────────── */

.diref-contact {
  margin-top: 15px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.diref-contact-label {
  font-size: 0.9em;
  color: #666;
}

.diref-contact a {
  font-weight: 500;
}

/* ── Quality table (Datenqualität tab) ────────────────────────────────────── */

.quality-table-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.quality-table-hint {
  color: #666;
  margin: 0;
}

.cache-management {
  margin-top: 20px;
}

/* ── Change request modal ─────────────────────────────────────────────────── */

.change-request-body {
  margin-bottom: 20px;
}

.change-request-note {
  color: #666;
  margin-top: 15px;
  background-color: #f9f9f9;
  padding: 10px;
  border-radius: 4px;
  border: 1px solid #eee;
}

/* ── Upload details modal ─────────────────────────────────────────────────── */

.upload-details-container {
  max-height: 600px;
  overflow-y: auto;
}

.upload-details-count {
  font-weight: bold;
  margin-bottom: 15px;
}

.upload-details-item {
  margin-bottom: 20px;
}

.upload-details-heading {
  color: #CC1E1C;
  margin-bottom: 10px;
}

/* ── Missing aggregations modal ───────────────────────────────────────────── */

.missing-aggs-list {
  max-height: 400px;
  overflow-y: auto;
}

/* ── Downloads (Auswertungen) tab ─────────────────────────────────────────── */

.heading-caritas {
  color: #CC1E1C;
  margin-bottom: 20px;
}

.download-search {
  margin-bottom: 20px;
  max-width: 450px;
  align-self: center;
}

.download-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: center;
}

.download-item {
  padding: 15px;
  width: 450px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: #fcfcfc;
  display: flex;
  justify-content: space-between;
  align-items: center;
  align-self: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.download-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.download-item-title {
  font-weight: 500;
  font-size: 1.5rem;
  color: #333;
}

.download-footer-note {
  margin-top: 30px;
  font-size: 0.9rem;
  color: #777;
}

.btn-download {
  background-color: #1D6F42 !important;
  border-color: #1D6F42 !important;
  color: white !important;
  display: flex;
  align-items: center;
  gap: 8px;
}

.excel-icon {
  color: #1D6F42;
  font-size: 1.5rem;
}

/* ── Caritas-branded inline link ─────────────────────────────────────────── */

.link-caritas {
  color: #CC1E1C;
  font-weight: bold;
}

/* ── Pen icon in the uploads table ───────────────────────────────────────── */

.pen-icon {
  cursor: pointer;
}

.pen-icon img {
  height: 20px;
  width: auto;
}

/* ── DataTables border removal ────────────────────────────────────────────── */

.dataTables_wrapper.no-footer .dataTables_scrollBody { border-bottom: none; }
table.dataTable.no-footer { border-bottom: none !important; }
table.dataTable thead th, table.dataTable thead td { border-bottom: none !important; }
.tile table.dataTable tr, .tile table.dataTable td { border: none !important; }

/* Clickable cells in the quality table */
.clickable-cell { cursor: pointer; color: #007bff; text-decoration: underline; }
.clickable-cell:hover { color: #0056b3; }
