body.admin-body {
  background: #f3f3f9;
  padding: 0;
  margin: 0;
  color: #495057;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

.admin-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar-admin {
position: sticky;
top: 0;
align-self: flex-start;
min-height: 100vh;
max-height: 100vh;
overflow-y: auto;
padding-top: 35px;

  padding-bottom: 20px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1.5rem;
  padding: .25rem .5rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, #405189 0%, #4b38b3 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  color: #fff;
  box-shadow: 0 10px 20px rgba(75, 56, 179, .28);
}

.sidebar-brand strong {
  color: #fff;
  letter-spacing: .02em;
}

.sidebar-section-title {
  margin: 1.2rem .5rem .65rem;
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(170,180,208,.55);
  font-weight: 700;
}

.sidebar-link {
    display: block;
    color: #c7d0e6;
    text-decoration: none;
    padding: .2rem 1rem;
    border-radius: 12px;
    font-weight: 100;
    margin-bottom: .1rem;
    transition: all .18s ease;
    font-size: 0.9rem;
}

.sidebar-link:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}

.sidebar-link.active {
  background: linear-gradient(90deg, rgba(64,81,137,.95) 0%, rgba(75,56,179,.95) 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(75, 56, 179, .22);
}

.admin-main {
  padding: 1.5rem;
}

.admin-header-card {
  border: none !important;
  background: #ffffff !important;
  border-radius: 16px !important;
  box-shadow: 0 3px 18px rgba(100, 100, 111, 0.08) !important;
}

.admin-card,
.stat-card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 3px 18px rgba(100, 100, 111, 0.08);
  background: #fff;
}

.stat-card .card-body {
  position: relative;
  overflow: hidden;
}

.stat-card .small-label {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #878a99;
  font-weight: 700;
  margin-bottom: .55rem;
}

.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: #212529;
  line-height: 1.05;
}

.dashboard-grid .stat-card:nth-child(1) { border-left: 4px solid #f7b84b; }
.dashboard-grid .stat-card:nth-child(2) { border-left: 4px solid #299cdb; }
.dashboard-grid .stat-card:nth-child(3) { border-left: 4px solid #0ab39c; }
.dashboard-grid .stat-card:nth-child(4) { border-left: 4px solid #4b38b3; }

.card-editor-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.card-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.item-box {
  border: 1px solid #eef0f7;
  border-radius: 16px;
  background: #fbfcff;
  padding: 1rem;
}

/* Places table rows — override card style */
.item-box.border-bottom {
  border: 0 !important;
  border-bottom: 1px solid #dee2e6 !important;
  border-radius: 0 !important;
  background: transparent !important;
  padding: 0 !important;
}

.small {
  color: #878a99;
  font-size: .875rem;
}

.hr {
  border-top: 1px solid #eef0f7;
  margin: 1.25rem 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 1rem;
  margin-bottom: 0;
}

.topbar a {
  text-decoration: none;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 1rem;
}

.dashboard-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 1rem;
}

.stat-card-occ .stat-value { font-size: 1.6rem; }

.stat-card .stat-sub {
  font-size: .75rem;
  color: #878a99;
  margin-top: .2rem;
}

.food-orders-inner {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.food-orders-inner .dashboard-list {
  flex: 1 1 auto;
  min-width: 0;
}

.food-orders-chart-wrap {
  flex: 0 0 140px;
  width: 140px;
}

.dashboard-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 1rem;
}

.dashboard-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid #eef0f7;
}

.dashboard-list li:last-child {
  border-bottom: 0;
}

label {
  display: block;
  margin-bottom: .375rem;
  font-weight: 600;
  color: #495057;
}

.form-control,
.form-select,
textarea,
select,
input[type="text"],
input[type="date"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="time"] {
  border-radius: 0 !important;
  border-color: #dfe3ec !important;
  color: #212529;
  background: #fff;
}

.form-control:focus,
.form-select:focus,
textarea:focus,
select:focus,
input[type="text"]:focus,
input[type="date"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="time"]:focus {
  border-color: #4b38b3 !important;
  box-shadow: 0 0 0 .15rem rgba(75, 56, 179, .12) !important;
}

.btn,
button,
a.btn {
  border-radius: 12px !important;
  font-weight: 600;
  box-shadow: none !important;
}

.btn-primary {
  background: #4b38b3 !important;
  border-color: #4b38b3 !important;
}

.btn-primary:hover {
  background: #3e2f95 !important;
  border-color: #3e2f95 !important;
}

.btn-outline-primary {
  color: #4b38b3 !important;
  border-color: #cfc8f2 !important;
  background: #f7f5ff !important;
}

.btn-outline-primary:hover {
  background: #4b38b3 !important;
  color: #fff !important;
  border-color: #4b38b3 !important;
}

.btn-outline-secondary {
  color: #495057 !important;
  border-color: #dfe3ec !important;
  background: #fff !important;
}

.btn-outline-secondary:hover {
  background: #f3f3f9 !important;
  color: #212529 !important;
  border-color: #dfe3ec !important;
}

.btn-outline-danger {
  border-color: #ffd0d0 !important;
  color: #f06548 !important;
  background: #fff8f7 !important;
}

.btn-outline-danger:hover {
  background: #f06548 !important;
  color: #fff !important;
  border-color: #f06548 !important;
}

.alert-success {
  background: #daf4f0;
  color: #0a6c60;
  border: 1px solid #bce7df;
  border-radius: 12px;
}

.text-bg-light {
  background: #f3f3f9 !important;
  color: #495057 !important;
  border: 1px solid #eef0f7;
}

canvas#statusChart {
  max-height: 320px;
}

@media (max-width: 1200px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
  .dashboard-grid-2 {
    grid-template-columns: 1fr;
  }
  .dashboard-grid-3 {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }
}

@media (max-width: 960px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }
  .sidebar-admin {
    position: static;
    height: auto;
    border-radius: 0 0 18px 18px;
  }
}

