@charset "UTF-8";

/*
 * K'Banking soft refresh v2
 * Garde la structure actuelle, mais resserre l'interface et modernise les blocs.
 * A charger apres theme.min.css.
 */

:root {
  --kb-bg: #f5f6fb;
  --kb-surface: #ffffff;
  --kb-border: #e3e7f0;
  --kb-border-soft: #eef1f6;
  --kb-text: #111827;
  --kb-muted: #667085;
  --kb-primary: #6366f1;
  --kb-primary-hover: #5356df;
  --kb-primary-soft: #f0f1ff;
  --kb-success: #22c55e;
  --kb-success-soft: #eaf9f0;
  --kb-danger: #ef4444;
  --kb-danger-soft: #fff1f1;
  --kb-warning: #f59e0b;
  --kb-radius: 12px;
  --kb-radius-sm: 8px;
  --kb-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
  --kb-shadow-hover: 0 16px 34px rgba(15, 23, 42, 0.09);
}

html,
body {
  background: var(--kb-bg);
}

body {
  color: var(--kb-muted);
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--kb-primary);
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: var(--kb-text);
  font-weight: 800;
  letter-spacing: 0;
}

.page-wrapper {
  padding-top: 74px;
}

.container {
  max-width: 1360px;
}

.text-muted {
  color: var(--kb-muted) !important;
}

.text-primary {
  color: var(--kb-primary) !important;
}

.text-success {
  color: var(--kb-success) !important;
}

.text-danger {
  color: var(--kb-danger) !important;
}

.bg-primary {
  background: var(--kb-primary) !important;
}

.bg-success {
  background: var(--kb-success) !important;
}

.bg-danger {
  background: var(--kb-danger) !important;
}

.bg-warning {
  background: var(--kb-warning) !important;
}

/* Notifications */
.kb-alert {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 34px;
  align-items: center;
  gap: 0.75rem;
  width: min(calc(100% - 2rem), 1180px);
  margin: 1rem auto 1.15rem;
  padding: 0.78rem;
  color: var(--kb-text);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--kb-border);
  border-radius: 18px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.07);
}

.kb-alert-icon,
.kb-alert-close {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  flex: 0 0 auto;
}

.kb-alert-icon {
  font-size: 1.25rem;
}

.kb-alert-body {
  min-width: 0;
  display: grid;
  gap: 0.05rem;
}

.kb-alert-body strong {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.kb-alert-body span {
  color: var(--kb-text);
  font-size: 0.98rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.kb-alert-close {
  border: 0;
  color: var(--kb-muted);
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.kb-alert-close:hover {
  color: var(--kb-text);
  background: rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

.kb-alert.alert-success {
  border-color: rgba(34, 197, 94, 0.24);
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 74%);
}

.kb-alert.alert-success .kb-alert-icon {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.13);
}

.kb-alert.alert-danger {
  border-color: rgba(239, 68, 68, 0.24);
  background: linear-gradient(135deg, #fff1f1 0%, #ffffff 74%);
}

.kb-alert.alert-danger .kb-alert-icon {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.12);
}

.kb-alert.alert-warning {
  border-color: rgba(245, 158, 11, 0.26);
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 74%);
}

.kb-alert.alert-warning .kb-alert-icon {
  color: #d97706;
  background: rgba(245, 158, 11, 0.14);
}

.kb-alert.alert-info {
  border-color: rgba(99, 102, 241, 0.2);
  background: linear-gradient(135deg, #f0f1ff 0%, #ffffff 74%);
}

.kb-alert.alert-info .kb-alert-icon {
  color: var(--kb-primary);
  background: rgba(99, 102, 241, 0.12);
}

@media (max-width: 575.98px) {
  .kb-alert {
    grid-template-columns: 34px minmax(0, 1fr) 32px;
    width: calc(100% - 1rem);
    margin: 0.7rem auto 1rem;
    padding: 0.65rem;
    border-radius: 16px;
  }

  .kb-alert-icon,
  .kb-alert-close {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .kb-alert-body span {
    font-size: 0.9rem;
  }
}

/* Header */
.kb-header {
  min-height: 74px;
  background: rgba(255, 255, 255, 0.96) !important;
  border-bottom: 1px solid var(--kb-border-soft);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.045) !important;
  backdrop-filter: blur(14px);
}

.kb-header .container {
  gap: 0.8rem;
}

.kb-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  padding-right: 0.35rem;
}

.kb-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 10px;
}

.kb-logo-label {
  color: var(--kb-text);
  font-size: 1rem;
  font-weight: 800;
  white-space: nowrap;
}

.navbar-nav,
.kb-nav-main {
  align-items: center;
  gap: 0.12rem;
}

.navbar-nav .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  min-height: 40px;
  padding: 0.46rem 0.58rem;
  border-radius: var(--kb-radius-sm);
  color: #3f4657;
  font-size: 0.86rem;
  font-weight: 750;
  white-space: nowrap;
}

.navbar-nav .nav-link i {
  color: #737b91;
  font-size: 1.05rem;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-item.active .nav-link,
.navbar-nav .nav-link.active {
  background: var(--kb-primary-soft);
  color: var(--kb-primary);
}

.navbar-nav .nav-link:hover i,
.navbar-nav .nav-item.active .nav-link i,
.navbar-nav .nav-link.active i {
  color: var(--kb-primary);
}

.kb-logout .nav-link {
  justify-content: center;
}

.kb-logout-label {
  display: none;
}

.kb-quickadd-desktop .nav-link {
  justify-content: center;
  width: 40px;
  padding-right: 0;
  padding-left: 0;
  background: var(--kb-primary-soft);
  color: var(--kb-primary);
}

.kb-quickadd-desktop .nav-link i {
  color: var(--kb-primary);
  font-size: 1.2rem;
}

.kb-floating-quickadd {
  display: none;
}

.navbar-toggler {
  border-color: var(--kb-border);
  border-radius: var(--kb-radius-sm);
  box-shadow: none !important;
}

.offcanvas {
  background: var(--kb-surface);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  border-radius: var(--kb-radius-sm);
  font-weight: 800;
  box-shadow: none !important;
}

.btn-sm,
.btn-xs {
  min-height: 34px;
  padding: 0.38rem 0.75rem;
  font-size: 0.86rem;
}

.btn-primary,
.btn-success {
  border-color: var(--kb-primary) !important;
  background: var(--kb-primary) !important;
  color: #fff !important;
}

.btn-primary:hover,
.btn-success:hover {
  border-color: var(--kb-primary-hover) !important;
  background: var(--kb-primary-hover) !important;
}

.btn-secondary {
  border-color: transparent !important;
  background: var(--kb-primary-soft) !important;
  color: var(--kb-primary) !important;
}

/* Dashboard hero */
.dashboard-hero {
  margin-bottom: 1.5rem;
  padding: 2rem 0 1rem;
}

.dashboard-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.55rem 1.75rem;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.98) 0%, rgba(117, 120, 247, 0.95) 100%);
  box-shadow: 0 18px 42px rgba(99, 102, 241, 0.16);
  color: #fff;
}

.dashboard-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 2.5vw, 3rem);
}

.dashboard-hero p {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-weight: 650;
}

.dashboard-hero-total {
  min-width: 220px;
  text-align: right;
}

.dashboard-hero-metrics {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 1rem;
}

.dashboard-hero-total span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.dashboard-hero-total strong {
  display: block;
  margin-top: 0.2rem;
  color: #fff;
  font-size: 1.8rem;
  font-weight: 900;
}

.dashboard-hero-total.highlight {
  padding-left: 1rem;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}

.dashboard-money-summary {
  margin-top: -0.3rem;
  margin-bottom: 1.8rem;
}

.dashboard-money-card {
  position: relative;
  overflow: hidden;
}

.dashboard-money-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--kb-primary);
}

.dashboard-money-card.is-available::before {
  background: var(--kb-success);
}

.dashboard-money-card.is-blocked::before {
  background: var(--kb-warning);
}

.dashboard-money-card .card-body {
  position: relative;
  min-height: 168px;
}

.dashboard-money-icon {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--kb-primary-soft);
  color: var(--kb-primary);
  font-size: 1.35rem;
}

.dashboard-money-card.is-available .dashboard-money-icon {
  background: var(--kb-success-soft);
  color: var(--kb-success);
}

.dashboard-money-card.is-blocked .dashboard-money-icon {
  background: #fff7e6;
  color: #b7791f;
}

.dashboard-money-label {
  display: block;
  margin-bottom: 0.5rem;
  padding-right: 3.2rem;
  color: var(--kb-muted);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dashboard-money-value {
  display: block;
  color: var(--kb-text);
  font-size: clamp(1.9rem, 2.4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}

.dashboard-money-card p {
  max-width: 24rem;
  margin: 0.8rem 0 0;
  color: var(--kb-muted);
  font-weight: 650;
}

.dashboard-overview {
  margin-top: 1.4rem;
  margin-bottom: 1.45rem;
}

.dashboard-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.05rem;
}

.dashboard-overview-head h1 {
  margin: 0;
  color: var(--kb-text);
  font-size: 1.45rem;
  line-height: 1.1;
}

.dashboard-overview-head span {
  display: block;
  margin-top: 0.2rem;
  color: var(--kb-muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(460px, 1.35fr);
  gap: 1rem;
  align-items: stretch;
}

.dashboard-stat-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.82rem;
  align-content: start;
}

.dashboard-warning-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  width: min(50%, 720px);
  min-width: 420px;
  margin: 0 auto 1.05rem;
  padding: 0.78rem 0.9rem;
  border: 1px solid rgba(245, 158, 11, 0.28);
  border-radius: 14px;
  background: #fffbeb;
  color: #92400e;
  box-shadow: 0 14px 36px rgba(146, 64, 14, 0.08);
}

.dashboard-warning-card > i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
  font-size: 1.15rem;
}

.dashboard-warning-card strong,
.dashboard-warning-card small {
  display: block;
}

.dashboard-warning-card strong {
  color: #78350f;
  font-size: 0.88rem;
  font-weight: 950;
}

.dashboard-warning-card small {
  color: #a16207;
  font-size: 0.76rem;
  font-weight: 850;
}

.dashboard-ignored-card {
  margin-top: -0.34rem;
  border-color: rgba(99, 102, 241, 0.18);
  background: #fbfcff;
}

.dashboard-ignored-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  cursor: pointer;
  list-style: none;
}

.dashboard-ignored-card summary::-webkit-details-marker {
  display: none;
}

.dashboard-ignored-card summary > i {
  color: var(--kb-muted);
  font-size: 0.95rem;
  transition: transform 0.18s ease;
}

.dashboard-ignored-card[open] summary > i {
  transform: rotate(180deg);
}

.dashboard-ignored-card .dashboard-source-main span {
  color: #6366f1;
}

.dashboard-ignored-card .dashboard-source-main strong {
  color: var(--kb-muted);
  font-size: 0.78rem;
}

.dashboard-ignored-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 0.42rem;
  align-items: center;
  margin-top: 0.45rem;
  padding-top: 0.42rem;
  border-top: 1px solid var(--kb-border-soft);
}

.dashboard-ignored-detail span {
  padding: 0.44rem 0.52rem;
  border-radius: 10px;
  background: var(--kb-soft-panel);
}

.dashboard-ignored-detail small {
  display: block;
  color: var(--kb-muted);
  font-size: 0.58rem;
  font-weight: 850;
  text-transform: uppercase;
}

.dashboard-ignored-detail strong {
  display: block;
  margin-top: 0.08rem;
  color: var(--kb-text);
  font-size: 0.72rem;
  font-weight: 950;
}

.dashboard-ignored-detail p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.45rem 0.52rem;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.06);
  color: var(--kb-muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.dashboard-ignored-detail a {
  justify-self: end;
  padding: 0.4rem 0.55rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.09);
  color: var(--kb-primary);
  font-size: 0.64rem;
  font-weight: 950;
  text-decoration: none;
}

.dashboard-mode-value {
  display: none;
}

.dashboard-mode-value.active {
  display: contents;
}

.dashboard-stat-group {
  display: contents;
}

.dashboard-mobile-collapse-toggle {
  display: none;
}

.dashboard-stat-section {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.1rem 0 -0.2rem;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.dashboard-stat-section::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--kb-border-soft);
}

.dashboard-stat-card {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  grid-template-rows: auto auto;
  grid-template-areas:
    "icon label"
    "icon value";
  column-gap: 0.8rem;
  min-height: 94px;
  padding: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(99, 102, 241, 0.04), transparent 70%),
    #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.06);
}

.dashboard-stat-card::before {
  content: "";
  position: absolute;
  inset: auto 0.9rem 0.58rem 0.9rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
}

.dashboard-stat-card.is-income::before {
  background: rgba(34, 197, 94, 0.28);
}

.dashboard-stat-card.is-spending::before,
.dashboard-stat-card.is-spending.is-danger::before,
.dashboard-stat-card.is-saving.is-danger::before {
  background: rgba(239, 68, 68, 0.25);
}

.dashboard-stat-card.is-spending.is-covered::before,
.dashboard-stat-card.is-saving.is-positive::before {
  background: rgba(34, 197, 94, 0.28);
}

.dashboard-stat-card.is-saving::before,
.dashboard-stat-card.is-saving.is-empty::before {
  background: rgba(148, 163, 184, 0.3);
}

.dashboard-stat-card.is-saving-total::before,
.dashboard-stat-card.is-massbyk::before,
.dashboard-stat-card.is-blocked::before {
  background: rgba(99, 102, 241, 0.18);
}

.dashboard-stat-icon {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  font-size: 1.25rem;
  color: var(--kb-primary);
  background: rgba(99, 102, 241, 0.12);
}

.dashboard-stat-card.is-income .dashboard-stat-icon {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.13);
}

.dashboard-stat-card.is-spending .dashboard-stat-icon,
.dashboard-stat-card.is-spending.is-danger .dashboard-stat-icon,
.dashboard-stat-card.is-saving.is-danger .dashboard-stat-icon {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.12);
}

.dashboard-stat-card.is-spending.is-covered .dashboard-stat-icon,
.dashboard-stat-card.is-saving.is-positive .dashboard-stat-icon {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.13);
}

.dashboard-stat-card.is-saving .dashboard-stat-icon,
.dashboard-stat-card.is-saving.is-empty .dashboard-stat-icon {
  color: #64748b;
  background: rgba(148, 163, 184, 0.14);
}

.dashboard-stat-card.is-saving-total .dashboard-stat-icon,
.dashboard-stat-card.is-blocked .dashboard-stat-icon {
  color: var(--kb-primary);
  background: rgba(99, 102, 241, 0.12);
}

.dashboard-stat-card.is-massbyk .dashboard-stat-icon {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.13);
}

