/* ==========================================================================
   ProdHub Hub — app stylesheet
   Loaded by _Layout.cshtml (screen UI). Print documents use print.css.

   01 Tokens        02 Shell (sidebar / topbar / main)
   03 Buttons       04 Forms & controls
   05 Cards / badges / tables
   06 Filters & toolbars
   07 Page chrome   08 Dashboard
   09 Detail / profile
   10 Lists, pager, modals
   11 Activity, combobox, rank, progress, scan
   12 Date range    13 Responsive & print-from-app
   ========================================================================== */

:root {
  --navy-900: #0F1230;       /* sidebar */
  --navy-800: #171B4A;       /* sidebar hover */
  --navy-700: #1B2A6B;       /* brand */
  --navy-600: #233583;       /* brand hover */
  --orange-500: #F2A93B;     /* accent */
  --orange-600: #FF7A00;     /* CTA */
  --bg-app: #F5F6FB;
  --surface: #FFFFFF;
  --border: #E6E8F0;
  --text-900: #161B33;
  --text-600: #6B7280;
  --text-400: #9AA1B1;
  --success: #1FAE71;
  --success-bg: #E7F8F1;
  --danger: #E5484D;
  --danger-bg: #FDECEC;
  --warn-bg: #FFF3E0;
  --sidebar-w: 264px;
  --font-primary: 'Google Sans Flex', sans-serif;
  --control-h: 38px;
  --control-font: .84rem;
  --control-radius: 8px;
  --control-px: .75rem;
}

* {
  box-sizing: border-box;
}

body {
  font-family: var(--font-primary);
  background: var(--bg-app);
  color: var(--text-900);
  font-size: 14px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.font-display {
  font-family: var(--font-primary);
}

/* 02a Sidebar */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--navy-900);
  color: #C7CBE8;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, .06);
  transition: transform .25s ease;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 1.15rem 1.25rem;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.sidebar-brand .mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--orange-500), var(--orange-600));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-primary);
  color: #151935;
  font-size: .95rem;
}

.sidebar-brand .title {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
}

.sidebar-brand .sub {
  font-size: .7rem;
  color: #8A90B8;
  letter-spacing: .04em;
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: .75rem .65rem;
}

.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .12);
  border-radius: 10px;
}

.nav-item-link {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .5rem .75rem .5rem 1.9rem;
  border-radius: 4px;
  color: #B7BCE0;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 500;
  margin-bottom: .1rem;
  white-space: nowrap;
}

.nav-item-link i {
  font-size: .95rem;
  width: 16px;
  text-align: center;
  color: #7C82AE;
}

.nav-item-link:hover {
  background: var(--navy-800);
  color: #fff;
}

.nav-item-link:hover i {
  color: var(--orange-500);
}

.nav-item-link.active {
  background: linear-gradient(90deg, rgba(242, 169, 59, .18), rgba(242, 169, 59, .03));
  color: #fff;
  box-shadow: inset 1px 0 0 var(--orange-500);
}

.nav-item-link.active i {
  color: var(--orange-500);
}

.nav-divider {
  height: 1px;
  background: rgba(255, 255, 255, .07);
  margin: .6rem .25rem;
}

.nav-group {
  margin-bottom: .15rem;
}

.nav-group-toggle {
  width: 100%;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .75rem;
  border-radius: 8px;
  margin-bottom: .1rem;
  color: #7B81AD;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.nav-group-toggle:hover {
  color: #E4E6F5;
  background: rgba(255, 255, 255, .04);
}

.nav-group-toggle i {
  font-size: .72rem;
  transition: transform .2s ease;
}

.nav-group-toggle[aria-expanded="true"] {
  color: #C7CBE8;
}

.nav-group-toggle[aria-expanded="true"] i {
  transform: rotate(180deg);
  color: var(--orange-500);
}

.nav-group-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(242, 169, 59, .35);
}

.sidebar-footer {
  padding: .75rem .9rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, .06);
}

/* 02b Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.search-box {
  background: var(--bg-app);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .5rem .9rem;
  display: flex;
  align-items: center;
  gap: .5rem;
  flex: 1;
  max-width: 380px;
}

.search-box input {
  border: 0;
  background: transparent;
  outline: none;
  font-size: .85rem;
  width: 100%;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--text-600);
}

.icon-btn .dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange-600);
  border: 1.5px solid var(--surface);
}

.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--orange-500);
  flex-shrink: 0;
}

.user-menu {
  position: relative;
}

.user-menu-toggle {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .25rem .45rem .25rem .25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.user-menu-toggle:hover,
.user-menu-toggle.show {
  border-color: rgba(27, 42, 107, .18);
  box-shadow: 0 0 0 .15rem rgba(27, 42, 107, .08);
}

.user-menu-toggle::after {
  display: none;
}

.user-menu-text {
  text-align: left;
  line-height: 1.2;
  max-width: 160px;
}

.user-menu-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-sub {
  font-size: .72rem;
  color: var(--text-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-menu-chevron {
  font-size: .72rem;
  color: var(--text-400);
  margin-right: .15rem;
}

.user-menu-dropdown {
  min-width: 240px;
  padding: .45rem;
  border-color: var(--border);
  box-shadow: 0 12px 32px rgba(21, 25, 53, .12);
}

.user-menu-header {
  white-space: normal;
  padding: .55rem .75rem .35rem;
}

.user-menu-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: .55rem;
  border-radius: 8px;
  padding: .55rem .75rem;
  font-size: .84rem;
  font-weight: 500;
}

.user-menu-dropdown .dropdown-item i {
  width: 1rem;
  text-align: center;
  opacity: .85;
}

/* 02c Canvas */
.main-wrap {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-body {
  padding: 1.5rem;
}

.page-title {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--text-900);
}

.breadcrumb-muted {
  font-size: .8rem;
  color: var(--text-400);
}