@media (max-width: 640px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-grid-3 {
    grid-template-columns: 1fr;
  }
  .admin-main {
    padding: 1rem;
  }
}

.admin-layout {
  width: 100%;
}

.admin-layout > .sidebar-version {
  display: none !important;
}

.sidebar-admin {
  display: flex;
  flex-direction: column;
}

.sidebar-version {
  margin-top: auto;
  padding: 1rem .5rem 0;
  opacity: .65;
  font-size: .72rem;
}

.admin-main {
  width: 100%;
  min-width: 0;
}

/* v45 dashboard */
.dashboard-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }


/* v47 dashboard charts */
.dashboard-chart-row canvas {
  max-height: 240px;
}


/* v48 dashboard chart sizing */
.dashboard-chart-row .card-body {
  min-height: 320px;
}

.dashboard-chart-row canvas {
  max-height: 220px !important;
}


/* v0.10.6.7 sidebar behavior */
.admin-layout {
  align-items: flex-start;
}
.sidebar-admin {
  position: sticky;
  top: 0;
  align-self: flex-start;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
}
.admin-main {
  min-width: 0;
}


/* v0.10.6.8 fixed full-height BackApp sidebar */
@media (min-width: 992px) {
  .admin-body {
    overflow-x: hidden;
  }
  .admin-layout {
    display: block !important;
  }
  .sidebar-admin {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 300px !important;
    height: 100vh !important;
    min-height: 100vh !important;
    max-height: 100vh !important;
    overflow-y: auto !important;
    z-index: 1000 !important;
  }
  .admin-main {
    margin-left: 300px !important;
    width: calc(100% - 300px) !important;
    min-width: 0 !important;
  }
}