.dashboard-stat-card span {
  grid-area: label;
  display: block;
  min-width: 0;
  padding-right: 0;
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.dashboard-stat-card strong {
  grid-area: value;
  display: block;
  margin-top: 0.34rem;
  color: var(--kb-text);
  font-size: 1.32rem;
  font-weight: 900;
  line-height: 1.05;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.dashboard-stat-card small {
  display: none;
}

.dashboard-stat-badge {
  position: absolute;
  top: 0.72rem;
  right: 0.78rem;
  padding: 0.18rem 0.46rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 950;
  line-height: 1;
}

.dashboard-stat-card.is-spending.is-danger .dashboard-stat-badge {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.dashboard-flow-card {
  margin-top: 2.05rem;
  height: calc(100% - 2.05rem);
  min-height: 0;
  overflow: hidden;
}

.dashboard-flow-card .card-body {
  padding: 0.9rem !important;
}

.dashboard-flow-title {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.72rem 1rem;
  margin-bottom: 0.65rem;
}

.dashboard-flow-title > div:first-child {
  flex: 1 1 auto;
  min-width: 180px;
}

.dashboard-flow-title h2 {
  margin: 0;
  color: var(--kb-text);
  font-size: 1.05rem;
  font-weight: 900;
}

.dashboard-flow-title p {
  margin: 0.18rem 0 0;
  color: var(--kb-muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.dashboard-flow-toggle {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 0.25rem;
  padding: 0.18rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 999px;
  background: #f8f9fd;
}

.dashboard-flow-toggle button {
  min-height: 30px;
  padding: 0 0.78rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--kb-muted);
  font-size: 0.84rem;
  font-weight: 850;
}

.dashboard-flow-toggle button.active {
  background: var(--kb-primary);
  color: #fff;
}

.dashboard-flow-mode {
  display: none;
}

.dashboard-flow-mode.active {
  display: block;
}

.dashboard-objective-strip {
  display: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.36rem;
  margin-left: auto;
}

.dashboard-objective-strip.active {
  display: flex;
}

.dashboard-objective-pill {
  position: relative;
}

.dashboard-objective-pill summary {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--kb-border-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--kb-muted);
  cursor: pointer;
  list-style: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.dashboard-objective-pill summary::-webkit-details-marker {
  display: none;
}

.dashboard-objective-pill summary:hover,
.dashboard-objective-pill[open] summary {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.08);
}

.dashboard-objective-pill summary i {
  font-size: 0.95rem;
}

.dashboard-objective-pill.is-complete summary {
  border-color: rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.08);
  color: #16a34a;
}

.dashboard-objective-pill.is-warning summary {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.1);
  color: #b7791f;
}

.dashboard-objective-pill.is-danger summary {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
}

.dashboard-objective-strip.is-open {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  flex: 0 0 100%;
  order: 2;
  width: 100%;
  margin-top: 0.18rem;
  margin-left: 0;
}

.dashboard-objective-strip.is-open .dashboard-objective-pill {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.58rem;
  align-items: center;
  min-width: 0;
  padding: 0.58rem 0.65rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 10px;
  background: #fbfcff;
}

.dashboard-objective-strip.is-open .dashboard-objective-pill.is-complete {
  border-color: rgba(34, 197, 94, 0.24);
  background: rgba(34, 197, 94, 0.05);
}

.dashboard-objective-strip.is-open .dashboard-objective-pill.is-warning {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.06);
}

.dashboard-objective-strip.is-open .dashboard-objective-pill.is-danger {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.05);
}

.dashboard-objective-detail {
  display: none;
  min-width: 0;
}

.dashboard-objective-pill[open] .dashboard-objective-detail {
  display: grid;
  gap: 0.08rem;
}

.dashboard-objective-detail span {
  min-width: 0;
  overflow: hidden;
  color: var(--kb-text);
  font-size: 0.72rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-objective-detail strong {
  color: var(--kb-text);
  font-size: 0.92rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.dashboard-objective-detail small,
.dashboard-objective-detail em {
  color: var(--kb-muted);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}

.dashboard-objective-pill.is-complete .dashboard-objective-detail em {
  color: #16a34a;
}

.dashboard-objective-pill.is-warning .dashboard-objective-detail em {
  color: #b7791f;
}

.dashboard-objective-pill.is-danger .dashboard-objective-detail em {
  color: #dc2626;
}

.dashboard-flow-map {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(300px, 1fr);
  gap: 0.78rem;
  align-items: stretch;
}

.dashboard-flow-column {
  display: grid;
  gap: 0.42rem;
  align-content: start;
}

.dashboard-flow-label {
  margin-bottom: 0.1rem;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-source-pill,
.dashboard-target-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--kb-border-soft);
  border-radius: 10px;
  background: #fbfcff;
}

.dashboard-source-pill {
  min-height: 44px;
  padding: 0.54rem 0.68rem;
}

.dashboard-source-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-source-main span {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.dashboard-source-main span::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.dashboard-source-main strong {
  color: var(--kb-text);
  font-size: 0.86rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-source-pill.apple .dashboard-source-main span {
  color: #0ea5e9;
}

.dashboard-source-pill.massbyk .dashboard-source-main span {
  color: #8b5cf6;
}

.dashboard-source-pill.other .dashboard-source-main span {
  color: #0f766e;
}

.dashboard-source-detail {
  display: none;
  gap: 0.2rem;
  margin-top: 0.45rem;
  padding-top: 0.42rem;
  border-top: 1px solid var(--kb-border-soft);
}

.dashboard-source-detail.is-open {
  display: grid;
}

.dashboard-source-detail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.42rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f766e;
  font-size: 0.72rem;
  font-weight: 850;
}

.dashboard-source-detail-toggle i {
  transition: transform 0.16s ease;
}

.dashboard-source-detail-toggle.is-open i {
  transform: rotate(180deg);
}

.dashboard-source-detail small {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.dashboard-source-detail small span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-source-detail small strong {
  color: var(--kb-text);
  font-size: 0.72rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dashboard-target-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 0.78rem;
  min-height: 62px;
  padding: 0.62rem 0.72rem 0.76rem;
}

.dashboard-target-card.is-complete {
  border-color: rgba(34, 197, 94, 0.34);
  background:
    linear-gradient(90deg, rgba(34, 197, 94, 0.08), transparent 48%),
    #fbfcff;
}

.dashboard-target-card.is-complete::after {
  content: "OK";
  position: absolute;
  top: 0.62rem;
  right: 0.7rem;
  padding: 0.16rem 0.42rem;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  font-size: 0.62rem;
  font-weight: 950;
  line-height: 1;
}

.dashboard-target-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 14px;
  font-size: 1.15rem;
  background: rgba(99, 102, 241, 0.12);
  color: var(--kb-primary);
}

.dashboard-target-card.spending .dashboard-target-icon {
  background: rgba(245, 158, 11, 0.14);
  color: #b7791f;
}

.dashboard-target-card.saving .dashboard-target-icon {
  background: rgba(34, 197, 94, 0.14);
  color: var(--kb-success);
}

.dashboard-target-card.is-complete .dashboard-target-icon {
  background: rgba(34, 197, 94, 0.14);
  color: #16a34a;
}

.dashboard-target-body {
  min-width: 0;
}

.dashboard-target-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.dashboard-target-head span {
  color: var(--kb-muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.dashboard-target-head small,
.dashboard-target-body small {
  color: var(--kb-muted);
  font-size: 0.75rem;
  font-weight: 750;
}

.dashboard-target-card.is-complete .dashboard-target-head small {
  margin-right: 2.1rem;
  color: #16a34a;
}

.dashboard-target-body strong {
  display: block;
  margin-top: 0.08rem;
  color: var(--kb-text);
  font-size: 0.96rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.dashboard-target-strip {
  position: absolute;
  right: 0.78rem;
  bottom: 0.46rem;
  left: calc(38px + 1.44rem);
  display: flex;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f6;
}

.dashboard-target-card.is-complete .dashboard-target-strip {
  height: 5px;
  background: rgba(34, 197, 94, 0.1);
}

.dashboard-target-strip span {
  height: 100%;
}

.dashboard-target-strip .apple {
  background: #0ea5e9;
}

.dashboard-target-strip .massbyk {
  background: #8b5cf6;
}

.dashboard-target-strip .other {
  background: #0f766e;
}

.dashboard-target-strip .empty {
  flex: 1 1 auto;
  background: repeating-linear-gradient(
    135deg,
    #edf0f6 0,
    #edf0f6 8px,
    #e1e6ef 8px,
    #e1e6ef 16px
  );
}

/* Cards */
.card {
  border: 1px solid var(--kb-border) !important;
  border-radius: var(--kb-radius) !important;
  background: var(--kb-surface) !important;
  box-shadow: var(--kb-shadow) !important;
}

.card:hover {
  box-shadow: var(--kb-shadow-hover) !important;
}

.card-body {
  padding: 1.35rem !important;
}

.dashboard-kpi-card {
  min-height: 150px;
  cursor: pointer;
}

.dashboard-kpi-card .card-body {
  display: flex;
  flex-direction: column;
}

.dashboard-kpi-title {
  color: #8a91a6 !important;
  font-size: 0.8rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.dashboard-score {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: 0.45rem auto 0.55rem;
  border-radius: 50%;
  background: #eef1f7;
  color: #4b5368;
  font-size: 1.1rem;
  font-weight: 900;
}

.dashboard-score.success {
  background: var(--kb-success);
  color: #fff;
}

.dashboard-score.danger {
  background: var(--kb-danger);
  color: #fff;
}

.dashboard-kpi-summary {
  margin-top: auto;
  padding-top: 0.55rem;
  border-top: 1px solid var(--kb-border-soft);
  color: var(--kb-muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.dashboard-kpi-summary strong {
  color: var(--kb-text);
}

.dashboard-progress-wrap {
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  min-height: 58px;
}

.progress {
  overflow: hidden;
  background: #edf0f6;
  border-radius: 999px;
}

.progress-bar {
  border-radius: inherit;
}

/* Sections */
.dashboard-section {
  margin-top: 2.15rem;
}

.dashboard-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.88rem 1rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.04);
}

.dashboard-section-title span {
  display: block;
  margin-bottom: 0.08rem;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dashboard-section-title h2 {
  margin: 0;
  color: var(--kb-text);
  font-size: 1.42rem;
  line-height: 1.05;
}

.dashboard-section-title strong {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
}

.dashboard-section-title .badge {
  background: transparent !important;
  color: var(--kb-text);
  font-size: 1.05rem;
  font-weight: 900;
}

/* Account page */
.account-page {
  max-width: 1180px;
}

.account-hero-card,
.account-add-card {
  margin-bottom: 1.15rem;
}

.account-quickadd-card .quickadd-card {
  box-shadow: none;
}

.account-quickadd-card .quickadd-form {
  gap: 0.62rem;
}


.account-quickadd-card {
  overflow: hidden;
}

.account-quickadd-wizard {
  display: grid;
  gap: 0.55rem;
}

.account-quickadd-wizard .quickadd-card {
  gap: 0.6rem;
  padding: 0.78rem;
  border-radius: 12px;
  background: #fbfcff;
}

.account-quickadd-wizard .quickadd-step-summary {
  min-height: 44px;
  padding: 0.5rem 0.68rem;
  border-radius: 12px;
  background: #fbfcff;
  box-shadow: none;
}

.account-quickadd-wizard .quickadd-next,
.account-quickadd-wizard .quickadd-link-button {
  justify-self: start;
  min-width: 176px;
  padding-right: 0.9rem;
  padding-left: 0.9rem;
}

.account-quickadd-wizard .quickadd-suggestions {
  gap: 0.38rem;
}

.account-quickadd-wizard .quickadd-category-chip {
  min-height: 34px;
  padding-right: 0.62rem;
  padding-left: 0.62rem;
  font-size: 0.78rem;
}

.account-date-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  gap: 0.45rem;
}

.account-date-chip {
  display: grid;
  gap: 0.12rem;
  min-height: 58px;
  padding: 0.55rem 0.48rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
  color: var(--kb-muted);
  font-weight: 900;
  text-align: center;
}

.account-date-chip span {
  overflow: hidden;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-date-chip strong {
  color: var(--kb-text);
  font-size: 0.9rem;
  font-weight: 950;
}

.types-group-metrics em {
  margin-top: 0.1rem;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

.types-group-metrics .is-expense strong {
  color: #dc2626;
}

.types-group-metrics .is-income strong {
  color: #16a34a;
}

.account-date-chip.is-selected {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.08);
  color: var(--kb-primary);
}

.account-date-chip.is-selected strong {
  color: var(--kb-primary);
}


@media (min-width: 768px) {
  .account-quickadd-wizard .account-collapsible-body {
    display: grid;
    grid-template-columns: 1.1fr 1.1fr 0.8fr;
    gap: 0.55rem;
  }

  .account-quickadd-wizard .quickadd-step.is-active {
    grid-column: 1 / -1;
    order: 2;
  }

  .account-quickadd-wizard .quickadd-step:not(.is-active) {
    order: 1;
  }

  .account-quickadd-wizard .quickadd-card {
    grid-template-columns: 130px minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
  }

  .account-quickadd-wizard .quickadd-label {
    margin: 0;
  }

  .account-quickadd-wizard .form-control,
  .account-quickadd-wizard .form-select,
  .account-quickadd-wizard .quickadd-amount-wrap,
  .account-quickadd-wizard .quickadd-suggestions,
  .account-quickadd-wizard [data-account-category-manual],
  .account-quickadd-wizard [data-account-date-manual],
  .account-quickadd-wizard .account-date-options {
    grid-column: 2;
  }

  .account-quickadd-wizard .quickadd-next,
  .account-quickadd-wizard .quickadd-link-button,
  .account-quickadd-wizard .quickadd-final-actions {
    grid-column: 3;
    justify-self: stretch;
    min-width: 180px;
  }

  .account-quickadd-wizard .quickadd-link-button + [data-account-category-manual],
  .account-quickadd-wizard .quickadd-link-button + [data-account-date-manual] {
    grid-row: auto;
  }

  .account-quickadd-wizard .quickadd-step-summary {
    grid-template-columns: 1fr;
    gap: 0.12rem;
    min-height: 58px;
  }

  .account-quickadd-wizard .quickadd-step-summary i {
    display: none;
  }
}

.account-hero-card {
  overflow: hidden;
}

.account-hero-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--kb-success);
}

.account-hero-card.is-blocked::before {
  background: #94a3b8;
}

.account-hero-card .card-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.15rem !important;
}

.account-hero-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  min-width: 0;
}

.account-hero-logo {
  flex-basis: 58px;
  width: 58px;
  height: 58px;
}

.account-hero-main h1 {
  margin: 0.12rem 0 0.42rem;
  color: var(--kb-text);
  font-size: 1.55rem;
  line-height: 1.05;
}

.account-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 0.65rem;
}

.account-hero-metrics div {
  min-width: 0;
  padding: 0.72rem 0.78rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 10px;
  background: #fbfcff;
}

.account-hero-metrics span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.account-hero-metrics strong {
  display: block;
  margin-top: 0.25rem;
  font-size: 1.15rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.account-add-card .card-body,
.account-expected-card .card-body {
  padding: 1.15rem !important;
}

.account-add-card {
  min-height: 100%;
}


.account-collapse-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.75rem;
  align-items: center;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--kb-text);
  text-align: left;
}

.account-collapse-head span:first-child {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.account-collapse-head small {
  color: var(--kb-muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-collapse-head strong {
  color: var(--kb-text);
  font-size: 1.08rem;
  font-weight: 950;
}

.account-collapse-head > i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--kb-primary-soft);
  color: var(--kb-primary);
  font-size: 1.25rem;
  transition: transform 0.18s ease;
}

.account-collapse-head.is-open > i {
  transform: rotate(45deg);
}

.account-expected-card .account-collapse-head.is-open > i {
  transform: rotate(180deg);
}

.account-collapse-meta {
  justify-self: end;
}

.account-collapsible-body {
  margin-top: 0.9rem;
}

.account-collapsible-body[hidden] {
  display: none;
}

.account-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
  text-align: left;
}

.account-panel-head span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-panel-head h2 {
  margin: 0.08rem 0 0;
  color: var(--kb-text);
  font-size: 1.08rem;
  font-weight: 900;
}

.account-panel-head .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 38px;
  padding-right: 0.9rem;
  padding-left: 0.9rem;
}

.account-add-grid {
  display: grid;
  grid-template-columns: minmax(110px, 0.9fr) minmax(180px, 1.45fr) minmax(165px, 1.25fr) minmax(145px, 0.95fr) auto;
  gap: 0.72rem;
  align-items: end;
}

.account-field {
  display: grid;
}

.form-label {
  margin-bottom: 0.38rem;
}

.account-add-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 46px;
  padding-right: 1rem;
  padding-left: 1rem;
  white-space: nowrap;
}

.account-expected-card {
  margin-bottom: 1.15rem;
}

.account-panel-head {
  align-items: center;
}

.account-expected-card .account-panel-head .badge {
  background: transparent !important;
  color: var(--kb-text);
  font-size: 0.95rem;
  font-weight: 900;
}

.account-expected-list {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 0.95rem;
}

.account-expected-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.68rem 0.75rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 10px;
  background: #fbfcff;
}