/* 03 Buttons */
.btn-brand,
.btn-accent,
.btn-outline-brand,
.btn-outline-danger,
.btn-danger,
.btn-light.border {
  font-weight: 600;
}

.btn:not(.btn-close) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: var(--control-h);
  padding-top: 0;
  padding-bottom: 0;
  font-size: var(--control-font);
  border-radius: var(--control-radius);
  white-space: nowrap;
}

.btn.btn-sm,
.btn-sm {
  height: var(--control-h);
  padding-left: .85rem;
  padding-right: .85rem;
}

.btn:not(.btn-close) i,
.form-footer .btn i {
  font-size: .95em;
  line-height: 1;
  margin-right: 0 !important;
}

.btn-brand {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: #fff;
  font-weight: 600;
}

.btn-brand:hover {
  background: var(--navy-600);
  border-color: var(--navy-600);
  color: #fff;
}

.btn-accent {
  background: var(--orange-600);
  border-color: var(--orange-600);
  color: #fff;
  font-weight: 600;
}

.btn-accent:hover {
  background: #e56d00;
  border-color: #e56d00;
  color: #fff;
}

.btn-outline-brand {
  border-color: var(--navy-700);
  color: var(--navy-700);
  font-weight: 600;
}

.btn-outline-brand:hover {
  background: var(--navy-700);
  color: #fff;
}

/* 05 Cards & badges */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.25rem;
}

.stat-card .label {
  font-size: .78rem;
  color: var(--text-600);
  font-weight: 500;
}

.stat-card .value {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 1.5rem;
  margin-top: .15rem;
}

.stat-card .icon-chip {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

.card-surface {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.table-clean thead th {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-400);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
  padding: .85rem 1rem;
  background: #FAFBFD;
}

.table-clean tbody td {
  padding: .85rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  font-size: .86rem;
}

.table-clean tbody tr:last-child td {
  border-bottom: 0;
}

.table-clean tbody tr:hover {
  background: #FCFCFE;
}

.prod-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #EEF0F7;
}

.prod-thumb-ph {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(180deg, #F4EDE4 0%, #E8D5C4 100%);
  color: #8B5A2B;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.badge-status {
  font-weight: 600;
  font-size: .72rem;
  padding: .32rem .6rem;
  border-radius: 20px;
}

.badge-active {
  background: var(--success-bg);
  color: var(--success);
}

.badge-info {
  background: rgba(27, 42, 107, .08);
  color: var(--navy-700);
}

.badge-brand {
  background: rgba(242, 169, 59, .15);
  color: #B26A00;
}

.badge-warn {
  background: var(--warn-bg);
  color: #B26A00;
}

.badge-draft {
  background: #EEF0F7;
  color: var(--text-600);
}

.badge-out {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-variant-count {
  background: var(--warn-bg);
  color: #B26A00;
  font-weight: 600;
  font-size: .7rem;
  padding: .25rem .55rem;
  border-radius: 8px;
}

.nav-tabs-brand .nav-link {
  border: 0;
  color: var(--text-600);
  font-weight: 600;
  font-size: .85rem;
  padding: .75rem 1.1rem;
  border-bottom: 2px solid transparent;
}

.nav-tabs-brand .nav-link.active {
  color: var(--navy-700);
  border-bottom-color: var(--orange-600);
  background: transparent;
}

.section-label {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .15rem;
}

.section-hint {
  font-size: .78rem;
  color: var(--text-600);
}

/* 04 Labels */
.form-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-900);
  margin-bottom: .35rem;
}

/* 04 Controls */
.form-control:not(textarea),
.form-select,
.form-control-sm:not(textarea),
.form-select-sm {
  min-height: var(--control-h);
  height: var(--control-h);
  padding-left: var(--control-px);
  padding-right: var(--control-px);
  font-size: var(--control-font);
  border-radius: var(--control-radius);
  border-color: var(--border);
  line-height: 1.25;
}

textarea.form-control,
textarea.form-control-sm {
  height: auto;
  padding: .55rem var(--control-px);
  line-height: 1.45;
}

textarea.form-control {
  min-height: 88px;
}

textarea.form-control-sm {
  min-height: 72px;
}

textarea.form-control-sm[rows="2"] {
  min-height: 64px;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--navy-700);
  box-shadow: 0 0 0 .2rem rgba(27, 42, 107, .12);
}

.input-group .form-control:not(textarea),
.input-group .form-select,
.input-group-sm .form-control:not(textarea),
.input-group-sm .form-select {
  min-height: var(--control-h);
  height: var(--control-h);
}

.input-group-text {
  min-height: var(--control-h);
  height: var(--control-h);
  display: flex;
  align-items: center;
  padding-left: var(--control-px);
  padding-right: var(--control-px);
  font-size: var(--control-font);
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-600);
}

.input-group > :not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.input-group > :not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-group > :first-child {
  border-top-left-radius: var(--control-radius);
  border-bottom-left-radius: var(--control-radius);
}

.input-group > :last-child {
  border-top-right-radius: var(--control-radius);
  border-bottom-right-radius: var(--control-radius);
}

/* 03 Toolbar buttons */
.filter-bar .btn,
.filter-panel .btn,
.filter-actions .btn,
.filter-quick .btn,
.filter-toolbar .btn,
.form-footer .btn,
.data-panel .filter-bar .btn {
  min-height: var(--control-h);
  height: var(--control-h);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-left: .85rem;
  padding-right: .85rem;
  font-size: var(--control-font);
  border-radius: var(--control-radius);
  white-space: nowrap;
}

.filter-quick .btn {
  min-height: calc(var(--control-h) - 4px);
  height: calc(var(--control-h) - 4px);
  padding-left: .7rem;
  padding-right: .7rem;
  font-size: .78rem;
  border-radius: 999px;
}

.card-surface .btn-sm.w-100,
.card-surface form .btn-sm {
  min-height: var(--control-h);
  height: var(--control-h);
}

