/* CapitalX — Unified Dark Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --cx-bg:           #080b12;
  --cx-bg-2:         #0d1117;
  --cx-card:         #111520;
  --cx-card-border:  #1e2538;
  --cx-card-hover:   #161c2d;
  --cx-blue:         #2563eb;
  --cx-blue-light:   #3b82f6;
  --cx-blue-hover:   #1d4ed8;
  --cx-green:        #10b981;
  --cx-green-dim:    rgba(16,185,129,.15);
  --cx-blue-dim:     rgba(37,99,235,.15);
  --cx-red:          #ef4444;
  --cx-yellow:       #f59e0b;
  --cx-text:         #f1f5f9;
  --cx-text-2:       #cbd5e1;
  --cx-muted:        #8b9cb3;
  --cx-border:       #1e2538;
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  20px;
  --r-full:9999px;
  --t: 150ms cubic-bezier(.4,0,.2,1);
}

/* ── RESET / BASE ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
img  { max-width: 100%; height: auto; display: block; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--cx-bg);
  color: var(--cx-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* ── TYPOGRAPHY ── */
h1,h2,h3,h4,h5,h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--cx-text);
  margin-bottom: .75rem;
  overflow-wrap: break-word;
  word-break: break-word;
}
h1 { font-size: clamp(1.75rem,5vw,2.5rem); font-weight: 800; letter-spacing: -.025em; }
h2 { font-size: clamp(1.375rem,3vw,1.875rem); letter-spacing: -.02em; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: .875rem; }
p  { color: var(--cx-text-2); margin-bottom: 1rem; }
a  { color: var(--cx-blue-light); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--cx-text); }

/* ── LAYOUT ── */
.container, .container-fluid {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
main { flex: 1; padding: 1.5rem 0; }

/* ── NAVBAR (Bootstrap override) ── */
.navbar {
  background: var(--cx-bg-2) !important;
  border-bottom: 1px solid var(--cx-card-border) !important;
  padding: .75rem 1.25rem !important;
}
.navbar-brand {
  display: flex !important;
  align-items: center !important;
  gap: .625rem !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  color: var(--cx-text) !important;
}
.navbar-brand:hover { color: #fff !important; }
.cx-logo-box {
  width: 38px; height: 38px;
  background: var(--cx-blue);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 900; color: #fff;
  flex-shrink: 0;
}
.navbar-nav .nav-link {
  color: var(--cx-muted) !important;
  font-size: .875rem;
  font-weight: 500;
  padding: .5rem .875rem !important;
  border-radius: var(--r-full);
  transition: all var(--t);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--cx-text) !important;
  background: var(--cx-card) !important;
}
.navbar-toggler {
  border: 1.5px solid var(--cx-card-border) !important;
  border-radius: var(--r-sm) !important;
  padding: .375rem .5rem !important;
}
.navbar-toggler:focus { box-shadow: 0 0 0 2px var(--cx-blue) !important; outline: none !important; }
.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%238b9cb3' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}
.navbar-collapse {
  background: var(--cx-bg-2);
}
@media (max-width: 991px) {
  .navbar-collapse {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cx-bg-2);
    border-bottom: 1px solid var(--cx-card-border);
    padding: 1rem;
    z-index: 999;
  }
  .navbar { position: relative; }
  .navbar-nav .nav-link { border-radius: var(--r-md) !important; }
}

/* Dropdown */
.dropdown-menu {
  background: var(--cx-card) !important;
  border: 1px solid var(--cx-card-border) !important;
  border-radius: var(--r-lg) !important;
  padding: .5rem !important;
  min-width: 180px;
}
.dropdown-item {
  color: var(--cx-text-2) !important;
  border-radius: var(--r-sm) !important;
  font-size: .875rem;
  padding: .5rem .875rem !important;
  transition: all var(--t);
}
.dropdown-item:hover, .dropdown-item:focus {
  background: var(--cx-card-hover) !important;
  color: var(--cx-text) !important;
}
.dropdown-divider { border-color: var(--cx-card-border) !important; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: .375rem !important;
  font-weight: 600 !important;
  font-size: .875rem !important;
  border-radius: 100px !important;
  padding: .625rem 1.5rem !important;
  transition: all var(--t) !important;
  cursor: pointer !important;
  line-height: 1.4 !important;
  white-space: nowrap !important;
  letter-spacing: .01em !important;
  overflow: hidden !important;
  position: relative !important;
}
/* Primary */
.btn-primary {
  background: var(--cx-blue) !important;
  border-color: var(--cx-blue) !important;
  color: #fff !important;
}
.btn-primary:hover:not(:disabled) {
  background: var(--cx-blue-hover) !important;
  border-color: var(--cx-blue-hover) !important;
  color: #fff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(37,99,235,.3) !important;
}
.btn-primary:active:not(:disabled) {
  transform: translateY(0) !important;
  background: var(--cx-blue) !important;
}
.btn-primary:focus { box-shadow: 0 0 0 3px rgba(37,99,235,.3) !important; }

