@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap");

:root {
  --sion-bg: #eef2f8;
  --sion-surface: rgba(255, 255, 255, 0.9);
  --sion-surface-solid: #ffffff;
  --sion-border: rgba(15, 23, 42, 0.09);
  --sion-shadow: 0 26px 60px rgba(15, 23, 42, 0.14);
  --sion-shadow-soft: 0 14px 34px rgba(15, 23, 42, 0.1);
  --sion-primary: #cf2037;
  --sion-primary-dark: #a9152b;
  --sion-secondary: #0f766e;
  --sion-accent: #fb923c;
  --sion-success: #15803d;
  --sion-warning: #c2410c;
  --sion-text: #101828;
  --sion-muted: #667085;
  --sion-heading-font: "Space Grotesk", "Segoe UI", sans-serif;
  --sion-body-font: "Manrope", "Segoe UI", sans-serif;
  --sion-topbar-height: 72px;
}

html {
  scroll-behavior: smooth;
}

body,
button,
input,
select,
textarea {
  font-family: var(--sion-body-font);
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand strong,
.offcanvas-title,
.account-toolbar__title,
.dashboard-hero__title {
  font-family: var(--sion-heading-font);
}

body.app-shell {
  min-height: 100vh;
  color: var(--sion-text);
  background:
    radial-gradient(circle at top left, rgba(207, 32, 55, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(14, 116, 144, 0.12), transparent 32%),
    linear-gradient(180deg, #f8fafc 0%, var(--sion-bg) 100%);
  padding-top: var(--sion-topbar-height);
}

.sion-topbar {
  background:
    linear-gradient(135deg, rgba(139, 24, 44, 0.96), rgba(215, 38, 56, 0.96)),
    linear-gradient(90deg, var(--sion-primary), #ef4b5d) !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  z-index: 1085;
}

.sion-topbar__inner {
  min-height: var(--sion-topbar-height);
  gap: 0.75rem;
}

.sion-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.28rem 0.42rem 0.28rem 0.28rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.sion-brand__mark {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.sion-brand__mark img {
  width: 28px;
  height: 28px;
}

.sion-brand__copy {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.sion-brand__copy strong {
  font-size: 0.88rem;
  letter-spacing: 0.1em;
}

.sion-brand__copy small {
  margin-top: 0.14rem;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  opacity: 0.82;
}

.sion-topbar__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.sion-topbar__profile-menu {
  position: relative;
}

.sion-profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 42px;
  padding: 0.22rem 0.56rem 0.22rem 0.28rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.sion-profile-trigger:hover,
.sion-profile-trigger:focus,
.sion-profile-trigger.show {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
}

.sion-profile-trigger::after {
  margin-left: 0.08rem;
}

.sion-profile-trigger__avatar,
.sion-profile-dropdown__avatar {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-family: var(--sion-heading-font);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  flex: 0 0 auto;
}

.sion-profile-trigger__copy,
.sion-profile-dropdown__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.08;
  min-width: 0;
}

.sion-profile-trigger__copy strong,
.sion-profile-dropdown__copy strong {
  color: #fff;
  font-size: 0.8rem;
  white-space: nowrap;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sion-profile-trigger__copy small,
.sion-profile-dropdown__copy small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.65rem;
}

.sion-profile-dropdown {
  min-width: 280px;
  padding: 0.55rem;
  margin-top: 0.7rem;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.97));
  box-shadow: var(--sion-shadow);
}

.sion-profile-dropdown .dropdown-item {
  border-radius: 14px;
  color: var(--sion-text);
  font-weight: 700;
}

.sion-profile-dropdown .dropdown-item:hover,
.sion-profile-dropdown .dropdown-item:focus {
  background: rgba(207, 32, 55, 0.06);
  color: var(--sion-primary-dark);
}

.sion-profile-dropdown__summary {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.45rem 0.35rem 0.65rem;
  list-style: none;
}

.sion-profile-dropdown__summary .sion-profile-dropdown__avatar {
  background: linear-gradient(135deg, rgba(207,32,55,0.14), rgba(14,116,144,0.16));
  color: var(--sion-text);
}

.sion-profile-dropdown__summary .sion-profile-dropdown__copy strong {
  color: var(--sion-text);
}

.sion-profile-dropdown__summary .sion-profile-dropdown__copy small {
  color: var(--sion-muted);
}

.sion-topbar__toggle {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  padding: 0.42rem 0.55rem;
  background: rgba(255, 255, 255, 0.08);
}

.sion-topbar__toggle:hover,
.sion-topbar__toggle:focus {
  background: rgba(255, 255, 255, 0.14);
}

.sion-offcanvas {
  top: var(--sion-topbar-height) !important;
  height: calc(100vh - var(--sion-topbar-height)) !important;
  z-index: 1070 !important;
}

.offcanvas-backdrop.show {
  top: var(--sion-topbar-height);
  height: calc(100vh - var(--sion-topbar-height));
  z-index: 1060 !important;
}

.navbar-brand img {
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
}

.offcanvas.text-bg-danger {
  background: linear-gradient(180deg, #d72638 0%, #b71f31 100%) !important;
}

.sion-offcanvas {
  width: min(92vw, 420px) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -18px 0 42px rgba(15, 23, 42, 0.28);
}

.sion-offcanvas .offcanvas-header {
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.sion-offcanvas .offcanvas-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.sion-offcanvas__profile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem;
  margin-bottom: 1rem;
  border-radius: 22px;
  background: rgba(15, 23, 42, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sion-offcanvas__avatar {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.1));
  font-family: var(--sion-heading-font);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.sion-offcanvas__profile-copy {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.sion-offcanvas__profile-copy strong {
  font-size: 0.98rem;
  color: #fff;
}

.sion-offcanvas__profile-copy small,
.sion-offcanvas__profile-label {
  color: rgba(255, 255, 255, 0.78);
}

.sion-offcanvas__profile-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

.sion-offcanvas__section {
  list-style: none;
  margin: 0.9rem 0 0.45rem;
  padding: 0 0.4rem;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.sion-offcanvas .offcanvas-body {
  padding: 1rem 1.1rem 1.35rem;
}

.sion-offcanvas .nav-link,
.sion-offcanvas .dropdown-item {
  color: rgba(255, 255, 255, 0.96);
  font-weight: 700;
  border-radius: 18px;
  padding: 0.78rem 0.95rem;
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.sion-offcanvas .nav-link:hover,
.sion-offcanvas .nav-link:focus,
.sion-offcanvas .dropdown-item:hover,
.sion-offcanvas .dropdown-item:focus,
.sion-offcanvas .nav-link.active,
.sion-offcanvas .dropdown-item.active,
.sion-offcanvas .dropdown-toggle.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(2px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.sion-offcanvas .dropdown-menu {
  position: static !important;
  inset: auto !important;
  transform: none !important;
  float: none !important;
  width: 100%;
  margin-top: 0.35rem;
  margin-bottom: 0.7rem;
  padding: 0.45rem;
  background: rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.sion-offcanvas .dropdown-item {
  white-space: normal;
  line-height: 1.2;
}

.sion-offcanvas .dropdown-menu li + li {
  margin-top: 0.3rem;
}

.sion-offcanvas .nav-item.dropdown > .nav-link {
  justify-content: space-between;
}

.sion-offcanvas .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.14);
}

.offcanvas-backdrop.show {
  opacity: 0.38;
}

.offcanvas .dropdown-menu {
  border: 0;
  box-shadow: var(--sion-shadow-soft);
}

.card,
.modal-content,
.dropdown-menu,
.ts-wrapper .ts-control {
  border: 1px solid var(--sion-border);
  box-shadow: var(--sion-shadow-soft);
}

.card {
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
}

.card-header {
  background: transparent;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.card.shadow,
.modal-content.shadow {
  box-shadow: var(--sion-shadow);
}

.dashboard-hero {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 1.5rem;
  background:
    linear-gradient(135deg, rgba(215, 38, 56, 0.98), rgba(184, 28, 52, 0.94)),
    linear-gradient(135deg, #d72638, #b91c1c);
  color: #fff;
  box-shadow: var(--sion-shadow);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  inset: auto -90px -90px auto;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  filter: blur(2px);
}

.dashboard-hero__eyebrow {
  margin: 0 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  opacity: 0.85;
}

.dashboard-hero__title {
  margin: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.1;
  font-weight: 800;
}

.dashboard-hero__subtitle {
  margin: 0.55rem 0 0;
  max-width: 62ch;
  color: rgba(255, 255, 255, 0.9);
}

.dashboard-hero__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.dashboard-meta-card {
  padding: 0.85rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
}

.dashboard-meta-card small {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.78;
}

.dashboard-meta-card strong {
  display: block;
  font-size: 1.2rem;
  margin-top: 0.25rem;
}

.dashboard-kpi {
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.95));
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--sion-shadow-soft);
}

.dashboard-kpi .card-body {
  padding: 1.1rem 1.15rem;
}

.dashboard-kpi__label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--sion-muted);
  font-weight: 700;
}

.dashboard-kpi__value {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
  font-weight: 800;
  color: var(--sion-text);
}

.dashboard-panel {
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: var(--sion-shadow-soft);
}

.dashboard-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.dashboard-panel__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.dashboard-panel__subtitle {
  margin: 0.2rem 0 0;
  color: var(--sion-muted);
  font-size: 0.92rem;
}

.dashboard-panel__body {
  padding: 1rem 1.15rem 1.2rem;
}

.account-page {
  margin-top: 1.25rem;
}

.account-toolbar {
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
}

.account-toolbar .card-body {
  padding: 1.35rem;
}

.account-toolbar--compact .card-body {
  padding: 1rem 1.15rem;
}

.account-toolbar--compact .account-toolbar__eyebrow {
  padding: 0.28rem 0.68rem;
  font-size: 0.68rem;
}

.account-toolbar--compact .account-toolbar__title {
  font-size: clamp(1.35rem, 2.1vw, 1.95rem);
  line-height: 1.05;
}

.account-toolbar--compact .account-toolbar__subtitle {
  max-width: 44ch;
  font-size: 0.96rem;
}

.account-toolbar--compact .account-toolbar__actions {
  justify-content: flex-end;
  align-items: center;
}

.account-toolbar--compact .account-toolbar__actions .btn,
.account-toolbar--compact .account-toolbar__actions a.btn {
  min-height: 2.75rem;
  border-radius: 14px;
  padding-inline: 0.95rem;
}

.account-toolbar__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(215, 38, 56, 0.08);
  color: var(--sion-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  font-weight: 800;
}

.account-toolbar__title {
  margin: 0;
  font-size: clamp(1.6rem, 2.6vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.account-toolbar__subtitle {
  color: var(--sion-muted);
  max-width: 56ch;
}

.account-filter-trigger {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.85rem;
  min-height: 3.2rem;
  border-radius: 18px;
  padding-inline: 1rem;
}

.account-filter-trigger__icon {
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.account-filter-trigger__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.account-filter-trigger__label {
  font-weight: 700;
}

.account-filter-trigger__copy small {
  color: rgba(255, 255, 255, 0.82);
}

.account-filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-height: 2.2rem;
}

.account-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-start;
}

.account-toolbar__actions .btn,
.account-toolbar__actions a.btn {
  border-radius: 16px;
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding-inline: 1rem;
}

.account-toolbar__actions .btn-circle {
  width: 3rem;
  min-width: 3rem;
  padding-inline: 0;
}

.account-search-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.account-search-field .form-label {
  margin-bottom: 0;
  font-weight: 700;
  color: var(--sion-text);
}

.account-search-field .btn {
  min-height: 3.1rem;
  border-radius: 18px;
}

.account-search-field .form-select,
.account-search-field .form-control {
  min-height: 3.2rem;
}

.account-search-field--submit {
  align-self: stretch;
}

.account-toolbar .table-responsive {
  margin-top: 0;
}

.account-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.10);
  color: var(--sion-secondary);
  font-size: 0.88rem;
  font-weight: 700;
}

.account-filter-chip.is-empty {
  background: rgba(100, 116, 139, 0.12);
  color: var(--sion-muted);
}

.account-table-panel .dashboard-panel__body {
  padding-top: 0.35rem;
}

.advances-modal {
  padding: 0.35rem;
}

.employee-modal-header {
  position: relative;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  padding: 0.9rem 3.9rem 0.9rem 1.05rem;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 28%),
    linear-gradient(135deg, #36b9cc, #2ea9bd);
}

.employee-modal-header .btn-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  margin: 0;
}

.employee-modal-header__shell {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  width: 100%;
}

.employee-modal-header__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.employee-modal-header__identity {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  min-width: 0;
  flex: 1 1 auto;
}

.employee-modal-header__avatar-card {
  flex: 0 0 auto;
}

.employee-modal-header__avatar {
  position: relative;
  width: 80px;
  height: 80px;
}

.employee-modal-header__avatar img {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-width: 3px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.18);
}

.employee-modal-header__icon-button {
  position: absolute;
  right: -6px;
  bottom: -2px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.2);
}

.employee-modal-header__icon-button-inline {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex: 0 0 auto;
}

.employee-modal-header__copy {
  min-width: 0;
  color: #fff;
}

.employee-modal-header__eyebrow {
  display: inline-flex;
  margin-bottom: 0.35rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.68rem;
  font-weight: 800;
}

.employee-modal-header__title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.employee-modal-header__title {
  margin: 0;
  color: #fff;
  font-size: clamp(1.2rem, 2vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.employee-modal-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 0.6rem;
}

.employee-modal-header__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
  line-height: 1.1;
}

.employee-modal-header__meta strong {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.employee-editor-panel {
  padding: 0.9rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px);
}

.employee-editor-panel .form-label {
  margin-bottom: 0.2rem;
  color: rgba(255, 255, 255, 0.96);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.employee-editor-panel .form-control {
  background: rgba(255, 255, 255, 0.94);
}

.employee-modal-header__actions .btn {
  min-width: 150px;
}

.employee-modal-header__hint {
  display: inline-flex;
  align-items: center;
  min-height: 2.65rem;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.88rem;
  font-weight: 600;
}

.advances-panel {
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(248,250,252,0.96));
}

.advances-actions {
  display: flex;
  justify-content: flex-end;
}

.advances-block {
  height: 100%;
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.88);
}