.media-drop {
  border: 1.5px dashed var(--border);
  border-radius: 12px;
  background: #FAFBFD;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-600);
}

.option-row {
  background: #FAFBFD;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .9rem 1rem;
}

.option-value-pill {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .3rem .7rem .3rem .9rem;
  font-size: .8rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: .15rem;
}

.option-value-pill button {
  border: 0;
  background: transparent;
  color: var(--text-400);
  line-height: 1;
}

.variant-table th {
  font-size: .72rem;
  text-transform: uppercase;
  color: var(--text-400);
  font-weight: 600;
}

.variant-thumb {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #EEF0F7;
  border: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-400);
  font-size: .85rem;
}

/* 13 Responsive */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main-wrap {
    margin-left: 0;
  }
}

/* 06 Filters */
.filter-bar {
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  justify-content: flex-end;
  background: #FAFBFD;
}

.filter-bar .form-control,
.filter-bar .form-select {
  flex: 1 1 160px;
  min-width: 140px;
  max-width: 280px;
  margin: 0;
}

.filter-panel .filter-field .form-control:not(textarea),
.filter-panel .filter-field .form-select {
  width: 100%;
  max-width: none;
}

.filter-panel .filter-field .input-group {
  width: 100%;
  flex-wrap: nowrap;
}

.filter-panel .filter-field .input-group .form-control:not(textarea),
.filter-panel .filter-field .input-group .form-select {
  width: 1%;
  flex: 1 1 auto;
  min-width: 0;
}

/* 06b Filter panel */
.filter-panel {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #FAFBFD 0%, #fff 100%);
}

.filter-panel-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  margin-bottom: .85rem;
}

.filter-panel-title {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-400);
  display: flex;
  align-items: center;
  gap: .4rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: .75rem;
  align-items: end;
}

.filter-grid .filter-field {
  min-width: 0;
}

.filter-grid .filter-span-2 {
  grid-column: span 2;
}

@media (max-width: 767.98px) {
  .filter-grid .filter-span-2 {
    grid-column: span 1;
  }
}

.filter-field label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-600);
  margin-bottom: .3rem;
}

.filter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .85rem;
  padding-top: .85rem;
  border-top: 1px dashed var(--border);
}

.filter-quick {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}

.filter-quick .btn.active {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: #fff;
}

.filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .65rem;
}

.filter-tag {
  font-size: .75rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: rgba(27, 42, 107, .08);
  color: var(--navy-700);
  font-weight: 600;
}

.role-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1rem;
}

.role-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .45rem .85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-600);
  text-decoration: none;
  font-size: .82rem;
  font-weight: 600;
  transition: all .15s ease;
}

.role-filter-chip:hover {
  border-color: var(--navy-700);
  color: var(--navy-700);
}

.role-filter-chip.active {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: #fff;
}

.role-filter-chip .count {
  font-size: .7rem;
  opacity: .85;
  background: rgba(255, 255, 255, .2);
  padding: .1rem .4rem;
  border-radius: 999px;
}

.role-filter-chip:not(.active) .count {
  background: var(--bg-app);
  color: var(--text-600);
}

.role-badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
}

.role-badge-list .badge-status {
  font-size: .68rem;
}

/* 02d Login */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0F1230 0%, #1B2A6B 55%, #F2A93B 160%);
}

.login-card {
  width: 100%;
  max-width: 400px;
  border-radius: 16px;
  border: 1px solid var(--border);
}

.dropdown-menu {
  font-size: .86rem;
  border-radius: 10px;
  border-color: var(--border);
  box-shadow: 0 8px 24px rgba(15, 18, 48, .1);
}

.btn-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.alert-soft {
  border-radius: 10px;
  border: 1px solid var(--border);
}

/* 08 Dashboard */
.dashboard-director .stat-card .unit {
  font-size: .65em;
  font-weight: 500;
  margin-left: 2px;
  opacity: .7;
}

.dashboard-director .stat-card .sub {
  font-size: .72rem;
  color: var(--text-400);
  margin-top: .35rem;
}

.stat-card.compact {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem 1rem;
}

