/* Keep it minimal so Bootstrap utilities control layout */
html, body { margin: 0; padding: 0; }

header.sticky-top {
  z-index: 1030;
}

.flash-stack {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1030;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem 0;
  pointer-events: none;
}

.flash-note {
  pointer-events: auto;
  width: min(40rem, 100%);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #fff;
  color: #1f2933;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 4px solid #198754;
  box-shadow: 0 0.5rem 1.25rem rgba(25, 22, 18, 0.16);
  opacity: 1;
  transition: opacity 0.4s ease;
}

.flash-note-warning {
  border-left-color: #b58105;
}

.flash-note-danger,
.flash-note-error {
  border-left-color: #dc3545;
}

.flash-note.is-hiding {
  opacity: 0;
}

.settings-layout > .settings-nav-col {
  flex: 0 0 240px;
  width: 240px;
  max-width: 240px;
}

.settings-layout > .settings-main {
  flex: 1 1 auto;
  width: 0;
  max-width: none;
  min-width: 0;
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
  padding: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  background: #fff;
}

/* Tables and other content were painting over the rounded corners. */
.card,
.modal-content,
.settings-nav {
  overflow: hidden;
}

.card.table-responsive {
  overflow-x: auto;
}

.status-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.status-order {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 108px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-left: 7px solid #6c757d;
  border-radius: 0.85rem;
  padding: 0.9rem 1rem;
  box-shadow: 0 0.25rem 0.7rem rgba(0, 0, 0, 0.06);
}

.status-order-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.status-order-number {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}

.status-order-name {
  margin-top: 0.65rem;
  font-size: 1rem;
}

.status-order-new { border-left-color: #6c757d; }
.status-order-making { border-left-color: #f0ad00; }
.status-order-ready { border-left-color: #0d6efd; }
.status-order-completed { border-left-color: #198754; }
.status-order-cancelled { border-left-color: #dc3545; }

.status-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #6c757d;
  background: #fff;
  border: 1px dashed rgba(0, 0, 0, 0.15);
  border-radius: 0.75rem;
}

.kitchen-timer {
  font-variant-numeric: tabular-nums;
  min-width: 4.5rem;
}

.customer-lookup {
  position: relative;
}

.customer-lookup-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: 100%;
  margin-top: 0.25rem;
  max-height: 16rem;
  overflow-y: auto;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.12);
}

.customer-lookup-list[hidden] {
  display: none;
}

.customer-lookup-item {
  display: block;
  width: 100%;
  padding: 0.45rem 0.7rem;
  border: 0;
  background: transparent;
  text-align: left;
}

.customer-lookup-item:hover,
.customer-lookup-item:focus {
  background: #f4f7fb;
}

.menu-unassigned {
  display: inline-flex;
  color: #b58105;
  line-height: 1;
}

.menu-unassigned svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: currentColor;
}

.menu-unassigned:hover {
  color: #8a6204;
}

.busy-screen {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.72);
}

.busy-screen[hidden] {
  display: none;
}

.busy-screen-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  min-width: 12rem;
  padding: 1.5rem 1.75rem;
  border-radius: 0.75rem;
  background: #fff;
  box-shadow: 0 0.75rem 2rem rgba(25, 22, 18, 0.18);
}

.busy-spinner {
  width: 3rem;
  height: 3rem;
  border: 0.28rem solid #e6ddd2;
  border-top-color: #241c18;
  border-radius: 50%;
  animation: busy-spin 0.8s linear infinite;
}

.busy-screen-text {
  margin: 0;
  font-weight: 600;
}

@keyframes busy-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 767.98px) {
  .settings-layout > .settings-nav-col,
  .settings-layout > .settings-main {
    flex: 0 0 100%;
    width: 100%;
    max-width: 100%;
  }
}

.settings-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  color: #241c18;
  text-decoration: none;
}

.settings-nav a:hover {
  background: rgba(36, 28, 24, 0.06);
}

.settings-nav a.active {
  background: #241c18;
  color: #fff;
}

.password-meter {
  height: 0.4rem;
  background: #ece7e1;
  border-radius: 999px;
  overflow: hidden;
}

.password-meter > span {
  display: block;
  height: 100%;
  width: 0;
  background: #dc3545;
  transition: width 0.2s ease;
}

.password-meter.is-fair > span {
  background: #b58105;
}

.password-meter.is-good > span {
  background: #0d6efd;
}

.password-meter.is-strong > span {
  background: #198754;
}

.password-rules {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.password-rules li {
  color: #8a7b70;
  font-size: 0.875rem;
}

.password-rules li.is-met {
  color: #198754;
}

.btn-fixed {
  min-width: 90px;
  text-align: center;
}

.btn-outline-enable {
  color: #198754;
  border-color: #198754;
}

.btn-outline-enable:hover {
  background-color: #198754;
  color: #fff;
}

.btn-outline-disable {
  color: #dc3545;
  border-color: #dc3545;
}

.btn-outline-disable:hover {
  background-color: #dc3545;
  color: #fff;
}

.health-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.health-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.health-ok {
  background: #e8f6ee;
  color: #198754;
}

.health-bad {
  background: #fdecee;
  color: #dc3545;
}

.health-idle {
  background: #f3f1ef;
  color: #8a7b70;
}

.company-logo-horizontal {
  height: 48px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
}

.company-logo-primary {
  display: block;
  max-height: 110px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
}

.company-logo-slot {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.company-logo-well {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 150px;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: #f6f4f1;
  border-radius: 0.75rem;
}

.company-logo-well-icon {
  background: #f4efe4;
}

.company-logo-well img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

#itemModal .modal-dialog {
  width: calc(100vw - 1.5rem);
  max-width: 500px;
  max-height: calc(100dvh - 1.5rem);
  margin: 0.75rem auto;
}

#itemModal .modal-content {
  max-height: calc(100dvh - 1.5rem);
  overflow: hidden;
}

#itemModal #itemForm {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 1.5rem);
  min-height: 0;
}

#itemModal .modal-header,
#itemModal .modal-footer {
  flex: none;
}

#itemModal .modal-body {
  overflow-y: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

#itemModal.item-modal-has-image .modal-dialog {
  max-width: min(920px, calc(100vw - 1.5rem));
}

#itemModal.item-modal-has-image .item-modal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(220px, 0.85fr);
  gap: 1.25rem 1.5rem;
  align-items: start;
}

#itemModal #itemImageTag {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #f6f4f1;
  border-radius: 0.75rem;
  display: block;
}

@media (max-width: 767.98px) {
  #itemModal.item-modal-has-image .item-modal-layout {
    display: block;
  }

  #itemModal.item-modal-has-image .item-modal-image {
    margin-top: 1rem;
  }

  #itemModal #itemImageTag {
    max-height: 180px;
  }
}

.homepage-body h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.homepage-body h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin-top: 2.25rem;
  margin-bottom: 0.75rem;
}

.homepage-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
}

.homepage-body p,
.homepage-body li {
  color: var(--bs-secondary-color);
}

.homepage-body h1 + p {
  font-size: 1.15rem;
}

.homepage-body img {
  display: block;
  max-width: min(100%, 720px);
  height: auto;
  border-radius: 0.75rem;
  margin: 0.75rem 0 1rem;
}

.homepage-body .homepage-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.25rem;
}