.advances-block--highlight {
  background:
    radial-gradient(circle at top right, rgba(215, 38, 56, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
}

.advances-block__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  font-weight: 800;
}

.advances-block__title {
  margin: 0.7rem 0 0.25rem;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--sion-text);
}

.advances-block__subtitle {
  margin: 0;
  color: var(--sion-muted);
  font-size: 0.94rem;
}

.advances-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.advances-summary-card {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--sion-shadow-soft);
}

.advances-summary-card__label {
  display: block;
  color: var(--sion-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.72rem;
  font-weight: 800;
}

.advances-summary-card__value {
  display: block;
  margin-top: 0.28rem;
  color: var(--sion-text);
  font-size: 1.2rem;
  font-weight: 800;
}

.product-modal .modal-body,
.product-history-modal .modal-body {
  max-height: min(72vh, 820px);
  overflow-y: auto;
}

.product-history-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.dashboard-panel--soft {
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top right, rgba(56, 189, 248, 0.08), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
}

.product-history-modal .table td,
.product-history-modal .table th {
  white-space: nowrap;
}

.product-history-modal .table td:nth-child(5),
.product-history-modal .table th:nth-child(5) {
  white-space: normal;
  min-width: 220px;
}

.permissions-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  margin-bottom: 1.1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.permissions-summary {
  color: var(--sion-text);
  font-size: 1rem;
}

.permissions-summary strong {
  font-size: 1.15rem;
}

.permissions-summary__hint {
  color: var(--sion-muted);
  font-size: 0.9rem;
}

.permissions-toolbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.permissions-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.permission-group-card {
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background:
    radial-gradient(circle at top right, rgba(15, 118, 110, 0.08), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.94));
}