.stat-card.compact .icon-chip {
  width: 40px;
  height: 40px;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.stat-card.compact .stat-body {
  min-width: 0;
  flex: 1;
}

.stat-card.compact .label {
  font-size: .72rem;
  line-height: 1.2;
}

.stat-card.compact .value {
  font-size: 1.28rem;
  margin-top: .1rem;
  line-height: 1.2;
}

.stat-card.compact .hint {
  font-size: .72rem;
  color: var(--text-400);
  margin-top: .25rem;
}

.stat-card.compact.tone-navy .icon-chip {
  background: rgba(27, 42, 107, .08);
  color: var(--navy-700);
}

.stat-card.compact.tone-teal .icon-chip {
  background: rgba(13, 148, 136, .12);
  color: #0F766E;
}

.stat-card.compact.tone-orange .icon-chip {
  background: var(--warn-bg);
  color: var(--orange-600);
}

.stat-card.compact.tone-red .icon-chip {
  background: var(--danger-bg);
  color: var(--danger);
}

.stat-card.compact.tone-gold .icon-chip {
  background: rgba(201, 162, 39, .16);
  color: #A07D12;
}

.stat-card.compact.tone-violet .icon-chip {
  background: rgba(124, 58, 237, .1);
  color: #6D28D9;
}

.stat-card.compact.tone-green .icon-chip {
  background: var(--success-bg);
  color: var(--success);
}

.stat-card.compact.tone-red.is-alert .value { color: var(--danger); }
.stat-card.compact.tone-gold.is-alert .value { color: #A07D12; }
.stat-card.compact.tone-violet.is-alert .value { color: #6D28D9; }

.dashboard-director .delta-badge {
  font-size: .72rem;
  font-weight: 600;
  padding: .15rem .45rem;
  border-radius: 999px;
}

.dashboard-director .delta-badge.up {
  background: var(--success-bg);
  color: var(--success);
}

.dashboard-director .delta-badge.down {
  background: var(--danger-bg);
  color: var(--danger);
}

.dashboard-director .chart-card {
  height: 100%;
}

.dashboard-director .chart-wrap {
  position: relative;
}

.dashboard-director .chart-legend-inline {
  display: flex;
  gap: 1rem;
  font-size: .75rem;
  color: var(--text-600);
}

.dashboard-director .chart-legend-inline .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}

.dashboard-director .alert-list .alert-item {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .65rem .75rem;
  border-radius: 8px;
  margin-bottom: .5rem;
  font-size: .85rem;
  background: var(--bg-app);
  border: 1px solid var(--border);
}

.dashboard-director .alert-list .alert-item.danger {
  background: var(--danger-bg);
  border-color: rgba(229, 72, 77, .2);
  color: #9B1C1C;
}

.dashboard-director .alert-list .alert-item.warn {
  background: var(--warn-bg);
  border-color: rgba(242, 169, 59, .3);
  color: #92400E;
}

.dashboard-director .alert-list .alert-item.info {
  background: rgba(27, 42, 107, .06);
  border-color: rgba(27, 42, 107, .12);
  color: var(--navy-700);
}

.dash-panel {
  padding: 1rem 1.1rem 1.05rem;
  height: 100%;
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .85rem;
}

.dash-panel-count {
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 .4rem;
  border-radius: 999px;
  background: rgba(27, 42, 107, .08);
  color: var(--navy-700);
  font-size: .72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-panel-link {
  font-size: .78rem;
  font-weight: 600;
  color: var(--navy-700);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.dash-panel-link:hover { color: var(--orange-600); }

.dash-alerts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.dash-alert {
  display: flex;
  align-items: center;
  gap: .7rem;
  padding: .7rem .8rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}

a.dash-alert:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(22, 27, 51, .06);
  color: inherit;
}

.dash-alert-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.dash-alert-text {
  flex: 1;
  min-width: 0;
  font-size: .84rem;
  font-weight: 600;
  line-height: 1.35;
}

.dash-alert-go {
  color: var(--text-400);
  font-size: .85rem;
  flex-shrink: 0;
}

.dash-alert-warn {
  background: var(--warn-bg);
  border-color: rgba(242, 169, 59, .28);
  color: #92400E;
}
.dash-alert-warn .dash-alert-icon { background: rgba(255, 122, 0, .14); color: var(--orange-600); }

.dash-alert-info {
  background: rgba(27, 42, 107, .05);
  border-color: rgba(27, 42, 107, .1);
  color: var(--navy-700);
}
.dash-alert-info .dash-alert-icon { background: rgba(27, 42, 107, .1); color: var(--navy-700); }

.dash-alert-danger {
  background: var(--danger-bg);
  border-color: rgba(229, 72, 77, .22);
  color: #9B1C1C;
}
.dash-alert-danger .dash-alert-icon { background: rgba(229, 72, 77, .12); color: var(--danger); }

.dash-alert-ok {
  background: var(--success-bg);
  border-color: rgba(31, 174, 113, .2);
  color: #0F766E;
}
.dash-alert-ok .dash-alert-icon { background: rgba(31, 174, 113, .16); color: var(--success); }

.dash-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.dash-feed-item {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .7rem;
  padding: .65rem 0;
  border-top: 1px solid var(--border);
}

.dash-feed-item:first-child { border-top: 0; padding-top: 0; }

.dash-feed-mark {
  width: 2rem;
  height: 2rem;
  border-radius: 9px;
  background: #F3F4FA;
  color: var(--navy-700);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}

.dash-feed-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .2rem;
}

.dash-feed-meta time {
  font-size: .72rem;
  color: var(--text-400);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.dash-feed-msg {
  font-size: .82rem;
  color: var(--text-600);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.report-nav-card:hover {
  border-color: var(--navy-700);
  box-shadow: 0 4px 16px rgba(27, 42, 107, .08);
  transform: translateY(-1px);
  transition: all .15s ease;
}

/* 07 Page header */
.page-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .65rem 1rem;
  margin-bottom: 1rem;
}

.page-header-main {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem .65rem;
}

.page-actions form { margin: 0; }

.page-meta {
  display: flex;
  gap: .4rem;
}

.page-meta-item {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  line-height: 1.15;
  min-width: 4.25rem;
  padding: .35rem .65rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
}

.page-meta-label {
  font-size: .62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-400);
}

.page-meta-value {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-900);
  font-variant-numeric: tabular-nums;
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.page-meta-item.variant-brand .page-meta-value { color: var(--navy-700); }
.page-meta-item.variant-success .page-meta-value { color: var(--success); }
.page-meta-item.variant-warn .page-meta-value { color: var(--orange-600); }
.page-meta-item.variant-danger .page-meta-value { color: var(--danger); }
.page-meta-item.variant-neutral .page-meta-value { color: var(--text-600); }

.filter-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: .5rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  background: #FAFBFD;
  justify-content: flex-end;
}

.filter-toolbar .filter-search {
  flex: 0 1 280px;
  min-width: 200px;
  max-width: 360px;
}

.panel-footer-action,
.list-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem .75rem;
  margin-top: .75rem;
}

.list-footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}

.list-footer-primary {
  margin-left: auto;
}

.filter-toolbar .filter-search .input-group {
  width: 100%;
  height: var(--control-h);
  flex-wrap: nowrap;
}

.filter-toolbar .form-select,
.filter-toolbar .form-control {
  height: var(--control-h);
  min-height: var(--control-h);
  font-size: var(--control-font);
  border-radius: var(--control-radius);
}

.filter-toolbar .w-action { width: 168px; flex: 0 0 168px; }
.filter-toolbar .w-actor { width: 148px; flex: 0 0 148px; }
.filter-toolbar .w-date { width: 148px; flex: 0 0 148px; }
.filter-toolbar .w-role { width: 180px; flex: 0 0 180px; }
.filter-toolbar input[type="date"] {
  padding-top: 0;
  padding-bottom: 0;
}

