:root {
  --navy: #143846;
  --blue: #e11d74;
  --teal: #1f5f73;
  --red: #d91d26;
  --bg: #eef3f5;
  --text: #172338;
  --muted: #64748b;
  --line: #dde5ea;
  --ok: #1f9d67;
  --warn: #c98a1a;
  --danger: #d91d26;
  --sidebar: 248px;
  --header: 64px;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 35, 52, .04);
  --shadow-md: 0 10px 28px rgba(15, 35, 52, .06);
  --bs-primary: #e11d74;
  --bs-primary-rgb: 225, 29, 116;
  --bs-link-color: #1f5f73;
  --bs-link-hover-color: #e11d74;
  --font-display: "Manrope", "Segoe UI", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body,
.admin-body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: #1f5f73; text-decoration: none; }
a:hover { color: var(--blue); text-decoration: none; }
button, .btn {
  border-radius: 11px;
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -.01em;
}
.btn-primary {
  --bs-btn-bg: var(--blue);
  --bs-btn-border-color: color-mix(in srgb, var(--blue) 92%, #000);
  --bs-btn-hover-bg: color-mix(in srgb, var(--blue) 88%, #000);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--blue) 82%, #000);
  --bs-btn-active-bg: color-mix(in srgb, var(--blue) 80%, #000);
  --bs-btn-active-border-color: color-mix(in srgb, var(--blue) 78%, #000);
  --bs-btn-disabled-bg: var(--blue);
  --bs-btn-disabled-border-color: var(--blue);
  --bs-btn-color: #fff;
  --bs-btn-hover-color: #fff;
  --bs-btn-active-color: #fff;
  box-shadow: 0 8px 18px color-mix(in srgb, var(--blue) 22%, transparent);
}
.btn-outline-primary {
  --bs-btn-color: var(--blue);
  --bs-btn-border-color: color-mix(in srgb, var(--blue) 55%, #fff);
  --bs-btn-hover-bg: var(--blue);
  --bs-btn-hover-border-color: var(--blue);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: color-mix(in srgb, var(--blue) 88%, #000);
  --bs-btn-active-border-color: color-mix(in srgb, var(--blue) 88%, #000);
  --bs-btn-active-color: #fff;
}
.form-control,
.form-select {
  border-radius: 11px;
  border-color: #d5dee5;
  font-family: var(--font-body);
}
.form-control:focus, .form-select:focus {
  border-color: color-mix(in srgb, var(--teal) 55%, #fff);
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--teal) 16%, transparent);
}
.page-link { color: #1f5f73; }
.page-item.active .page-link {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

/* ---------- Admin shell ---------- */
.app-shell { min-height: 100vh; }
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 29;
  background: rgba(10, 24, 32, .42);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.sidebar-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--navy) 92%, #fff) 0%, var(--navy) 38%, color-mix(in srgb, var(--navy) 88%, #000) 100%);
  color: #fff;
  display: flex;
  flex-direction: column;
  z-index: 30;
  overflow: hidden;
  height: 100vh;
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: 8px 0 28px rgba(8, 22, 30, .12);
  transition: width .22s ease, transform .22s ease;
}
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  width: 100%;
  padding: 18px 16px 14px;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.brand img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  background: transparent;
}
.brand .logo-mark { display: none; width: 36px; height: 36px; object-fit: contain; }
.side-nav {
  padding: 14px 12px 20px;
  overflow: auto;
  flex: 1 1 auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.2) transparent;
}
.side-label {
  margin: 16px 10px 8px;
  color: rgba(231, 242, 246, .55);
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
}
.side-label:first-child { margin-top: 4px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255,255,255,.82);
  padding: 10px 12px;
  min-height: 42px;
  border-radius: 12px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: .92rem;
  font-weight: 600;
  letter-spacing: -.01em;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.side-nav a i {
  width: 1.15rem;
  text-align: center;
  font-size: 1.05rem;
  opacity: .88;
}
.side-nav a:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
}
.side-nav a.active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--blue) 92%, #fff), color-mix(in srgb, var(--blue) 72%, #7a1048));
  color: #fff;
  box-shadow: 0 10px 22px color-mix(in srgb, var(--blue) 28%, transparent);
}
.side-nav a.active i { opacity: 1; }
.main {
  margin-left: var(--sidebar);
  min-height: 100vh;
  transition: margin-left .22s ease;
}
.topbar {
  position: sticky;
  top: 0;
  min-height: var(--header);
  background: color-mix(in srgb, var(--theme-topbar-bg, #fff) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(221, 229, 234, .9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  z-index: 20;
}
.crumbs { color: var(--muted); font-size: 13px; }
.content {
  padding: 24px 28px 56px;
  background:
    radial-gradient(980px 420px at 100% -8%, color-mix(in srgb, var(--blue) 8%, transparent), transparent 58%),
    radial-gradient(820px 360px at -4% 0%, color-mix(in srgb, var(--teal) 10%, transparent), transparent 52%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 88%, #fff), var(--bg));
}
.alert {
  border: 0;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.alert-soft {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  font-weight: 500;
}
.alert-soft i { margin-top: 1px; }
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.panel:has(.panel-header),
.panel:has(.panel-body),
.panel:has(.panel-section) {
  padding: 0;
}
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #f7fbfd 100%);
}
.panel-header h1,
.panel-header h2,
.panel-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.015em;
  color: #172338;
}
.panel-header .muted,
.panel-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 400;
  line-height: 1.45;
  max-width: 62ch;
}
.panel-body { padding: 18px 20px; }
.panel-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fafcfd 0%, #f5f8fa 100%);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.panel-footer .btn { min-height: 40px; padding-inline: 16px; }
.panel-section {
  padding: 20px;
  border-top: 1px solid var(--line);
}
.panel-section:first-of-type { border-top: 0; }
.panel-section-lead {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
  max-width: 68ch;
}
.panel-tabs {
  padding: 0 12px;
  gap: 0;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fbfcfd 0%, #f4f7f9 100%);
  flex-wrap: nowrap;
  overflow-x: auto;
}
.panel-tabs .nav-link {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
  padding: 13px 14px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.panel-tabs .nav-link i {
  font-size: .95rem;
  opacity: .8;
}
.panel-tabs .nav-link:hover {
  color: #172338;
  border-color: transparent;
}
.panel-tabs .nav-link.active {
  color: #f30572;
  background: transparent;
  border-bottom-color: #f30572;
}
.panel-tabs .nav-link.active i { opacity: 1; }
.panel .tab-content > .tab-pane > .panel-section {
  border-top: 0;
}
.panel-form .form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
  letter-spacing: .01em;
}
.panel-form .form-control,
.panel-form .form-select {
  min-height: 42px;
  border-radius: 10px;
  border-color: #d7e0e6;
  background: #fcfdfe;
  padding: .55rem .85rem;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.panel-form textarea.form-control {
  min-height: 120px;
  padding-top: .7rem;
}
.panel-form .form-control:hover,
.panel-form .form-select:hover {
  border-color: #b9c9d2;
  background: #fff;
}
.panel-form .form-control:focus,
.panel-form .form-select:focus {
  background: #fff;
}
.panel-form .form-text {
  color: #7b8898;
  font-size: 12px;
}
.panel-form .form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  margin: 0 0 8px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}
.panel-form .form-check:last-child { margin-bottom: 0; }
.panel-form .form-check-input {
  margin-top: .2rem;
  flex: 0 0 auto;
}
.panel-form .form-check-label,
.panel-form .form-check {
  font-size: 13px;
  color: #334155;
  line-height: 1.45;
}
.field-stack { display: grid; gap: 6px; }
.field-hint {
  margin: 0;
  color: #7b8898;
  font-size: 12px;
  line-height: 1.4;
}
.modal-content {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(20, 38, 61, .16);
}
.modal-header,
.modal-footer {
  border-color: var(--line);
}
.modal-title { font-weight: 700; color: #172338; }
.panel-section-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #64748b;
}
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { padding: 16px 18px !important; }
.kpi strong { display: block; font-size: 22px; line-height: 1.15; letter-spacing: -.02em; }
.kpi span { color: var(--muted); font-size: 12px; }
/* Admin data tables — content-driven widths, full-bleed in panel */
.table-responsive {
  width: 100%;
  margin: 0;
  border-radius: 0;
}
table.data {
  width: 100%;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
  margin: 0;
}
table.data th,
table.data td {
  padding: .7rem .9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  min-width: 0;
}
table.data thead th {
  color: #64748b;
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #f3f7f9;
  border-bottom: 1px solid #d7e2e8;
  white-space: nowrap;
}
table.data.table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-bg-type: #f8fafc; }
table.data tbody tr:hover > * { --bs-table-bg-state: #f1f7fa; background-color: #f1f7fa; }
table.data tbody tr:last-child td { border-bottom: 0; }

/* When Bootstrap border helpers are present, keep a clear grid */
table.data.table-bordered {
  border: 1px solid #d7e2e8;
}
table.data.table-bordered th,
table.data.table-bordered td {
  border: 1px solid #e4ebef;
}
table.data.table-bordered thead th {
  border-bottom-color: #d7e2e8;
  background: #eef4f7;
}

/* Column sizing helpers */
table.data .col-grow,
table.data .col-primary {
  width: 100%;
  min-width: 10rem;
}
table.data .col-fit,
table.data .col-status,
table.data .col-type,
table.data .col-channel {
  width: 1%;
  white-space: nowrap;
}
table.data .col-code {
  width: 1%;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
table.data .col-num,
table.data th.col-num,
table.data td.col-num {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
table.data .col-date {
  width: 1%;
  white-space: nowrap;
}
table.data .col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  padding-inline: .55rem .75rem;
}
table.data .col-actions.text-center { text-align: center; }

.cell-clip {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cell-stack {
  display: grid;
  gap: .15rem;
  min-width: 0;
}
.cell-stack .cell-clip { max-width: min(36rem, 55vw); }

.table-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: nowrap;
}
.table-actions form { margin: 0; display: inline-flex; }
.btn-icon-action {
  width: 36px;
  height: 36px;
  min-width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  line-height: 1;
}
.btn-icon-action i { font-size: 1rem; }

@media (max-width: 575.98px) {
  table.data th,
  table.data td { padding: .65rem .7rem; }
  table.data .col-actions { padding-inline: .4rem .55rem; }
  .btn-icon-action {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }
  .cell-stack .cell-clip { max-width: 70vw; }
}
.form-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  align-items: center;
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(20, 38, 61, .04);
  position: relative;
  z-index: 5;
}
.filter-bar .form-label { display: none; }
.filter-bar > div {
  min-width: 0;
  flex: 1 1 100%;
}
.filter-bar .form-control,
.filter-bar .form-select,
.filter-bar .btn {
  min-height: 42px;
  border-radius: 10px;
}
.filter-bar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #d7e0e6;
  border-radius: 10px;
  background: #fcfdfe;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.filter-bar-search > i {
  color: #6b7590;
  flex-shrink: 0;
  font-size: .95rem;
}
.filter-bar-search .form-control {
  border: 0;
  background: transparent;
  box-shadow: none;
  min-height: 0;
  padding: 8px 0;
}
.filter-bar-search .form-control:focus {
  box-shadow: none;
  background: transparent;
}
.filter-bar-search:focus-within {
  border-color: rgba(61, 120, 143, .55);
  background: #fff;
  box-shadow: 0 0 0 .2rem rgba(61, 120, 143, .16);
}
.filter-bar-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1 1 100%;
}
.filter-bar-actions .btn {
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding-inline: 14px;
}
.filter-bar-actions .btn i { font-size: .95rem; }
@media (min-width: 576px) {
  .filter-bar > div { flex: 0 1 160px; max-width: 220px; }
  .filter-bar > div:has(> .filter-bar-search),
  .filter-bar > div:has(> input[name="q"]) {
    flex: 1 1 260px;
    max-width: none;
    min-width: 220px;
  }
  .filter-bar > div:has(input[type="date"]) {
    flex: 0 1 148px;
    max-width: 168px;
  }
  .filter-bar-actions,
  .filter-bar > div:has(> .btn),
  .filter-bar > div:has(> a.btn) {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }
}
@media (min-width: 992px) {
  .filter-bar > div { flex: 0 1 180px; max-width: 240px; }
  .filter-bar > div:has(> .filter-bar-search),
  .filter-bar > div:has(> input[name="q"]) {
    flex: 1 1 300px;
    min-width: 260px;
  }
}
.tinymce-toolbar-host {
  min-height: 42px;
  margin-bottom: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc;
  overflow: hidden;
}
.tinymce-toolbar-host .tox-tinymce-inline,
.tinymce-toolbar-host .tox-editor-header {
  border: 0 !important;
  box-shadow: none !important;
  width: 100% !important;
}
.tinymce-inline {
  min-height: 280px;
  padding: 14px 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #172338;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  outline: none;
}
.tinymce-inline:empty:before {
  content: "Click to write the email body…";
  color: #94a3b8;
}
.tinymce-inline:focus,
.tinymce-inline.mce-edit-focus {
  border-color: #3d788f;
  border-style: solid;
  box-shadow: 0 0 0 .2rem rgba(61, 120, 143, .18);
}
.badge-soft { display: inline-block; padding: 2px 8px; border-radius: 999px; background: #e5f1f4; color: #1f4e5c; font-size: 12px; }
.badge-ok { background: #e7f6f1; color: var(--ok); }
.badge-warn { background: #fff6e5; color: #8a5a00; }
.badge-danger { background: #fdecec; color: var(--danger); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters .form-control, .filters .form-select { max-width: 220px; }
.panel-body > .filter-bar,
.panel-section > .filter-bar {
  margin-bottom: 0;
  box-shadow: none;
  border-color: #e4ebef;
  background: #f8fafc;
}
.inline-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 14px;
}
.inline-toolbar .form-control,
.inline-toolbar .form-select,
.inline-toolbar .btn {
  min-height: 42px;
  border-radius: 10px;
}
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: #3e778f; }
.login-stack { width: min(420px, 100%); }
.login-logo { display: block; width: min(340px, 100%); margin: 0 auto 18px; background: #fff; border-radius: 8px; }
.login-card { width: 100%; background: #fff; border: 0; border-radius: 10px; border-top: 4px solid #f30572; padding: 22px 22px 20px; color: #222; box-shadow: 0 16px 36px rgba(16, 42, 54, .22); }
.login-card h1 { color: #d91d26; font-size: 22px; font-weight: 700; letter-spacing: 0; margin: 0 0 4px; }
.login-card .muted { color: #555; }
.login-field { position: relative; }
.login-field i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #3d788f; pointer-events: none; }
.login-field .form-control { padding-left: 34px; min-height: 42px; }
.login-field .form-control[type="password"], .login-field .form-control[type="text"]#password { padding-right: 58px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: #1f4e5c; font-size: 12px; font-weight: 600; padding: 4px 6px; }
.field-error { color: #d91d26; font-size: 12px; margin-top: 4px; }
.muted { color: var(--muted); }
.collapsed .sidebar { width: 84px; }
.collapsed .main { margin-left: 84px; }
.collapsed .side-label,
.collapsed .nav-text,
.collapsed .brand-text,
.collapsed .logo-full,
.collapsed .sidebar-user-meta { display: none; }
.collapsed .logo-mark { display: block; }
.collapsed .brand { padding: 16px 12px 12px; }
.collapsed .brand-mark { padding: 10px; }
.collapsed .side-nav a { justify-content: center; padding-inline: 0; }
.collapsed .side-nav a i { margin: 0; font-size: 1.15rem; }
.collapsed .sidebar-user { justify-content: center; padding-inline: 12px; }

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding: 14px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.18);
}
.sidebar-user .name {
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: -.01em;
}
.sidebar-user .role {
  font-size: .72rem;
  opacity: .72;
  color: #dce9ef;
  font-weight: 500;
}
.avatar {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .78rem;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), color-mix(in srgb, var(--teal) 70%, #0b2a34));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
}

.topbar.bo-topbar {
  min-height: 68px;
  height: auto;
  gap: 10px;
  padding: 10px 22px;
  justify-content: flex-start;
  box-shadow: 0 1px 0 rgba(20, 38, 61, .03);
}
.topbar-title-block { min-width: 0; }
.bo-topbar .page-actions .btn-sm {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 11px;
  padding-inline: 13px;
}
.bo-topbar .btn-icon,
.topbar-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  flex: 0 0 auto;
  border: 1px solid transparent;
  background: #f4f7f9;
  color: #425466;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.bo-topbar .btn-icon:hover,
.topbar-toggle:hover {
  background: #eef3f6;
  color: var(--text);
  border-color: #e1e8ed;
}
.bo-topbar .btn-icon.active,
.bo-topbar .btn-icon[aria-expanded="true"] {
  background: color-mix(in srgb, var(--blue) 10%, #fff);
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 18%, #fff);
}
.bo-topbar .page-heading {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  color: #122033;
}
.bo-topbar .page-subheading {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bo-topbar .page-actions:empty,
.bo-topbar .page-actions:empty + .topbar-divider { display: none !important; }
.bo-topbar .topbar-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
  margin: 0 2px;
}
.bo-topbar .user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .88rem;
  color: #172338;
}
.bo-topbar .user-chip:hover,
.bo-topbar .user-chip[aria-expanded="true"] {
  border-color: color-mix(in srgb, var(--teal) 28%, #fff);
  background: #fcfeff;
}
.user-chip-copy {
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  line-height: 1.15;
  min-width: 0;
}
.user-chip-name { font-size: .86rem; }
.user-chip-role {
  font-size: .68rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .02em;
  text-transform: uppercase;
}
.user-chip-caret {
  font-size: .7rem;
  color: #8a97a8;
  margin-left: 2px;
}

.admin-menu {
  min-width: 220px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 8px;
  box-shadow: var(--shadow-md);
  margin-top: 8px !important;
}
.admin-menu .dropdown-header {
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #8a97a8;
}
.admin-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 9px 11px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .9rem;
  color: #243247;
}
.admin-menu .dropdown-item i { width: 1rem; text-align: center; color: #6b7c8f; }
.admin-menu .dropdown-item:hover {
  background: #f4f8fa;
  color: #122033;
}
.admin-menu .dropdown-item.text-danger { color: #c62828; }
.admin-menu .dropdown-item.text-danger i { color: #c62828; }
.admin-menu .dropdown-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px 10px;
}
.admin-menu .dropdown-profile .name {
  font-family: var(--font-display);
  font-weight: 750;
  font-size: .92rem;
  color: #122033;
}
.admin-menu .dropdown-profile .role {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
}

.panel-header h1,
.panel-header h2,
.panel-title {
  font-family: var(--font-display);
  letter-spacing: -.02em;
}
.kpi strong {
  font-family: var(--font-display);
  font-weight: 800;
}

.setting-thumb { height: 28px; width: auto; max-width: 96px; object-fit: contain; border-radius: 4px; background: #f4f6fb; }
.color-swatch { width: 20px; height: 20px; border-radius: 6px; border: 1px solid rgba(0,0,0,.12); flex: 0 0 auto; display: inline-block; }
.auth-body { min-height: 100vh; display: grid; place-items: center; background: #1f5f73; padding: 24px; }
.auth-card { width: min(420px, 100%); }

@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-105%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: none;
    box-shadow: 18px 0 40px rgba(8, 22, 30, .28);
  }
  .main { margin-left: 0; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .content { padding: 16px; }
  .bo-topbar {
    flex-wrap: wrap;
    padding: 10px 14px;
    row-gap: 8px;
  }
  .bo-topbar .page-actions {
    order: 10;
    flex: 1 0 100%;
    justify-content: flex-end;
  }
}
