/* Base */
html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: #f5f5f7;
  color: #1d1d1f;
  display: flex;
  flex-direction: column;

}

main {
  flex: 1 0 auto; /* wächst, füllt also den verfügbaren Raum */
}

/* Navbar */
.navbar {
  background: #fff !important;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: none;
}
.navbar .nav-link {
  font-weight: 300;
  color: #1d1d1f !important;
  padding: 0.5rem 1rem;
  position: relative;
  letter-spacing: .5px;
}
.navbar .nav-link:hover {
  color: #0071e3 !important;
}
.navbar .nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #0071e3;
  transition: width .3s, left .3s;
}
.navbar .nav-link:hover::after {
  width: 100%;
  left: 0;
}
.navbar-brand {
  font-weight: 200;
}
.navbar-light .navbar-toggler-icon {
  filter: invert(0.2);
}

/* Card */
.card {
  background-color: #fff;
  border: none;
  border-radius: .75rem;
  box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
}

/* Digit inputs */
.digit-inputs {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.digit-input {
  width: 3.5rem;
  height: 3.5rem;
  max-width: 100%;
  text-align: center;
  font-size: 1.75rem;
  border: 1px solid #ced4da;
  border-radius: .5rem;
  transition: border-color .2s, box-shadow .2s;
}
.digit-input:focus {
  border-color: #0071e3;
  box-shadow: 0 0 0 .2rem rgba(0,113,227,.25);
}

/* Validation feedback */
.was-validated .digit-input:invalid {
  border-color: #dc3545;
}
.invalid-feedback {
  display: none;
}
.was-validated .form-control:invalid ~ .invalid-feedback,
.was-validated .digit-input:invalid ~ .invalid-feedback {
  display: block;
  text-align: center;
  margin-top: .5rem;
}

/* Virtual Keyboard */
.virtual-keyboard {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.keyboard-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}
.key {
  width: 3.75rem;
  height: 3.75rem;
  font-size: 1.5rem;
  border-radius: 50%;
}
.btn-outline-primary.key {
  color: #0071e3;
  border-color: #0071e3;
}
.btn-outline-primary.key:hover {
  background-color: #0071e3;
  color: #fff;
}
.clear {
  margin-top: 1rem;
  min-width: 7.5rem;
  border-radius: 1.5rem;
}

/* Overlay & popover trigger */
#overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2;
}
#loadingMessage {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: #fff;
}

/* Tables */
.table thead th {
  border-bottom: 2px solid #dee2e6;
}
.table tbody tr:nth-child(odd) {
  background-color: #f8f9fa;
}

/* Footer */
footer {
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.1);
  box-shadow: 0 -1px 4px rgba(0,0,0,0.08);
    flex-shrink: 0; /* bleibt immer in seiner Höhe */

}
footer .text-muted {
  color: #6c757d !important;
}
/* Status-Log Card */
.status-log-card {
  max-width: 500px;
}
.status-log-card .card-header {
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.status-log-card .table-responsive {
  max-height: 300px; /* bei Bedarf scrollbar */
  overflow-y: auto;
}
.status-log-card .table th,
.status-log-card .table td {
  vertical-align: middle;
  white-space: nowrap;
}