.account-expected-item span,
.account-expected-item small {
  color: var(--kb-muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.account-expected-item strong {
  display: block;
  margin: 0.12rem 0;
  color: var(--kb-text);
  font-size: 0.92rem;
  font-weight: 900;
}

.account-expected-actions {
  display: flex;
  gap: 0.4rem;
}

.account-expected-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  min-height: 30px;
  padding: 0.32rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 850;
}

.account-expected-form {
  display: grid;
  grid-template-columns: 1.05fr 1.35fr 1fr 1.15fr 0.9fr 1.05fr auto;
  gap: 0.55rem;
  align-items: center;
}

.account-expected-form .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 42px;
  white-space: nowrap;
}

.account-month-card {
  overflow: hidden;
  margin-bottom: 1rem;
}

.account-month-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 1rem 1.15rem;
  border: 0;
  background: #fff;
  text-align: left;
}

.account-month-title {
  display: inline-flex;
  align-items: center;
  gap: 0.48rem;
  color: var(--kb-text);
}

.account-month-title i {
  color: var(--kb-muted);
  font-size: 1.15rem;
}

.account-month-title strong {
  font-size: 1.05rem;
  font-weight: 900;
}

.account-month-kpis {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-month-kpis > span:first-child {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.account-month-kpis small {
  font-size: 0.76rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.account-month-kpis .is-income {
  color: var(--kb-success);
}

.account-month-kpis .is-expense {
  color: var(--kb-danger);
}

.account-operations-table {
  --si-table-striped-bg: rgba(17, 24, 39, 0.025);
}

.account-operations-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff;
}

.account-operations-table td,
.account-operations-table th {
  padding: 0.62rem 0.9rem !important;
}

.account-operation-date {
  color: var(--kb-muted) !important;
  font-size: 0.8rem;
  font-weight: 800 !important;
  white-space: nowrap;
}

.account-operation-label {
  color: var(--kb-text) !important;
  font-weight: 800 !important;
}

/* Account cards */
.account-card {
  height: 100%;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.account-card:hover {
  transform: translateY(-2px);
}

.account-card-modern {
  position: relative;
  overflow: hidden;
}

.account-card-modern::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--kb-success);
}

.account-card-modern.is-blocked::before {
  background: #94a3b8;
}

.account-card-modern .card-body {
  display: flex;
  flex-direction: column;
  min-height: 196px;
  padding: 1.08rem !important;
}

.account-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.account-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid var(--kb-border-soft);
  border-radius: 13px;
  background: #f8f9fd;
  color: var(--kb-primary);
  font-size: 1.35rem;
}

.account-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.42rem;
}

.account-card-title-wrap {
  min-width: 0;
}

.account-card-title {
  overflow: hidden;
  margin: 0;
  color: var(--kb-text);
  font-size: 1.05rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-bank-name {
  display: block;
  overflow: hidden;
  margin-top: 0.2rem;
  color: var(--kb-muted);
  font-size: 0.8rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-balance-block {
  margin: 1.08rem 0 0.8rem;
}

.account-balance-label,
.account-meta-label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.account-balance {
  display: block;
  margin-top: 0.25rem;
  color: var(--kb-text);
  font-size: clamp(1.55rem, 1.8vw, 1.95rem);
  font-weight: 900;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
}

.account-pending-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding: 0.62rem 0.72rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 10px;
  background: #fafbff;
}

.account-pending-line strong {
  overflow: hidden;
  color: var(--kb-text);
  font-size: 0.92rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 0.78rem;
}

.account-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.account-status-pill.is-blocked {
  color: #64748b;
}

/* Billets page */
.billets-page {
  padding-top: 1.4rem;
  padding-bottom: 3rem;
}

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

.billets-hero h1 {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  margin: 0;
  color: var(--kb-text);
  font-size: 1.7rem;
  line-height: 1.08;
}

.billets-hero h1 i {
  color: var(--kb-text);
  font-size: 1.75rem;
}

.billets-hero span {
  display: block;
  margin-top: 0.2rem;
  color: var(--kb-muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.billets-status {
  display: inline-grid;
  grid-template-columns: 34px auto;
  grid-template-rows: auto auto;
  column-gap: 0.58rem;
  align-items: center;
  min-width: 178px;
  padding: 0.62rem 0.78rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
}

.billets-status i {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 1.1rem;
}

.billets-status strong {
  color: var(--kb-text);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.1;
}

.billets-status small {
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.billets-status.is-ok i {
  background: rgba(34, 197, 94, 0.13);
  color: #16a34a;
}

.billets-status.is-alert i {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.billets-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.78rem;
  margin-bottom: 0.9rem;
}

.billets-summary-card {
  position: relative;
  min-height: 92px;
  overflow: hidden;
  padding: 0.9rem 3.8rem 0.9rem 0.95rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(99, 102, 241, 0.04), transparent 72%),
    #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.055);
}

.billets-summary-card::before {
  content: "";
  position: absolute;
  right: 0.95rem;
  bottom: 0.62rem;
  left: 0.95rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
}

.billets-summary-card span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.billets-summary-card strong {
  display: block;
  margin-top: 0.34rem;
  color: var(--kb-text);
  font-size: 1.3rem;
  font-weight: 950;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.billets-summary-card i {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--kb-primary);
  font-size: 1.22rem;
}

.billets-summary-card.is-ok::before {
  background: rgba(34, 197, 94, 0.28);
}

.billets-summary-card.is-ok i {
  background: rgba(34, 197, 94, 0.13);
  color: #16a34a;
}

.billets-summary-card.is-alert::before {
  background: rgba(239, 68, 68, 0.22);
}

.billets-summary-card.is-alert i {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.billets-summary-card.is-massbyk::before {
  background: rgba(139, 92, 246, 0.24);
}

.billets-summary-card.is-massbyk i {
  background: rgba(139, 92, 246, 0.13);
  color: #8b5cf6;
}

.billets-layout {
  display: grid;
  grid-template-columns: minmax(520px, 1fr) minmax(320px, 0.48fr);
  gap: 1rem;
  align-items: start;
}

.billets-count-card .card-body,
.billets-control-card .card-body,
.billets-massbyk-card .card-body {
  padding: 1rem !important;
}

.billets-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.billets-panel-head span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.billets-panel-head h2 {
  margin: 0.08rem 0 0;
  color: var(--kb-text);
  font-size: 1.08rem;
  font-weight: 900;
}

.billets-panel-head > strong {
  color: var(--kb-text);
  font-size: 1.1rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.billets-panel-head > i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: rgba(139, 92, 246, 0.13);
  color: #8b5cf6;
  font-size: 1.1rem;
}

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

.billet-card {
  position: relative;
  overflow: hidden;
  padding: 0.78rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: #fbfcff;
}

.billet-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: var(--billet-accent, var(--kb-primary));
}

.billet-5 {
  --billet-accent: #64748b;
}

.billet-10 {
  --billet-accent: #b7791f;
}

.billet-20 {
  --billet-accent: #0ea5e9;
}

.billet-50 {
  --billet-accent: #f97316;
}

.billet-100 {
  --billet-accent: #22c55e;
}

.billet-200 {
  --billet-accent: #eab308;
}

.billet-card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
}

.billet-card-top span {
  color: var(--billet-accent, var(--kb-primary));
  font-size: 1.05rem;
  font-weight: 950;
}

.billet-card-top strong {
  color: var(--kb-text);
  font-size: 0.92rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.billet-stepper,
.billets-massbyk-stepper {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 36px;
  gap: 0.45rem;
  align-items: center;
}

.billet-stepper a,
.billet-stepper button,
.billets-massbyk-stepper a,
.billets-massbyk-stepper button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--kb-border-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--kb-text);
  font-size: 0.86rem;
  font-weight: 900;
  box-shadow: none;
}

.billet-stepper a,
.billets-massbyk-stepper a {
  color: var(--billet-accent, var(--kb-primary));
}

.billet-stepper a:hover,
.billets-massbyk-stepper a:hover {
  border-color: rgba(99, 102, 241, 0.25);
  background: var(--kb-primary-soft);
  color: var(--kb-primary);
}

.billet-stepper a.is-disabled,
.billets-massbyk-stepper a.is-disabled {
  pointer-events: none;
  opacity: 0.38;
}

.billet-stepper button,
.billets-massbyk-stepper button {
  width: 100%;
}

.billet-direct-form {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.billet-direct-form.is-open {
  display: grid;
}

.billet-direct-form .form-control {
  min-height: 36px;
}

.billets-side {
  display: grid;
  gap: 1rem;
}

.billets-control-card {
  overflow: hidden;
}

.billets-control-card::before,
.billets-massbyk-card::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--kb-primary);
}

.billets-control-card.is-ok::before {
  background: var(--kb-success);
}

.billets-control-card.is-alert::before {
  background: var(--kb-danger);
}

.billets-massbyk-card::before {
  background: #8b5cf6;
}

.billets-urssaf-section {
  margin-top: 1.15rem;
}

.billets-section-title {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.72rem;
  color: var(--kb-muted);
}

.billets-section-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--kb-border-soft);
}

.billets-section-title span {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.billets-section-title h2 {
  margin: 0;
  color: var(--kb-text);
  font-size: 1.05rem;
  font-weight: 900;
}

.billets-massbyk-main {
  display: grid;
  grid-template-columns: minmax(230px, 0.7fr) minmax(280px, 1fr) minmax(260px, 0.8fr);
  gap: 1rem;
  align-items: center;
}

.billets-massbyk-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.billets-massbyk-head i {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: rgba(139, 92, 246, 0.13);
  color: #8b5cf6;
  font-size: 1.28rem;
}

.billets-massbyk-head span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.billets-massbyk-head strong {
  display: block;
  margin-top: 0.16rem;
  color: var(--kb-text);
  font-size: 1.35rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.billets-control-status {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 0.62rem;
  align-items: center;
  margin-bottom: 0.78rem;
  padding: 0.7rem;
  border-radius: 12px;
  background: #f8f9fd;
}

.billets-control-card.is-ok .billets-control-status {
  background: rgba(34, 197, 94, 0.08);
}

.billets-control-card.is-alert .billets-control-status {
  background: rgba(239, 68, 68, 0.08);
}

.billets-control-status i {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 13px;
  background: #fff;
  font-size: 1.15rem;
}

.billets-control-card.is-ok .billets-control-status i {
  color: #16a34a;
}

.billets-control-card.is-alert .billets-control-status i {
  color: #dc2626;
}

.billets-control-status strong {
  color: var(--kb-text);
  font-size: 0.88rem;
  font-weight: 900;
  line-height: 1.25;
}

.billets-total-list {
  display: grid;
  gap: 0.12rem;
}

.billets-total-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 42px;
  border-bottom: 1px solid var(--kb-border-soft);
}

.billets-total-list div:last-child {
  border-bottom: 0;
}

.billets-total-list span {
  color: var(--kb-muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.billets-total-list strong {
  color: var(--kb-text);
  font-size: 0.92rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.billets-total-list .is-ok strong {
  color: #16a34a;
}

.billets-total-list .is-alert strong {
  color: #dc2626;
}

.billets-massbyk-stepper {
  margin-bottom: 0.55rem;
}

.billets-massbyk-stepper a {
  color: #8b5cf6;
}

.billets-massbyk-stepper button {
  color: var(--kb-text);
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}

/* Operations list page */
.oplist-page {
  padding-top: 1.4rem;
  padding-bottom: 3rem;
}

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

.oplist-hero h1 {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  margin: 0;
  color: var(--kb-text);
  font-size: 1.7rem;
  line-height: 1.08;
}

.oplist-hero h1 i {
  font-size: 1.55rem;
}

.oplist-hero span {
  display: block;
  margin-top: 0.2rem;
  color: var(--kb-muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.oplist-clear-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 38px;
  padding: 0 0.78rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--kb-muted);
  font-size: 0.82rem;
  font-weight: 850;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.04);
}

.oplist-clear-link:hover {
  color: var(--kb-primary);
}

.oplist-filter-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.22fr) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: end;
  margin-bottom: 0.9rem;
  padding: 0.95rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.05);
}

.oplist-filter-head span,
.oplist-filters label > span,
.oplist-table-head > div > span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.oplist-filter-head strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--kb-text);
  font-size: 1.02rem;
  font-weight: 950;
}

.oplist-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.oplist-filters label {
  margin: 0;
}

.oplist-filters label > span {
  margin-bottom: 0.34rem;
  text-transform: none;
}

.oplist-filters .form-select {
  min-height: 40px;
}

.oplist-empty-card .card-body {
  display: grid;
  place-items: center;
  min-height: 180px;
  text-align: center;
}

.oplist-empty-card i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 0.3rem;
  border-radius: 16px;
  background: var(--kb-primary-soft);
  color: var(--kb-primary);
  font-size: 1.35rem;
}

.oplist-empty-card strong {
  color: var(--kb-text);
  font-size: 1.08rem;
  font-weight: 900;
}

.oplist-empty-card span {
  color: var(--kb-muted);
  font-weight: 700;
}

.oplist-currency-panel {
  display: grid;
  gap: 0.9rem;
}

.oplist-currency-panel + .oplist-currency-panel {
  margin-top: 1rem;
}

.oplist-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.78rem;
}

.oplist-summary-card {
  position: relative;
  min-height: 90px;
  overflow: hidden;
  padding: 0.9rem 3.8rem 0.85rem 0.95rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(99, 102, 241, 0.04), transparent 72%),
    #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.055);
}

.oplist-summary-card::before {
  content: "";
  position: absolute;
  right: 0.95rem;
  bottom: 0.62rem;
  left: 0.95rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
}

.oplist-summary-card span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.oplist-summary-card strong {
  display: block;
  margin-top: 0.36rem;
  color: var(--kb-text);
  font-size: 1.2rem;
  font-weight: 950;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.oplist-summary-card strong.is-positive {
  color: #16a34a;
}

.oplist-summary-card strong.is-negative {
  color: #dc2626;
}

.oplist-summary-card i {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--kb-primary);
  font-size: 1.22rem;
}

.oplist-summary-card.is-income::before {
  background: rgba(34, 197, 94, 0.28);
}

.oplist-summary-card.is-income i {
  background: rgba(34, 197, 94, 0.13);
  color: #16a34a;
}

.oplist-summary-card.is-expense::before {
  background: rgba(239, 68, 68, 0.22);
}

.oplist-summary-card.is-expense i {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.oplist-table-card {
  overflow: hidden;
}

.oplist-table-card .card-body {
  padding: 0 !important;
}

.oplist-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem 0.85rem;
  border-bottom: 1px solid var(--kb-border-soft);
}

.oplist-table-head h2 {
  margin: 0.08rem 0 0;
  color: var(--kb-text);
  font-size: 1.1rem;
  font-weight: 900;
}

.oplist-extremes {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 0.25rem;
  text-align: right;
}

.oplist-extremes small {
  color: var(--kb-muted);
  font-size: 0.74rem;
  font-weight: 750;
}

.oplist-extremes strong {
  color: var(--kb-text);
  font-weight: 900;
}

.oplist-table {
  min-width: 880px;
  --si-table-striped-bg: rgba(17, 24, 39, 0.025);
}

.oplist-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.72rem 0.9rem !important;
  background: #fff;
  color: #394052;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.oplist-table tbody th,
.oplist-table tbody td {
  padding: 0.58rem 0.9rem !important;
  font-size: 0.8rem;
}

.oplist-table tbody th {
  color: var(--kb-text);
  font-weight: 900;
}

.oplist-table tbody th span {
  display: inline-block;
}