.permission-group-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.permission-group-card__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.08);
  color: #1d4ed8;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.68rem;
  font-weight: 800;
}

.permission-group-card__title {
  margin: 0;
  color: var(--sion-text);
  font-size: 1.02rem;
  font-weight: 800;
}

.permission-group-card__subtitle {
  color: var(--sion-muted);
  max-width: 42ch;
  font-size: 0.9rem;
}

.permission-group-card__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.permission-group-card__count {
  color: var(--sion-muted);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}

.permission-group-card__count strong {
  color: var(--sion-text);
}

.permission-group-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
}

.permission-tile {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-height: 100%;
  padding: 0.9rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.96);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.permission-tile:hover {
  transform: translateY(-1px);
  box-shadow: var(--sion-shadow-soft);
}

.permission-tile.is-active {
  border-color: rgba(29, 78, 216, 0.24);
  background: rgba(29, 78, 216, 0.04);
}

.permission-checkbox {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.permission-switch {
  position: relative;
  flex: 0 0 auto;
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #cbd5e1;
  transition: background-color 0.18s ease;
}

.permission-switch__knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.18);
  transition: transform 0.18s ease;
}

.permission-tile.is-active .permission-switch {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
}

.permission-tile.is-active .permission-switch__knob {
  transform: translateX(20px);
}

