/* =====================================================================
   MMGestCont-Web - design system
   ---------------------------------------------------------------------
   Built from scratch against the agreed visual design system.
   Bootstrap is used for grid/utilities/modal/dropdown infrastructure only;
   its default appearance is overridden throughout so nothing looks like
   stock Bootstrap.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. Design tokens
   --------------------------------------------------------------------- */
:root {
  --color-primary: #7367F0;
  --color-primary-hover: #685DD8;
  --color-primary-soft: #E9E7FD;
  --color-sidebar: #2F3349;
  --color-sidebar-hover: #3A3E55;
  --color-sidebar-text: #C9CAD2;
  --color-sidebar-muted: #8F91A0;
  --color-page: #F5F5F9;
  --color-surface: #FFFFFF;
  --color-text: #444050;
  --color-text-strong: #2F2B3D;
  --color-text-muted: #6D6B77;
  --color-text-light: #A5A3AE;
  --color-border: #DBDADE;
  --color-border-soft: #EBE9F1;
  --color-success: #28C76F;
  --color-success-soft: #DDF6E8;
  --color-warning: #FF9F43;
  --color-warning-soft: #FFF0E1;
  --color-danger: #EA5455;
  --color-danger-soft: #FCE5E6;
  --color-info: #00CFE8;
  --color-info-soft: #DDF7FA;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow-card: 0 2px 8px rgba(47, 43, 61, .08);
  --shadow-dropdown: 0 4px 18px rgba(47, 43, 61, .12);
  --sidebar-width: 240px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    'Helvetica Neue', Arial, sans-serif;

  --header-height: 64px;
  --gap: 20px;
}

/* ---------------------------------------------------------------------
   2. Base
   --------------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 600;
  color: var(--color-text-strong);
  letter-spacing: -0.01em;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-hover); text-decoration: underline; }

/* Visible keyboard focus everywhere - never removed, only restyled. */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 2000;
  padding: 10px 16px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius);
}
.skip-link:focus { left: 12px; top: 12px; color: #fff; }

/* Anything numeric lines up in columns. */
.tabular,
td.numeric,
th.numeric,
.identity__secondary,
.stat__value {
  font-variant-numeric: tabular-nums;
}

.text-muted-2 { color: var(--color-text-muted) !important; }
.text-light-2 { color: var(--color-text-light) !important; }

/* ---------------------------------------------------------------------
   3. Application shell
   --------------------------------------------------------------------- */
.app {
  display: flex;
  min-height: 100vh;
}

.app__main {
  flex: 1 1 auto;
  min-width: 0; /* lets wide tables scroll instead of stretching the shell */
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
}

.app__content {
  flex: 1 1 auto;
  padding: 24px 28px 40px;
}

/* --- Sidebar ---------------------------------------------------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 1040;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: var(--color-sidebar);
  color: var(--color-sidebar-text);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  height: var(--header-height);
  padding: 0 20px;
  flex: 0 0 auto;
}

.sidebar__logo {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--color-primary);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(115, 103, 240, .45);
}

.sidebar__title {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  letter-spacing: -0.01em;
}

.sidebar__subtitle {
  display: block;
  font-size: 11px;
  font-weight: 400;
  color: var(--color-sidebar-muted);
}

.sidebar__nav {
  padding: 8px 12px 24px;
  flex: 1 1 auto;
}

.sidebar__section {
  padding: 18px 12px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--color-sidebar-muted);
}

.sidebar__link {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  margin: 2px 0;
  padding: 0 12px;
  border-radius: var(--radius);
  color: var(--color-sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.sidebar__link:hover {
  background: var(--color-sidebar-hover);
  color: #fff;
  text-decoration: none;
}

.sidebar__link i {
  font-size: 16px;
  width: 18px;
  text-align: center;
  color: var(--color-sidebar-muted);
  flex: 0 0 auto;
}

.sidebar__link:hover i { color: #fff; }

.sidebar__link.is-active {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(115, 103, 240, .35);
}

.sidebar__link.is-active i { color: #fff; }

.sidebar__badge {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

/* --- Sidebar backplate (mobile) --------------------------------------- */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1035;
  background: rgba(47, 43, 61, .5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

/* ---------------------------------------------------------------------
   4. Header
   --------------------------------------------------------------------- */
.header {
  position: sticky;
  top: 0;
  z-index: 1020;
  display: flex;
  align-items: center;
  gap: 16px;
  height: var(--header-height);
  padding: 0 28px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-soft);
}

.header__menu {
  display: none;
  width: 38px;
  height: 38px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--color-text);
  font-size: 18px;
}