.oplist-table tbody th small {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.oplist-table tbody td {
  color: var(--kb-muted);
  font-weight: 750;
  text-align: right;
  white-space: nowrap;
}

.oplist-table tbody tr.is-positive {
  --si-table-striped-bg: rgba(34, 197, 94, 0.045);
}

.oplist-table tbody tr.is-negative {
  --si-table-striped-bg: rgba(239, 68, 68, 0.035);
}

.oplist-table .text-success,
.oplist-table .is-positive {
  color: #16a34a !important;
}

.oplist-table .text-danger,
.oplist-table .is-negative {
  color: #ef4444 !important;
}

/* Shared analysis pages */
.analysis-page {
  padding-top: 1.4rem;
  padding-bottom: 3rem;
}

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

.analysis-hero h1 {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  margin: 0;
  color: var(--kb-text);
  font-size: 1.7rem;
  line-height: 1.08;
}

.analysis-hero h1 i {
  font-size: 1.55rem;
}

.analysis-hero span {
  display: block;
  margin-top: 0.2rem;
  color: var(--kb-muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.analysis-action-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 38px;
  padding: 0 0.78rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--kb-muted);
  font-size: 0.82rem;
  font-weight: 850;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.04);
}

.analysis-action-link.is-alert {
  color: #dc2626;
}

.analysis-action-link:hover {
  color: var(--kb-primary);
}

.analysis-topline {
  display: grid;
  grid-template-columns: minmax(220px, 0.32fr) minmax(0, 1fr);
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.analysis-filter-card {
  display: grid;
  gap: 0.72rem;
  min-height: 100%;
  padding: 0.95rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.05);
}

.analysis-filter-head span,
.analysis-filter-card label > span,
.analysis-table-head > div > span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.analysis-filter-head strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--kb-text);
  font-size: 1.02rem;
  font-weight: 950;
}

.analysis-filter-card label {
  margin: 0;
}

.analysis-filter-card label > span {
  margin-bottom: 0.34rem;
  text-transform: none;
}

.analysis-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.78rem;
}

.analysis-summary-card {
  position: relative;
  min-height: 90px;
  overflow: hidden;
  padding: 0.9rem 3.8rem 0.85rem 0.95rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(99, 102, 241, 0.04), transparent 72%),
    #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.055);
}

.analysis-summary-card::before {
  content: "";
  position: absolute;
  right: 0.95rem;
  bottom: 0.62rem;
  left: 0.95rem;
  height: 3px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.18);
}

.analysis-summary-card span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.analysis-summary-card strong {
  display: block;
  margin-top: 0.36rem;
  color: var(--kb-text);
  font-size: 1.2rem;
  font-weight: 950;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.analysis-summary-card small {
  display: block;
  margin-top: 0.15rem;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: right;
}

.analysis-summary-card strong.is-positive,
.analysis-summary-card.is-income strong,
.analysis-summary-card.is-ok strong {
  color: #16a34a;
}

.analysis-summary-card strong.is-negative,
.analysis-summary-card.is-expense strong,
.analysis-summary-card.is-alert strong {
  color: #dc2626;
}

.analysis-summary-card i {
  position: absolute;
  top: 0.8rem;
  right: 0.9rem;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(99, 102, 241, 0.12);
  color: var(--kb-primary);
  font-size: 1.22rem;
}

.analysis-summary-card.is-income::before,
.analysis-summary-card.is-positive::before,
.analysis-summary-card.is-ok::before {
  background: rgba(34, 197, 94, 0.28);
}

.analysis-summary-card.is-income i,
.analysis-summary-card.is-positive i,
.analysis-summary-card.is-ok i {
  background: rgba(34, 197, 94, 0.13);
  color: #16a34a;
}

.analysis-summary-card.is-expense::before,
.analysis-summary-card.is-negative::before,
.analysis-summary-card.is-alert::before {
  background: rgba(239, 68, 68, 0.22);
}

.analysis-summary-card.is-expense i,
.analysis-summary-card.is-negative i,
.analysis-summary-card.is-alert i {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.analysis-table-card {
  overflow: hidden;
}

.analysis-table-card .card-body {
  padding: 0 !important;
}

.analysis-table-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem 0.85rem;
  border-bottom: 1px solid var(--kb-border-soft);
}

.analysis-table-head h2 {
  margin: 0.08rem 0 0;
  color: var(--kb-text);
  font-size: 1.1rem;
  font-weight: 900;
}

.analysis-table {
  --si-table-striped-bg: rgba(17, 24, 39, 0.025);
}

.analysis-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 0.72rem 0.9rem !important;
  background: #fff;
  color: #394052;
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.analysis-table tbody th,
.analysis-table tbody td,
.analysis-table tfoot th,
.analysis-table tfoot td {
  padding: 0.58rem 0.9rem !important;
  font-size: 0.8rem;
}

.analysis-table tbody th {
  color: var(--kb-text);
  font-weight: 900;
}

.analysis-table tbody th span {
  display: inline-block;
}

.analysis-table tbody th small {
  display: block;
  margin-top: 0.1rem;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 750;
}

.analysis-table tbody td {
  color: var(--kb-muted);
  font-weight: 750;
  text-align: right;
  white-space: nowrap;
}

.analysis-table tfoot th,
.analysis-table tfoot td {
  border-top: 1px solid var(--kb-border);
  background: #fbfcff;
  color: var(--kb-text);
  font-weight: 950;
  text-align: right;
}

.analysis-table tfoot th:first-child {
  text-align: left;
}

.analysis-table tbody tr.is-alert {
  --si-table-striped-bg: rgba(239, 68, 68, 0.035);
}

.analysis-table .is-positive,
.analysis-table .text-success {
  color: #16a34a !important;
}

.analysis-table .is-negative,
.analysis-table .text-danger,
.analysis-table .is-alert {
  color: #dc2626 !important;
}

.budget-table {
  min-width: 980px;
}

.budget-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.05);
}

.budget-year-form {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 0 auto;
}

.budget-year-form label {
  display: grid;
  grid-template-columns: auto minmax(110px, 1fr);
  gap: 0.55rem;
  align-items: center;
  margin: 0;
}

.budget-year-form span,
.budget-mini-metrics span {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.budget-year-form .form-select {
  min-height: 38px;
}

.budget-mini-metrics {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-width: 0;
}

.budget-mini-metrics article {
  display: grid;
  gap: 0.12rem;
  min-width: 142px;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 10px;
  background: #fbfcff;
}

.budget-mini-metrics strong {
  color: var(--kb-text);
  font-size: 0.98rem;
  font-weight: 950;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.budget-mini-metrics .is-expense strong,
.budget-mini-metrics .is-alert strong {
  color: #dc2626;
}

.budget-mini-metrics .is-ok strong {
  color: #16a34a;
}

.budget-total-cell.is-alert {
  color: #dc2626;
  font-weight: 950;
}

.budget-create-form {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  min-width: min(420px, 100%);
}

.budget-create-form .form-control {
  min-height: 38px;
}

.category-toolbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
  padding: 0.68rem 0.78rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.05);
}

.category-tabs {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 0.2rem;
  padding: 0.18rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 999px;
  background: #f8f9fd;
}

.category-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 0.78rem;
  border-radius: 999px;
  color: var(--kb-muted);
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.category-tabs a.active {
  background: var(--kb-primary);
  color: #fff;
}

.category-topline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  flex: 1 1 auto;
}

.category-topline article {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 10px;
  background: #fbfcff;
}

.category-topline span {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.category-topline strong {
  overflow: hidden;
  color: var(--kb-text);
  font-size: 0.98rem;
  font-weight: 950;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.category-insight-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.category-donut-card,
.category-bars-card,
.category-table-card {
  overflow: hidden;
}

.category-donut-card .card-body,
.category-bars-card .card-body {
  padding: 0 !important;
}

.category-donut-layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.05rem;
}

.category-donut {
  position: relative;
  display: grid;
  place-items: center;
  width: 180px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--category-donut));
}

.category-donut::after {
  content: "";
  position: absolute;
  inset: 36px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--kb-border-soft);
}

.category-donut span {
  position: relative;
  z-index: 1;
  color: var(--kb-text);
  font-size: 1.15rem;
  font-weight: 950;
}

.category-donut-legend {
  display: grid;
  gap: 0.32rem;
  max-height: 252px;
  overflow: auto;
  padding-right: 0.25rem;
}

.category-donut-legend div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 28px;
}

.category-donut-legend div::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--category-color);
}

.category-donut-legend span {
  flex: 1 1 auto;
  overflow: hidden;
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-donut-legend strong {
  color: var(--kb-text);
  font-size: 0.78rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.category-bar-list {
  display: grid;
  gap: 0.58rem;
  max-height: 360px;
  overflow: auto;
  padding: 1rem 1.05rem;
}

.category-bar-item {
  display: grid;
  gap: 0.28rem;
}

.category-bar-item div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.category-bar-item span {
  overflow: hidden;
  color: var(--kb-muted);
  font-size: 0.82rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-bar-item strong {
  color: var(--kb-text);
  font-size: 0.86rem;
  font-weight: 950;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.category-bar-item strong.is-positive {
  color: #16a34a;
}

.category-bar-item strong.is-negative {
  color: #dc2626;
}

.category-bar-item em,
.category-row-bar {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f6;
}

.category-bar-item em::before,
.category-row-bar::before {
  content: "";
  display: block;
  width: var(--category-width);
  height: 100%;
  border-radius: inherit;
  background: var(--category-color);
}

.category-table {
  min-width: 820px;
}

.category-table tbody th {
  min-width: 220px;
}

.category-row-bar {
  margin-top: 0.4rem;
  max-width: 220px;
}

.category-sparkline {
  display: grid;
  grid-template-columns: repeat(12, minmax(5px, 1fr));
  align-items: end;
  gap: 3px;
  width: min(170px, 100%);
  height: 34px;
  margin-left: auto;
}

.category-sparkline span {
  display: block;
  height: var(--spark-height);
  min-height: 4px;
  border-radius: 999px 999px 3px 3px;
  background: color-mix(in srgb, var(--category-color), #ffffff 18%);
}

.monthly-page {
  padding-bottom: 4rem;
}

.monthly-hero {
  align-items: flex-start;
}

.monthly-period-form {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 16px 36px rgba(17, 24, 39, 0.06);
}

.monthly-period-form .form-select {
  width: auto;
  min-width: 120px;
  min-height: 38px;
  border-radius: 12px;
  font-weight: 850;
}

.monthly-nav-link {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  color: var(--kb-primary);
  background: #f8f9ff;
}

.monthly-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.monthly-metric-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem;
  min-height: 150px;
  padding: 1rem 1.05rem;
  overflow: hidden;
  border: 1px solid var(--kb-border-soft);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.07);
}

.monthly-metric-card::after {
  content: "";
  position: absolute;
  right: 1rem;
  bottom: 0.72rem;
  left: 1rem;
  height: 4px;
  border-radius: 999px;
  background: #e4e1ff;
}

.monthly-metric-card span,
.monthly-metric-card small,
.monthly-metric-card em {
  color: var(--kb-muted);
  font-weight: 850;
}

.monthly-metric-card span {
  font-size: 0.82rem;
}

.monthly-metric-card strong {
  display: block;
  margin-top: 0.45rem;
  color: var(--kb-text);
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 950;
  letter-spacing: 0;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.monthly-metric-card small {
  display: block;
  margin-top: 0.22rem;
  font-size: 0.74rem;
}

.monthly-metric-card > i {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  color: var(--kb-primary);
  background: #ecebff;
  font-size: 1.55rem;
}

.monthly-metric-card em {
  grid-column: 1 / -1;
  align-self: end;
  font-size: 0.76rem;
  font-style: normal;
}

.monthly-metric-card em.is-positive {
  color: #16a34a;
}

.monthly-metric-card em.is-negative {
  color: #dc2626;
}

.monthly-metric-card.is-income::after,
.monthly-metric-card.is-income > i {
  color: #16a34a;
  background: #e3f8eb;
}

.monthly-metric-card.is-expense::after,
.monthly-metric-card.is-expense > i {
  color: #dc2626;
  background: #fee8e8;
}

.monthly-metric-card.is-purple > i {
  color: #7c3aed;
  background: #efe7ff;
}

.monthly-metric-card.is-income::after {
  background: #b9efce;
}

.monthly-metric-card.is-expense::after {
  background: #facaca;
}

.monthly-metric-card.is-purple::after,
.monthly-metric-card.is-muted::after {
  background: #ddd6fe;
}

.monthly-layout,
.monthly-comparison-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(340px, 0.7fr);
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.monthly-flow-card,
.monthly-breakdown-card,
.monthly-table-card {
  overflow: hidden;
}

.monthly-flow-card .card-body,
.monthly-breakdown-card .card-body,
.monthly-table-card .card-body {
  padding: 0 !important;
}

.monthly-flow-chart {
  display: grid;
  grid-template-columns: repeat(31, minmax(8px, 1fr));
  gap: 0.28rem;
  min-height: 250px;
  padding: 1rem 1.05rem 1.25rem;
  overflow-x: auto;
}

.monthly-day {
  display: grid;
  grid-template-rows: 1fr 1fr auto;
  gap: 0.18rem;
  min-width: 16px;
  height: 210px;
}

.monthly-day span {
  align-self: end;
  display: block;
  height: var(--bar-height);
  min-height: 0;
  border-radius: 999px;
}

.monthly-income-bar {
  background: #22c55e;
}

.monthly-expense-bar {
  align-self: start !important;
  background: #ef4444;
}

.monthly-day small {
  color: var(--kb-muted);
  font-size: 0.62rem;
  font-weight: 850;
  text-align: center;
}

.monthly-line-chart {
  padding: 1rem 1.05rem 1.1rem;
}

.monthly-line-chart svg {
  display: block;
  width: 100%;
  min-height: 250px;
  overflow: visible;
}

.monthly-axis {
  stroke: #e5e7eb;
  stroke-width: 2;
}

.monthly-grid-line {
  stroke: #eef1f6;
  stroke-width: 1;
}

.monthly-scale-label {
  fill: var(--kb-muted);
  font-size: 12px;
  font-weight: 900;
}

.monthly-line-income,
.monthly-line-expense {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 8px 12px rgba(17, 24, 39, 0.1));
}

.monthly-line-income {
  stroke: #16a34a;
}

.monthly-line-expense {
  stroke: #ef4444;
}

.monthly-line-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.6rem;
}

.monthly-line-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 900;
}

.monthly-line-legend span::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
}

.monthly-line-legend .is-income {
  color: #16a34a;
}

.monthly-line-legend .is-expense {
  color: #ef4444;
}

.monthly-chart-dates {
  position: relative;
  height: 18px;
  margin: -0.25rem 0 0.55rem;
}

.monthly-chart-dates span {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  color: var(--kb-muted);
  font-size: 0.68rem;
  font-weight: 900;
}

.monthly-breakdown-list {
  display: grid;
  gap: 0.55rem;
  padding: 1rem 1.05rem;
}

.monthly-source-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 44px;
  padding: 0.68rem 0.78rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: #fbfcff;
}

.monthly-source-row::before {
  content: "";
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--monthly-source-color, var(--kb-primary));
}

.monthly-source-row span {
  flex: 1 1 auto;
  color: var(--kb-muted);
  font-size: 0.82rem;
  font-weight: 900;
}

