/* =====================================================================
   MODERN UI — shared design system for the admin panel (mu-*)
   ---------------------------------------------------------------------
   Loaded on every admin page (layouts/partials/head). Everything is
   scoped to .mu-page or mu-* classes, so a screen only changes once its
   view opts in. Pages must not carry their own <style> blocks - add the
   component here instead.
   ===================================================================== */

:root {
  --mu-green: #5aa621;
  --mu-green-600: #4a8f1b;
  --mu-green-700: #3a7414;
  --mu-green-50: #f1f9ea;
  --mu-green-100: #e1f2d0;
  --mu-forest: #16330c;
  --mu-forest-2: #24511a;

  --mu-ink: #172015;
  --mu-text: #3a463b;
  --mu-muted: #87938a;
  --mu-line: #e8ede6;
  --mu-line-soft: #f1f4ef;
  --mu-bg-soft: #f7f9f6;
  --mu-surface: #ffffff;

  --mu-rose: #e11d48;
  --mu-rose-bg: #fff1f3;
  --mu-blue: #2563eb;
  --mu-blue-bg: #eef4ff;
  --mu-amber: #d97706;
  --mu-amber-bg: #fff6e5;
  --mu-slate: #64748b;
  --mu-slate-bg: #f1f5f9;

  --mu-radius: 16px;
  --mu-radius-sm: 10px;
  --mu-shadow: 0 1px 2px rgba(16, 24, 12, .04), 0 8px 24px rgba(16, 24, 12, .06);
  --mu-shadow-lg: 0 24px 64px rgba(16, 24, 12, .22);
  --mu-ring: 0 0 0 4px rgba(90, 166, 33, .16);
  --mu-font: 'Inter', 'Source Sans Pro', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

/* ---------- Page ---------- */

.mu-page {
  font-family: var(--mu-font);
  color: var(--mu-text);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

/* A page with its own hero doesn't need AdminLTE's plain title bar. */
.content-wrapper:has(.mu-hero) > .content-header { display: none; }
.content-wrapper:has(.mu-hero) > .content { padding-top: 20px; }

.mu-muted { color: var(--mu-muted); font-weight: 500; }
.mu-hidden { display: none !important; }

/* ---------- Hero ---------- */

.mu-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 28px 30px 26px;
  color: #fff;
  background:
    radial-gradient(600px 260px at 100% 0%, rgba(151, 221, 77, .28), transparent 60%),
    radial-gradient(420px 220px at 0% 100%, rgba(151, 221, 77, .14), transparent 65%),
    linear-gradient(135deg, var(--mu-forest-2) 0%, var(--mu-forest) 100%);
  box-shadow: 0 18px 40px rgba(22, 51, 12, .22);
}

.mu-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 18px 18px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
  mask-image: linear-gradient(90deg, transparent 30%, #000 100%);
  pointer-events: none;
}

.mu-hero > * { position: relative; z-index: 1; }

.mu-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.mu-hero-heading { display: flex; align-items: center; gap: 16px; min-width: 0; }

.mu-hero-icon {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 24px;
  color: #fff;
  background: linear-gradient(135deg, #97dd4d, var(--mu-green));
  box-shadow: 0 10px 24px rgba(90, 166, 33, .45), inset 0 1px 0 rgba(255, 255, 255, .35);
}

.mu-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #b9e58f;
  margin-bottom: 2px;
}

.mu-hero-title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.4px;
  color: #fff;
  line-height: 1.2;
}

.mu-hero-subtitle { margin: 4px 0 0; font-size: 13.5px; color: rgba(255, 255, 255, .72); }
.mu-hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Stat cards (inside the hero) ---------- */

.mu-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr);
  gap: 14px;
  margin-top: 24px;
}

.mu-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 16px 18px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background .2s ease, transform .2s ease;
}

.mu-stat:hover { background: rgba(255, 255, 255, .12); transform: translateY(-2px); }

.mu-stat-icon {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 17px;
}