.header__search {
  position: relative;
  flex: 1 1 auto;
  max-width: 420px;
}

.header__search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
  pointer-events: none;
}

.header__search input {
  width: 100%;
  height: 38px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-page);
  font-size: 13.5px;
  color: var(--color-text);
}

.header__search input:focus {
  outline: none;
  background: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.header__spacer { flex: 1 1 auto; }

.header__user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--color-border-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--color-text);
}

.header__user:hover { background: var(--color-page); text-decoration: none; }

.header__user-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
  font-size: 11.5px;
  font-weight: 700;
}

.header__user-name {
  font-size: 13px;
  font-weight: 500;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header__user-role {
  font-size: 11px;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------------
   5. Page heading
   --------------------------------------------------------------------- */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gap);
  margin-bottom: var(--gap);
  flex-wrap: wrap;
}

.page-head__title { font-size: 20px; }

.page-head__subtitle {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--color-text-muted);
}

.page-head__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  padding: 0;
  font-size: 12.5px;
  color: var(--color-text-muted);
  list-style: none;
}

.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }

/* ---------------------------------------------------------------------
   6. Cards
   --------------------------------------------------------------------- */
.card {
  background: var(--color-surface);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.card + .card { margin-top: var(--gap); }

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-soft);
}

.card__title { font-size: 15px; }

.card__subtitle {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.card__body { padding: 20px; }
.card__body--flush { padding: 0; }

.card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px;
  border-top: 1px solid var(--color-border-soft);
}

/* ---------------------------------------------------------------------
   7. Stat strip - one compact horizontal card, 3-4 KPIs
   --------------------------------------------------------------------- */
.stats {
  display: flex;
  flex-wrap: wrap;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  margin-bottom: var(--gap);
}

.stat {
  flex: 1 1 190px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  border-right: 1px solid var(--color-border-soft);
}

.stat:last-child { border-right: 0; }

.stat__label {
  font-size: 12.5px;
  color: var(--color-text-muted);
  margin-bottom: 2px;
}

.stat__value {
  font-size: 22px;
  font-weight: 600;
  color: var(--color-text-strong);
  line-height: 1.2;
}

.stat__meta {
  font-size: 11.5px;
  color: var(--color-text-light);
}

.stat__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: var(--radius);
  font-size: 17px;
}

.stat__icon--primary { background: var(--color-primary-soft); color: var(--color-primary-hover); }
.stat__icon--success { background: var(--color-success-soft); color: #1B9E56; }
.stat__icon--warning { background: var(--color-warning-soft); color: #D97B14; }
.stat__icon--danger  { background: var(--color-danger-soft);  color: #CC3A3B; }
.stat__icon--info    { background: var(--color-info-soft);    color: #0095A9; }

/* ---------------------------------------------------------------------
   8. Toolbar - lives inside the card, directly above the table
   --------------------------------------------------------------------- */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-bottom: 1px solid var(--color-border-soft);
}

.toolbar__left,
.toolbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar__label {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ---------------------------------------------------------------------
   9. Buttons
   --------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.btn:disabled,
.btn.disabled { opacity: .55; cursor: not-allowed; }

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 2px 6px rgba(115, 103, 240, .28);
}
.btn--primary:hover { background: var(--color-primary-hover); color: #fff; text-decoration: none; }

.btn--secondary {
  background: #fff;
  border-color: var(--color-border);
  color: var(--color-text);
}
.btn--secondary:hover { background: var(--color-page); color: var(--color-text-strong); text-decoration: none; }

.btn--ghost { background: transparent; color: var(--color-text-muted); }
.btn--ghost:hover { background: var(--color-page); color: var(--color-text-strong); text-decoration: none; }

.btn--danger { background: var(--color-danger); color: #fff; }
.btn--danger:hover { background: #D23F40; color: #fff; text-decoration: none; }

.btn--sm { height: 32px; padding: 0 12px; font-size: 12.5px; }
.btn--block { width: 100%; }

/* Compact icon-only row actions */
.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}

.btn-icon:hover { background: var(--color-page); color: var(--color-primary); }
.btn-icon--danger:hover { background: var(--color-danger-soft); color: var(--color-danger); }
.btn-icon:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 1px; }

/* ---------------------------------------------------------------------
   10. Tables - the core of this application
   --------------------------------------------------------------------- */
.table-wrap {
  width: 100%;
  overflow-x: auto; /* small screens scroll instead of crushing columns */
  -webkit-overflow-scrolling: touch;
}

.table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}

.table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 16px;
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

/* White rows, subtle dividers, no zebra striping. */
.table tbody td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--color-border-soft);
  color: var(--color-text);
  vertical-align: middle;
}

.table tbody tr { background: #fff; }
.table tbody tr:hover { background: #FAFAFC; }
.table tbody tr:last-child td { border-bottom: 0; }

.table th.numeric,
.table td.numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  white-space: nowrap;
}

.table__muted { color: var(--color-text-muted); }

.table--compact tbody td { padding: 8px 16px; }

/* Sortable column headers */
.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}
.table-sort:hover { color: var(--color-primary); }
.table-sort i { font-size: 10px; opacity: .45; }
.table-sort.is-active { color: var(--color-primary); }
.table-sort.is-active i { opacity: 1; }

/* ---------------------------------------------------------------------
   11. Identity cell
   --------------------------------------------------------------------- */
.identity {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.identity__avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary-hover);
  font-size: 11.5px;
  font-weight: 700;
}

