/*
 * Dreamz FEP v3 — Luminous Operations
 *
 * Shared visual system for the complete FEP application.  Page-specific
 * templates may add layout rules, but colour, spacing, type, controls and
 * states belong here.
 */

body.fep-v3 {
  --fep-navy-950: #030814;
  --fep-navy-900: #061226;
  --fep-navy-850: #0a1a33;
  --fep-navy-800: #102543;
  --fep-navy-700: #17355c;
  --fep-blue-600: #1f6feb;
  --fep-blue-500: #3182f6;
  --fep-blue-100: #dcecff;
  --fep-gold-600: #d99600;
  --fep-gold-500: #f2b316;
  --fep-gold-400: #ffc947;
  --fep-gold-100: #fff0bd;
  --fep-mist-50: #f8fbff;
  --fep-mist-100: #eef5fc;
  --fep-mist-150: #e8f0f8;
  --fep-mist-200: #d9e5f1;
  --fep-ink-950: #071325;
  --fep-ink-800: #1a2b43;
  --fep-ink-600: #52657e;
  --fep-ink-500: #6b7f97;
  --fep-success-700: #0c7651;
  --fep-success-500: #1fa873;
  --fep-success-100: #dff8ed;
  --fep-warning-700: #9b5c00;
  --fep-warning-500: #e99800;
  --fep-warning-100: #fff3cf;
  --fep-danger-700: #aa2636;
  --fep-danger-500: #e04455;
  --fep-danger-100: #ffe7eb;
  --fep-info-700: #1257a6;
  --fep-info-100: #e6f1ff;
  --fep-radius-xs: 8px;
  --fep-radius-sm: 12px;
  --fep-radius-md: 18px;
  --fep-radius-lg: 24px;
  --fep-radius-xl: 32px;
  --fep-shadow-xs: 0 1px 2px rgba(4, 18, 42, 0.04);
  --fep-shadow-sm: 0 8px 22px rgba(9, 32, 66, 0.07);
  --fep-shadow-md: 0 18px 48px rgba(9, 32, 66, 0.11);
  --fep-shadow-lg: 0 28px 72px rgba(3, 12, 29, 0.18);
  --fep-glow-blue: 0 0 0 1px rgba(49, 130, 246, 0.12), 0 18px 44px rgba(49, 130, 246, 0.12);
  --fep-glow-gold: 0 0 0 1px rgba(242, 179, 22, 0.15), 0 18px 40px rgba(217, 150, 0, 0.11);
  --fep-content-max: 1560px;
  --fep-sidebar-width: 244px;
  --fep-motion: 160ms cubic-bezier(0.2, 0.75, 0.25, 1);
  background:
    radial-gradient(circle at 82% -10%, rgba(49, 130, 246, 0.09), transparent 34rem),
    linear-gradient(180deg, #f8fbff 0%, #eef4fa 100%);
  color: var(--fep-ink-800);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

body.fep-v3 *,
body.fep-v3 *::before,
body.fep-v3 *::after {
  box-sizing: border-box;
}

body.fep-v3 a {
  color: var(--fep-blue-600);
  text-underline-offset: 0.16em;
}

body.fep-v3 a:hover {
  color: #155ecb;
}

body.fep-v3 :focus-visible {
  outline: 3px solid #075fcf;
  outline-offset: 3px;
}

body.fep-v3 h1,
body.fep-v3 h2,
body.fep-v3 h3,
body.fep-v3 h4,
body.fep-v3 h5,
body.fep-v3 h6 {
  color: var(--fep-ink-950);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
}

body.fep-v3 .sidebar {
  background:
    radial-gradient(circle at 32% 3%, rgba(49, 130, 246, 0.15), transparent 16rem),
    radial-gradient(circle at 90% 34%, rgba(242, 179, 22, 0.08), transparent 15rem),
    linear-gradient(180deg, var(--fep-navy-900), var(--fep-navy-950));
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 20px 0 65px rgba(4, 16, 38, 0.2);
  padding: 16px 12px;
  width: var(--fep-sidebar-width);
}

body.fep-v3 .sidebar-logo-panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.02)),
    rgba(3, 8, 20, 0.72);
  border-color: rgba(255, 201, 71, 0.22);
  border-radius: var(--fep-radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 44px rgba(0, 0, 0, 0.22);
  padding: 10px;
}

body.fep-v3 .sidebar-logo-frame {
  border-color: rgba(255, 201, 71, 0.2);
  border-radius: var(--fep-radius-sm);
  min-height: 64px;
}

body.fep-v3 .sidebar-logo {
  max-height: 48px;
}

body.fep-v3 .sidebar-user {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  border-color: rgba(255, 255, 255, 0.09);
  border-radius: var(--fep-radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
  margin-bottom: 18px;
  padding: 12px;
}

body.fep-v3 .sidebar-user-avatar {
  border-radius: 11px;
  box-shadow: 0 10px 30px rgba(242, 179, 22, 0.2);
}

body.fep-v3 .sidebar-role-line {
  color: #aec0d7;
  display: block;
  font-size: 0.74rem;
  font-weight: 650;
  margin-top: 1px;
}

body.fep-v3 .sidebar-link {
  border: 1px solid transparent;
  border-radius: 13px;
  min-height: 48px;
  padding: 8px 9px;
  transition:
    background var(--fep-motion),
    border-color var(--fep-motion),
    box-shadow var(--fep-motion),
    transform var(--fep-motion);
}

body.fep-v3 .sidebar-link:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

body.fep-v3 .sidebar-link.active {
  background:
    linear-gradient(135deg, rgba(255, 201, 71, 0.98), rgba(242, 179, 22, 0.94));
  border-color: rgba(255, 230, 150, 0.72);
  box-shadow: 0 12px 28px rgba(217, 150, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  color: #151007;
}

body.fep-v3 .sidebar-link.active .nav-hint {
  color: rgba(34, 25, 4, 0.7);
}

body.fep-v3 .nav-icon {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 10px;
  height: 32px;
  width: 32px;
}

body.fep-v3 .sidebar-link.active .nav-icon {
  background: rgba(255, 255, 255, 0.26);
  border-color: rgba(255, 255, 255, 0.25);
}

body.fep-v3 .content-area {
  margin: 0;
  max-width: none;
  min-width: 0;
  padding: 26px clamp(18px, 3vw, 48px) 64px;
  width: calc(100% - var(--fep-sidebar-width));
}

body.fep-v3 .content-area > * {
  margin-left: auto;
  margin-right: auto;
  max-width: var(--fep-content-max);
}

/* Shared page primitives */
.fep-page {
  display: flex;
  flex-direction: column;
  gap: 22px;
  width: 100%;
}

.fep-page--compact {
  max-width: 1180px !important;
}

.fep-page-header {
  align-items: flex-start;
  display: flex;
  gap: 22px;
  justify-content: space-between;
}

.fep-page-header__copy {
  min-width: 0;
}

.fep-eyebrow {
  color: var(--fep-blue-600);
  display: block;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.095em;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.fep-page-title {
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.04;
  margin: 0;
}

.fep-page-subtitle {
  color: var(--fep-ink-600);
  font-size: 0.98rem;
  margin: 9px 0 0;
  max-width: 64ch;
}

.fep-page-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.fep-card,
body.fep-v3 .card,
body.fep-v3 .quick-panel,
body.fep-v3 .dreamz-box {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(167, 186, 208, 0.5);
  border-radius: var(--fep-radius-md);
  box-shadow: var(--fep-shadow-sm);
}

.fep-card {
  padding: clamp(18px, 2.1vw, 28px);
}

.fep-card--flush {
  overflow: hidden;
  padding: 0;
}

.fep-card--navy {
  background:
    radial-gradient(circle at 90% 0, rgba(49, 130, 246, 0.24), transparent 20rem),
    linear-gradient(145deg, var(--fep-navy-900), var(--fep-navy-800));
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: var(--fep-shadow-lg);
  color: #eef6ff;
}

.fep-card--navy h1,
.fep-card--navy h2,
.fep-card--navy h3,
.fep-card--navy h4 {
  color: #fff;
}

.fep-section-head {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.fep-section-title {
  font-size: 1.15rem;
  line-height: 1.2;
  margin: 0;
}

.fep-section-copy {
  color: var(--fep-ink-600);
  font-size: 0.88rem;
  margin: 4px 0 0;
}

/* Hero */
.fep-hero {
  background:
    linear-gradient(90deg, rgba(3, 8, 20, 0.98) 0%, rgba(6, 18, 38, 0.9) 42%, rgba(6, 18, 38, 0.28) 78%, rgba(6, 18, 38, 0.34) 100%),
    var(--fep-hero-image, none),
    linear-gradient(135deg, var(--fep-navy-950), var(--fep-navy-800));
  background-position: center, center, center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 1px solid rgba(255, 201, 71, 0.2);
  border-radius: var(--fep-radius-xl);
  box-shadow: var(--fep-shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #eaf4ff;
  min-height: 245px;
  overflow: hidden;
  padding: clamp(28px, 4vw, 54px);
  position: relative;
}

.fep-hero::after {
  background: linear-gradient(90deg, transparent, rgba(255, 201, 71, 0.85), transparent);
  bottom: 0;
  content: "";
  height: 1px;
  left: 7%;
  opacity: 0.8;
  position: absolute;
  right: 7%;
}

.fep-hero__content {
  max-width: 650px;
  position: relative;
  z-index: 1;
}

.fep-hero__brand {
  display: block;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.42));
  height: auto;
  margin-bottom: 22px;
  max-width: min(330px, 64vw);
}

.fep-hero__eyebrow {
  color: var(--fep-gold-400);
  font-size: 0.75rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.fep-hero__title {
  color: #fff !important;
  font-size: clamp(2rem, 4vw, 3.55rem);
  line-height: 0.98;
  margin: 7px 0 0;
}

.fep-hero__copy {
  color: #c4d4e8;
  font-size: 1rem;
  margin: 15px 0 0;
  max-width: 60ch;
}

.fep-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

body.fep-v3 .incasso-page {
  max-width: 1480px !important;
}

body.fep-v3 .incasso-v3-hero {
  --fep-hero-image: url("/static/fep-v3-hero-ribbon-integrated-20260731.webp?v=20260731-correction");
  align-items: flex-start !important;
  display: flex !important;
  gap: 26px !important;
  justify-content: space-between !important;
  margin: 0 !important;
}

.incasso-v3-hero-copy {
  max-width: 680px;
  position: relative;
  z-index: 1;
}

.incasso-v3-hero-brand {
  margin-bottom: 18px;
  max-width: 260px;
}

.incasso-v3-hero .incasso-subtitle {
  color: #c5d5e8 !important;
  font-size: 0.98rem !important;
  margin: 14px 0 0 !important;
  max-width: 60ch !important;
}

.incasso-v3-hero .incasso-header-tools {
  align-items: flex-end;
  background: rgba(5, 15, 32, 0.66);
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: var(--fep-radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  display: flex;
  flex: 0 0 min(365px, 38%);
  flex-direction: column;
  gap: 10px;
  padding: 15px;
  position: relative;
  z-index: 1;
}

.incasso-v3-hero .incasso-period-form {
  align-items: stretch;
  display: flex;
  flex-direction: column;
  width: 100%;
}

.incasso-v3-hero .incasso-period-form label {
  color: #a9bdd5;
}

.incasso-v3-hero .incasso-view-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 11px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 3px;
  width: 100%;
}

.incasso-v3-hero .incasso-view-link {
  border-radius: 8px;
  color: #c7d7e9;
  padding: 7px 9px;
  text-align: center;
}

.incasso-v3-hero .incasso-view-link.is-active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--fep-blue-600);
}

.incasso-v3-hero .incasso-sync {
  align-self: stretch;
  justify-content: center;
}

.incasso-v3-hero .btn {
  width: 100%;
}

body.fep-v3 .incasso-bank-sync,
body.fep-v3 .incasso-auto-gym,
body.fep-v3 .incasso-progress-card,
body.fep-v3 .incasso-empty-upload,
body.fep-v3 .incasso-alert,
body.fep-v3 .incasso-action-panel,
body.fep-v3 .incasso-completed-panel,
body.fep-v3 .incasso-details {
  border-radius: var(--fep-radius-md);
  box-shadow: var(--fep-shadow-sm);
}

body.fep-v3 .incasso-bank-sync {
  background:
    linear-gradient(135deg, rgba(255, 250, 233, 0.94), rgba(255, 255, 255, 0.94));
  border-color: rgba(242, 179, 22, 0.42);
  box-shadow: var(--fep-glow-gold);
}

body.fep-v3 .incasso-auto-gym {
  background:
    radial-gradient(circle at 100% 0, rgba(49, 130, 246, 0.1), transparent 24rem),
    rgba(245, 250, 255, 0.94);
  border-color: rgba(49, 130, 246, 0.28);
  box-shadow: var(--fep-glow-blue);
}

body.fep-v3 .incasso-metrics {
  gap: 14px;
}

body.fep-v3 .incasso-metric {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.88));
  border-color: rgba(167, 186, 208, 0.52);
  border-radius: var(--fep-radius-md);
  box-shadow: var(--fep-shadow-sm);
  min-height: 132px;
  padding: 18px;
}