.monthly-source-row small {
  display: block;
  margin-top: 0.12rem;
  color: var(--kb-muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.monthly-source-row small.is-positive {
  color: #16a34a;
}

.monthly-source-row small.is-negative {
  color: #dc2626;
}

.monthly-source-row strong {
  color: var(--kb-text);
  font-size: 0.94rem;
  font-weight: 950;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.monthly-source-row.is-positive {
  --monthly-source-color: #16a34a;
}

.monthly-source-row.is-positive strong {
  color: #16a34a;
}

.monthly-source-row.is-negative {
  --monthly-source-color: #ef4444;
}

.monthly-source-row.is-negative strong {
  color: #dc2626;
}

.monthly-source-row.is-neutral {
  --monthly-source-color: #94a3b8;
}

.monthly-source-row.is-purple { --monthly-source-color: #8b5cf6; }
.monthly-source-row.is-blue { --monthly-source-color: #0ea5e9; }
.monthly-source-row.is-green { --monthly-source-color: #0f766e; }
.monthly-source-row.is-red { --monthly-source-color: #ef4444; }
.monthly-source-row.is-orange { --monthly-source-color: #f59e0b; }

.monthly-rank-list {
  display: grid;
  gap: 0.58rem;
  max-height: 520px;
  overflow: auto;
  padding: 1rem 1.05rem;
}

.monthly-rank-row {
  display: grid;
  gap: 0.26rem;
}

.monthly-rank-row div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.8rem;
}

.monthly-rank-row span {
  overflow: hidden;
  color: var(--kb-muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monthly-rank-row strong {
  color: var(--monthly-rank-color, #111827);
  font-size: 0.88rem;
  font-weight: 950;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.monthly-rank-row em {
  display: block;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #edf0f6;
}

.monthly-rank-row em::before {
  content: "";
  display: block;
  width: var(--rank-width);
  height: 100%;
  border-radius: inherit;
  background: var(--monthly-rank-color, #6366f1);
}

.monthly-rank-row.is-positive {
  --monthly-rank-color: #16a34a;
}

.monthly-rank-row.is-negative {
  --monthly-rank-color: #ef4444;
}

.monthly-rank-row.is-neutral {
  --monthly-rank-color: #94a3b8;
}

.monthly-rank-row small {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

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

.monthly-neighbor-grid article {
  display: grid;
  gap: 0.22rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 14px;
  background: #fff;
}

.monthly-neighbor-grid span,
.monthly-neighbor-grid em {
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 850;
  font-style: normal;
}

.monthly-neighbor-grid strong {
  color: var(--kb-text);
  font-weight: 950;
}

.stats-summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 0.9rem;
}

.stats-chart-grid {
  display: grid;
  gap: 0.9rem;
}

.stats-chart-card .card-body {
  padding: 0 !important;
}

.stats-chart {
  width: 100%;
  height: 320px;
  padding: 0.35rem 0.55rem 0.8rem;
}

.table-summary-grid {
  margin-bottom: 0.9rem;
}

.table-matrix {
  min-width: 980px;
}

.table-matrix tbody th {
  min-width: 110px;
}

.table-matrix tbody td small {
  display: block;
  margin-top: 0.12rem;
  color: var(--kb-muted);
  font-size: 0.7rem;
  font-weight: 850;
}

.table-matrix-card {
  overflow: hidden;
  margin-bottom: 0.9rem;
}

.table-matrix-card .card-body {
  padding: 0 !important;
}

.table-year-card.is-positive {
  --table-color: #16a34a;
}

.table-year-card.is-negative {
  --table-color: #ef4444;
}

.table-year-card.is-neutral {
  --table-color: #94a3b8;
}

.table-year-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-bottom: 0.9rem;
}

.table-year-card {
  display: grid;
  gap: 0.72rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--kb-border-soft);
  border-top: 4px solid var(--table-color, #94a3b8);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(17, 24, 39, 0.07);
}

.table-year-summary {
  display: grid;
  gap: 0.72rem;
  padding: 0.95rem 1rem;
  list-style: none;
  cursor: pointer;
}

.table-year-summary::-webkit-details-marker {
  display: none;
}

.table-year-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.table-year-head span,
.table-year-head em,
.table-year-meta small {
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 900;
  font-style: normal;
}

.table-year-head strong {
  display: block;
  margin-top: 0.18rem;
  color: var(--kb-text);
  font-size: 1.15rem;
  font-weight: 950;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.table-month-strip {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.24rem;
}

.table-month-strip span {
  height: 26px;
  border-radius: 8px;
  background: #edf0f6;
}

.table-month-strip span.is-positive {
  background: #bbf7d0;
}

.table-month-strip span.is-negative {
  background: #fecaca;
}

.table-month-strip span.is-neutral {
  background: #e5e7eb;
}

.table-month-strip span.is-empty {
  opacity: 0.35;
}

.table-year-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  margin: 0 1rem 0.95rem;
  padding-top: 0.58rem;
  border-top: 1px solid var(--kb-border-soft);
}

.table-year-meta strong {
  color: var(--kb-text);
}

.table-year-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
  margin: 0 1rem 0.85rem;
  padding: 0.78rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: #fbfcff;
}

.table-year-detail div,
.table-year-detail a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 34px;
  padding: 0.38rem 0.48rem;
  border-radius: 9px;
  background: #fff;
}

.table-year-detail a:hover {
  background: #f5f7ff;
}

.table-year-detail span {
  overflow: hidden;
  color: var(--kb-muted);
  font-size: 0.76rem;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-year-detail strong {
  color: var(--kb-text);
  font-size: 0.78rem;
  font-weight: 950;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.table-year-detail .is-positive strong {
  color: #16a34a;
}

.table-year-detail .is-negative strong {
  color: #dc2626;
}

.table-year-detail .is-empty {
  opacity: 0.55;
}

.table-detail-panel {
  margin-bottom: 3rem;
}

.table-detail-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.8rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 14px;
  background: #fff;
  color: var(--kb-text);
  font-weight: 950;
  list-style: none;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.05);
}

.table-detail-panel summary::-webkit-details-marker {
  display: none;
}

.table-detail-panel[open] summary i {
  transform: rotate(180deg);
}

@media (max-width: 1199.98px) {
  .table-year-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .table-year-grid {
    grid-template-columns: 1fr;
  }

  .table-year-detail {
    grid-template-columns: 1fr;
  }
}

/* Massbyk page */
.massbyk-summary-grid {
  margin-bottom: 0.9rem;
}

.massbyk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.34fr);
  gap: 0.9rem;
  margin-bottom: 0.9rem;
  align-items: stretch;
}

.massbyk-urssaf-card,
.massbyk-help-card,
.massbyk-list-card {
  overflow: hidden;
}

.massbyk-urssaf-card::before {
  content: "";
  display: block;
  height: 3px;
  background: #8b5cf6;
}

.massbyk-urssaf-card .card-body,
.massbyk-help-card .card-body,
.massbyk-list-card .card-body {
  padding: 0 !important;
}

.massbyk-urssaf-main {
  display: grid;
  grid-template-columns: minmax(240px, 0.55fr) minmax(280px, 1fr);
  gap: 0.9rem;
  align-items: center;
  padding: 1rem 1.05rem 0.75rem;
}

.massbyk-declare-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 76px;
  padding: 0.75rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: #fbfcff;
}

.massbyk-declare-box i,
.massbyk-help-icon {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: rgba(139, 92, 246, 0.13);
  color: #8b5cf6;
  font-size: 1.28rem;
}

.massbyk-declare-box span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.massbyk-declare-box strong {
  display: block;
  margin-top: 0.16rem;
  color: var(--kb-text);
  font-size: 1.35rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.massbyk-stepper {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  gap: 0.48rem;
  align-items: center;
}

.massbyk-stepper a,
.massbyk-stepper button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--kb-border-soft);
  border-radius: 10px;
  background: #fff;
  color: var(--kb-text);
  font-size: 0.95rem;
  font-weight: 900;
  box-shadow: none;
}

.massbyk-stepper a {
  color: #8b5cf6;
}

.massbyk-stepper a:hover {
  border-color: rgba(139, 92, 246, 0.25);
  background: rgba(139, 92, 246, 0.08);
  color: #8b5cf6;
}

.massbyk-stepper a.is-disabled {
  pointer-events: none;
  opacity: 0.38;
}

.massbyk-direct-form {
  display: none;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.45rem;
  margin-top: 0.55rem;
}

.massbyk-direct-form.is-open {
  display: grid;
}

.massbyk-total-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0 1.05rem 1rem;
}

.massbyk-total-list div {
  min-height: 64px;
  padding: 0.68rem 0.75rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 10px;
  background: #fbfcff;
}

.massbyk-total-list span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.massbyk-total-list strong {
  display: block;
  margin-top: 0.16rem;
  color: var(--kb-text);
  font-size: 1.05rem;
  font-weight: 950;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.massbyk-total-list .is-alert strong {
  color: #dc2626;
}

.massbyk-total-list .is-ok strong {
  color: #16a34a;
}

.massbyk-help-card .card-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: 1rem !important;
}

.massbyk-help-card h2 {
  margin: 0.7rem 0 0.35rem;
  color: var(--kb-text);
  font-size: 1.05rem;
  font-weight: 900;
}

.massbyk-help-card p {
  margin: 0;
  color: var(--kb-muted);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
}

.massbyk-list-card .analysis-table-head > strong {
  color: var(--kb-text);
  font-size: 1.05rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.massbyk-reservation-list {
  display: grid;
  gap: 0.68rem;
  padding: 1rem 1.05rem;
  background: #f7f8fc;
}

.massbyk-reservation-card {
  display: grid;
  grid-template-columns: minmax(210px, 0.42fr) minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.78rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: #fff;
}

.massbyk-reservation-main span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.massbyk-reservation-main h3 {
  margin: 0.18rem 0;
  color: var(--kb-text);
  font-size: 1.02rem;
  font-weight: 900;
}

.massbyk-reservation-main strong {
  display: block;
  color: #16a34a;
  font-size: 1.24rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.massbyk-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  align-items: center;
}

.massbyk-action-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.42rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: #fbfcff;
}

.massbyk-action-group.is-declared {
  border-color: rgba(34, 197, 94, 0.22);
  background: rgba(34, 197, 94, 0.04);
}

.massbyk-action-group.is-private {
  border-color: rgba(99, 102, 241, 0.18);
  background: rgba(99, 102, 241, 0.04);
}

.massbyk-actions .btn {
  min-height: 38px;
  white-space: nowrap;
}

.massbyk-actions .btn.is-danger {
  color: #dc2626 !important;
  background: rgba(239, 68, 68, 0.08) !important;
}

.massbyk-rounded-actions {
  grid-column: 2;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: -0.3rem;
}

.massbyk-rounded-actions span {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.massbyk-rounded-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.1);
  color: var(--kb-primary);
  font-size: 0.74rem;
  font-weight: 900;
}

.massbyk-empty-state {
  display: grid;
  place-items: center;
  min-height: 190px;
  padding: 1rem;
  text-align: center;
}

.massbyk-empty-state i {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 0.3rem;
  border-radius: 16px;
  background: rgba(34, 197, 94, 0.13);
  color: #16a34a;
  font-size: 1.35rem;
}

.massbyk-empty-state strong {
  color: var(--kb-text);
  font-size: 1.08rem;
  font-weight: 900;
}

.massbyk-empty-state span {
  color: var(--kb-muted);
  font-weight: 700;
}

/* Sign in */
body:has(.signin-page) {
  background:
    radial-gradient(circle at 16% 10%, rgba(99, 102, 241, 0.09), transparent 28%),
    radial-gradient(circle at 90% 20%, rgba(34, 197, 94, 0.08), transparent 24%),
    var(--kb-bg);
}

.signin-page {
  display: grid;
  min-height: calc(100vh - 74px);
  padding: 2rem 1rem 3rem;
  place-items: center;
}

.signin-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 0.72fr);
  width: min(980px, 100%);
  overflow: hidden;
  border: 1px solid var(--kb-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 22px 60px rgba(15, 23, 42, 0.1);
}

.signin-brand-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 500px;
  padding: 2.2rem;
  background:
    linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(78, 82, 224, 0.9)),
    #6366f1;
  color: #fff;
}

.signin-brand-panel img {
  width: 58px;
  height: auto;
  padding: 0.38rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
}

.signin-brand-panel span {
  display: block;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.signin-brand-panel h1 {
  max-width: 430px;
  margin: 0.45rem 0 0;
  color: #fff;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.02;
}

.signin-brand-panel p {
  max-width: 390px;
  margin: 1rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.98rem;
  font-weight: 650;
  line-height: 1.55;
}

.signin-form-panel {
  display: grid;
  align-items: center;
  min-height: 500px;
  padding: 2.2rem;
  background: #fff;
}

.signin-card {
  width: 100%;
}

.signin-card-head {
  margin-bottom: 1rem;
}

.signin-card-head span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.signin-card-head h2 {
  margin: 0.16rem 0 0;
  color: var(--kb-text);
  font-size: 1.7rem;
  font-weight: 950;
}

.signin-alert {
  margin-bottom: 0.9rem;
  border: 0;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 800;
}

.signin-form {
  display: grid;
  gap: 0.8rem;
}

.signin-form label {
  display: grid;
  gap: 0.36rem;
  margin: 0;
}

.signin-form label span {
  color: #394052;
  font-size: 0.82rem;
  font-weight: 850;
}

.signin-form .form-control {
  min-height: 46px;
}

.signin-submit {
  min-height: 46px;
  margin-top: 0.25rem;
  width: 100%;
}

.signin-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 1rem;
  color: var(--kb-muted);
  font-size: 0.86rem;
  font-weight: 850;
}

.signin-back-link:hover {
  color: var(--kb-primary);
}

/* Tables / forms / badges */
.table {
  margin-bottom: 0;
  color: var(--kb-muted);
  vertical-align: middle;
}

.table > :not(caption) > * > * {
  padding: 0.72rem 0.8rem;
  border-bottom-color: var(--kb-border-soft);
}

.table th {
  color: #394052;
  font-size: 0.82rem;
  font-weight: 800;
}

.table td {
  font-weight: 650;
}

.badge {
  min-height: 23px;
  padding: 0.26rem 0.52rem;
  border-radius: 6px;
  font-weight: 850;
  line-height: 1;
}

.bg-faded-primary {
  background: var(--kb-primary-soft) !important;
}

.bg-faded-success {
  background: var(--kb-success-soft) !important;
}

.bg-faded-danger {
  background: var(--kb-danger-soft) !important;
}

.bg-faded-dark {
  background: #edf0f5 !important;
}


/* Quick add */


/* Today cockpit */
.today-page {
  min-height: calc(100vh - 74px);
  padding: 1rem 0 6rem;
  background: var(--kb-bg);
}

.today-shell {
  width: min(100% - 1rem, 760px);
  margin: 0 auto;
  display: grid;
  gap: 0.78rem;
}

.today-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.15rem 0.15rem 0.2rem;
}

.today-hero span,
.today-card-head span,
.today-balance-card span {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.today-hero h1 {
  margin: 0.1rem 0 0;
  color: var(--kb-text);
  font-size: 1.75rem;
  font-weight: 950;
}

.today-hero > strong {
  color: var(--kb-text);
  font-size: 1.12rem;
  font-weight: 950;
  white-space: nowrap;
}

.today-balance-card,
.today-card,
.today-warning-card {
  border: 1px solid var(--kb-border-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.06);
}

.today-balance-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  padding: 0.82rem;
}

.today-balance-card div {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
  padding: 0.75rem;
  border-radius: 14px;
  background: #f8fafc;
}

.today-balance-card strong {
  min-width: 0;
  overflow: hidden;
  color: var(--kb-text);
  font-size: 1.18rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-warning-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 0.72rem;
  padding: 0.72rem;
  border-color: rgba(245, 158, 11, 0.32);
  background: #fffbeb;
  color: #92400e;
}

.today-warning-card > i:first-child,
.today-action i,
.today-goal i,
.today-row-icon,
.today-date-chip {
  display: grid;
  place-items: center;
  border-radius: 14px;
}

.today-warning-card > i:first-child {
  width: 42px;
  height: 42px;
  background: rgba(245, 158, 11, 0.14);
  font-size: 1.25rem;
}

.today-warning-card strong,
.today-warning-card span {
  display: block;
  min-width: 0;
}

.today-warning-card strong {
  font-weight: 950;
}

.today-warning-card span {
  font-size: 0.82rem;
  font-weight: 850;
}

.today-cash-status {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.72rem;
  padding: 0.72rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.05);
}

.today-cash-status > i {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  font-size: 1.25rem;
}

.today-cash-status strong,
.today-cash-status span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-cash-status strong {
  color: var(--kb-text);
  font-weight: 950;
}

.today-cash-status span {
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 850;
}

.today-cash-status em {
  font-style: normal;
  font-size: 0.82rem;
  font-weight: 950;
  white-space: nowrap;
}

.today-cash-status.is-ok {
  border-color: rgba(34, 197, 94, 0.22);
  background: #f0fdf4;
}