.mu-stat-icon--green { background: rgba(151, 221, 77, .2); color: #b9e58f; }
.mu-stat-icon--rose { background: rgba(251, 113, 133, .2); color: #fda4af; }
.mu-stat-icon--blue { background: rgba(96, 165, 250, .2); color: #93c5fd; }
.mu-stat-icon--amber { background: rgba(251, 191, 36, .2); color: #fcd34d; }

.mu-stat-body { display: flex; flex-direction: column; min-width: 0; }
.mu-stat-value { font-size: 24px; font-weight: 800; line-height: 1.1; color: #fff; letter-spacing: -.3px; }
.mu-stat-value--text { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mu-stat-label { margin-top: 3px; font-size: 12px; color: rgba(255, 255, 255, .68); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mu-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mu-stats--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---------- Buttons ---------- */

.mu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-family: var(--mu-font);
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease, border-color .15s ease;
}

.mu-btn:hover, .mu-btn:focus { text-decoration: none; }
.mu-btn:focus-visible { outline: none; box-shadow: var(--mu-ring); }
.mu-btn:active { transform: translateY(1px); }
.mu-btn[disabled] { opacity: .65; cursor: progress; transform: none; }

.mu-btn--primary {
  color: #fff;
  background: linear-gradient(135deg, #7cc93a 0%, var(--mu-green) 55%, var(--mu-green-700) 100%);
  box-shadow: 0 8px 18px rgba(90, 166, 33, .3);
}
.mu-btn--primary:hover, .mu-btn--primary:focus { color: #fff; box-shadow: 0 10px 24px rgba(90, 166, 33, .4); transform: translateY(-1px); }

.mu-btn--light { color: var(--mu-forest); background: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.mu-btn--light:hover, .mu-btn--light:focus { color: var(--mu-forest); background: var(--mu-green-50); transform: translateY(-1px); }

.mu-btn--ghost { color: var(--mu-text); background: #fff; border-color: var(--mu-line); }
.mu-btn--ghost:hover, .mu-btn--ghost:focus { color: var(--mu-ink); background: var(--mu-bg-soft); border-color: #d9e1d6; }
.mu-btn--ghost.is-active { color: var(--mu-green-700); background: var(--mu-green-50); border-color: var(--mu-green-100); }

.mu-btn--danger { color: #fff; background: linear-gradient(135deg, #f43f5e, #be123c); box-shadow: 0 8px 18px rgba(225, 29, 72, .28); }
.mu-btn--danger:hover, .mu-btn--danger:focus { color: #fff; transform: translateY(-1px); }

.mu-btn--sm { height: 36px; padding: 0 14px; font-size: 12.5px; border-radius: 10px; }

.mu-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--mu-line);
  background: #fff;
  color: var(--mu-text);
  font-size: 12px;
  transition: all .15s ease;
}
.mu-icon-btn:hover, .mu-icon-btn:focus { color: var(--mu-green-700); border-color: var(--mu-green-100); background: var(--mu-green-50); text-decoration: none; }

.mu-spin { display: inline-block; animation: mu-spin .8s linear infinite; }
@keyframes mu-spin { to { transform: rotate(360deg); } }

/* ---------- Cards & layout ---------- */

.mu-grid { display: grid; gap: 22px; }
.mu-grid--main-side { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }

.mu-card {
  background: var(--mu-surface);
  border: 1px solid var(--mu-line);
  border-radius: var(--mu-radius);
  box-shadow: var(--mu-shadow);
  min-width: 0;
}

.mu-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 18px 22px;
  border-bottom: 1px solid var(--mu-line-soft);
}

.mu-card-title { margin: 0; font-size: 16px; font-weight: 700; color: var(--mu-ink); letter-spacing: -.1px; }
.mu-card-subtitle { margin: 3px 0 0; font-size: 12.5px; color: var(--mu-muted); }
.mu-card-body { padding: 18px 22px 22px; }
.mu-card-body--flush { padding: 0; }

/* ---------- Date tile ---------- */

.mu-date { display: flex; align-items: center; gap: 12px; }

.mu-date-tile {
  flex: none;
  width: 48px;
  border-radius: 11px;
  overflow: hidden;
  text-align: center;
  background: #fff;
  border: 1px solid var(--mu-line);
  box-shadow: 0 2px 6px rgba(16, 24, 12, .05);
}
.mu-date-tile-month {
  display: block;
  padding: 3px 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: #fff;
  background: var(--mu-green);
}
.mu-date-tile-day { display: block; padding: 4px 0 5px; font-size: 18px; font-weight: 800; color: var(--mu-ink); line-height: 1.1; }
.mu-date-tile--past { opacity: .6; }
.mu-date-tile--past .mu-date-tile-month { background: #a3ada2; }
.mu-date-tile--rose .mu-date-tile-month { background: var(--mu-rose); }
.mu-date-tile--blue .mu-date-tile-month { background: var(--mu-blue); }

.mu-date-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mu-date-weekday { font-weight: 600; color: var(--mu-ink); font-size: 13px; }

.mu-hint { font-size: 11.5px; font-weight: 500; }
.mu-hint--today { color: var(--mu-green-700); font-weight: 700; }
.mu-hint--soon { color: var(--mu-amber); }
.mu-hint--past { color: var(--mu-muted); }

/* ---------- Empty state ---------- */

.mu-empty { text-align: center; padding: 26px 10px; color: var(--mu-muted); }
.mu-empty p { margin: 10px 0 0; font-size: 13px; }
.mu-empty-icon {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 22px;
  color: var(--mu-green);
  background: var(--mu-green-50);
}

/* ---------- Pills ---------- */

.mu-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.mu-pill .fa { font-size: 11px; }
.mu-pill--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.mu-pill--green { color: var(--mu-green-700); background: var(--mu-green-50); }
.mu-pill--rose { color: #be123c; background: var(--mu-rose-bg); }
.mu-pill--blue { color: #1d4ed8; background: var(--mu-blue-bg); }
.mu-pill--amber { color: #b45309; background: var(--mu-amber-bg); }
.mu-pill--slate { color: var(--mu-slate); background: var(--mu-slate-bg); }

/* ---------- Filters ---------- */

.mu-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.mu-select {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  margin: 0;
  border: 1px solid var(--mu-line);
  border-radius: 10px;
  background: #fff;
  font-weight: 500;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.mu-select:focus-within { border-color: var(--mu-green); box-shadow: var(--mu-ring); }
.mu-select > .fa { position: absolute; left: 12px; color: var(--mu-muted); font-size: 12px; pointer-events: none; }
.mu-select::after {
  content: "\f107";
  font-family: FontAwesome;
  position: absolute;
  right: 12px;
  color: var(--mu-muted);
  pointer-events: none;
}
.mu-select select {
  height: 100%;
  padding: 0 32px 0 32px;
  border: none;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  color: var(--mu-ink);
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.mu-segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  border-radius: 11px;
  background: var(--mu-bg-soft);
  border: 1px solid var(--mu-line);
}
.mu-segmented button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--mu-muted);
  font-family: var(--mu-font);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.mu-segmented button:hover { color: var(--mu-ink); }
.mu-segmented button.is-active { background: #fff; color: var(--mu-ink); box-shadow: 0 1px 2px rgba(16, 24, 12, .08), 0 2px 8px rgba(16, 24, 12, .06); }
.mu-segmented button:focus-visible { outline: none; box-shadow: var(--mu-ring); }

/* ---------- DataTables (any list inside .mu-page) ---------- */

.mu-page .dataTables_wrapper {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  position: relative;
}

.mu-page .dataTables_wrapper .dataTables_length { order: 1; padding: 16px 0 4px 22px; }
.mu-page .dataTables_wrapper .dt-buttons { order: 2; padding: 16px 0 4px; display: inline-flex; gap: 6px; float: none; }
.mu-page .dataTables_wrapper .dataTables_filter { order: 3; margin-left: auto; padding: 16px 22px 4px 0; float: none; text-align: left; }
.mu-page .dataTables_wrapper .mu-table-scroll { order: 4; flex: 1 0 100%; }
.mu-page .dataTables_wrapper > table { order: 4; flex: 1 0 100%; }
.mu-page .dataTables_wrapper .dataTables_info { order: 5; flex: 1; padding: 10px 0 18px 22px; font-size: 12.5px; color: var(--mu-muted); }
.mu-page .dataTables_wrapper .dataTables_paginate { order: 6; padding: 6px 22px 16px 0; }

.mu-page .dataTables_length label,
.mu-page .dataTables_filter label { margin: 0; font-weight: 500; font-size: 12.5px; color: var(--mu-muted); display: inline-flex; align-items: center; gap: 8px; }

.mu-page .dataTables_length select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--mu-line);
  border-radius: 10px;
  background: #fff;
  font-weight: 600;
  color: var(--mu-ink);
  outline: none;
}

.mu-page .dataTables_filter input {
  width: 260px;
  height: 38px;
  margin: 0 !important;
  padding: 0 14px 0 36px;
  border: 1px solid var(--mu-line);
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2387938a' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 12px center;
  font-size: 13px;
  color: var(--mu-ink);
  outline: none;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease, width .2s ease;
}
.mu-page .dataTables_filter input:focus { border-color: var(--mu-green); box-shadow: var(--mu-ring); }

.mu-page .dt-buttons .dt-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  margin: 0;
  padding: 0 11px;
  border: 1px solid var(--mu-line);
  border-radius: 9px;
  background: #fff;
  color: var(--mu-text);
  font-family: var(--mu-font);
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
  transition: all .15s ease;
}
.mu-page .dt-buttons .dt-button:hover { background: var(--mu-green-50); border-color: var(--mu-green-100); color: var(--mu-green-700); }
.mu-page .dt-buttons .dt-button::before { font-family: FontAwesome; font-size: 12px; }
.mu-page .dt-buttons .buttons-copy::before { content: "\f0c5"; }
.mu-page .dt-buttons .buttons-csv::before { content: "\f0f6"; }
.mu-page .dt-buttons .buttons-excel::before { content: "\f1c3"; }
.mu-page .dt-buttons .buttons-pdf::before { content: "\f1c1"; }
.mu-page .dt-buttons .buttons-print::before { content: "\f02f"; }

.mu-page .dataTables_processing {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 5;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 18px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--mu-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--mu-shadow);
  color: var(--mu-text);
  font-size: 13px;
}
.mu-page .dataTables_processing div { padding: 0 !important; }

.mu-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.mu-page table.mu-table { width: 100% !important; margin: 0 !important; border-collapse: separate; border-spacing: 0; }
.mu-page table.mu-table thead th {
  padding: 11px 14px !important;
  border-top: 1px solid var(--mu-line-soft) !important;
  border-bottom: 1px solid var(--mu-line) !important;
  background: var(--mu-bg-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--mu-muted);
  white-space: nowrap;
}
.mu-page table.mu-table thead th:first-child { padding-left: 22px !important; }
.mu-page table.mu-table thead th:last-child { padding-right: 22px !important; }
/* Sort arrows: Font Awesome instead of Bootstrap glyphicons (font not shipped). */
.mu-page table.mu-table thead .sorting::after,
.mu-page table.mu-table thead .sorting_asc::after,
.mu-page table.mu-table thead .sorting_desc::after {
  font-family: FontAwesome;
  font-size: 11px;
  bottom: auto;
  top: 50%;
  transform: translateY(-50%);
  right: 10px;
  opacity: .3;
}
.mu-page table.mu-table thead .sorting::after { content: "\f0dc"; }
.mu-page table.mu-table thead .sorting_asc::after { content: "\f0de"; opacity: .8; color: var(--mu-green); }
.mu-page table.mu-table thead .sorting_desc::after { content: "\f0dd"; opacity: .8; color: var(--mu-green); }

.mu-page table.mu-table tbody td {
  padding: 13px 11px !important;
  border: none !important;
  border-bottom: 1px solid var(--mu-line-soft) !important;
  vertical-align: middle !important;
  font-size: 13px;
  color: var(--mu-text);
  background: transparent;
}
.mu-page table.mu-table tbody td:first-child { padding-left: 22px !important; color: var(--mu-muted); font-weight: 600; width: 48px; }
.mu-page table.mu-table tbody td:last-child { padding-right: 22px !important; }
.mu-page table.mu-table tbody tr { transition: background .12s ease; }
.mu-page table.mu-table tbody tr:hover { background: #fafcf9; }
.mu-page table.mu-table tbody tr:last-child td { border-bottom: none !important; }
.mu-page table.mu-table td.dataTables_empty { padding: 40px 14px !important; text-align: center; color: var(--mu-muted); }

.mu-page .pagination { margin: 0; display: inline-flex; gap: 4px; }
.mu-page .pagination > li > a,
.mu-page .pagination > li > span {
  float: none;
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mu-line);
  border-radius: 9px !important;
  background: #fff;
  color: var(--mu-text);
  font-size: 12.5px;
  font-weight: 600;
  margin: 0;
}
.mu-page .pagination > li > a:hover { background: var(--mu-green-50); border-color: var(--mu-green-100); color: var(--mu-green-700); }
.mu-page .pagination > .active > a,
.mu-page .pagination > .active > a:hover,
.mu-page .pagination > .active > a:focus { background: var(--mu-green); border-color: var(--mu-green); color: #fff; box-shadow: 0 4px 10px rgba(90, 166, 33, .3); }
.mu-page .pagination > .disabled > a,
.mu-page .pagination > .disabled > a:hover { background: #fff; color: #c4ccc2; border-color: var(--mu-line-soft); }

.mu-title-cell { display: flex; flex-direction: column; gap: 3px; min-width: 160px; }
.mu-title-cell-main { font-weight: 600; color: var(--mu-ink); font-size: 13.5px; }
.mu-title-cell-sub { font-size: 12px; color: var(--mu-muted); max-width: 420px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Money in a list */
.mu-amount { font-weight: 800; color: var(--mu-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Small on/off chip button inside a row (e.g. "Email sent") */
.mu-chip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border: 1px dashed #cfd8cb;
  border-radius: 999px;
  background: #fff;
  color: var(--mu-muted);
  font-family: var(--mu-font);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: all .15s ease;
}
.mu-chip-toggle:hover { border-color: var(--mu-green); color: var(--mu-green-700); }
.mu-chip-toggle.is-on { border-style: solid; border-color: transparent; background: var(--mu-green-50); color: var(--mu-green-700); }
.mu-chip-toggle[disabled] { opacity: .6; cursor: progress; }

/* Labelled filter grid under a list card header */
.mu-filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 14px 22px 16px;
  border-bottom: 1px solid var(--mu-line-soft);
  background: #fcfdfb;
}
.mu-filter-grid .mu-field { margin: 0; }
.mu-filter-grid .mu-field > label { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; color: var(--mu-muted); }
.mu-filter-grid .mu-input { min-height: 40px; }
.mu-filter-grid .mu-input select { height: 38px; }
.mu-filter-grid .select2-container--default .select2-selection--single { height: 40px; }

/* Floating bar for ticked rows (bulk actions) */
.mu-bulkbar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 1030;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(100% - 24px);
  padding: 10px 12px 10px 18px;
  border-radius: 16px;
  background: var(--mu-forest);
  color: #fff;
  box-shadow: 0 18px 44px rgba(11, 26, 7, .35);
  transform: translate(-50%, 140%);
  opacity: 0;
  visibility: hidden;
  transition: transform .28s cubic-bezier(.2, .8, .2, 1), opacity .2s ease, visibility .28s;
  font-family: var(--mu-font);
}
.mu-bulkbar.is-on { transform: translate(-50%, 0); opacity: 1; visibility: visible; }
.mu-bulkbar-count { font-size: 13px; font-weight: 700; white-space: nowrap; }
.mu-bulkbar-count b { display: inline-grid; place-items: center; min-width: 26px; height: 26px; margin-right: 6px; padding: 0 6px; border-radius: 999px; background: var(--mu-green); }
.mu-bulkbar-btns { display: flex; gap: 6px; }
.mu-bulkbar .mu-btn--ghost { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .2); }
.mu-bulkbar .mu-btn--ghost:hover { background: rgba(255, 255, 255, .18); color: #fff; }
.mu-bulkbar-close { width: 34px; height: 34px; border: none; border-radius: 10px; background: transparent; color: rgba(255, 255, 255, .7); cursor: pointer; }
.mu-bulkbar-close:hover { color: #fff; background: rgba(255, 255, 255, .1); }

/* Header "More" dropdown on dark heroes */
.mu-hero .dropdown-menu { right: 0; left: auto; min-width: 220px; padding: 6px; border-radius: 14px; border: 1px solid var(--mu-line); box-shadow: 0 16px 40px rgba(16, 24, 12, .18); }
.mu-hero .dropdown-menu > li > a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; font-size: 13px; color: var(--mu-text); }
.mu-hero .dropdown-menu > li > a .fa { width: 16px; color: var(--mu-muted); }
.mu-hero .dropdown-menu > li > a:hover { background: var(--mu-green-50); color: var(--mu-green-700); }
.mu-hero .dropdown { display: inline-flex; }

/* Stacked "label value" lines in one cell (partials/ui/kv-stack) */
.mu-kv { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: var(--mu-ink); white-space: nowrap; }
.mu-kv-k { display: inline-block; min-width: 40px; font-size: 10.5px; font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: var(--mu-muted); }

/* Two short lines in one cell (value + caption) */
.mu-stack { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; line-height: 1.4; }
.mu-stack b { font-size: 13.5px; color: var(--mu-ink); white-space: nowrap; }
.mu-stack > .mu-muted { font-size: 12px; white-space: nowrap; }

/* Long text in a cell: max two lines */
.mu-text-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-width: 380px;
  font-size: 12.5px;
  line-height: 1.45;
}
.mu-text-clamp--wide { max-width: 720px; font-size: 13px; color: var(--mu-ink); }

/* Name cell: avatar initial + main text + optional sub line */
.mu-name-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mu-avatar {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--mu-green-700);
  background: linear-gradient(135deg, var(--mu-green-50), var(--mu-green-100));
}
.mu-avatar--img { object-fit: contain; background: #fff; border: 1px solid var(--mu-line); padding: 3px; }
.mu-name-cell-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.mu-link-plain { color: var(--mu-text); white-space: nowrap; }
.mu-link-plain:hover, .mu-link-plain:focus { color: var(--mu-green-700); text-decoration: none; }

.mu-contact-cell { display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.mu-contact-cell a { color: var(--mu-text); overflow-wrap: anywhere; }
.mu-contact-cell a:hover { color: var(--mu-green-700); text-decoration: none; }
.mu-contact-cell .fa { width: 14px; color: var(--mu-muted); }

/* Form grid inside modals / forms: two columns, one on phones */
.mu-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.mu-form-row--3-1 { grid-template-columns: 2fr 1fr; }
.mu-field .select2-container { width: 100% !important; }
.mu-name-cell-main { font-weight: 600; color: var(--mu-ink); font-size: 13.5px; }
.mu-name-cell-sub { font-size: 12px; color: var(--mu-muted); max-width: 220px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Active / Inactive switch (partials/ui/status-toggle, handled in modern-ui.js) */
.mu-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: var(--mu-font);
}
.mu-switch-track {
  position: relative;
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: #d5dbd2;
  transition: background .2s ease;
}
.mu-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
  transition: transform .2s ease;
}
.mu-switch-label { font-size: 12px; font-weight: 700; color: var(--mu-muted); min-width: 46px; text-align: left; }
.mu-switch.is-on .mu-switch-track { background: var(--mu-green); }
.mu-switch.is-on .mu-switch-thumb { transform: translateX(16px); }
.mu-switch.is-on .mu-switch-label { color: var(--mu-green-700); }
.mu-switch:focus-visible { outline: none; }
.mu-switch:focus-visible .mu-switch-track { box-shadow: var(--mu-ring); }
.mu-switch[disabled] { opacity: .6; cursor: progress; }

/* Row action icon buttons (shared by every list; formerly only in users.css) */
.ap-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-right: 4px;
  border: none;
  border-radius: 9px;
  font-size: 12.5px;
  cursor: pointer;
  transition: filter .15s ease, transform .15s ease, background .15s ease;
}
.ap-action-btn:last-child { margin-right: 0; }
.ap-action-btn:hover { transform: translateY(-1px); }
.ap-action-btn--edit { background: #eaf4fb; color: #2a75ad; }
.ap-action-btn--edit:hover, .ap-action-btn--edit:focus { background: #d9ecfa; color: #2a75ad; }
.ap-action-btn--delete { background: #fdecec; color: #b3261e; }
.ap-action-btn--delete:hover, .ap-action-btn--delete:focus { background: #fbdada; color: #b3261e; }
.ap-action-btn--key { background: #fdf3e3; color: #b0790a; }
.ap-action-btn--key:hover, .ap-action-btn--key:focus { background: #fbe8c8; color: #b0790a; }
.ap-action-btn--view { background: #eaf8e0; color: #3d7a17; }
.ap-action-btn--view:hover, .ap-action-btn--view:focus { background: #dcf3cc; color: #3d7a17; }
.ap-action-btn--settings { background: #f1edfb; color: #5b3fa8; }
.ap-action-btn--settings:hover, .ap-action-btn--settings:focus { background: #e4dbf7; color: #5b3fa8; }

.mu-row-actions { display: flex; justify-content: flex-end; gap: 6px; }
.mu-row-actions { gap: 4px; }
.mu-row-actions .ap-action-btn { margin: 0; width: 32px; height: 32px; border-radius: 9px; }
.mu-page th.text-right { text-align: right; }

/* ---------- Modal ---------- */

.mu-modal .modal-dialog { width: 560px; max-width: calc(100% - 24px); margin: 60px auto; }
.mu-modal .modal-content { border: none; border-radius: 20px; overflow: hidden; box-shadow: var(--mu-shadow-lg); font-family: var(--mu-font); }
.mu-modal.fade .modal-dialog { transform: translateY(14px) scale(.98); transition: transform .22s ease; }
.mu-modal.in .modal-dialog { transform: none; }

.mu-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--mu-line-soft);
  background: linear-gradient(180deg, var(--mu-green-50), #fff);
}
.mu-modal-icon {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: #fff;
  background: linear-gradient(135deg, #97dd4d, var(--mu-green));
  box-shadow: 0 8px 18px rgba(90, 166, 33, .32);
}
.mu-modal-title { margin: 0; font-size: 17px; font-weight: 800; color: var(--mu-ink); letter-spacing: -.2px; }
.mu-modal-subtitle { margin: 3px 0 0; font-size: 12.5px; color: var(--mu-muted); }
.mu-modal-close {
  margin-left: auto;
  flex: none;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--mu-muted);
  font-size: 14px;
  cursor: pointer;
  transition: all .15s ease;
}
.mu-modal-close:hover { background: var(--mu-bg-soft); color: var(--mu-ink); }

.mu-modal-body { padding: 20px 24px 6px; }
.mu-modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; }

/* ---------- Form fields ---------- */

.mu-field { margin-bottom: 16px; position: relative; }
.mu-field > label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--mu-ink); }
.mu-req { color: var(--mu-rose); }
.mu-optional { margin-left: 4px; font-size: 11px; font-weight: 500; color: var(--mu-muted); }

.mu-input {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1.5px solid var(--mu-line);
  border-radius: 11px;
  background: var(--mu-bg-soft);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.mu-input:hover { border-color: #d9e1d6; }
.mu-input:focus-within { border-color: var(--mu-green); background: #fff; box-shadow: var(--mu-ring); }
.mu-input > .fa { flex: none; width: 40px; text-align: center; color: var(--mu-muted); font-size: 13px; }
.mu-input:focus-within > .fa { color: var(--mu-green); }
.mu-input input,
.mu-input select,
.mu-input textarea {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 14px 0 0;
  border: none;
  background: transparent;
  outline: none;
  box-shadow: none;
  font-family: var(--mu-font);
  font-size: 13.5px;
  color: var(--mu-ink);
}
.mu-input textarea { height: auto; padding: 11px 14px; resize: vertical; line-height: 1.5; }
.mu-input input::placeholder, .mu-input textarea::placeholder { color: #aab4a8; }
.mu-input--textarea { align-items: stretch; }
/* Icon button at the right end of an input (e.g. show password) */
.mu-input-btn {
  flex: none;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--mu-muted);
  cursor: pointer;
}
.mu-input-btn:hover, .mu-input-btn:focus { color: var(--mu-green); outline: none; }
/* Hidden until page JS shows it (jQuery .show()/.toggle() override this) */
.mu-hidden-init { display: none; }

.mu-field.has-error .mu-input { border-color: var(--mu-rose); background: #fff; box-shadow: 0 0 0 4px rgba(225, 29, 72, .1); }
.mu-field-error { display: block; margin-top: 5px; font-size: 12px; font-weight: 500; color: var(--mu-rose); }
.mu-field-error:empty { display: none; }
.mu-field-hint { display: block; margin-top: 5px; font-size: 12px; color: var(--mu-muted); }
.mu-field-hint:empty { display: none; }
.mu-field-hint--right { text-align: right; }
.mu-field-hint .is-warn { color: var(--mu-amber); font-weight: 600; }

/* Radio cards */
.mu-choice-group { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mu-choice { margin: 0; cursor: pointer; font-weight: 400; }
.mu-choice input { position: absolute; opacity: 0; pointer-events: none; }
.mu-choice-box {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--mu-line);
  border-radius: 12px;
  background: #fff;
  transition: all .15s ease;
}
.mu-choice-box > .fa {
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 14px;
  color: var(--mu-muted);
  background: var(--mu-bg-soft);
  transition: all .15s ease;
}
.mu-choice-text { display: flex; flex-direction: column; line-height: 1.3; }
.mu-choice-text b { font-size: 13px; color: var(--mu-ink); }
.mu-choice-text small { font-size: 11.5px; color: var(--mu-muted); }
.mu-choice:hover .mu-choice-box { border-color: #d9e1d6; }
.mu-choice input:focus-visible + .mu-choice-box { box-shadow: var(--mu-ring); }
.mu-choice--blue input:checked + .mu-choice-box { border-color: var(--mu-blue); background: var(--mu-blue-bg); }
.mu-choice--blue input:checked + .mu-choice-box > .fa { color: #fff; background: var(--mu-blue); }
.mu-choice--rose input:checked + .mu-choice-box { border-color: var(--mu-rose); background: var(--mu-rose-bg); }
.mu-choice--rose input:checked + .mu-choice-box > .fa { color: #fff; background: var(--mu-rose); }

/* File upload with image preview: <label class="mu-file"> (modern-ui.js swaps the preview) */
.mu-file {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding: 12px;
  border: 1.5px dashed #cfd9cb;
  border-radius: 12px;
  background: var(--mu-bg-soft);
  cursor: pointer;
  font-weight: 400;
  transition: border-color .15s ease, background .15s ease;
}
.mu-file:hover { border-color: var(--mu-green); background: var(--mu-green-50); }
.mu-file input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mu-file:focus-within { border-color: var(--mu-green); box-shadow: var(--mu-ring); }
.mu-file-preview {
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--mu-line);
  color: var(--mu-muted);
  font-size: 20px;
}
.mu-file-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mu-file-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mu-file-text b { font-size: 13px; color: var(--mu-ink); }
.mu-file-text small { font-size: 12px; color: var(--mu-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Long form page: section menu + section cards ----------
   <form class="mu-form-layout"> <nav class="mu-form-nav"><a href="#sec">…</a></nav>
     <div class="mu-form-sections"> <section class="mu-card" id="sec"> … </div> */
.mu-form-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
.mu-form-nav {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--mu-line);
  border-radius: var(--mu-radius);
  background: #fff;
  box-shadow: var(--mu-shadow);
}
.mu-form-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--mu-text);
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
}
.mu-form-nav a .fa { width: 16px; text-align: center; color: var(--mu-muted); }
.mu-form-nav a:hover, .mu-form-nav a:focus { background: var(--mu-green-50); color: var(--mu-green-700); text-decoration: none; }
.mu-form-nav a:hover .fa { color: var(--mu-green); }
.mu-form-nav a.has-error, .mu-form-nav a.has-error .fa { color: var(--mu-rose); }
.mu-form-sections { display: flex; flex-direction: column; gap: 22px; min-width: 0; border: 0; padding: 0; margin: 0; }
.mu-form-sections > .mu-card { scroll-margin-top: 16px; }
.mu-section-title { display: flex; align-items: center; gap: 12px; }
.mu-section-icon {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 15px;
  color: var(--mu-green-700);
  background: var(--mu-green-50);
}
.mu-form-row--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mu-form-row--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.mu-section-note { margin: 0 0 14px; font-size: 12.5px; color: var(--mu-muted); }
.mu-fieldset-plain { border: 0; padding: 0; margin: 0; min-width: 0; }

/* Amount + "Applicable / N/A" in one field */
.mu-input-pair { display: flex; gap: 8px; }
.mu-input-pair > .mu-input:first-child { flex: 1; min-width: 0; }
.mu-input-pair > .mu-input:last-child { flex: none; width: 128px; }

/* ---------- Detail (view) pages ---------- */
/* Label / value grid: <dl class="mu-dl"><div><dt>Label</dt><dd>Value</dd></div>… */
.mu-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 22px; margin: 0; }
.mu-dl > div { min-width: 0; }
.mu-dl dt { margin-bottom: 4px; font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--mu-muted); }
.mu-dl dd { margin: 0; font-size: 14px; font-weight: 600; color: var(--mu-ink); word-break: break-word; }
.mu-dl dd.is-empty { color: #b7c0b5; font-weight: 500; }
.mu-dl .mu-dl-wide { grid-column: 1 / -1; }
.mu-dl-money dd { font-variant-numeric: tabular-nums; }

/* Hero with a person's photo instead of an icon */
.mu-hero-photo {
  flex: none;
  width: 76px;
  height: 76px;
  border-radius: 20px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, .85);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
  background: #fff;
}
.mu-hero-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mu-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
}
.mu-hero-tag--ok { background: rgba(151, 221, 77, .25); border-color: rgba(151, 221, 77, .45); }
.mu-hero-tag--off { background: rgba(251, 113, 133, .22); border-color: rgba(251, 113, 133, .4); }
.mu-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 991px) { .mu-grid--2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 767px) {
  .mu-dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
  .mu-hero-photo { width: 60px; height: 60px; border-radius: 16px; }
}

/* Logo badge in a hero's action area */
.mu-hero-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .95);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .18);
}
.mu-hero-brand img { max-height: 40px; max-width: 160px; object-fit: contain; }

@media (max-width: 991px) {
  .mu-form-layout { grid-template-columns: minmax(0, 1fr); }
  .mu-form-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 6px;
  }
  .mu-form-nav::-webkit-scrollbar { display: none; }
  .mu-form-nav a { flex: none; white-space: nowrap; padding: 8px 12px; }
  .mu-form-row--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Sticky save bar at the bottom of a long form */
.mu-savebar {
  position: sticky;
  bottom: 12px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border: 1px solid var(--mu-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 12px 32px rgba(16, 24, 12, .14);
}
.mu-savebar-text { font-size: 12.5px; color: var(--mu-muted); }

/* ---------- Confirm dialog (MU.confirm) ---------- */

.mu-confirm .modal-dialog { width: 420px; }
.mu-confirm-body { padding: 28px 28px 8px; text-align: center; }
.mu-confirm-icon {
  display: inline-grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 24px;
  color: var(--mu-rose);
  background: var(--mu-rose-bg);
  box-shadow: 0 0 0 8px #fff7f8;
}
.mu-confirm-title { margin: 18px 0 6px; font-size: 18px; font-weight: 800; color: var(--mu-ink); }
.mu-confirm-text { margin: 0; font-size: 13.5px; color: var(--mu-muted); line-height: 1.55; }
.mu-confirm .mu-modal-footer { justify-content: center; padding: 22px 28px 26px; }
.mu-confirm .mu-modal-footer .mu-btn { flex: 1; }

.mu-confirm-icon--info { color: var(--mu-green-700); background: var(--mu-green-50); box-shadow: 0 0 0 8px #f7fbf3; }
.mu-prompt .mu-confirm-body { text-align: left; }
.mu-prompt .mu-confirm-icon, .mu-prompt .mu-confirm-title { display: block; margin-left: auto; margin-right: auto; text-align: center; }
.mu-prompt .mu-confirm-icon { display: grid; }
.mu-prompt .mu-confirm-text { text-align: center; }
.mu-prompt .mu-prompt-field { margin: 16px 0 0; }

/* ---------- Busy overlay (MU.busy) ---------- */

.mu-busy {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(11, 26, 7, .42);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}
.mu-busy.is-on { opacity: 1; visibility: visible; pointer-events: auto; }
.mu-busy-box {
  width: 100%;
  max-width: 340px;
  padding: 30px 32px 26px;
  border-radius: 20px;
  background: #fff;
  text-align: center;
  box-shadow: var(--mu-shadow-lg);
  font-family: var(--mu-font);
  transform: scale(.94);
  transition: transform .24s cubic-bezier(.2, .9, .25, 1);
}
.mu-busy.is-on .mu-busy-box { transform: none; }
.mu-busy-spin {
  display: block;
  width: 50px;
  height: 50px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(90, 166, 33, 0) 8%, rgba(90, 166, 33, .35) 40%, var(--mu-green) 100%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4.5px), #000 calc(100% - 4.5px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4.5px), #000 calc(100% - 4.5px));
  animation: mu-spin .9s linear infinite;
}
.mu-busy-msg { font-size: 15px; font-weight: 700; color: var(--mu-ink); line-height: 1.4; }
.mu-busy-sub { margin-top: 6px; font-size: 12.5px; color: var(--mu-muted); line-height: 1.45; }
.mu-busy-bar { height: 3px; margin-top: 18px; border-radius: 999px; background: var(--mu-line-soft); overflow: hidden; }
.mu-busy-bar::after {
  content: "";
  display: block;
  width: 38%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(90, 166, 33, .25), var(--mu-green));
  animation: mu-busy-bar 1.2s ease-in-out infinite;
}
@keyframes mu-busy-bar { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
  .mu-grid--main-side { grid-template-columns: minmax(0, 1fr); }
  .mu-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mu-stat--feature { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .mu-page { gap: 16px; }
  .mu-hero { padding: 20px 18px; border-radius: 18px; }
  .mu-hero-icon { width: 46px; height: 46px; font-size: 20px; border-radius: 13px; }
  .mu-hero-title { font-size: 21px; }
  /* Hero buttons share one row on phones (2-3 per row) instead of stacking */
  .mu-hero-actions { width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .mu-hero-actions > :only-child { grid-column: 1 / -1; }
  .mu-hero-actions .mu-btn { width: 100%; padding: 0 10px; font-size: 13px; }
  /* The main (white) action gets a full-width row of its own, placed last */
  .mu-hero-actions .mu-btn--light { grid-column: 1 / -1; order: 9; }
  .mu-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 18px; }
  .mu-stat { padding: 12px; gap: 10px; }
  .mu-stat-icon { width: 36px; height: 36px; font-size: 15px; }
  .mu-stat-value { font-size: 20px; }

  .mu-card-header { padding: 16px; }
  .mu-card-body { padding: 14px 16px 18px; }
  .mu-card-body--flush { padding: 0; }
  .mu-filters { width: 100%; }
  .mu-segmented { width: 100%; }
  .mu-segmented button { flex: 1; justify-content: center; padding: 0 6px; }


  .mu-page .dataTables_wrapper .dataTables_length { padding-left: 16px; }
  .mu-page .dataTables_wrapper .dt-buttons { display: none; }
  .mu-page .dataTables_wrapper .dataTables_filter { flex: 1 0 100%; margin: 0; padding: 0 16px; order: 2; }
  .mu-page .dataTables_filter label { display: flex; width: 100%; }
  .mu-page .dataTables_filter input { flex: 1; width: 100%; }
  .mu-page .dataTables_wrapper .dataTables_info { flex: 1 0 100%; padding: 8px 16px 0; text-align: center; }
  .mu-page .dataTables_wrapper .dataTables_paginate { flex: 1 0 100%; padding: 4px 16px 16px; text-align: center; }
  .mu-page table.mu-table thead th:first-child,
  .mu-page table.mu-table tbody td:first-child { padding-left: 16px !important; }

  .mu-modal .modal-dialog { margin: 16px auto; }
  .mu-choice-group { grid-template-columns: 1fr; }
  .mu-form-row, .mu-form-row--3-1, .mu-form-row--3, .mu-form-row--4 { grid-template-columns: 1fr; }
  .mu-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 12px 16px 14px; }
  .mu-bulkbar { left: 12px; right: 12px; bottom: 12px; max-width: none; transform: translateY(160%); flex-wrap: wrap; justify-content: space-between; padding: 10px 12px; }
  .mu-bulkbar.is-on { transform: none; }
  .mu-bulkbar-btns { order: 3; width: 100%; }
  .mu-bulkbar-btns .mu-btn { flex: 1; }
  .mu-hero .dropdown, .mu-hero .dropdown > .mu-btn { width: 100%; }
  .mu-hero-brand { display: none; }
}

@media (max-width: 767px) {
  /* 3 / 4 small counters stay side by side on a phone, icon above the number */
  .mu-stats--3, .mu-stats--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .mu-stats--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mu-stats--3 .mu-stat, .mu-stats--4 .mu-stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px; }
  .mu-stats--3 .mu-stat-icon { width: 30px; height: 30px; font-size: 13px; border-radius: 9px; }
  .mu-name-cell-sub { max-width: 200px; }
}

@media (max-width: 420px) {
  .mu-stats:not(.mu-stats--3):not(.mu-stats--4) { grid-template-columns: 1fr; }
  .mu-stat--feature { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .mu-page *, .mu-modal * { transition: none !important; animation: none !important; }
}


/* =====================================================================
   PHASE 1 — GLOBAL ADMIN THEME
   ---------------------------------------------------------------------
   Restyles the stock AdminLTE / Bootstrap / DataTables / Select2 markup
   on every admin page (body.mu-admin, set in layouts/admin). Pure CSS -
   no page markup or behaviour changes.

   Selectors start with :where(.mu-admin), which adds NO specificity, so
   anything a page styles itself (users.css ap-*, .mu-page components,
   module css, inline styles) still wins over this layer.
   ===================================================================== */

/* ---------- Canvas, page title, footer ---------- */

:where(.mu-admin) .content-wrapper { background: #f3f6f1; font-family: var(--mu-font); color: var(--mu-text); }
:where(.mu-admin) .content-header { padding: 22px 22px 0; }
:where(.mu-admin) .content-header > h1 {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.3px;
  color: var(--mu-ink);
}
:where(.mu-admin) .content-header > h1 > small { padding-left: 0; font-size: 13px; font-weight: 500; color: var(--mu-muted); }
:where(.mu-admin) .content { padding: 18px 22px 28px; }

:where(.mu-admin) .main-footer {
  font-family: var(--mu-font);
  font-size: 12.5px;
  color: var(--mu-muted);
  background: #fff;
  border-top: 1px solid var(--mu-line);
}

/* ---------- Top bar ---------- */

:where(.mu-admin) .main-header .navbar { border-bottom: 1px solid var(--mu-line); box-shadow: 0 1px 3px rgba(16, 24, 12, .04); }
:where(.mu-admin) .main-header .user-image { border: 2px solid var(--mu-green-100); }
:where(.mu-admin) .main-header .dropdown-menu,
:where(.mu-admin) .content-wrapper .dropdown-menu {
  border: 1px solid var(--mu-line);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(16, 24, 12, .14);
  overflow: hidden;
  font-family: var(--mu-font);
}
:where(.mu-admin) .content-wrapper .dropdown-menu { padding: 6px; }
:where(.mu-admin) .content-wrapper .dropdown-menu > li > a { border-radius: 8px; padding: 8px 12px; font-size: 13px; }
:where(.mu-admin) .content-wrapper .dropdown-menu > li > a:hover { background: var(--mu-green-50); color: var(--mu-green-700); }

/* ---------- Boxes -> cards ---------- */

:where(.mu-admin) .box {
  margin-bottom: 22px;
  background: #fff;
  border: 1px solid var(--mu-line);
  border-radius: var(--mu-radius);
  box-shadow: var(--mu-shadow);
}
:where(.mu-admin) .box.box-primary, :where(.mu-admin) .box.box-success, :where(.mu-admin) .box.box-info,
:where(.mu-admin) .box.box-warning, :where(.mu-admin) .box.box-danger, :where(.mu-admin) .box.box-default {
  border-top-color: var(--mu-line);
}
:where(.mu-admin) .box-header { padding: 16px 20px; color: var(--mu-ink); }
:where(.mu-admin) .box-header.with-border { border-bottom: 1px solid var(--mu-line-soft); }
:where(.mu-admin) .box-header .box-title { font-size: 16px; font-weight: 700; color: var(--mu-ink); letter-spacing: -.1px; }
:where(.mu-admin) .box-header > .fa, :where(.mu-admin) .box-header .box-title > .fa { color: var(--mu-green); }
:where(.mu-admin) .box-header > .box-tools { top: 11px; right: 14px; }
:where(.mu-admin) .box-body { padding: 18px 20px; }
:where(.mu-admin) .box-footer { padding: 14px 20px; background: #fff; border-top: 1px solid var(--mu-line-soft); border-radius: 0 0 var(--mu-radius) var(--mu-radius); }

/* Solid boxes keep a coloured header, in the brand palette. */
:where(.mu-admin) .box.box-solid > .box-header { border-radius: var(--mu-radius) var(--mu-radius) 0 0; }
:where(.mu-admin) .box.box-solid.box-primary > .box-header,
:where(.mu-admin) .box.box-solid.box-success > .box-header {
  color: #fff;
  background: linear-gradient(135deg, var(--mu-forest-2), var(--mu-forest));
}
:where(.mu-admin) .box.box-solid.box-primary, :where(.mu-admin) .box.box-solid.box-success { border-color: var(--mu-line); }
:where(.mu-admin) .box.box-solid > .box-header .box-title,
:where(.mu-admin) .box.box-solid > .box-header > .fa { color: inherit; }

/* Tabs */
:where(.mu-admin) .nav-tabs-custom { border-radius: var(--mu-radius); border: 1px solid var(--mu-line); box-shadow: var(--mu-shadow); overflow: hidden; }
:where(.mu-admin) .nav-tabs-custom > .nav-tabs { border-bottom-color: var(--mu-line-soft); }
:where(.mu-admin) .nav-tabs-custom > .nav-tabs > li { margin-right: 2px; }
:where(.mu-admin) .nav-tabs-custom > .nav-tabs > li > a { font-weight: 600; color: var(--mu-muted); }
:where(.mu-admin) .nav-tabs-custom > .nav-tabs > li.active { border-top-color: var(--mu-green); }
:where(.mu-admin) .nav-tabs-custom > .nav-tabs > li.active > a { color: var(--mu-ink); }

/* ---------- Buttons ---------- */

:where(.mu-admin) .content-wrapper .btn, :where(.mu-admin) .modal .btn {
  border-radius: 10px;
  font-family: var(--mu-font);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 15px;
  line-height: 1.45;
  border-width: 1px;
  box-shadow: none;
  transition: background .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease, transform .15s ease;
}
:where(.mu-admin) .content-wrapper .btn:active, :where(.mu-admin) .modal .btn:active { transform: translateY(1px); }
:where(.mu-admin) .content-wrapper .btn:focus-visible, :where(.mu-admin) .modal .btn:focus-visible { outline: none; box-shadow: var(--mu-ring); }
:where(.mu-admin) .content-wrapper .btn-sm, :where(.mu-admin) .modal .btn-sm { padding: 5px 11px; font-size: 12px; border-radius: 8px; }
:where(.mu-admin) .content-wrapper .btn-xs, :where(.mu-admin) .modal .btn-xs { padding: 3px 9px; font-size: 11.5px; border-radius: 7px; }
:where(.mu-admin) .content-wrapper .btn-lg, :where(.mu-admin) .modal .btn-lg { padding: 11px 20px; font-size: 15px; border-radius: 12px; }

:where(.mu-admin) .btn-default { color: var(--mu-text); background: #fff; border-color: var(--mu-line); }
:where(.mu-admin) .btn-default:hover, :where(.mu-admin) .btn-default:focus, :where(.mu-admin) .btn-default.active,
:where(.mu-admin) .btn-default:active, :where(.mu-admin) .open > .btn-default.dropdown-toggle {
  color: var(--mu-ink); background: var(--mu-bg-soft); border-color: #d6ded3;
}

:where(.mu-admin) .btn-primary, :where(.mu-admin) .btn-success {
  color: #fff;
  background: var(--mu-green);
  border-color: var(--mu-green);
  box-shadow: 0 4px 12px rgba(90, 166, 33, .22);
}
:where(.mu-admin) .btn-primary:hover, :where(.mu-admin) .btn-primary:focus, :where(.mu-admin) .btn-primary:active, :where(.mu-admin) .btn-primary.active,
:where(.mu-admin) .btn-success:hover, :where(.mu-admin) .btn-success:focus, :where(.mu-admin) .btn-success:active, :where(.mu-admin) .btn-success.active,
:where(.mu-admin) .open > .btn-primary.dropdown-toggle, :where(.mu-admin) .open > .btn-success.dropdown-toggle {
  color: #fff; background: var(--mu-green-600); border-color: var(--mu-green-600);
}

:where(.mu-admin) .btn-info { color: #fff; background: var(--mu-blue); border-color: var(--mu-blue); }
:where(.mu-admin) .btn-info:hover, :where(.mu-admin) .btn-info:focus, :where(.mu-admin) .btn-info:active { color: #fff; background: #1d4ed8; border-color: #1d4ed8; }

:where(.mu-admin) .btn-warning { color: #fff; background: #f59e0b; border-color: #f59e0b; }
:where(.mu-admin) .btn-warning:hover, :where(.mu-admin) .btn-warning:focus, :where(.mu-admin) .btn-warning:active { color: #fff; background: var(--mu-amber); border-color: var(--mu-amber); }

:where(.mu-admin) .btn-danger { color: #fff; background: var(--mu-rose); border-color: var(--mu-rose); }
:where(.mu-admin) .btn-danger:hover, :where(.mu-admin) .btn-danger:focus, :where(.mu-admin) .btn-danger:active { color: #fff; background: #be123c; border-color: #be123c; }

:where(.mu-admin) .btn[disabled], :where(.mu-admin) .btn.disabled { opacity: .55; box-shadow: none; }

/* Active / Inactive toggle (admin.users.partials.status) on every list */
:where(.mu-admin) .ap-status-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none !important;
  border-radius: 999px !important;
  padding: 4px 12px 4px 9px !important;
  font-size: 11px !important;
  font-weight: 700;
  box-shadow: none !important;
}
:where(.mu-admin) .ap-status-btn::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
:where(.mu-admin) .ap-status-btn.btn-success { color: var(--mu-green-700); background: var(--mu-green-50); }
:where(.mu-admin) .ap-status-btn.btn-danger { color: #be123c; background: var(--mu-rose-bg); }
:where(.mu-admin) .ap-status-btn:hover { filter: brightness(.96); }

/* ---------- Form controls ---------- */

:where(.mu-admin) .content-wrapper label, :where(.mu-admin) .modal label { font-size: 12.5px; font-weight: 600; color: var(--mu-ink); }
:where(.mu-admin) .form-group { margin-bottom: 16px; }

:where(.mu-admin) .form-control {
  height: 40px;
  padding: 8px 12px;
  border: 1.5px solid #e1e7de;
  border-radius: 10px;
  background-color: #fbfcfa;
  box-shadow: none;
  font-family: var(--mu-font);
  font-size: 13.5px;
  color: var(--mu-ink);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
:where(.mu-admin) .form-control:hover { border-color: #d3dccf; }
:where(.mu-admin) .form-control:focus { border-color: var(--mu-green); background-color: #fff; box-shadow: var(--mu-ring); outline: none; }
:where(.mu-admin) .form-control::placeholder { color: #a9b3a7; }
:where(.mu-admin) textarea.form-control { height: auto; line-height: 1.5; }
:where(.mu-admin) select[multiple].form-control, :where(.mu-admin) select[size].form-control { height: auto; }
:where(.mu-admin) .form-control[disabled], :where(.mu-admin) .form-control[readonly] { background-color: #f1f4ef; color: var(--mu-text); }
:where(.mu-admin) .input-sm, :where(.mu-admin) .form-control.input-sm { height: 32px; padding: 4px 10px; font-size: 12.5px; border-radius: 8px; }
:where(.mu-admin) .input-group-addon { border: 1.5px solid #e1e7de; background: var(--mu-bg-soft); color: var(--mu-muted); border-radius: 10px; }
:where(.mu-admin) .has-error .form-control { border-color: var(--mu-rose); box-shadow: 0 0 0 4px rgba(225, 29, 72, .08); }
:where(.mu-admin) .has-error .help-block, :where(.mu-admin) .error-span, :where(.mu-admin) .text-danger { color: var(--mu-rose); }
:where(.mu-admin) .help-block { font-size: 12px; }
:where(.mu-admin) input[type=file].form-control { height: auto; padding: 7px 10px; }

/* ---------- Select2 ---------- */

:where(.mu-admin) .select2-container--default .select2-selection--single,
:where(.mu-admin) .select2-container--default .select2-selection--multiple {
  min-height: 40px;
  border: 1.5px solid #e1e7de;
  border-radius: 10px;
  background: #fbfcfa;
  transition: border-color .15s ease, box-shadow .15s ease;
}
:where(.mu-admin) .select2-container--default .select2-selection--single { height: 40px; }
:where(.mu-admin) .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 37px; padding-left: 12px; padding-right: 30px; color: var(--mu-ink); font-size: 13.5px; }
:where(.mu-admin) .select2-container--default .select2-selection--single .select2-selection__placeholder { color: #a9b3a7; }
:where(.mu-admin) .select2-container--default .select2-selection--single .select2-selection__arrow { height: 38px; right: 6px; }
:where(.mu-admin) .select2-container--default.select2-container--focus .select2-selection--multiple,
:where(.mu-admin) .select2-container--default.select2-container--open .select2-selection--single,
:where(.mu-admin) .select2-container--default.select2-container--focus .select2-selection--single {
  border-color: var(--mu-green);
  background: #fff;
  box-shadow: var(--mu-ring);
}
:where(.mu-admin) .select2-container--default .select2-selection--multiple .select2-selection__choice {
  border: none;
  border-radius: 999px;
  background: var(--mu-green-50);
  color: var(--mu-green-700);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
}
:where(.mu-admin) .select2-dropdown {
  border: 1px solid var(--mu-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(16, 24, 12, .14);
  overflow: hidden;
  font-family: var(--mu-font);
}
:where(.mu-admin) .select2-container--default .select2-search--dropdown .select2-search__field { border: 1.5px solid #e1e7de; border-radius: 8px; padding: 6px 10px; outline: none; }
:where(.mu-admin) .select2-container--default .select2-search--dropdown .select2-search__field:focus { border-color: var(--mu-green); }
:where(.mu-admin) .select2-results__option { padding: 8px 12px; font-size: 13px; }
:where(.mu-admin) .select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--mu-green); color: #fff; }
:where(.mu-admin) .select2-container--default .select2-results__option[aria-selected=true] { background: var(--mu-green-50); color: var(--mu-green-700); }

/* ---------- Tables ---------- */

:where(.mu-admin) .table > thead > tr > th {
  padding: 11px 12px;
  background: var(--mu-bg-soft);
  border-bottom: 1px solid var(--mu-line);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--mu-muted);
  vertical-align: middle;
}
:where(.mu-admin) .table > tbody > tr > td,
:where(.mu-admin) .table > tbody > tr > th,
:where(.mu-admin) .table > tfoot > tr > td,
:where(.mu-admin) .table > tfoot > tr > th {
  padding: 11px 12px;
  border-top: 1px solid var(--mu-line-soft);
  vertical-align: middle;
  font-size: 13px;
  color: var(--mu-text);
}
:where(.mu-admin) .table-bordered,
:where(.mu-admin) .table-bordered > thead > tr > th, :where(.mu-admin) .table-bordered > thead > tr > td,
:where(.mu-admin) .table-bordered > tbody > tr > th, :where(.mu-admin) .table-bordered > tbody > tr > td,
:where(.mu-admin) .table-bordered > tfoot > tr > th, :where(.mu-admin) .table-bordered > tfoot > tr > td {
  border-color: #edf1eb;
}
:where(.mu-admin) .table-striped > tbody > tr:nth-of-type(odd) { background-color: #fafbf9; }
:where(.mu-admin) .table-hover > tbody > tr:hover,
:where(.mu-admin) table.dataTable > tbody > tr:hover { background-color: #f4f9ef; }

/* Sort arrows: Font Awesome (Bootstrap's glyphicon font is not shipped). */
:where(.mu-admin) table.dataTable thead .sorting:after,
:where(.mu-admin) table.dataTable thead .sorting_asc:after,
:where(.mu-admin) table.dataTable thead .sorting_desc:after {
  font-family: FontAwesome;
  font-size: 11px;
  top: 50%;
  bottom: auto;
  right: 8px;
  transform: translateY(-50%);
  opacity: .3;
}
:where(.mu-admin) table.dataTable thead .sorting:after { content: "\f0dc"; }
:where(.mu-admin) table.dataTable thead .sorting_asc:after { content: "\f0de"; opacity: .85; color: var(--mu-green); }
:where(.mu-admin) table.dataTable thead .sorting_desc:after { content: "\f0dd"; opacity: .85; color: var(--mu-green); }

/* ---------- DataTables controls ---------- */

:where(.mu-admin) .dataTables_wrapper { font-family: var(--mu-font); }
:where(.mu-admin) .dataTables_wrapper .dataTables_length label,
:where(.mu-admin) .dataTables_wrapper .dataTables_filter label { font-size: 12.5px; font-weight: 500; color: var(--mu-muted); }
:where(.mu-admin) .dataTables_wrapper .dataTables_length select {
  height: 34px;
  padding: 0 8px;
  margin: 0 4px;
  border: 1.5px solid #e1e7de;
  border-radius: 9px;
  background: #fff;
  font-weight: 600;
  color: var(--mu-ink);
  outline: none;
}
:where(.mu-admin) .dataTables_wrapper .dataTables_filter input {
  height: 36px;
  width: 230px;
  margin-left: 8px;
  padding: 0 12px 0 34px;
  border: 1.5px solid #e1e7de;
  border-radius: 10px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' viewBox='0 0 24 24' fill='none' stroke='%2387938a' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-3.5-3.5'/%3E%3C/svg%3E") no-repeat 11px center;
  font-size: 13px;
  color: var(--mu-ink);
  outline: none;
  box-shadow: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
:where(.mu-admin) .dataTables_wrapper .dataTables_filter input:focus { border-color: var(--mu-green); box-shadow: var(--mu-ring); }

:where(.mu-admin) .dataTables_wrapper .dt-buttons { display: inline-flex; flex-wrap: wrap; gap: 6px; margin: 0 12px 10px 0; }
:where(.mu-admin) .dataTables_wrapper .dt-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  margin: 0;
  padding: 0 11px;
  border: 1px solid var(--mu-line);
  border-radius: 9px;
  background: #fff;
  color: var(--mu-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  box-shadow: none;
  transition: all .15s ease;
}
:where(.mu-admin) .dataTables_wrapper .dt-button:hover { background: var(--mu-green-50); border-color: var(--mu-green-100); color: var(--mu-green-700); }
:where(.mu-admin) .dataTables_wrapper .dt-button::before { font-family: FontAwesome; font-size: 12px; }
:where(.mu-admin) .dataTables_wrapper .buttons-copy::before { content: "\f0c5"; }
:where(.mu-admin) .dataTables_wrapper .buttons-csv::before { content: "\f0f6"; }
:where(.mu-admin) .dataTables_wrapper .buttons-excel::before { content: "\f1c3"; }
:where(.mu-admin) .dataTables_wrapper .buttons-pdf::before { content: "\f1c1"; }
:where(.mu-admin) .dataTables_wrapper .buttons-print::before { content: "\f02f"; }

:where(.mu-admin) .dataTables_wrapper .dataTables_info { padding-top: 14px; font-size: 12.5px; color: var(--mu-muted); }
:where(.mu-admin) .dataTables_wrapper .dataTables_paginate { padding-top: 8px; }
:where(.mu-admin) .dataTables_wrapper .dataTables_processing {
  z-index: 5;
  height: auto;
  margin-top: -24px;
  padding: 10px 18px;
  border: 1px solid var(--mu-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--mu-shadow);
  color: var(--mu-text);
  font-size: 13px;
}

/* ---------- Pagination (DataTables + Laravel links) ---------- */

:where(.mu-admin) .pagination { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 0; }
:where(.mu-admin) .pagination > li > a,
:where(.mu-admin) .pagination > li > span {
  float: none;
  min-width: 34px;
  height: 34px;
  margin: 0;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--mu-line);
  border-radius: 9px;
  background: #fff;
  color: var(--mu-text);
  font-size: 12.5px;
  font-weight: 600;
}
:where(.mu-admin) .pagination > li:first-child > a, :where(.mu-admin) .pagination > li:first-child > span,
:where(.mu-admin) .pagination > li:last-child > a, :where(.mu-admin) .pagination > li:last-child > span { border-radius: 9px; }
:where(.mu-admin) .pagination > li > a:hover { background: var(--mu-green-50); border-color: var(--mu-green-100); color: var(--mu-green-700); }
:where(.mu-admin) .pagination > .active > a, :where(.mu-admin) .pagination > .active > a:hover,
:where(.mu-admin) .pagination > .active > a:focus, :where(.mu-admin) .pagination > .active > span {
  background: var(--mu-green);
  border-color: var(--mu-green);
  color: #fff;
  box-shadow: 0 4px 10px rgba(90, 166, 33, .3);
}
:where(.mu-admin) .pagination > .disabled > a, :where(.mu-admin) .pagination > .disabled > a:hover,
:where(.mu-admin) .pagination > .disabled > span { background: #fff; border-color: var(--mu-line-soft); color: #c4ccc2; }

/* ---------- Labels / badges -> soft pills ---------- */

:where(.mu-admin) .content-wrapper .label, :where(.mu-admin) .modal .label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2px;
  line-height: 1.3;
}
/* AdminLTE forces label text to white with !important, hence !important here too. */
:where(.mu-admin) .content-wrapper .label-success, :where(.mu-admin) .modal .label-success { background-color: var(--mu-green-50) !important; color: var(--mu-green-700) !important; }
:where(.mu-admin) .content-wrapper .label-danger, :where(.mu-admin) .modal .label-danger { background-color: var(--mu-rose-bg) !important; color: #be123c !important; }
:where(.mu-admin) .content-wrapper .label-warning, :where(.mu-admin) .modal .label-warning { background-color: var(--mu-amber-bg) !important; color: #b45309 !important; }
:where(.mu-admin) .content-wrapper .label-info, :where(.mu-admin) .modal .label-info,
:where(.mu-admin) .content-wrapper .label-primary, :where(.mu-admin) .modal .label-primary { background-color: var(--mu-blue-bg) !important; color: #1d4ed8 !important; }
:where(.mu-admin) .content-wrapper .label-default, :where(.mu-admin) .modal .label-default { background-color: var(--mu-slate-bg) !important; color: var(--mu-slate) !important; }

/* ---------- Alerts ---------- */

:where(.mu-admin) .content-wrapper .alert, :where(.mu-admin) .modal .alert {
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
}
:where(.mu-admin) .content-wrapper .alert-success, :where(.mu-admin) .modal .alert-success { background-color: var(--mu-green-50) !important; border-color: var(--mu-green-100); color: var(--mu-green-700) !important; }
:where(.mu-admin) .content-wrapper .alert-danger, :where(.mu-admin) .modal .alert-danger { background-color: var(--mu-rose-bg) !important; border-color: #ffd5dd; color: #9f1239 !important; }
:where(.mu-admin) .content-wrapper .alert-warning, :where(.mu-admin) .modal .alert-warning { background-color: var(--mu-amber-bg) !important; border-color: #fde7b0; color: #92400e !important; }
:where(.mu-admin) .content-wrapper .alert-info, :where(.mu-admin) .modal .alert-info { background-color: var(--mu-blue-bg) !important; border-color: #d6e4ff; color: #1e40af !important; }
:where(.mu-admin) .content-wrapper .alert a, :where(.mu-admin) .modal .alert a { color: inherit; font-weight: 600; text-decoration: underline; }

/* ---------- Modals ---------- */

:where(.mu-admin) .modal-backdrop { background-color: #0b1a07; }
:where(.mu-admin) .modal-backdrop.in { opacity: .45; }
:where(.mu-admin) .modal-content {
  border: none;
  border-radius: 18px;
  box-shadow: var(--mu-shadow-lg);
  overflow: hidden;
  font-family: var(--mu-font);
}
:where(.mu-admin) .modal-header { padding: 18px 22px; border-bottom: 1px solid var(--mu-line-soft); }
:where(.mu-admin) .modal-header .modal-title { font-size: 17px; font-weight: 800; letter-spacing: -.2px; color: var(--mu-ink); }
:where(.mu-admin) .modal-header .close { margin-top: -2px; font-size: 24px; font-weight: 400; text-shadow: none; opacity: .55; }
:where(.mu-admin) .modal-header .close:hover { opacity: 1; }
:where(.mu-admin) .modal-header-themed {
  color: #fff;
  border-bottom: none;
  background: radial-gradient(circle at 12% 20%, #2f6b1a 0%, var(--mu-forest) 85%);
}
:where(.mu-admin) .modal-header-themed .modal-title, :where(.mu-admin) .modal-header-themed .close { color: #fff; }
:where(.mu-admin) .modal-header-themed .close { opacity: .8; }
:where(.mu-admin) .modal-body { padding: 20px 22px; }
:where(.mu-admin) .modal-footer { padding: 14px 22px 18px; border-top: 1px solid var(--mu-line-soft); background: #fbfcfa; }

/* ---------- Phone: app-like layout ---------- */

@media (max-width: 767px) {
  /* One app bar instead of AdminLTE's two stacked rows (menu strip + logo row). */
  body.mu-admin .main-header .logo { float: left; width: 50px !important; height: 50px; }
  body.mu-admin .main-header .navbar { float: none; width: auto; margin: 0 0 0 50px; min-height: 50px; }
  body.mu-admin .main-header .navbar .navbar-brand { padding-top: 7px; padding-bottom: 7px; }
  body.mu-admin .main-sidebar { padding-top: 50px; }

  :where(.mu-admin) .content-header { padding: 16px 14px 0; }
  :where(.mu-admin) .content-header > h1 { font-size: 19px; }
  :where(.mu-admin) .content { padding: 12px 12px 22px; }

  :where(.mu-admin) .box { margin-bottom: 14px; border-radius: 14px; }
  :where(.mu-admin) .box-header { padding: 14px 14px; }
  :where(.mu-admin) .box-body { padding: 14px; }
  :where(.mu-admin) .box-footer { padding: 12px 14px; border-radius: 0 0 14px 14px; }

  /* Comfortable tap targets */
  :where(.mu-admin) .content-wrapper .btn, :where(.mu-admin) .modal .btn { min-height: 40px; }
  :where(.mu-admin) .content-wrapper .btn-xs, :where(.mu-admin) .content-wrapper .btn-sm { min-height: 32px; }
  :where(.mu-admin) .form-control { height: 44px; font-size: 16px; } /* 16px stops iOS zoom-on-focus */
  /* Single-line fields centre their text anyway; vertical padding only clips
     it when a page forces a shorter height. */
  :where(.mu-admin) input.form-control, :where(.mu-admin) select.form-control { padding-top: 0; padding-bottom: 0; }
  :where(.mu-admin) textarea.form-control { height: auto; }
  :where(.mu-admin) .select2-container--default .select2-selection--single { height: 44px; }
  :where(.mu-admin) .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 41px; }
  :where(.mu-admin) .select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }

  :where(.mu-admin) .dataTables_wrapper .dataTables_filter input { width: 100%; margin: 6px 0 0; }
  :where(.mu-admin) .dataTables_wrapper .dt-buttons { display: none; }

  /* Popups become bottom sheets that slide up, like a phone app */
  :where(.mu-admin) .modal .modal-dialog,
  :where(.mu-admin) .modal.fade .modal-dialog {
    position: fixed;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    max-width: none;
    margin: 0;
    transform: translateY(100%);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1);
  }
  :where(.mu-admin) .modal.in .modal-dialog { transform: translateY(0); }
  :where(.mu-admin) .modal .modal-content {
    max-height: 92vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 22px 22px 0 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  :where(.mu-admin) .modal .modal-content::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 50%;
    z-index: 2;
    width: 40px;
    height: 5px;
    margin-left: -20px;
    border-radius: 3px;
    background: rgba(128, 128, 128, .35);
  }
  :where(.mu-admin) .modal-footer { display: flex; flex-wrap: wrap; gap: 8px; }
  :where(.mu-admin) .modal-footer .btn { flex: 1; margin: 0 !important; }
}

/* ---------- Phone: list rows become cards ----------
   modern-ui.js adds .mu-cardify (plus data-label on every cell) to simple
   lists - one header row, no merged headers, at most 12 columns. Wide
   reports and grouped-header pivots keep horizontal scrolling. */

@media (max-width: 767px) {
  body.mu-admin table.mu-cardify.mu-cardify { min-width: 0 !important; border: none !important; background: transparent; }
  body.mu-admin table.mu-cardify.mu-cardify > thead { display: none; }
  body.mu-admin table.mu-cardify.mu-cardify > tbody { display: block; }
  body.mu-admin table.mu-cardify.mu-cardify > tbody > tr {
    display: block;
    margin: 0 0 12px;
    padding: 4px 14px;
    background: #fff !important;
    border: 1px solid var(--mu-line);
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(16, 24, 12, .05);
  }
  body.mu-admin table.mu-cardify.mu-cardify > tbody > tr > td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
    padding: 9px 0 !important;
    border: none !important;
    border-bottom: 1px dashed var(--mu-line) !important;
    background: transparent !important;
    text-align: right;
    white-space: normal !important;
    word-break: break-word;
    font-size: 13px !important;
  }
  body.mu-admin table.mu-cardify.mu-cardify > tbody > tr > td:last-child { border-bottom: none !important; }
  body.mu-admin table.mu-cardify.mu-cardify > tbody > tr > td::before {
    content: attr(data-label);
    flex: none;
    max-width: 45%;
    text-align: left;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--mu-muted);
  }
  body.mu-admin table.mu-cardify.mu-cardify > tbody > tr > td.mu-td-index { display: none; }
  body.mu-admin table.mu-cardify.mu-cardify > tbody > tr > td.mu-td-primary {
    justify-content: flex-start;
    text-align: left;
    padding: 12px 0 !important;
    font-size: 14px !important;
    font-weight: 700;
    color: var(--mu-ink);
  }
  body.mu-admin table.mu-cardify.mu-cardify > tbody > tr > td.mu-td-primary::before { display: none; }
  body.mu-admin table.mu-cardify.mu-cardify > tbody > tr > td.mu-td-actions { justify-content: flex-end; flex-wrap: wrap; }
  body.mu-admin table.mu-cardify.mu-cardify > tbody > tr > td.mu-td-actions::before { display: none; }
  body.mu-admin table.mu-cardify.mu-cardify > tbody > tr > td.dataTables_empty { justify-content: center; text-align: center; }
  body.mu-admin table.mu-cardify.mu-cardify > tbody > tr > td.dataTables_empty::before { display: none; }
  body.mu-admin table.mu-cardify.mu-cardify > tbody > tr > td > * { max-width: 100%; }
  /* DataTables puts its own wrapper between .table-responsive and the table. */
  body.mu-admin .table-responsive:has(table.mu-cardify),
  body.mu-admin .mu-table-scroll:has(> table.mu-cardify) { overflow: visible; }
}

/* ---------- Period filter row (partials/ui/period-filter): wide employee picker + compact date fields ---------- */
.mu-filter-grid--period { grid-template-columns: minmax(200px, 1.6fr) repeat(4, minmax(120px, 1fr)); }
.mu-filter-grid--period.mu-filter-grid--period-plus { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.mu-filter-grid--period-plus .mu-f-wide { grid-column: span 2; }
.mu-filter-grid--period .mu-field { min-width: 0; }
@media (max-width: 1100px) {
  .mu-filter-grid--period, .mu-filter-grid--period.mu-filter-grid--period-plus { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mu-filter-grid--period .mu-f-wide { grid-column: 1 / -1; }
}

/* ---------- Birthday banner (partials/birthday-banner, admin + employee dashboards) ---------- */
.bday-banner{display:flex;flex-direction:column;gap:10px;margin-bottom:22px;}
.bday-card{display:flex;align-items:center;gap:14px;background:linear-gradient(135deg,#fff3e0,#ffe8f3);
  border:1px solid #ffd7ea;border-radius:14px;padding:14px 18px;box-shadow:0 3px 14px rgba(180,60,120,.08);}
.bday-icon{flex:0 0 auto;width:44px;height:44px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:linear-gradient(135deg,#ff8fb3,#ff6f91);color:#fff;font-size:19px;}
.bday-text{display:flex;flex-direction:column;gap:2px;}
.bday-text strong{font-size:15px;color:#7a2856;}
.bday-sub{font-size:12px;color:#a1638a;}
@media (max-width:600px){ .bday-card{flex-direction:column;text-align:center;} }

/* Long sidebar label that may wrap */
.sidebar-wrap-label { white-space: normal; display: inline-block; vertical-align: top; max-width: 140px; line-height: 1.3; }
/* Employee header punch button cell */
.epx-header-punch { padding: 8px 4px; }

/* =====================================================================
   PAGE SHELL v2 - top bar, sidebar, footer (admin + employee layouts).
   Markup: layouts/partials/{admin,employee}-header, shell-brand, *-sidebar.
   Fixed header + fixed sidebar on desktop; one 56px app bar on phones.
   ===================================================================== */
:root { --shell-h: 64px; --shell-w: 230px; }

/* ---------- Header: brand block (above the sidebar) ---------- */
body.mu-admin .main-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1030; max-height: none; font-family: var(--mu-font); }
body.mu-admin .main-header .logo.shell-brand {
  display: flex; align-items: center; height: var(--shell-h); padding: 0 14px; width: var(--shell-w);
  background: #102c0a !important; border-bottom: 1px solid rgba(255, 255, 255, .06); text-align: left;
}
.shell-brand .logo-lg { display: flex; align-items: center; gap: 11px; min-width: 0; }
.shell-brand .logo-mini { display: none; }
.shell-brand-tile {
  display: inline-grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; border-radius: 12px;
  background: #fff; box-shadow: 0 6px 16px rgba(0, 0, 0, .25);
}
.shell-brand-tile img { max-width: 30px; max-height: 26px; object-fit: contain; }
.shell-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.shell-brand-text b { font-size: 14px; font-weight: 800; letter-spacing: -.2px; color: #fff; white-space: nowrap; }
.shell-brand-text small { margin-top: 2px; font-size: 10.5px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #a3d139; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 768px) {
  body.mu-admin.sidebar-collapse .main-header .logo.shell-brand { width: 50px; padding: 0 5px; justify-content: center; }
  body.mu-admin.sidebar-collapse .shell-brand .logo-lg { display: none; }
  body.mu-admin.sidebar-collapse .shell-brand .logo-mini { display: block; }
  body.mu-admin.sidebar-collapse .shell-brand .shell-brand-tile { flex-basis: 36px; width: 36px; height: 36px; border-radius: 10px; }
}

/* ---------- Header: top bar ---------- */
body.mu-admin .main-header .navbar {
  display: flex; align-items: center; gap: 12px; height: var(--shell-h); min-height: var(--shell-h); margin-left: var(--shell-w);
  padding: 0 18px 0 12px; border: none !important;
  background: rgba(255, 255, 255, .92) !important; -webkit-backdrop-filter: saturate(160%) blur(12px); backdrop-filter: saturate(160%) blur(12px);
  box-shadow: 0 1px 0 var(--mu-line), 0 6px 20px rgba(16, 24, 12, .04) !important;
}
@media (min-width: 768px) { body.mu-admin.sidebar-collapse .main-header .navbar { margin-left: 50px; } }
body.mu-admin .main-header .shell-burger {
  display: inline-grid !important; place-items: center; float: none; flex: 0 0 40px; width: 40px; height: 40px; padding: 0 !important;
  border-radius: 12px; background: var(--mu-bg-soft) !important; color: var(--mu-ink) !important; font-size: 16px; transition: background .15s ease;
}
body.mu-admin .main-header .shell-burger:before { content: none !important; }
body.mu-admin .main-header .shell-burger:hover { background: var(--mu-green-50) !important; color: var(--mu-green-700) !important; }
.shell-phone-logo { display: none; }
.shell-title { display: flex; flex-direction: column; justify-content: center; min-width: 0; flex: 1 1 auto; line-height: 1.2; }
.shell-title-main { font-size: 16px; font-weight: 800; letter-spacing: -.2px; color: var(--mu-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell-title-sub { font-size: 12px; font-weight: 500; color: var(--mu-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell-title-sub:empty { display: none; }

body.mu-admin .main-header .navbar-custom-menu { float: none; margin-left: auto; }
body.mu-admin .main-header .navbar-custom-menu > .navbar-nav { display: flex; align-items: center; gap: 8px; margin: 0; }
body.mu-admin .main-header .navbar-custom-menu > .navbar-nav > li { float: none; position: relative; }
.shell-date > span {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 999px;
  background: var(--mu-bg-soft); color: var(--mu-text); font-size: 12.5px; font-weight: 600;
}
.shell-date .fa { color: var(--mu-green); }
body.mu-admin .main-header .navbar-nav > li > a.shell-icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0 !important; border-radius: 12px;
  background: var(--mu-bg-soft); color: var(--mu-ink) !important; font-size: 17px;
}
body.mu-admin .main-header .navbar-nav > li > a.shell-icon-btn:hover,
body.mu-admin .main-header .navbar-nav > li.open > a.shell-icon-btn { background: var(--mu-green-50) !important; color: var(--mu-green-700) !important; }
body.mu-admin .main-header .shell-icon-btn .navbar-badge {
  position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: #e5484d !important; border: 2px solid #fff; color: #fff; font-size: 10px; font-weight: 800; line-height: 14px;
}
body.mu-admin .main-header .navbar-nav > li > a.shell-user {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 4px 10px 4px 4px !important; border-radius: 999px;
  border: 1px solid var(--mu-line); background: #fff; color: var(--mu-ink) !important;
}
body.mu-admin .main-header .navbar-nav > li > a.shell-user:hover,
body.mu-admin .main-header .navbar-nav > li.open > a.shell-user { border-color: var(--mu-green-100); background: var(--mu-green-50) !important; }
body.mu-admin .main-header .shell-user .user-image { float: none; width: 36px; height: 36px; margin: 0; border-radius: 50%; border: 2px solid var(--mu-green-100); object-fit: cover; }
.shell-user-text { display: flex; flex-direction: column; line-height: 1.15; max-width: 160px; }
.shell-user-text b { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shell-user-text small { font-size: 11px; font-weight: 600; color: var(--mu-muted); }
.shell-caret { color: var(--mu-muted); }

/* Dropdowns (bell + user) */
body.mu-admin .main-header .navbar-custom-menu .dropdown-menu {
  top: calc(100% + 10px); right: 0; left: auto; padding: 6px; border: 1px solid var(--mu-line); border-radius: 16px;
  box-shadow: 0 18px 44px rgba(16, 24, 12, .16); font-family: var(--mu-font);
}
.shell-user-menu { width: 270px; }
.shell-user-menu > li > a { display: flex !important; align-items: center; gap: 10px; padding: 10px 12px !important; border-radius: 10px; font-size: 13.5px; font-weight: 600; color: var(--mu-ink) !important; }
.shell-user-menu > li > a .fa { width: 18px; color: var(--mu-green); text-align: center; }
.shell-user-menu > li > a:hover { background: var(--mu-green-50) !important; color: var(--mu-green-700) !important; }
.shell-user-card { display: flex; align-items: center; gap: 12px; margin: -6px -6px 6px; padding: 16px; border-radius: 16px 16px 0 0; background: linear-gradient(135deg, #1e4014, #2f6f12); color: #fff; }
.shell-user-card img { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); object-fit: cover; }
.shell-user-card b { display: block; font-size: 14px; }
.shell-user-card small { display: block; font-size: 11.5px; opacity: .85; word-break: break-all; }
.shell-role { display: inline-block; margin-top: 5px; padding: 1px 9px; border-radius: 999px; background: #a3d139; color: #16330c; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .3px; }
.shell-signout { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--mu-line-soft); }
.shell-signout form { margin: 0; }
.shell-signout button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; color: #b3261e; font-size: 13.5px; font-weight: 700; text-align: left; }
.shell-signout button:hover { background: #fdecec; }
.shell-bell-menu { width: 330px; }
body.mu-admin .shell-bell-menu > li.header { padding: 10px 12px; border: 0; font-size: 12px; font-weight: 700; color: var(--mu-muted); background: none; }
body.mu-admin .shell-bell-menu > li .menu > li > a { white-space: normal; padding: 10px 12px; border-radius: 10px; border-bottom: 0; font-size: 12.5px; }
body.mu-admin .shell-bell-menu > li .menu > li > a:hover { background: var(--mu-green-50); }
body.mu-admin .shell-bell-menu > li.footer > a { border-radius: 10px; font-weight: 700; color: var(--mu-green-700) !important; background: var(--mu-bg-soft); }

/* Employee punch button in the top bar */
body.mu-employee .epx-header-punch { padding: 0 !important; }

/* ---------- Content area under the fixed header ---------- */
body.mu-admin .content-wrapper { padding-top: var(--shell-h); }
body.mu-admin .content-wrapper > .content-header { display: none; } /* the title lives in the top bar now */
:where(.mu-admin) .content { padding-top: 22px; }

/* ---------- Sidebar ---------- */
body.mu-admin .main-sidebar {
  position: fixed; top: 0; bottom: 0; width: var(--shell-w); padding-top: var(--shell-h);
  background: linear-gradient(180deg, #153810 0%, #0f2a09 55%, #0a1f06 100%) !important; box-shadow: 4px 0 28px rgba(6, 16, 4, .18);
}
body.mu-admin .main-sidebar .sidebar { height: calc(100vh - var(--shell-h)); overflow-y: auto; overflow-x: hidden; padding-bottom: 24px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
body.mu-admin .main-sidebar .sidebar::-webkit-scrollbar { width: 6px; }
body.mu-admin .main-sidebar .sidebar::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); border-radius: 6px; }

body.mu-admin .sidebar .user-panel {
  margin: 14px 12px 10px; padding: 12px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px;
  background: linear-gradient(135deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .03));
}
body.mu-admin .sidebar-menu { padding: 0 0 12px; }
body.mu-admin .sidebar-menu > li { padding: 0 10px; }
body.mu-admin .sidebar-menu > li > a {
  display: flex; align-items: center; gap: 10px; margin: 2px 0; padding: 7px 10px 7px 7px; border-radius: 12px;
  font-size: 13.4px; font-weight: 600; color: rgba(255, 255, 255, .8) !important;
}
body.mu-admin .sidebar-menu > li > a > span:not(.pull-right-container) { flex: 1 1 auto; min-width: 0; }
body.mu-admin .sidebar-menu > li > a > .fa:first-child {
  display: inline-grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 10px;
  background: rgba(255, 255, 255, .07); color: #b9e27a; font-size: 14px; transition: background .15s ease, color .15s ease;
}
body.mu-admin .sidebar-menu > li > a > .pull-right-container { position: static; margin-left: auto; }
body.mu-admin .sidebar-menu > li > a > .pull-right-container > .fa { position: static; margin: 0; transition: transform .2s ease; }
body.mu-admin .sidebar-menu > li.menu-open > a > .pull-right-container > .fa-angle-left { transform: rotate(-90deg); }
body.mu-admin .sidebar-menu > li:hover > a, body.mu-admin .sidebar-menu > li.menu-open > a { background: rgba(255, 255, 255, .07) !important; color: #fff !important; }
body.mu-admin .sidebar-menu > li:hover > a > .fa:first-child { background: rgba(163, 209, 57, .18); color: #d8f5b0; }
body.mu-admin .sidebar-menu > li.active > a {
  background: #fff !important; color: #153810 !important; font-weight: 800; box-shadow: 0 8px 20px rgba(0, 0, 0, .22);
}
body.mu-admin .sidebar-menu > li.active > a > .fa:first-child { background: linear-gradient(135deg, #8fd14f, #4f9a1c); color: #fff !important; }
body.mu-admin .sidebar-menu > li.active > a > .pull-right-container > .fa { color: rgba(21, 56, 16, .5); }

body.mu-admin .sidebar-menu .treeview-menu {
  margin: 4px 0 8px 23px; padding: 2px 0 2px 12px; border-left: 1px solid rgba(163, 209, 57, .28); border-radius: 0; background: none !important;
}
body.mu-admin .sidebar-menu .treeview-menu > li > a {
  display: flex; align-items: center; gap: 8px; margin: 1px 0; padding: 7px 10px; border-radius: 10px;
  font-size: 12.8px; font-weight: 500; color: rgba(255, 255, 255, .68) !important; white-space: normal;
}
body.mu-admin .sidebar-menu .treeview-menu > li > a > .fa { flex: 0 0 16px; width: 16px; font-size: 11px; color: rgba(255, 255, 255, .45) !important; text-align: center; }
body.mu-admin .sidebar-menu .treeview-menu > li:hover > a { background: rgba(255, 255, 255, .07) !important; color: #fff !important; }
body.mu-admin .sidebar-menu .treeview-menu > li.active > a { background: rgba(163, 209, 57, .16) !important; color: #d8f5b0 !important; font-weight: 700; }
body.mu-admin .sidebar-menu .treeview-menu > li.active > a > .fa { color: #a3d139 !important; }

/* Collapsed (icon-only) sidebar on desktop */
@media (min-width: 768px) {
  body.mu-admin.sidebar-collapse .main-sidebar { width: 50px; }
  body.mu-admin.sidebar-collapse .main-sidebar .sidebar { overflow: visible; }
  body.mu-admin.sidebar-collapse .sidebar .user-panel { margin: 10px 4px; padding: 6px 0; border: 0; background: none; justify-content: center; }
  body.mu-admin.sidebar-collapse .sidebar-menu > li { padding: 0 4px; }
  body.mu-admin.sidebar-collapse .sidebar-menu > li > a { justify-content: center; padding: 5px 0; }
  body.mu-admin.sidebar-collapse .sidebar-menu > li > a > .pull-right-container { display: none; }
}

/* ---------- Footer ---------- */
body.mu-admin .main-footer.shell-footer {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 16px;
  padding: 16px 22px; border-top: 1px solid var(--mu-line); background: transparent; color: var(--mu-muted); font-size: 12.5px;
}
.shell-footer b { color: var(--mu-ink); }
.shell-footer-meta { display: inline-flex; align-items: center; gap: 12px; }
.shell-footer-meta span { display: inline-flex; align-items: center; gap: 6px; }
.shell-footer-meta .fa { color: var(--mu-green); }

/* ---------- Phone: single 56px app bar, sidebar as a drawer ---------- */
@media (max-width: 767px) {
  :root { --shell-h: 56px; }
  body.mu-admin .main-header .logo.shell-brand { display: none !important; }
  body.mu-admin .main-header .navbar { margin: 0 !important; width: 100%; gap: 8px; padding: 0 10px; }
  body.mu-admin .main-header .shell-burger { flex-basis: 38px; width: 38px; height: 38px; }
  .shell-phone-logo { display: inline-grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border-radius: 10px; background: #fff; border: 1px solid var(--mu-line); }
  .shell-phone-logo img { max-width: 28px; max-height: 24px; object-fit: contain; }
  .shell-title-main { font-size: 14.5px; }
  .shell-title-sub { display: none; }
  body.mu-admin .main-header .navbar-custom-menu > .navbar-nav { gap: 6px; }
  body.mu-admin .main-header .navbar-nav > li > a.shell-icon-btn { width: 38px; height: 38px; }
  body.mu-admin .main-header .navbar-nav > li > a.shell-user { height: 40px; padding: 2px !important; border: 0; background: none; }
  body.mu-admin .main-header .shell-user .user-image { width: 34px; height: 34px; }
  body.mu-admin .main-header .navbar-custom-menu .dropdown-menu { position: fixed !important; top: calc(var(--shell-h) + 6px) !important; right: 8px !important; left: 8px !important; width: auto !important; }
  body.mu-admin .main-sidebar { width: 270px; padding-top: var(--shell-h); transform: translate(-270px, 0); }
  body.mu-admin.sidebar-open .main-sidebar { transform: translate(0, 0); }
  body.mu-admin .main-footer.shell-footer { padding: 14px; justify-content: center; text-align: center; }
  body.mu-employee .epx-nav-attendance-btn { padding: 8px 10px !important; }
}

/* Shell v2: beat AdminLTE's own .logo / .user-panel sizing */
body.mu-admin .main-header .logo.shell-brand { line-height: normal; font-size: 14px; overflow: hidden; }
body.mu-admin .main-header .logo.shell-brand .logo-lg { display: flex; align-items: center; gap: 11px; min-width: 0; }
body.mu-admin .main-header .logo.shell-brand .logo-mini { display: none; }
@media (min-width: 768px) {
  body.mu-admin.sidebar-collapse .main-header .logo.shell-brand .logo-lg { display: none; }
  body.mu-admin.sidebar-collapse .main-header .logo.shell-brand .logo-mini { display: block; }
}
body.mu-admin .main-sidebar .sidebar .user-panel { width: auto; box-sizing: border-box; }
body.mu-admin .main-sidebar .sidebar-menu > li > a > span { white-space: normal; line-height: 1.25; }
body.mu-admin .main-footer.shell-footer { background: #fff !important; color: var(--mu-muted) !important; }
body.mu-admin .main-footer.shell-footer b { color: var(--mu-ink) !important; }
/* Employee top bar: punch button + bell keep the shell look over employee-portal.css */
body.mu-admin .main-header .navbar-nav > li > a.shell-icon-btn { width: 40px !important; height: 40px !important; padding: 0 !important; font-size: 17px !important; border-radius: 12px !important; background: var(--mu-bg-soft) !important; line-height: 40px; }
body.mu-employee .main-header .epx-nav-attendance-btn, body.mu-employee .main-header .epx-nav-attendance-done { display: inline-flex !important; align-items: center; gap: 7px; height: 40px; margin: 0 !important; padding: 0 16px !important; border-radius: 12px !important; font-size: 13px; font-weight: 700; line-height: 1; box-shadow: 0 6px 16px rgba(90, 166, 33, .25); }
@media (max-width: 767px) { body.mu-employee .main-header .epx-nav-attendance-btn, body.mu-employee .main-header .epx-nav-attendance-done { height: 38px; padding: 0 11px !important; } body.mu-admin .main-header .navbar-nav > li > a.shell-icon-btn { width: 38px !important; height: 38px !important; line-height: 38px; } }
body.mu-employee .main-header .epx-nav-attendance-btn { background: linear-gradient(135deg, #7bc73f, #4f9c1e) !important; color: #fff !important; border: 0 !important; }
body.mu-employee .main-header .epx-nav-attendance-btn.epx-nav-attendance-out { background: linear-gradient(135deg, #ef8a5a, #d1462f) !important; box-shadow: 0 6px 16px rgba(209, 70, 47, .25); }
body.mu-employee .main-header .epx-nav-attendance-done { background: var(--mu-green-50) !important; color: var(--mu-green-700) !important; box-shadow: none; }

/* Hero action dropdowns ("More" on the salary pages): the button row sits
   above the stat cards, and while a menu is open the hero stops clipping,
   so the whole menu shows over the stats and the content below. */
.mu-hero > .mu-hero-top { z-index: 5; }
.mu-hero::after { border-radius: inherit; }
.mu-hero:has(.dropdown.open) { overflow: visible; z-index: 20; }
.mu-hero .dropdown-menu { z-index: 1060; }
@media (max-width: 767px) {
  /* Phone: the menu opens under its button, as wide as the button - never off-screen. */
  .mu-hero .mu-hero-actions .dropdown { position: relative; }
  .mu-hero .mu-hero-actions .dropdown-menu { left: 0; right: 0; min-width: 0; width: 100%; }
  .mu-hero .mu-hero-actions .dropdown-menu > li > a { white-space: normal; line-height: 1.3; }
}