.filter-seg {
  display: inline-flex;
  height: var(--control-h);
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  overflow: hidden;
  background: #fff;
  flex: 0 0 auto;
}

.filter-seg a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 0 .85rem;
  font-size: var(--control-font);
  font-weight: 600;
  color: var(--text-600);
  text-decoration: none;
  border-right: 1px solid var(--border);
  white-space: nowrap;
  line-height: 1;
}

.filter-seg a:last-child { border-right: 0; }

.filter-seg a:hover { color: var(--navy-700); background: rgba(27, 42, 107, .04); }

.filter-seg a.active {
  background: var(--navy-700);
  color: #fff;
}

.filter-toolbar .btn-icon-filter {
  width: auto;
  min-width: var(--control-h);
  height: var(--control-h);
  padding: 0 .85rem;
  border-radius: var(--control-radius);
}

.filter-toolbar-stack {
  justify-content: flex-start;
}

.filter-toolbar-stack .filter-seg-cats {
  flex: 1 1 100%;
  width: 100%;
}

.side-panel {
  padding: 1rem 1.1rem;
}

.side-panel .form-label {
  font-size: .75rem;
  margin-bottom: .25rem;
}

.side-panel .mb-2 {
  margin-bottom: .7rem !important;
}

.code-chip {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--navy-700);
  background: rgba(27, 42, 107, .08);
  border-radius: 6px;
  padding: .15rem .45rem;
  white-space: nowrap;
  max-width: 100%;
}

.contact-line {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .82rem;
  color: var(--text-600);
  line-height: 1.35;
}

.contact-line i {
  color: var(--text-400);
  font-size: .78rem;
}

.profile-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  margin-bottom: 1rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid var(--border);
}

.profile-avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(27, 42, 107, .1);
  color: var(--navy-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .95rem;
  flex-shrink: 0;
}

.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-list li {
  display: grid;
  grid-template-columns: 18px 72px 1fr;
  gap: .45rem;
  align-items: start;
  padding: .4rem 0;
  font-size: .82rem;
  border-bottom: 1px solid #F0F2F7;
}

.info-list li:last-child { border-bottom: 0; }

.info-list i { color: var(--text-400); margin-top: .15rem; }
.info-list span { color: var(--text-400); }
.info-list strong { font-weight: 600; color: var(--text-900); word-break: break-word; }

.contact-cards {
  list-style: none;
  margin: 0 0 .85rem;
  padding: 0;
}

.contact-cards li {
  padding: .65rem 0;
  border-bottom: 1px solid var(--border);
}

.contact-cards li:last-child { border-bottom: 0; }

.contact-cards .contact-line {
  flex-wrap: wrap;
  gap: .65rem;
}

.side-form {
  padding-top: .85rem;
  border-top: 1px dashed var(--border);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem 0;
}

.related-kicker {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-400);
  margin-bottom: .45rem;
}

.related-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.related-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem .55rem;
  padding: .4rem 0;
  border-bottom: 1px solid #F0F2F7;
  font-size: .84rem;
}

.related-list li:last-child { border-bottom: 0; }

.related-list a {
  font-weight: 600;
  color: var(--text-900);
  text-decoration: none;
}

.related-list a:hover { color: var(--navy-700); }

.page-subtitle {
  font-size: .84rem;
  color: var(--text-600);
  margin-top: .25rem;
}

.btn-back {
  height: var(--control-h);
  min-width: var(--control-h);
  padding: 0 .75rem;
  border-radius: var(--control-radius);
  border: 1px solid var(--border);
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  color: var(--text-600);
  flex-shrink: 0;
  text-decoration: none;
  font-size: var(--control-font);
  font-weight: 600;
  white-space: nowrap;
}

.btn-back:hover {
  background: var(--bg-app);
  color: var(--navy-700);
  border-color: var(--navy-700);
}

.data-panel {
  overflow: hidden;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-600);
}

.empty-state-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto .75rem;
  border-radius: 14px;
  background: var(--bg-app);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--text-400);
}

.empty-state-text {
  margin-bottom: .75rem;
  font-size: .88rem;
}

/* 09 Detail & movement forms */
.form-page .form-card {
  max-width: 760px;
}

.movement-form .form-card {
  max-width: none;
}

.movement-hint {
  background: linear-gradient(180deg, #FAFBFD 0%, #fff 100%);
  border-left: 3px solid var(--orange-500);
}

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

.detail-item .detail-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-400);
  margin-bottom: .2rem;
}

.detail-item .detail-value {
  font-size: .92rem;
  color: var(--text-900);
}

.detail-item.detail-span-2 {
  grid-column: span 2;
}

tr.row-click {
  cursor: pointer;
}

.movement-line-table .form-select-sm,
.movement-line-table .form-control-sm {
  min-width: 110px;
}

.movement-line-table td {
  vertical-align: middle;
  padding: .45rem .5rem;
}

tr.row-click:hover td {
  background: rgba(27, 42, 107, .03);
}

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

  .detail-item.detail-span-2 {
    grid-column: span 1;
  }
}

.form-section + .form-section {
  margin-top: 1rem;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* 10 Pager */
.pagination-brand .page-link {
  border-radius: 8px;
  margin: 0 2px;
  border-color: var(--border);
  color: var(--text-600);
  font-weight: 500;
  min-width: 34px;
  text-align: center;
}

.pagination-brand .page-item.active .page-link {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: #fff;
}

.pagination-brand .page-item.disabled .page-link {
  opacity: .45;
}

.pager-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border-top: 1px solid var(--border);
  background: #FAFBFD;
  border-radius: 0 0 14px 14px;
}

.pager-bar .pager-info {
  font-size: .8rem;
  color: var(--text-600);
}

