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;
}

/* Global loading overlay (see axisInitGlobalLoader in site.js) */
.axis-global-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.55);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
}

/* App shell */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 260px;
  flex-shrink: 0;
  background-color: #1e2a38;
  color: #cfd8e3;
  overflow-y: auto;
}

.sidebar-brand {
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: #7c8a9c;
  margin-top: 0.75rem;
  margin-bottom: 0.25rem;
  padding: 0.35rem 0.75rem;
}

.sidebar-section-toggle:hover {
  color: #fff;
}

.sidebar-section-chevron {
  transition: transform 0.15s ease-in-out;
}

.sidebar-section-toggle.collapsed .sidebar-section-chevron {
  transform: rotate(-90deg);
}

.app-sidebar .nav-link {
  color: #cfd8e3;
  padding: 0.35rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.9rem;
}

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

.app-sidebar .nav-link.active {
  background-color: #258cfb;
  color: #fff;
}

.app-main {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.app-topbar {
  height: 56px;
  background-color: #fff;
  border-bottom: 1px solid #e3e7ec;
}

.app-content {
  flex-grow: 1;
  background-color: #f4f6f9;
  padding: 5px;
}

/* Login page */
.login-body {
  min-height: 100vh;
  background-color: #1e2a38;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: 0.5rem;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Dashboard KPI cards */
.kpi-card {
  border: 1px solid #e3e7ec;
  border-radius: 0.5rem;
  background: #fff;
  padding: 1rem 1.25rem;
}

.kpi-card .kpi-value {
  font-size: 1.6rem;
  font-weight: 600;
}

.kpi-card .kpi-label {
  color: #7c8a9c;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Catering Dashboard panels */
.dash-panel {
  border: 1px solid #e3e7ec;
  border-radius: 0.5rem;
  background: #fff;
  padding: 1rem 1.25rem;
  height: 100%;
}

.dash-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.dash-panel table {
  margin-bottom: 0;
}

.dash-week-table td.dash-date-cell {
  font-weight: 600;
  white-space: nowrap;
}

.dash-week-table tr.dash-date-group-start td {
  border-top: 2px solid #dfe4ea;
}

.meal-block {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #eef1f5;
}

.meal-block:last-child {
  border-bottom: none;
}

.meal-block-icon {
  font-size: 1.15rem;
  line-height: 1.4rem;
  width: 1.6rem;
  text-align: center;
  flex-shrink: 0;
}

.meal-block-body {
  flex-grow: 1;
}

.meal-block-title {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.15rem;
}

.meal-item-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: #f4f6f9;
  border: 1px solid #e3e7ec;
  border-radius: 1rem;
  padding: 0.15rem 0.65rem;
  font-size: 0.85rem;
  margin: 0.15rem 0.35rem 0.15rem 0;
}

.meal-item-chip.is-special {
  background: #fff8e6;
  border-color: #ffe4a1;
}

.meal-block-empty {
  color: #adb5bd;
  font-size: 0.85rem;
  font-style: italic;
}

/* Segmented-control style tab group (e.g. Permission Master's Masters/
   Transactions/Utilities/... switcher) — an alternative to Bootstrap's plain
   .nav-tabs for a group of buttons that toggle content in place. */
.perm-tab-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  background: #eef1f5;
  border-radius: 0.5rem;
  padding: 0.25rem;
}

.perm-tab-group .tab-group-btn {
  border: none;
  background: transparent;
  padding: 0.4rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #5b6472;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.perm-tab-group .tab-group-btn:hover {
  color: #1e2a38;
}

.perm-tab-group .tab-group-btn.active {
  background: #ffffff;
  color: #1e2a38;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* AxisMasterGrid relocates the length ("Show entries") control next to
   pagination and appends the page's "+ Add New" button into it — see
   axis-master-grid.js. Flex-align both so they read as one toolbar group. */
.dataTables_length {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dataTables_length label {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  margin-bottom: 0;
}
