/* ===== Great Clips Brand Palette ===== */
:root {
  --gc-jade: #048667;
  --gc-lime: #9acb3a;
  --gc-emerald: #089f45;
  --gc-sky: #bee5e6;
  --gc-mint: #ddf3c5;
  --gc-orange: #cb4e13;
  --gc-dark-green: #073b3a;
  --gc-gray: #f2f2f2;
  --bs-primary: var(--gc-jade);
  --bs-primary-rgb: 4, 134, 103;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
  /* Always reserve space for a vertical scrollbar so the navbar/content
     don't shift horizontally when switching between short and tall pages. */
  scrollbar-gutter: stable;
}

@media (min-width: 768px) {
  html { font-size: 16px; }
}

body {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  margin-bottom: 60px;
  background: var(--gc-gray);
}

/* ===== Bootstrap Overrides ===== */
.btn-primary       { background-color: var(--gc-jade); border-color: var(--gc-jade); }
.btn-primary:hover { background-color: var(--gc-dark-green); border-color: var(--gc-dark-green); }
.btn-primary:focus { background-color: var(--gc-jade); border-color: var(--gc-jade); box-shadow: 0 0 0 .25rem rgba(4,134,103,.4); }

.btn-outline-primary       { color: var(--gc-jade); border-color: var(--gc-jade); }
.btn-outline-primary:hover { background-color: var(--gc-jade); border-color: var(--gc-jade); color: #fff; }

.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 rgba(4,134,103,.4);
}

.badge.bg-success { background-color: var(--gc-emerald) !important; }
a { color: var(--gc-jade); }
a:hover { color: var(--gc-dark-green); }

/* ===== Brand Measure Level Pills =====
   Pill-shaped chip wrapping a metric value, colored using the official
   Great Clips brand-measure palette. Use these classes (NOT the Bootstrap
   bg-success/bg-info/bg-warning/bg-danger utilities) any time a value
   communicates a PerformanceLevel (Excellence / Growth / Minimum / Warning).
   Web pages map level via BadgeClass(int? level) helpers; PDF rendering
   uses PerformanceReportPdfPrimitives.LevelColor with the same hex values.
*/
.brand-level {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.85em;
  font-weight: 700;
  line-height: 1;
  border-radius: 9999px;
  white-space: nowrap;
  vertical-align: baseline;
}
.brand-level-excellence { background-color: #1FA15B; color: #fff; }
.brand-level-growth     { background-color: #F5D43F; color: #111; }
.brand-level-minimum    { background-color: #ED8B33; color: #fff; }
.brand-level-warning    { background-color: #E2342E; color: #fff; }

/* Navbar */
.navbar-brand { font-weight: 600; color: var(--gc-dark-green) !important; }
.navbar { background-color: #fff !important; }

/* Cards */
.card { border-color: #dee2e6; }
.card-header { background-color: var(--gc-gray); }

/* Footer */
.footer { background: var(--gc-dark-green); color: rgba(255,255,255,.7); }
.footer a { color: var(--gc-sky); }

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* ===== App shell: collapsible left rail ===== */
/* Two-column layout sized in px so the content can use 100% of the freed
   space when the rail collapses (vs. a fixed Bootstrap col-md-3 reserve). */
.app-shell {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.app-shell-rail {
  flex: 0 0 220px;
  min-width: 0;
  position: sticky;
  top: 1rem;
  transition: flex-basis .2s ease;
}

.app-shell-content {
  flex: 1 1 auto;
  min-width: 0; /* prevents long tables from pushing the rail wider */
}

/* Sub-nav icons sit before the label by default. */
.subnav-icon { margin-right: .5rem; }

/* Toggle button anchored at the top of the rail. */
.subnav-toggle {
  width: 100%;
  margin-bottom: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.subnav-toggle .subnav-toggle-expand { display: none; }

/* Collapsed state — applied to <html> so it is set before paint. */
html.subnav-collapsed .app-shell-rail {
  flex-basis: 56px;
}
html.subnav-collapsed .module-subnav .nav-link {
  padding-left: .5rem;
  padding-right: .5rem;
  text-align: center;
}
html.subnav-collapsed .subnav-label {
  display: none;
}
html.subnav-collapsed .subnav-icon {
  margin-right: 0;
  font-size: 1.1rem;
}
html.subnav-collapsed .subnav-toggle .subnav-toggle-collapse { display: none; }
html.subnav-collapsed .subnav-toggle .subnav-toggle-expand { display: inline; }

/* On narrow screens we adopt the Outlook mobile pattern:
   - top-bar has a 3x3 dots button that opens an offcanvas of module tiles
     (so the module switcher never crowds the top bar);
   - the left rail stays side-by-side with the content but collapses to a
     narrow icon-only strip so it never dominates the viewport. The
     `subnav-toggle` is hidden on mobile because the rail is permanently
     compact there. */
@media (max-width: 767.98px) {
  .app-shell {
    gap: .75rem;
  }
  .app-shell-rail {
    flex: 0 0 56px;
    width: 56px;
    position: static;
    transition: none;
  }
  .module-subnav .nav-link {
    padding-left: .5rem;
    padding-right: .5rem;
    text-align: center;
  }
  .subnav-label { display: none; }
  .subnav-icon  { margin-right: 0; font-size: 1.15rem; }
}

/* ===== Outlook-style mobile module grid ===== */
.apps-toggle:focus,
.apps-toggle:active {
  box-shadow: none;
}

.apps-offcanvas {
  max-width: 320px;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}

.apps-grid-divider {
  grid-column: 1 / -1;
  height: 1px;
  background: #dee2e6;
  margin: .25rem 0;
}

.app-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  padding: .75rem .5rem;
  border-radius: .5rem;
  border: 1px solid #dee2e6;
  background: #fff;
  color: var(--gc-dark-green);
  min-height: 5.5rem;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.app-tile:hover {
  background: var(--gc-gray);
  color: var(--gc-jade);
}
.app-tile.active {
  background: var(--gc-mint);
  border-color: var(--gc-jade);
  color: var(--gc-dark-green);
}
.app-tile-icon {
  font-size: 1.5rem;
  margin-bottom: .35rem;
  color: var(--gc-jade);
}
.app-tile-label {
  font-size: .8rem;
  font-weight: 500;
  line-height: 1.1;
  word-break: break-word;
}