/* Secondary */
.btn-secondary {
  background: var(--cx-card) !important;
  border-color: var(--cx-card-border) !important;
  color: var(--cx-text) !important;
}
.btn-secondary:hover:not(:disabled) {
  background: var(--cx-card-hover) !important;
  border-color: #2d3a50 !important;
  color: #fff !important;
}

/* Outline primary */
.btn-outline-primary {
  background: transparent !important;
  border-color: var(--cx-blue) !important;
  color: var(--cx-blue-light) !important;
}
.btn-outline-primary:hover:not(:disabled) {
  background: var(--cx-blue) !important;
  color: #fff !important;
}

/* Outline light / secondary */
.btn-outline-light, .btn-outline-secondary {
  background: transparent !important;
  border-color: var(--cx-card-border) !important;
  color: var(--cx-text-2) !important;
}
.btn-outline-light:hover, .btn-outline-secondary:hover {
  background: var(--cx-card) !important;
  color: #fff !important;
  border-color: #2d3a50 !important;
}

/* Success / Danger / Warning */
.btn-success  { background: var(--cx-green) !important; border-color: var(--cx-green) !important; color: #fff !important; }
.btn-success:hover:not(:disabled)  { background: #059669 !important; border-color: #059669 !important; color: #fff !important; }
.btn-danger   { background: var(--cx-red) !important; border-color: var(--cx-red) !important; color: #fff !important; }
.btn-danger:hover:not(:disabled)   { background: #dc2626 !important; border-color: #dc2626 !important; color: #fff !important; }
.btn-warning  { background: var(--cx-yellow) !important; border-color: var(--cx-yellow) !important; color: #fff !important; }
.btn-warning:hover:not(:disabled)  { background: #d97706 !important; border-color: #d97706 !important; color: #fff !important; }
.btn-info     { background: #0ea5e9 !important; border-color: #0ea5e9 !important; color: #fff !important; }

/* Sizes */
.btn-lg { padding: .75rem 1.75rem !important; font-size: 1rem !important; border-radius: var(--r-lg) !important; }
.btn-sm { padding: .375rem .875rem !important; font-size: .8125rem !important; }
.btn:disabled { opacity: .55 !important; cursor: not-allowed !important; transform: none !important; }
.btn-link { background: none !important; border: none !important; color: var(--cx-blue-light) !important; padding: 0 !important; }
.btn-link:hover { color: var(--cx-text) !important; }

/* ── CARDS ── */
.card {
  background: var(--cx-card) !important;
  border: none !important;
  border-radius: var(--r-xl) !important;
  color: var(--cx-text) !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.3) !important;
}
.card:hover {
  box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 6px 16px rgba(0,0,0,.35) !important;
  transform: translateY(-1px);
  transition: all var(--t);
}
.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--cx-card-border) !important;
  color: var(--cx-text) !important;
  font-weight: 600;
  padding: 1rem 1.25rem !important;
}
.card-body { color: var(--cx-text-2); }
.card-footer {
  background: transparent !important;
  border-top: 1px solid var(--cx-card-border) !important;
}
.card-title { color: var(--cx-text) !important; font-weight: 700; }
.card-text  { color: var(--cx-muted) !important; }

/* ── FORMS ── */
.form-control, .form-select {
  background: var(--cx-bg-2) !important;
  border: 1px solid var(--cx-card-border) !important;
  border-radius: var(--r-md) !important;
  color: var(--cx-text) !important;
  font-size: .9375rem !important;
  padding: .625rem .875rem !important;
  transition: border-color var(--t), box-shadow var(--t) !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--cx-blue) !important;
  box-shadow: 0 0 0 3px rgba(37,99,235,.2) !important;
  background: #0a0f1a !important;
  color: #fff !important;
  outline: none !important;
}
.form-control::placeholder { color: var(--cx-muted) !important; }
.form-control:disabled, .form-select:disabled {
  background: var(--cx-card) !important;
  color: var(--cx-muted) !important;
  opacity: .7 !important;
}
.form-label {
  color: var(--cx-text-2) !important;
  font-size: .875rem !important;
  font-weight: 500 !important;
  margin-bottom: .375rem !important;
}
.form-text { color: var(--cx-muted) !important; font-size: .8125rem !important; }
.form-select {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%238b9cb3' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right .75rem center !important;
  background-size: 1.25em !important;
  padding-right: 2.25rem !important;
  appearance: none !important;
}
.form-check-input {
  background-color: var(--cx-bg-2) !important;
  border-color: var(--cx-card-border) !important;
}
.form-check-input:checked {
  background-color: var(--cx-blue) !important;
  border-color: var(--cx-blue) !important;
}
.form-check-label { color: var(--cx-text-2) !important; font-size: .9rem; }
.input-group-text {
  background: var(--cx-card) !important;
  border-color: var(--cx-card-border) !important;
  color: var(--cx-muted) !important;
}
.invalid-feedback { color: var(--cx-red) !important; font-size: .8125rem; }
.valid-feedback   { color: var(--cx-green) !important; font-size: .8125rem; }
.form-control.is-invalid { border-color: var(--cx-red) !important; }
.form-control.is-valid   { border-color: var(--cx-green) !important; }

/* ── ALERTS ── */
.alert {
  border-radius: var(--r-lg) !important;
  border-width: 1px !important;
  font-size: .9rem;
  padding: .875rem 1.125rem !important;
  color: var(--cx-text) !important;
}
.alert-success  { background: rgba(16,185,129,.1) !important; border-color: rgba(16,185,129,.25) !important; }
.alert-danger, .alert-error   { background: rgba(239,68,68,.1)  !important; border-color: rgba(239,68,68,.25)  !important; }
.alert-warning  { background: rgba(245,158,11,.1) !important; border-color: rgba(245,158,11,.25) !important; }
.alert-info     { background: rgba(14,165,233,.1) !important; border-color: rgba(14,165,233,.25) !important; }
.alert-primary  { background: rgba(37,99,235,.1)  !important; border-color: rgba(37,99,235,.25)  !important; }
.alert-secondary{ background: var(--cx-card) !important; border-color: var(--cx-card-border) !important; }
.btn-close { filter: invert(1) opacity(.5) !important; }
.btn-close:hover { filter: invert(1) opacity(.9) !important; }

/* ── BADGES ── */
.badge {
  font-weight: 600 !important;
  font-size: .75rem !important;
  padding: .3em .65em !important;
  border-radius: var(--r-sm) !important;
  letter-spacing: .01em !important;
}
.bg-primary   { background: var(--cx-blue)  !important; color: #fff !important; }
.bg-success   { background: var(--cx-green) !important; color: #fff !important; }
.bg-danger    { background: var(--cx-red)   !important; color: #fff !important; }
.bg-warning   { background: var(--cx-yellow)!important; color: #fff !important; }
.bg-info      { background: #0ea5e9 !important; color: #fff !important; }
.bg-secondary { background: var(--cx-card-border) !important; color: var(--cx-text-2) !important; }
.bg-dark      { background: var(--cx-card)  !important; color: var(--cx-text) !important; }

/* ── TABLES ── */
.table {
  color: var(--cx-text-2) !important;
  border-color: var(--cx-card-border) !important;
  margin-bottom: 0;
}
.table th {
  background: var(--cx-card) !important;
  color: var(--cx-muted) !important;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-color: var(--cx-card-border) !important;
  padding: .875rem 1rem !important;
}
.table td {
  border-color: var(--cx-card-border) !important;
  padding: .875rem 1rem !important;
  vertical-align: middle;
  color: var(--cx-text-2) !important;
}
.table tbody tr:hover td { background: rgba(255,255,255,.03) !important; }
.table-striped > tbody > tr:nth-of-type(odd) > * { background: rgba(255,255,255,.02) !important; color: var(--cx-text-2) !important; }
.table-bordered { border-color: var(--cx-card-border) !important; }
.table-responsive { border-radius: var(--r-lg); border: 1px solid var(--cx-card-border); }

/* ── LIST GROUPS ── */
.list-group-item {
  background: var(--cx-card) !important;
  border-color: var(--cx-card-border) !important;
  color: var(--cx-text-2) !important;
  padding: .875rem 1.125rem !important;
}
.list-group-item:hover { background: var(--cx-card-hover) !important; }
.list-group-item.active {
  background: var(--cx-blue) !important;
  border-color: var(--cx-blue) !important;
  color: #fff !important;
}

/* ── MODALS ── */
.modal-content {
  background: var(--cx-card) !important;
  border: 1px solid var(--cx-card-border) !important;
  border-radius: var(--r-xl) !important;
  color: var(--cx-text) !important;
}
.modal-header {
  border-bottom: 1px solid var(--cx-card-border) !important;
  padding: 1.25rem 1.5rem !important;
}
.modal-footer {
  border-top: 1px solid var(--cx-card-border) !important;
  padding: 1rem 1.5rem !important;
}
.modal-title { color: var(--cx-text) !important; font-weight: 700; }
.modal-backdrop { background: rgba(0,0,0,.7) !important; }

/* ── PAGINATION ── */
.pagination .page-link {
  background: var(--cx-card) !important;
  border-color: var(--cx-card-border) !important;
  color: var(--cx-text-2) !important;
  border-radius: var(--r-sm) !important;
  margin: 0 2px;
}
.pagination .page-link:hover { background: var(--cx-card-hover) !important; color: var(--cx-text) !important; }
.pagination .page-item.active .page-link { background: var(--cx-blue) !important; border-color: var(--cx-blue) !important; color: #fff !important; }

/* ── TABS ── */
.nav-tabs {
  border-bottom: 1px solid var(--cx-card-border) !important;
}
.nav-tabs .nav-link {
  color: var(--cx-muted) !important;
  border: none !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  font-weight: 500;
  font-size: .9rem;
  padding: .625rem 1rem !important;
  background: transparent !important;
}
.nav-tabs .nav-link:hover { color: var(--cx-text) !important; border-bottom-color: var(--cx-card-border) !important; }
.nav-tabs .nav-link.active {
  color: var(--cx-text) !important;
  border-bottom-color: var(--cx-blue) !important;
  background: transparent !important;
  font-weight: 600;
}
.nav-pills .nav-link {
  color: var(--cx-muted) !important;
  border-radius: var(--r-md) !important;
  font-size: .875rem;
}
.nav-pills .nav-link.active {
  background: var(--cx-blue) !important;
  color: #fff !important;
}

/* ── PROGRESS ── */
.progress {
  background: var(--cx-card-border) !important;
  border-radius: var(--r-full) !important;
  height: 8px;
}
.progress-bar {
  background: var(--cx-blue) !important;
  border-radius: var(--r-full) !important;
}
.progress-bar.bg-success { background: var(--cx-green) !important; }

/* ── TOOLTIP / POPOVER ── */
.tooltip-inner {
  background: var(--cx-card) !important;
  border: 1px solid var(--cx-card-border);
  color: var(--cx-text) !important;
  border-radius: var(--r-sm) !important;
  font-size: .8125rem;
}

/* ── ACCORDION ── */
.accordion-item {
  background: var(--cx-card) !important;
  border: 1px solid var(--cx-card-border) !important;
  border-radius: var(--r-lg) !important;
  margin-bottom: .5rem;
  overflow: hidden;
}
.accordion-button {
  background: var(--cx-card) !important;
  color: var(--cx-text) !important;
  font-weight: 600;
  border-radius: var(--r-lg) !important;
}
.accordion-button:not(.collapsed) {
  background: var(--cx-card-hover) !important;
  color: var(--cx-blue-light) !important;
  box-shadow: none !important;
}
.accordion-button::after {
  filter: invert(1) !important;
}
.accordion-body {
  background: var(--cx-card) !important;
  color: var(--cx-text-2) !important;
  border-top: 1px solid var(--cx-card-border) !important;
}

/* ── FOOTER ── */
.footer, footer {
  background: var(--cx-bg-2) !important;
  border-top: 1px solid var(--cx-card-border) !important;
  color: var(--cx-muted) !important;
  padding: 1.5rem 0 !important;
  margin-top: auto !important;
}
.footer a, footer a {
  color: var(--cx-muted) !important;
  font-size: .875rem;
  transition: color var(--t);
}
.footer a:hover, footer a:hover { color: var(--cx-text) !important; }

/* ── UTILITY OVERRIDES ── */
.text-muted  { color: var(--cx-muted)  !important; }
.text-white  { color: #fff !important; }
.text-primary { color: var(--cx-blue-light) !important; }
.text-success { color: var(--cx-green) !important; }
.text-danger  { color: var(--cx-red)   !important; }
.text-warning { color: var(--cx-yellow)!important; }
.text-info    { color: #0ea5e9 !important; }
.text-secondary { color: var(--cx-text-2) !important; }

.bg-transparent { background: transparent !important; }
.border         { border-color: var(--cx-card-border) !important; }
.border-top     { border-top-color: var(--cx-card-border) !important; }
.border-bottom  { border-bottom-color: var(--cx-card-border) !important; }
.hr, hr         { border-color: var(--cx-card-border) !important; opacity: 1 !important; }

/* ── SECTION HELPERS ── */
.cx-page-header {
  padding: 2rem 0 1.5rem;
  border-bottom: 1px solid var(--cx-card-border);
  margin-bottom: 2rem;
}
.cx-page-header h1 { margin-bottom: .25rem; }
.cx-page-header p  { color: var(--cx-muted); margin: 0; }

.cx-card {
  background: var(--cx-card);
  border: none;
  border-radius: var(--r-xl);
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.3);
  transition: box-shadow var(--t), transform var(--t);
}
.cx-card:hover {
  box-shadow: 0 2px 4px rgba(0,0,0,.4), 0 6px 16px rgba(0,0,0,.35);
  transform: translateY(-1px);
}

.cx-stat {
  display: flex; align-items: center; gap: 1rem;
  background: var(--cx-card);
  border: 1px solid var(--cx-card-border);
  border-radius: var(--r-lg);
  padding: 1.25rem;
}
.cx-stat-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem;
}
.cx-stat-icon.blue  { background: var(--cx-blue-dim); color: var(--cx-blue-light); }
.cx-stat-icon.green { background: var(--cx-green-dim); color: var(--cx-green); }
.cx-stat-icon.red   { background: rgba(239,68,68,.15); color: var(--cx-red); }
.cx-stat-icon.yellow{ background: rgba(245,158,11,.15); color: var(--cx-yellow); }
.cx-stat-label { font-size: .8125rem; color: var(--cx-muted); margin-bottom: .125rem; }
.cx-stat-value { font-size: 1.375rem; font-weight: 800; color: var(--cx-text); line-height: 1; }
.cx-stat-sub   { font-size: .75rem; color: var(--cx-green); margin-top: .25rem; }

/* ── SPINNERS ── */
.spinner-border { color: var(--cx-blue-light) !important; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--cx-bg); }
::-webkit-scrollbar-thumb { background: var(--cx-card-border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #2d3a50; }

/* ── MOBILE TOUCH TARGETS ── */
@media (max-width: 768px) {
  .btn { min-height: 42px; }
  .form-control, .form-select { font-size: 16px !important; }
  /* Prevent navbar user-button from overflowing */
  .navbar .btn.dropdown-toggle { max-width: 160px; overflow: hidden; text-overflow: ellipsis; }
}
/* Global horizontal overflow guard */
html { overflow-x: hidden; }

/* ── ACCESSIBILITY ── */
:focus-visible { outline: 2px solid var(--cx-blue); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ── MATERIAL / FLUTTER STYLES ── */

/* Ripple effect */
.mat-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  transform: scale(0);
  animation: mat-ripple-anim 600ms linear;
  pointer-events: none;
}
@keyframes mat-ripple-anim {
  to { transform: scale(4); opacity: 0; }
}

/* btn-lg stays pill */
.btn-lg { border-radius: 100px !important; }
.btn-sm { border-radius: 100px !important; }

/* Modal cards */
.modal-content {
  border: none !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.6) !important;
}

/* Stat cards — elevation */
.cx-stat {
  border: none !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 2px 6px rgba(0,0,0,.3);
  border-radius: var(--r-xl) !important;
}

/* ── MATERIAL BOTTOM NAV (mobile only) ── */
.mat-bottom-nav {
  display: none;
}
@media (max-width: 991px) {
  .mat-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: var(--cx-bg-2);
    border-top: 1px solid var(--cx-card-border);
    align-items: stretch;
    justify-content: space-around;
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom);
  }
  main { padding-bottom: 80px !important; }
  .floating-telegram-btn { bottom: 80px !important; }
}
.mat-bottom-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 3px;
  color: var(--cx-muted);
  font-size: .6875rem;
  font-weight: 500;
  text-decoration: none;
  padding: 6px 4px;
  position: relative;
  transition: color var(--t);
  overflow: hidden;
}
.mat-bottom-nav__item i {
  font-size: 1.375rem;
  transition: transform var(--t);
  position: relative;
  z-index: 1;
}
.mat-bottom-nav__item span {
  position: relative;
  z-index: 1;
}
/* Active indicator pill behind icon */
.mat-bottom-nav__item::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 56px;
  height: 32px;
  background: rgba(37,99,235,.15);
  border-radius: 16px;
  transition: transform var(--t);
}
.mat-bottom-nav__item.active {
  color: var(--cx-blue-light);
}
.mat-bottom-nav__item.active::before {
  transform: translateX(-50%) scaleX(1);
}
.mat-bottom-nav__item.active i {
  transform: scale(1.1);
}