.identity__text { min-width: 0; }

.identity__primary {
  display: block;
  font-weight: 500;
  color: var(--color-text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity__link { color: var(--color-text-strong); }
.identity__link:hover { color: var(--color-primary); text-decoration: none; }

.identity__secondary {
  display: block;
  font-size: 12.5px;
  color: var(--color-text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------------------------------------------------------------------
   12. Badges
   --------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}

.badge i { font-size: 11px; }

.badge--success   { background: var(--color-success-soft); color: #1B8A4E; }
.badge--warning   { background: var(--color-warning-soft); color: #C2700F; }
.badge--danger    { background: var(--color-danger-soft);  color: #C93B3C; }
.badge--info      { background: var(--color-info-soft);    color: #05879A; }
.badge--primary   { background: var(--color-primary-soft); color: var(--color-primary-hover); }
.badge--secondary { background: #EFEFF4;                   color: var(--color-text-muted); }
.badge--light     { background: var(--color-page);         color: var(--color-text-muted); border: 1px solid var(--color-border-soft); }

/* ---------------------------------------------------------------------
   13. Forms
   --------------------------------------------------------------------- */
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text);
}

.form-label .req { color: var(--color-danger); margin-left: 2px; }

.form-control,
.form-select {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--color-text);
  transition: border-color .15s ease, box-shadow .15s ease;
}

textarea.form-control { height: auto; min-height: 88px; padding: 10px 12px; }

.form-select {
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%236D6B77'%3E%3Cpath d='M8 11.5 2.5 6h11z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}

.form-control:focus,
.form-select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}

.form-control:disabled,
.form-select:disabled { background: var(--color-page); color: var(--color-text-muted); }

.form-control.is-invalid,
.form-select.is-invalid { border-color: var(--color-danger); }

.form-help { margin-top: 5px; font-size: 12px; color: var(--color-text-muted); }
.form-error { margin-top: 5px; font-size: 12px; font-weight: 500; color: var(--color-danger); }

.form-section + .form-section { margin-top: 24px; }

.form-section__title {
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border-soft);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-strong);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--color-border-soft);
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--color-text);
  cursor: pointer;
}

.checkbox input { width: 16px; height: 16px; accent-color: var(--color-primary); }

/* Repeating band editor (tariff price bands) */
.band-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1.2fr 1.2fr 1fr auto;
  gap: 10px;
  align-items: end;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-soft);
}
.band-row:last-of-type { border-bottom: 0; }

/* ---------------------------------------------------------------------
   14. Pagination
   --------------------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--color-border-soft);
}

.pagination__info { font-size: 12.5px; color: var(--color-text-muted); }

.pagination__list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }

.pagination__link {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--radius);
  color: var(--color-text-muted);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.pagination__link:hover { background: var(--color-page); color: var(--color-primary); }
.pagination__link.is-active { background: var(--color-primary); color: #fff; }
.pagination__link.is-disabled { color: var(--color-text-light); pointer-events: none; }

/* ---------------------------------------------------------------------
   15. Alerts / flash messages
   --------------------------------------------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: var(--gap);
  border-radius: var(--radius);
  font-size: 13.5px;
  border: 1px solid transparent;
}

.alert i { font-size: 16px; flex: 0 0 auto; margin-top: 1px; }
.alert__body { flex: 1 1 auto; }
.alert__title { font-weight: 600; margin-bottom: 2px; }

.alert--success { background: var(--color-success-soft); border-color: rgba(40, 199, 111, .3); color: #14663C; }
.alert--danger  { background: var(--color-danger-soft);  border-color: rgba(234, 84, 85, .3);  color: #8F2C2D; }
.alert--warning { background: var(--color-warning-soft); border-color: rgba(255, 159, 67, .3); color: #8A5410; }
.alert--info    { background: var(--color-info-soft);    border-color: rgba(0, 207, 232, .3);  color: #066A7A; }

.alert--dismissible { justify-content: space-between; }
.alert__close {
  border: 0;
  background: transparent;
  color: inherit;
  opacity: .6;
  cursor: pointer;
  padding: 0 2px;
}
.alert__close:hover { opacity: 1; }

/* ---------------------------------------------------------------------
   16. Empty / loading / error states
   --------------------------------------------------------------------- */