/* 10b Modals */
.modal-delete .modal-content {
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.modal-delete .modal-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--danger-bg);
  color: var(--danger);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: .75rem;
}

.modal-delete .modal-body {
  padding: 1.25rem 1.5rem;
}

.modal-delete .modal-footer {
  padding: .75rem 1.5rem 1.25rem;
  background: #FAFBFD;
}

/* 10c Panel alert */
.panel-alert {
  margin: 1rem 1rem 0;
}

/* 10d List stats */
.list-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .75rem;
  margin-bottom: 1.25rem;
}

.list-stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .85rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  transition: box-shadow .15s ease, border-color .15s ease;
}

.list-stat:hover {
  border-color: rgba(27, 42, 107, .2);
  box-shadow: 0 2px 12px rgba(15, 18, 48, .05);
}

.list-stat .stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.list-stat.variant-brand .stat-icon {
  background: rgba(27, 42, 107, .08);
  color: var(--navy-700);
}

.list-stat.variant-success .stat-icon {
  background: var(--success-bg);
  color: var(--success);
}

.list-stat.variant-danger .stat-icon {
  background: var(--danger-bg);
  color: var(--danger);
}

.list-stat.variant-warn .stat-icon {
  background: var(--warn-bg);
  color: var(--orange-600);
}

.list-stat.variant-neutral .stat-icon {
  background: var(--bg-app);
  color: var(--text-600);
}

.list-stat .stat-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-400);
  line-height: 1.2;
}

.list-stat .stat-value {
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--text-900);
}

.list-stat.variant-brand .stat-value { color: var(--navy-700); }
.list-stat.variant-success .stat-value { color: var(--success); }
.list-stat.variant-warn .stat-value { color: var(--orange-600); }
.list-stat.variant-danger .stat-value { color: var(--danger); }
.list-stat.variant-neutral .stat-value { color: var(--text-600); }

/* 05 Tables */
.table-list thead th {
  white-space: nowrap;
}

.table-list .col-code {
  width: 1%;
  min-width: 8.5rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: .8rem;
  letter-spacing: -.01em;
}

.table-list td.col-code .cell-link,
.table-list td.col-code .code-chip {
  white-space: nowrap;
}

.table-list .col-name {
  min-width: 140px;
  max-width: 22rem;
}

.table-list td.col-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-list .col-status {
  width: 130px;
}

.table-list .col-money {
  width: 130px;
  text-align: right !important;
}

.table-list td.col-money {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.table-list .col-num {
  width: 90px;
  text-align: right !important;
}

.table-list td.col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.table-list .col-date {
  width: 110px;
  white-space: nowrap;
}

.table-list .col-actions {
  width: 1%;
  text-align: right !important;
  white-space: nowrap;
}

.table-list .cell-muted {
  color: var(--text-600);
  font-size: .82rem;
}

.table-list .cell-link {
  color: var(--text-900);
  text-decoration: none;
  font-weight: 600;
}

.table-list .cell-link:hover {
  color: var(--navy-700);
}

/* 03b Row actions */
.btn-action {
  width: auto;
  min-width: 0;
  height: 30px;
  padding: 0 .55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-600);
  font-size: .75rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  vertical-align: middle;
  white-space: nowrap;
}

.btn-action i {
  font-size: .85rem;
  line-height: 1;
  margin-right: 0 !important;
}

.btn-action:hover {
  background: var(--bg-app);
  color: var(--navy-700);
  border-color: rgba(27, 42, 107, .25);
}

.btn-action-ok:hover {
  color: var(--success);
  background: var(--success-bg);
  border-color: rgba(31, 174, 113, .3);
}

.review-stars {
  color: #C9A227;
  letter-spacing: .05em;
  font-size: .85rem;
  white-space: nowrap;
}

.review-stars .bi-star {
  color: var(--border);
}

.btn-action-delete {
  color: var(--danger);
}

.btn-action-delete:hover {
  background: var(--danger-bg);
  border-color: rgba(229, 72, 77, .25);
  color: var(--danger);
}

.btn-action-sm {
  height: 30px;
  padding: 0 .55rem;
}

.table-actions {
  white-space: nowrap;
}

.table-actions .btn-action + .btn-action,
.table-actions .btn-action + form,
.table-actions form + .btn-action {
  margin-left: .25rem;
}

.table-actions form {
  display: inline-block;
  margin: 0;
}

/* 11 Activity */
.activity-timeline {
  padding: .25rem 1rem .5rem;
}

.activity-item {
  display: flex;
  gap: .75rem;
  padding: .7rem 0;
  border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
}

.activity-icon.cat-care {
  background: rgba(59, 130, 246, .1);
  color: #2563EB;
}

.activity-icon.cat-pipeline {
  background: var(--warn-bg);
  color: var(--orange-600);
}

.activity-icon.cat-close {
  background: var(--success-bg);
  color: var(--success);
}

.activity-icon.cat-assign {
  background: rgba(27, 42, 107, .08);
  color: var(--navy-700);
}

.activity-body {
  flex: 1;
  min-width: 0;
}

.activity-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-start;
  gap: .35rem .75rem;
  margin-bottom: .25rem;
}

.activity-title {
  font-weight: 600;
  color: var(--text-900);
  text-decoration: none;
}

.activity-title:hover {
  color: var(--navy-700);
}

.activity-time {
  font-size: .75rem;
  color: var(--text-400);
  white-space: nowrap;
}

.activity-meta {
  font-size: .8rem;
  color: var(--text-600);
  margin-bottom: .25rem;
}

.activity-detail {
  font-size: .82rem;
  color: var(--text-600);
  background: var(--bg-app);
  border-radius: 8px;
  padding: .45rem .65rem;
  margin-top: .35rem;
}

/* 11b Combobox */
.combobox {
  position: relative;
  width: 100%;
}

.combobox-input {
  width: 100%;
  padding-right: 2rem;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236B7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right .7rem center;
  background-size: 12px 8px;
}