.today-cash-status.is-ok > i {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.today-cash-status.is-alert {
  border-color: rgba(239, 68, 68, 0.22);
  background: #fef2f2;
}

.today-cash-status.is-alert > i {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.today-floating-add {
  position: fixed;
  right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom));
  z-index: 1040;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: var(--kb-primary);
  color: #fff;
  box-shadow: 0 18px 34px rgba(99, 102, 241, 0.34);
}

.today-floating-add i {
  font-size: 1.8rem;
}

.today-card {
  padding: 0.85rem;
}

.today-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.7rem;
}

.today-card-head h2 {
  margin: 0.08rem 0 0;
  color: var(--kb-text);
  font-size: 1.08rem;
  font-weight: 950;
}

.today-card-head a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 0.65rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 999px;
  color: var(--kb-muted);
  font-size: 0.76rem;
  font-weight: 900;
}

.today-goals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.today-goal {
  display: grid;
  justify-items: center;
  gap: 0.28rem;
  min-width: 0;
  padding: 0.62rem 0.36rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 15px;
  background: #f8fafc;
  color: var(--kb-muted);
  font-weight: 900;
}

.today-goal i {
  width: 34px;
  height: 34px;
  font-size: 1.08rem;
}

.today-goal span {
  overflow: hidden;
  max-width: 100%;
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-goal strong {
  color: var(--kb-text);
  font-size: 0.96rem;
  font-weight: 950;
}

.today-goal small {
  display: none;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
}

.today-goal.is-open small {
  display: block;
}

.today-goal.is-good {
  border-color: rgba(34, 197, 94, 0.26);
  background: #f0fdf4;
}

.today-goal.is-good i {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.today-goal.is-warning {
  border-color: rgba(245, 158, 11, 0.3);
  background: #fffbeb;
}

.today-goal.is-warning i {
  background: rgba(245, 158, 11, 0.14);
  color: #d97706;
}

.today-goal.is-danger {
  border-color: rgba(239, 68, 68, 0.26);
  background: #fef2f2;
}

.today-goal.is-danger i {
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
}

.today-list {
  display: grid;
  gap: 0.48rem;
}

.today-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.62rem;
  padding: 0.58rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 14px;
  background: #fbfcff;
}

.today-row-with-action,
.today-list.is-compact .today-row-with-action {
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.48rem;
}

.today-row-link {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 0.62rem;
  min-width: 0;
}

.today-expected-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.today-accept-btn,
.today-skip-btn {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  font-size: 1.08rem;
}

.today-accept-btn {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.today-skip-btn {
  background: rgba(148, 163, 184, 0.12);
  color: #64748b;
}

.today-massage-row,
.today-list.is-compact .today-massage-row {
  grid-template-columns: 46px minmax(0, 1fr) auto;
}

.today-massage-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
}

.today-massage-actions a {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 11px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--kb-primary);
  font-size: 1rem;
}

.today-massage-actions a:nth-child(1) {
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
}

.today-massage-actions a:nth-child(2) {
  background: rgba(14, 165, 233, 0.1);
  color: #0ea5e9;
}

.today-massage-actions a:nth-child(3) {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.today-massage-actions a.is-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.today-list.is-compact .today-row:not(.today-row-with-action):not(.today-massage-row) {
  grid-template-columns: 46px minmax(0, 1fr) auto;
}

.today-row-icon {
  width: 38px;
  height: 38px;
  background: #f1f5f9;
}

.today-row-icon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.today-date-chip {
  width: 46px;
  height: 36px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--kb-primary);
  font-size: 0.74rem;
  font-weight: 950;
}

.today-date-chip.is-late {
  background: rgba(239, 68, 68, 0.09);
  color: #dc2626;
}

.today-row strong,
.today-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-row strong {
  color: var(--kb-text);
  font-size: 0.86rem;
  font-weight: 950;
}

.today-row span {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.today-row em {
  font-style: normal;
  font-size: 0.86rem;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.today-empty {
  padding: 1.1rem 0.7rem;
  border-radius: 14px;
  background: #f8fafc;
  color: var(--kb-muted);
  font-weight: 850;
  text-align: center;
}

.today-account-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.today-account-pill {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 0.08rem 0.5rem;
  align-items: center;
  min-width: 0;
  padding: 0.58rem 0.65rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 13px;
  background: #fbfcff;
}

.today-account-logo {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 11px;
  background: #f1f5f9;
}

.today-account-logo img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.today-account-logo i {
  color: var(--kb-muted);
  font-size: 1rem;
}

.today-account-pill span,
.today-account-pill strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-account-pill span {
  color: var(--kb-muted);
  font-size: 0.75rem;
  font-weight: 850;
}

.today-account-pill strong {
  color: var(--kb-text);
  font-size: 0.88rem;
  font-weight: 950;
}

.today-page .is-positive { color: #16a34a !important; }
.today-page .is-negative { color: #dc2626 !important; }
.today-page .is-neutral { color: var(--kb-muted) !important; }

@media (min-width: 992px) {
  .today-page {
    padding-top: 2rem;
  }

  .today-shell {
    width: min(100% - 3rem, 1280px);
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.62fr);
    grid-template-areas:
      "hero hero"
      "balance goals"
      "operations accounts"
      "upcoming accounts";
    align-items: start;
    gap: 1rem;
  }

  .today-page.has-cash .today-shell {
    grid-template-areas:
      "hero hero"
      "balance cash"
      "operations goals"
      "upcoming accounts";
  }

  .today-page.has-massbyk:not(.has-cash) .today-shell {
    grid-template-areas:
      "hero hero"
      "balance mass"
      "operations goals"
      "upcoming accounts";
  }

  .today-page.has-massbyk.has-cash .today-shell {
    grid-template-areas:
      "hero hero"
      "balance cash"
      "operations mass"
      "upcoming goals"
      "upcoming accounts";
  }

  .today-hero {
    grid-area: hero;
    align-items: center;
    padding: 0.35rem 0.15rem 0.15rem;
  }

  .today-hero h1 {
    font-size: 2rem;
  }

  .today-balance-card { grid-area: balance; }
  .today-cash-status { grid-area: cash; }
  .today-massbyk-card { grid-area: mass; }
  .today-goals-card { grid-area: goals; }
  .today-accounts-card { grid-area: accounts; }
  .today-operations-card { grid-area: operations; }
  .today-upcoming-card { grid-area: upcoming; }

  .today-balance-card,
  .today-cash-status,
  .today-card {
    border-radius: 20px;
  }

  .today-balance-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-height: 116px;
  }

  .today-balance-card div {
    align-content: center;
  }

  .today-cash-status {
    min-height: 116px;
  }

  .today-card {
    padding: 1rem;
  }

  .today-operations-card,
  .today-upcoming-card {
    padding: 1.05rem;
  }

  .today-operations-card .today-row,
  .today-upcoming-card .today-row {
    padding: 0.78rem;
  }

  .today-operations-card:has(.today-empty) {
    align-self: start;
  }

  .today-operations-card .today-empty {
    min-height: 56px;
    display: grid;
    place-items: center;
  }

  .today-row {
    padding: 0.7rem;
  }

  .today-goals {
    grid-template-columns: 1fr;
  }

  .today-goal {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    justify-items: start;
    text-align: left;
  }

  .today-goal i {
    grid-row: span 2;
  }

  .today-goal span,
  .today-goal strong {
    align-self: end;
  }

  .today-goal small {
    grid-column: 2 / 4;
    text-align: left;
  }

  .today-account-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-massbyk-card .today-card-head,
  .today-accounts-card .today-card-head,
  .today-goals-card .today-card-head {
    margin-bottom: 0.55rem;
  }

  .today-massage-row,
  .today-list.is-compact .today-massage-row {
    grid-template-columns: 46px minmax(0, 1fr);
  }

  .today-massage-actions {
    grid-column: 2;
    justify-self: start;
    margin-top: 0.18rem;
  }

  .today-floating-add {
    right: 2rem;
    bottom: 2rem;
  }
}

.quickadd-page {
  min-height: calc(100vh - 74px);
  padding: 1rem 0 6rem;
  background: var(--kb-bg);
}

.quickadd-shell {
  width: min(100% - 1rem, 520px);
  margin: 0 auto;
}

.quickadd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.quickadd-head span,
.quickadd-label {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quickadd-head h1 {
  margin: 0.1rem 0 0;
  color: var(--kb-text);
  font-size: 1.55rem;
  font-weight: 950;
}

.quickadd-head a {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: #fff;
  color: var(--kb-muted);
  font-size: 1.25rem;
}

.quickadd-form {
  display: grid;
  gap: 0.72rem;
}

.quickadd-mode-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.28rem;
  padding: 0.24rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.04);
}

.quickadd-mode-switch button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 40px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--kb-muted);
  font-weight: 950;
}

.quickadd-mode-switch button.is-active {
  background: var(--kb-primary);
  color: #fff;
  box-shadow: 0 12px 26px rgba(99, 102, 241, 0.18);
}

.quickadd-mode-switch i {
  font-size: 1rem;
}

.quickadd-wizard.is-transfer [data-step="resume"],
.quickadd-wizard.is-transfer [data-step="category"],
.quickadd-wizard:not(.is-transfer) [data-step="transferTarget"] {
  display: none;
}

.quickadd-wizard.is-transfer [data-submit-sign],
.quickadd-wizard:not(.is-transfer) [data-transfer-submit] {
  display: none;
}

.quickadd-wizard.is-transfer .quickadd-sign-actions {
  grid-template-columns: 1fr;
}

.quickadd-inline-error {
  padding: 0.58rem 0.68rem;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.08);
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 900;
}


.quickadd-step {
  display: grid;
  gap: 0.52rem;
}

.quickadd-step-summary {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.2fr) auto;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-height: 48px;
  padding: 0.58rem 0.72rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--kb-text);
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.04);
  text-align: left;
}

.quickadd-step-summary span {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.quickadd-step-summary strong {
  min-width: 0;
  overflow: hidden;
  color: var(--kb-text);
  font-size: 0.94rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quickadd-step-summary i {
  color: var(--kb-muted);
  font-size: 1.15rem;
}

.quickadd-next,
.quickadd-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  min-height: 42px;
  border: 0;
  border-radius: 12px;
  font-weight: 900;
}

.quickadd-next {
  background: var(--kb-primary);
  color: #fff;
}

.quickadd-link-button {
  background: rgba(99, 102, 241, 0.08);
  color: var(--kb-primary);
}

.quickadd-card,
.quickadd-alert {
  border: 1px solid var(--kb-border-soft);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.06);
}

.quickadd-card {
  display: grid;
  gap: 0.58rem;
  padding: 0.82rem;
}

.quickadd-alert {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.72rem;
  padding: 0.72rem 0.82rem;
  font-weight: 850;
}

.quickadd-alert.is-success {
  color: #16a34a;
  background: #f0fdf4;
}

.quickadd-alert.is-error {
  color: #dc2626;
  background: #fef2f2;
}


.quickadd-result {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 0.62rem;
  align-items: center;
  margin-bottom: 0.72rem;
  padding: 0.72rem;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 16px;
  background: #f0fdf4;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.05);
}

.quickadd-result-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
  font-size: 1.25rem;
}

.quickadd-result-body {
  display: grid;
  gap: 0.08rem;
  min-width: 0;
}

.quickadd-result-body span,
.quickadd-result-body small {
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 850;
}

.quickadd-result-body strong {
  min-width: 0;
  overflow: hidden;
  color: var(--kb-text);
  font-size: 0.92rem;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quickadd-result form {
  margin: 0;
}

.quickadd-result button {
  min-height: 36px;
  padding: 0 0.72rem;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 950;
}

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

.quickadd-account-option {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 0.15rem 0.5rem;
  align-items: center;
  min-height: 64px;
  padding: 0.55rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 12px;
  background: #fbfcff;
  color: var(--kb-text);
  font-size: 0.78rem;
  font-weight: 900;
}

.quickadd-account-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quickadd-account-option img,
.quickadd-account-option i {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: #f5f7fb;
  object-fit: contain;
}

.quickadd-account-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quickadd-account-option small {
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quickadd-account-option.is-selected {
  border-color: rgba(99, 102, 241, 0.45);
  background: rgba(99, 102, 241, 0.08);
  color: var(--kb-primary);
}

.quickadd-amount-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.72rem;
  border: 1px solid var(--kb-border);
  border-radius: 14px;
  background: #fbfcff;
}

.quickadd-amount {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--kb-text);
  font-size: 2rem;
  font-weight: 950;
  font-variant-numeric: tabular-nums;
}

.quickadd-amount-wrap span {
  color: var(--kb-muted);
  font-size: 1.35rem;
  font-weight: 950;
}

.quickadd-sign-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
}

.quickadd-sign-actions button,
.quickadd-submit,
.quickadd-category-chip {
  border: 0;
  border-radius: 12px;
  font-weight: 900;
}

.quickadd-sign-actions button {
  min-height: 42px;
  background: #f5f7fb;
  color: var(--kb-muted);
}

.quickadd-sign-actions button[data-sign="-"] {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.08);
}

.quickadd-sign-actions button[data-sign="+"] {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.09);
}

.quickadd-final-actions button {
  min-height: 52px;
  justify-content: center;
  gap: 0.42rem;
  font-size: 0.94rem;
}

.quickadd-final-actions button[data-submit-sign="-"] {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.09);
}

.quickadd-final-actions button[data-submit-sign="+"] {
  color: #16a34a;
  background: rgba(34, 197, 94, 0.1);
}

.quickadd-final-actions button[data-transfer-submit] {
  color: #fff;
  background: var(--kb-primary);
}

.quickadd-final-actions i {
  font-size: 1.15rem;
}

.quickadd-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.quickadd-suggestions[hidden] {
  display: none;
}

.quickadd-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  min-height: 38px;
  max-width: 100%;
  padding: 0 0.72rem;
  border: 1px solid rgba(99, 102, 241, 0.22);
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.08);
  color: var(--kb-primary);
  font-size: 0.82rem;
  font-weight: 900;
}

.quickadd-category-chip span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quickadd-category-chip.is-selected {
  border-color: rgba(99, 102, 241, 0.62);
  background: var(--kb-primary);
  color: #fff;
}

.quickadd-submit {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: max(0.75rem, env(safe-area-inset-bottom));
  left: max(0.75rem, env(safe-area-inset-left));
  z-index: 50;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 56px;
  background: var(--kb-primary);
  color: #fff;
  box-shadow: 0 18px 36px rgba(99, 102, 241, 0.26);
}

@media (min-width: 768px) {
  .quickadd-submit {
    position: static;
  }
}

.form-label {
  color: #394052;
  font-size: 0.9rem;
  font-weight: 750;
}

.form-control,
.form-select {
  min-height: 42px;
  border-color: var(--kb-border);
  border-radius: var(--kb-radius-sm);
  color: var(--kb-text);
  font-weight: 650;
  box-shadow: none !important;
}

.form-control-lg,
.form-select-lg {
  min-height: 46px;
  font-size: 0.96rem;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(99, 102, 241, 0.55);
  box-shadow: 0 0 0 0.22rem rgba(99, 102, 241, 0.12) !important;
}

.pointer {
  cursor: pointer !important;
}

.has-error-input {
  border-color: var(--kb-danger) !important;
}

.no-error-input {
  border-color: var(--kb-success) !important;
}

#alertMsgBox {
  margin-top: 74px;
  padding: 1rem;
  color: #fff;
  font-weight: 750;
}

.msgBox-red {
  background: var(--kb-danger);
}

.msgBox-green {
  background: var(--kb-success);
}

.msgBox-orange {
  background: var(--kb-warning);
}