/* v0.10.7.2 BackApp top menu */
.top-menu-bar {
position: fixed;
top: 0;
left: 0px;
right: 0;
height: 21px;
background: linear-gradient(180deg, #111428 0%, #171b34 100%);
border-bottom: 1px solid rgba(0,0,0,0.06);
z-index: 1100;
overflow: visible;
}
.top-menu-datetime {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 12px;
  line-height: 1;
  color: #6b7280;
  white-space: nowrap;
}
@media (min-width: 992px) {
  .admin-main {
    padding-top: 24px !important;
  }
}


/* v0.10.7.2.3 top menu actions */
.top-menu-bar {
position: fixed;
top: 0;
left: 0px;
right: 0;
height: 21px;
background: linear-gradient(180deg, #111428 0%, #171b34 100%);
border-bottom: 1px solid rgba(0,0,0,0.06);
z-index: 1100;
overflow: visible;
}
.top-menu-actions {
  position: absolute;
  right: 10px;
  top: 2px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #d6d9e6;
  font-size: 12px;
}
.top-menu-datetime {
  white-space: nowrap;
  color: #d6d9e6;
  font-size: 12px;
  line-height: 1;
}
.top-menu-logout {
  color: #d6d9e6;
  text-decoration: none;
  font-size: 12px;
  line-height: 1;
}
.top-menu-logout:hover {
  color: #ffffff;
}
.top-menu-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d6d9e6;
}
.top-menu-icon-btn:hover {
  color: #ffffff;
}


/* v0.10.7.2.4 MainMenu + TopMenu adjustments */
.sidebar-admin {
  background: linear-gradient(180deg, #111428 0%, #171b34 100%) !important;
}
.top-menu-bar {
  color: #9ca3af !important;
}
.top-menu-actions,
.top-menu-datetime,
.top-menu-logout,
.top-menu-icon-btn {
  color: #9ca3af !important;
}
.top-menu-icon-btn {
  background: transparent !important;
}
.top-menu-icon-btn:hover,
.top-menu-logout:hover {
  color: #c7cedc !important;
}


/* v0.10.7.2.5 TopMenu date/clock rendering */
.top-menu-datetime {
  display: inline-flex !important;
  align-items: center;
  gap: 4px;
  color: #9ca3af !important;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}
#topMenuDate,
#topMenuClock {
  display: inline-block;
  color: #9ca3af !important;
}


/* v0.10.7.2.6 TopMenu inline layout */
.top-menu-actions {
  position: absolute;
  right: 10px;
  top: 2px;
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-end;
  gap: 10px;
  white-space: nowrap;
  color: #9ca3af !important;
  font-size: 12px;
}

.top-menu-datetime {
  display: inline-flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 4px;
  white-space: nowrap;
}

.top-menu-icon-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #9ca3af !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.top-menu-icon-btn:hover,
.top-menu-icon-btn:focus,
.top-menu-icon-btn:active {
  background: transparent !important;
  color: #9ca3af !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.top-menu-icon-btn svg {
  display: block;
}

.top-menu-logout {
  display: inline-block;
  white-space: nowrap;
}


/* v0.10.7.2.7 TopMenu table alignment */
.top-menu-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 21px;
  background: linear-gradient(180deg, #111428 0%, #171b34 100%);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  z-index: 1100;
  overflow: hidden;
}

.top-menu-table {
  position: absolute;
  right: 10px;
  top: 0;
  height: 21px;
  display: table;
  border-collapse: collapse;
  table-layout: fixed;
}

.top-menu-cell {
  display: table-cell;
  vertical-align: middle;
  height: 21px;
  padding: 0 6px;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 400;
  line-height: 21px;
  white-space: nowrap;
  font-family: Inter, Arial, Helvetica, sans-serif;
}

.top-menu-cell-icon {
  width: 22px;
  text-align: center;
  padding-left: 0;
  padding-right: 4px;
}

.top-menu-cell-logout {
  padding-left: 4px;
  padding-right: 8px;
}

.top-menu-cell-datetime {
  padding-left: 8px;
  padding-right: 0;
}

.top-menu-icon-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 14px !important;
  height: 14px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
  background: transparent !important;
  color: #9ca3af !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  vertical-align: middle !important;
}

.top-menu-icon-btn:hover,
.top-menu-icon-btn:focus,
.top-menu-icon-btn:active {
  background: transparent !important;
  color: #9ca3af !important;
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

.top-menu-icon-btn svg {
  display: block;
  width: 14px;
  height: 14px;
}

.top-menu-logout,
.top-menu-datetime,
#topMenuDate,
#topMenuClock {
  color: #9ca3af !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 21px !important;
  font-family: Inter, Arial, Helvetica, sans-serif !important;
  text-decoration: none;
  vertical-align: middle;
}

.top-menu-logout:hover {
  color: #9ca3af !important;
}

#topMenuDate {
  margin-right: 8px;
}


