/* Material Design 3 — https://m3.material.io/
   Seed color #0C287B. Roles follow the MD3 color system. */

:root {
  --md-primary: #0C287B;
  --md-on-primary: #FFFFFF;
  --md-primary-container: #E7EBF6;
  --md-on-primary-container: #041033;
  --md-secondary: #667085;
  --md-on-secondary: #FFFFFF;
  --md-secondary-container: #f2f4f7;
  --md-on-secondary-container: #344054;
  --md-tertiary: #0C287B;
  --md-surface: #f9fafb;
  --md-surface-dim: #e4e7ec;
  --md-surface-container-lowest: #FFFFFF;
  --md-surface-container-low: #f9fafb;
  --md-surface-container: #f2f4f7;
  --md-surface-container-high: #e4e7ec;
  --md-surface-container-highest: #d0d5dd;
  --md-on-surface: #1d2939;
  --md-on-surface-variant: #667085;
  --md-outline: #98a2b3;
  --md-outline-variant: #e4e7ec;
  --md-error: #f04438;
  --md-on-error: #FFFFFF;
  --md-error-container: #fef3f2;
  --md-on-error-container: #7a271a;
  --md-inverse-surface: #101828;
  --md-inverse-on-surface: #f9fafb;
  --md-e1: 0 1px 2px rgba(16, 24, 40, .06);
  --md-e2: 0 1px 3px rgba(16, 24, 40, .10), 0 1px 2px rgba(16, 24, 40, .06);
  --md-e3: 0 12px 16px -4px rgba(16, 24, 40, .08);
  --bs-primary: #0C287B;
  --bs-primary-rgb: 12, 40, 123;
  --bs-body-color: #1d2939;
  --bs-body-bg: #f9fafb;
  --bs-border-radius: 12px;
}

html, body, .container-scroller, .page-body-wrapper, .main-panel, .content-wrapper {
  background: var(--md-surface);
  color: var(--md-on-surface);
}
body {
  font-family: Outfit, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  letter-spacing: 0;
}

a { color: var(--md-primary); }
a:hover { color: #0A2269; }

html,
body,
* {
  scrollbar-color: #0C287B #f2f4f7;
}
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}
::-webkit-scrollbar-track {
  background: #f2f4f7;
}
::-webkit-scrollbar-thumb {
  background: #0C287B;
  border: 2px solid #f2f4f7;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #0A2269;
}