.combobox-input.is-open {
  border-color: var(--navy-700);
  box-shadow: 0 0 0 .2rem rgba(27, 42, 107, .12);
}

.combobox-menu {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  max-height: 280px;
  overflow: auto;
  margin: 0;
  padding: .35rem;
  list-style: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 18, 48, .12);
  display: none;
}

.combobox-menu.is-open { display: block; }

.combobox-option {
  padding: .5rem .65rem;
  border-radius: 8px;
  font-size: .84rem;
  line-height: 1.35;
  cursor: pointer;
  color: var(--text-900);
}

.combobox-option:hover,
.combobox-option.is-active {
  background: var(--navy-700);
  color: #fff;
}

.combobox-option.is-empty,
.combobox-empty {
  color: var(--text-400);
  font-size: .82rem;
  padding: .55rem .65rem;
  cursor: default;
}

.combobox-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0;
  pointer-events: none;
}

/* 11c SKU rank */
.sku-rank {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.sku-rank-item {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr) auto;
  gap: .55rem .7rem;
  align-items: center;
}

.sku-rank-n {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .02em;
  background: rgba(27, 42, 107, .08);
  color: var(--navy-700);
}

.sku-rank-item:nth-child(1) .sku-rank-n {
  background: var(--orange-600);
  color: #fff;
}

.sku-rank-item:nth-child(2) .sku-rank-n {
  background: #C8CED8;
  color: #2A3148;
}

.sku-rank-item:nth-child(3) .sku-rank-n {
  background: #C9965A;
  color: #fff;
}

.sku-rank-body { min-width: 0; }

.sku-rank-name {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-900);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sku-rank-bar {
  height: 5px;
  margin-top: .38rem;
  border-radius: 99px;
  background: #EEF0F6;
  overflow: hidden;
}

.sku-rank-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy-700), #4A63C7);
}

.sku-rank-item:nth-child(1) .sku-rank-bar > span {
  background: linear-gradient(90deg, var(--orange-500), var(--orange-600));
}

.sku-rank-val {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: .92rem;
  color: var(--navy-700);
  line-height: 1.1;
  text-align: right;
}

.sku-rank-unit {
  display: block;
  margin-top: .12rem;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-400);
  text-align: right;
}

/* 11d Work-order progress */
.wo-progress-meta {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  font-size: .8rem;
  color: var(--text-600);
  margin-bottom: .45rem;
}

.wo-progress {
  height: 8px;
  border-radius: 99px;
  background: #EEF0F6;
  overflow: hidden;
}

.wo-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--navy-700), #4A63C7);
}

/* 11e Scan preview (Hub) */
.scan-preview {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding-top: .85rem;
  margin-top: .85rem;
  border-top: 1px dashed var(--border);
}

.scan-preview .scan-bc {
  height: 42px;
  width: 168px;
  object-fit: contain;
}

.scan-preview .scan-qr {
  width: 72px;
  height: 72px;
}

/* 12 Date range picker */
.drp {
  position: relative;
  flex: 0 0 auto;
}

.drp-trigger {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: var(--control-h);
  height: var(--control-h);
  padding: 0 .85rem;
  border: 1px solid var(--border);
  border-radius: var(--control-radius);
  background: #fff;
  color: var(--text-900);
  font-size: var(--control-font);
  font-weight: 600;
  white-space: nowrap;
  max-width: 280px;
}

.drp-trigger i:first-child {
  color: var(--text-400);
  font-size: .95rem;
}

.drp-trigger .drp-caret {
  margin-left: .15rem;
  font-size: .7rem;
  color: var(--text-400);
}

.drp-trigger:hover,
.drp.is-open .drp-trigger {
  border-color: var(--navy-700);
  color: var(--navy-700);
}

.drp-trigger [data-drp-label] {
  overflow: hidden;
  text-overflow: ellipsis;
}

.drp-pop {
  position: fixed;
  z-index: 1080;
  display: flex;
  width: min(640px, calc(100vw - 2rem));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 18, 48, .12);
  overflow: hidden;
}

.drp-presets {
  width: 168px;
  flex-shrink: 0;
  padding: .55rem 0;
  border-right: 1px solid var(--border);
  background: #FAFBFD;
  display: flex;
  flex-direction: column;
}

.drp-preset {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: .42rem .85rem .42rem 1rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-600);
  position: relative;
}

.drp-preset:hover {
  background: rgba(27, 42, 107, .04);
  color: var(--navy-700);
}

.drp-preset.is-active {
  color: var(--navy-700);
  font-weight: 700;
  background: rgba(27, 42, 107, .06);
}

.drp-preset.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: .35rem;
  bottom: .35rem;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: var(--navy-700);
}

.drp-preset-split {
  height: 1px;
  background: var(--border);
  margin: .35rem .75rem;
}

.drp-ndays {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .75rem .5rem 1rem;
  font-size: .78rem;
  color: var(--text-600);
}

.drp-ndays input {
  width: 48px;
  height: 28px;
  border: 0;
  border-bottom: 1px solid var(--navy-700);
  border-radius: 0;
  text-align: center;
  font-weight: 700;
  color: var(--navy-700);
  font-size: .84rem;
  padding: 0;
  background: transparent;
}

.drp-ndays input:focus {
  outline: none;
}

.drp-main {
  flex: 1;
  min-width: 0;
  padding: .85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.drp-fields {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.drp-field {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  font-size: .84rem;
  font-weight: 600;
  color: var(--text-900);
  padding: 0 .15rem;
  background: transparent;
}

.drp-field:focus {
  outline: none;
  border-bottom-color: var(--navy-700);
}

.drp-field.is-active {
  border-bottom-width: 2px;
  border-bottom-color: var(--navy-700);
}

.drp-dash {
  color: var(--text-400);
}

.drp-cals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}

.drp-cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .45rem;
}

.drp-cal-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-600);
}