/* v0.10.7.2.8 Guests page layout fix */
.admin-guests-page .admin-main,
.admin-guests-page .admin-header-card,
.admin-guests-page .admin-card {
  min-width: 0;
}
.admin-guests-page .admin-card {
  overflow: hidden;
}
.admin-guests-page .card.admin-card.mb-3 {
  max-width: 100%;
}


/* v0.10.7.3.1 Guests compact list */
.guests-compact-table {
  margin-bottom: 0;
  table-layout: auto;
}
.guests-compact-table th,
.guests-compact-table td {
  vertical-align: middle;
  white-space: nowrap;
}
.guests-compact-table td:nth-child(5),
.guests-compact-table td:nth-child(7) {
  white-space: normal;
}
.guests-compact-table .btn {
  min-width: 64px;
}


/* v0.10.7.3.2 Guests notes tooltip */
.guest-note-label {
  display: inline-block;
  cursor: help;
  white-space: nowrap;
}
.guests-compact-table td {
  padding-top: 0.4rem;
  padding-bottom: 0.4rem;
}


/* v0.10.7.3.3 Guests search + sort */
.guests-search-input {
  max-width: 280px;
}
.guests-compact-table th.sortable {
  user-select: none;
}
.guests-compact-table th.sortable::after {
  content: " ↕";
  font-size: 11px;
  color: #9ca3af;
}


/* v0.10.7.6.66 Preserve Bootstrap checkbox/radio/switch rendering */
.form-check-input,
.form-check-input[type="checkbox"],
.form-check-input[type="radio"] {
  border-radius: initial;
}
.form-check-input[type="checkbox"] {
  appearance: auto;
  -webkit-appearance: auto;
  -moz-appearance: auto;
}
.form-check.form-switch .form-check-input {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  float: left;
}

/* mango-switch — custom toggle switch for guest options, independent of Bootstrap */
.mango-switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 5px 0;
  user-select: none;
  margin-bottom: 6px;
}
.mango-switch-row input[type="checkbox"],
.mango-switch-row input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.mango-switch-track {
  display: inline-block;
  position: relative;
  width: 42px;
  height: 24px;
  min-width: 42px;
  background: #d1d5db;
  border-radius: 12px !important;
  flex: 0 0 42px;
  transition: background .18s;
  vertical-align: middle;
}
.mango-switch-track::after {
  border-radius: 50% !important;
}
.mango-switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  transition: transform .18s;
}
.mango-switch-row input[type="checkbox"]:checked ~ .mango-switch-track,
.mango-switch-row input[type="checkbox"]:checked + .mango-switch-track,
.mango-switch-row input[type="radio"]:checked ~ .mango-switch-track,
.mango-switch-row input[type="radio"]:checked + .mango-switch-track {
  background: #ff8a00;
}
.mango-switch-row input[type="checkbox"]:checked ~ .mango-switch-track::after,
.mango-switch-row input[type="checkbox"]:checked + .mango-switch-track::after,
.mango-switch-row input[type="radio"]:checked ~ .mango-switch-track::after,
.mango-switch-row input[type="radio"]:checked + .mango-switch-track::after {
  transform: translateX(18px);
}
.mango-switch-text {
  font-weight: 600;
  color: #1f2937;
  font-size: .9rem;
}