.content-wrapper h3,
.content-wrapper h3.font-weight-bold {
  margin-bottom: 4px;
  color: var(--md-on-surface);
  font-size: 24px;
  font-weight: 400 !important;
  line-height: 32px;
  letter-spacing: 0;
}
.rex-catalog {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  box-shadow: none;
}
.rex-catalog-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 32px;
  overflow: hidden;
  border-radius: 12px;
  background:
    radial-gradient(80% 160% at 100% 50%, rgba(255, 255, 255, 0.28), transparent 36%),
    linear-gradient(100deg, #071643 0%, #0C287B 36%, #2454C2 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.22),
    0 18px 40px rgba(12, 40, 123, 0.16);
}
.rex-catalog-head::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 430 78' fill='none'%3E%3Cdefs%3E%3ClinearGradient id='shine' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='white' stop-opacity='.72'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='.16'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='58' cy='39' r='30' fill='white' opacity='.07'/%3E%3Ccircle cx='58' cy='39' r='22' stroke='white' stroke-width='1.4' opacity='.55'/%3E%3Cellipse cx='58' cy='39' rx='9' ry='22' stroke='white' stroke-width='1.2' opacity='.4'/%3E%3Cpath d='M36 39h44M40 28h36M40 50h36' stroke='white' stroke-width='1.15' opacity='.35'/%3E%3Cg transform='translate(108 20) rotate(-18 42 16)'%3E%3Crect width='84' height='32' rx='16' fill='url(%23shine)' stroke='white' stroke-opacity='.75' stroke-width='1.25'/%3E%3Cpath d='M42 1.4v29.2' stroke='white' stroke-opacity='.6' stroke-width='1.15'/%3E%3Crect x='1.3' y='1.3' width='39' height='29.4' rx='14.7' fill='white' opacity='.18'/%3E%3C/g%3E%3Cg transform='translate(214 8) rotate(7 30 30)'%3E%3Crect width='58' height='60' rx='12' fill='white' opacity='.1' stroke='white' stroke-opacity='.62' stroke-width='1.25'/%3E%3Crect x='12' y='16' width='26' height='4.5' rx='2.2' fill='white' opacity='.7'/%3E%3Crect x='12' y='26' width='34' height='3' rx='1.5' fill='white' opacity='.32'/%3E%3Crect x='12' y='34' width='20' height='3' rx='1.5' fill='white' opacity='.32'/%3E%3C/g%3E%3Cg transform='translate(292 12)'%3E%3Cpath d='M28 3 54 16v26L28 55 2 42V16z' fill='white' opacity='.1' stroke='white' stroke-opacity='.68' stroke-width='1.25' stroke-linejoin='round'/%3E%3Cpath d='M2 16 28 29l26-13' stroke='white' stroke-opacity='.62' stroke-width='1.2'/%3E%3Cpath d='M28 29v26' stroke='white' stroke-opacity='.45' stroke-width='1.15'/%3E%3Cpath d='M2 16 28 29V3z' fill='white' opacity='.18'/%3E%3C/g%3E%3Ccircle cx='378' cy='16' r='2.2' fill='white' opacity='.75'/%3E%3Ccircle cx='396' cy='34' r='1.3' fill='white' opacity='.45'/%3E%3Ccircle cx='366' cy='58' r='1.5' fill='white' opacity='.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 168px center;
  background-size: 430px 78px;
}
.rex-catalog-head > * { position: relative; z-index: 1; }
.rex-catalog-sheet {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(12, 40, 123, 0.08);
}
.rex-catalog-copy { min-width: 0; }
.rex-catalog-head h1 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.rex-catalog-head h1 .mdi {
  font-size: 30px;
  line-height: 1;
}
.rex-catalog-head p {
  margin: 8px 0 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, 0.84);
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
}
.rex-catalog-head a.btn.btn-primary {
  background: #fff;
  color: #0C287B;
  box-shadow: none;
}
.rex-catalog-head a.btn.btn-primary:hover,
.rex-catalog-head a.btn.btn-primary:focus,
.rex-catalog-head a.btn.btn-primary:active {
  background: #E7EBF6;
  color: #0C287B;
  box-shadow: none;
}
.rex-catalog-grid {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  width: 100%;
  margin: 0;
  padding: 0;
}
.rex-product-card {
  display: grid;
  grid-template-columns: 44px minmax(180px, 1fr) auto;
  align-items: center;
  gap: 16px 20px;
  min-width: 0;
  padding: 14px 14px 14px 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: #fff;
  color: #191C20;
  text-decoration: none;
  box-shadow: 0 12px 32px rgba(12, 40, 123, 0.08);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.rex-product-card:hover {
  border-color: #0C287B;
  box-shadow: 0 16px 36px rgba(12, 40, 123, 0.14);
}
.rex-product-card:focus-visible {
  outline: 2px solid #0C287B;
  outline-offset: 3px;
}
.rex-product-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #E7EBF6;
  color: #0C287B;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
}
.rex-product-identity {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.rex-product-panel {
  display: grid;
  grid-template-columns: 228px 196px 176px;
  align-items: center;
  gap: 8px 20px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #F4F6FC;
}
.rex-catalog-name {
  color: #0C287B;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  letter-spacing: -0.01em;
}
.rex-product-card:hover .rex-catalog-name { text-decoration: underline; }
.rex-catalog-generic {
  color: #73777F;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}
.rex-product-fact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.rex-product-label {
  color: #73777F;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}
.rex-product-datum {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
}
.rex-product-datum > .mdi {
  flex: 0 0 auto;
  color: #0C287B;
  font-size: 18px;
  line-height: 1;
}
.rex-product-value {
  color: #191C20;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}
.rex-catalog-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #E7EBF6;
  color: #0C287B;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}
.rex-catalog-empty {
  margin: 0;
  padding: 28px 32px 36px;
  color: #43474E;
  font-size: 15px;
  line-height: 22px;
}
@media (max-width: 991.98px) {
  .rex-product-card {
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: start;
  }
  .rex-product-panel {
    grid-column: 1 / -1;
    width: 100%;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}
@media (max-width: 767.98px) {
  .rex-catalog-head {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .rex-catalog-head h1 { font-size: 28px; line-height: 32px; }
  .rex-catalog-head a.btn.btn-primary { width: 100%; }
  .rex-catalog-head::before {
    background-position: right -40px center;
    background-size: 320px 58px;
    opacity: 0.7;
  }
  .rex-catalog-grid { grid-template-columns: 1fr; }
  .rex-product-panel { grid-template-columns: 1fr 1fr; }
  .rex-product-panel .rex-product-fact:first-child { grid-column: 1 / -1; }
  .rex-catalog-empty { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .rex-product-card { transition: none; }
}
.content-wrapper h6,
.content-wrapper h6.font-weight-normal {
  color: var(--md-on-surface-variant);
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.1px;
}
.card-title, .content-wrapper h4 {
  color: var(--md-on-surface);
  font-size: 16px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 0.15px;
}
.text-muted, .lede, .meta { color: var(--md-on-surface-variant) !important; }
.text-primary, .text-success, .text-info { color: var(--md-primary) !important; }
.text-dark { color: var(--md-on-surface) !important; }

.btn.btn-primary,
.btn.btn-primary:disabled {
  min-height: 40px;
  padding: 0 24px;
  border: 0;
  border-radius: 20px;
  background: var(--md-primary);
  color: var(--md-on-primary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  line-height: 20px;
  text-transform: none;
  box-shadow: none;
}
.btn.btn-primary:hover,
.btn.btn-primary:focus,
.btn.btn-primary:active {
  background: #16358f;
  color: var(--md-on-primary);
  box-shadow: var(--md-e1);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 24px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1px;
  line-height: 20px;
  text-transform: none;
  box-shadow: none;
}
.btn.btn-sm { min-height: 32px; padding: 0 16px; border-radius: 16px; font-size: 13px; }
.btn.btn-lg { min-height: 48px; padding: 0 24px; border-radius: 24px; }
.btn.btn-outline-primary {
  background: transparent;
  color: var(--md-primary);
  border: 1px solid var(--md-outline);
}
.btn.btn-outline-primary:hover,
.btn.btn-outline-primary:focus {
  background: rgba(12, 40, 123, 0.08);
  color: var(--md-primary);
  border-color: var(--md-primary);
}
.btn.btn-danger {
  background: var(--md-error);
  border: 0;
  color: var(--md-on-error);
}

/* Cards */
.card {
  background: var(--md-surface-container-lowest);
  border: 1px solid var(--md-outline-variant);
  border-radius: 12px;
  box-shadow: none;
}
.card-body { color: var(--md-on-surface); }
.grid-margin { margin-bottom: 16px; }

/* Text fields */
.form-control,
.form-select,
select.form-control,
textarea.form-control {
  min-height: 56px;
  padding: 16px;
  border: 1px solid var(--md-outline);
  border-radius: 4px;
  background-color: transparent;
  color: var(--md-on-surface);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: 0.5px;
  box-shadow: none;
}
textarea.form-control { min-height: 120px; }
.form-control:focus,
.form-select:focus,
select.form-control:focus,
textarea.form-control:focus {
  border: 2px solid var(--md-primary);
  background: transparent;
  color: var(--md-on-surface);
  box-shadow: none;
}
.form-control::placeholder { color: var(--md-on-surface-variant); opacity: 1; }
.field label, .form-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--md-on-surface-variant);
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0.5px;
}
.req { color: var(--md-error); }

/* Data tables */
.table {
  color: var(--md-on-surface);
  border-color: var(--md-outline-variant);
}
.table thead th {
  border-bottom: 1px solid var(--md-outline-variant);
  background: transparent;
  color: var(--md-on-surface-variant);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: none;
}
.table td, .table th { border-top: 0; padding: 16px 12px; vertical-align: middle; }
.table tbody td { border-bottom: 1px solid var(--md-outline-variant); }
.table-hover tbody tr:hover { background: var(--md-surface-container-low); color: var(--md-on-surface); }

/* Status chips */
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border: 0 !important;
  border-radius: 8px;
  background: var(--md-surface-container-high);
  color: var(--md-on-surface-variant);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
}
.badge-primary, .badge-success, .badge-info {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}
.badge-warning {
  background: #FFDDB8;
  color: #2B1700;
}
.badge-secondary {
  background: var(--md-surface-container-high);
  color: var(--md-on-surface-variant);
}

/* Banners */
.alert {
  border: 0;
  border-radius: 12px;
  padding: 14px 16px;
}
.alert-success, .alert-primary {
  background: var(--md-primary-container);
  color: var(--md-on-primary-container);
}
.alert-danger {
  background: var(--md-error-container);
  color: var(--md-on-error-container);
}
.alert-warning {
  background: #FFDDB8;
  color: #2B1700;
}

/* Menus */
.dropdown-menu {
  min-width: 200px;
  padding: 8px 0;
  border: 0;
  border-radius: 4px;
  background: var(--md-surface-container);
  box-shadow: var(--md-e2);
}
.dropdown-item {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  color: var(--md-on-surface);
  font-size: 14px;
  font-weight: 400;
}
.dropdown-item:hover, .dropdown-item:focus {
  background: rgba(12, 40, 123, 0.08);
  color: var(--md-on-surface);
}
.dropdown-item.text-muted { color: var(--md-on-surface-variant); }

/* Mobile navigation bar */
.horizontal-menu .bottom-navbar {
  background: var(--md-surface-container);
  box-shadow: none;
}
.horizontal-menu .bottom-navbar .page-navigation > .nav-item > .nav-link {
  border-radius: 16px;
  color: var(--md-on-surface-variant);
}
.horizontal-menu .bottom-navbar .page-navigation > .nav-item.active > .nav-link,
.horizontal-menu .bottom-navbar .page-navigation > .nav-item.active > .nav-link .menu-title,
.horizontal-menu .bottom-navbar .page-navigation > .nav-item.active > .nav-link .menu-icon {
  background: var(--md-secondary-container);
  color: var(--md-on-secondary-container);
}
.horizontal-menu .bottom-navbar .page-navigation > .nav-item.active > .nav-link:after,
.horizontal-menu .bottom-navbar .page-navigation > .nav-item.active > .nav-link:before { display: none; }

/* Product details */
.rex-product h2 {
  color: var(--md-on-surface);
  font-size: 22px;
  font-weight: 400;
  line-height: 28px;
}
.rex-product .card {
  border: 1px solid var(--md-outline-variant);
  border-radius: 12px;
  background: var(--md-surface-container-lowest);
  box-shadow: none;
}
.rex-product .nav-tabs { border-bottom: 1px solid var(--md-outline-variant); }
.rex-product .nav-tabs .nav-link {
  border-radius: 0;
  color: var(--md-on-surface-variant);
  font-weight: 500;
}
.rex-product .nav-tabs .nav-link.active {
  background: transparent;
  color: var(--md-primary);
  border-bottom: 3px solid var(--md-primary);
}
.rex-product-fields {
  border: 1px solid var(--md-outline-variant);
  border-radius: 12px;
  background: var(--md-surface-container-lowest);
}
.rex-product-fields li {
  border-radius: 8px;
  background: var(--md-surface-container-low);
}
.rex-product-fields .label { color: var(--md-on-surface-variant); font-weight: 500; }
.rex-product-fields .info { color: var(--md-on-surface); font-weight: 500; }
.rex-product-table-wrap { border-color: var(--md-outline-variant); border-radius: 12px; }
.rex-product-table thead th { background: var(--md-surface-container-low); color: var(--md-on-surface-variant); }
.rex-product-activity .step h6::before {
  background: var(--md-primary);
  box-shadow: 0 0 0 4px var(--md-primary-container);
}
.rex-product-comment {
  border-color: var(--md-outline);
  border-radius: 28px;
}
.rex-product-comment:focus-within {
  border-color: var(--md-primary);
  box-shadow: none;
}
.rex-product-comment button {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  background: var(--md-primary);
}

.rex-dossier {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.rex-dossier-head {
  padding: 16px 20px 16px 24px;
  overflow: hidden;
  border-radius: 12px;
  background: linear-gradient(105deg, #071643 0%, #0C287B 62%, #163A9A 100%);
  box-shadow: 0 12px 32px rgba(12, 40, 123, 0.12);
}
.rex-dossier-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  min-width: 0;
}
.rex-dossier-main::before {
  content: "";
  order: 2;
  flex: 1 1 auto;
  align-self: stretch;
  min-width: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 430 78' fill='none'%3E%3Cdefs%3E%3ClinearGradient id='shine' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='white' stop-opacity='.72'/%3E%3Cstop offset='1' stop-color='white' stop-opacity='.16'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='58' cy='39' r='30' fill='white' opacity='.07'/%3E%3Ccircle cx='58' cy='39' r='22' stroke='white' stroke-width='1.4' opacity='.55'/%3E%3Cellipse cx='58' cy='39' rx='9' ry='22' stroke='white' stroke-width='1.2' opacity='.4'/%3E%3Cpath d='M36 39h44M40 28h36M40 50h36' stroke='white' stroke-width='1.15' opacity='.35'/%3E%3Cg transform='translate(108 20) rotate(-18 42 16)'%3E%3Crect width='84' height='32' rx='16' fill='url(%23shine)' stroke='white' stroke-opacity='.75' stroke-width='1.25'/%3E%3Cpath d='M42 1.4v29.2' stroke='white' stroke-opacity='.6' stroke-width='1.15'/%3E%3Crect x='1.3' y='1.3' width='39' height='29.4' rx='14.7' fill='white' opacity='.18'/%3E%3C/g%3E%3Cg transform='translate(214 8) rotate(7 30 30)'%3E%3Crect width='58' height='60' rx='12' fill='white' opacity='.1' stroke='white' stroke-opacity='.62' stroke-width='1.25'/%3E%3Crect x='12' y='16' width='26' height='4.5' rx='2.2' fill='white' opacity='.7'/%3E%3Crect x='12' y='26' width='34' height='3' rx='1.5' fill='white' opacity='.32'/%3E%3Crect x='12' y='34' width='20' height='3' rx='1.5' fill='white' opacity='.32'/%3E%3C/g%3E%3Cg transform='translate(292 12)'%3E%3Cpath d='M28 3 54 16v26L28 55 2 42V16z' fill='white' opacity='.1' stroke='white' stroke-opacity='.68' stroke-width='1.25' stroke-linejoin='round'/%3E%3Cpath d='M2 16 28 29l26-13' stroke='white' stroke-opacity='.62' stroke-width='1.2'/%3E%3Cpath d='M28 29v26' stroke='white' stroke-opacity='.45' stroke-width='1.15'/%3E%3Cpath d='M2 16 28 29V3z' fill='white' opacity='.18'/%3E%3C/g%3E%3Ccircle cx='378' cy='16' r='2.2' fill='white' opacity='.75'/%3E%3Ccircle cx='396' cy='34' r='1.3' fill='white' opacity='.45'/%3E%3Ccircle cx='366' cy='58' r='1.5' fill='white' opacity='.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}
.rex-dossier-title {
  display: flex;
  align-items: center;
  order: 1;
  gap: 14px;
  min-width: 0;
}
.rex-dossier-mark {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #fff;
  color: #0C287B;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
}
.rex-dossier-head h1 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 500;
  line-height: 32px;
  letter-spacing: -0.04em;
}
.rex-dossier-head p {
  margin: 2px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}
.rex-dossier-status {
  display: grid;
  order: 3;
  grid-template-columns: minmax(160px, 220px) minmax(140px, 180px) minmax(120px, 160px);
  align-items: center;
  gap: 16px;
  flex: 0 0 auto;
  padding: 12px 16px;
  border-radius: 12px;
  background: #fff;
}
.rex-dossier-fact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}
.rex-dossier-fact-label {
  color: #73777F;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}
.rex-dossier-fact-value {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  color: #191C20;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}
.rex-dossier-fact-value > .mdi {
  flex: 0 0 auto;
  color: #0C287B;
  font-size: 18px;
  line-height: 1;
}
.rex-dossier-fact-value > span:not(.rex-catalog-chip) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rex-dossier-field-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}
.rex-dossier-field-chip .mdi {
  font-size: 16px;
  line-height: 1;
}
.rex-dossier-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30%;
  gap: 20px;
  align-items: stretch;
}
.rex-dossier-side {
  display: flex;
  min-width: 0;
  min-height: 0;
}
.rex-dossier-sheet,
.rex-dossier-activity {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(12, 40, 123, 0.08);
}
.rex-dossier-sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}
.rex-dossier-sheet .tab-content { flex: 1; }
.rex-dossier-footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding: 16px 20px 20px;
  border-top: 1px solid #E6E7F1;
}
.rex-dossier-footer .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rex-dossier-footer .btn.btn-danger {
  background: #BA1A1A;
  border: 0;
  color: #fff;
}
.rex-dossier-footer .btn.btn-danger:hover,
.rex-dossier-footer .btn.btn-danger:focus {
  background: #93000A;
  color: #fff;
}
.rex-dossier .nav-tabs {
  gap: 4px;
  margin: 0;
  padding: 8px 12px 0;
  border-bottom: 1px solid #E6E7F1;
}
.rex-dossier .nav-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: -1px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: #43474E;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
}
.rex-dossier .nav-tabs .nav-link .mdi { font-size: 18px; line-height: 1; }
.rex-dossier .nav-tabs .nav-link:hover { color: #0C287B; }
.rex-dossier .nav-tabs .nav-link.active {
  background: transparent;
  color: #0C287B;
  border-bottom-color: #0C287B;
}
.rex-dossier .nav-tabs .nav-link:focus-visible {
  outline: 2px solid #0C287B;
  outline-offset: -2px;
}
.rex-dossier .tab-content { padding: 8px 8px 20px; }
.rex-dossier-group + .rex-dossier-group { border-top: 1px solid #E6E7F1; }
.rex-dossier-group h2 {
  margin: 0;
  padding: 16px 16px 0;
  color: #0C287B;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
}
.rex-dossier-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 24px;
  margin: 8px 0 0;
  padding: 0 8px 8px;
  list-style: none;
}
.rex-dossier-fields li {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 8px 12px;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 8px;
}
.rex-dossier-wide { grid-column: 1 / -1; }
.rex-dossier-label {
  color: #73777F;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.rex-dossier-value {
  color: #191C20;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  word-break: break-word;
}
.rex-dossier-field-chip {
  background: #E7EBF6;
  color: #0C287B;
}
.rex-dossier-notes {
  margin: 8px 16px 16px;
  color: #191C20;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
}
.rex-dossier-note,
.rex-dossier .rex-product-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 16px 12px;
  color: #43474E;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}
.rex-dossier .rex-product-table-wrap {
  margin: 0 16px 8px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
}
.rex-dossier .rex-product-table thead th {
  font-weight: 500;
  letter-spacing: 0;
}
.rex-dossier .rex-product-table td {
  color: #191C20;
  font-weight: 400;
}
.rex-dossier .rex-product-empty {
  margin: 8px 16px 16px;
  padding: 20px 8px;
  color: #43474E;
  font-size: 14px;
  font-weight: 400;
  text-align: left;
}
.rex-dossier-activity {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 20px;
  background: #fff;
  box-sizing: border-box;
}
.rex-activity-thread {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.rex-dossier-activity h2 {
  margin: 0;
  padding: 0 0 12px;
  color: #0C287B;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.rex-activity-list {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
  min-height: 0;
  max-height: 560px;
  overflow: auto;
  padding-right: 2px;
}
.rex-activity-pager {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #E6E7F1;
}
.rex-activity-pager p,
.rex-activity-note {
  margin: 0;
  color: #73777F;
  font-size: 12px;
  line-height: 16px;
}
.rex-activity-note { margin-top: 8px; }
.rex-activity-pager div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.rex-activity-pager button {
  border: 1px solid #D5DCF0;
  border-radius: 8px;
  background: #fff;
  color: #0C287B;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.rex-activity-pager button:disabled {
  color: #98A2B3;
  cursor: default;
}
.rex-activity-pager span {
  color: #43474E;
  font-size: 12px;
  font-weight: 500;
}
.rex-activity-list::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 13px;
  top: 26px;
  bottom: 8px;
  width: 2px;
  border-radius: 2px;
  background: #D5DCF0;
}
.rex-activity-list:not(:has(.rex-activity-item))::before { display: none; }
.rex-activity-item,
.rex-activity-form {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.rex-activity-form::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 13px;
  top: -16px;
  width: 2px;
  height: 30px;
  background: #D5DCF0;
}
.rex-activity-thread:not(:has(.rex-activity-item)) .rex-activity-form::before { display: none; }
.rex-activity-node {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-top: 12px;
  border-radius: 999px;
  background: #fff;
  color: #0C287B;
  box-shadow: 0 0 0 4px #fff, inset 0 0 0 2px #0C287B;
}
.rex-activity-item.is-latest .rex-activity-node {
  background: #0C287B;
  color: #fff;
  box-shadow: 0 0 0 4px #fff;
}
.rex-activity-node .mdi { font-size: 14px; line-height: 1; }
.rex-activity-card {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(12, 40, 123, 0.05);
  overflow-wrap: anywhere;
}
.rex-activity-item.is-latest .rex-activity-card {
  border-color: #D5DCF0;
  background: #F7F8FC;
}
.rex-activity-time,
.rex-activity-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: #73777F;
  font-size: 11px;
  font-weight: 500;
  line-height: 14px;
}
.rex-activity-time {
  width: fit-content;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #E7EBF6;
  color: #0C287B;
}
.rex-activity-time span,
.rex-activity-meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rex-activity-time .mdi,
.rex-activity-meta .mdi {
  color: #0C287B;
  font-size: 12px;
  line-height: 1;
}
.rex-dossier-activity .rex-activity-title,
.rex-ws-activity .rex-activity-title {
  margin: 0;
  color: #191C20;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
}
.rex-activity-file {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  margin-top: 8px;
  color: #0C287B;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}
.rex-activity-file .mdi { font-size: 14px; line-height: 1; }
.rex-ws-activity .rex-activity-thread,
.rex-ws-activity .rex-activity-list {
  flex: none;
  min-height: auto;
}
.rex-ws-activity .rex-activity-list { max-height: 480px; }
.rex-activity-body {
  margin: 4px 0 0;
  color: #43474E;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}
.rex-activity-meta {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #E6E7F1;
}
.rex-activity-empty {
  margin: 0 0 10px;
  color: #43474E;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}
.rex-activity-form {
  flex: 0 0 auto;
  align-items: center;
  margin-top: 16px;
}
.rex-activity-form .rex-activity-node {
  box-sizing: border-box;
  width: 28px;
  height: 28px;
  margin-top: 0;
  border: 2px solid #0C287B;
  background: #fff;
  color: #0C287B;
  box-shadow: 0 0 0 4px #fff;
  overflow: hidden;
}
.rex-activity-form .rex-activity-node .mdi {
  font-size: 14px;
  line-height: 1;
}
.rex-activity-compose {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 40px;
  padding: 4px 4px 4px 12px;
  border: 1px solid #C3C6D0;
  border-radius: 12px;
  background: #fff;
}
.rex-activity-compose:focus-within {
  border-color: #0C287B;
  box-shadow: none;
}
.rex-activity-compose input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #191C20;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}
.rex-activity-compose button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: #0C287B;
  color: #fff;
  cursor: pointer;
}
.rex-activity-compose button:hover { background: #0A2269; }
.rex-activity-compose button:focus-visible {
  outline: 2px solid #0C287B;
  outline-offset: 2px;
}
.rex-activity-compose button .mdi { font-size: 14px; line-height: 1; }
.rex-activity-compose { min-width: 0; }
.rex-activity-error {
  flex: 1 0 100%;
  margin: 0;
  color: #BA1A1A;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}
@media (max-width: 991.98px) {
  .rex-dossier-main { flex-direction: column; align-items: stretch; }
  .rex-dossier-main::before { display: none; }
  .rex-dossier-status { width: 100%; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); }
  .rex-dossier-layout { grid-template-columns: 1fr; }
  .rex-dossier-fields { grid-template-columns: 1fr; }
}
@media (max-width: 767.98px) {
  .rex-dossier-head { padding: 16px; }
  .rex-dossier-head h1 { font-size: 28px; line-height: 32px; }
  .rex-dossier-status { grid-template-columns: 1fr; }
  .rex-dossier-fields li { grid-template-columns: 1fr; gap: 2px; align-items: start; }
}

/* Side sheet and scrim */
.overlay { background: rgba(0, 0, 0, .32); }
.rex-drawer {
  display: flex;
  flex-direction: column;
  width: min(640px, 100%);
  padding: 0;
  overflow: hidden;
  border-radius: 16px 0 0 16px;
  background: #F4F6FC;
  box-shadow: var(--md-e3);
}
.rex-drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 20px 24px;
  background: #fff;
  border-bottom: 1px solid #E6E7F1;
}
.rex-drawer h2 {
  margin: 0;
  color: #191C20;
  font-size: 22px;
  font-weight: 500;
  line-height: 28px;
}
.rex-drawer-head p {
  margin: 4px 0 0;
  color: #73777F;
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
}
.rex-drawer-close {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border: 1px solid #E6E7F1;
  border-radius: 999px;
  background: #fff;
  color: #0C287B;
  cursor: pointer;
}
.rex-drawer-close:hover { background: #F4F6FC; }
.rex-drawer-close:focus-visible { outline: 2px solid #0C287B; outline-offset: 2px; }
.rex-drawer-close .mdi { font-size: 18px; line-height: 1; }
.rex-create {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
.rex-create-scroll {
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 20px 24px;
  overflow: auto;
}
.rex-create-section {
  flex: 0 0 auto;
  padding: 16px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
}
.rex-create-section:has(.suggest.is-open),
.rex-create-scroll:has(.suggest.is-open) {
  overflow: visible;
  position: relative;
  z-index: 6;
}
.rex-drawer .field:has(.suggest) { position: relative; }
.rex-create-title {
  margin: 0 0 12px;
  color: #0C287B;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.rex-create-note {
  margin: -4px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #E7EBF6;
  color: #0C287B;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
.rex-create-agent {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #f8fafc;
}
.rex-create-agent .rex-create-actions { margin-top: 4px; }
.rex-create-link {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: #0C287B;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.rex-drawer .field { margin-bottom: 12px; }
.rex-drawer .field:last-child { margin-bottom: 0; }
.rex-drawer .field label {
  margin-bottom: 6px;
  color: #73777F;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
  letter-spacing: 0;
}
.rex-drawer .field input,
.rex-drawer .field select,
.rex-drawer .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #C3C6D0;
  border-radius: 12px;
  background: #fff;
  color: #191C20;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  box-shadow: none;
}
.rex-drawer .field textarea { min-height: 72px; resize: vertical; }
.rex-drawer .field input:focus,
.rex-drawer .field select:focus,
.rex-drawer .field textarea:focus {
  border-color: #0C287B;
  outline: none;
}
.rex-drawer .field select:disabled {
  background: #F4F6FC;
  color: #73777F;
  border-color: #E6E7F1;
  opacity: 1;
}
.rex-create-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #C3C6D0;
  border-radius: 12px;
  background: #fff;
}
.rex-create-search:focus-within { border-color: #0C287B; }
.rex-create-search .mdi { flex: 0 0 auto; color: #0C287B; font-size: 20px; line-height: 1; }
.rex-drawer .rex-create-search input {
  width: 100%;
  flex: 1 1 auto;
  height: 42px;
  min-height: 42px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.rex-drawer .rex-create-search input:focus { border: 0; outline: none; }
.rex-drawer .form-grid { grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.rex-drawer .suggest {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 240px;
  margin-top: 0;
  overflow: auto;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(12, 40, 123, 0.16);
}
.rex-drawer .suggest.is-open { display: block; }
.rex-suggest-empty {
  margin: 0;
  padding: 12px;
  color: #73777F;
  font-size: 13px;
  line-height: 18px;
}
.rex-drawer .suggest button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  background: #fff;
  color: #191C20;
  cursor: pointer;
}
.rex-drawer .suggest button:hover { background: #F4F6FC; }
.rex-drawer .suggest button span:first-child {
  color: #191C20;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}
.rex-drawer .suggest button span:last-child {
  color: #73777F;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
}
.rex-create-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  flex: 0 0 auto;
  padding: 16px 24px;
  background: #fff;
  border-top: 1px solid #E6E7F1;
}
.rex-create-footer .btn { align-self: flex-end; display: inline-flex; align-items: center; gap: 8px; }
.rex-create-error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #FFDAD6;
  color: #93000A;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
}
@media (max-width: 640px) {
  .rex-drawer .form-grid { grid-template-columns: 1fr; }
}

/* Switch */
.switch span { background: var(--md-surface-container-highest); border: 2px solid var(--md-outline); }
.switch input:checked + span { background: var(--md-primary); border-color: var(--md-primary); }
.switch span:before { background: var(--md-outline); }
.switch input:checked + span:before { background: var(--md-on-primary); }

/* Suggest list and small surfaces */
.suggest, .toggle-card, .pack-row, .step {
  border-color: var(--md-outline-variant);
  border-radius: 12px;
  background: var(--md-surface-container-lowest);
}
.footer {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 !important;
  background: #0C287B !important;
  color: #fff;
  border: 0;
  border-radius: 0;
  font-size: 13px;
  line-height: 18px;
  box-sizing: border-box;
}
.footer .footer-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 24px !important;
  background: #0C287B !important;
  color: #fff;
  border: 0;
  border-radius: 0;
  box-sizing: border-box;
}
.footer .text-muted,
.footer span {
  color: #fff !important;
}

/* Sign in */
.auth, .auth .content-wrapper { background: var(--md-surface); }
.auth-form-light {
  border: 1px solid var(--md-outline-variant);
  border-radius: 28px;
  background: var(--md-surface-container-lowest) !important;
  box-shadow: var(--md-e1);
}
.auth-form-light h4 {
  color: var(--md-on-surface);
  font-size: 24px;
  font-weight: 400;
  line-height: 32px;
}
.auth-form-light h6 { color: var(--md-on-surface-variant); font-weight: 400; }
.auth .form-control-lg { border-radius: 4px; }
.auth .auth-form-btn { border-radius: 20px; }

/* Top header: white bar, navy items. */
.horizontal-menu .top-navbar.rex-topbar,
.rex-topbar {
  background: #fff !important;
  border-bottom: 1px solid #E6E7F1;
  box-shadow: none;
}
.rex-topbar-row { min-height: 74px; }
.rex-topbar-logo img { filter: none; }
.rex-topbar-divider { background: #D5DCF0; }
.rex-topnav-link {
  height: auto;
  align-self: stretch;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #191C20;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
}
.rex-topnav-link:hover { color: #0C287B; background: transparent; }
.rex-topnav-link.active {
  background: transparent;
  color: #0C287B;
  font-weight: 700;
}
.rex-topnav-link.active::after {
  content: "";
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: #0C287B;
  transform: none;
}
.rex-topnav-link .mdi { font-size: 18px; color: #0C287B; }
.rex-topbar-icon { color: #0C287B; border-radius: 0; background: transparent; }
.rex-topbar-icon:hover,
.rex-topbar-icon.active { color: #0C287B; background: transparent; }
.rex-topbar-avatar {
  border-color: #0C287B;
  background: #E7EBF6;
  color: #0C287B;
}
.rex-topbar .nav-profile .nav-link,
.rex-topbar .nav-profile-name,
.rex-topbar .dropdown-toggle::after {
  color: #191C20;
}
.rex-topbar .nav-profile .nav-link {
  font-weight: 600;
  border-radius: 0;
  background: transparent;
}
.rex-topbar .nav-profile .nav-link:hover { background: transparent; color: #0C287B; }
.rex-topbar-menu { color: #0C287B; }
.rex-topbar .rex-topbar-add {
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  background: #0C287B;
  color: #fff;
  font-weight: 700;
  letter-spacing: 0;
  box-shadow: none;
}
.rex-topbar .rex-topbar-add:hover,
.rex-topbar .rex-topbar-add:focus,
.rex-topbar .rex-topbar-add:active {
  background: #163A9A;
  color: #fff;
  box-shadow: none;
}
.rex-topbar .dropdown-menu {
  border: 1px solid #ebedf2;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
}
.rex-topbar .dropdown-item { min-height: 0; padding: 10px 16px; }
.rex-topbar .dropdown-item:hover,
.rex-topbar .dropdown-item:focus { background: #f8f9fa; }

:focus-visible {
  outline: 2px solid var(--md-primary);
  outline-offset: 2px;
}
.btn:focus-visible, .form-control:focus-visible { outline: none; }

.rex-cycle { margin-top: 20px; }
.rex-cycles {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(12, 40, 123, 0.08);
}
.rex-cycles .rex-cycle-track {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.rex-cycles .rex-cycle-track + .rex-cycle-track { border-top: 1px solid #E6E7F1; }
.rex-cycle-empty {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 20px 14px;
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(ellipse 80% 70% at 50% 0%, rgba(12, 40, 123, 0.16), transparent 64%),
    linear-gradient(180deg, #E7EBF6 0%, #F4F6FC 100%);
}
.rex-cycle-empty-track {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 12px;
}
.rex-cycle-empty-track span {
  position: relative;
  width: 12px;
  height: 12px;
  border: 2px solid #0C287B;
  border-radius: 999px;
  background: #fff;
}
.rex-cycle-empty-track span + span::before {
  content: "";
  position: absolute;
  top: 3px;
  right: 10px;
  width: 22px;
  height: 2px;
  background: #D5DCF0;
}
.rex-cycle-empty-track span:nth-child(2) {
  background: #0C287B;
  box-shadow: 0 0 0 5px rgba(12, 40, 123, 0.12);
}
.rex-cycle-empty-title {
  margin: 0 0 8px;
  color: #0C287B;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}
.rex-cycle-empty-copy {
  max-width: 440px;
  margin: 0 0 14px;
  color: #43474E;
  font-size: 13px;
  line-height: 20px;
}
.rex-cycle-track {
  position: relative;
  display: flex;
  align-items: flex-start;
  padding: 52px 24px 24px 36px;
  overflow-x: auto;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(12, 40, 123, 0.08);
}
.rex-cycle-badge {
  position: absolute;
  top: 0;
  left: 0;
  max-width: calc(100% - 24px);
  margin: 0;
  padding: 6px 12px;
  overflow: hidden;
  border-radius: 12px 0 12px 0;
  background: #E7EBF6;
  color: #0C287B;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rex-cycle-badge span { color: #73777F; font-weight: 500; }
.rex-cycle-badge em {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #0C287B;
  color: #fff;
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.rex-cycle-steps {
  display: flex;
  align-items: flex-start;
  min-width: max-content;
}
.rex-cycle-step { width: 128px; text-align: center; }
.rex-cycle-node {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0 auto;
  border: 2px solid #C3C6D0;
  border-radius: 999px;
  background: #fff;
  color: #fff;
}
.rex-cycle-step.is-done .rex-cycle-node { border-color: #0C287B; background: #0C287B; }
.rex-cycle-step.is-active .rex-cycle-node { border-color: #0C287B; box-shadow: 0 0 0 4px #E7EBF6; }
.rex-cycle-node .mdi { font-size: 14px; line-height: 1; }
.rex-cycle-name {
  margin: 8px 0 0;
  overflow: hidden;
  color: #191C20;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.rex-cycle-name.is-waiting { color: #73777F; }
.rex-cycle-date { margin: 2px 0 0; color: #73777F; font-size: 12px; line-height: 16px; }
.rex-cycle-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: #0C287B;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  cursor: pointer;
}
.rex-cycle-view .mdi { font-size: 14px; }
.rex-cycle-view:hover { text-decoration: underline; }
.rex-cycle-line {
  flex: 0 0 72px;
  height: 2px;
  margin-top: 11px;
  background: #D5DCF0;
}
.rex-cycle-line.is-done { background: #0C287B; }
.rex-cycle-scrim {
  position: fixed;
  inset: 0;
  z-index: 1040;
  background: rgba(0, 0, 0, .32);
  opacity: 0;
  transition: opacity 180ms ease;
}
.rex-cycle-scrim.is-open { opacity: 1; }
.rex-cycle-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  width: min(450px, 100%);
  height: 100%;
  padding: 0;
  overflow: hidden;
  background: #fff;
  box-shadow: -8px 0 28px rgba(12, 40, 123, 0.16);
  transform: translateX(100%);
  transition: transform 180ms ease;
}
.rex-cycle-drawer.is-open { transform: none; }
.rex-cycle-drawer-head {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid #E6E7F1;
}
#cyclePicker:not([hidden]),
#cycleDetails:not([hidden]) {
  flex: 1 1 auto;
  min-height: 0;
  padding: 8px 24px 32px;
  overflow: auto;
}
.rex-cycle-drawer h2 {
  margin: 0;
  width: 100%;
  padding: 0 36px;
  color: #191C20;
  font-size: 22px;
  font-weight: 500;
  line-height: 28px;
  text-align: center;
}
.rex-cycle-close {
  position: absolute;
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
  border: 0;
  background: none;
  color: #191C20;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.rex-cycle-notice {
  margin: 12px 0 0;
  color: #73777F;
  font-size: 14px;
  line-height: 20px;
  text-align: center;
}
.rex-cycle-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  color: #43474E;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 18px;
}
.rex-cycle-eyebrow::before,
.rex-cycle-eyebrow::after {
  content: "";
  width: 28px;
  height: 2px;
  flex: 0 0 28px;
  border-radius: 2px;
  background: #0C287B;
}
.rex-cycle-section {
  margin: 18px 0 10px;
  color: #191C20;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}
#cycleChecklist .rex-cycle-section,
#cycleDocuments .rex-cycle-section { display: flex; align-items: center; gap: 8px; }
#cycleChecklist .rex-cycle-section .mdi,
#cycleDocuments .rex-cycle-section .mdi { color: #0C287B; font-size: 18px; line-height: 1; }
#cycleDocumentList { display: flex; flex-direction: column; gap: 8px; }
.rex-doc-link {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
  color: #191C20;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: none;
}
.rex-doc-link .mdi { color: #0C287B; font-size: 18px; line-height: 1; }
.rex-doc-link:hover { border-color: #0C287B; color: #0C287B; }
#cycleChecklistList { display: flex; flex-direction: column; gap: 8px; }
.rex-check-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
}
.rex-check-item input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #0C287B; }
.rex-check-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rex-check-copy strong,
.rex-check-copy label { color: #191C20; font-size: 14px; font-weight: 600; line-height: 18px; }
.rex-check-copy a { color: #0C287B; font-size: 14px; font-weight: 600; line-height: 18px; text-decoration: underline; }
.rex-check-copy span { color: #73777F; font-size: 12px; line-height: 16px; }
.rex-check-priority {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  line-height: 16px;
}
.rex-check-priority.is-high { background: #FFDAD6; color: #93000A; }
.rex-check-priority.is-medium { background: #E7EBF6; color: #0C287B; }
.rex-check-priority.is-low { background: #EEF0F4; color: #43474E; }
.rex-step-sheet {
  margin-top: 16px;
  padding: 2px 16px 4px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #F7F8FC;
}
.rex-step-sheet .rex-cycle-section { margin: 12px 0 2px; }
.rex-cycle-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin: 0;
  padding: 11px 0;
}
.rex-step-sheet .rex-cycle-info { border-top: 1px solid #E6E7F1; }
.rex-step-sheet .rex-cycle-info[hidden] { display: none; }
.rex-cycle-info span { flex: 0 0 auto; color: #73777F; font-size: 13px; line-height: 20px; }
.rex-cycle-info p { margin: 0; max-width: 62%; color: #191C20; font-size: 14px; font-weight: 600; line-height: 20px; text-align: right; }
.rex-step-status {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: #E7EBF6;
  color: #0C287B !important;
  font-size: 12px !important;
  font-weight: 600;
  line-height: 18px !important;
}
.rex-step-status.is-completed { background: #E7EBF6; }
.rex-step-status.is-skipped,
.rex-step-status.is-pending { background: #EEF0F4; color: #43474E !important; }
.rex-step-form {
  margin-top: 8px;
  padding-top: 4px;
}
.rex-step-divider {
  margin: 20px 0 0;
  border: 0;
  border-top: 1px solid #E6E7F1;
}
.rex-step-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}
.rex-step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
}
.rex-step-btn .mdi { font-size: 18px; line-height: 1; }
.rex-step-btn-primary {
  border: 0;
  background: #0C287B;
  color: #fff;
}
.rex-step-btn-primary:hover,
.rex-step-btn-primary:focus { background: #16358F; color: #fff; }
.rex-step-btn-ghost {
  border: 1px solid #C3C6D0;
  background: #fff;
  color: #191C20;
}
.rex-step-btn-ghost:hover,
.rex-step-btn-ghost:focus { border-color: #0C287B; background: #F4F6FC; color: #0C287B; }
.rex-step-btn-undo {
  border: 1px solid #BA1A1A;
  background: #fff;
  color: #BA1A1A;
}
.rex-step-btn-undo:hover,
.rex-step-btn-undo:focus { background: #FFDAD6; color: #93000A; }
.rex-cycle-alert,
.rex-cycle-undo {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 18px;
}
.rex-cycle-alert { background: #FFDAD6; color: #93000A; }
.rex-cycle-alert strong { display: block; margin-bottom: 4px; }
.rex-cycle-alert p,
.rex-cycle-undo { margin: 0; white-space: pre-wrap; }
.rex-cycle-note:not([hidden]) {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 12px 0 0;
  padding: 8px 10px;
  border: 1px solid #D5DCF0;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 10px rgba(12, 40, 123, 0.05);
}
.rex-cycle-note-mark {
  display: flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #E7EBF6;
  color: #0C287B;
}
.rex-cycle-note-mark .mdi { font-size: 14px; line-height: 1; }
.rex-cycle-note-body { min-width: 0; }
.rex-cycle-note strong {
  display: block;
  margin: 0 0 2px;
  color: #0C287B;
  font-size: 11px;
  font-weight: 600;
  line-height: 14px;
}
.rex-cycle-note p {
  margin: 0;
  color: #43474E;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  white-space: pre-wrap;
}
.rex-cycle-choice {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 100%;
  margin-top: 10px;
  padding: 12px 12px 12px 14px;
  border: 1px solid #E6E7F1;
  border-left-width: 4px;
  border-radius: 12px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.rex-cycle-choice strong { color: #191C20; font-size: 14px; }
.rex-choice-meta { color: #73777F; font-size: 12px; }
.rex-choice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}
.rex-choice-status {
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-style: normal;
  font-weight: 600;
  line-height: 14px;
  letter-spacing: 0.01em;
}
.rex-cycle-choice.is-inprogress {
  border-color: rgba(12, 40, 123, 0.18);
  border-left-color: #0C287B;
  background: rgba(12, 40, 123, 0.06);
}
.rex-cycle-choice.is-inprogress .rex-choice-status { border: 1px solid #0C287B; background: #fff; color: #0C287B; }
.rex-cycle-choice.is-completed {
  border-color: #0C287B;
  background: #E7EBF6;
}
.rex-cycle-choice.is-completed .rex-choice-status { background: #0C287B; color: #fff; }
.rex-cycle-choice.is-skipped {
  border-color: #E6E7F1;
  border-left-color: #73777F;
  background: #F4F5F7;
}
.rex-cycle-choice.is-skipped strong { color: #73777F; text-decoration: line-through; }
.rex-cycle-choice.is-skipped .rex-choice-status { background: #E6E7F1; color: #43474E; }
.rex-cycle-choice.is-pending .rex-choice-status { background: #EEF0F4; color: #43474E; }
.rex-cycle-choice:hover { filter: brightness(0.98); }
.rex-cycle-activity {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid #E6E7F1;
}
.rex-cycle-activity strong { display: block; color: #191C20; font-size: 13px; }
.rex-cycle-activity span,
.rex-cycle-activity p { margin: 2px 0 0; color: #73777F; font-size: 12px; line-height: 16px; }
.rex-cycle-activity a { color: #0C287B; font-size: 12px; font-weight: 600; }
.rex-cycle-drawer .field { margin-top: 12px; }
.rex-cycle-drawer .field label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: #73777F;
  font-size: 12px;
  font-weight: 500;
}
.rex-cycle-drawer .field label .mdi { color: #0C287B; font-size: 16px; line-height: 1; }
.rex-cycle-drawer .field label span { color: #73777F; font-weight: 400; }
.rex-cycle-drawer .field input,
.rex-cycle-drawer .field select,
.rex-cycle-drawer .field textarea {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #C3C6D0;
  border-radius: 12px;
  background: #fff;
  color: #191C20;
  font-size: 14px;
}
.rex-cycle-drawer .field textarea { min-height: 96px; resize: vertical; }
.rex-cycle-drawer .meta { margin: 6px 0 0; color: #73777F; font-size: 12px; }
.rex-step-disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 6px 0 0;
  color: #73777F;
  font-size: 8px;
  line-height: 12px;
}
.rex-step-disclaimer .mdi {
  flex: 0 0 auto;
  margin-top: 1px;
  color: #0C287B;
  font-size: 14px;
  line-height: 1;
}
.rex-extend-card {
  margin-top: 20px;
  padding: 16px;
  border: 1px solid rgba(12, 40, 123, 0.12);
  border-radius: 12px;
  background: rgba(12, 40, 123, 0.06);
}
.rex-extend-card .rex-cycle-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: #0C287B;
}
.rex-extend-card .rex-cycle-section .mdi { font-size: 18px; line-height: 1; }
.rex-extend-card .rex-step-buttons { margin-top: 12px; }
.rex-cycle-extend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.rex-cycle-extend input,
.rex-cycle-extend select {
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #C3C6D0;
  border-radius: 12px;
  background: #fff;
  color: #191C20;
  font-size: 14px;
}
.rex-cycle-undo { background: #F4F6FC; color: #43474E; }

.rex-po-filters { display: flex; flex-wrap: wrap; gap: 8px; }
.rex-po-filters a {
  padding: 6px 12px;
  border: 1px solid #E6E7F1;
  border-radius: 999px;
  background: #fff;
  color: #43474E;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.rex-po-filters a.is-on { border-color: #0C287B; background: #0C287B; color: #fff; }
.rex-po-empty {
  padding: 28px 20px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: linear-gradient(180deg, #E7EBF6 0%, #F4F6FC 100%);
  text-align: center;
}
.rex-po-list { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; }
.rex-po-card {
  display: grid;
  grid-template-columns: auto auto 1fr auto auto;
  gap: 8px 16px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(12, 40, 123, 0.05);
  color: inherit;
  text-decoration: none;
}
.rex-po-card:hover { border-color: #0C287B; color: inherit; }
.rex-po-number { color: #0C287B; font-size: 16px; font-weight: 600; }
.rex-po-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}
.rex-po-status.is-draft { background: #EEF0F4; color: #43474E; }
.rex-po-status.is-submitted { background: #E7EBF6; color: #0C287B; }
.rex-po-status.is-confirmed { background: #0C287B; color: #fff; }
.rex-po-status.is-cancelled { background: #FFDAD6; color: #93000A; }
.rex-po-where, .rex-po-meta { color: #43474E; font-size: 13px; }
.rex-po-where { display: inline-flex; align-items: center; gap: 4px; }
.rex-po-where .mdi { color: #0C287B; }
.rex-po-total { color: #191C20; font-weight: 600; text-align: right; }
.rex-po-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}
.rex-po-steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid #E6E7F1;
  border-radius: 999px;
  background: #fff;
  color: #73777F;
  font-size: 13px;
  font-weight: 600;
}
.rex-po-steps li span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #E6E7F1;
  color: #43474E;
  font-size: 12px;
}
.rex-po-steps li.is-done { border-color: #0C287B; background: rgba(12, 40, 123, 0.06); color: #0C287B; }
.rex-po-steps li.is-done span { background: #0C287B; color: #fff; }
.rex-po-search { position: relative; }
.rex-po-suggest {
  position: absolute;
  z-index: 5;
  top: calc(100% - 4px);
  left: 0;
  right: 0;
  overflow: auto;
  max-height: 220px;
  border: 1px solid #D5DCF0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(12, 40, 123, 0.12);
}
.rex-po-suggest button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #E6E7F1;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.rex-po-suggest button:hover { background: #F4F6FC; }
.rex-po-suggest strong { color: #191C20; font-size: 14px; }
.rex-po-suggest span { color: #73777F; font-size: 12px; }
.rex-po-lines { display: flex; flex-direction: column; gap: 10px; }
.rex-po-lines-empty { margin: 8px 0 0; color: #73777F; font-size: 13px; }
.rex-po-line {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 120px 160px 36px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #F7F8FC;
}
.rex-po-line-name { display: flex; flex-direction: column; min-width: 0; }
.rex-po-line-name strong { color: #191C20; font-size: 14px; }
.rex-po-line-name span { color: #73777F; font-size: 12px; }
.rex-po-line-field { display: flex; flex-direction: column; gap: 4px; margin: 0; color: #43474E; font-size: 12px; font-weight: 600; }
.rex-po-line-field input {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #C3C6D0;
  border-radius: 10px;
  background: #fff;
  color: #191C20;
  font-size: 14px;
}
.rex-po-remove {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 10px;
  background: #FFDAD6;
  color: #93000A;
  cursor: pointer;
}
.rex-po-grand { margin: 12px 0 0; color: #0C287B; font-size: 16px; font-weight: 600; text-align: right; }
.rex-po { display: flex; flex-direction: column; gap: 16px; }
.rex-po-sheet { margin-bottom: 0; }
.rex-po .rex-editor-block,
.rex-po-form .rex-editor-block {
  padding: 16px 18px 18px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(12, 40, 123, 0.06);
}
.rex-po-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0; }
.rex-po-facts div { min-width: 0; }
.rex-po-facts dt { color: #73777F; font-size: 12px; font-weight: 600; }
.rex-po-facts dd { margin: 2px 0 0; color: #191C20; font-size: 14px; font-weight: 600; }
.rex-po-notes { margin: 14px 0 0; color: #43474E; font-size: 14px; line-height: 20px; white-space: pre-wrap; }
.rex-po-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 16px; }
.rex-po-actions form { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.rex-po-actions .btn-outline-danger { border-color: #BA1A1A; color: #BA1A1A; background: #fff; }
.rex-po-actions .btn-outline-danger:hover { background: #FFDAD6; color: #93000A; }
.rex-po-table-wrap { overflow-x: auto; }
.rex-po-table { width: 100%; border-collapse: collapse; }
.rex-po-table th, .rex-po-table td { padding: 10px 8px; border-bottom: 1px solid #E6E7F1; text-align: left; vertical-align: top; }
.rex-po-table th { color: #73777F; font-size: 12px; font-weight: 600; }
.rex-po-table td strong { display: block; color: #191C20; }
.rex-po-table td span { color: #73777F; font-size: 12px; }
.rex-po-events { margin: 0; padding: 0; list-style: none; }
.rex-po-events li { padding: 10px 0; border-top: 1px solid #E6E7F1; }
.rex-po-events li:first-child { border-top: 0; padding-top: 0; }
.rex-po-events strong { display: block; color: #191C20; }
.rex-po-events span, .rex-po-events p { margin: 2px 0 0; color: #73777F; font-size: 12px; }
@media (max-width: 900px) {
  .rex-po-card, .rex-po-line, .rex-po-facts { grid-template-columns: 1fr; }
  .rex-po-total { text-align: left; }
}
.rex-po-create { display: flex; flex-direction: column; gap: 16px; }
.rex-po-create-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 16px;
  align-items: start;
}
.rex-po-create-main { display: flex; flex-direction: column; gap: 16px; }
.rex-po-create .rex-editor-block { margin-bottom: 0; }
.rex-po-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.rex-po-panel-head .rex-editor-label { margin: 0; }
.rex-po-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rex-po-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border: 1px solid #E6E7F1;
  border-radius: 999px;
  background: #F7F8FC;
  color: #73777F;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}
.rex-po-chip > span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #E6E7F1;
  color: #43474E;
  font-size: 12px;
}
.rex-po-chip.is-done,
#poStepProducts.is-done .rex-po-chip {
  border-color: #0C287B;
  background: rgba(12, 40, 123, 0.06);
  color: #0C287B;
}
.rex-po-chip.is-done > span,
#poStepProducts.is-done .rex-po-chip > span { background: #0C287B; color: #fff; }
.rex-po-products-hint { margin: 0 0 12px; color: #43474E; font-size: 13px; line-height: 20px; }
.rex-po-summary {
  position: sticky;
  top: 16px;
  padding: 0 0 16px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(12, 40, 123, 0.06);
  overflow: hidden;
}
.rex-po-summary-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 14px;
  background: linear-gradient(105deg, #071643 0%, #0C287B 70%, #163A9A 100%);
  color: #fff;
}
.rex-po-summary-head .mdi { font-size: 22px; line-height: 1; }
.rex-po-summary-head strong { display: block; font-size: 16px; font-weight: 600; line-height: 22px; }
.rex-po-summary-head span { color: rgba(255, 255, 255, 0.82); font-size: 12px; font-weight: 500; }
.rex-po-summary-facts { display: flex; flex-direction: column; margin: 0; padding: 4px 16px 0; }
.rex-po-summary-facts div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #E6E7F1;
}
.rex-po-summary-facts dt { color: #73777F; font-size: 12px; font-weight: 600; }
.rex-po-summary-facts dd { margin: 0; color: #191C20; font-size: 13px; font-weight: 600; text-align: right; }
.rex-po-summary .field { margin: 12px 16px 0; }
.rex-po-summary .rex-po-grand:not([hidden]) {
  display: block;
  margin: 14px 16px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #0C287B;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  text-align: right;
}
.rex-po-summary-actions { display: flex; flex-direction: column; gap: 8px; margin: 14px 16px 0; }
.rex-po-summary-actions .btn { width: 100%; }
.rex-po-catalog-lock:not([hidden]) {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(12, 40, 123, 0.12);
  border-radius: 12px;
  background: rgba(12, 40, 123, 0.06);
  color: #0C287B;
  font-size: 13px;
  font-weight: 600;
}
.rex-po-catalog-lock .mdi { font-size: 16px; line-height: 1; }
.rex-po-create .rex-po-lines-empty:not([hidden]) {
  margin: 0;
  padding: 18px 16px;
  border: 1px dashed #D5DCF0;
  border-radius: 12px;
  background: #F7F8FC;
  color: #43474E;
  font-size: 13px;
  line-height: 20px;
  text-align: center;
}
.rex-po-catalog:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.rex-po-catalog.is-locked,
.rex-po-temp.is-locked { opacity: 0.45; pointer-events: none; }
.rex-po-temp:not([hidden]) { display: flex; flex-direction: column; gap: 12px; }
.rex-po-temp-kicker { margin: 0; color: #43474E; font-size: 13px; line-height: 20px; }
.rex-po-temp-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 120px 150px;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border: 1px solid rgba(12, 40, 123, 0.12);
  border-radius: 12px;
  background: rgba(12, 40, 123, 0.04);
}
.rex-po-temp-add .field { margin: 0; }
.rex-po-temp-add .btn { grid-column: 1 / -1; justify-self: start; min-height: 40px; }
.rex-po-temp-list { display: flex; flex-direction: column; gap: 8px; }
.rex-po-temp-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 140px 36px;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #F7F8FC;
}
.rex-po-temp-row > div { display: flex; flex-direction: column; min-width: 0; }
.rex-po-temp-row strong { color: #191C20; font-size: 14px; }
.rex-po-temp-row span { color: #73777F; font-size: 12px; }
.rex-po-temp-row label { display: flex; flex-direction: column; gap: 4px; margin: 0; color: #43474E; font-size: 12px; font-weight: 600; }
.rex-po-temp-row input[type="number"] {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #C3C6D0;
  border-radius: 10px;
  background: #fff;
}
.rex-po-product {
  display: flex;
  flex-direction: column;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}
.rex-po-product:hover { border-color: #D5DCF0; }
.rex-po-product.is-selected { border-color: #0C287B; background: rgba(12, 40, 123, 0.05); }
.rex-po-product-pick {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
}
.rex-po-product-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #E7EBF6;
  color: #0C287B;
  font-size: 14px;
  font-weight: 700;
}
.rex-po-product.is-selected .rex-po-product-mark { background: #0C287B; color: #fff; }
.rex-po-product-copy { display: flex; flex-direction: column; min-width: 0; }
.rex-po-product-copy strong { color: #191C20; font-size: 14px; line-height: 18px; }
.rex-po-product-copy span, .rex-po-product-copy em { color: #73777F; font-size: 12px; font-style: normal; line-height: 16px; }
.rex-po-product-pick .mdi-check { color: transparent; font-size: 18px; }
.rex-po-product.is-selected .rex-po-product-pick .mdi-check { color: #0C287B; }
.rex-po-product-fields { display: none; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 12px; }
.rex-po-product.is-selected .rex-po-product-fields { display: grid; }
.rex-po-product-fields label { display: flex; flex-direction: column; gap: 4px; margin: 0; color: #43474E; font-size: 12px; font-weight: 600; }
.rex-po-product-fields input[type="number"] {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #C3C6D0;
  border-radius: 10px;
  background: #fff;
  color: #191C20;
  font-size: 14px;
}
@media (max-width: 991.98px) {
  .rex-po-create-layout { grid-template-columns: 1fr; }
  .rex-po-summary { position: static; }
  .rex-po-panel-head { align-items: flex-start; flex-direction: column; }
  .rex-po-temp-add,
  .rex-po-temp-row { grid-template-columns: 1fr 1fr; }
  .rex-po-temp-add .btn,
  .rex-po-temp-row > div { grid-column: 1 / -1; }
}

.rex-editor { margin-top: 8px; }
.rex-editor-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 18px 20px;
  border-radius: 12px;
  background: linear-gradient(105deg, #071643 0%, #0C287B 62%, #163A9A 100%);
  color: #fff;
}
.rex-editor-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}
.rex-editor-back:hover { color: #fff; text-decoration: underline; }
.rex-editor-bar h1 {
  margin: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 500;
  line-height: 34px;
}
.rex-editor-bar p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  line-height: 20px;
}
.rex-editor-bar-actions,
.rex-editor-save {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.rex-editor-bar .btn.btn-outline-primary {
  border-color: #fff;
  background: transparent;
  color: #fff;
}
.rex-editor-bar .btn.btn-outline-primary:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.rex-editor-bar .btn.btn-primary { background: #fff; color: #0C287B; }
.rex-editor-bar .btn.btn-primary:hover { background: #E7EBF6; color: #0C287B; }
.rex-editor-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #0C287B;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
}
.rex-editor-label .mdi { font-size: 18px; line-height: 1; }
.rex-editor .rex-editor-block {
  margin-bottom: 16px;
  padding: 16px 18px 18px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(12, 40, 123, 0.06);
}
.rex-editor .toggle-card {
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #D5DCF0;
  border-radius: 12px;
  background: rgba(12, 40, 123, 0.06);
}
.rex-editor .toggle-card strong { color: #0C287B; font-size: 15px; }
.rex-editor .toggle-card p { margin: 4px 0 0; color: #43474E; font-size: 13px; font-weight: 400; line-height: 18px; }
.rex-editor .form-grid { grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.rex-editor .field { margin-bottom: 0; }
.rex-editor .field label {
  display: block;
  margin-bottom: 6px;
  color: #43474E;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
}
.rex-editor .field .req { color: #BA1A1A; }
.rex-editor .form-control,
.rex-editor select.form-control,
.rex-editor textarea.form-control {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #C3C6D0;
  border-radius: 12px;
  background: #fff;
  font-size: 14px;
  line-height: 20px;
  letter-spacing: 0;
}
.rex-editor textarea.form-control { min-height: 96px; }
.rex-editor .form-control:focus,
.rex-editor select.form-control:focus,
.rex-editor textarea.form-control:focus {
  border-color: #0C287B;
  box-shadow: 0 0 0 3px rgba(12, 40, 123, 0.12);
}
.rex-editor .price-input span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #C3C6D0;
  border-radius: 12px;
  background: #F4F6FC;
  color: #0C287B;
  font-size: 13px;
  font-weight: 600;
}
.rex-editor .pack-row {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #F7F8FC;
}
.rex-editor .pack-head { margin-bottom: 12px; }
.rex-editor .pack-head label { display: flex; align-items: center; gap: 8px; margin: 0; color: #191C20; font-size: 13px; font-weight: 600; }
.rex-editor-save {
  justify-content: flex-end;
  margin-bottom: 8px;
  padding: 14px 16px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
}
@media (max-width: 767.98px) {
  .rex-editor-bar { flex-direction: column; align-items: stretch; }
  .rex-editor .form-grid { grid-template-columns: 1fr; }
}

/* ── Checklist document cards ─────────────────────────────── */
.rex-cl-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  background: #fff;
  margin-bottom: 8px;
}
.rex-cl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.rex-cl-head strong {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
  color: #1d2939;
}
.rex-cl-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}
.rex-cl-badge .mdi { font-size: 14px; line-height: 1; }
.rex-cl-badge.is-pending { background: #EEF0F4; color: #43474E; }
.rex-cl-badge.is-awaiting { background: #E7EBF6; color: #0C287B; }
.rex-cl-badge.is-submitted { background: #fff; border-color: #C5D0EA; color: #0C287B; }
.rex-cl-badge.is-approved { background: #E7F6EE; color: #027A48; }
.rex-cl-badge.is-rejected { background: #FFDAD6; color: #93000A; }
.rex-cl-current {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #F7F8FC;
}
.rex-cl-current.is-awaiting { border-color: #C5D0EA; background: #F4F6FC; }
.rex-cl-current.is-approved { border-color: #C8E6D4; background: #F3FBF6; }
.rex-cl-current.is-rejected { border-color: #F3C7C3; background: #FFF8F7; }
.rex-cl-current-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.rex-cl-current-marks { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rex-cl-current-top > span:first-child {
  color: #73777F;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rex-cl-version {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 2px 8px;
  border-radius: 999px;
  background: #E7EBF6;
  color: #0C287B;
  font-size: 11px;
  font-weight: 700;
  line-height: 16px;
}
.rex-cl-file {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.rex-cl-file-copy,
.rex-cl-history-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}
.rex-cl-file-copy a,
.rex-cl-history-body a {
  overflow: hidden;
  color: #0C287B;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}
.rex-cl-file-copy a:hover,
.rex-cl-history-body a:hover,
.rex-cl-file-copy a:focus,
.rex-cl-history-body a:focus { text-decoration: underline; }
.rex-cl-file-copy > span,
.rex-cl-history-meta { color: #73777F; font-size: 12px; line-height: 16px; }
.rex-cl-reject-note {
  padding: 8px 12px;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: 12px;
  line-height: 1.5;
}
.rex-cl-upload {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}
.rex-cl-expire {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #344054;
  font-size: 13px;
  font-weight: 500;
}
.rex-cl-expire input,
.rex-cl-expire select {
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  color: #1d2939;
}
.rex-cl-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  align-self: flex-start;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #0c287b;
  border-radius: 10px;
  background: #0c287b;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.rex-cl-upload-btn:hover,
.rex-cl-upload-btn:focus { background: #0a2068; color: #fff; }
.rex-cl-upload-btn:disabled,
.rex-cl-upload-btn.is-locked,
.rex-cl-upload-btn:disabled:hover,
.rex-cl-upload-btn.is-locked:hover,
.rex-cl-upload-btn:disabled:focus,
.rex-cl-upload-btn.is-locked:focus {
  border-color: #E4E7EC;
  background: #E4E7EC;
  color: #667085;
  opacity: 0.85;
  cursor: not-allowed;
  box-shadow: none;
}
.rex-cl-history {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  min-height: 34px;
  margin: 0;
  padding: 0 10px;
  border: 1px solid #E6E7F1;
  border-radius: 10px;
  background: #fff;
  color: #0C287B;
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  text-decoration: none;
  cursor: pointer;
}
.rex-cl-history .mdi { font-size: 18px; line-height: 1; }
.rex-cl-history em { color: #73777F; font-size: 12px; font-style: normal; font-weight: 500; }
.rex-cl-history:hover,
.rex-cl-history:focus,
.rex-cl-history.is-open { border-color: #C5D0EA; background: #F4F6FC; }
.rex-cl-history-panel { display: flex; flex-direction: column; gap: 8px; }
.rex-cl-history-empty { margin: 0; color: #73777F; font-size: 13px; }
.rex-cl-history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.rex-cl-history-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #E6E7F1;
  border-radius: 12px;
  background: #fff;
}
.rex-cl-history-list li.is-latest { border-color: #C5D0EA; background: #F7F8FC; }
.rex-cl-gate-notice {
  padding: 8px 12px;
  border-radius: 8px;
  background: #fef3c7;
  color: #92400e;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 8px;
}

/* ── CRO Document Review ──────────────────────────────────── */
.cro-review-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid #e4e7ec;
  padding-bottom: 2px;
}
.cro-tab {
  padding: 8px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: #667085;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.cro-tab:hover { color: #0c287b; }
.cro-tab.is-active { color: #0c287b; border-bottom-color: #0c287b; }
.cro-review-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.cro-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: #fff;
  color: #344054;
  transition: background .15s;
}
.cro-action-btn:disabled { opacity: .5; cursor: default; }
.cro-approve { border-color: #059669; color: #065f46; }
.cro-approve:hover:not(:disabled) { background: #d1fae5; }
.cro-reject { border-color: #dc2626; color: #991b1b; }
.cro-reject:hover:not(:disabled) { background: #fef2f2; }
.cro-reject-input {
  padding: 5px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 6px;
  font-size: 12px;
  min-width: 180px;
}
.cro-action-link {
  color: #0c287b;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
}
.cro-action-link:hover { text-decoration: underline; }
.cro-dl-link {
  color: #0c287b;
  margin-left: 6px;
  font-size: 16px;
  vertical-align: middle;
}
.cro-dl-link:hover { color: #0a2068; }
.rex-dash-error {
  padding: 10px 14px;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  margin-bottom: 12px;
}
.cro-reg-detail { margin-top: 16px; }
.cro-reg-head { margin-bottom: 20px; }
.cro-reg-head p { color: #667085; font-size: 14px; margin: 4px 0 0; }
.cro-step-card {
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  margin-bottom: 12px;
  overflow: hidden;
}
.cro-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
}
.cro-step-header:hover { background: #f9fafb; }
.cro-step-header h3 { flex: 1; font-size: 14px; font-weight: 600; margin: 0; color: #1d2939; }
.cro-step-progress {
  font-size: 12px;
  font-weight: 600;
  color: #667085;
}
.cro-step-progress-bar {
  width: 80px;
  height: 6px;
  border-radius: 3px;
  background: #e4e7ec;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
}
.cro-step-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: #059669;
  transition: width .3s;
}
.cro-step-body { padding: 0 16px 16px; }
.cro-cl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid #f2f4f7;
  flex-wrap: wrap;
}
.cro-cl-row:first-child { border-top: none; }
.cro-cl-name { flex: 1; font-size: 13px; font-weight: 500; color: #1d2939; }
.cro-cl-name a { color: #0c287b; text-decoration: none; }
.cro-cl-name a:hover { text-decoration: underline; }
.cro-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: 6px;
  border-radius: 9px;
  background: #dc2626;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

.rex-cl-desc { margin: 0; color: #475467; font-size: 13px; line-height: 18px; }
.rex-cl-note { color: #92400e; font-size: 12px; line-height: 16px; }
.rex-cl-file,
.rex-cl-history-list li { flex-wrap: wrap; }
.rex-cl-history-list .rex-cl-badge { margin-left: auto; }

.rex-ws {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  background: #F4F6FC;
  color: #191C20;
}
.rex-ws-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding: 12px 20px;
  border-bottom: 1px solid #E6E7F1;
  background: #fff;
}
.rex-ws-back,
.rex-ws-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  color: #0C287B;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.rex-ws-back .mdi { font-size: 18px; line-height: 1; }
.rex-ws-close { margin-left: auto; color: #191C20; font-size: 28px; line-height: 1; }
.rex-ws-crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin: 0;
  color: #43474E;
  font-size: 13px;
  line-height: 18px;
}
.rex-ws-crumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rex-ws-body { display: flex; flex: 1 1 auto; min-height: 0; }
.rex-ws-rail {
  flex: 0 0 280px;
  width: 280px;
  padding: 16px;
  overflow: auto;
  border-right: 1px solid #E6E7F1;
  background: #fff;
}
.rex-ws-rail-label {
  margin: 4px 0 8px;
  color: #73777F;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.rex-ws-step.is-current { box-shadow: 0 0 0 1px #0C287B; }
.rex-ws-main { flex: 1 1 auto; min-width: 0; padding: 24px 28px 40px; overflow: auto; }
.rex-ws-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.rex-ws-kicker { margin: 0 0 4px; color: #73777F; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.rex-ws-title h2 { margin: 0; color: #191C20; font-size: 28px; font-weight: 600; line-height: 34px; }
.rex-ws-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr); gap: 16px; align-items: start; }
.rex-ws-side { min-width: 0; }
.rex-ws-side > .rex-ws-card:last-child { margin-bottom: 0; }
.rex-ws-docs { position: sticky; top: 0; margin-bottom: 0; max-height: calc(100vh - 112px); overflow: auto; }
.rex-ws-card {
  margin-bottom: 16px;
  padding: 16px 18px 18px;
  border: 1px solid #E6E7F1;
  border-radius: 16px;
  background: #fff;
}
.rex-ws-card > .rex-cycle-section,
.rex-ws-card-head .rex-cycle-section {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.rex-ws-card .rex-cycle-section .mdi { color: #0C287B; font-size: 18px; line-height: 1; }
.rex-ws-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.rex-ws-card-head .rex-cycle-section { margin: 0; }
.rex-ws-count { color: #0C287B; font-size: 12px; font-weight: 600; }
.rex-ws-progress { height: 6px; margin: 10px 0 14px; overflow: hidden; border-radius: 999px; background: #E6E7F1; }
.rex-ws-progress span { display: block; height: 100%; border-radius: inherit; background: #0C287B; }
.rex-ws-empty { margin: 0; color: #73777F; font-size: 14px; }
.rex-ws-refs { margin-top: 16px; }
.rex-ws-refs .rex-cycle-section { display: flex; align-items: center; gap: 8px; }
.rex-ws-refs .rex-doc-link + .rex-doc-link { margin-top: 8px; }
.rex-ws-facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.rex-ws-fact { padding: 10px 12px; border-radius: 12px; background: #F7F8FC; }
.rex-ws-fact span { display: block; color: #73777F; font-size: 12px; line-height: 16px; }
.rex-ws-fact strong { display: block; margin-top: 4px; color: #191C20; font-size: 14px; font-weight: 600; line-height: 20px; }
.rex-ws-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.rex-ws-span { grid-column: 1 / -1; }
.rex-ws .field { margin-top: 12px; }
.rex-ws .field label { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: #73777F; font-size: 12px; font-weight: 500; }
.rex-ws .field label .mdi { color: #0C287B; font-size: 16px; line-height: 1; }
.rex-ws .field input,
.rex-ws .field select,
.rex-ws .field textarea { width: 100%; min-height: 44px; padding: 8px 12px; border: 1px solid #C3C6D0; border-radius: 12px; background: #fff; color: #191C20; font-size: 14px; }
.rex-ws .field textarea { min-height: 96px; resize: vertical; }
.rex-ws .rex-step-disclaimer { font-size: 13px; line-height: 18px; }
.rex-ws .rex-step-buttons { flex-direction: row; }
.rex-ws .rex-step-btn { width: auto; flex: 1; }
.rex-ws .rex-step-btn-primary:disabled,
.rex-ws .rex-step-btn-primary.is-locked,
.rex-ws .rex-step-btn-primary:disabled:hover,
.rex-ws .rex-step-btn-primary.is-locked:hover,
.rex-ws .rex-step-btn-primary:disabled:focus,
.rex-ws .rex-step-btn-primary.is-locked:focus {
  background: #E4E7EC;
  color: #667085;
  opacity: 0.85;
  cursor: not-allowed;
  box-shadow: none;
}
.rex-ws .rex-step-btn.is-busy:disabled {
  background: #0C287B;
  color: #fff;
  opacity: 1;
  cursor: progress;
}
.rex-step-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #F4F6FC;
  color: #3E4A6B;
  font-size: 13px;
  line-height: 18px;
}
.rex-step-hint .mdi { flex: 0 0 auto; color: #0C287B; font-size: 16px; line-height: 18px; }
.rex-file { position: relative; }
.rex-file-native {
  position: absolute;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.rex-ws .field .rex-file-native {
  width: 1px;
  min-height: 0;
  height: 1px;
  padding: 0;
  border: 0;
  background: transparent;
}
.rex-ws .field .rex-file-pick {
  margin-bottom: 0;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}
.rex-ws .field .rex-file-icon .mdi { color: #0C287B; font-size: 22px; }
.rex-file-pick,
.rex-file-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
  padding: 10px 12px;
  border-radius: 12px;
}
.rex-file-pick {
  margin: 0;
  border: 1px dashed #C3C6D0;
  background: #F7F8FC;
  cursor: pointer;
}
.rex-file-pick:hover,
.rex-file-pick:focus-within {
  border-color: #0C287B;
  background: #F4F6FC;
}
.rex-file-card {
  border: 1px solid #C5D0EA;
  background: #fff;
}
.rex-file-icon {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #E7EBF6;
  color: #0C287B;
  font-size: 22px;
}
.rex-file-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.rex-file-copy strong {
  overflow: hidden;
  color: #191C20;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rex-file-copy span { color: #73777F; font-size: 12px; line-height: 16px; }
.rex-file-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 2px; }
.rex-file-change,
.rex-file-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #43474E;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.rex-file-change { padding: 0 8px; }
.rex-file-remove { width: 32px; padding: 0; font-size: 18px; }
.rex-file-change:hover,
.rex-file-change:focus,
.rex-file-remove:hover,
.rex-file-remove:focus { background: #F4F6FC; color: #0C287B; }
.rex-file-change:disabled,
.rex-file-remove:disabled { opacity: 0.5; cursor: not-allowed; }
.rex-file.is-disabled .rex-file-pick,
.rex-file.is-disabled .rex-file-card { opacity: 0.6; }
.rex-file-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  color: #3E4A6B;
  font-size: 12px;
  line-height: 16px;
}
.rex-file-note .mdi { flex: 0 0 auto; color: #0C287B; font-size: 16px; line-height: 16px; }
.rex-ws-extend { background: #F4F6FC; }
.rex-ws-extend .rex-cycle-section { color: #0C287B; }
.rex-ws .rex-cycle-activity:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
@media (max-width: 960px) {
  .rex-ws-body { flex-direction: column; }
  .rex-ws-rail { display: flex; flex: 0 0 auto; gap: 10px; width: 100%; overflow-x: auto; border-right: 0; border-bottom: 1px solid #E6E7F1; }
  .rex-ws-rail-label { flex: 0 0 auto; align-self: center; margin: 0; }
  .rex-ws-step { flex: 0 0 240px; width: 240px; margin-top: 0; }
  .rex-ws-main { padding: 16px; }
  .rex-ws-grid,
  .rex-ws-form-grid { grid-template-columns: 1fr; }
  .rex-ws-docs { position: static; max-height: none; }
  .rex-ws-title h2 { font-size: 22px; line-height: 28px; }
  .rex-ws-crumb { display: none; }
  .rex-ws .rex-step-buttons { flex-direction: column; }
}

.cro-review-tools { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cro-tab-count { display: inline-flex; min-width: 18px; margin-left: 6px; padding: 0 6px; border-radius: 999px; background: #EEF2FF; color: #0C287B; font-size: 11px; line-height: 18px; }
.cro-tab.is-active .cro-tab-count { background: #0C287B; color: #fff; }
.cro-search input { min-width: 280px; padding: 8px 12px; border: 1px solid #D0D5DD; border-radius: 8px; font-size: 13px; }
.cro-crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 14px; color: #667085; font-size: 13px; }
.cro-crumbs button, .cro-crumbs a { border: 0; background: none; padding: 0; color: #0C287B; font: inherit; cursor: pointer; }
.cro-folders { display: flex; flex-direction: column; gap: 12px; }
.cro-folder, .cro-pack { border: 1px solid #E6E7F1; border-radius: 12px; background: #fff; }
.cro-folder.is-nested { background: #F8F9FC; }
.cro-folder-head, .cro-pack-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px 14px; }
.cro-folder-toggle { display: flex; align-items: center; gap: 8px; flex: 1 1 220px; min-width: 0; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: #101828; }
.cro-folder-title { font-weight: 600; }
.cro-folder-meta, .cro-pack-counts, .cro-doc-date, .cro-pack-context { color: #667085; font-size: 12px; }
.cro-folder-badge { padding: 2px 8px; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: 12px; font-weight: 600; }
.cro-folder-open { border: 0; background: none; color: #0C287B; font-size: 12px; font-weight: 600; cursor: pointer; }
.cro-folder-body { display: flex; flex-direction: column; gap: 10px; padding: 0 14px 14px 32px; }
.cro-pack-context { margin: 0 14px 10px; }
.cro-pack-items { list-style: none; margin: 0; padding: 0 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.cro-doc { padding: 12px; border: 1px solid #E6E7F1; border-radius: 10px; background: #fff; }
.cro-doc-main { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.cro-doc-comment { margin: 8px 0 0; color: #92400E; font-size: 12px; }
.cro-pack-wait { margin: 0 0 10px; padding: 8px 12px; border-radius: 8px; background: #FEF3C7; color: #92400E; font-size: 13px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
a.rex-dash-note { color: inherit; text-decoration: none; }
a.rex-dash-note:hover { border-color: #98a2b3; }
.cro-layout-switch { display: inline-flex; overflow: hidden; border: 1px solid #D0D5DD; border-radius: 8px; }
.cro-layout-switch button { border: 0; background: #fff; padding: 8px 12px; color: #344054; font-size: 13px; font-weight: 600; cursor: pointer; }
.cro-layout-switch button.is-active { background: #0C287B; color: #fff; }
.cro-queue-row { cursor: pointer; }
.cro-queue-row:hover td,
.cro-queue-row:focus td { background: #F8F9FC; }
.cro-review-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 8px; }
.cro-preview { position: fixed; inset: 0; z-index: 80; display: flex; justify-content: flex-end; }
.cro-preview-scrim { position: absolute; inset: 0; border: 0; background: rgba(16, 24, 40, 0.45); cursor: pointer; }
.cro-preview-panel { position: relative; display: flex; flex-direction: column; width: min(720px, 100%); height: 100%; background: #fff; box-shadow: -8px 0 24px rgba(16, 24, 40, 0.16); }
.cro-preview-panel header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid #E6E7F1; }
.cro-preview-panel header strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cro-preview-panel header a,
.cro-preview-panel header button { border: 0; background: none; color: #0C287B; font-weight: 600; cursor: pointer; }
.cro-preview-panel iframe,
.cro-preview-panel img { flex: 1; width: 100%; min-height: 0; border: 0; object-fit: contain; background: #F8F9FC; }
@media (max-width: 800px) {
  .cro-search input { min-width: 0; width: 100%; }
  .cro-folder-body { padding-left: 14px; }
  .cro-detail { width: 100%; }
}

.cro-review .rex-task-metrics,
.cro-company-page .rex-task-metrics { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 16px; }
.cro-company-page .rex-task-metric:not(a) { cursor: default; }
a.rex-task-metric:hover { border-color: #0C287B; }
.cro-review-board { margin-bottom: 16px; }
.cro-review-board .rex-tasks-toolbar { align-items: center; }
.cro-review-board .rex-tasks-search input { min-width: 280px; padding-left: 38px; }
.cro-filter-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 24px 16px; }
.cro-filter-chips button { border: 1px solid #D0D5DD; border-radius: 999px; background: #F4F6FC; color: #0C287B; padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; }
.cro-filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin-top: 20px; }
.cro-filter-grid label, .cro-review-presets label { display: flex; flex-direction: column; gap: 6px; color: #344054; font-size: 12px; font-weight: 600; }
.cro-filter-grid input, .cro-filter-grid select, .cro-review-presets input, .cro-dialog-reason textarea { box-sizing: border-box; width: 100%; height: 44px; margin: 0; padding: 0 14px; border: 1px solid #D0D5DD; border-radius: 8px; background: #fff; color: #101828; font: inherit; font-weight: 500; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); }
.cro-dialog-reason textarea { height: auto; padding: 10px 14px; }
.cro-review-presets { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 18px; }
.cro-preset { display: inline-flex; overflow: hidden; border: 1px solid #D0D5DD; border-radius: 999px; background: #fff; }
.cro-preset button { border: 0; background: none; padding: 6px 10px; color: #0C287B; font-size: 12px; font-weight: 600; cursor: pointer; }
.cro-attention { display: flex; flex-wrap: wrap; gap: 4px; }
.cro-attention em { padding: 2px 8px; border-radius: 999px; font-size: 11px; font-style: normal; font-weight: 700; }
.cro-attention em.is-cancelled { background: #FEE4E2; color: #B42318; }
.cro-attention em.is-submitted { background: #FEF3C7; color: #92400E; }
.cro-attention em.is-pending { background: #E7EBF6; color: #0C287B; }
button.rex-task-scrim { border: 0; padding: 0; cursor: pointer; }
button.rex-task-close { border: 0; padding: 0; cursor: pointer; font-size: 22px; line-height: 1; }
.cro-doc-modal { z-index: 1000001; }
.cro-filter-modal { z-index: 1000002; }
.cro-decision-modal { z-index: 1000003; }
.cro-preview { z-index: 1000004; }
.cro-detail-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin: 20px 0; }
.cro-detail-facts div { min-width: 0; }
.cro-detail-facts dt { color: #667085; font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.cro-detail-facts dd { margin: 2px 0 0; color: #101828; font-size: 14px; overflow-wrap: anywhere; }
.cro-dialog-reason { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; color: #344054; font-size: 13px; font-weight: 600; }
.cro-dialog-actions, .cro-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.cro-doc-modal h3 { margin: 18px 0 8px; color: #1d2939; font-size: 16px; }
.cro-detail-flag { margin: 0 0 12px; padding: 8px 10px; border-radius: 8px; background: #FEF3C7; color: #92400E; font-size: 13px; }
.cro-detail-wait { color: #667085; font-size: 13px; }
.cro-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cro-timeline li { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid #E6E7F1; border-radius: 10px; }
.cro-timeline li.is-current { border-color: #0C287B; background: #F4F6FC; }
.cro-timeline span, .cro-timeline a { color: #475467; font-size: 12px; }
.cro-timeline em { color: #92400E; font-size: 12px; }
.cro-cl-history-list li.is-current { font-weight: 600; }
@media (max-width: 1100px) {
  .cro-review .rex-task-metrics,
  .cro-company-page .rex-task-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .cro-review .rex-task-metrics,
  .cro-company-page .rex-task-metrics,
  .cro-filter-grid, .cro-detail-facts { grid-template-columns: 1fr; }
  .cro-review-board .rex-tasks-toolbar { flex-direction: column; align-items: stretch; }
  .cro-review-board .rex-tasks-search input { min-width: 0; width: 100%; }
}
