html {
  font-size: 15px;
  min-height: 100%;
  position: relative;
}

body {
  background: #f6f7f2;
  color: #1e2a24;
  margin-bottom: 72px;
}

.navbar {
  background: #ffffff !important;
}

.navbar-brand {
  color: #1f7a4d !important;
  font-weight: 800;
}

.nav-link {
  font-weight: 600;
}

.btn-primary {
  background: #1f7a4d;
  border-color: #1f7a4d;
}

.btn-primary:hover {
  background: #17623d;
  border-color: #17623d;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus {
  box-shadow: 0 0 0 0.2rem rgba(31, 122, 77, 0.25);
}

.hero-panel {
  align-items: center;
  background: linear-gradient(135deg, rgba(31, 122, 77, 0.94), rgba(47, 90, 120, 0.94)), url("https://images.unsplash.com/photo-1555396273-367ea4eb4db5?auto=format&fit=crop&w=1400&q=80");
  background-position: center;
  background-size: cover;
  border-radius: 8px;
  color: #ffffff;
  display: flex;
  min-height: 340px;
  padding: 48px;
}

.hero-panel h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin: 0 0 12px;
}

.hero-panel .lead {
  max-width: 680px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.eyebrow {
  color: #2f7d5b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.hero-panel .eyebrow {
  color: #dcefe5;
}

.feature-grid,
.meal-grid,
.stats-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 28px;
}

.feature-card,
.meal-card,
.stats-grid article,
.app-form {
  background: #ffffff;
  border: 1px solid #dde5dc;
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(35, 57, 47, 0.06);
  padding: 22px;
}

.feature-card {
  color: inherit;
  text-decoration: none;
}

.feature-card span {
  color: #1f7a4d;
  font-weight: 800;
}

.feature-card h2,
.meal-card h2 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 8px 0;
}

.page-heading {
  margin: 18px 0 22px;
}

.page-heading h1 {
  font-weight: 800;
}

.page-heading-row {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.meal-card__top,
.meal-meta {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.muted {
  color: #66756d;
}

.status {
  border-radius: 999px;
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 5px 10px;
}

.status-ok {
  background: #dff4e8;
  color: #17623d;
}

.status-off {
  background: #f8dfdf;
  color: #8a1f1f;
}

.app-table {
  background: #ffffff;
  border: 1px solid #dde5dc;
  border-radius: 8px;
  overflow: hidden;
}

.app-table thead th {
  background: #ecf3ee;
  color: #1e2a24;
}

.app-form {
  display: grid;
  gap: 10px;
  max-width: 620px;
}

.app-form label {
  font-weight: 700;
}

.stats-grid strong {
  display: block;
  font-size: 2.4rem;
  line-height: 1;
  margin-top: 8px;
}

.details-panel,
.camera-panel {
  background: #ffffff;
  border: 1px solid #dde5dc;
  border-radius: 8px;
  padding: 22px;
}

.details-panel dl {
  display: grid;
  gap: 8px 18px;
  grid-template-columns: minmax(140px, 220px) 1fr;
  margin: 0 0 18px;
}

.details-panel dt {
  color: #66756d;
}

.details-panel dd {
  margin: 0;
}

.action-links {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.app-table td a {
  margin-right: 10px;
}

.scan-layout {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 480px) 1fr;
}

.camera-panel video {
  aspect-ratio: 16 / 9;
  background: #17221d;
  border-radius: 8px;
  display: block;
  width: 100%;
}

.scan-actions,
.role-form {
  align-items: center;
  display: flex;
  gap: 10px;
}

.role-form .form-select {
  min-width: 150px;
}

.qr-display {
  align-items: flex-start;
  display: grid;
  gap: 12px;
  max-width: 240px;
}

.qr-display img,
.qr-thumb {
  background: #ffffff;
  border: 1px solid #dde5dc;
  border-radius: 6px;
  padding: 6px;
}

.qr-display img {
  width: 220px;
}

.qr-thumb {
  width: 72px;
}

.readonly-grid {
  background: #f7faf8;
  border: 1px solid #dde5dc;
  border-radius: 8px;
  display: grid;
  gap: 8px 16px;
  grid-template-columns: minmax(140px, 220px) 1fr;
  padding: 16px;
}

.readonly-grid span {
  color: #66756d;
}

@media (max-width: 640px) {
  .hero-panel {
    padding: 30px 22px;
  }

  .hero-panel h1 {
    font-size: 2.4rem;
  }

  .page-heading-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .scan-layout,
  .details-panel dl {
    grid-template-columns: 1fr;
  }
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}
