html {
  font-size: 15px;
}

/* ---------- Señor Crocs brand ----------
   Teal sampled from the logo lettering (#06636a). Dark mode uses a lighter teal so links and
   outlined buttons stay readable on the dark background. */
:root,
[data-bs-theme="light"] {
  --brand: #06636a;
  --brand-hover: #054f55;
  --brand-active: #043f44;
  --brand-rgb: 6, 99, 106;
  --brand-fg: #06636a;          /* brand colour used as text on the page background */

  --bs-primary: var(--brand);
  --bs-primary-rgb: var(--brand-rgb);
  --bs-primary-text-emphasis: #03474c;
  --bs-primary-bg-subtle: #d4eeef;
  --bs-primary-border-subtle: #9fd3d6;
  --bs-link-color: var(--brand-fg);
  --bs-link-color-rgb: var(--brand-rgb);
  --bs-link-hover-color: var(--brand-hover);
  --bs-link-hover-color-rgb: 5, 79, 85;
  --bs-focus-ring-color: rgba(var(--brand-rgb), .25);
}

[data-bs-theme="dark"] {
  --brand: #0a7f87;
  --brand-hover: #0c939c;
  --brand-active: #0eaab3;
  --brand-rgb: 10, 127, 135;
  --brand-fg: #5fd0c6;

  --bs-primary: var(--brand);
  --bs-primary-rgb: var(--brand-rgb);
  --bs-primary-text-emphasis: #8fe0d8;
  --bs-primary-bg-subtle: #02292c;
  --bs-primary-border-subtle: #075358;
  --bs-link-color: var(--brand-fg);
  --bs-link-color-rgb: 95, 208, 198;
  --bs-link-hover-color: #8fe0d8;
  --bs-link-hover-color-rgb: 143, 224, 216;
  --bs-focus-ring-color: rgba(95, 208, 198, .3);
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-hover);
  --bs-btn-hover-border-color: var(--brand-hover);
  --bs-btn-active-bg: var(--brand-active);
  --bs-btn-active-border-color: var(--brand-active);
  --bs-btn-disabled-bg: var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
  --bs-btn-focus-shadow-rgb: var(--brand-rgb);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand-fg);
  --bs-btn-border-color: var(--brand-fg);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--brand);
  --bs-btn-active-border-color: var(--brand);
  --bs-btn-focus-shadow-rgb: var(--brand-rgb);
}

.pagination {
  --bs-pagination-color: var(--bs-link-color);
  --bs-pagination-hover-color: var(--bs-link-hover-color);
  --bs-pagination-focus-color: var(--bs-link-hover-color);
  --bs-pagination-focus-box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color);
  --bs-pagination-active-bg: var(--brand);
  --bs-pagination-active-border-color: var(--brand);
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
  border-color: var(--brand-fg);
  box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color);
}

.form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

.btn:focus-visible {
  box-shadow: 0 0 0 .25rem var(--bs-focus-ring-color);
}

.brand-mark {
  border-radius: 50%;
  background: #fff;
  object-fit: cover;
}

/* The logo has a white background, so it sits on a white panel in both themes. */
.login-logo {
  background: #fff;
  padding: 1.25rem 2rem .75rem;
  text-align: center;
  border-bottom: 1px solid var(--bs-border-color-translucent);
}

.login-logo img {
  width: 100%;
  max-width: 240px;
  height: auto;
}

.receipt-logo {
  width: 42mm;
  max-width: 60%;
  height: auto;
  margin-bottom: .25rem;
}


body {
  background: var(--bs-tertiary-bg);
}

.card {
  border: 1px solid var(--bs-border-color-translucent);
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

/* Login */
.login-wrap {
  min-height: calc(100vh - 2rem);
  display: grid;
  place-items: center;
}

/* Simple bar chart (dashboard / reports) */
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  height: 180px;
}

.bar-chart .bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  height: 100%;
  min-width: 0;
}

.bar-chart .bar {
  width: 100%;
  max-width: 48px;
  background: var(--bs-primary);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
}

.bar-chart .bar-label {
  font-size: .75rem;
  color: var(--bs-secondary-color);
  margin-top: .25rem;
  white-space: nowrap;
}

.bar-chart .bar-value {
  font-size: .7rem;
  color: var(--bs-secondary-color);
  margin-bottom: .15rem;
  white-space: nowrap;
}

/* Floor plan */
.table-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: .5rem;
  padding: 1rem;
  text-align: center;
  border: 2px solid var(--bs-success-border-subtle);
  background: var(--bs-success-bg-subtle);
  transition: transform .1s;
}

.table-tile:hover {
  transform: translateY(-2px);
  color: inherit;
}

.table-tile.busy {
  border-color: var(--bs-warning-border-subtle);
  background: var(--bs-warning-bg-subtle);
}

.table-tile.inactive {
  opacity: .5;
}

.table-tile .table-name {
  font-size: 1.5rem;
  font-weight: 700;
}

/* POS screen */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 1rem;
  height: calc(100vh - 90px);
}

@media (max-width: 991.98px) {
  .pos-layout {
    grid-template-columns: 1fr;
    height: auto;
  }
}

.pos-menu, .pos-cart {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pos-items {
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: .75rem;
  align-content: start;
  padding: .25rem;
}

.pos-item {
  border: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  border-radius: .5rem;
  padding: .75rem;
  text-align: left;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color .1s, transform .1s;
}

.pos-item:hover {
  border-color: var(--bs-primary);
}

.pos-item:active {
  transform: scale(.97);
}

.pos-item .price {
  font-weight: 600;
  color: var(--bs-primary-text-emphasis);
}

/* Bootstrap's .card-body grows by default; only the cart lines should take the spare height. */
.pos-cart > .card-body {
  flex: 0 0 auto;
}

.pos-cart-lines {
  flex: 1;
  overflow-y: auto;
  min-height: 120px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  line-height: 1;
}

/* Phone: the menu fills the screen and the cart opens as a full-screen sheet from a sticky bottom bar. */
.pos-cart-bar {
  display: none;
}

@media (max-width: 575.98px) {
  .pos-layout {
    display: block;
    height: auto;
    padding-bottom: 4.5rem;
  }

  .pos-cart {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1030;
    border-radius: 0;
    overflow-y: auto;
  }

  .pos-layout.cart-open .pos-cart {
    display: flex;
  }

  .pos-cart-bar {
    display: flex;
    justify-content: space-between;
    position: fixed;
    left: .75rem;
    right: .75rem;
    bottom: .75rem;
    z-index: 1020;
    padding: .75rem 1rem;
    font-size: 1.05rem;
    box-shadow: 0 .25rem 1rem rgba(0, 0, 0, .25);
  }

  .pos-items {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Bigger touch targets for quantity buttons */
  .qty-btn {
    width: 36px;
    height: 36px;
  }
}

/* Receipts */
.receipt {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  width: 80mm;
  max-width: 100%;
  margin: 1rem auto;
  padding: 1rem;
  background: #fff;
  color: #000;
  font-size: 13px;
}

.receipt hr {
  border-top: 1px dashed #000;
  opacity: 1;
  margin: .5rem 0;
}

.receipt table {
  width: 100%;
}

.receipt .big {
  font-size: 18px;
  font-weight: 700;
}

@media print {
  /* Most receipt printers are monochrome; greyscale keeps the logo crisp instead of dithered colour. */
  .receipt-logo {
    filter: grayscale(1) contrast(1.15);
  }

  .no-print {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .receipt {
    margin: 0;
    padding: 0;
  }
}