body.fep-v3 .incasso-metric-value {
  color: var(--fep-ink-950);
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  letter-spacing: -0.045em;
}

body.fep-v3 .incasso-metric-label {
  color: var(--fep-ink-500);
}

body.fep-v3 .incasso-metric-context {
  color: var(--fep-ink-600);
}

/* KPI and progress */
.fep-kpi-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.fep-kpi {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.88));
  border: 1px solid rgba(167, 186, 208, 0.52);
  border-radius: var(--fep-radius-md);
  box-shadow: var(--fep-shadow-sm);
  min-height: 132px;
  overflow: hidden;
  padding: 18px;
  position: relative;
}

.fep-kpi::before {
  background: var(--fep-kpi-color, var(--fep-blue-500));
  content: "";
  height: 3px;
  left: 17px;
  position: absolute;
  right: 17px;
  top: 0;
}

.fep-kpi--success {
  --fep-kpi-color: var(--fep-success-500);
}

.fep-kpi--warning {
  --fep-kpi-color: var(--fep-warning-500);
}

.fep-kpi--danger {
  --fep-kpi-color: var(--fep-danger-500);
}

.fep-kpi__label {
  color: var(--fep-ink-500);
  display: block;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.fep-kpi__value {
  color: var(--fep-ink-950);
  display: block;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin-top: 9px;
}

.fep-kpi__hint {
  color: var(--fep-ink-600);
  display: block;
  font-size: 0.78rem;
  line-height: 1.35;
  margin-top: 8px;
}

.fep-progress {
  background: var(--fep-mist-150);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.fep-progress__bar {
  background: linear-gradient(90deg, var(--fep-blue-500), #1cc982);
  border-radius: inherit;
  height: 100%;
  min-width: 0;
  transition: width 260ms ease;
}

/* Buttons and form controls */
body.fep-v3 .btn,
.fep-button {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 12px;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 780;
  gap: 8px;
  justify-content: center;
  min-height: 42px;
  padding: 9px 15px;
  text-decoration: none;
  transition:
    background var(--fep-motion),
    border-color var(--fep-motion),
    box-shadow var(--fep-motion),
    color var(--fep-motion),
    transform var(--fep-motion);
}

body.fep-v3 .btn:hover,
.fep-button:hover {
  transform: translateY(-1px);
}

body.fep-v3 .btn-primary,
.fep-button--primary {
  background: linear-gradient(135deg, var(--fep-blue-600), #195dcb);
  border-color: rgba(15, 77, 166, 0.65);
  box-shadow: 0 10px 22px rgba(31, 111, 235, 0.2);
  color: #fff;
}

body.fep-v3 .btn-primary:hover,
.fep-button--primary:hover {
  background: linear-gradient(135deg, #2d7df1, #1552b4);
  color: #fff;
}

body.fep-v3 .btn-warning,
.fep-button--gold {
  background: linear-gradient(135deg, var(--fep-gold-400), var(--fep-gold-500));
  border-color: var(--fep-gold-600);
  box-shadow: 0 10px 24px rgba(217, 150, 0, 0.2);
  color: #251600;
}

body.fep-v3 .btn-outline-primary,
.fep-button--secondary {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(31, 111, 235, 0.36);
  color: var(--fep-blue-600);
}

body.fep-v3 .btn-outline-primary:hover,
.fep-button--secondary:hover {
  background: var(--fep-info-100);
  border-color: var(--fep-blue-500);
  color: var(--fep-info-700);
}

.fep-button--quiet {
  background: transparent;
  border-color: rgba(107, 127, 151, 0.3);
  color: var(--fep-ink-600);
}

body.fep-v3 .btn:disabled,
body.fep-v3 .btn.disabled,
.fep-button:disabled,
.fep-button[aria-disabled="true"] {
  background: #e4ebf3;
  border-color: #d5e0eb;
  box-shadow: none;
  color: #8494a7;
  cursor: not-allowed;
  opacity: 1;
  transform: none;
}

body.fep-v3 .form-control,
body.fep-v3 .form-select,
body.fep-v3 input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body.fep-v3 select,
body.fep-v3 textarea {
  background-color: rgba(255, 255, 255, 0.94);
  border: 1px solid #c8d6e5;
  border-radius: 11px;
  color: var(--fep-ink-950);
  min-height: 42px;
  padding: 9px 12px;
  transition: border-color var(--fep-motion), box-shadow var(--fep-motion), background var(--fep-motion);
}

body.fep-v3 textarea {
  min-height: 92px;
}

body.fep-v3 .form-control:focus,
body.fep-v3 .form-select:focus,
body.fep-v3 input:focus,
body.fep-v3 select:focus,
body.fep-v3 textarea:focus {
  background: #fff;
  border-color: #075fcf;
  box-shadow: 0 0 0 3px #075fcf;
  outline: 2px solid #fff;
  outline-offset: 1px;
}

.fep-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fep-label {
  color: var(--fep-ink-600);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.fep-help {
  color: var(--fep-ink-500);
  font-size: 0.78rem;
}

/* Status language */
.fep-chip,
body.fep-v3 .badge {
  align-items: center;
  background: var(--fep-mist-100);
  border: 1px solid var(--fep-mist-200);
  border-radius: 999px;
  color: var(--fep-ink-600);
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 800;
  gap: 6px;
  line-height: 1.2;
  min-height: 26px;
  padding: 4px 9px;
  white-space: normal;
}

.fep-chip::before {
  background: currentColor;
  border-radius: 999px;
  content: "";
  height: 6px;
  opacity: 0.72;
  width: 6px;
}

.fep-chip--success {
  background: var(--fep-success-100);
  border-color: #9be4c7;
  color: var(--fep-success-700);
}

.fep-chip--warning {
  background: var(--fep-warning-100);
  border-color: #f0d27a;
  color: var(--fep-warning-700);
}

.fep-chip--danger {
  background: var(--fep-danger-100);
  border-color: #f3abb5;
  color: var(--fep-danger-700);
}

.fep-chip--info {
  background: var(--fep-info-100);
  border-color: #a9cffa;
  color: var(--fep-info-700);
}

.fep-chip--neutral::before {
  background: #8192a5;
}

/* Alerts and empty states */
body.fep-v3 .alert,
.fep-alert {
  align-items: flex-start;
  background: #fff;
  border: 1px solid var(--fep-mist-200);
  border-left: 4px solid var(--fep-blue-500);
  border-radius: var(--fep-radius-sm);
  box-shadow: var(--fep-shadow-xs);
  color: var(--fep-ink-800);
  display: flex;
  gap: 11px;
  padding: 14px 16px;
}

body.fep-v3 .alert-success,
.fep-alert--success {
  background: #f1fcf7;
  border-color: #a8e8cd;
  border-left-color: var(--fep-success-500);
}

body.fep-v3 .alert-warning,
.fep-alert--warning {
  background: #fffaf0;
  border-color: #efd58c;
  border-left-color: var(--fep-warning-500);
}

body.fep-v3 .alert-danger,
.fep-alert--danger {
  background: #fff4f5;
  border-color: #f3b7bf;
  border-left-color: var(--fep-danger-500);
}

.fep-empty {
  align-items: center;
  color: var(--fep-ink-600);
  display: flex;
  flex-direction: column;
  gap: 9px;
  justify-content: center;
  min-height: 210px;
  padding: 34px;
  text-align: center;
}

.fep-empty__icon {
  align-items: center;
  background: var(--fep-mist-100);
  border: 1px solid var(--fep-mist-200);
  border-radius: 18px;
  color: var(--fep-blue-600);
  display: inline-flex;
  font-size: 1.45rem;
  height: 54px;
  justify-content: center;
  width: 54px;
}

.fep-empty h3 {
  font-size: 1.02rem;
  margin: 4px 0 0;
}

.fep-empty p {
  font-size: 0.86rem;
  margin: 0;
  max-width: 46ch;
}

/* Tables and data lists */
body.fep-v3 .table {
  color: var(--fep-ink-800);
  margin-bottom: 0;
}

body.fep-v3 .table > :not(caption) > * > * {
  border-bottom-color: #e2eaf2;
  padding: 13px 14px;
  vertical-align: middle;
}

body.fep-v3 .table thead th {
  background: #f2f7fc;
  color: var(--fep-ink-500);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

body.fep-v3 .table tbody tr {
  transition: background var(--fep-motion);
}

body.fep-v3 .table tbody tr:hover {
  background: #f7fbff;
}

.fep-data-list {
  display: flex;
  flex-direction: column;
}

.fep-data-row {
  align-items: center;
  border-bottom: 1px solid #e1eaf3;
  color: inherit;
  display: grid;
  gap: 14px;
  min-height: 76px;
  padding: 13px 16px;
  text-decoration: none;
  transition: background var(--fep-motion), box-shadow var(--fep-motion), transform var(--fep-motion);
}

.fep-data-row:last-child {
  border-bottom: 0;
}

.fep-data-row:hover {
  background: #f5f9fe;
  color: inherit;
}

.fep-data-row.is-active {
  background:
    linear-gradient(90deg, rgba(49, 130, 246, 0.13), rgba(49, 130, 246, 0.035));
  box-shadow: inset 4px 0 var(--fep-blue-500);
}

.fep-data-row__title {
  color: var(--fep-ink-950);
  display: block;
  font-weight: 800;
  line-height: 1.25;
}

.fep-data-row__meta {
  color: var(--fep-ink-500);
  display: block;
  font-size: 0.78rem;
  margin-top: 3px;
}

/* Master-detail work screens */
.fep-master-detail {
  align-items: start;
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(360px, 0.95fr) minmax(450px, 1.2fr);
}

.fep-worklist,
.fep-workcard {
  min-width: 0;
}

.fep-worklist {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(167, 186, 208, 0.5);
  border-radius: var(--fep-radius-lg);
  box-shadow: var(--fep-shadow-sm);
  overflow: hidden;
}

.fep-worklist__head {
  border-bottom: 1px solid #dfe8f2;
  padding: 20px;
}

.fep-worklist__filters {
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 0.42fr);
  margin-top: 15px;
}

.fep-workcard {
  background:
    radial-gradient(circle at 100% 0, rgba(49, 130, 246, 0.14), transparent 25rem),
    linear-gradient(145deg, rgba(238, 246, 255, 0.94), rgba(226, 239, 252, 0.84));
  border: 1px solid rgba(49, 130, 246, 0.24);
  border-radius: var(--fep-radius-lg);
  box-shadow: var(--fep-glow-blue);
  overflow: hidden;
  position: sticky;
  top: 24px;
}

.fep-workcard__head {
  background:
    radial-gradient(circle at 90% 0, rgba(49, 130, 246, 0.3), transparent 18rem),
    linear-gradient(135deg, var(--fep-navy-900), var(--fep-navy-800));
  border-bottom: 1px solid rgba(255, 201, 71, 0.25);
  color: #dbe9f8;
  padding: 23px 24px;
}

body.fep-v3 .fep-workcard__head h2,
body.fep-v3 .fep-workcard__head h3 {
  color: #fff;
  margin: 0;
}

.fep-workcard__body {
  padding: 24px;
}

.fep-workcard__identity {
  align-items: start;
  display: flex;
  gap: 14px;
  justify-content: space-between;
}

.fep-workcard__amount {
  color: var(--fep-ink-950);
  font-size: 1.55rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  white-space: nowrap;
}

.incasso-v3-worklist-heading {
  margin-bottom: 0;
}

.incasso-v3-search {
  display: grid;
  gap: 7px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.incasso-v3-filter-note {
  color: var(--fep-ink-500);
  font-size: 0.78rem;
  margin-top: 11px;
}

.incasso-v3-list-row {
  grid-template-columns: minmax(135px, 1fr) minmax(85px, 0.5fr) minmax(120px, auto) 14px;
}

.incasso-v3-list-row__identity,
.incasso-v3-list-row__payment {
  min-width: 0;
}

.incasso-v3-list-row__identity small {
  background: var(--fep-warning-100);
  border: 1px solid #efd58c;
  border-radius: 999px;
  color: var(--fep-warning-700);
  font-size: 0.59rem;
  margin-left: 4px;
  padding: 2px 5px;
  vertical-align: 0.12em;
}

.incasso-v3-list-row__payment {
  text-align: right;
}

.incasso-v3-list-row__payment strong {
  color: var(--fep-ink-950);
  display: block;
  font-variant-numeric: tabular-nums;
  font-weight: 830;
}

.incasso-v3-list-row__payment small {
  color: var(--fep-ink-500);
  display: block;
  font-size: 0.7rem;
  margin-top: 2px;
}

.incasso-v3-row-arrow {
  color: var(--fep-ink-500);
  font-size: 1.3rem;
  justify-self: end;
}

.incasso-v3-workcard-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.incasso-v3-workcard-head h2 {
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
  line-height: 1.15;
  margin-top: 5px;
}

.incasso-v3-workcard-head .fep-chip {
  background: rgba(255, 255, 255, 0.09);
  border-color: rgba(255, 255, 255, 0.16);
  color: #eaf3ff;
  flex: 0 0 auto;
}

.incasso-v3-payment-copy {
  color: var(--fep-ink-950);
  font-weight: 750;
  margin-top: 4px;
}

.incasso-v3-bank-description {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--fep-mist-200);
  border-radius: var(--fep-radius-sm);
  margin-top: 18px;
  padding: 13px 14px;
}

.incasso-v3-bank-description p {
  color: var(--fep-ink-800);
  font-size: 0.82rem;
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.incasso-v3-note,
.incasso-v3-technical {
  margin-top: 14px;
}

.incasso-v3-disclosure-body {
  color: var(--fep-ink-600);
  font-size: 0.84rem;
  padding: 15px 18px;
}

.incasso-v3-step-action {
  margin-top: 10px;
}

.incasso-v3-confirm {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 13px;
}

.incasso-v3-ack {
  align-items: flex-start;
  background: #fff9e8;
  border: 1px solid #edd17b;
  border-radius: var(--fep-radius-sm);
  color: var(--fep-ink-800);
  cursor: pointer;
  display: flex;
  font-size: 0.82rem;
  font-weight: 700;
  gap: 9px;
  padding: 11px 12px;
}

.incasso-v3-ack input {
  accent-color: var(--fep-success-500);
  flex: 0 0 auto;
  height: 17px;
  margin-top: 1px;
  width: 17px;
}

.incasso-v3-confirm .incasso-focused-form-error {
  background: var(--fep-danger-100);
  border: 1px solid #f3abb5;
  border-radius: var(--fep-radius-sm);
  color: var(--fep-danger-700);
  font-size: 0.8rem;
  padding: 10px 12px;
}

.incasso-v3-confirm .incasso-focused-form-error[hidden],
.incasso-v3-workbench .incasso-focused-feedback:empty {
  display: none;
}

.incasso-v3-workbench .incasso-focused-feedback {
  color: var(--fep-success-700);
  display: block;
  font-size: 0.8rem;
  font-weight: 750;
  margin-top: 10px;
}

.incasso-v3-workbench .incasso-focused-feedback.is-error {
  color: var(--fep-danger-700);
}

.fep-steps {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 22px;
}

.fep-step {
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(167, 186, 208, 0.55);
  border-radius: var(--fep-radius-md);
  display: grid;
  gap: 12px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 15px;
}

.fep-step.is-active {
  background:
    linear-gradient(135deg, rgba(255, 249, 229, 0.96), rgba(255, 255, 255, 0.9));
  border-color: rgba(242, 179, 22, 0.55);
  box-shadow: var(--fep-glow-gold);
}

.fep-step.is-complete {
  border-color: rgba(31, 168, 115, 0.38);
}

.fep-step__number {
  align-items: center;
  background: var(--fep-mist-100);
  border: 1px solid var(--fep-mist-200);
  border-radius: 10px;
  color: var(--fep-ink-600);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 850;
  height: 34px;
  justify-content: center;
  width: 34px;
}

.fep-step.is-active .fep-step__number {
  background: var(--fep-gold-400);
  border-color: var(--fep-gold-600);
  color: #241700;
}

.fep-step.is-complete .fep-step__number {
  background: var(--fep-success-100);
  border-color: #9be4c7;
  color: var(--fep-success-700);
}

.fep-step__title {
  color: var(--fep-ink-950);
  display: block;
  font-weight: 820;
}

.fep-step__copy {
  color: var(--fep-ink-600);
  display: block;
  font-size: 0.82rem;
  margin-top: 3px;
}

/* Pagination */
.fep-pagination {
  align-items: center;
  border-top: 1px solid #e1eaf3;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 14px 18px;
}

.fep-pagination__copy {
  color: var(--fep-ink-500);
  font-size: 0.78rem;
}

.fep-pagination__buttons {
  display: flex;
  gap: 6px;
}

.fep-pagination__button {
  align-items: center;
  background: #fff;
  border: 1px solid #cdd9e6;
  border-radius: 9px;
  color: var(--fep-ink-800);
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 750;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 5px 10px;
  text-decoration: none;
}

.fep-pagination__button:hover {
  background: var(--fep-info-100);
  border-color: var(--fep-blue-500);
}

.fep-pagination__button[aria-disabled="true"] {
  background: #f2f5f8;
  color: #9aa8b7;
  pointer-events: none;
}

/* Disclosures for completed/technical content */
body.fep-v3 details.fep-disclosure {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(167, 186, 208, 0.48);
  border-radius: var(--fep-radius-md);
  box-shadow: var(--fep-shadow-xs);
}

body.fep-v3 details.fep-disclosure > summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  font-weight: 800;
  gap: 12px;
  justify-content: space-between;
  list-style: none;
  padding: 17px 19px;
}

body.fep-v3 details.fep-disclosure > summary::-webkit-details-marker {
  display: none;
}

body.fep-v3 details.fep-disclosure > summary::after {
  content: "›";
  font-size: 1.35rem;
  transform: rotate(90deg);
  transition: transform var(--fep-motion);
}

body.fep-v3 details.fep-disclosure[open] > summary::after {
  transform: rotate(-90deg);
}

body.fep-v3 details.fep-disclosure > :not(summary) {
  border-top: 1px solid #e1eaf3;
}

/*
 * App-wide migration layer
 *
 * The operational templates intentionally keep their existing DOM, field
 * names and POST contracts. These selectors give those proven workflows the
 * same visual grammar without duplicating or replacing business forms.
 */
body.fep-v3 :is(
  .workbench-page,
  .payment-work-page,
  .bank-history-page,
  .bank-upload-detail-page,
  .log-page,
  .gc-page,
  .payment-page,
  .payment-detail-page,
  .retail-page,
  .retail-export-page,
  .gym-detail-page,
  .close-page,
  .duplicate-page,
  .undo-page
) {
  gap: 20px;
  margin: 0 auto;
  max-width: var(--fep-content-max);
  width: 100%;
}

body.fep-v3 :is(
  .workbench-header,
  .payment-work-header,
  .history-header,
  .log-header,
  .gc-header,
  .payment-header,
  .detail-header,
  .retail-header,
  .retail-export-header,
  .gym-detail-header,
  .close-header,
  .duplicate-header,
  .undo-header
) {
  align-items: flex-start;
  background:
    radial-gradient(circle at 100% 0, rgba(49, 130, 246, 0.1), transparent 24rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(240, 247, 254, 0.92));
  border: 1px solid rgba(167, 186, 208, 0.5);
  border-radius: var(--fep-radius-lg);
  box-shadow: var(--fep-shadow-sm);
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin: 0;
  padding: clamp(20px, 2.6vw, 32px);
}

body.fep-v3 :is(
  .workbench-header,
  .payment-work-header,
  .history-header,
  .log-header,
  .gc-header,
  .payment-header,
  .detail-header,
  .retail-header,
  .retail-export-header,
  .gym-detail-header,
  .close-header,
  .duplicate-header,
  .undo-header
) h1,
body.fep-v3 :is(
  .workbench-header,
  .payment-work-header,
  .history-header,
  .log-header,
  .gc-header,
  .payment-header,
  .detail-header,
  .retail-header,
  .retail-export-header,
  .gym-detail-header,
  .close-header,
  .duplicate-header,
  .undo-header
) h2 {
  font-size: clamp(1.65rem, 2.6vw, 2.35rem);
  line-height: 1.08;
  margin: 0;
}

body.fep-v3 :is(
  .workbench-eyebrow,
  .payment-work-eyebrow,
  .history-eyebrow,
  .log-eyebrow,
  .gc-eyebrow,
  .payment-eyebrow,
  .retail-eyebrow,
  .close-eyebrow
) {
  color: var(--fep-blue-600);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

body.fep-v3 :is(
  .workbench-metrics,
  .payment-work-metrics,
  .history-metrics,
  .payment-metrics,
  .detail-metrics,
  .retail-metrics,
  .export-metrics,
  .close-summary
) {
  gap: 14px;
}

body.fep-v3 :is(
  .metric-tile,
  .payment-work-metric,
  .metric-card,
  .payment-metric,
  .detail-metric,
  .retail-metric,
  .export-metric,
  .close-card,
  .detail-card
) {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 255, 0.9));
  border: 1px solid rgba(167, 186, 208, 0.52);
  border-radius: var(--fep-radius-md);
  box-shadow: var(--fep-shadow-sm);
  min-height: 112px;
  padding: 17px;
}

body.fep-v3 :is(
  .metric-value,
  .payment-work-metric-value,
  .payment-metric-value,
  .detail-metric-value,
  .retail-metric-value,
  .export-value,
  .detail-value
) {
  color: var(--fep-ink-950);
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  letter-spacing: -0.035em;
}

body.fep-v3 :is(
  .customer-list-card,
  .payment-work-card,
  .history-section,
  .log-section,
  .payment-section,
  .retail-section,
  .month-shift-status,
  .duplicate-group,
  .undo-card,
  .undo-list,
  .undo-detail
) {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(167, 186, 208, 0.48);
  border-radius: var(--fep-radius-md);
  box-shadow: var(--fep-shadow-sm);
}

body.fep-v3 :is(
  .customer-table-wrap,
  .payment-work-table-wrap
) {
  border-color: rgba(167, 186, 208, 0.5);
  border-radius: var(--fep-radius-md);
  max-height: none;
  min-height: 0;
  overflow-x: auto;
  overflow-y: visible;
}

body.fep-v3 :is(
  .customer-table-wrap,
  .payment-work-table-wrap,
  .retail-table-shell,
  .table-responsive
) thead th {
  background: #edf4fb;
  color: var(--fep-ink-600);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

body.fep-v3 :is(
  .customer-table-wrap,
  .payment-work-table-wrap
) thead th {
  position: static;
}

body.fep-v3 .table {
  --bs-table-bg: transparent;
  --bs-table-border-color: #dbe6f1;
  color: var(--fep-ink-800);
  margin-bottom: 0;
}

body.fep-v3 .table > :not(caption) > * > * {
  padding: 0.72rem 0.78rem;
}

body.fep-v3 .table tbody tr {
  transition: background var(--fep-motion);
}

body.fep-v3 .table tbody tr:hover {
  background: rgba(230, 241, 255, 0.62);
}

body.fep-v3 .container.fep-page {
  margin-top: 0 !important;
  padding-left: 0;
  padding-right: 0;
}

body.fep-v3 .fep-page.dreamz-box {
  padding: clamp(18px, 2.4vw, 28px);
}

/* Legacy surfaces inherit the v3 language while templates are migrated. */
body.fep-v3 .box,
body.fep-v3 .panel,
body.fep-v3 .summary-card,
body.fep-v3 .stat-card,
body.fep-v3 .metric-card {
  border-radius: var(--fep-radius-md);
  box-shadow: var(--fep-shadow-sm);
}

body.fep-v3 .nav-tabs {
  border-bottom-color: #d7e2ed;
  gap: 4px;
}

body.fep-v3 .nav-tabs .nav-link {
  border: 1px solid transparent;
  border-radius: 10px 10px 0 0;
  color: var(--fep-ink-600);
  font-weight: 750;
}

body.fep-v3 .nav-tabs .nav-link.active {
  background: #fff;
  border-color: #d7e2ed #d7e2ed #fff;
  color: var(--fep-blue-600);
}

@media (max-width: 760px) {
  body.fep-v3 :is(
    .workbench-header,
    .payment-work-header,
    .history-header,
    .log-header,
    .gc-header,
    .payment-header,
    .detail-header,
    .retail-header,
    .retail-export-header,
    .gym-detail-header,
    .close-header,
    .duplicate-header,
    .undo-header
  ) {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 1180px) {
  body.fep-v3 {
    --fep-sidebar-width: 220px;
  }

  .fep-master-detail {
    grid-template-columns: minmax(320px, 0.9fr) minmax(390px, 1.1fr);
  }

  .incasso-v3-list-row {
    grid-template-columns: minmax(120px, 1fr) minmax(78px, 0.45fr) 14px;
  }

  .incasso-v3-list-row .fep-chip {
    grid-column: 1 / 3;
    justify-self: start;
  }

  .incasso-v3-list-row .incasso-v3-row-arrow {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}

@media (max-width: 920px) {
  body.fep-v3 {
    display: block;
  }

  body.fep-v3 .sidebar {
    align-items: stretch;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    max-height: none;
    min-height: auto;
    padding: 10px;
    position: relative;
    width: 100%;
  }

  body.fep-v3 .sidebar-logo-panel,
  body.fep-v3 .sidebar-user {
    flex: 1 1 280px;
    margin: 0;
  }

  body.fep-v3 .sidebar-brand,
  body.fep-v3 .sidebar-divider,
  body.fep-v3 .sidebar-section-title {
    display: none;
  }

  body.fep-v3 .sidebar > .sidebar-link,
  body.fep-v3 .sidebar > #sidebarUndoSlot,
  body.fep-v3 .sidebar > form {
    flex: 1 1 190px;
    margin: 0;
    min-width: 0;
  }

  body.fep-v3 .sidebar > #sidebarUndoSlot .sidebar-link,
  body.fep-v3 .sidebar > form .sidebar-link {
    height: 100%;
    margin: 0;
  }

  body.fep-v3 .content-area {
    padding: 18px 14px 46px;
    width: 100%;
  }

  .fep-master-detail {
    display: flex;
    flex-direction: column;
  }

  .fep-worklist,
  .fep-workcard {
    width: 100%;
  }

  .fep-workcard {
    position: static;
  }

  .incasso-v3-list-row {
    grid-template-columns: minmax(150px, 1fr) minmax(90px, 0.45fr) minmax(130px, auto) 14px;
  }

  .incasso-v3-list-row .fep-chip,
  .incasso-v3-list-row .incasso-v3-row-arrow {
    grid-column: auto;
    grid-row: auto;
  }

  .incasso-v3-hero {
    flex-direction: column;
  }

  .incasso-v3-hero .incasso-header-tools {
    align-items: stretch;
    flex: 0 0 auto;
    width: 100%;
  }
}

@media (max-width: 660px) {
  body.fep-v3 {
    font-size: 14px;
  }

  body.fep-v3 .sidebar-logo-frame,
  body.fep-v3 .sidebar-product-subtitle,
  body.fep-v3 .sidebar-role-line,
  body.fep-v3 .sidebar .nav-hint {
    display: none;
  }

  body.fep-v3 .sidebar-logo-panel,
  body.fep-v3 .sidebar-user {
    flex-basis: calc(50% - 4px);
    min-width: 145px;
  }

  body.fep-v3 .sidebar > .sidebar-link,
  body.fep-v3 .sidebar > #sidebarUndoSlot,
  body.fep-v3 .sidebar > form {
    flex-basis: calc(50% - 4px);
  }

  .fep-page {
    gap: 16px;
  }

  .fep-page-header,
  .fep-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .fep-page-actions {
    justify-content: flex-start;
  }

  .fep-page-actions > * {
    flex: 1 1 auto;
  }

  .fep-hero {
    border-radius: var(--fep-radius-lg);
    min-height: 225px;
    padding: 26px 22px;
  }

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

  .fep-kpi {
    min-height: 118px;
    padding: 15px;
  }

  .fep-worklist__filters {
    grid-template-columns: 1fr;
  }

  .fep-workcard__body,
  .fep-workcard__head {
    padding: 19px;
  }

  .fep-pagination {
    align-items: flex-start;
    flex-direction: column;
  }

  .incasso-v3-list-row {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) auto 14px;
  }

  .incasso-v3-list-row__payment {
    text-align: right;
  }

  .incasso-v3-list-row .fep-chip {
    grid-column: 1 / 3;
    justify-self: start;
  }

  .incasso-v3-list-row .incasso-v3-row-arrow {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .incasso-v3-workcard-head {
    flex-direction: column;
  }
}

@media (max-width: 420px) {
  .fep-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Incasso v3 correction: one document scroll, exact operations hero and master/detail. */
html {
  overflow-x: hidden;
}

body.fep-v3 {
  align-items: stretch;
  overflow-x: hidden;
}

body.fep-v3 .sidebar {
  align-self: stretch;
  max-height: none !important;
  overflow: visible !important;
  position: relative !important;
  top: auto !important;
}

body.fep-v3 .sidebar-user {
  margin-bottom: 12px;
  padding: 10px;
}

body.fep-v3 .sidebar-brand {
  font-size: 0.86rem;
  margin-bottom: 8px;
}

body.fep-v3 .sidebar-link,
body.fep-v3 .sidebar form button.sidebar-link {
  min-height: 42px;
  padding: 6px 8px;
}

body.fep-v3 .sidebar-link .nav-icon {
  flex-basis: 29px;
  height: 29px;
  width: 29px;
}

body.fep-v3 .sidebar-link .nav-copy {
  min-width: 0;
  overflow: visible;
}

body.fep-v3 .nav-copy {
  min-width: 0;
  overflow: visible;
}

body.fep-v3 .sidebar-link .nav-label {
  line-height: 1.18;
  overflow-wrap: anywhere;
  white-space: normal;
}

body.fep-v3 .sidebar-link .nav-hint {
  display: none;
}

body.fep-v3 .sidebar-divider {
  margin-block: 10px;
}

body.fep-v3 .sidebar-section-title {
  margin: 10px 8px 6px;
}

body.fep-v3 .incasso-page {
  gap: 18px;
  overflow: visible;
}

body.fep-v3 .incasso-v3-page-heading {
  align-items: flex-start;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin: 0;
}

.incasso-v3-page-heading__copy {
  min-width: 0;
}

.incasso-v3-page-heading__copy .incasso-eyebrow {
  color: var(--fep-blue-600);
  display: block;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

body.fep-v3 .incasso-v3-page-heading h1 {
  color: var(--fep-ink-950);
  font-size: clamp(2rem, 3.25vw, 3rem);
  line-height: 1;
  margin: 7px 0 0;
}

.incasso-v3-page-heading__copy p {
  color: var(--fep-ink-500);
  margin: 9px 0 0;
}

body.fep-v3 .incasso-v3-page-heading .incasso-header-tools {
  align-items: center;
  display: flex;
  flex: 0 1 auto;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 9px;
  justify-content: flex-end;
  max-width: 720px;
}

.incasso-v3-page-heading .incasso-period-form {
  margin: 0;
  min-width: 180px;
}

.incasso-v3-page-heading .incasso-period-form select {
  min-height: 42px;
}

.incasso-v3-page-heading .incasso-view-toggle {
  background: rgba(229, 238, 248, 0.76);
  border: 1px solid var(--fep-mist-200);
  border-radius: 12px;
  display: flex;
  gap: 3px;
  padding: 3px;
}

.incasso-v3-page-heading .incasso-view-link {
  border-radius: 9px;
  color: var(--fep-ink-600);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 7px 10px;
  text-decoration: none;
}

.incasso-v3-page-heading .incasso-view-link.is-active {
  background: #fff;
  box-shadow: 0 5px 14px rgba(16, 38, 67, 0.09);
  color: var(--fep-blue-600);
}

.incasso-v3-period-label {
  color: var(--fep-ink-800);
  padding: 8px 0;
}

.incasso-v3-operations-hero {
  --fep-incasso-ribbon-image: url("/static/fep-v3-hero-ribbon-integrated-20260731.webp?v=20260731-correction");
  background:
    linear-gradient(90deg, rgba(2, 10, 25, 0.98) 0%, rgba(3, 17, 38, 0.94) 52%, rgba(3, 15, 34, 0.57) 74%, rgba(1, 7, 18, 0.16) 100%),
    var(--fep-incasso-ribbon-image),
    linear-gradient(135deg, var(--fep-navy-950), var(--fep-navy-800));
  background-position: center, right center, center;
  background-repeat: no-repeat;
  background-size: cover, auto 100%, cover;
  border: 1px solid rgba(255, 201, 71, 0.24);
  border-radius: var(--fep-radius-xl);
  box-shadow: 0 22px 52px rgba(3, 14, 32, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #edf6ff;
  min-height: 252px;
  overflow: hidden;
  padding: 28px 32px 30px;
  position: relative;
}

.incasso-v3-operations-hero::after {
  background: linear-gradient(90deg, transparent, rgba(255, 201, 71, 0.8), transparent);
  bottom: 0;
  content: "";
  height: 1px;
  left: 6%;
  opacity: 0.72;
  position: absolute;
  right: 6%;
}

body.fep-v3 .incasso-v3-operations-hero h2 {
  color: #fff;
  font-size: 1.22rem;
  margin: 0 0 16px;
  position: relative;
  z-index: 1;
}

.incasso-v3-hero-dashboard {
  align-items: center;
  display: grid;
  gap: clamp(22px, 3vw, 46px);
  grid-template-columns: minmax(250px, 0.78fr) minmax(450px, 1.35fr);
  max-width: min(980px, 78%);
  position: relative;
  z-index: 1;
}

.incasso-v3-progress-summary {
  align-items: center;
  display: flex;
  gap: 22px;
  min-width: 0;
}

.incasso-v3-progress-ring {
  align-items: center;
  background:
    conic-gradient(
      from 0deg,
      var(--fep-success-500) 0 calc(var(--incasso-progress) * 1%),
      rgba(255, 255, 255, 0.15) calc(var(--incasso-progress) * 1%) 100%
    );
  border-radius: 50%;
  box-shadow: 0 0 28px rgba(31, 168, 115, 0.24);
  display: flex;
  flex: 0 0 128px;
  height: 128px;
  justify-content: center;
  position: relative;
  width: 128px;
}

.incasso-v3-progress-ring::before {
  background: conic-gradient(from 310deg, var(--fep-gold-400) 0 8%, var(--fep-blue-500) 8% 16%, transparent 16% 100%);
  border-radius: inherit;
  content: "";
  inset: 0;
  position: absolute;
}

.incasso-v3-progress-ring__inner {
  background: rgba(3, 15, 34, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  height: 86px;
  position: relative;
  width: 86px;
  z-index: 1;
}

.incasso-v3-progress-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.incasso-v3-progress-copy strong {
  color: #fff;
  font-size: clamp(2.55rem, 4vw, 4rem);
  font-variant-numeric: tabular-nums;
  font-weight: 860;
  letter-spacing: -0.055em;
  line-height: 0.95;
}

.incasso-v3-progress-copy span {
  color: #c6d8eb;
  font-size: 0.88rem;
  margin-top: 10px;
  white-space: nowrap;
}

.incasso-v3-hero-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(86px, 1fr));
}

.incasso-v3-hero-kpi {
  align-items: center;
  border-left: 1px solid rgba(211, 225, 241, 0.3);
  display: flex;
  flex-direction: column;
  min-height: 126px;
  padding: 3px 14px;
  text-align: center;
}

.incasso-v3-hero-kpi__icon {
  align-items: center;
  background: rgba(49, 130, 246, 0.13);
  border: 1px solid rgba(88, 162, 255, 0.34);
  border-radius: 50%;
  color: #8fc5ff;
  display: inline-flex;
  font-size: 0.93rem;
  height: 38px;
  justify-content: center;
  margin-bottom: 8px;
  width: 38px;
}

.incasso-v3-hero-kpi.is-manual .incasso-v3-hero-kpi__icon,
.incasso-v3-hero-kpi.is-waiting .incasso-v3-hero-kpi__icon {
  background: rgba(230, 79, 92, 0.13);
  border-color: rgba(255, 105, 117, 0.38);
  color: #ff818c;
}

.incasso-v3-hero-kpi.is-complete .incasso-v3-hero-kpi__icon {
  color: #85cbff;
}

.incasso-v3-hero-kpi strong {
  color: #fff;
  font-size: 1.65rem;
  font-variant-numeric: tabular-nums;
  font-weight: 850;
  line-height: 1;
}

.incasso-v3-hero-kpi > span:last-child {
  color: #c3d3e5;
  font-size: 0.73rem;
  line-height: 1.28;
  margin-top: 7px;
}

.incasso-v3-workbench-container {
  container-name: incasso-workbench;
  container-type: inline-size;
  min-width: 0;
  width: 100%;
}

body.fep-v3 .incasso-v3-workbench {
  align-items: start;
  gap: 18px;
  grid-template-columns: minmax(0, 1.18fr) minmax(430px, 0.92fr);
  min-width: 0;
  width: 100%;
}

body.fep-v3 .incasso-v3-workbench .fep-worklist {
  border-radius: 20px;
  grid-column: 1;
  grid-row: 1;
}

body.fep-v3 .incasso-v3-workbench .fep-workcard {
  grid-column: 2;
  grid-row: 1;
}

.incasso-v3-worklist-tools {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  margin-top: 16px;
}

.incasso-v3-status-tabs {
  align-items: center;
  background: #edf2f8;
  border: 1px solid #d8e2ee;
  border-radius: 13px;
  display: flex;
  flex: 1 1 330px;
  min-width: 0;
  padding: 3px;
}

.incasso-v3-status-tab {
  align-items: center;
  border-radius: 10px;
  color: var(--fep-ink-700);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 800;
  gap: 7px;
  min-height: 36px;
  padding: 7px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.incasso-v3-status-tab:hover {
  color: var(--fep-blue-600);
}

.incasso-v3-status-tab.is-active {
  background: linear-gradient(135deg, var(--fep-navy-950), var(--fep-navy-800));
  box-shadow: 0 8px 18px rgba(5, 22, 48, 0.18);
  color: #fff;
}

.incasso-v3-status-tab span {
  align-items: center;
  background: rgba(15, 38, 67, 0.09);
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.66rem;
  justify-content: center;
  min-width: 24px;
  padding: 2px 6px;
}

.incasso-v3-status-tab.is-active span {
  background: rgba(255, 255, 255, 0.14);
}

.incasso-v3-search-form {
  align-items: center;
  display: grid;
  flex: 1 1 230px;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  min-width: 190px;
  position: relative;
}

.incasso-v3-search-icon {
  color: var(--fep-ink-500);
  font-size: 1.2rem;
  grid-column: 1;
  grid-row: 1;
  margin-left: 11px;
  pointer-events: none;
  z-index: 1;
}

.incasso-v3-search-form input {
  grid-column: 1 / 3;
  grid-row: 1;
  min-height: 40px;
  padding-left: 38px;
}

.incasso-v3-search-form button {
  grid-column: 3;
  grid-row: 1;
  margin-left: 7px;
}

.incasso-v3-more-filter {
  align-items: center;
  display: flex;
  gap: 9px;
  justify-content: flex-end;
  margin-top: 10px;
}

.incasso-v3-more-filter label {
  color: var(--fep-ink-500);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.incasso-v3-more-filter select {
  max-width: 260px;
}

body.fep-v3 .incasso-v3-list-row {
  gap: 12px;
  grid-template-columns: 42px minmax(150px, 1fr) minmax(90px, 0.48fr) minmax(116px, auto) 14px;
  min-height: 82px;
  padding: 12px 14px;
  position: relative;
}

body.fep-v3 .incasso-v3-list-row.is-active {
  background: linear-gradient(90deg, rgba(255, 248, 227, 0.96), rgba(255, 255, 255, 0.93));
  box-shadow: inset 3px 0 var(--fep-gold-500), inset 0 0 0 1px rgba(242, 179, 22, 0.78), 0 8px 20px rgba(197, 139, 5, 0.09);
}

.incasso-v3-list-row.is-loading {
  opacity: 0.66;
}

.incasso-v3-list-row.is-loading::after {
  animation: fep-incasso-row-pulse 850ms ease-in-out infinite alternate;
  background: linear-gradient(90deg, transparent, rgba(49, 130, 246, 0.22), transparent);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.incasso-v3-avatar {
  align-items: center;
  background: linear-gradient(145deg, #0c2747, #020a16);
  border: 1px solid rgba(87, 154, 226, 0.26);
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  flex: 0 0 42px;
  font-size: 1rem;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.incasso-v3-avatar--large {
  flex-basis: 48px;
  font-size: 1.12rem;
  height: 48px;
  width: 48px;
}

body.fep-v3 .incasso-v3-workbench .fep-workcard {
  background:
    radial-gradient(circle at 100% 0, rgba(49, 130, 246, 0.16), transparent 26rem),
    linear-gradient(145deg, rgba(238, 246, 255, 0.97), rgba(225, 238, 252, 0.91));
  border-color: rgba(49, 130, 246, 0.42);
  border-radius: 20px;
  box-shadow: 0 0 0 3px rgba(49, 130, 246, 0.07), 0 20px 44px rgba(20, 64, 110, 0.18), 0 0 28px rgba(242, 179, 22, 0.07);
  top: 18px;
}

body.fep-v3 .incasso-v3-workbench .fep-workcard[aria-busy="true"] {
  cursor: progress;
}

.incasso-v3-workcard-head {
  align-items: center;
  flex-direction: row;
  justify-content: flex-start;
}

.incasso-v3-workcard-icon {
  align-items: center;
  background: rgba(242, 179, 22, 0.12);
  border: 1px solid rgba(255, 201, 71, 0.5);
  border-radius: 10px;
  color: var(--fep-gold-400);
  display: inline-flex;
  font-size: 1.05rem;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.incasso-v3-workcard-head h2 {
  font-size: 1.18rem;
  margin: 0;
}

.incasso-v3-selected-identity {
  align-items: center;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
}

.incasso-v3-selected-client {
  min-width: 0;
}

.incasso-v3-selected-client strong {
  color: var(--fep-ink-950);
  display: block;
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}

.incasso-v3-selected-client span,
.incasso-v3-selected-payment span {
  color: var(--fep-ink-500);
  display: block;
  font-size: 0.74rem;
  margin-top: 3px;
}

.incasso-v3-selected-payment {
  text-align: right;
}

.incasso-v3-selected-statusline {
  align-items: center;
  border-bottom: 1px solid rgba(167, 186, 208, 0.38);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 16px;
  padding-bottom: 15px;
}

body.fep-v3 .incasso-v3-workbench .fep-steps {
  gap: 0;
  margin-top: 20px;
}

body.fep-v3 .incasso-v3-workbench .fep-step {
  background: rgba(255, 255, 255, 0.56);
  border-color: rgba(167, 186, 208, 0.42);
  border-radius: 12px;
  margin-bottom: 12px;
  padding: 14px;
  position: relative;
}

body.fep-v3 .incasso-v3-workbench .fep-step:not(:last-child)::after {
  background: #aebed0;
  bottom: -13px;
  content: "";
  height: 14px;
  left: 30px;
  position: absolute;
  width: 1px;
}

body.fep-v3 .incasso-v3-workbench .fep-step.is-active {
  background: linear-gradient(135deg, rgba(255, 250, 235, 0.94), rgba(255, 255, 255, 0.72));
  border-color: rgba(242, 179, 22, 0.62);
}

body.fep-v3 .incasso-v3-workbench .fep-step__number {
  border-radius: 50%;
  height: 34px;
  width: 34px;
}

@keyframes fep-incasso-row-pulse {
  from { opacity: 0.2; }
  to { opacity: 0.75; }
}

@container incasso-workbench (max-width: 1040px) {
  body.fep-v3 .fep-master-detail,
  body.fep-v3 .incasso-v3-workbench {
    grid-template-columns: 1fr;
  }

  body.fep-v3 .incasso-v3-workbench .fep-workcard {
    grid-column: 1;
    grid-row: 1;
    position: static;
  }

  body.fep-v3 .incasso-v3-workbench .fep-worklist {
    grid-column: 1;
    grid-row: 2;
  }
}

@media (max-width: 1180px) {
  .incasso-v3-hero-dashboard {
    grid-template-columns: 1fr;
    max-width: min(680px, 100%);
    width: 100%;
  }

  .incasso-v3-operations-hero {
    background-image:
      linear-gradient(90deg, rgba(2, 10, 25, 0.995) 0%, rgba(3, 17, 38, 0.97) 58%, rgba(3, 15, 34, 0.72) 78%, rgba(3, 15, 34, 0.4) 100%),
      var(--fep-incasso-ribbon-image),
      linear-gradient(135deg, var(--fep-navy-950), var(--fep-navy-800));
    background-position: center, right -54px center, center;
    background-size: cover, auto 88%, cover;
  }
}

@media (max-width: 1280px) {
  body.fep-v3 .fep-master-detail,
  body.fep-v3 .incasso-v3-workbench {
    grid-template-columns: 1fr;
  }

  body.fep-v3 .incasso-v3-workbench .fep-workcard {
    grid-column: 1;
    grid-row: 1;
    position: static;
  }

  body.fep-v3 .incasso-v3-workbench .fep-worklist {
    grid-column: 1;
    grid-row: 2;
  }

  .incasso-v3-hero-dashboard {
    grid-template-columns: minmax(0, 1fr);
    max-width: min(680px, 100%);
    width: 100%;
  }
}

/* Local read-model loading state: the shell stays sharp and usable while an
   expensive derived overview is refreshed outside the ordinary GET. */
.projection-pending {
  min-height: min(72vh, 720px);
  display: grid;
  place-items: center;
  padding: clamp(24px, 6vw, 72px);
}

.projection-pending-card {
  width: min(680px, 100%);
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid rgba(104, 154, 224, 0.25);
  border-radius: var(--fep-radius-xl, 28px);
  background:
    radial-gradient(circle at 90% 8%, rgba(244, 185, 50, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(255,255,255,0.98), rgba(238,246,255,0.94));
  box-shadow: 0 24px 70px rgba(10, 35, 72, 0.14);
}

.projection-pending-kicker {
  display: block;
  margin-bottom: 8px;
  color: #916900;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.projection-pending-card h1 {
  margin: 0 0 12px;
  color: #081d3d;
}

.projection-pending-card p {
  color: #526984;
}

.projection-pending-progress {
  height: 7px;
  margin: 28px 0 22px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(33, 88, 158, 0.1);
}

.projection-pending-progress span {
  display: block;
  width: 42%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2877db, #29c877, #f0bd43);
  animation: fep-projection-progress 1.5s ease-in-out infinite alternate;
}

.projection-pending-skeleton {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.projection-pending-skeleton i {
  display: block;
  height: 15px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e4edf7, #f8fbff, #e4edf7);
}

.projection-pending-skeleton i:nth-child(2) { width: 84%; }
.projection-pending-skeleton i:nth-child(3) { width: 62%; }
.projection-pending-note { font-size: 0.86rem; }

@keyframes fep-projection-progress {
  from { transform: translateX(-12%); }
  to { transform: translateX(150%); }
}

@media (prefers-reduced-motion: reduce) {
  .projection-pending-progress span { animation: none; width: 100%; }
}

.fep-projection-freshness {
  display: flex;
  align-items: center;
  gap: 9px;
  width: fit-content;
  max-width: 100%;
  margin: 10px 0 16px;
  padding: 7px 11px;
  border: 1px solid rgba(40, 119, 219, 0.2);
  border-radius: 999px;
  background: rgba(238, 246, 255, 0.86);
  color: #38516f;
  font-size: 0.76rem;
  font-weight: 650;
}

.fep-projection-freshness__dot {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #29b86d;
  box-shadow: 0 0 0 4px rgba(41, 184, 109, 0.12);
}

.fep-projection-freshness.is-refreshing {
  border-color: rgba(40, 119, 219, 0.28);
  color: #235a99;
}

.fep-projection-freshness.is-refreshing .fep-projection-freshness__dot {
  background: #2877db;
  box-shadow: 0 0 0 4px rgba(40, 119, 219, 0.12);
}

.fep-projection-freshness.is-stale {
  border-color: rgba(214, 137, 15, 0.38);
  background: rgba(255, 247, 222, 0.95);
  color: #815509;
}

.fep-projection-freshness.is-stale .fep-projection-freshness__dot {
  background: #dc8c13;
  box-shadow: 0 0 0 4px rgba(220, 140, 19, 0.13);
}

.fep-projection-action-block {
  align-items: flex-start;
  background: rgba(255, 247, 222, 0.96);
  border: 1px solid rgba(214, 137, 15, 0.42);
  border-radius: var(--fep-radius-sm, 10px);
  color: #6d4808;
  display: grid;
  gap: 3px;
  line-height: 1.4;
  margin-top: 10px;
  padding: 10px 12px;
}

.fep-projection-action-block strong {
  color: #563903;
  font-size: 0.82rem;
}

.fep-projection-action-block span {
  font-size: 0.78rem;
}

.fep-step.is-blocked {
  opacity: 0.82;
}

.fep-step.is-blocked .fep-step__number {
  background: rgba(214, 137, 15, 0.13);
  border-color: rgba(214, 137, 15, 0.45);
  color: #815509;
}

.payment-work-operator.is-readonly {
  color: #6d4808;
}

.payment-work-operator.is-readonly strong {
  display: block;
}

@media (max-width: 980px) {
  body.fep-v3 .workbench-header {
    align-items: stretch;
    flex-direction: column;
  }

  body.fep-v3 .workbench-header .workbench-metrics {
    min-width: 0;
    width: 100%;
  }
}

body.fep-v3 .payment-work-card.attention {
  background: linear-gradient(145deg, var(--fep-warning-100), var(--fep-mist-50));
  border-color: var(--fep-warning-500);
  box-shadow: inset 3px 0 0 var(--fep-warning-500), var(--fep-shadow-sm);
}

body.fep-v3 .payment-work-card.done {
  background: linear-gradient(145deg, var(--fep-success-100), var(--fep-mist-50));
  border-color: var(--fep-success-500);
  box-shadow: inset 3px 0 0 var(--fep-success-500), var(--fep-shadow-sm);
}

@media (max-width: 1060px) {
  body.fep-v3 .incasso-v3-page-heading {
    align-items: stretch;
    flex-direction: column;
  }

  body.fep-v3 .incasso-v3-page-heading .incasso-header-tools {
    justify-content: flex-start;
    max-width: none;
  }

  .incasso-v3-hero-dashboard {
    grid-template-columns: 1fr;
    max-width: min(620px, 100%);
    width: 100%;
  }

  .incasso-v3-operations-hero {
    background-image:
      linear-gradient(90deg, rgba(2, 10, 25, 0.99), rgba(3, 17, 38, 0.88) 72%, rgba(3, 15, 34, 0.62)),
      var(--fep-incasso-ribbon-image),
      linear-gradient(135deg, var(--fep-navy-950), var(--fep-navy-800));
    background-position: center, right -72px center, center;
  }
}

@media (max-width: 760px) {
  .incasso-v3-operations-hero {
    background-image:
      linear-gradient(90deg, rgba(2, 10, 25, 0.995) 0%, rgba(3, 17, 38, 0.96) 76%, rgba(3, 15, 34, 0.72) 100%),
      var(--fep-incasso-ribbon-image),
      linear-gradient(135deg, var(--fep-navy-950), var(--fep-navy-800));
    background-position: center, right bottom, center;
    background-size: cover, auto 68%, cover;
    padding: 23px 20px;
  }

  .incasso-v3-hero-dashboard {
    align-items: start;
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .incasso-v3-progress-summary {
    justify-content: flex-start;
  }

  .incasso-v3-hero-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .incasso-v3-hero-kpi:nth-child(3) {
    border-top: 1px solid rgba(211, 225, 241, 0.3);
  }

  .incasso-v3-hero-kpi:nth-child(4) {
    border-top: 1px solid rgba(211, 225, 241, 0.3);
  }

  .incasso-v3-worklist-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .incasso-v3-status-tabs {
    flex-wrap: wrap;
    overflow: visible;
  }

  .incasso-v3-status-tab {
    flex: 1 1 132px;
    justify-content: center;
  }

  .incasso-v3-search-form {
    flex-basis: auto;
    width: 100%;
  }

  body.fep-v3 .incasso-v3-list-row {
    grid-template-columns: 42px minmax(0, 1fr) auto 14px;
  }

  body.fep-v3 .incasso-v3-list-row .incasso-v3-list-row__payment {
    grid-column: 3;
  }

  body.fep-v3 .incasso-v3-list-row .fep-chip {
    grid-column: 2 / 4;
    justify-self: start;
  }

  body.fep-v3 .incasso-v3-list-row .incasso-v3-row-arrow {
    grid-column: 4;
    grid-row: 1 / 3;
  }
}

@media (max-width: 520px) {
  body.fep-v3 .incasso-v3-page-heading .incasso-header-tools > * {
    flex: 1 1 100%;
    width: 100%;
  }

  .incasso-v3-progress-ring {
    flex-basis: 104px;
    height: 104px;
    width: 104px;
  }

  .incasso-v3-progress-ring__inner {
    height: 70px;
    width: 70px;
  }

  .incasso-v3-progress-summary {
    align-items: center;
    display: grid;
    gap: 14px;
    grid-template-columns: 104px minmax(0, 1fr);
    width: 100%;
  }

  .incasso-v3-progress-copy strong {
    font-size: clamp(2rem, 11vw, 2.5rem);
    overflow-wrap: anywhere;
  }

  .incasso-v3-progress-copy span {
    line-height: 1.35;
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .incasso-v3-selected-identity {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .incasso-v3-selected-payment {
    grid-column: 2;
    margin-top: 8px;
    text-align: left;
  }

  .incasso-v3-selected-statusline {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 360px) {
  .incasso-v3-progress-summary {
    grid-template-columns: minmax(0, 1fr);
  }

  .incasso-v3-progress-ring {
    justify-self: start;
  }
}

/* Premium application shell -------------------------------------------------
 * A compact viewport-bound navigation keeps long operational pages on one
 * predictable document scroll. Only role-authorised links exist in the DOM.
 */
body.fep-v3 {
  --fep-sidebar-width: 232px;
  --fep-sidebar-contour-depth: 20px;
}

.fep-icon-sprite {
  height: 0;
  overflow: hidden;
  position: absolute;
  width: 0;
}

.fep-nav-svg {
  display: block;
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 18px;
}

body.fep-v3 .sidebar.fep-sidebar {
  align-self: flex-start;
  background:
    radial-gradient(circle at 18% 4%, rgba(49, 130, 246, 0.18), transparent 14rem),
    radial-gradient(circle at 92% 48%, rgba(242, 179, 22, 0.075), transparent 17rem),
    linear-gradient(180deg, rgba(6, 18, 38, 0.99), rgba(3, 8, 20, 0.995));
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.075);
  box-shadow: 18px 0 55px rgba(3, 12, 29, 0.18);
  display: flex;
  flex: 0 0 var(--fep-sidebar-width);
  flex-direction: column;
  flex-wrap: nowrap;
  gap: 10px;
  height: 100dvh;
  max-height: 100dvh !important;
  min-height: 100dvh;
  overflow: clip !important;
  padding: 14px 11px 12px;
  position: sticky !important;
  top: 0 !important;
  width: var(--fep-sidebar-width);
  z-index: 1000;
}

/* A shallow continuation of the shell surface. It is deliberately separate
 * from the clipped navigation so links, focus rings and scroll behaviour stay
 * untouched while the straight edge gains one restrained organic contour. */
.fep-sidebar-contour {
  background:
    radial-gradient(ellipse at 0 48%, rgba(242, 179, 22, 0.055), transparent 68%),
    linear-gradient(180deg, rgba(6, 18, 38, 0.99), rgba(3, 8, 20, 0.995));
  border-radius: 0 100% 100% 0 / 0 50% 50% 0;
  bottom: 0;
  box-shadow:
    1px 0 0 rgba(112, 161, 218, 0.1),
    7px 0 24px rgba(49, 130, 246, 0.045),
    4px 0 16px rgba(242, 179, 22, 0.025);
  left: calc(var(--fep-sidebar-width) - 1px);
  pointer-events: none;
  position: fixed;
  top: 0;
  width: var(--fep-sidebar-contour-depth);
  z-index: 999;
}

.fep-sidebar__header {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
  min-width: 0;
}

body.fep-v3 .sidebar-logo-panel {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: #fff;
  display: flex;
  flex: 1 1 auto;
  gap: 9px;
  margin: 0;
  min-width: 0;
  padding: 2px 3px 5px;
  text-decoration: none;
}

body.fep-v3 .sidebar-logo-panel:hover {
  color: #fff;
}

body.fep-v3 .sidebar-logo {
  border: 0;
  border-radius: 7px;
  display: block;
  flex: 0 0 86px;
  height: 34px;
  max-height: none;
  object-fit: contain;
  width: 86px;
}

body.fep-v3 .sidebar-product {
  display: grid;
  gap: 0;
  min-width: 0;
}

body.fep-v3 .sidebar-product-title {
  color: #f7fbff;
  font-size: 0.7rem;
  font-weight: 820;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-transform: uppercase;
}

body.fep-v3 .sidebar-product-subtitle {
  color: #7f96b4;
  font-size: 0.62rem;
  line-height: 1.2;
  white-space: nowrap;
}

body.fep-v3 .sidebar-user {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  display: grid;
  flex: 0 0 auto;
  gap: 8px;
  grid-template-columns: 32px minmax(0, 1fr);
  margin: 0;
  padding: 7px;
}

body.fep-v3 .sidebar-user-avatar {
  align-items: center;
  background: linear-gradient(145deg, #ffd158, #e7a700);
  border-radius: 9px;
  box-shadow: 0 7px 20px rgba(242, 179, 22, 0.16);
  color: #111a28;
  display: flex;
  font-size: 0.76rem;
  font-weight: 900;
  height: 32px;
  justify-content: center;
  width: 32px;
}

body.fep-v3 .sidebar-user-copy {
  display: grid;
  line-height: 1.08;
  min-width: 0;
}

body.fep-v3 .sidebar-user-label {
  color: #8298b5;
  font-size: 0.58rem;
  font-weight: 730;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

body.fep-v3 .sidebar-user-name {
  color: #f6f9fd;
  font-size: 0.81rem;
  font-weight: 790;
  overflow-wrap: anywhere;
  white-space: normal;
}

body.fep-v3 .sidebar-product-badge {
  background: rgba(242, 179, 22, 0.1);
  border: 1px solid rgba(242, 179, 22, 0.26);
  border-radius: 999px;
  color: #f7cf68;
  font-size: 0.55rem;
  font-weight: 830;
  letter-spacing: 0.04em;
  grid-column: 2;
  justify-self: start;
  max-width: 100%;
  line-height: 1.15;
  overflow-wrap: anywhere;
  padding: 3px 5px;
  text-transform: uppercase;
  white-space: normal;
}

.sidebar-session-popover,
.sidebar-group {
  flex: 0 0 auto;
  margin: 0;
  min-width: 0;
}

.sidebar-session-popover > summary,
.sidebar-group > summary {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #8ea3be;
  cursor: pointer;
  display: flex;
  font-size: 0.67rem;
  font-weight: 770;
  justify-content: space-between;
  letter-spacing: 0.045em;
  list-style: none;
  min-height: 31px;
  padding: 5px 8px;
  text-transform: uppercase;
}

.sidebar-session-popover > summary::-webkit-details-marker,
.sidebar-group > summary::-webkit-details-marker {
  display: none;
}

.sidebar-session-popover > summary:hover,
.sidebar-group > summary:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: rgba(255, 255, 255, 0.06);
  color: #cfdaea;
}

.sidebar-session-popover[open] > summary,
.sidebar-group[open] > summary {
  color: #d8e3f1;
}

.sidebar-group > summary .fep-nav-svg {
  height: 14px;
  transition: transform var(--fep-motion);
  width: 14px;
}

.sidebar-group[open] > summary .fep-nav-svg {
  transform: rotate(90deg);
}

body.fep-v3 .sidebar-active-count {
  align-items: center;
  background: rgba(31, 168, 115, 0.17);
  border: 1px solid rgba(70, 216, 155, 0.22);
  border-radius: 999px;
  color: #8be0b9;
  display: inline-flex;
  font-size: 0.62rem;
  height: 20px;
  justify-content: center;
  min-width: 20px;
  padding: 0 5px;
}

body.fep-v3 .sidebar-active-list {
  background: rgba(2, 9, 22, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
  padding: 7px;
}

body.fep-v3 .sidebar-active-chip {
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #c8d4e4;
  font-size: 0.6rem;
  max-width: 100%;
  overflow: hidden;
  padding: 2px 6px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
  overflow: visible;
}

.sidebar-nav-primary,
.sidebar-group__items {
  display: grid;
  gap: 3px;
}

.sidebar-group__items {
  padding: 2px 0 3px;
}

body.fep-v3 .sidebar-link,
body.fep-v3 .sidebar form button.sidebar-link {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #aebed2;
  display: flex;
  gap: 8px;
  margin: 0;
  min-height: 37px;
  padding: 5px 7px;
  position: relative;
  text-decoration: none;
  transform: none;
  transition: background var(--fep-motion), border-color var(--fep-motion), color var(--fep-motion), box-shadow var(--fep-motion);
  width: 100%;
}

body.fep-v3 .sidebar-link::before,
body.fep-v3 .sidebar form button.sidebar-link::before {
  background: transparent;
  border-radius: 999px;
  content: "";
  inset: 6px auto 6px -1px;
  position: absolute;
  width: 2px;
}

body.fep-v3 .sidebar-link:hover,
body.fep-v3 .sidebar form button.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.065);
  color: #f3f7fc;
  transform: none;
}

body.fep-v3 .sidebar-link.active {
  background:
    linear-gradient(105deg, rgba(49, 130, 246, 0.13), rgba(255, 255, 255, 0.045));
  border-color: rgba(255, 201, 71, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 8px 24px rgba(0, 0, 0, 0.12), 0 0 22px rgba(49, 130, 246, 0.06);
  color: #fff;
}

body.fep-v3 .sidebar-link.active::before {
  background: linear-gradient(180deg, #ffe18a, #e8a900);
  box-shadow: 0 0 10px rgba(242, 179, 22, 0.55);
}

body.fep-v3 .sidebar-link.active .nav-hint {
  color: #91a7c3;
}

body.fep-v3 .sidebar-link.disabled {
  color: #53657d;
  cursor: default;
  opacity: 0.62;
}

body.fep-v3 .sidebar-link .nav-icon {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: #7f95b0;
  display: flex;
  flex: 0 0 24px;
  height: 24px;
  justify-content: center;
  width: 24px;
}

body.fep-v3 .sidebar-link:hover .nav-icon,
body.fep-v3 .sidebar-link.active .nav-icon {
  background: transparent;
  border: 0;
  color: #f2c65b;
}

body.fep-v3 .sidebar-link .nav-copy {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}

body.fep-v3 .sidebar-link .nav-label {
  color: inherit;
  font-size: 0.78rem;
  font-weight: 740;
  line-height: 1.12;
  overflow-wrap: normal;
  white-space: normal;
}

body.fep-v3 .sidebar-link .nav-hint {
  color: #7187a4;
  display: block;
  font-size: 0.58rem;
  line-height: 1.15;
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fep-sidebar__footer {
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
  margin-top: auto;
  padding-top: 8px;
}

.fep-sidebar__footer form {
  margin: 0;
}

.fep-sidebar-help {
  min-width: 0;
  position: relative;
}

.fep-sidebar-help > summary {
  list-style: none;
}

.fep-sidebar-help > summary::-webkit-details-marker {
  display: none;
}

.fep-sidebar-help__panel {
  background: linear-gradient(145deg, rgba(10, 29, 59, 0.99), rgba(4, 14, 32, 0.99));
  border: 1px solid rgba(255, 201, 71, 0.22);
  border-radius: 12px;
  bottom: calc(100% + 7px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  color: #aebfd4;
  display: grid;
  font-size: 0.7rem;
  gap: 6px;
  left: 0;
  line-height: 1.42;
  padding: 11px;
  position: absolute;
  width: min(286px, calc(100vw - 30px));
  z-index: 40;
}

.fep-sidebar-help__panel strong {
  color: #fff1bd;
  font-size: 0.76rem;
}

body.fep-v3 .fep-sidebar__footer .sidebar-link.danger {
  color: #93a6be;
}

body.fep-v3 .fep-sidebar__footer .sidebar-link.danger:hover {
  background: rgba(224, 68, 85, 0.09);
  border-color: rgba(224, 68, 85, 0.17);
  color: #ffd8dd;
}

.fep-mobile-nav-toggle,
.fep-mobile-nav-close,
.fep-sidebar-backdrop {
  display: none;
}

body.fep-v3 .fep-route-progress {
  background: rgba(6, 18, 38, 0.16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  left: calc(var(--fep-sidebar-width) + var(--fep-sidebar-contour-depth));
  width: auto;
}

body.fep-v3 .content-area.fep-partial-pending {
  cursor: progress;
}

body.fep-v3 .content-area {
  flex: 1 1 auto;
  margin: 0;
  min-width: 0;
  padding-left: max(
    clamp(18px, 3vw, 48px),
    calc(var(--fep-sidebar-contour-depth) + 10px)
  );
  width: calc(100% - var(--fep-sidebar-width));
}

@media (max-width: 1279px) and (min-width: 921px) {
  body.fep-v3 {
    --fep-sidebar-contour-depth: 18px;
    --fep-sidebar-width: 204px;
  }

  body.fep-v3 .sidebar.fep-sidebar {
    gap: 8px;
    padding-inline: 9px;
  }

  body.fep-v3 .sidebar-logo {
    flex-basis: 74px;
    width: 74px;
  }

  body.fep-v3 .sidebar-product-subtitle,
  body.fep-v3 .sidebar-link .nav-hint {
    display: none;
  }

  body.fep-v3 .sidebar-link,
  body.fep-v3 .sidebar form button.sidebar-link {
    min-height: 35px;
  }

  body.fep-v3 .sidebar-link .nav-label {
    font-size: 0.74rem;
  }
}

@media (max-height: 760px) and (min-width: 921px) {
  body.fep-v3 .sidebar.fep-sidebar {
    gap: 6px;
    padding-block: 9px;
  }

  body.fep-v3 .sidebar-logo-panel {
    padding-bottom: 1px;
  }

  body.fep-v3 .sidebar-user {
    padding-block: 5px;
  }

  body.fep-v3 .sidebar-link,
  body.fep-v3 .sidebar form button.sidebar-link {
    min-height: 32px;
    padding-block: 3px;
  }

  .sidebar-session-popover > summary,
  .sidebar-group > summary {
    min-height: 28px;
    padding-block: 3px;
  }
}

@media (max-width: 920px) {
  body.fep-v3 {
    --fep-sidebar-contour-depth: 0px;
    display: block;
  }

  .fep-sidebar-contour {
    display: none;
  }

  body.fep-v3 .fep-route-progress {
    left: 0;
  }

  body.fep-v3.sidebar-drawer-open {
    overflow: hidden;
  }

  body.fep-v3 .sidebar.fep-sidebar {
    bottom: 0;
    box-shadow: 24px 0 80px rgba(0, 0, 0, 0.45);
    height: 100dvh;
    left: 0;
    max-height: 100dvh !important;
    min-height: 100dvh;
    padding: 14px 12px 12px;
    position: fixed !important;
    top: 0 !important;
    transform: translateX(-105%);
    transition: transform 190ms cubic-bezier(0.2, 0.75, 0.25, 1);
    width: min(310px, calc(100vw - 44px));
    z-index: 2100;
  }

  body.fep-v3 .sidebar.fep-sidebar.is-open {
    transform: translateX(0);
  }

  .fep-mobile-nav-toggle {
    align-items: center;
    background: rgba(6, 18, 38, 0.94);
    border: 1px solid rgba(255, 201, 71, 0.32);
    border-radius: 11px;
    box-shadow: 0 10px 30px rgba(3, 12, 29, 0.18);
    color: #fff;
    display: inline-flex;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 780;
    gap: 7px;
    left: 12px;
    min-height: 40px;
    padding: 8px 11px;
    position: fixed;
    top: 10px;
    z-index: 2050;
  }

  .fep-mobile-nav-close {
    align-items: center;
    background: rgba(255, 255, 255, 0.055);
    border: 1px solid rgba(255, 255, 255, 0.075);
    border-radius: 9px;
    color: #d5e0ee;
    display: inline-flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
  }

  .fep-sidebar-backdrop {
    background: rgba(2, 7, 17, 0.54);
    border: 0;
    display: block;
    inset: 0;
    padding: 0;
    position: fixed;
    z-index: 2080;
  }

  .fep-sidebar-backdrop[hidden] {
    display: none;
  }

  body.fep-v3 .content-area {
    padding-top: 66px;
    width: 100%;
  }
}

@media (max-width: 420px), (max-height: 640px) {
  body.fep-v3 .sidebar.fep-sidebar {
    gap: 5px;
    padding-block: 9px;
  }

  body.fep-v3 .sidebar-logo-panel {
    padding-bottom: 0;
  }

  body.fep-v3 .sidebar-logo {
    flex-basis: 72px;
    width: 72px;
  }

  body.fep-v3 .sidebar-user {
    padding-block: 5px;
  }

  body.fep-v3 .sidebar-link,
  body.fep-v3 .sidebar form button.sidebar-link {
    min-height: 31px;
    padding-block: 3px;
  }

  body.fep-v3 .sidebar-link .nav-hint,
  body.fep-v3 .sidebar-product-subtitle {
    display: none;
  }

  .sidebar-session-popover > summary,
  .sidebar-group > summary {
    min-height: 27px;
    padding-block: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.fep-v3 *,
  body.fep-v3 *::before,
  body.fep-v3 *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