@media (max-width: 1199.98px) {
  .navbar-nav .nav-link {
    padding-right: 0.46rem;
    padding-left: 0.46rem;
    font-size: 0.8rem;
  }

  .kb-logo-label {
    font-size: 0.95rem;
  }

  .billets-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .billets-massbyk-main {
    grid-template-columns: 1fr;
  }

  .oplist-filter-card {
    grid-template-columns: 1fr;
  }

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

  .analysis-topline {
    grid-template-columns: 1fr;
  }

  .analysis-summary-grid,
  .stats-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .massbyk-grid,
  .massbyk-reservation-card {
    grid-template-columns: 1fr;
  }

  .massbyk-rounded-actions {
    grid-column: 1;
  }

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

@media (max-width: 991.98px) {
  .kb-header {
    min-height: 68px;
  }

  .kb-floating-quickadd {
    position: fixed;
    right: 1rem;
    bottom: calc(1rem + env(safe-area-inset-bottom));
    z-index: 1040;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    background: var(--kb-primary);
    color: #fff;
    box-shadow: 0 18px 34px rgba(99, 102, 241, 0.34);
  }

  .kb-floating-quickadd i {
    color: #fff;
    font-size: 1.8rem;
  }

  .offcanvas {
    --bs-offcanvas-width: min(420px, 92vw);
    max-width: 92vw;
  }

  #navbarNav.offcanvas {
    right: 0;
    left: auto;
    height: 100vh;
    border-left: 1px solid var(--kb-border-soft);
    box-shadow: -18px 0 40px rgba(15, 23, 42, 0.16);
  }

  #navbarNav .offcanvas-body {
    overflow-y: auto;
  }

  .navbar-nav {
    align-items: stretch;
    gap: 0.32rem;
  }

  .kb-nav-main {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .kb-nav-main .nav-item {
    display: block;
    width: 100%;
  }

  .navbar-nav .nav-link {
    width: 100%;
    justify-content: flex-start;
    min-height: 46px;
    padding: 0.58rem 0.72rem;
    font-size: 0.95rem;
  }

  .navbar-nav .nav-link i {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: #f5f6fb;
    font-size: 1.1rem;
  }

  .navbar-nav .nav-item.active .nav-link i,
  .navbar-nav .nav-link.active i {
    background: rgba(99, 102, 241, 0.12);
  }

  .kb-logo-label {
    display: inline;
  }

  .kb-logo img {
    width: 38px;
  }

  .kb-logout {
    margin-top: 0.25rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--kb-border-soft);
  }

  .kb-logout-label {
    display: inline;
  }

  .offcanvas-header {
    padding: 1rem 1.1rem;
  }

  .offcanvas-body {
    padding: 0.85rem 1.1rem 1.1rem;
  }

  .dashboard-hero-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-hero-metrics {
    width: 100%;
    justify-content: flex-start;
  }

  .dashboard-hero-total {
    min-width: 0;
    text-align: left;
  }

  .dashboard-main-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-flow-card {
    margin-top: 0;
    height: auto;
  }

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

  .dashboard-flow-map {
    grid-template-columns: 1fr;
  }

  .account-expected-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-hero-card .card-body {
    grid-template-columns: 1fr;
  }

  .account-hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .account-expected-form .btn {
    justify-content: center;
  }

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

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

  .budget-create-form {
    grid-template-columns: 1fr;
  }

  .budget-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .budget-year-form {
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .budget-mini-metrics {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .budget-mini-metrics article {
    min-width: 0;
  }

  .category-toolbar {
    flex-direction: column;
  }

  .category-tabs {
    width: 100%;
  }

  .category-tabs a {
    flex: 1 1 0;
  }

  .category-topline,
  .category-insight-grid {
    grid-template-columns: 1fr;
  }

  .category-donut-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .category-sparkline {
    width: 100%;
    margin-left: 0;
  }

  .monthly-hero {
    gap: 0.8rem;
  }

  .monthly-period-form {
    flex-wrap: wrap;
    width: 100%;
  }

  .monthly-period-form .form-select {
    flex: 1 1 120px;
  }

  .monthly-card-grid,
  .monthly-layout,
  .monthly-comparison-grid,
  .monthly-neighbor-grid {
    grid-template-columns: 1fr;
  }

  .monthly-flow-chart {
    grid-template-columns: repeat(31, 16px);
  }

  .massbyk-urssaf-main,
  .massbyk-total-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767.98px) {
  .page-wrapper {
    padding-top: 68px;
  }

  .card-body,
  .account-card .card-body {
    padding: 1.1rem !important;
  }

  .dashboard-section-title h2 {
    font-size: 1.18rem;
  }

  .dashboard-section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

  .dashboard-hero-metrics {
    flex-direction: column;
    gap: 0.75rem;
  }

  .dashboard-hero-total.highlight {
    padding-top: 0.75rem;
    padding-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.24);
    border-left: 0;
  }

  .dashboard-flow-title {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-objective-strip {
    justify-content: flex-start;
    margin-left: 0;
  }

  .dashboard-objective-strip.is-open {
    grid-template-columns: 1fr;
  }

  .dashboard-objective-strip.is-open .dashboard-objective-pill {
    min-width: 0;
  }

  .dashboard-flow-toggle {
    width: 100%;
  }

  .dashboard-flow-toggle button {
    flex: 1 1 0;
  }

  .dashboard-warning-card {
    width: 100%;
    min-width: 0;
  }

  .dashboard-ignored-card summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .dashboard-ignored-card summary em {
    grid-column: 2 / -1;
    text-align: left;
    white-space: normal;
  }

  .dashboard-ignored-detail {
    grid-template-columns: 1fr;
  }

  .dashboard-ignored-detail a {
    justify-self: stretch;
    text-align: center;
  }

  .dashboard-stat-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-stat-section {
    display: none;
  }

  .dashboard-stat-group {
    display: none;
    grid-template-columns: 1fr;
    gap: 0.82rem;
  }

  .dashboard-stat-group.is-open {
    display: grid;
  }

  .dashboard-mobile-collapse-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 42px;
    padding: 0.62rem 0.78rem;
    border: 1px solid var(--kb-border-soft);
    border-radius: 10px;
    background: #fff;
    color: var(--kb-text);
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.05);
  }

  .dashboard-mobile-collapse-toggle i {
    color: var(--kb-muted);
    font-size: 1.15rem;
    transition: transform 0.16s ease;
  }

  .dashboard-mobile-collapse-toggle.is-open i {
    transform: rotate(180deg);
  }

  .dashboard-overview-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .billets-page {
    padding-top: 1rem;
  }

  .billets-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .billets-hero h1 {
    font-size: 1.42rem;
  }

  .billets-status {
    width: 100%;
  }

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

  .billets-summary-card {
    min-height: 82px;
  }

  .billets-grid {
    grid-template-columns: 1fr;
  }

  .billets-panel-head {
    align-items: stretch;
    flex-direction: column;
    gap: 0.45rem;
  }

  .billets-panel-head > strong {
    text-align: right;
  }

  .billet-card {
    padding: 0.72rem;
  }

  .billet-stepper,
  .billets-massbyk-stepper {
    grid-template-columns: 42px minmax(0, 1fr) 42px;
  }

  .billet-stepper a,
  .billet-stepper button,
  .billets-massbyk-stepper a,
  .billets-massbyk-stepper button {
    min-height: 42px;
  }

  .billet-direct-form {
    grid-template-columns: 1fr;
  }

  .oplist-page {
    padding-top: 1rem;
  }

  .oplist-hero,
  .oplist-table-head {
    align-items: stretch;
    flex-direction: column;
  }

  .oplist-hero h1 {
    font-size: 1.42rem;
  }

  .oplist-clear-link {
    justify-content: center;
    width: 100%;
  }

  .oplist-filters,
  .oplist-summary-grid {
    grid-template-columns: 1fr;
  }

  .oplist-extremes {
    align-items: flex-start;
    text-align: left;
  }

  .oplist-table {
    min-width: 0;
  }

  .oplist-table,
  .oplist-table tbody,
  .oplist-table tr,
  .oplist-table td,
  .oplist-table th {
    display: block;
    width: 100%;
  }

  .oplist-table thead {
    display: none;
  }

  .oplist-table tbody {
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem;
    background: #f7f8fc;
  }

  .oplist-table tr {
    padding: 0.68rem 0.75rem;
    border: 1px solid var(--kb-border-soft);
    border-radius: 10px;
    background: #fff;
  }

  .oplist-table tbody th {
    padding: 0 0 0.44rem !important;
    border-bottom: 1px solid var(--kb-border-soft) !important;
  }

  .oplist-table tbody th::before {
    display: none;
  }

  .oplist-table tbody td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.34rem 0 !important;
    border: 0 !important;
    text-align: right !important;
  }

  .oplist-table tbody td::before {
    content: attr(data-label);
    color: var(--kb-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-align: left;
  }

  .analysis-page {
    padding-top: 1rem;
  }

  .analysis-hero,
  .analysis-table-head {
    align-items: stretch;
    flex-direction: column;
  }

  .analysis-hero h1 {
    font-size: 1.42rem;
  }

  .analysis-action-link {
    justify-content: center;
    width: 100%;
  }

  .analysis-summary-grid,
  .stats-summary-grid {
    grid-template-columns: 1fr;
  }

  .analysis-table,
  .analysis-table tbody,
  .analysis-table tr,
  .analysis-table td,
  .analysis-table th {
    display: block;
    width: 100%;
  }

  .analysis-table {
    min-width: 0;
  }

  .analysis-table thead,
  .analysis-table tfoot {
    display: none;
  }

  .analysis-table tbody {
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem;
    background: #f7f8fc;
  }

  .analysis-table tr {
    padding: 0.68rem 0.75rem;
    border: 1px solid var(--kb-border-soft);
    border-radius: 10px;
    background: #fff;
  }

  .analysis-table tbody th {
    padding: 0 0 0.44rem !important;
    border-bottom: 1px solid var(--kb-border-soft) !important;
  }

  .analysis-table tbody th::before {
    display: none;
  }

  .analysis-table tbody td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.34rem 0 !important;
    border: 0 !important;
    text-align: right !important;
  }

  .analysis-table tbody td::before {
    content: attr(data-label);
    color: var(--kb-muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-align: left;
  }

  .stats-chart {
    height: 280px;
  }

  .massbyk-actions {
    grid-template-columns: 1fr;
  }

  .massbyk-rounded-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .massbyk-rounded-actions a {
    width: 100%;
  }

  .massbyk-direct-form {
    grid-template-columns: 1fr;
  }

  .signin-page {
    min-height: calc(100vh - 68px);
    padding: 1rem;
  }

  .signin-shell {
    grid-template-columns: 1fr;
    border-radius: 14px;
  }

  .signin-brand-panel {
    min-height: 0;
    padding: 1.25rem;
  }

  .signin-brand-panel img {
    width: 48px;
    margin-bottom: 2rem;
  }

  .signin-brand-panel h1 {
    font-size: 1.75rem;
  }

  .signin-brand-panel p {
    margin-top: 0.7rem;
    font-size: 0.9rem;
  }

  .signin-form-panel {
    min-height: 0;
    padding: 1.25rem;
  }

  .signin-card-head h2 {
    font-size: 1.42rem;
  }

  .account-add-grid,
  .account-expected-form {
    grid-template-columns: 1fr;
  }

  .account-panel-head,
  .account-month-head {
    align-items: stretch;
    flex-direction: column;
  }

  .account-expected-card .account-panel-head,
  .account-expected-card .account-panel-head > div {
    text-align: left;
  }

  .account-panel-head .btn,
  .account-expected-form .btn {
    justify-content: center;
    width: 100%;
  }

  .account-expected-item {
    grid-template-columns: 1fr;
  }

  .account-expected-actions {
    justify-content: stretch;
  }

  .account-expected-actions .btn {
    justify-content: center;
    flex: 1 1 0;
  }

  .account-month-kpis {
    justify-content: flex-start;
  }

  .account-hero-main {
    align-items: flex-start;
  }

  .account-hero-logo {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
  }

  .account-hero-main h1 {
    font-size: 1.28rem;
  }

  .account-hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.38rem;
  }

  .account-hero-metrics div {
    padding: 0.48rem 0.42rem;
  }

  .account-hero-metrics span {
    overflow: hidden;
    font-size: 0.58rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .account-hero-metrics strong {
    font-size: 0.82rem;
    white-space: nowrap;
  }

  .account-operations-table,
  .account-operations-table tbody,
  .account-operations-table tr,
  .account-operations-table td {
    display: block;
    width: 100%;
  }

  .account-operations-table thead {
    display: none;
  }

  .account-operations-table tbody {
    display: grid;
    gap: 0.48rem;
    padding: 0.58rem;
    background: #f7f8fc;
  }

  .account-operations-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "date amount"
      "label label"
      "category category";
    gap: 0.28rem 0.6rem;
    padding: 0.62rem 0.68rem;
    border: 1px solid var(--kb-border-soft);
    border-radius: 10px;
    background: #fff;
  }

  .account-operations-table td {
    display: block;
    padding: 0 !important;
    border: 0 !important;
    text-align: left !important;
  }

  .account-operations-table td::before {
    display: none;
  }

  .account-operation-date {
    grid-area: date;
    font-size: 0.68rem;
  }

  .account-operation-label {
    grid-area: label;
    font-size: 0.86rem;
    line-height: 1.2;
  }

  .account-operations-table td[data-label="Catégorie"] {
    grid-area: category;
  }

  .account-operations-table td[data-label="Montant"] {
    grid-area: amount;
    text-align: right !important;
  }

  .account-operations-table td[data-label="Catégorie"] .badge,
  .account-operations-table td[data-label="Montant"] .badge {
    font-size: 0.68rem;
  }
}


@media (max-width: 575.98px) {
  .account-quickadd-wizard .quickadd-next,
  .account-quickadd-wizard .quickadd-link-button {
    justify-self: stretch;
    width: 100%;
  }

  .account-date-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Stats hub */
.stats-hub-page {
  padding-top: 2rem;
}

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

.stats-hub-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 28px;
  align-items: center;
  gap: 1rem;
  min-height: 128px;
  padding: 1.1rem;
  color: var(--kb-text);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--kb-border);
  border-radius: 18px;
  box-shadow: var(--kb-shadow);
  overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.stats-hub-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--kb-primary);
}

.stats-hub-card:hover {
  color: var(--kb-text);
  border-color: rgba(99, 102, 241, 0.25);
  box-shadow: var(--kb-shadow-hover);
  transform: translateY(-2px);
}

.stats-hub-icon {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--kb-primary);
  background: var(--kb-primary-soft);
  border-radius: 18px;
  font-size: 1.55rem;
}

.stats-hub-card strong {
  display: block;
  color: var(--kb-text);
  font-size: 1rem;
  font-weight: 900;
  margin-bottom: 0.2rem;
}

.stats-hub-card span {
  display: block;
  color: var(--kb-muted);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
}

.stats-hub-arrow {
  color: #98a2b3;
  font-size: 1.35rem;
}

