html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.restaurant-shell {
  padding-top: 1.5rem;
}

.restaurant-toolbar {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.restaurant-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.area-section {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
}

.area-header {
  align-items: center;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
}

.quick-order-card {
  align-items: center;
  border: 1px solid;
  border-radius: 8px;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 92px;
  padding: 1rem;
}

.report-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-height: 108px;
  padding: 1rem;
}

.report-card span {
  color: #6c757d;
}

.report-card strong {
  font-size: 2rem;
  line-height: 1;
}

.report-card small {
  color: #495057;
}

.login-brand {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  text-align: center;
}

.login-logo {
  max-height: 96px;
  max-width: min(240px, 100%);
  object-fit: contain;
}

.mesa-card {
  min-height: 128px;
  border-radius: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.mesa-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.12) !important;
}

.order-table-wrap {
  border: 1px solid #dee2e6;
  border-radius: 8px;
}

.order-table-wrap table {
  table-layout: fixed;
}

.order-table-wrap th,
.order-table-wrap td {
  overflow-wrap: anywhere;
  padding-left: 0.45rem;
  padding-right: 0.45rem;
}

.order-qty-col {
  width: 92px;
}

.order-actions-col {
  width: 90px;
}

.order-item-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
}

.order-actions-col {
  width: 110px;
}

.qty-value {
  min-width: 44px;
}

.search-results {
  max-height: 280px;
  overflow-y: auto;
}

.empty-order {
  border: 1px dashed #ced4da;
  border-radius: 8px;
  color: #6c757d;
  padding: 1rem;
  text-align: center;
}

.totals-table th,
.totals-table td {
  padding-left: 1rem;
  padding-right: 1rem;
}

.order-header {
  align-items: flex-start;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
}

.order-panel {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 1rem;
}

.order-detail-panel {
  position: sticky;
  top: 1rem;
}

.order-command-bar {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.menu-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.product-tile {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 112px;
  padding: 0.8rem;
  text-align: left;
  width: 100%;
}

.product-image {
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  width: 100%;
}

.product-tile:hover {
  border-color: #0d6efd;
  box-shadow: 0 0.25rem 0.65rem rgba(13, 110, 253, 0.12);
}

.product-code {
  color: #6c757d;
  font-size: 0.8rem;
}

.split-panel {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 0.75rem;
}

.split-payments {
  display: grid;
  gap: 0.75rem;
}

.split-payment,
.split-pending {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 0.75rem;
}

.split-line,
.split-pending-line {
  align-items: center;
  border-top: 1px solid #e9ecef;
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  padding: 0.5rem 0;
}

.split-line:first-of-type,
.split-pending-line:first-of-type {
  border-top: 0;
}

.split-assign-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
}

.receta-cantidad-col {
  width: 150px;
}

.receta-unidad-col {
  width: 150px;
}

.receta-accion-col {
  width: 90px;
}

.production-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.production-card {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.production-meta {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.production-actions {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 767.98px) {
  .restaurant-shell {
    padding-top: 1rem;
  }

  .restaurant-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .restaurant-actions .btn {
    flex: 1 1 0;
  }

  .area-section {
    padding: 0.75rem;
  }

  .mesa-card {
    min-height: 116px;
  }

  .mesa-card .card-header,
  .mesa-card .card-body {
    padding: 0.65rem;
  }

  .mesa-card h6,
  .mesa-card p,
  .mesa-card span {
    font-size: 0.9rem;
  }

  .quick-order-card {
    min-height: 84px;
  }

  .order-header {
    flex-direction: column;
  }

  .order-header .text-end {
    text-align: left !important;
  }

  .order-detail-panel {
    position: static;
  }

  .order-command-bar {
    grid-template-columns: 1fr;
  }

  .product-tile {
    min-height: 104px;
    padding: 0.7rem;
  }

  .split-line,
  .split-pending-line {
    align-items: stretch;
    flex-direction: column;
  }

  .split-assign-buttons {
    justify-content: flex-start;
  }
}

.product-image-preview {
  aspect-ratio: 4 / 3;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  max-width: 220px;
  object-fit: cover;
  width: 100%;
}

.product-thumb {
  aspect-ratio: 1 / 1;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  height: 48px;
  object-fit: cover;
  width: 48px;
}