.permission-tile__body {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  min-width: 0;
}

.permission-tile__label {
  color: var(--sion-text);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.permission-tile__description {
  color: var(--sion-muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.permission-matrix-wrap {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.permission-matrix {
  margin-bottom: 0;
  min-width: 760px;
  --bs-table-bg: transparent;
  --bs-table-striped-bg: rgba(248, 250, 252, 0.92);
  --bs-table-hover-bg: rgba(239, 246, 255, 0.72);
  --bs-table-border-color: rgba(15, 23, 42, 0.08);
}

.permission-matrix thead th {
  padding: 0.95rem 1rem;
  border-bottom-width: 1px;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.88));
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.permission-matrix tbody td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
}

.permission-matrix__row {
  transition: background-color 0.18s ease;
}

.permission-matrix__row.is-active {
  background: rgba(29, 78, 216, 0.05);
}

.permission-matrix__module {
  min-width: 300px;
}

.permission-matrix__module-label {
  color: var(--sion-text);
  font-size: 0.98rem;
  font-weight: 800;
  line-height: 1.2;
}

.permission-matrix__module-description {
  margin-top: 0.25rem;
  color: var(--sion-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.permission-matrix__cell {
  width: 104px;
}

.permission-matrix__check {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin: 0;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.36);
  background: rgba(248, 250, 252, 0.96);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.permission-matrix__check:hover {
  transform: translateY(-1px);
  border-color: rgba(29, 78, 216, 0.26);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.permission-matrix__check.is-active {
  border-color: rgba(29, 78, 216, 0.32);
  background: rgba(29, 78, 216, 0.09);
}

.permission-matrix__checkbox {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.permission-matrix__indicator {
  position: relative;
  width: 22px;
  height: 22px;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.permission-matrix__indicator::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 7px;
  width: 5px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.permission-matrix__check.is-active .permission-matrix__indicator {
  border-color: #1d4ed8;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
}

.permission-matrix__check.is-active .permission-matrix__indicator::after {
  opacity: 1;
}

.permission-matrix__na {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  color: #94a3b8;
  font-size: 1rem;
  font-weight: 700;
}

.permissions-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.permissions-actions .btn,
.permissions-actions input.btn {
  min-width: 180px;
}

.filter-modal-dialog {
  max-width: min(860px, calc(100vw - 2rem));
}

.filter-modal-dialog.modal-dialog-centered {
  min-height: calc(100% - var(--sion-topbar-height) - 1rem);
  align-items: flex-start;
}

.modal.show .filter-modal-dialog {
  margin-top: calc(var(--sion-topbar-height) + 0.35rem);
  margin-bottom: 0.75rem;
}

.filter-modal {
  border-radius: 28px;
  overflow: hidden;
  max-height: calc(100vh - var(--sion-topbar-height) - 1.1rem);
}

.filter-modal .modal-header,
.filter-modal .modal-footer {
  border-color: rgba(15, 23, 42, 0.08);
}

.filter-modal .modal-header,
.filter-modal .modal-body,
.filter-modal .modal-footer {
  padding-inline: 1rem;
}

.filter-modal .modal-header {
  padding-top: 0.95rem;
  padding-bottom: 0.8rem;
}

.filter-modal .modal-body {
  padding-top: 0.8rem;
  padding-bottom: 0.9rem;
}

.filter-modal .modal-footer {
  padding-top: 0.75rem;
  padding-bottom: 0.9rem;
}

.filter-modal__eyebrow {
  color: var(--sion-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.72rem;
  font-weight: 800;
}

.filter-modal__subtitle {
  color: var(--sion-muted);
  font-size: 0.92rem;
  line-height: 1.35;
  max-width: 56ch;
}

.filter-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-option-card {
  position: relative;
  display: flex;
  gap: 0.72rem;
  min-height: 100%;
  padding: 0.85rem 0.9rem 0.85rem 2.95rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.96));
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.filter-option-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--sion-shadow-soft);
}

.filter-option-card input[type="checkbox"] {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  width: 1.1rem;
  height: 1.1rem;
}

.filter-option-card__icon {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(215, 38, 56, 0.10);
  color: var(--sion-primary);
  flex: 0 0 auto;
}

.filter-option-card__copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.filter-option-card__title {
  color: var(--sion-text);
  font-weight: 800;
  font-size: 0.95rem;
}

.filter-option-card__text {
  color: var(--sion-muted);
  font-size: 0.84rem;
  line-height: 1.28;
}

.filter-option-card:has(input[type="checkbox"]:checked) {
  border-color: rgba(215, 38, 56, 0.35);
  box-shadow: 0 14px 32px rgba(215, 38, 56, 0.14);
  background: linear-gradient(180deg, rgba(255,248,249,0.98), rgba(255,255,255,0.98));
}

.filter-option-card:has(input[type="checkbox"]:checked) .filter-option-card__icon {
  background: rgba(215, 38, 56, 0.16);
}

.dashboard-chart {
  min-height: 280px;
}

.btn-circle {
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.15);
}

.btn-icon-split {
  border-radius: 999px;
  padding-inline: 1rem;
  gap: 0.65rem;
}

.bg-teal {
  background-color: var(--sion-secondary) !important;
}

.btn {
  border-radius: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.btn-primary {
  border-color: transparent;
  background: linear-gradient(135deg, #cf2037, #ef4444);
  box-shadow: 0 14px 28px rgba(207, 32, 55, 0.18);
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: transparent;
  background: linear-gradient(135deg, #b81b31, #dc374d);
}

.btn-info,
.bg-info {
  background: linear-gradient(135deg, #06b6d4, #0891b2) !important;
  border-color: transparent !important;
}

.btn-success,
.bg-success {
  background: linear-gradient(135deg, #16a34a, #15803d) !important;
  border-color: transparent !important;
}

.btn-danger,
.bg-danger {
  background: linear-gradient(135deg, #cf2037, #e11d48) !important;
  border-color: transparent !important;
}

.border-left-success {
  border-left: 0.45rem solid #16a34a !important;
}

.border-left-danger {
  border-left: 0.45rem solid #dc2626 !important;
}

.border-left-primary {
  border-left: 0.45rem solid #2563eb !important;
}

.refinancing-modal-dialog {
  max-width: min(1040px, calc(100vw - 2rem));
}

.refinancing-modal-dialog.modal-dialog-centered {
  min-height: calc(100% - var(--sion-topbar-height) - 1rem);
  align-items: flex-start;
}

.modal.show .refinancing-modal-dialog {
  margin-top: calc(var(--sion-topbar-height) + 0.4rem);
  margin-bottom: 0.75rem;
}

.refinancing-modal {
  overflow: hidden;
  max-height: calc(100vh - var(--sion-topbar-height) - 1.15rem);
  border-radius: 30px;
}

.refinancing-modal__header,
.refinancing-modal__body,
.refinancing-modal__footer {
  padding-inline: 1.2rem;
}

.refinancing-modal__header {
  align-items: flex-start;
  border-color: rgba(15, 23, 42, 0.08);
  padding-top: 1.05rem;
  padding-bottom: 0.95rem;
}

.refinancing-modal__subtitle {
  max-width: 60ch;
  color: #64748b;
  font-size: 0.97rem;
}

.refinancing-modal__body {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.refinancing-modal__footer {
  border-color: rgba(15, 23, 42, 0.08);
  padding-top: 0.9rem;
  padding-bottom: 1rem;
}

.refi-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.45rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.refi-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.95rem;
  align-items: start;
  margin-bottom: 1rem;
  padding: 1rem 1.05rem;
  border: 1px solid rgba(14, 165, 233, 0.22);
  border-radius: 26px;
  background:
    radial-gradient(circle at top right, rgba(125, 211, 252, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(224, 242, 254, 0.96), rgba(240, 249, 255, 0.98));
}

.refi-hero__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0284c7, #0ea5e9);
  color: #fff;
  box-shadow: 0 14px 28px rgba(14, 116, 144, 0.24);
  font-size: 1.1rem;
}

.refi-hero__title {
  margin: 0 0 0.2rem;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
}

.refi-hero__text {
  color: #0f4c68;
  font-size: 0.96rem;
  line-height: 1.45;
}

.refi-section {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92));
}

.refi-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.refi-section__eyebrow {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.refi-section__title {
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 800;
}

.refi-reference-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 800;
}

.refi-origin-grid,
.refi-metrics-grid {
  display: grid;
  gap: 0.85rem;
}

.refi-origin-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  margin-bottom: 0.85rem;
}

.refi-panel-card {
  grid-column: span 4;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem 0.95rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.refi-panel-card--wide {
  grid-column: span 8;
}

.refi-metrics-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.refi-metric-card,
.refi-mini-card,
.refi-result-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 104px;
  padding: 0.9rem 0.95rem;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.07);
  background: rgba(255, 255, 255, 0.96);
}

.refi-mini-grid,
.refi-calc-grid {
  display: grid;
  gap: 0.8rem;
}

.refi-mini-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  height: 100%;
}

.refi-calc-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.refi-result-card {
  justify-content: center;
  min-height: 120px;
}

.refi-result-card--accent {
  background:
    radial-gradient(circle at top right, rgba(59, 130, 246, 0.16), transparent 28%),
    linear-gradient(135deg, rgba(239, 246, 255, 0.98), rgba(255,255,255,0.98));
  border-color: rgba(59, 130, 246, 0.2);
}

.refi-label {
  color: #64748b;
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.refi-value {
  color: #0f172a;
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.35;
  word-break: break-word;
}

.refi-value--money {
  font-size: 1.4rem;
}

.refi-value--mono {
  font-variant-numeric: tabular-nums;
}

.refi-state-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  min-width: 120px;
  padding: 0.48rem 0.82rem;
  border-radius: 999px;
  border: 1px solid rgba(100, 116, 139, 0.24);
  background: rgba(248, 250, 252, 0.95);
  color: #334155;
  font-size: 0.9rem;
  font-weight: 800;
}

.refi-state-chip--paid {
  border-color: rgba(22, 163, 74, 0.24);
  background: rgba(220, 252, 231, 0.94);
  color: #166534;
}

.refi-state-chip--pending {
  border-color: rgba(217, 119, 6, 0.22);
  background: rgba(254, 243, 199, 0.95);
  color: #92400e;
}

.refi-state-chip--refinanced {
  border-color: rgba(37, 99, 235, 0.22);
  background: rgba(219, 234, 254, 0.95);
  color: #1d4ed8;
}

.refi-state-chip--inactive {
  border-color: rgba(100, 116, 139, 0.24);
  background: rgba(241, 245, 249, 0.95);
  color: #475569;
}

.refi-state-chip--warning {
  border-color: rgba(234, 88, 12, 0.22);
  background: rgba(255, 237, 213, 0.95);
  color: #c2410c;
}

.refi-state-chip--neutral {
  border-color: rgba(100, 116, 139, 0.24);
  background: rgba(248, 250, 252, 0.95);
  color: #334155;
}

.refi-input {
  min-height: 56px;
}

.refi-feedback {
  margin-top: 0.8rem;
  padding: 0.8rem 0.9rem;
  border-radius: 18px;
  background: rgba(248, 250, 252, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #475569;
  font-size: 0.95rem;
  line-height: 1.4;
}

.refi-feedback--ok {
  background: rgba(220, 252, 231, 0.82);
  border-color: rgba(22, 163, 74, 0.2);
  color: #166534;
}

.refi-feedback--error {
  background: rgba(254, 226, 226, 0.85);
  border-color: rgba(220, 38, 38, 0.18);
  color: #b91c1c;
}

.border-left-warning {
  border-left: 0.45rem solid #f59e0b !important;
}

.text-gray-800 {
  color: var(--sion-text) !important;
}

.text-gray-300 {
  color: #cbd5e1 !important;
}

table.table {
  color: var(--sion-text);
}

table.table thead th {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.78rem;
  color: var(--sion-muted);
  background: linear-gradient(180deg, #fbfcfe, #f1f5f9);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

table.table tbody tr {
  transition: background-color 0.18s ease, transform 0.18s ease;
}

table.table tbody td {
  vertical-align: middle;
}

table.table tbody tr:nth-child(even) {
  background-color: rgba(248, 250, 252, 0.92);
}

table.table tbody tr:hover {
  background-color: rgba(215, 38, 56, 0.03);
}

.table-responsive,
.dataTables_wrapper {
  border-radius: 18px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 14px !important;
  border: 1px solid rgba(15, 23, 42, 0.08) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  color: var(--sion-text) !important;
  font-weight: 700;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  border-color: transparent !important;
  background: linear-gradient(135deg, #cf2037, #ef4444) !important;
  color: #fff !important;
  box-shadow: 0 12px 22px rgba(207, 32, 55, 0.18);
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  border-color: rgba(207, 32, 55, 0.18) !important;
  background: rgba(255, 248, 249, 0.98) !important;
  color: var(--sion-primary-dark) !important;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select,
.form-control,
.form-select,
.custom-select,
.ts-wrapper .ts-control,
.flatpickr-input {
  border-radius: 14px !important;
  border-color: rgba(15, 23, 42, 0.14) !important;
  min-height: 2.65rem;
}

.dataTables_wrapper .dataTables_filter input:focus,
.dataTables_wrapper .dataTables_length select:focus,
.form-control:focus,
.form-select:focus,
.custom-select:focus,
.ts-wrapper.focus .ts-control,
.flatpickr-input:focus {
  border-color: rgba(215, 38, 56, 0.5) !important;
  box-shadow: 0 0 0 0.2rem rgba(215, 38, 56, 0.12) !important;
}

.ts-wrapper .ts-control {
  padding: 0.35rem 0.6rem;
  background: #fff;
}

.ts-dropdown {
  z-index: 2000 !important;
  border-radius: 16px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: var(--sion-shadow-soft);
}

.ts-wrapper.multi .ts-control > div {
  border-radius: 999px;
  background: rgba(215, 38, 56, 0.1);
  color: var(--sion-primary-dark);
  border: 0;
}

.flatpickr-calendar {
  border-radius: 18px;
  box-shadow: var(--sion-shadow);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.swal2-popup {
  border-radius: 24px !important;
}

.navbar-nav .nav-link,
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.navbar-nav .nav-link i,
.dropdown-item i {
  width: 1.2rem;
  text-align: center;
}

.nav-link.active {
  font-weight: 700;
}

.app-shell .container,
.app-shell .container-fluid,
.app-shell .container-xl {
  position: relative;
}

.alert,
.badge {
  border-radius: 999px;
}

.account-state-badge {
  --state-bg: rgba(148, 163, 184, 0.14);
  --state-border: rgba(100, 116, 139, 0.24);
  --state-text: #334155;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 118px;
  justify-content: center;
  padding: 0.48rem 0.82rem;
  border-radius: 999px;
  border: 1px solid var(--state-border);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.78)), var(--state-bg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.65), 0 8px 20px rgba(15, 23, 42, 0.06);
  color: var(--state-text);
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.account-state-badge i {
  font-size: 0.85rem;
  opacity: 0.95;
}

.account-state-badge--paid {
  --state-bg: rgba(34, 197, 94, 0.16);
  --state-border: rgba(22, 163, 74, 0.28);
  --state-text: #166534;
}

.account-state-badge--pending {
  --state-bg: rgba(245, 158, 11, 0.16);
  --state-border: rgba(217, 119, 6, 0.26);
  --state-text: #92400e;
}

.account-state-badge--refinanced {
  --state-bg: rgba(59, 130, 246, 0.14);
  --state-border: rgba(37, 99, 235, 0.24);
  --state-text: #1d4ed8;
}

.account-state-badge--inactive {
  --state-bg: rgba(100, 116, 139, 0.16);
  --state-border: rgba(71, 85, 105, 0.24);
  --state-text: #475569;
}

.account-state-badge--warning {
  --state-bg: rgba(249, 115, 22, 0.15);
  --state-border: rgba(234, 88, 12, 0.24);
  --state-text: #c2410c;
}

.account-state-badge--neutral {
  --state-bg: rgba(148, 163, 184, 0.14);
  --state-border: rgba(100, 116, 139, 0.24);
  --state-text: #334155;
}

.account-note-content {
  min-width: 26rem;
  white-space: pre-line;
  line-height: 1.6;
  text-wrap: pretty;
}

.modal-content {
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.97));
}

.auth-shell {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(207, 32, 55, 0.22), transparent 24%),
    radial-gradient(circle at bottom right, rgba(14, 116, 144, 0.16), transparent 28%),
    linear-gradient(135deg, #fff8f8 0%, #f6f8fc 52%, #edf6fb 100%);
  color: var(--sion-text);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
}

.auth-layout__panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.auth-layout__panel--hero {
  position: relative;
}

.auth-layout__panel--hero::before,
.auth-layout__panel--hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(8px);
  opacity: 0.7;
}

.auth-layout__panel--hero::before {
  top: 9%;
  left: 8%;
  width: 180px;
  height: 180px;
  background: rgba(207, 32, 55, 0.12);
}

.auth-layout__panel--hero::after {
  right: 10%;
  bottom: 12%;
  width: 220px;
  height: 220px;
  background: rgba(14, 116, 144, 0.12);
}

.auth-hero {
  position: relative;
  z-index: 1;
  width: min(100%, 680px);
  padding: 2rem 2.25rem;
}

.auth-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.78rem;
  border-radius: 999px;
  background: rgba(207, 32, 55, 0.08);
  color: var(--sion-primary-dark);
  font-size: 0.73rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.auth-hero__brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-top: 1.2rem;
}

.auth-hero__logo {
  width: 96px;
  height: 96px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(207,32,55,0.08), rgba(14,116,144,0.08));
  box-shadow: var(--sion-shadow-soft);
}

.auth-hero__logo img {
  width: 78px;
  height: auto;
}

.auth-hero__title {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.25rem);
  line-height: 0.96;
  font-weight: 700;
  letter-spacing: -0.05em;
}

.auth-hero__subtitle {
  margin: 1rem 0 0;
  max-width: 54ch;
  color: #475467;
  font-size: 1.05rem;
  line-height: 1.7;
}

.auth-hero__metrics {
  display: grid;
  gap: 0.9rem;
  margin-top: 1.8rem;
}

.auth-hero__metric {
  padding: 1rem 1.05rem;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(10px);
  box-shadow: var(--sion-shadow-soft);
}

.auth-hero__metric strong {
  display: block;
  font-family: var(--sion-heading-font);
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.auth-hero__metric span {
  color: var(--sion-muted);
  line-height: 1.5;
}

.auth-layout__panel--form {
  background: linear-gradient(180deg, rgba(255,255,255,0.3), rgba(255,255,255,0.72));
  backdrop-filter: blur(16px);
}

.auth-card {
  width: min(100%, 470px);
  padding: 2rem;
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.16);
}

.auth-card__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  background: rgba(14, 116, 144, 0.08);
  color: #0f5f7b;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.auth-card__title {
  margin: 1rem 0 0.3rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.auth-card__subtitle {
  margin: 0;
  color: var(--sion-muted);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.auth-field {
  display: grid;
  gap: 0.45rem;
}

.auth-field__label {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #344054;
}

.auth-field__control {
  position: relative;
}

.auth-field__icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: #98a2b3;
  pointer-events: none;
}

.auth-field__input {
  min-height: 3.6rem;
  padding-left: 2.9rem;
  font-size: 1rem;
  border-radius: 18px !important;
}

.auth-submit {
  min-height: 3.6rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.35rem;
  font-size: 1rem;
}

.auth-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.4rem;
  padding-top: 1.15rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  color: var(--sion-muted);
  font-size: 0.88rem;
}

.auth-card .alert {
  margin-top: 1rem;
  border-radius: 18px;
}

.profile-summary-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 22px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: linear-gradient(135deg, rgba(207,32,55,0.06), rgba(14,116,144,0.08));
}

.profile-summary-card__avatar {
  width: 72px;
  height: 72px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(207,32,55,0.14), rgba(14,116,144,0.14));
  color: var(--sion-text);
  font-family: var(--sion-heading-font);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  box-shadow: var(--sion-shadow-soft);
}

.profile-summary-card__copy {
  min-width: 0;
}

.profile-summary-card__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(207, 32, 55, 0.08);
  color: var(--sion-primary-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-summary-card__title {
  margin: 0.65rem 0 0.25rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.profile-summary-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.profile-summary-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: var(--sion-text);
  font-size: 0.88rem;
  font-weight: 700;
}

.profile-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
}

.profile-static-card {
  padding: 1rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--sion-shadow-soft);
}