.stats-hub-card.is-blue::before { background: #0ea5e9; }
.stats-hub-card.is-blue .stats-hub-icon { color: #0284c7; background: rgba(14, 165, 233, 0.12); }
.stats-hub-card.is-green::before { background: #22c55e; }
.stats-hub-card.is-green .stats-hub-icon { color: #16a34a; background: rgba(34, 197, 94, 0.13); }
.stats-hub-card.is-purple::before { background: #8b5cf6; }
.stats-hub-card.is-purple .stats-hub-icon { color: #7c3aed; background: rgba(139, 92, 246, 0.13); }
.stats-hub-card.is-red::before { background: #ef4444; }
.stats-hub-card.is-red .stats-hub-icon { color: #ef4444; background: rgba(239, 68, 68, 0.12); }
.stats-hub-card.is-muted::before { background: #64748b; }
.stats-hub-card.is-muted .stats-hub-icon { color: #475569; background: rgba(100, 116, 139, 0.12); }

@media (max-width: 991.98px) {
  .stats-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .stats-hub-page {
    padding-top: 1rem;
  }

  .stats-hub-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .stats-hub-card {
    grid-template-columns: 48px minmax(0, 1fr) 22px;
    min-height: 96px;
    padding: 0.85rem;
    border-radius: 16px;
  }

  .stats-hub-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    font-size: 1.35rem;
  }
}

/* Types module */
.types-page {
  padding-top: 2rem;
}

.types-summary-grid {
  margin-bottom: 1rem;
}

.types-list {
  display: grid;
  gap: 0.75rem;
}

.types-group-card {
  border: 1px solid var(--kb-border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--kb-shadow);
  overflow: hidden;
}

.types-group-card summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  list-style: none;
}

.types-group-card summary::-webkit-details-marker {
  display: none;
}

.types-group-main {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.types-group-icon,
.types-operation-logo {
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--kb-primary-soft);
  color: var(--kb-primary);
}

.types-group-icon {
  width: 44px;
  height: 44px;
  font-size: 1.15rem;
  overflow: hidden;
}

.types-group-icon i {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  line-height: 1;
}

.types-group-main strong,
.types-operation-row strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--kb-text);
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.types-group-main span,
.types-operation-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--kb-muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.types-group-total {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  color: var(--kb-text);
  font-weight: 950;
  white-space: nowrap;
}

.types-expense-mode-select {
  min-width: 148px;
}

.types-group-share {
  border: 1px solid rgba(100, 116, 139, 0.12);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1;
  padding: 0.38rem 0.52rem;
}

.types-group-card.is-negative .types-group-share {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.16);
  color: #dc2626;
}

.types-group-card.is-positive .types-group-share {
  background: rgba(34, 197, 94, 0.09);
  border-color: rgba(34, 197, 94, 0.18);
  color: #16a34a;
}

.types-group-total i {
  color: #98a2b3;
  font-size: 1.25rem;
  transition: transform 0.15s ease;
}

.types-group-card[open] .types-group-total i {
  transform: rotate(180deg);
}

.types-group-card.is-positive {
  border-color: rgba(34, 197, 94, 0.24);
}

.types-group-card.is-positive .types-group-icon {
  background: rgba(34, 197, 94, 0.12);
  color: #16a34a;
}

.types-group-card.is-negative {
  border-color: rgba(239, 68, 68, 0.18);
}

.types-group-card.is-negative .types-group-icon {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
}

.types-group-metrics {
  display: grid;
  grid-template-columns: 1.1fr 1.1fr 0.85fr;
  gap: 0.5rem;
  padding: 0 1rem 0.8rem;
}

.types-group-metrics div {
  min-width: 0;
  padding: 0.58rem 0.65rem;
  border-radius: 13px;
  background: #f8fafc;
}

.types-group-metrics div.is-expense {
  background: rgba(239, 68, 68, 0.07);
}

.types-group-metrics div.is-income {
  background: rgba(34, 197, 94, 0.08);
}

.types-group-metrics span,
.types-group-metrics strong,
.types-group-metrics em {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.types-group-metrics span {
  color: var(--kb-muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.types-group-metrics strong {
  color: var(--kb-text);
  font-size: 0.9rem;
  font-weight: 950;
}

.types-group-metrics em {
  margin-top: 0.1rem;
  color: var(--kb-muted);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 850;
}

.types-group-metrics .is-expense strong {
  color: #dc2626;
}

.types-group-metrics .is-income strong {
  color: #16a34a;
}

.types-operation-list {
  display: grid;
  gap: 0.45rem;
  padding: 0 1rem 1rem;
}

.types-operation-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem;
  border: 1px solid var(--kb-border-soft);
  border-radius: 14px;
  background: #fbfcff;
}

.types-operation-logo {
  width: 38px;
  height: 38px;
  background: #f1f5f9;
}

.types-operation-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.types-operation-row em {
  font-style: normal;
  font-size: 0.88rem;
  font-weight: 950;
  text-align: right;
  white-space: nowrap;
}

.types-page .is-positive { color: #16a34a !important; }
.types-page .is-negative { color: #dc2626 !important; }
.types-page .is-neutral { color: var(--kb-muted) !important; }

.types-empty-card .card-body {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 2rem;
  text-align: center;
}

.types-empty-card i {
  color: var(--kb-primary);
  font-size: 2rem;
}

.types-empty-card strong {
  color: var(--kb-text);
  font-size: 1.05rem;
  font-weight: 950;
}

@media (max-width: 767.98px) {
  .types-page {
    padding-top: 1rem;
  }

  .types-group-card summary {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    padding: 0.78rem;
  }

  .types-group-total {
    justify-content: space-between;
    width: 100%;
    padding-left: 0;
  }

  .types-group-metrics {
    grid-template-columns: 1fr;
    padding: 0 0.78rem 0.78rem;
  }

  .types-operation-list {
    padding: 0 0.78rem 0.78rem;
  }

  .types-operation-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .types-operation-row em {
    grid-column: 2;
    text-align: left;
  }
}


/* Data export */
.data-export-page {
  padding-bottom: 3rem;
}

.data-export-hero {
  align-items: stretch;
  gap: 1rem;
}

.data-export-security {
  align-items: center;
  background: rgba(236, 253, 245, 0.82);
  border: 1px solid rgba(134, 239, 172, 0.75);
  border-radius: 18px;
  color: #166534;
  display: flex;
  font-size: 0.95rem;
  font-weight: 850;
  gap: 0.7rem;
  max-width: 390px;
  padding: 0.95rem 1.1rem;
}

.data-export-security i {
  background: #dcfce7;
  border-radius: 14px;
  display: grid;
  flex: 0 0 42px;
  font-size: 1.35rem;
  height: 42px;
  place-items: center;
  width: 42px;
}

.data-export-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.data-export-main,
.data-export-side .kb-panel {
  border-radius: 18px;
}

.data-export-side {
  display: grid;
  align-content: start;
  gap: 1rem;
}

.data-export-section {
  border-top: 1px solid var(--kb-border);
  display: grid;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0;
}

.data-export-section:first-of-type {
  border-top: 0;
}

.data-export-section-title {
  align-items: center;
  display: flex;
  gap: 0.85rem;
}

.data-export-section-title i {
  background: #eef2ff;
  border-radius: 14px;
  color: var(--kb-primary);
  display: grid;
  flex: 0 0 44px;
  font-size: 1.3rem;
  height: 44px;
  place-items: center;
  width: 44px;
}

.data-export-section-title strong {
  color: var(--kb-text);
  display: block;
  font-size: 1rem;
  font-weight: 950;
}

.data-export-section-title span {
  color: var(--kb-muted);
  display: block;
  font-size: 0.9rem;
  font-weight: 750;
  margin-top: 0.12rem;
}

.data-export-choice-grid,
.data-export-account-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-export-choice-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.data-export-choice,
.data-export-account,
.data-export-toggle {
  background: rgba(248, 250, 252, 0.72);
  border: 1px solid var(--kb-border);
  border-radius: 16px;
  cursor: pointer;
  display: flex;
  gap: 0.8rem;
  min-height: 82px;
  padding: 0.9rem;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.data-export-choice:hover,
.data-export-account:hover,
.data-export-toggle:hover {
  border-color: rgba(99, 102, 241, 0.32);
  transform: translateY(-1px);
}

.data-export-choice input,
.data-export-account input,
.data-export-toggle input {
  accent-color: var(--kb-primary);
  margin-top: 0.25rem;
}

.data-export-choice strong,
.data-export-account strong,
.data-export-toggle strong {
  color: var(--kb-text);
  display: block;
  font-size: 0.96rem;
  font-weight: 950;
}

.data-export-choice span,
.data-export-account small,
.data-export-toggle small {
  color: var(--kb-muted);
  display: block;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
  margin-top: 0.25rem;
}

.data-export-choice.is-active,
.data-export-account.is-checked {
  background: #f5f3ff;
  border-color: rgba(99, 102, 241, 0.42);
}

.data-export-date-range {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.data-export-date-range label span {
  color: var(--kb-muted);
  display: block;
  font-size: 0.8rem;
  font-weight: 900;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.data-export-account {
  align-items: center;
}

.data-export-account-icon {
  background: #eef2ff;
  border-radius: 14px;
  color: var(--kb-primary);
  display: grid;
  flex: 0 0 42px;
  font-size: 1.2rem;
  height: 42px;
  place-items: center;
  width: 42px;
}

.data-export-toggle {
  align-items: flex-start;
  min-height: auto;
}

.data-export-options,
.data-export-files {
  padding: 1rem;
}

.data-export-files ul {
  color: var(--kb-text);
  display: grid;
  gap: 0.35rem;
  grid-template-columns: 1fr;
  list-style: none;
  margin: 0;
  padding: 0;
}

.data-export-files li {
  background: #f8fafc;
  border: 1px solid var(--kb-border);
  border-radius: 11px;
  font-size: 0.82rem;
  font-weight: 850;
  padding: 0.45rem 0.6rem;
}

.data-export-files p {
  color: var(--kb-muted);
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.4;
  margin: 0.85rem 0 0;
}

.data-export-submit {
  align-items: center;
  border-radius: 16px;
  display: flex;
  font-size: 0.96rem;
  font-weight: 950;
  gap: 0.55rem;
  justify-content: center;
  min-height: 54px;
  width: 100%;
}

.kb-alert {
  align-items: center;
  border-radius: 16px;
  display: flex;
  font-weight: 850;
  gap: 0.7rem;
  margin: 0 0 1rem;
  padding: 1rem 1.1rem;
}

.kb-alert i {
  font-size: 1.25rem;
}

.kb-alert-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
}

@media (max-width: 991.98px) {
  .data-export-layout {
    grid-template-columns: 1fr;
  }

  .data-export-security {
    max-width: none;
  }
}

@media (max-width: 767.98px) {
  .data-export-page {
    padding-top: 1rem;
  }

  .data-export-hero {
    gap: 0.75rem;
  }

  .data-export-choice-grid,
  .data-export-choice-grid-3,
  .data-export-account-grid,
  .data-export-date-range {
    grid-template-columns: 1fr;
  }

  .data-export-section {
    padding: 1rem 0.9rem 0;
  }
}


/* Settings */
.settings-page {
  padding-bottom: 3rem;
}

.settings-layout {
  display: grid;
  gap: 1rem;
}

.settings-panel {
  border-radius: 18px;
  padding: 1.1rem;
}

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

.settings-field-card {
  align-items: center;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid var(--kb-border);
  border-radius: 16px;
  display: grid;
  gap: 0.85rem;
  grid-template-columns: 52px minmax(0, 1fr) 190px;
  padding: 0.9rem;
}

.settings-icon {
  border-radius: 16px;
  display: grid;
  font-size: 1.35rem;
  height: 52px;
  place-items: center;
  width: 52px;
}

.settings-icon.is-blue {
  background: #eef2ff;
  color: var(--kb-primary);
}

.settings-icon.is-green {
  background: #dcfce7;
  color: #16a34a;
}

.settings-field-card strong,
.settings-add-row label {
  color: var(--kb-text);
  display: block;
  font-weight: 950;
}

.settings-field-card small {
  color: var(--kb-muted);
  display: block;
  font-size: 0.82rem;
  font-weight: 750;
  line-height: 1.35;
  margin-top: 0.15rem;
}

.settings-fixed-editor {
  display: grid;
  gap: 1rem;
}

.settings-add-row {
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid var(--kb-border);
  border-radius: 16px;
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem;
}

.settings-add-row > div {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.settings-add-row .btn {
  align-items: center;
  border-radius: 13px;
  display: inline-flex;
  font-weight: 950;
  gap: 0.35rem;
  white-space: nowrap;
}

.settings-fixed-list {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 46px;
}

.settings-fixed-item {
  align-items: center;
  background: #f5f3ff;
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  color: var(--kb-primary);
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 950;
  gap: 0.38rem;
  min-height: 36px;
  padding: 0.28rem 0.32rem 0.28rem 0.68rem;
}

.settings-fixed-item em {
  font-style: normal;
  line-height: 1.1;
}

.settings-fixed-item button {
  align-items: center;
  background: rgba(99, 102, 241, 0.12);
  border: 0;
  border-radius: 999px;
  color: var(--kb-primary);
  display: inline-flex;
  height: 26px;
  justify-content: center;
  padding: 0;
  transition: background 0.16s ease, color 0.16s ease;
  width: 26px;
}

.settings-fixed-item button:hover {
  background: #fee2e2;
  color: #dc2626;
}



.settings-exception-editor {
  display: grid;
  gap: 1rem;
}

.settings-exception-add {
  align-items: end;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid var(--kb-border);
  border-radius: 16px;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 150px repeat(2, minmax(140px, 1fr)) minmax(180px, 1.2fr) auto;
  padding: 0.85rem;
}

.settings-exception-add label span {
  color: var(--kb-muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 950;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.settings-exception-add .btn {
  align-items: center;
  border-radius: 13px;
  display: inline-flex;
  font-weight: 950;
  gap: 0.35rem;
  justify-content: center;
  min-height: 44px;
  white-space: nowrap;
}

.settings-exception-list {
  display: grid;
  gap: 0.6rem;
}

.settings-exception-item {
  align-items: center;
  background: #fbfcff;
  border: 1px solid var(--kb-border);
  border-radius: 16px;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: minmax(0, 1fr) 34px;
  padding: 0.8rem 0.85rem;
}

.settings-exception-item strong,
.settings-exception-item span,
.settings-exception-item small {
  display: block;
}

.settings-exception-item strong {
  color: var(--kb-text);
  font-size: 0.98rem;
  font-weight: 950;
}

.settings-exception-item span {
  color: var(--kb-muted);
  font-size: 0.84rem;
  font-weight: 850;
  margin-top: 0.15rem;
}

.settings-exception-item small {
  color: var(--kb-primary);
  font-size: 0.78rem;
  font-weight: 850;
  margin-top: 0.18rem;
}

.settings-exception-item button {
  align-items: center;
  background: #fee2e2;
  border: 0;
  border-radius: 999px;
  color: #dc2626;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

@media (max-width: 1199.98px) {
  .settings-exception-add {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .settings-exception-add {
    grid-template-columns: 1fr;
  }
}

.settings-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

.kb-alert-success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #16a34a;
}

@media (max-width: 991.98px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-field-card {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  .settings-field-card input {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .settings-page {
    padding-top: 1rem;
  }

  .settings-panel {
    padding: 0.9rem;
  }

  .settings-add-row > div {
    grid-template-columns: 1fr;
  }

  

.settings-exception-editor {
  display: grid;
  gap: 1rem;
}

.settings-exception-add {
  align-items: end;
  background: rgba(248, 250, 252, 0.82);
  border: 1px solid var(--kb-border);
  border-radius: 16px;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 150px repeat(2, minmax(140px, 1fr)) minmax(180px, 1.2fr) auto;
  padding: 0.85rem;
}

.settings-exception-add label span {
  color: var(--kb-muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 950;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.settings-exception-add .btn {
  align-items: center;
  border-radius: 13px;
  display: inline-flex;
  font-weight: 950;
  gap: 0.35rem;
  justify-content: center;
  min-height: 44px;
  white-space: nowrap;
}

.settings-exception-list {
  display: grid;
  gap: 0.6rem;
}

.settings-exception-item {
  align-items: center;
  background: #fbfcff;
  border: 1px solid var(--kb-border);
  border-radius: 16px;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: minmax(0, 1fr) 34px;
  padding: 0.8rem 0.85rem;
}

.settings-exception-item strong,
.settings-exception-item span,
.settings-exception-item small {
  display: block;
}

.settings-exception-item strong {
  color: var(--kb-text);
  font-size: 0.98rem;
  font-weight: 950;
}

.settings-exception-item span {
  color: var(--kb-muted);
  font-size: 0.84rem;
  font-weight: 850;
  margin-top: 0.15rem;
}

.settings-exception-item small {
  color: var(--kb-primary);
  font-size: 0.78rem;
  font-weight: 850;
  margin-top: 0.18rem;
}

.settings-exception-item button {
  align-items: center;
  background: #fee2e2;
  border: 0;
  border-radius: 999px;
  color: #dc2626;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  width: 34px;
}

@media (max-width: 1199.98px) {
  .settings-exception-add {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .settings-exception-add {
    grid-template-columns: 1fr;
  }
}

.settings-actions {
    display: grid;
  }
}