.drp-cal-nav {
  display: flex;
  gap: .15rem;
}

.drp-cal-nav button {
  width: 26px;
  height: 26px;
  border: 0;
  background: transparent;
  color: var(--text-400);
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.drp-cal-nav button:hover {
  background: var(--bg-app);
  color: var(--navy-700);
}

.drp-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: .2rem;
}

.drp-week span {
  text-align: center;
  font-size: .65rem;
  font-weight: 600;
  color: var(--text-400);
  padding: .15rem 0;
}

.drp-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.drp-day {
  height: 32px;
  border: 0;
  background: transparent;
  font-size: .78rem;
  color: var(--text-900);
  position: relative;
  z-index: 1;
}

.drp-day.muted {
  color: var(--text-400);
}

.drp-day.in-range {
  background: rgba(27, 42, 107, .08);
}

.drp-day.range-start {
  border-radius: 16px 0 0 16px;
  background: rgba(27, 42, 107, .08);
}

.drp-day.range-end {
  border-radius: 0 16px 16px 0;
  background: rgba(27, 42, 107, .08);
}

.drp-day.range-start.range-end {
  border-radius: 16px;
  background: transparent;
}

.drp-day.is-start span,
.drp-day.is-end span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--navy-700);
  color: #fff;
  font-weight: 700;
}

.drp-day.is-today:not(.is-start):not(.is-end) span {
  font-weight: 700;
  color: var(--navy-700);
}

.drp-day:hover:not(.is-start):not(.is-end) span {
  background: rgba(27, 42, 107, .1);
  border-radius: 50%;
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
}

.drp-footer {
  display: flex;
  justify-content: flex-end;
  gap: .4rem;
  padding-top: .35rem;
  border-top: 1px solid var(--border);
}

@media (max-width: 767.98px) {
  .drp-pop {
    left: 0;
    right: auto;
    flex-direction: column;
    width: min(360px, calc(100vw - 1.5rem));
  }

  .drp-presets {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: .4rem .4rem 0;
  }

  .drp-preset {
    width: auto;
    padding: .3rem .55rem;
  }

  .drp-preset.is-active::before { display: none; }

  .drp-preset-split { display: none; }

  .drp-cals { grid-template-columns: 1fr; }
}

/* 13a Product editor */
.product-editor .pe-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.pe-card-head {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #FAFBFD 0%, #fff 100%);
}

.pe-card-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(27, 42, 107, .08);
  color: var(--navy-700);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pe-card-title {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: .92rem;
}

.pe-card-hint {
  font-size: .75rem;
  color: var(--text-600);
  margin-top: .1rem;
}

.pe-card-body { padding: 1rem 1.1rem 1.15rem; }

.pe-line {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: .5rem;
  align-items: center;
  margin-bottom: .5rem;
}

.pe-line.option-row {
  grid-template-columns: .85fr 1.4fr auto;
}

@media (max-width: 767.98px) {
  .pe-line,
  .pe-line.option-row,
  .pe-media-row {
    grid-template-columns: 1fr;
  }
}

.pe-empty {
  font-size: .82rem;
  color: var(--text-600);
  background: #FAFBFD;
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: .85rem 1rem;
  text-align: center;
}

.pe-opt-panel {
  background: #FAFBFD;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .85rem 1rem 1rem;
}

.pe-opt-row {
  display: grid;
  grid-template-columns: 28px minmax(140px, .9fr) minmax(180px, 1.4fr) auto;
  gap: .55rem;
  align-items: end;
  margin-bottom: .65rem;
}

.pe-opt-num {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(27, 42, 107, .08);
  color: var(--navy-700);
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}

.pe-opt-vals { min-width: 0; }

.variant-combo-cell { min-width: 168px; }

.variant-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  align-items: center;
}

.variant-pill {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: .2rem .55rem .25rem;
  background: #F4F5FA;
  border: 1px solid var(--border);
  border-radius: 8px;
  min-width: 0;
}

.variant-pill-k {
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-400);
  line-height: 1.2;
}

.variant-pill input {
  border: 0;
  background: transparent;
  padding: 0;
  min-width: 4.5rem;
  max-width: 9rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-900);
  outline: none;
}

.variant-default-lab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  cursor: pointer;
}

.pe-table-wrap .variant-table tbody td {
  vertical-align: middle;
  padding: .45rem .55rem;
}

@media (max-width: 767.98px) {
  .pe-opt-row {
    grid-template-columns: 28px 1fr auto;
  }
  .pe-opt-vals { grid-column: 1 / -1; }
}

.pe-table-wrap .variant-table thead th {
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-400);
  background: #FAFBFD;
  white-space: nowrap;
}

.pe-media-row {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: .65rem;
  align-items: center;
  margin-bottom: .65rem;
  padding: .5rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #FAFBFD;
}

.pe-media-preview {
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(180deg, #F4EDE4 0%, #E8D5C4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pe-media-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pe-media-ph {
  color: #8B5A2B;
  font-size: 1.4rem;
}

.pe-media-fields { display: flex; flex-direction: column; gap: .4rem; }

.pe-thumb-box {
  height: 160px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, #F4EDE4 0%, #E8D5C4 100%);
}

.pe-thumb-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pe-thumb-ph {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  color: #8B5A2B;
}

.pe-thumb-ph i { font-size: 1.8rem; }
.pe-thumb-ph span { font-size: .78rem; font-weight: 600; }

.pe-actions {
  display: grid;
  gap: .5rem;
}

@media (min-width: 992px) {
  .product-editor .pe-side {
    position: sticky;
    top: 1rem;
  }
}

/* 13b Hide chrome when printing Hub pages */
@media print {
  .sidebar, header, .main-wrap > header, .filter-panel, .filter-toolbar, .role-filter-chips {
    display: none !important;
  }
  .main-wrap, .page-body { margin: 0 !important; padding: 0 !important; width: 100% !important; }
}