.state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 56px 24px;
  text-align: center;
}

.state__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 22px;
}

.state__title { font-size: 15px; }
.state__text { font-size: 13.5px; color: var(--color-text-muted); max-width: 420px; }

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: mmgc-spin .7s linear infinite;
}

@keyframes mmgc-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 2s; }
  * { transition-duration: .01ms !important; }
}

/* ---------------------------------------------------------------------
   17. Detail / description lists
   --------------------------------------------------------------------- */
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 24px;
}

.detail__label { font-size: 12px; color: var(--color-text-muted); margin-bottom: 3px; }
.detail__value { font-size: 13.5px; color: var(--color-text-strong); }

.tabs {
  display: flex;
  gap: 2px;
  padding: 0 20px;
  border-bottom: 1px solid var(--color-border-soft);
  overflow-x: auto;
}

.tabs__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 12px 14px;
  border-bottom: 2px solid transparent;
  color: var(--color-text-muted);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  text-decoration: none;
}

.tabs__link:hover { color: var(--color-primary); text-decoration: none; }
.tabs__link.is-active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

/* ---------------------------------------------------------------------
   18. Auth pages (login / setup)
   --------------------------------------------------------------------- */
.auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--color-page);
}

.auth__card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 30px rgba(47, 43, 61, .12);
  padding: 32px;
}

.auth__brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth__title { font-size: 19px; }
.auth__subtitle { font-size: 13.5px; color: var(--color-text-muted); margin: 4px 0 22px; }

/* ---------------------------------------------------------------------
   19. Responsive - below 768px the sidebar becomes an off-canvas drawer
   --------------------------------------------------------------------- */
@media (max-width: 991.98px) {
  .app__content { padding: 20px 18px 32px; }
  .header { padding: 0 18px; }
  .stat { flex: 1 1 50%; border-bottom: 1px solid var(--color-border-soft); }
  .band-row { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 767.98px) {
  .app__main { margin-left: 0; }

  .header__menu { display: inline-grid; place-items: center; }
  .header__user-name,
  .header__user-role { display: none; }

  .sidebar {
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: var(--shadow-dropdown);
  }

  body.is-sidebar-open { overflow: hidden; }
  body.is-sidebar-open .sidebar { transform: translateX(0); }
  body.is-sidebar-open .sidebar-backdrop { opacity: 1; visibility: visible; }

  .stat { flex: 1 1 100%; border-right: 0; }
  .page-head { flex-direction: column; align-items: stretch; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar__right { justify-content: space-between; }
  .card__head { flex-direction: column; align-items: flex-start; }
}

/* ---------------------------------------------------------------------
   20. Small shared utilities
   --------------------------------------------------------------------- */
.u-hidden { display: none !important; }
.u-mt-0 { margin-top: 0 !important; }
.u-mb-0 { margin-bottom: 0 !important; }
.u-mt-3 { margin-top: 16px !important; }
.u-mb-3 { margin-bottom: 16px !important; }
.u-ml-3 { margin-left: 16px !important; }
.d-block { display: block; }
.u-flex { display: flex; }
.u-items-center { align-items: center; }
.u-gap-2 { gap: 8px; }
.u-nowrap { white-space: nowrap; }
.u-truncate { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-right { text-align: right; }
.u-sm { font-size: 12.5px; }
.u-strong { font-weight: 600; color: var(--color-text-strong); }
.u-danger-text { color: var(--color-danger); }
.u-success-text { color: #1B8A4E; }

/* ---------------------------------------------------------------------
   21. Bootstrap overrides
   Only infrastructure (grid, modal, dropdown) is used; its default look is
   replaced so nothing on screen reads as stock Bootstrap.
   --------------------------------------------------------------------- */
.dropdown-menu {
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow-dropdown);
  padding: 6px;
  font-size: 13.5px;
}

.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--color-text);
}
.dropdown-item:hover,
.dropdown-item:focus { background: var(--color-page); color: var(--color-text-strong); }
.dropdown-item.text-danger:hover { background: var(--color-danger-soft); }

.modal-content {
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dropdown);
}

.modal-header,
.modal-footer { border-color: var(--color-border-soft); }
.modal-title { font-size: 15px; }