.profile-static-card__label {
  display: block;
  color: var(--sion-muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-static-card__value {
  display: block;
  margin-top: 0.35rem;
  color: var(--sion-text);
  font-size: 1.05rem;
  font-weight: 800;
}

@media (max-width: 991.98px) {
  :root {
    --sion-topbar-height: 60px;
  }

  .refinancing-modal-dialog {
    max-width: min(920px, calc(100vw - 1.25rem));
  }

  .refi-origin-grid,
  .refi-metrics-grid,
  .refi-calc-grid,
  .refi-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .refi-panel-card,
  .refi-panel-card--wide {
    grid-column: span 6;
  }

  body.app-shell {
    padding-top: var(--sion-topbar-height);
  }

  .dashboard-hero {
    padding: 1.1rem;
  }

  .account-toolbar .card-body,
  .filter-modal .modal-header,
  .filter-modal .modal-body,
  .filter-modal .modal-footer {
    padding-inline: 1rem;
  }

  .account-toolbar__actions {
    justify-content: stretch;
  }

  .account-toolbar--compact .account-toolbar__actions {
    justify-content: flex-start;
  }

  .account-toolbar__actions .btn,
  .account-toolbar__actions a.btn {
    width: 100%;
  }

  .permissions-toolbar,
  .permission-group-card__header,
  .permission-group-card__meta {
    flex-direction: column;
    align-items: stretch;
  }

  .permission-matrix {
    min-width: 680px;
  }

  .permission-matrix__module {
    min-width: 240px;
  }

  .permissions-groups {
    grid-template-columns: 1fr;
  }

  .permissions-actions {
    flex-direction: column;
  }

  .permissions-actions .btn,
  .permissions-actions input.btn {
    width: 100%;
    min-width: 0;
  }

  .advances-summary-grid {
    grid-template-columns: 1fr;
  }

  .product-history-summary {
    grid-template-columns: 1fr;
  }

  .employee-modal-header {
    padding: 1rem 3.5rem 1rem 1rem;
  }

  .employee-modal-header__top {
    flex-direction: column;
    align-items: stretch;
  }

  .employee-modal-header__identity {
    align-items: flex-start;
  }

  .employee-editor-panel {
    padding: 0.85rem;
  }

  .advances-actions {
    justify-content: stretch;
  }

  .advances-actions .btn {
    width: 100%;
  }

  .filter-option-card {
    padding: 0.95rem 0.95rem 0.95rem 3rem;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-layout__panel {
    padding: 1.4rem;
  }

  .auth-layout__panel--hero {
    padding-bottom: 0;
  }

  .auth-hero,
  .auth-card {
    width: min(100%, 720px);
  }

  .auth-hero {
    padding: 1rem 0;
  }

  .sion-brand__copy small {
    display: none;
  }

  .sion-topbar__inner {
    min-height: var(--sion-topbar-height);
  }
}

@media (max-width: 575.98px) {
  .refinancing-modal-dialog {
    max-width: calc(100vw - 0.9rem);
  }

  .refinancing-modal__header,
  .refinancing-modal__body,
  .refinancing-modal__footer {
    padding-inline: 0.9rem;
  }

  .refi-hero {
    grid-template-columns: 1fr;
  }

  .refi-origin-grid,
  .refi-metrics-grid,
  .refi-calc-grid,
  .refi-mini-grid {
    grid-template-columns: 1fr;
  }

  .refi-panel-card,
  .refi-panel-card--wide {
    grid-column: span 12;
  }

  .refi-section__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .refi-value--money {
    font-size: 1.22rem;
  }

  .auth-layout__panel {
    padding: 1rem;
  }

  .auth-card {
    padding: 1.35rem;
    border-radius: 24px;
  }

  .auth-hero__brand {
    grid-template-columns: 1fr;
  }

  .auth-hero__logo {
    width: 86px;
    height: 86px;
  }

  .auth-card__footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .sion-brand {
    gap: 0.5rem;
    padding-right: 0.25rem;
  }

  .sion-brand__mark {
    width: 34px;
    height: 34px;
  }

  .sion-brand__mark img {
    width: 24px;
    height: 24px;
  }

  .sion-profile-trigger {
    min-height: 38px;
    padding-right: 0.45rem;
  }

  .sion-profile-trigger::after {
    display: none;
  }

  .employee-modal-header__identity {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .employee-modal-header__meta {
    justify-content: center;
  }

  .employee-modal-header__title-row {
    justify-content: center;
  }

  .employee-modal-header__actions .btn {
    width: 100%;
    min-width: 0;
  }
}
