:root {
  --th-bg: #f5f6f8;
  --th-card: #ffffff;
  --th-border: #e8eaee;
  --th-text: #333333;
  --th-muted: #6b7280;
  --th-primary: #2f6fed;
  --th-primary-dark: #1e5a9e;
  --th-primary-soft: #eef4ff;
  --th-green: #008f5d;
  --th-green-hover: #007a50;
  --th-brand-o: #15ad82;
  --th-brand-o-light: #b2d235;
  --th-sidebar-accent: var(--th-brand-o);
  --th-purple: #7c3aed;
  --th-model: #6366f1;
  --th-model-dark: #4f46e5;
  --th-model-soft: #eef2ff;
  --th-orange: #ea580c;
  --th-shadow: 0 1px 0 rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.06);
  --th-sidebar-bg: #eceff3;
  --th-sidebar-active-bg: #e4e8ee;
  --th-sidebar-child-active-bg: #dff5ed;
  --th-topbar-height: 3.75rem;
  --th-app-header-height: var(--th-topbar-height);
  --th-sidebar-width: 260px;
  --th-sidebar-width-collapsed: 72px;
  --th-scrollbar-track: #e8e8e8;
  --th-scrollbar-thumb: #9a9a9a;
  --th-scrollbar-size: 14px;
}

body.th-app {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  background: var(--th-bg);
  color: var(--th-text);
  overflow: hidden;
  height: 100%;
}

.th-app .fw-medium {
  font-weight: 500;
}

.th-app .fw-semibold {
  font-weight: 600;
}

.th-stat-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #4b5563;
  letter-spacing: 0.01em;
  line-height: 1.35;
}

.th-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--th-text);
}

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

.th-app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--th-app-header-height);
  min-height: var(--th-app-header-height);
  max-height: var(--th-app-header-height);
  z-index: 1040;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0 1.25rem;
  background: #fff;
  border-bottom: 1px solid #dfe3ea;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
}

.th-app-header-logo {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-width: max-content;
  line-height: 0;
  color: inherit;
}

.th-app-header-logo:hover,
.th-app-header-logo:focus {
  color: inherit;
  opacity: 0.92;
}

.th-app-header-logo-mark.th-brand-mark--wide {
  width: auto;
  max-width: 15rem;
  display: flex;
  align-items: center;
}

.th-app-header-logo-mark.th-brand-mark--wide img {
  height: auto;
  max-width: 15rem;
  max-height: 3.35rem;
  display: block;
  object-fit: contain;
  object-position: left center;
}

.th-app-shell {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  padding-top: var(--th-app-header-height);
  padding-left: var(--th-sidebar-width);
  box-sizing: border-box;
  overflow: hidden;
  transition: padding-left 0.22s ease;
}

.th-sidebar {
  width: var(--th-sidebar-width);
  height: calc(100vh - var(--th-app-header-height));
  height: calc(100dvh - var(--th-app-header-height));
  max-height: calc(100dvh - var(--th-app-header-height));
  background: var(--th-sidebar-bg);
  border-right: none;
  position: fixed;
  left: 0;
  top: var(--th-app-header-height);
  z-index: 1020;
  overflow: hidden;
  transition: width 0.22s ease;
}

.th-sidebar-nav {
  border-right: 1px solid #d8dde5;
}

.th-sidebar-footer {
  background: var(--th-sidebar-bg);
  border-top-color: #d8dde5 !important;
}

.th-sidebar-collapse-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.65rem;
  width: 100%;
  min-height: 2.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d4dae3;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.th-sidebar-collapse-btn:hover {
  background: #f4f6f9;
  border-color: #cfd4dc;
  color: #334155;
}

.th-sidebar-collapse-icon {
  font-size: 1.125rem;
  flex-shrink: 0;
  color: #64748b;
}

.th-sidebar-collapse-icon--expand {
  display: none;
}

body.th-sidebar-collapsed .th-sidebar-collapse-icon--collapse {
  display: none;
}

body.th-sidebar-collapsed .th-sidebar-collapse-icon--expand {
  display: inline-block;
}

body.th-sidebar-collapsed {
  --th-sidebar-width-current: var(--th-sidebar-width-collapsed);
}

body.th-sidebar-collapsed .th-app-shell {
  padding-left: var(--th-sidebar-width-collapsed);
}

body.th-sidebar-collapsed .th-sidebar {
  width: var(--th-sidebar-width-collapsed);
}

body.th-sidebar-collapsed .th-sidebar-label {
  opacity: 0;
  width: 0;
  max-width: 0;
  min-width: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  flex: 0 0 0;
  white-space: nowrap;
  pointer-events: none;
}

body.th-sidebar-collapsing .th-sidebar-nav-group--wts .th-sidebar-submenu-slide,
body.th-sidebar-collapsed .th-sidebar-nav-group--wts .th-sidebar-submenu-slide,
body.th-sidebar-collapsing .th-sidebar-nav-group--media .th-sidebar-submenu-slide,
body.th-sidebar-collapsed .th-sidebar-nav-group--media .th-sidebar-submenu-slide,
body.th-sidebar-collapsing .th-sidebar-nav-group--admin .th-sidebar-submenu-slide,
body.th-sidebar-collapsed .th-sidebar-nav-group--admin .th-sidebar-submenu-slide {
  grid-template-rows: 0fr !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  visibility: hidden !important;
  transition: none !important;
}

body.th-sidebar-collapsing .th-sidebar-nav-group--wts,
body.th-sidebar-collapsing .th-sidebar-nav-group--media,
body.th-sidebar-collapsing .th-sidebar-nav-group--admin,
body.th-sidebar-collapsed .th-sidebar-nav-group--wts,
body.th-sidebar-collapsed .th-sidebar-nav-group--media,
body.th-sidebar-collapsed .th-sidebar-nav-group--admin,
body.th-sidebar-collapsed .th-sidebar-nav-group--wtb {
  max-height: 2.5rem;
  overflow: visible;
}

body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-wts-toggle] > span,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-media-toggle] > span,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-admin-toggle] > span,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-wtb-toggle] > span,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-wts-toggle] > .badge,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-media-toggle] > .badge,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-admin-toggle] > .badge,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-wtb-toggle] > .badge,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-wts-toggle] > .th-sidebar-badge,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-media-toggle] > .th-sidebar-badge,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-admin-toggle] > .th-sidebar-badge,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-wtb-toggle] > .th-sidebar-badge,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-wts-toggle] > i.th-sidebar-accordion-chevron,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-media-toggle] > i.th-sidebar-accordion-chevron,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-admin-toggle] > i.th-sidebar-accordion-chevron,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-wtb-toggle] > i.th-sidebar-accordion-chevron {
  display: none !important;
}

body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-wts-toggle],
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-media-toggle],
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-admin-toggle],
body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-wtb-toggle] {
  display: flex !important;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 2.5rem;
  min-height: 2.5rem;
  max-height: 2.5rem;
  padding: 0.5rem;
  gap: 0;
  margin: 0 0 0.15rem;
  border-radius: 8px;
  box-sizing: border-box;
}

body.th-sidebar-collapsed .th-sidebar-accordion-toggle--route,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle.is-flyout-open {
  background: var(--th-sidebar-child-active-bg);
  color: var(--th-sidebar-accent);
  box-shadow: inset 3px 0 0 var(--th-sidebar-accent);
}

body.th-sidebar-collapsed .th-sidebar-accordion-toggle--route .th-sidebar-icon,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle.is-flyout-open .th-sidebar-icon {
  color: var(--th-sidebar-accent);
}

body.th-sidebar-collapsed .th-sidebar-accordion-toggle.th-sidebar-wts-pending {
  position: relative;
}

body.th-sidebar-collapsed .th-sidebar-accordion-toggle.th-sidebar-wts-pending::after,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle.th-sidebar-media-pending::after,
body.th-sidebar-collapsed .th-sidebar-accordion-toggle.th-sidebar-admin-pending::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 10px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #f59e0b;
  border: 2px solid var(--th-sidebar-bg);
}

body.th-sidebar-collapsing .th-sidebar-nav {
  overflow: hidden !important;
}

body.th-sidebar-collapsed .th-sidebar-nav {
  overflow: visible !important;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
}

body.th-sidebar-collapsed .th-sidebar {
  overflow: visible;
}

body.th-sidebar-collapsed .th-nav-link {
  justify-content: center;
  width: 100%;
  height: 2.5rem;
  min-height: 2.5rem;
  max-height: 2.5rem;
  margin: 0 0 0.15rem;
  padding: 0.5rem;
  gap: 0;
  border-radius: 8px;
  box-sizing: border-box;
}

body.th-sidebar-collapsed .th-nav-link.active {
  background: var(--th-sidebar-child-active-bg);
  color: var(--th-sidebar-accent);
  box-shadow: inset 3px 0 0 var(--th-sidebar-accent);
}

body.th-sidebar-collapsed .th-nav-link.active .th-sidebar-icon {
  color: var(--th-sidebar-accent);
}

body.th-sidebar-collapsed .th-sidebar-collapse-btn {
  justify-content: center;
  height: 2.5rem;
  min-height: 2.5rem;
  max-height: 2.5rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  box-sizing: border-box;
}

.th-sidebar-nav-slot {
  flex-shrink: 0;
  height: 2.5rem;
  min-height: 2.5rem;
  max-height: 2.5rem;
  padding: 0.5rem 0.75rem;
  box-sizing: border-box;
}

.th-sidebar-flyout {
  position: fixed;
  left: calc(var(--th-sidebar-width-collapsed) + 6px);
  z-index: 1060;
  min-width: 228px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14), 0 2px 8px rgba(15, 23, 42, 0.06);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-4px);
  transition: opacity 0.12s ease, transform 0.12s ease, visibility 0.12s;
  pointer-events: none;
}

.th-sidebar-flyout::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 0;
  width: 14px;
  height: 100%;
}

.th-sidebar-flyout.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

.th-sidebar-flyout-arrow {
  position: absolute;
  left: -6px;
  top: 14px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-left: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  transform: rotate(45deg);
  border-radius: 2px 0 0 0;
}

.th-sidebar-flyout-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem 0.5rem;
  border-bottom: 1px solid #eef1f5;
  background: #f8fafc;
  border-radius: 12px 12px 0 0;
}

#thWtsFlyout .th-sidebar-flyout-head .th-sidebar-icon {
  color: var(--th-brand-o);
}

.th-sidebar-flyout-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.01em;
}

.th-sidebar-flyout-body {
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.th-sidebar-flyout-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  color: #3d4550;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: background 0.12s ease, color 0.12s ease;
}

.th-sidebar-flyout-link-text {
  flex: 1 1 auto;
  min-width: 0;
}

.th-sidebar-flyout-link:hover {
  background: var(--th-sidebar-active-bg);
  color: var(--th-text);
}

.th-sidebar-flyout-link.active {
  background: var(--th-sidebar-child-active-bg);
  color: var(--th-sidebar-accent);
  font-weight: 600;
}

.th-sidebar-flyout-link.active .th-sidebar-icon {
  color: var(--th-sidebar-accent);
}

.th-sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  max-width: 1.125rem;
  padding: 0;
  border-radius: 50%;
  font-size: 0.625rem;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  color: #fff;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.th-sidebar-badge.th-sidebar-badge--wide {
  width: 1.125rem;
  height: 1.125rem;
  min-width: 1.125rem;
  max-width: 1.125rem;
  font-size: 0.5625rem;
}

.th-sidebar-badge--attention {
  background: #f59e0b;
}

.th-sidebar-badge--danger {
  background: #dc2626;
}

.th-sidebar-badge--info {
  background: var(--th-primary);
}

.th-sidebar-badge--model,
.th-sidebar-badge--primary {
  background: var(--th-model);
}

.th-sidebar-nav-text {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex: 1 1 auto;
  min-width: 0;
}

.th-sidebar-nav-text .th-sidebar-label {
  flex: 0 1 auto;
}

.th-sidebar-accordion-toggle .th-sidebar-badge {
  margin-right: 0.1rem;
}

.th-sidebar-flyout-link .th-sidebar-nav-text {
  flex: 1 1 auto;
}

.th-sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: auto;
  scrollbar-color: var(--th-scrollbar-thumb) var(--th-scrollbar-track);
}

.th-main-column {
  min-width: 0;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--th-bg);
  border-left: none;
  box-shadow: none;
}

.th-main-column > main {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: auto;
  scrollbar-color: var(--th-scrollbar-thumb) var(--th-scrollbar-track);
  scroll-padding-bottom: 1.5rem;
}

.th-main-column > main::-webkit-scrollbar,
.th-sidebar-nav::-webkit-scrollbar {
  width: var(--th-scrollbar-size);
  height: var(--th-scrollbar-size);
}

.th-main-column > main::-webkit-scrollbar-track,
.th-sidebar-nav::-webkit-scrollbar-track {
  background: var(--th-scrollbar-track);
}

.th-main-column > main::-webkit-scrollbar-thumb,
.th-sidebar-nav::-webkit-scrollbar-thumb {
  background-color: var(--th-scrollbar-thumb);
  border-radius: 0;
  border: 3px solid var(--th-scrollbar-track);
  background-clip: padding-box;
}

.th-main-column > main::-webkit-scrollbar-thumb:hover,
.th-sidebar-nav::-webkit-scrollbar-thumb:hover {
  background-color: #7a7a7a;
}

.th-main-column > main::-webkit-scrollbar-button,
.th-sidebar-nav::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

.th-main-column > main::-webkit-scrollbar-corner,
.th-sidebar-nav::-webkit-scrollbar-corner {
  background: var(--th-scrollbar-track);
}

.th-brand-mark {
  flex-shrink: 0;
  background: transparent;
}

.th-brand-mark:not(.th-brand-mark--wide) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.th-brand-mark--has-logo {
  background: linear-gradient(145deg, #eef4ff 0%, #dbeafe 55%, #ffffff 100%);
  padding: 0.2rem;
  border: 1px solid rgba(47, 111, 237, 0.12);
}

.th-brand-mark--wide {
  display: block;
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  overflow: visible;
}

.th-brand-mark--wide img {
  max-width: 100%;
  height: auto;
  max-height: 3.25rem;
  margin: 0 auto;
  display: block;
  object-fit: contain;
}

.th-brand-mark--auth.th-brand-mark--wide img {
  width: 100%;
  max-width: var(--th-auth-logo-max-w, 100%);
  height: auto;
  max-height: var(--th-auth-logo-max-h, clamp(4.5rem, 10vh, 5.5rem));
  margin: 0 auto;
}

.th-brand-mark--xl.th-brand-mark--wide img {
  max-height: 4.5rem;
}

.th-brand-mark--lg.th-brand-mark--wide img {
  max-height: 3.5rem;
}

.th-auth-card--gate {
  --th-auth-logo-max-w: 100%;
  --th-auth-logo-max-h: clamp(4.75rem, 11vh, 5.75rem);
  padding: 0.75rem 1.25rem 1.35rem !important;
}

.th-auth-card-brand {
  margin: 0;
  padding: 0;
  border-bottom: none;
}

.th-auth-card--gate .th-auth-card-brand {
  margin-bottom: 0.5rem;
}

.th-auth-card-brand .th-auth-brand-logo,
.th-auth-card-brand .th-auth-brand-logo.th-brand-mark--wide,
.th-auth-card-brand .th-auth-brand-logo.th-brand-mark--auth {
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  overflow: visible;
  line-height: 0;
  text-align: center;
}

.th-auth-card-brand .th-auth-brand-logo img,
.th-auth-card-brand .th-brand-mark--auth img {
  display: block;
  width: 100%;
  max-width: var(--th-auth-logo-max-w);
  height: auto;
  max-height: var(--th-auth-logo-max-h);
  margin: 0 auto;
  object-fit: contain;
  object-position: center center;
  background: transparent;
}

.th-auth-back-role {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: 100%;
  margin: 0.15rem 0 0.4rem !important;
  padding: 0.2rem 0 !important;
  border: 0;
  background: transparent;
  text-align: left;
  text-decoration: none !important;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.3;
  color: #64748b;
  transition: color 0.15s ease;
}

.th-auth-back-role:hover,
.th-auth-back-role:focus-visible {
  text-decoration: none !important;
}

.th-auth-signin-layout--supplier .th-auth-back-role,
.th-auth-signin-layout--buyer .th-auth-back-role,
.th-auth-signin-layout--admin .th-auth-back-role {
  color: var(--th-auth-role) !important;
}

.th-auth-signin-layout--supplier .th-auth-back-role:hover,
.th-auth-signin-layout--supplier .th-auth-back-role:focus-visible,
.th-auth-signin-layout--buyer .th-auth-back-role:hover,
.th-auth-signin-layout--buyer .th-auth-back-role:focus-visible,
.th-auth-signin-layout--admin .th-auth-back-role:hover,
.th-auth-signin-layout--admin .th-auth-back-role:focus-visible {
  color: var(--th-auth-role-dark) !important;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--admin > .th-auth-back-role {
  margin-bottom: 0.55rem !important;
}

.th-auth-role-summary {
  width: 100%;
  margin-bottom: 0 !important;
}

.th-auth-role-summary:not(.th-auth-role-summary--stacked) {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 0.75rem;
  row-gap: 0.15rem;
  align-items: start;
}

.th-auth-role-summary:not(.th-auth-role-summary--stacked) .th-icon-box {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.th-auth-role-summary:not(.th-auth-role-summary--stacked) .th-auth-role-summary__title {
  grid-column: 2;
  grid-row: 1;
}

.th-auth-role-summary:not(.th-auth-role-summary--stacked) .th-auth-role-summary__sub {
  grid-column: 2;
  grid-row: 2;
}

.th-auth-role-summary--stacked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0;
  text-align: center;
}

.th-auth-role-summary--stacked .th-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  margin: 0 0 0.6rem;
  background: linear-gradient(145deg, #a78bfa 0%, #7c3aed 55%, #6d28d9 100%) !important;
}

.th-auth-role-summary--stacked .th-auth-role-summary__title {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 0.15rem;
  width: 100%;
}

.th-auth-role-summary--stacked .th-auth-role-summary__sub {
  line-height: 1.4;
  margin: 0;
  max-width: 16rem;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--admin {
  gap: 0.9rem;
}

.th-auth-card--gate #panel-account.th-auth-signin-layout--admin .th-auth-role-summary--stacked {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

.th-auth-signin-layout--admin > .tab-content {
  margin-top: 0.35rem !important;
}

.th-auth-card--gate.th-auth-card--signup #panel-account .th-auth-role-summary {
  margin-bottom: 1.35rem !important;
}

.th-auth-card--gate.th-auth-card--signup #panel-account > .tab-content {
  margin-top: 1.35rem !important;
}

.th-brand-mark:not(.th-brand-mark--wide) img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.th-brand-mark--sm {
  width: 32px;
  height: 32px;
}

.th-brand-mark--md {
  width: 40px;
  height: 40px;
}

.th-brand-mark--sidebar:not(.th-brand-mark--wide) {
  width: 72px;
  height: 72px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

.th-brand-mark--sidebar.th-brand-mark--wide:not(.th-app-header-logo-mark) {
  width: 100%;
  max-width: 100%;
  height: auto;
  box-shadow: none;
  border-radius: 0;
}

.th-brand-mark--lg:not(.th-brand-mark--wide) {
  width: 80px;
  height: 80px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.18);
}

.th-brand-mark--xl:not(.th-brand-mark--wide) {
  width: 112px;
  height: 112px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.22);
}

.th-brand-mark--lg.th-brand-mark--wide,
.th-brand-mark--xl.th-brand-mark--wide {
  width: auto;
  height: auto;
  max-width: 100%;
  box-shadow: none;
  border-radius: 0;
}

.th-nav-link {
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  height: 2.5rem;
  min-height: 2.5rem;
  max-height: 2.5rem;
  box-sizing: border-box;
  color: #3d4550;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.15s ease, color 0.15s ease;
}

.th-sidebar-label {
  line-height: 1.25;
}

.th-sidebar-icon,
.th-sidebar .th-nav-link > i.bi:not(.th-sidebar-accordion-chevron),
.th-sidebar .th-sidebar-accordion-toggle > i.th-sidebar-icon {
  width: 1.125rem;
  height: 1.125rem;
  font-size: 1.0625rem;
  line-height: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  -webkit-font-smoothing: antialiased;
}

.th-sidebar .th-sidebar-accordion-toggle > i.th-sidebar-icon {
  margin-top: 0;
}

.th-sidebar .th-nav-link.active .th-sidebar-icon {
  color: var(--th-sidebar-accent);
}

.th-sidebar .th-sidebar-accordion-toggle--route > i.th-sidebar-icon {
  color: var(--th-sidebar-accent);
}

.th-sidebar .th-nav-link.text-muted {
  color: #6b7280 !important;
}

.th-sidebar .th-nav-link.text-muted .th-sidebar-icon {
  color: #94a3b8;
}

.th-sidebar .th-nav-link.text-muted:hover {
  color: #4b5563 !important;
}

.th-nav-link:hover {
  background: var(--th-sidebar-active-bg);
  color: var(--th-text);
}

.th-nav-link.active {
  background: var(--th-sidebar-active-bg);
  color: var(--th-sidebar-accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--th-sidebar-accent);
}

.th-nav-link.active:hover {
  background: #eceef2;
  color: var(--th-sidebar-accent);
}

.th-sidebar-nav-group {
  margin-bottom: 0;
  border: none;
  background: transparent;
  border-radius: 0;
  overflow: visible;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.th-sidebar-accordion-toggle[data-th-wts-toggle] .th-sidebar-label--wts,
.th-sidebar-accordion-toggle[data-th-media-toggle] .th-sidebar-label--media,
.th-sidebar-accordion-toggle[data-th-wtb-toggle] .th-sidebar-label--wtb {
  min-width: 0;
}

.th-sidebar-accordion-toggle {
  background: transparent;
  color: #3d4450;
  transition: background 0.15s ease, color 0.15s ease;
}

.th-sidebar-accordion-toggle:hover {
  background: transparent;
  color: var(--th-text);
}

.th-sidebar-accordion-toggle:not(.collapsed) {
  background: transparent;
  color: var(--th-text);
  border-bottom: none;
}

.th-sidebar-accordion-toggle--route:not(:hover) {
  color: #3d4450;
}

.th-sidebar-accordion-toggle:focus-visible {
  outline: 2px solid rgba(47, 111, 237, 0.45);
  outline-offset: 2px;
}

.th-sidebar-accordion-chevron {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  opacity: 0.65;
}

.th-sidebar-accordion-toggle:not(.collapsed) .th-sidebar-accordion-chevron {
  transform: rotate(180deg);
}

.th-sidebar-submenu-slide {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.32s ease;
}

.th-sidebar-submenu-slide.is-open {
  grid-template-rows: 1fr;
}

.th-sidebar-submenu-slide-inner {
  overflow: hidden;
  min-height: 0;
}

.th-sidebar-accordion-panel {
  background: transparent;
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
  margin-bottom: 0;
}

.th-sidebar-accordion-panel .th-nav-link--child {
  padding: 0.45rem 0.5rem 0.45rem 1.15rem;
  font-size: 0.875rem;
  margin: 2px 4px;
  color: #4a5568;
  border-radius: 8px;
  height: auto;
  min-height: 2.25rem;
  max-height: none;
  align-items: flex-start;
  gap: 0.5rem;
}

.th-sidebar-accordion-panel .th-nav-link--child > i.bi {
  margin-top: 0.1rem;
  color: #64748b;
}

.th-sidebar-accordion-panel .th-nav-link--child.active > i.bi {
  color: var(--th-sidebar-accent);
}

.th-sidebar-accordion-panel .th-nav-link--child:hover {
  background: var(--th-sidebar-active-bg);
  color: var(--th-text);
}

.th-sidebar-accordion-panel .th-nav-link--child.active {
  background: var(--th-sidebar-child-active-bg);
  color: var(--th-sidebar-accent);
  font-weight: 600;
  box-shadow: inset 3px 0 0 var(--th-sidebar-accent);
}

.th-sidebar-accordion-panel .th-nav-link--child.active:hover {
  background: #d4f0e6;
  color: var(--th-sidebar-accent);
}

.th-topbar.th-app-header .th-topbar-actions {
  margin-left: auto;
}

.th-topbar-search {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 1 auto;
  width: min(440px, calc(100vw - var(--th-sidebar-width) - 14rem));
  min-width: 280px;
  max-width: 440px;
  padding: 0.45rem 0.85rem;
  background: #f8f9fa;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  box-sizing: border-box;
}

body.th-sidebar-collapsed .th-topbar-search {
  width: min(440px, calc(100vw - var(--th-sidebar-width-collapsed) - 14rem));
}

.th-topbar-search .bi-search {
  color: #94a3b8;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.th-topbar-search .form-control {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
  min-width: 0;
  width: 100%;
  font-size: 0.875rem;
  line-height: 1.35;
}

.th-topbar-search .form-control::placeholder {
  color: #94a3b8;
  opacity: 1;
}

.th-topbar-search .form-control:focus {
  box-shadow: none;
}

.th-table-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.75rem 1rem;
  margin: 0;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 0;
}

.th-table-filter-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
}

.th-table-filter-control {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  height: 2.125rem;
  margin: 0;
  padding: 0 0.65rem;
  font-size: 0.8125rem;
  line-height: 1.25;
  color: var(--th-text);
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  box-sizing: border-box;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.th-table-filter-control--search {
  flex: 1 1 14rem;
  min-width: 11rem;
  max-width: 26rem;
}

.th-table-filter-control--select {
  display: block;
  flex: 0 1 auto;
  min-width: 6.75rem;
  max-width: 9.5rem;
  padding-right: 1.75rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M1.5 5.5 8 11l6.5-5.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.55rem center;
  background-size: 0.65rem;
}

.th-table-filter-control--select.is-placeholder {
  color: #94a3b8;
}

.th-table-filter-control .bi-search {
  color: #94a3b8;
  font-size: 0.875rem;
  flex-shrink: 0;
}

.th-table-filter-input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: inherit;
  line-height: inherit;
  color: inherit;
  box-shadow: none;
}

.th-table-filter-input::placeholder {
  color: #94a3b8;
}

.th-table-filter-input:focus {
  outline: none;
}

.th-table-filter-control:focus-within,
.th-table-filter-control--select:focus {
  border-color: #9ec0ff;
  box-shadow: 0 0 0 2px rgba(47, 111, 237, 0.12);
}

.th-table-filter-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  flex-shrink: 0;
}

.th-table-filter-results {
  font-size: 0.8125rem;
  color: var(--th-muted);
  white-space: nowrap;
}

.th-table-filter-results strong {
  color: var(--th-text);
  font-weight: 600;
}

.th-table-filter-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-shrink: 0;
  height: 2.125rem;
  margin: 0;
  padding: 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1;
  color: var(--th-primary);
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.th-table-filter-clear:hover {
  color: var(--th-primary-dark);
  background: var(--th-primary-soft);
  border-color: #9ec0ff;
}

.th-table-filter-clear .bi {
  font-size: 0.75rem;
}

.th-table-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.75rem 1rem;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
}

.th-wts-table-card > .th-table-pagination,
.th-wtb-table-card > .th-table-pagination,
.th-import-history-card > .th-table-pagination,
.th-notif-page-card > .th-table-pagination,
.th-catalog-attr-card > .catalog-attr-panel > .th-table-pagination {
  border-radius: 0 0 12px 12px;
}

/* Flush footer inside padded cards (no nested inset box) */
.th-card.p-3 > .table-responsive + .th-table-pagination,
.th-card.p-3 > .th-table-pagination:last-child {
  margin-left: -1rem;
  margin-right: -1rem;
  margin-bottom: -1rem;
  width: auto;
  border-radius: 0 0 12px 12px;
}

@media (min-width: 768px) {
  .th-card.p-md-4 > .table-responsive + .th-table-pagination,
  .th-card.p-md-4 > .th-table-pagination:last-child {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    margin-bottom: -1.5rem;
  }
}

.th-table-pagination--empty {
  justify-content: center;
}

.th-table-pagination__info {
  font-size: 0.8125rem;
  color: var(--th-muted);
}

.th-table-pagination__info strong {
  color: var(--th-text);
  font-weight: 600;
}

.th-table-pagination__controls {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.th-table-pagination__btn,
.th-table-pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--th-text);
  background: #fff;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.th-table-pagination__btn:hover:not(:disabled),
.th-table-pagination__page:hover:not(.is-active) {
  background: var(--th-primary-soft);
  border-color: #c7d9fc;
  color: var(--th-primary);
}

.th-table-pagination__btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.th-table-pagination__pages {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0 0.15rem;
}

.th-table-pagination__page.is-active {
  background: var(--th-primary);
  border-color: var(--th-primary);
  color: #fff;
  pointer-events: none;
}

/* Table row visibility: filter + pagination (do not use inline display on data rows) */
.table.th-table tbody tr.th-row-filter-hidden,
.table.th-table tbody tr.th-row-page-hidden {
  display: none !important;
}

.th-topbar-actions {
  gap: 0.4rem;
  margin-left: auto;
  align-items: center;
}

.th-topbar-icon-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #64748b;
  text-decoration: none;
  line-height: 1;
  background: #f4f6f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.th-topbar-icon-btn:hover:not(:disabled),
.th-topbar-icon-btn:focus-visible:not(:disabled) {
  color: #334155;
  background: #eef2f6;
  border-color: #d1d5db;
}

.th-topbar-icon-btn.btn-link {
  --bs-btn-color: #64748b;
  --bs-btn-hover-color: #334155;
}

.th-topbar-icon-btn .th-notify-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  border: 2px solid #f4f6f9;
  box-sizing: content-box;
}

.th-notif-menu {
  width: min(25rem, calc(100vw - 1.5rem));
  max-height: min(28rem, calc(100vh - 5rem));
  overflow: hidden;
  border-radius: 12px;
}

.th-notif-menu-head {
  background: #fafbfc;
}

.th-notif-filter-panel {
  overflow: visible;
}

.th-notif-filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  width: 100%;
}

.th-notif-filter-row .btn {
  width: 100%;
  min-width: 0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.5rem;
  line-height: 1.2;
  white-space: nowrap;
  text-align: center;
  border-color: #94a3b8;
  color: #1e293b;
  background: #fff;
}

.th-notif-filter-row .btn:hover {
  border-color: #64748b;
  background: #f8fafc;
  color: #0f172a;
}

.th-notif-filter-row .btn.active {
  background: var(--th-primary);
  border-color: var(--th-primary);
  color: #fff;
  box-shadow: 0 1px 4px rgba(47, 111, 237, 0.35);
}

.th-notif-list {
  max-height: 16.5rem;
  overflow-y: auto;
}

.th-notif-item {
  display: flex;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.12s ease;
}

.th-notif-item:hover,
.th-notif-item:focus-visible {
  background: #f8fafc;
  color: inherit;
}

.th-notif-item--unread,
a.th-notif-item.th-notif-item--unread {
  background: #eff6ff;
}

.th-notif-item-title {
  display: block;
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.3;
}

.th-notif-item-text {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
  line-height: 1.35;
  margin-top: 0.1rem;
}

.th-notif-item-time {
  display: block;
  font-size: 0.6875rem;
  color: #94a3b8;
  margin-top: 0.2rem;
}

.th-notif-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.th-notif-icon--general { background: #e2e8f0; color: #475569; }
.th-notif-icon--approval { background: #dcfce7; color: #15803d; }
.th-notif-icon--wts { background: #dbeafe; color: #1d4ed8; }
.th-notif-icon--wtb { background: #ffedd5; color: #c2410c; }
.th-notif-icon--matching { background: #ede9fe; color: #6d28d9; }
.th-notif-icon--account { background: #f1f5f9; color: #334155; }

.th-catalog-delete-impact {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

.th-catalog-delete-impact li:last-child {
  margin-bottom: 0 !important;
}

.th-catalog-capacity-picks,
.th-catalog-attr-rule-picks {
  max-height: 9.5rem;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #c5ced8 transparent;
}

.th-catalog-attr-rule-picks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.15rem 0.75rem;
  padding: 0.65rem 0.75rem !important;
  background: #fff !important;
  border: 1px solid #e8ecf1 !important;
}

.th-catalog-attr-rule-picks .form-check {
  margin-bottom: 0;
  min-height: 1.5rem;
  padding-left: 1.65rem;
}

.th-catalog-col-capacities,
.th-catalog-col-grades,
.th-catalog-col-colors,
.th-catalog-col-regions {
  max-width: 11rem;
}

.th-custom-select {
  position: relative;
}

.th-custom-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  background-color: #fff;
}

.th-custom-select-trigger .th-custom-select-value {
  flex: 1;
  min-width: 0;
}

.th-custom-select-trigger .th-custom-select-chevron {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: #94a3b8;
  transition: transform 0.2s ease;
}

.th-custom-select.is-open .th-custom-select-trigger {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(47, 111, 237, 0.15);
}

.th-custom-select.is-open .th-custom-select-chevron {
  transform: rotate(180deg);
}

.th-custom-select-trigger.is-invalid {
  border-color: var(--bs-form-invalid-border-color, #dc3545);
}

.th-custom-select-trigger.is-invalid:focus,
.th-custom-select-trigger.is-invalid:focus-visible,
.th-custom-select.is-open .th-custom-select-trigger.is-invalid {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.th-custom-select-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 1060;
  margin: 0;
  background: #fff;
  border: 1px solid #86b7fe;
  border-top: 1px solid #e8ecf1;
  border-radius: 0 0 0.5rem 0.5rem;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.14);
}

.th-custom-select-list {
  max-height: 11.5rem;
  overflow-y: auto;
  padding: 0.4rem;
  scrollbar-width: thin;
  scrollbar-color: #c5ced8 transparent;
}

.th-custom-select-list::-webkit-scrollbar {
  width: 6px;
}

.th-custom-select-list::-webkit-scrollbar-thumb {
  background: #c5ced8;
  border-radius: 99px;
}

.th-custom-select-list::-webkit-scrollbar-track {
  background: transparent;
}

.th-custom-select-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-radius: 0.375rem;
  font-size: 0.9375rem;
  line-height: 1.35;
  color: #334155;
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease;
}

.th-custom-select-option:hover,
.th-custom-select-option:focus-visible {
  background: #f1f5f9;
  outline: 0;
}

.th-custom-select-option.is-selected {
  color: var(--th-primary);
  font-weight: 600;
  background: var(--th-primary-soft);
}

.th-custom-select-option .bi-check-lg {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 1rem;
  color: var(--th-primary);
  opacity: 0;
}

.th-custom-select-option.is-selected .bi-check-lg {
  opacity: 1;
}

.th-catalog-attr-modal-dialog {
  max-height: calc(100vh - 2rem);
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.th-catalog-attr-modal-dialog .modal-content {
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
}

.th-catalog-attr-modal-dialog form {
  min-height: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.th-catalog-attr-modal-body {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: thin;
  scrollbar-color: #c5ced8 transparent;
}

.th-catalog-attr-modal-body::-webkit-scrollbar {
  width: 6px;
}

.th-catalog-attr-modal-body::-webkit-scrollbar-thumb {
  background: #c5ced8;
  border-radius: 99px;
}

.th-catalog-attr-modal-footer {
  background: #fff;
  border-top: 1px solid #eef1f5;
  padding-top: 0.75rem !important;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.th-catalog-attr-basics {
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #eef1f5;
  margin-bottom: 1rem;
}

.th-catalog-attr-modal-dialog:not(.is-catalog-model) .th-catalog-attr-basics {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.th-catalog-attr-model-rules {
  margin-bottom: 1rem;
}

.th-catalog-attr-rules-head {
  margin-bottom: 0.75rem;
}

.th-catalog-attr-rules-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (max-width: 767.98px) {
  .th-catalog-attr-rules-grid {
    grid-template-columns: 1fr;
  }

  .th-catalog-attr-rule-picks {
    grid-template-columns: 1fr;
  }
}

.th-catalog-attr-rule-card {
  border: 1px solid #e8ecf1;
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: #f8fafc;
  min-width: 0;
}

.th-catalog-attr-rule-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.th-catalog-attr-rule-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--th-primary-soft, rgba(29, 111, 240, 0.1));
  color: var(--th-primary, #1d6ff0);
  font-size: 1rem;
}

.th-catalog-attr-rule-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
}

.th-catalog-attr-rule-actions .btn-link {
  font-size: 0.75rem;
  color: var(--th-primary, #1d6ff0);
}

.th-catalog-attr-meta {
  padding-top: 0.75rem;
  border-top: 1px solid #eef1f5;
}

#modal-catalog-attribute .th-custom-select-panel {
  z-index: 1070;
}

.th-catalog-attr-card .nav-tabs {
  border-bottom-color: #e5e7eb;
}

.th-catalog-attr-card .nav-tabs .nav-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #64748b;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 0.5rem 0.85rem;
}

.th-catalog-attr-card .nav-tabs .nav-link.active {
  color: var(--th-primary, #1d6ff0);
  background: transparent;
  border-bottom-color: var(--th-primary, #1d6ff0);
}

.th-catalog-table-responsive {
  overflow-x: auto;
  overflow-y: hidden;
}

.th-catalog-table {
  table-layout: auto;
  width: 100%;
  min-width: 32rem;
}

.th-catalog-bulk-bar {
  min-height: 2.75rem;
}

.th-profile-photo-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #e8eef8;
  color: #1d4ed8;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}

.table.th-table.th-catalog-table > :not(caption) > * > .th-catalog-col-order,
.table.th-table.th-catalog-table > :not(caption) > * > .th-catalog-col-usage {
  width: 1%;
  white-space: nowrap;
}

.table.th-table.th-catalog-table > :not(caption) > * > .th-catalog-col-actions {
  width: 1%;
  white-space: nowrap;
}

.table.th-table.th-catalog-table > :not(caption) > * > .th-catalog-col-label {
  min-width: 8rem;
}

.table.th-table.th-catalog-table > :not(caption) > * > .th-catalog-col-category {
  min-width: 7rem;
}

.table.th-table.th-catalog-table > :not(caption) > * > .th-catalog-col-status {
  min-width: 6.5rem;
}

.th-catalog-table tbody tr[data-catalog-row].th-row-page-hidden,
.th-catalog-table tbody tr[data-catalog-row].th-row-filter-hidden {
  display: none !important;
}

.th-notif-page-card {
  border-radius: 12px;
}

.th-notif-page-toolbar {
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.th-notif-toolbar-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 1.25rem;
  min-width: 0;
}

.th-notif-tabs {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  margin-bottom: 0;
  padding-bottom: 0;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.th-notif-tabs::-webkit-scrollbar {
  display: none;
}

.th-notif-tabs .nav-item {
  flex-shrink: 0;
}

.th-notif-tabs .nav-link {
  font-size: 0.75rem;
  padding: 0.3rem 0.65rem;
  white-space: nowrap;
}

.th-notif-date-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
  justify-self: end;
  flex-shrink: 0;
}

.th-notif-date-bar__label {
  flex-shrink: 0;
  white-space: nowrap;
}

.th-notif-date-presets {
  display: inline-flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.35rem;
}

.th-notif-date-presets .btn {
  font-size: 0.75rem;
  padding: 0.22rem 0.5rem;
  white-space: nowrap;
}

.th-notif-date-presets .btn.active {
  background: var(--th-primary, #1d6ff0);
  border-color: var(--th-primary, #1d6ff0);
  color: #fff;
}

.th-notif-date-custom {
  display: flex;
  justify-content: flex-end;
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.6rem 0.75rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.th-notif-date-custom__panel {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.65rem;
  max-width: 100%;
}

.th-notif-date-custom__range {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.45rem;
}

.th-notif-date-custom .form-control,
.th-notif-date-custom .flatpickr-input {
  width: 9.25rem;
  max-width: 100%;
}

.th-notif-date-custom__sep {
  white-space: nowrap;
}

.th-date-picker-input {
  cursor: pointer;
  background-color: #fff;
}

.flatpickr-calendar {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
  font-family: Inter, system-ui, sans-serif;
  width: 17.25rem;
  padding: 0.25rem;
}

.flatpickr-months {
  padding: 0.4rem 0.35rem 0.15rem;
}

.flatpickr-current-month {
  font-size: 0.875rem;
  font-weight: 600;
  color: #0f172a;
  padding-top: 0;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-weight: 600;
}

.flatpickr-current-month input.cur-year {
  font-weight: 600;
  color: #0f172a;
}

.flatpickr-weekdays {
  padding: 0.2rem 0 0.35rem;
}

span.flatpickr-weekday {
  font-size: 0.6875rem;
  font-weight: 600;
  color: #64748b;
}

.flatpickr-days {
  padding: 0 0.35rem 0.35rem;
}

.dayContainer {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
}

.flatpickr-day {
  border-radius: 6px;
  font-size: 0.8125rem;
  color: #334155;
  max-width: 2.05rem;
  height: 2.05rem;
  line-height: 2.05rem;
}

.flatpickr-day:hover {
  background: #eff6ff;
  border-color: #eff6ff;
}

.flatpickr-day.today {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected.inRange,
.flatpickr-day.startRange.inRange,
.flatpickr-day.endRange.inRange {
  background: var(--th-primary, #1d6ff0);
  border-color: var(--th-primary, #1d6ff0);
  color: #fff;
  box-shadow: none;
}

.flatpickr-day.today.selected {
  border-color: var(--th-primary, #1d6ff0);
  color: #fff;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #cbd5e1;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  top: 0.45rem;
  padding: 0.2rem;
  border-radius: 6px;
  fill: #64748b;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  background: #f1f5f9;
  fill: #334155;
}

.flatpickr-months .flatpickr-prev-month svg,
.flatpickr-months .flatpickr-next-month svg {
  width: 12px;
  height: 12px;
}

input.flatpickr-input.form-control[readonly] {
  background-color: #fff;
  cursor: pointer;
}

.th-notif-date-custom__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.th-notif-page-toolbar--custom .th-notif-toolbar-top {
  padding-bottom: 0;
}

.th-notif-page-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  padding: 0.85rem 1.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.th-notif-meta__content {
  flex: 1;
  min-width: 0;
}

.th-notif-meta__title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--th-text, #0f172a);
  line-height: 1.4;
}

.th-notif-meta__hint {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.45;
  margin-top: 0.2rem;
}

.th-notif-meta__actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0.5rem;
}

.th-notif-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1;
}

.th-notif-stat__value {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.th-notif-stat__label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.9;
}

.th-notif-stat--unread {
  background: linear-gradient(135deg, #eef4ff 0%, #e0ecff 100%);
  border-color: #c7d9fc;
  color: var(--th-primary, #2f6fed);
  box-shadow: 0 1px 2px rgba(47, 111, 237, 0.08);
}

.th-notif-stat--unread .th-notif-stat__value {
  color: var(--th-primary, #2f6fed);
}

.th-notif-stat--read {
  background: #ecfdf5;
  border-color: #bbf7d0;
  color: #047857;
}

.th-notif-stat--read .bi {
  font-size: 0.9rem;
}

.th-notif-bulk-bar,
.th-table-bulk-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  padding: 0.55rem 1.25rem;
  background: #fafbfc;
}

.th-table-bulk-select,
.th-notif-bulk-select {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  color: #475569;
}

.th-table-bulk-select span {
  white-space: nowrap;
}

.th-col-bulk-check {
  width: 2.75rem;
  padding-left: 1rem !important;
}

.th-col-bulk-check .form-check-input {
  margin: 0;
  cursor: pointer;
}

.th-notif-bulk-select {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  color: #475569;
}

.th-notif-col-check {
  width: 2.75rem;
  padding-left: 1rem !important;
}

.th-notif-col-check .form-check-input {
  margin: 0;
  cursor: pointer;
}

.th-notif-row--unread td.th-notif-col-check {
  box-shadow: none;
}

.th-notif-table-empty {
  padding: 1rem 1.25rem 1.5rem;
}

.th-notif-table-empty .th-panel-empty {
  min-height: 14rem;
  margin: 0;
}

.th-notif-table-wrap--empty .th-notif-table thead {
  opacity: 0.55;
}

.th-notif-tabs .nav-link:not(.active) {
  color: #64748b;
  background: transparent;
}

.th-notif-tabs .nav-link:not(.active):hover {
  color: var(--th-primary, #2f6fed);
  background: rgba(47, 111, 237, 0.06);
}

.th-notif-table-wrap {
  min-height: 22rem;
}

.th-notif-table-wrap.is-loading #notif-page-tbody {
  opacity: 0.55;
  pointer-events: none;
}

.th-notif-table .th-notif-col-type {
  width: 3.25rem;
}

.th-notif-table .th-notif-col-date {
  width: 11.5rem;
  white-space: nowrap;
}

.th-notif-table .th-notif-col-actions {
  width: 5.5rem;
  text-align: right;
}

.th-notif-row--unread {
  background: #f8fbff;
}

.th-notif-row--unread td:nth-child(2) {
  box-shadow: inset 3px 0 0 var(--th-primary, #2f6fed);
}

.th-notif-row__title {
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.35;
  color: inherit;
  text-decoration: none;
}

.th-notif-row__title:hover {
  color: var(--th-primary, #2f6fed);
}

.th-notif-row__body {
  font-size: 0.8125rem;
  color: #64748b;
  line-height: 1.4;
  margin-top: 0.2rem;
}

.th-notif-row__date {
  font-size: 0.8125rem;
  color: #475569;
}

.th-notif-row__date-sub {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.th-notif-row__cat {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}

.th-notif-item-body {
  flex: 1;
  min-width: 0;
}

@media (max-width: 991.98px) {
  .th-notif-toolbar-top {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .th-notif-date-bar {
    justify-self: start;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .th-notif-date-bar::-webkit-scrollbar {
    display: none;
  }

  .th-notif-date-custom__panel {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}

@media (max-width: 575.98px) {
  .th-notif-date-custom {
    justify-content: stretch;
  }

  .th-notif-date-custom__panel {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .th-notif-date-custom__range {
    flex-direction: column;
    align-items: stretch;
  }

  .th-notif-date-custom .form-control {
    width: 100%;
  }

  .th-notif-date-custom__actions {
    justify-content: flex-end;
  }
}

.th-topbar-icon-btn:hover:not(:disabled) .th-notify-dot {
  border-color: #eef2f6;
}

.th-topbar-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 38px;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  margin-left: 0.15rem;
  border: 1px solid #dfe3ea;
  border-radius: 8px;
  background: #fff;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--th-text);
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.th-topbar-user-btn:hover,
.th-topbar-user-btn.show,
.th-topbar-user-btn:focus-visible {
  background: #f4f6f9;
  border-color: #d1d5db;
  color: var(--th-text);
}

.th-topbar-user-btn.dropdown-toggle::after {
  margin-left: 0.2rem;
  border-top: 0.42em solid;
  border-right: 0.38em solid transparent;
  border-left: 0.38em solid transparent;
  vertical-align: 0.2em;
  opacity: 0.65;
}

.th-topbar-user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--th-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.th-topbar-user-avatar--img {
  object-fit: cover;
  display: block;
  background: #e8ecf1;
}

.th-topbar-user-name {
  max-width: 11rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}

.th-topbar-actions .dropdown-menu {
  min-width: 11rem;
  margin-top: 0.35rem;
  font-size: 0.875rem;
}

.th-topbar-actions .dropdown-header {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--th-text);
  padding-bottom: 0.35rem;
}

.th-topbar-actions .dropdown-item {
  padding: 0.45rem 1rem;
}

.th-topbar-actions .dropdown-item .bi {
  opacity: 0.75;
}

.th-topbar-actions .dropdown-item.th-sign-out-item {
  color: var(--bs-danger, #dc3545);
  font-weight: 500;
}

.th-topbar-actions .dropdown-item.th-sign-out-item:hover {
  color: var(--bs-danger, #dc3545);
  background-color: rgba(220, 53, 69, 0.08);
}

.th-topbar-actions .dropdown-item.th-sign-out-item:active,
.th-topbar-actions .dropdown-item.th-sign-out-item:focus-visible {
  color: #fff !important;
  background-color: var(--bs-danger, #dc3545) !important;
}

.th-topbar-actions .dropdown-item.th-sign-out-item:active .bi,
.th-topbar-actions .dropdown-item.th-sign-out-item:focus-visible .bi {
  color: #fff;
  opacity: 1;
}

.th-page-breadcrumb {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--th-muted);
  margin-bottom: 0.35rem;
}

.th-page-breadcrumb a {
  color: var(--th-muted);
  text-decoration: none;
}

.th-page-breadcrumb a:hover {
  color: var(--th-primary);
}

.th-page-title {
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--th-text);
  line-height: 1.2;
}

.th-wts-page-head {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.th-wts-page-head-main {
  min-width: 0;
  flex: 1 1 auto;
}

.th-wts-page-head-tools {
  flex: 0 0 auto;
}

@media (min-width: 768px) {
  .th-wts-page-head {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem 1.5rem;
  }
}

.th-page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.th-page-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.th-page-toolbar-actions {
  justify-content: flex-end;
}

.th-page-toolbar-actions.th-wts-toolbar-actions {
  gap: 0.5rem;
}

.th-btn-outline-muted {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  font-size: 0.8125rem;
  color: #555;
  background: #fff;
  border: 1px solid var(--th-border);
  border-radius: 8px;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.th-btn-outline-muted:hover {
  background: #f7f8fa;
  border-color: #cfd4dc;
}

.th-wts-toolbar-actions .th-btn-wts-toolbar,
.th-wts-toolbar-actions a.th-btn-wts-toolbar,
.th-wts-toolbar-actions button.th-btn-wts-toolbar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.375rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #444;
  background: #fff;
  border: 1px solid var(--th-border);
  border-radius: 8px;
  line-height: 1.25;
  text-decoration: none;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.th-wts-toolbar-actions .th-btn-wts-toolbar:hover,
.th-wts-toolbar-actions a.th-btn-wts-toolbar:hover,
.th-wts-toolbar-actions button.th-btn-wts-toolbar:hover {
  background: #f7f8fa;
  border-color: #cfd4dc;
  color: var(--th-text);
}

.th-import-library-card {
    border: 1px solid var(--th-border, #e2e8f0);
    border-radius: 12px;
    overflow: hidden;
}

.th-import-lib-thumb {
    object-fit: cover;
    background: #f1f5f9;
}

.th-wts-toolbar-actions .th-btn-add-listing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.375rem;
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  color: #fff;
  background: linear-gradient(180deg, #1a56c4 0%, var(--th-primary-dark) 100%);
  border: 1px solid var(--th-primary-dark);
  border-radius: 8px;
  line-height: 1.25;
  box-shadow: 0 1px 3px rgba(23, 74, 143, 0.22);
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.th-wts-toolbar-actions .th-btn-add-listing:hover {
  background: linear-gradient(180deg, #174da8 0%, #163f87 100%);
  border-color: #133774;
  color: #fff;
  box-shadow: 0 2px 6px rgba(23, 74, 143, 0.28);
}

.th-wts-toolbar-actions .th-btn-wts-toolbar {
    white-space: nowrap;
}

.th-import-guide {
    border: 1px solid var(--th-border, #e2e8f0);
    overflow: hidden;
    border-radius: 12px;
}

.th-import-guide-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
    background: #f8fafc;
    padding: 0.75rem 1rem;
    text-align: left;
}

.th-import-guide-summary-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--th-text, #0f172a);
}

.th-import-guide-chevron {
    transition: transform 0.3s ease;
    color: #64748b;
    flex-shrink: 0;
}

#th-import-guide:has(.th-import-guide-panel.is-open) .th-import-guide-chevron {
    transform: rotate(180deg);
}

.th-import-guide-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.32s ease;
}

.th-import-guide-panel.is-open {
    grid-template-rows: 1fr;
}

.th-import-guide-panel-inner {
    overflow: hidden;
    min-height: 0;
    border-top: 0 solid var(--th-border, #e2e8f0);
    transition: border-top-width 0.2s ease;
}

.th-import-guide-panel.is-open .th-import-guide-panel-inner {
    border-top-width: 1px;
    overflow: visible;
}

#th-import-guide:has(.th-import-guide-panel.is-open) {
    overflow: visible;
}

.th-import-guide-table-wrap {
    border-top: 1px solid var(--th-border, #e2e8f0);
}

.th-import-guide-table {
    table-layout: auto;
    width: 100%;
    margin-bottom: 0;
}

.th-import-guide-table .th-import-col-name {
    width: 10.5rem;
}

.th-import-guide-table .th-import-col-req {
    width: 7.25rem;
}

.th-import-guide-table code {
    font-size: 0.85em;
    color: #be185d;
    background: #fdf2f8;
    padding: 0.1em 0.35em;
    border-radius: 4px;
}

.th-import-guide-table th,
.th-import-guide-table td {
    vertical-align: top;
    padding: 0.7rem 1.15rem;
}

.th-import-guide-table thead th:first-child,
.th-import-guide-table tbody td:first-child {
    padding-left: 1.35rem;
    white-space: nowrap;
}

.th-import-guide-table thead th:nth-child(2),
.th-import-guide-table tbody td:nth-child(2) {
    padding-left: 1rem;
    padding-right: 1rem;
    white-space: nowrap;
}

.th-import-guide-table thead th:last-child,
.th-import-guide-table tbody td:last-child {
    padding-right: 1.35rem;
}

.th-import-rules-cell {
    line-height: 1.45;
}

.th-import-model-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    width: 100%;
}

.th-import-model-lead {
    font-size: 0.8125rem;
    color: #475569;
    line-height: 1.45;
}

.th-import-models-details {
    width: 100%;
}

.th-import-models-summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--th-primary, #1d6ff0);
    list-style: none;
    user-select: none;
}

.th-import-models-summary::-webkit-details-marker {
    display: none;
}

.th-import-models-summary::before {
    content: '▸';
    display: inline-block;
    margin-right: 0.35rem;
    transition: transform 0.15s ease;
    color: #64748b;
}

.th-import-models-details[open] .th-import-models-summary::before {
    transform: rotate(90deg);
}

.th-import-models-panel {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    border: 1px solid var(--th-border, #e2e8f0);
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}

.th-import-models-list {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: flex-start;
    gap: 0.4rem 0.5rem;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
}

.th-import-models-panel:not(.is-expanded) .th-import-models-list {
    max-height: 4.85rem;
    position: relative;
}

.th-import-models-panel.is-expanded .th-import-models-list {
    max-height: none;
    overflow: visible;
}

.th-import-models-panel:not(.is-expanded) .th-import-models-list::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1.1rem;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0) 0%, #f8fafc 85%);
}

.th-import-models-item {
    margin: 0;
}

.th-import-model-tag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    font-size: 0.75rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    border-radius: 6px;
    background: #fff;
    border: 1px solid #e2e8f0;
    color: #334155;
    line-height: 1.25;
    word-break: break-word;
}

.th-import-models-expand {
    margin-top: 0.4rem;
    font-weight: 600;
    font-size: 0.8125rem;
    text-decoration: none;
}

.th-import-models-expand:hover {
    text-decoration: underline;
}

.th-import-catalog-link {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--th-primary, #1d6ff0);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.th-import-catalog-link:hover {
    color: var(--th-primary-dark, #174a8f);
}

.th-import-req {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
}

.th-import-req--yes {
    color: #1e40af;
}

.th-import-req-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2563eb;
    flex-shrink: 0;
}

.th-import-req--optional {
    color: #94a3b8;
    font-weight: 500;
}

.th-import-tip-wrap {
    border-top: 1px solid var(--th-border, #e2e8f0);
    margin-top: 0.5rem;
}

.th-import-tip-callout {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-left: 4px solid var(--th-primary, #1d6ff0);
}

.th-import-tip-icon {
    color: #d97706;
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.th-import-tip-text {
    color: #1e3a5f;
}

.th-import-steps-card {
    border: 1px solid var(--th-border, #e2e8f0);
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-radius: 12px;
    padding: 1rem 1.25rem;
}

.th-import-steps {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem 0.75rem;
}

.th-import-step {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    flex: 1 1 10rem;
    min-width: 0;
}

.th-import-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: var(--th-primary, #1d6ff0);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

.th-import-step-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.th-import-step-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--th-text, #0f172a);
}

.th-import-step-desc {
    font-size: 0.75rem;
    color: #64748b;
    line-height: 1.35;
}

.th-import-step-arrow {
    display: flex;
    align-items: center;
    align-self: center;
    color: #cbd5e1;
    font-size: 1rem;
    flex: 0 0 auto;
    padding: 0 0.15rem;
}

@media (max-width: 575.98px) {
    .th-import-step-arrow {
        display: none;
    }

    .th-import-step {
        flex: 1 1 100%;
    }
}

.th-import-history-section {
    margin-top: 0.25rem;
}

.th-import-history-card .th-import-history-card-head {
    background: #fff;
}

.th-import-history-card .th-table-filter-bar {
    border-bottom: 1px solid var(--th-border, #e2e8f0);
    margin: 0;
    border-radius: 0;
}

.th-import-guide-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #64748b;
    font-weight: 600;
}

.th-import-filter-empty-row td {
    background: #f8fafc;
}

.th-import-result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.5rem;
  margin-right: 0.35rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border-radius: 6px;
  line-height: 1.2;
}

.th-import-result-badge--ok {
  color: #166534;
  background: #ecfdf3;
  border: 1px solid #bbf7d0;
}

.th-import-result-badge--fail {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.th-btn-import-failures {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  font-weight: 600;
  font-size: 0.8125rem;
  color: #b91c1c;
  background: #fff;
  border: 1px solid #f87171;
  border-radius: 8px;
  line-height: 1.2;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.th-btn-import-failures:hover {
  color: #991b1b;
  background: #fef2f2;
  border-color: #ef4444;
}

.th-modal-import-failures {
  max-width: min(920px, 96vw);
  width: 100%;
}

#modal-import-failures .th-table tbody td {
  vertical-align: top;
}

.th-import-product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.th-import-product-tag {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  color: #334155;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  line-height: 1.3;
}

.th-import-product-tag-label {
  font-weight: 700;
  color: #64748b;
}

.th-import-error-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.th-import-error-list li {
  font-size: 0.8125rem;
  color: #b91c1c;
  line-height: 1.45;
  margin-bottom: 0.4rem;
}

.th-import-error-list li:last-child {
  margin-bottom: 0;
}

#modal-import-failures .modal-footer.th-modal-footer-actions {
  flex-wrap: wrap;
}

#modal-import-failures .modal-footer .btn {
  font-weight: 600;
  font-size: 0.875rem;
  min-height: 2.375rem;
}

.btn.btn-sm.th-btn-view-suppliers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.4rem 0.95rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--th-primary);
  background: var(--th-primary-soft);
  border: 1px solid rgba(47, 111, 237, 0.2);
  border-radius: 8px;
  line-height: 1.25;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn.btn-sm.th-btn-view-suppliers:hover {
  background: #e2ebff;
  border-color: rgba(47, 111, 237, 0.35);
  color: #2566d9;
}

.btn.btn-sm.th-btn-view-suppliers:focus-visible {
  outline: 2px solid var(--th-primary);
  outline-offset: 2px;
}

.th-card {
  background: var(--th-card);
  border: 1px solid var(--th-border);
  border-radius: 12px;
  box-shadow: var(--th-shadow);
}

.th-wts-table-card,
.th-wtb-table-card {
  overflow: hidden;
  border-radius: 12px;
  border-color: #e5e7eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
}

.th-wts-table-responsive,
.th-wtb-match-reason {
  line-height: 1.35;
  word-break: break-word;
}

.th-wtb-table-responsive {
  overflow-x: auto;
  overflow-y: clip;
}

/* Reduce header / page jump when supplier rows expand (scroll anchoring + reflow). */
.th-wts-table-card,
.th-wtb-table-card,
.th-wts-table-responsive,
.th-wtb-table-responsive,
.th-wts-table-responsive .table.th-table,
.th-wtb-table-responsive .table.th-table,
.th-table tbody tr.th-detail-row,
.th-wts-suppliers-slide {
  overflow-anchor: none;
}

.table.th-table > :not(caption) > * > .th-wts-actions-col {
  width: 1%;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

.table.th-table > :not(caption) > * > .th-wts-col-actions {
  width: 1%;
  white-space: nowrap;
  text-align: end;
  vertical-align: middle;
}

.th-stat {
  border-radius: 12px;
  border: 1px solid var(--th-border);
  background: var(--th-card);
  box-shadow: var(--th-shadow);
}

.th-stat--kpi {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: 0.85rem !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.th-stat--kpi.th-stat--supply {
  --th-stat-accent: var(--th-primary);
  --th-stat-icon-bg: rgba(47, 111, 237, 0.12);
  --th-stat-icon-color: var(--th-primary);
  --th-stat-hover-bg: rgba(47, 111, 237, 0.06);
  --th-stat-hover-ring: rgba(47, 111, 237, 0.28);
}

.th-stat--kpi.th-stat--demand {
  --th-stat-accent: var(--th-green);
  --th-stat-icon-bg: rgba(0, 143, 93, 0.12);
  --th-stat-icon-color: var(--th-green);
  --th-stat-hover-bg: rgba(0, 143, 93, 0.06);
  --th-stat-hover-ring: rgba(0, 143, 93, 0.28);
}

.th-stat--kpi.th-stat--pending {
  --th-stat-accent: #f59e0b;
  --th-stat-icon-bg: rgba(245, 158, 11, 0.14);
  --th-stat-icon-color: #d97706;
  --th-stat-hover-bg: rgba(245, 158, 11, 0.08);
  --th-stat-hover-ring: rgba(245, 158, 11, 0.32);
}

.th-stat--kpi.th-stat--matched {
  --th-stat-accent: #f97316;
  --th-stat-icon-bg: rgba(249, 115, 22, 0.12);
  --th-stat-icon-color: #ea580c;
  --th-stat-hover-bg: rgba(249, 115, 22, 0.07);
  --th-stat-hover-ring: rgba(249, 115, 22, 0.3);
}

.th-stat--kpi.th-stat--auction {
  --th-stat-accent: #5b6ee8;
  --th-stat-icon-bg: rgba(91, 110, 232, 0.12);
  --th-stat-icon-color: #5b6ee8;
  --th-stat-hover-bg: rgba(91, 110, 232, 0.07);
  --th-stat-hover-ring: rgba(91, 110, 232, 0.3);
}

.th-stat__accent {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--th-stat-accent, var(--th-primary));
}

.th-stat--kpi .th-stat__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.th-stat--kpi .th-stat-label {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: #6b7280;
  margin: 0;
}

.th-stat--kpi .th-icon-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  font-size: 1.05rem;
  background: var(--th-stat-icon-bg, rgba(47, 111, 237, 0.12));
  color: var(--th-stat-icon-color, var(--th-primary));
}

.th-stat--kpi .th-icon-box .bi {
  color: inherit;
  line-height: 1;
}

.th-stat--kpi .th-stat-value {
  margin-top: 0;
  margin-bottom: 0.65rem;
}

.th-stat__trend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-top: auto;
}

.th-stat-trend-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
}

.th-stat-trend-pill .bi {
  font-size: 0.7rem;
}

.th-stat-trend-pill--up {
  background: rgba(0, 143, 93, 0.12);
  color: #008f5d;
}

.th-stat-trend-pill--down {
  background: rgba(220, 38, 38, 0.1);
  color: #dc2626;
}

.th-stat-trend-pill--flat {
  background: #f3f4f6;
  color: #6b7280;
}

.th-stat-trend-suffix {
  font-size: 0.75rem;
  color: #9ca3af;
  font-weight: 500;
}

.th-stat-row > [class*="col"] {
  display: flex;
}

.th-stat-row .th-stat {
  flex: 1 1 auto;
  width: 100%;
}

.th-stat-foot {
  min-height: 1.35rem;
  margin-top: auto;
  padding-top: 0.35rem;
  line-height: 1.35;
}

.th-stat-link {
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.th-stat-link:hover,
.th-stat-link:focus-visible {
  border-color: var(--th-primary);
  box-shadow: 0 0 0 1px rgba(29, 111, 240, 0.12);
  color: inherit;
}

.th-stat--kpi.th-stat-link {
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.th-stat--kpi.th-stat-link:hover,
.th-stat--kpi.th-stat-link:focus-visible {
  border-color: var(--th-stat-accent, var(--th-primary));
  background-color: var(--th-stat-hover-bg, var(--th-card));
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.07), 0 0 0 1px var(--th-stat-hover-ring, rgba(47, 111, 237, 0.2));
  color: inherit;
}

.th-nav-link--child .th-sidebar-label {
  white-space: normal;
  min-width: 0;
  flex: 1 1 auto;
  line-height: 1.3;
  word-break: break-word;
}

.th-sidebar-accordion-panel .th-nav-link--child .th-sidebar-badge {
  align-self: center;
  margin-top: 0;
}

.th-sidebar-accordion-panel .th-nav-link--child:has(.th-sidebar-badge) {
  align-items: center;
}

.th-sidebar-accordion-panel .th-nav-link--child:has(.th-sidebar-badge) > i.bi {
  margin-top: 0;
}

.th-sidebar-flyout-link:has(.th-sidebar-badge) {
  align-items: center;
}

.th-table-filter-vat .th-wts-vat-toggle .btn {
  min-width: 4.25rem;
}

@media (max-width: 991.98px) {
  .th-matching-shell .th-matching-col-optional {
    display: none;
  }
}

.th-stat .th-stat-value {
  margin-top: 0.35rem;
}

.th-wts-shell .th-stat {
  padding: 1rem 1.15rem;
  background: linear-gradient(165deg, #f8fafc 0%, #eef2f6 100%);
  border: 1px solid #dce3ec;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.th-wts-shell .th-stat .th-stat-value {
  margin-top: 0.35rem;
}

.th-wts-stat-row {
  margin-bottom: 1.75rem !important;
}

.th-wts-shell .th-wts-table-card,
.th-wtb-shell .th-wtb-table-card {
  margin-top: 0;
}

.th-wts-table-card .th-table-filter-bar + .th-wts-table-responsive .table.th-table thead tr,
.th-wtb-table-card .th-table-filter-bar + .th-wtb-table-responsive .table.th-table thead tr {
  border-top: 0;
}

.table.th-table {
  --bs-table-border-color: #e5e7eb;
  --bs-table-bg: #fff;
  --bs-table-color: var(--th-text);
  margin-bottom: 0;
}

.table.th-table > :not(caption) > * > * {
  border-left-width: 0;
  border-right-width: 0;
  padding: 0.85rem 1rem;
  box-shadow: none;
}

.th-table thead th {
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #4b5563;
  font-weight: 700;
  border-bottom: 2px solid #dde1e6;
  border-top: none;
  background: #f3f4f6;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  white-space: nowrap;
}

.th-table tbody td {
  vertical-align: middle;
  border-bottom: 1px solid #e5e7eb;
}

.th-table tbody tr:not(.th-detail-row) > td {
  background-color: #fff;
}

.th-table tbody tr.th-detail-row > td {
  background-color: #f4f6f9;
  border-bottom: 1px solid #e5e7eb;
  padding: 0;
}

.th-table tbody > tr.table-active:not(.th-detail-row) > td {
  background-color: #fff;
}

.th-row-expand {
  cursor: default;
}

.th-expand-trigger {
  cursor: pointer;
}

.th-pill-qty {
  background: var(--th-primary-soft);
  color: var(--th-primary);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-weight: 600;
  font-size: 0.875rem;
}

.th-price,
.table > :not(caption) > * > .th-price {
  color: var(--th-green) !important;
  font-weight: 700;
}

.th-subdetail {
  background: #f4f6f9;
  border-top: none;
}

.th-modal .modal-content {
  border-radius: 16px;
  border: 1px solid var(--th-border);
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.th-modal--data-table .modal-header {
  padding: 1rem 1.25rem;
}

.th-modal--data-table .modal-body {
  padding: 0;
}

.th-modal--data-table .th-modal-data-table-summary {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.th-modal--data-table .table.th-table {
  margin-bottom: 0;
}

.th-modal--data-table .table.th-table thead th:first-child,
.th-modal--data-table .table.th-table tbody td:first-child {
  padding-left: 1rem;
}

.th-modal--data-table .table.th-table thead th:last-child,
.th-modal--data-table .table.th-table tbody td:last-child {
  padding-right: 1rem;
}

.th-btn-green {
  background: var(--th-green);
  border-color: var(--th-green);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 80, 53, 0.2);
}

.th-btn-green:hover {
  background: var(--th-green-hover);
  border-color: var(--th-green-hover);
  color: #fff;
}

.th-btn-green:active,
.th-btn-green:focus,
.th-btn-green:focus-visible {
  background: var(--th-green-hover) !important;
  border-color: var(--th-green-hover) !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(0, 143, 93, 0.28);
}

#margin-models-table .margin-model-actions .btn.th-margin-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 7.25rem;
  min-height: 2rem;
  padding: 0.35rem 0.75rem;
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1.2;
  white-space: nowrap;
}

#margin-models-table .margin-model-actions-edit .btn.th-margin-action-btn--secondary {
  min-width: 7.25rem;
}

.th-btn-primary {
  background: var(--th-primary);
  border-color: var(--th-primary);
  color: #fff;
}

.th-btn-primary:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #fff;
}

.th-btn-primary:active,
.th-btn-primary:focus,
.th-btn-primary:focus-visible,
label.th-btn-primary:active,
label.th-btn-primary:focus,
label.th-btn-primary:focus-visible {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(47, 111, 237, 0.25);
}

.th-btn-primary.text-white:active,
.th-btn-primary.text-white:focus,
.th-btn-primary.text-white:focus-visible {
  color: #fff !important;
}

.th-auth-bg {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background:
    radial-gradient(900px 500px at 85% 12%, rgba(21, 173, 130, 0.22), transparent 60%),
    radial-gradient(700px 420px at 8% 88%, rgba(37, 99, 235, 0.28), transparent 58%),
    radial-gradient(520px 320px at 92% 78%, rgba(124, 58, 237, 0.18), transparent 55%),
    linear-gradient(165deg, #020617 0%, #0b1224 42%, #0f172a 100%);
}

.th-auth-bg-decor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.th-auth-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 45%, #000 20%, transparent 75%);
}

.th-auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
}

.th-auth-orb--tl {
  width: 280px;
  height: 280px;
  top: -80px;
  left: -60px;
  background: rgba(37, 99, 235, 0.35);
}

.th-auth-orb--br {
  width: 320px;
  height: 320px;
  right: -100px;
  bottom: -90px;
  background: rgba(21, 173, 130, 0.3);
}

.th-auth-bg .th-auth-shell {
  position: relative;
  z-index: 1;
  align-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding-top: 1.25rem !important;
  padding-bottom: max(1.25rem, env(safe-area-inset-bottom, 0px)) !important;
}

.th-auth-account-panel {
  min-height: 0;
  overflow: visible;
  max-width: 100%;
  padding-top: 0;
}

.th-auth-card {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.4),
    0 4px 16px rgba(0, 0, 0, 0.2);
  overflow: visible;
  max-width: 100%;
}

/* Role pick + sign-in: fixed card height; panels swap in place (no layout jump) */
.th-auth-card--gate {
  --th-auth-card-h: 38rem;
  --th-auth-body-h: 29.9rem;
}

.th-auth-card--gate:not(.th-auth-card--signup) {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: var(--th-auth-card-h);
  max-height: none;
  overflow: visible;
}

.th-auth-card--gate.th-auth-card--signup {
  height: auto;
  min-height: var(--th-auth-card-h);
  max-height: none;
  overflow: visible;
  transition: min-height 0.2s ease;
}

.th-auth-card-body {
  position: relative;
  flex: 1 1 auto;
  height: var(--th-auth-body-h);
  min-height: var(--th-auth-body-h);
  max-height: var(--th-auth-body-h);
  overflow: visible;
}

.th-auth-card--gate:not(.th-auth-card--signup) .th-auth-card-body {
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: var(--th-auth-body-h);
  max-height: none;
}

.th-auth-card--gate.th-auth-card--signup .th-auth-card-body {
  height: auto;
  min-height: var(--th-auth-body-h);
  max-height: none;
  overflow: visible;
}

.th-auth-card--gate #panel-roles,
.th-auth-card--gate #panel-account {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: hidden;
  padding-inline: 0.3rem;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 1;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-roles:not(.th-auth-panel-hidden),
.th-auth-card--gate:not(.th-auth-card--signup) #panel-account:not(.th-auth-panel-hidden) {
  position: relative;
  inset: auto;
  flex: 1 1 auto;
  height: auto;
  min-height: var(--th-auth-body-h);
  overflow: visible;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-roles.th-auth-panel-hidden,
.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-panel-hidden {
  position: absolute;
  inset: 0;
  height: auto;
  min-height: 0;
  overflow: hidden;
  padding-bottom: 0;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-roles {
  overflow-y: visible;
}

.th-auth-card--gate #panel-account .tab-content,
.th-auth-card--gate #panel-account #form-signin {
  overflow: visible;
}

.th-auth-card--gate #panel-account .form-control:focus,
.th-auth-card--gate #panel-account .form-control:focus-visible,
.th-auth-card--gate #panel-account .form-select:focus,
.th-auth-card--gate #panel-account .form-select:focus-visible {
  position: relative;
  z-index: 2;
}

.th-auth-card--gate #panel-account.th-auth-signin-layout--supplier .form-control:focus,
.th-auth-card--gate #panel-account.th-auth-signin-layout--supplier .form-control:focus-visible,
.th-auth-card--gate #panel-account.th-auth-signin-layout--supplier .form-select:focus,
.th-auth-card--gate #panel-account.th-auth-signin-layout--supplier .form-select:focus-visible,
.th-auth-card--gate #panel-account.th-auth-signin-layout--buyer .form-control:focus,
.th-auth-card--gate #panel-account.th-auth-signin-layout--buyer .form-control:focus-visible,
.th-auth-card--gate #panel-account.th-auth-signin-layout--buyer .form-select:focus,
.th-auth-card--gate #panel-account.th-auth-signin-layout--buyer .form-select:focus-visible,
.th-auth-card--gate #panel-account.th-auth-signin-layout--admin .form-control:focus,
.th-auth-card--gate #panel-account.th-auth-signin-layout--admin .form-control:focus-visible,
.th-auth-card--gate #panel-account.th-auth-signin-layout--admin .form-select:focus,
.th-auth-card--gate #panel-account.th-auth-signin-layout--admin .form-select:focus-visible {
  border-color: var(--th-auth-role) !important;
  box-shadow: 0 0 0 0.2rem var(--th-auth-role-focus) !important;
}

.th-auth-card--gate #panel-roles.th-auth-panel-hidden,
.th-auth-card--gate #panel-account.th-auth-panel-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
}

.th-auth-card--gate.th-auth-card--signup #panel-account {
  position: relative;
  inset: auto;
  height: auto;
  max-height: none;
  overflow: visible;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-roles #role-pick-list {
  flex: 1 1 auto;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-roles #btn-continue-role {
  margin-top: auto;
}

.th-auth-card--gate:not(.th-auth-card--signup) {
  --th-auth-section-gap: 1.15rem;
  --th-auth-field-gap: 0.75rem;
  --th-auth-btn-gap: 1.25rem;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-account {
  flex: 1 1 auto;
  min-height: 0;
  gap: var(--th-auth-section-gap);
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-account .th-auth-role-summary {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-inline: 0 !important;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-account .th-auth-mode-tabs {
  margin-bottom: 0 !important;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-account .tab-content {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 0;
  margin: 0 !important;
  padding: 0;
}

.th-auth-card--gate:not(.th-auth-card--signup) #pane-signin.show #form-signin {
  display: flex;
  flex-direction: column;
  gap: var(--th-auth-field-gap);
}

.th-auth-card--gate:not(.th-auth-card--signup) #form-signin > .mb-3 {
  margin-bottom: 0 !important;
}

.th-auth-card--gate:not(.th-auth-card--signup) #form-signin .th-auth-signin-options {
  margin: 0 !important;
}

/* Admin: no tabs — stretch sign-in area and pin button to card bottom */
.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--admin .tab-content {
  flex: 1 1 auto;
  min-height: 0;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--admin #pane-signin.th-auth-tab-pane.show {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--admin #form-signin {
  flex: 1 1 auto;
  min-height: 0;
}

/* Buyer / supplier: tabs shown — stretch sign-in area and pin button */
.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--buyer .tab-content,
.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--supplier .tab-content {
  flex: 1 1 auto;
  min-height: 0;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--buyer #pane-signin.th-auth-tab-pane.show,
.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--supplier #pane-signin.th-auth-tab-pane.show {
  display: flex !important;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  width: 100%;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--buyer #form-signin,
.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--supplier #form-signin {
  flex: 1 1 auto;
  min-height: 0;
}

.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--buyer #btn-signin-submit,
.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--supplier #btn-signin-submit,
.th-auth-card--gate:not(.th-auth-card--signup) #panel-account.th-auth-signin-layout--admin #btn-signin-submit {
  margin-top: auto;
  margin-bottom: 0;
  flex-shrink: 0;
}

.th-auth-account-panel .tab-pane.th-auth-tab-pane {
  transition: none;
}

.th-auth-account-panel .tab-pane.th-auth-tab-pane:not(.show) {
  display: none !important;
}

.th-auth-account-panel .tab-pane.th-auth-tab-pane.show {
  display: block;
}

.th-auth-card-intro {
  margin-top: 0;
  margin-bottom: 1rem !important;
  padding-top: 0;
}

.th-auth-welcome-title {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
  color: #475569;
  letter-spacing: 0.01em;
}

.th-auth-welcome-sub {
  font-size: 0.875rem;
  line-height: 1.45;
  color: #64748b;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}

.th-auth-role-hint {
  line-height: 1.45;
  margin-top: 0.75rem !important;
}

@media (max-height: 720px) {
  .th-auth-card--gate {
    --th-auth-logo-max-w: 100%;
    --th-auth-logo-max-h: clamp(4.25rem, 9vh, 5rem);
    padding: 0.65rem 1.15rem 1.1rem !important;
  }

  .th-auth-card--gate {
    --th-auth-card-h: 34rem;
    --th-auth-body-h: 26rem;
  }

  .th-auth-card--gate:not(.th-auth-card--signup) {
    --th-auth-section-gap: 0.85rem;
    --th-auth-field-gap: 0.65rem;
  }

  .th-auth-card--gate .th-auth-card-brand {
    margin-bottom: 0.4rem;
  }

  .th-role-pick-card {
    min-height: 4.85rem;
    padding: 0.85rem 0.9rem;
  }

  .th-btn-continue {
    padding: 0.75rem 1rem;
  }
}

.th-auth-notice {
  margin: 0 0 0.35rem;
  font-size: 0.875rem;
  line-height: 1.4;
  color: #166534;
}

.th-auth-notice--danger {
  color: #b91c1c;
}

.th-auth-card--gate > .th-auth-notice {
  margin-inline: 0.2rem;
  flex-shrink: 0;
}

.th-auth-card--gate #panel-roles .th-auth-notice + .th-auth-card-intro {
  margin-top: 0.15rem;
}

.th-auth-mode-tabs {
  background: var(--th-primary-soft);
  border: 1px solid #d4e2fc;
  border-radius: 12px;
  padding: 4px;
  gap: 4px !important;
}

.th-auth-mode-tabs .nav-link {
  border: 1px solid transparent;
  border-radius: 10px !important;
  color: var(--th-primary);
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.th-auth-mode-tabs .nav-link:not(.active):hover {
  border-color: #b8ccf5;
  background: #f8fbff;
  color: var(--th-primary-dark);
}

.th-auth-mode-tabs .nav-link.active {
  background: var(--th-primary);
  border-color: var(--th-primary);
  color: #fff !important;
  box-shadow: 0 2px 6px rgba(47, 111, 237, 0.28);
}

/* Role-themed sign-in / sign-up (matches role pick + continue button colors) */
.th-auth-signin-layout--supplier {
  --th-auth-role: #2563eb;
  --th-auth-role-dark: #1d4ed8;
  --th-auth-role-soft: #eff6ff;
  --th-auth-role-border: #d4e2fc;
  --th-auth-role-tab-hover: #f8fbff;
  --th-auth-role-shadow: rgba(37, 99, 235, 0.28);
  --th-auth-role-focus: rgba(37, 99, 235, 0.25);
}

.th-auth-signin-layout--buyer {
  --th-auth-role: #16a34a;
  --th-auth-role-dark: #15803d;
  --th-auth-role-soft: #f0fdf4;
  --th-auth-role-border: #bbf7d0;
  --th-auth-role-tab-hover: #f7fef9;
  --th-auth-role-shadow: rgba(22, 163, 74, 0.28);
  --th-auth-role-focus: rgba(22, 163, 74, 0.25);
}

.th-auth-signin-layout--admin {
  --th-auth-role: #7c3aed;
  --th-auth-role-dark: #6d28d9;
  --th-auth-role-soft: #f5f3ff;
  --th-auth-role-border: #ddd6fe;
  --th-auth-role-tab-hover: #faf8ff;
  --th-auth-role-shadow: rgba(124, 58, 237, 0.28);
  --th-auth-role-focus: rgba(124, 58, 237, 0.25);
}

.th-auth-signin-layout--supplier .th-auth-mode-tabs,
.th-auth-signin-layout--buyer .th-auth-mode-tabs,
.th-auth-signin-layout--admin .th-auth-mode-tabs {
  background: var(--th-auth-role-soft);
  border-color: var(--th-auth-role-border);
}

.th-auth-signin-layout--supplier .th-auth-mode-tabs .nav-link,
.th-auth-signin-layout--buyer .th-auth-mode-tabs .nav-link,
.th-auth-signin-layout--admin .th-auth-mode-tabs .nav-link {
  color: var(--th-auth-role);
}

.th-auth-signin-layout--supplier .th-auth-mode-tabs .nav-link:not(.active):hover,
.th-auth-signin-layout--buyer .th-auth-mode-tabs .nav-link:not(.active):hover,
.th-auth-signin-layout--admin .th-auth-mode-tabs .nav-link:not(.active):hover {
  border-color: var(--th-auth-role-border);
  background: var(--th-auth-role-tab-hover);
  color: var(--th-auth-role-dark);
}

.th-auth-signin-layout--supplier .th-auth-mode-tabs .nav-link.active,
.th-auth-signin-layout--buyer .th-auth-mode-tabs .nav-link.active,
.th-auth-signin-layout--admin .th-auth-mode-tabs .nav-link.active {
  background: var(--th-auth-role);
  border-color: var(--th-auth-role);
  box-shadow: 0 2px 6px var(--th-auth-role-shadow);
}

.th-auth-signin-layout--supplier #btn-signin-submit,
.th-auth-signin-layout--supplier #btn-signup-submit,
.th-auth-signin-layout--buyer #btn-signin-submit,
.th-auth-signin-layout--buyer #btn-signup-submit,
.th-auth-signin-layout--admin #btn-signin-submit,
.th-auth-signin-layout--admin #btn-signup-submit {
  background: var(--th-auth-role);
  border-color: var(--th-auth-role);
  color: #fff;
  box-shadow: 0 4px 14px var(--th-auth-role-shadow);
}

.th-auth-signin-layout--supplier #btn-signin-submit:hover,
.th-auth-signin-layout--supplier #btn-signup-submit:hover,
.th-auth-signin-layout--buyer #btn-signin-submit:hover,
.th-auth-signin-layout--buyer #btn-signup-submit:hover,
.th-auth-signin-layout--admin #btn-signin-submit:hover,
.th-auth-signin-layout--admin #btn-signup-submit:hover {
  background: var(--th-auth-role-dark);
  border-color: var(--th-auth-role-dark);
  color: #fff;
}

.th-auth-signin-layout--supplier #btn-signin-submit:active,
.th-auth-signin-layout--supplier #btn-signin-submit:focus,
.th-auth-signin-layout--supplier #btn-signin-submit:focus-visible,
.th-auth-signin-layout--supplier #btn-signup-submit:active,
.th-auth-signin-layout--supplier #btn-signup-submit:focus,
.th-auth-signin-layout--supplier #btn-signup-submit:focus-visible,
.th-auth-signin-layout--buyer #btn-signin-submit:active,
.th-auth-signin-layout--buyer #btn-signin-submit:focus,
.th-auth-signin-layout--buyer #btn-signin-submit:focus-visible,
.th-auth-signin-layout--buyer #btn-signup-submit:active,
.th-auth-signin-layout--buyer #btn-signup-submit:focus,
.th-auth-signin-layout--buyer #btn-signup-submit:focus-visible,
.th-auth-signin-layout--admin #btn-signin-submit:active,
.th-auth-signin-layout--admin #btn-signin-submit:focus,
.th-auth-signin-layout--admin #btn-signin-submit:focus-visible,
.th-auth-signin-layout--admin #btn-signup-submit:active,
.th-auth-signin-layout--admin #btn-signup-submit:focus,
.th-auth-signin-layout--admin #btn-signup-submit:focus-visible {
  background: var(--th-auth-role-dark) !important;
  border-color: var(--th-auth-role-dark) !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem var(--th-auth-role-focus);
}

.th-auth-signup-pane,
.th-auth-signup-pane #form-signup {
  overflow: visible;
  max-width: 100%;
}

.th-auth-signup-pane .row {
  margin-left: 0;
  margin-right: 0;
}

.th-auth-signup-pane .row > [class*="col-"] {
  min-width: 0;
}

.th-auth-signup-pane .form-control,
.th-auth-signup-pane .form-select {
  max-width: 100%;
}

.th-legal-modal .modal-body {
  max-height: min(70vh, 520px);
}

.th-legal-modal-body h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.th-legal-modal-body h3:first-of-type {
  margin-top: 0;
}

.th-legal-modal-body ul {
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
}

.th-auth-signup-pane .btn-link[data-bs-toggle="modal"] {
  vertical-align: baseline;
  font-size: inherit;
  line-height: inherit;
}

.th-loader {
  display: inline-block;
  width: 1.125rem;
  height: 1.125rem;
  border: 2px solid rgba(47, 111, 237, 0.18);
  border-top-color: var(--th-primary);
  border-radius: 50%;
  animation: th-loader-spin 0.7s linear infinite;
  vertical-align: middle;
  flex-shrink: 0;
}

.th-loader--sm {
  width: 0.875rem;
  height: 0.875rem;
  border-width: 1.5px;
}

.th-btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.92;
}

.th-field-loader-wrap {
  position: relative;
}

.th-field-loader-wrap.is-loading .form-control {
  padding-right: 2.35rem;
}

.th-field-loader {
  position: absolute;
  right: 0.75rem;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  pointer-events: none;
}

@keyframes th-loader-spin {
  to {
    transform: rotate(360deg);
  }
}

.th-page-loader {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.th-page-loader:not([hidden]),
html.th-page-loader-active .th-page-loader,
body.th-page-loader-active .th-page-loader {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.th-page-loader.is-hiding {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.th-page-loader__backdrop {
  position: absolute;
  inset: 0;
}

.th-page-loader--auth .th-page-loader__backdrop {
  background: radial-gradient(1200px 600px at 10% 90%, rgba(37, 99, 235, 0.35), transparent 55%),
    linear-gradient(160deg, #020617 0%, #0b1224 45%, #020617 100%);
}

.th-page-loader--app .th-page-loader__backdrop {
  background: rgba(245, 246, 248, 0.88);
  backdrop-filter: blur(10px);
}

.th-page-loader__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  min-width: 9rem;
  padding: 2rem 2.5rem;
  text-align: center;
}

.th-page-loader--auth .th-page-loader__panel {
  color: #e8ecf1;
}

.th-page-loader--app .th-page-loader__panel {
  color: var(--th-text, #0f172a);
}

.th-page-loader__gif {
  display: block;
  width: 96px;
  height: 96px;
  max-width: none;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
  animation: th-loader-spin 0.9s linear infinite;
}

.th-page-loader--app .th-page-loader__gif {
  filter: drop-shadow(0 6px 18px rgba(15, 23, 42, 0.12));
}

.th-page-loader--auth .th-page-loader__gif {
  filter: drop-shadow(0 8px 24px rgba(15, 23, 42, 0.35));
}

.th-page-loader__message {
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0.92;
}

.th-page-loader--auth .th-page-loader__message {
  color: rgba(232, 236, 241, 0.9);
}

html.th-page-loader-active,
body.th-page-loader-active {
  overflow: hidden;
}

.th-signup-country-phone .form-label {
  line-height: 1.25;
}

.th-signup-country-phone .form-select,
.th-signup-country-phone .th-phone-input-group {
  min-height: calc(1.5em + 0.75rem + 2px);
}

.th-signup-country-phone .th-phone-input-group {
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--th-border, #ced4da);
}

.th-signup-country-phone .th-phone-input-group:focus-within {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.2rem rgba(47, 111, 237, 0.15);
}

.th-signup-country-phone .th-phone-input-group .form-control,
.th-signup-country-phone .th-phone-input-group .input-group-text {
  border: 0;
  box-shadow: none;
  min-height: calc(1.5em + 0.75rem + 2px);
}

.th-signup-country-phone .form-select {
  padding-right: 1.75rem;
  font-size: 0.875rem;
}

.th-signup-country-phone #signup-phone {
  font-size: 0.875rem;
}

.th-phone-dial {
  min-width: 3.25rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  justify-content: center;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--th-primary-dark);
  background: var(--th-primary-soft);
}

.th-wts-cat-tabs .nav-link:not(.active) {
  color: #4b5563 !important;
  background: #fff;
  border: 1px solid #c9d0d9;
  font-weight: 500;
}

.th-wts-cat-tabs .nav-link:not(.active):hover {
  border-color: #aeb8c4;
  background: #f9fafb;
  color: #374151 !important;
}

.th-wts-cat-tabs .nav-link.active {
  background: var(--th-primary);
  color: #fff !important;
  border-color: var(--th-primary);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(47, 111, 237, 0.2);
}

.th-wts-cat-tabs .nav-link:active:not(.active) {
  background: #f9fafb !important;
  color: #374151 !important;
  border-color: #aeb8c4 !important;
}

.th-wts-cat-tabs .nav-link.active:active,
.th-wts-cat-tabs .nav-link.active:focus,
.th-wts-cat-tabs .nav-link.active:focus-visible {
  background: #1d4ed8 !important;
  color: #fff !important;
  border-color: #1d4ed8 !important;
}

.th-wts-vat-toggle .btn {
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.25;
}

.th-wts-vat-toggle .btn.btn-light.border {
  background: #fff;
  border-color: #c9d0d9 !important;
  color: #4b5563;
}

.th-wts-vat-toggle .btn.btn-light.border:hover {
  background: #f9fafb;
  border-color: #aeb8c4 !important;
  color: #374151;
}

.th-wts-vat-toggle .btn.th-btn-primary {
  border-color: var(--th-primary);
  box-shadow: none;
}

.th-wts-vat-toggle .btn.btn-light.border:active,
.th-wts-vat-toggle .btn.btn-light.border:focus,
.th-wts-vat-toggle .btn.btn-light.border:focus-visible {
  background: #f9fafb !important;
  border-color: #aeb8c4 !important;
  color: #374151 !important;
}

.th-wts-vat-toggle .btn.th-btn-primary:active,
.th-wts-vat-toggle .btn.th-btn-primary:focus,
.th-wts-vat-toggle .btn.th-btn-primary:focus-visible {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
}

.th-wts-vat-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--th-muted);
}

.th-role-pick-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0;
  min-height: 5.25rem;
  padding: 1rem 1rem 1rem 1.1rem;
  border: 2px solid #e2e8f0;
  border-radius: 14px;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.12s ease;
  background: #fff;
}

#role-pick-list .th-role-pick-card .small {
  line-height: 1.35;
}

.th-role-pick-card:hover {
  transform: translateY(-1px);
}

.th-role-pick-card--supplier:hover {
  border-color: #93c5fd;
  background: #f8fbff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}

.th-role-pick-card--buyer:hover {
  border-color: #86efac;
  background: #f7fef9;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.1);
}

.th-role-pick-card--admin:hover {
  border-color: #c4b5fd;
  background: #faf8ff;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.1);
}

.th-role-pick-card--supplier.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

.th-role-pick-card--buyer.selected {
  border-color: #16a34a;
  background: #f0fdf4;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.th-role-pick-card--admin.selected {
  border-color: #7c3aed;
  background: #f5f3ff;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

.th-role-pick-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.th-role-pick-check {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: transparent;
  background: #fff;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.th-role-pick-check .bi {
  font-size: 1rem;
  line-height: 1;
}

.th-role-pick-card--supplier.selected .th-role-pick-check {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.th-role-pick-card--buyer.selected .th-role-pick-check {
  border-color: #16a34a;
  background: #16a34a;
  color: #fff;
}

.th-role-pick-card--admin.selected .th-role-pick-check {
  border-color: #7c3aed;
  background: #7c3aed;
  color: #fff;
}

.th-role-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.th-role-icon--supplier {
  background: linear-gradient(145deg, #60a5fa 0%, #2563eb 55%, #1d4ed8 100%);
}

.th-role-icon--buyer {
  background: linear-gradient(145deg, #4ade80 0%, #16a34a 55%, #15803d 100%);
}

.th-role-icon--admin {
  background: linear-gradient(145deg, #a78bfa 0%, #7c3aed 55%, #6d28d9 100%);
}

.th-btn-continue {
  padding: 0.85rem 1.25rem;
  border-radius: 14px !important;
  font-weight: 600;
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.12s ease;
}

.th-btn-continue__inner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
}

.th-btn-continue__inner .bi {
  font-size: 1.125rem;
  line-height: 1;
  margin-top: 0;
}

.th-btn-continue:disabled {
  opacity: 1;
  background: #e2e8f0 !important;
  border-color: #e2e8f0 !important;
  color: #94a3b8 !important;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.th-btn-continue:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.th-btn-continue--supplier:not(:disabled) {
  background: #2563eb !important;
  border-color: #2563eb !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.th-btn-continue--buyer:not(:disabled) {
  background: #16a34a !important;
  border-color: #16a34a !important;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

.th-btn-continue--admin:not(:disabled) {
  background: #7c3aed !important;
  border-color: #7c3aed !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

.th-pw-field-wrap {
  position: relative;
}

.th-pw-field-wrap .form-control.th-pw-input-pad {
  padding-right: 2.75rem;
}

.th-pw-field-wrap .form-control.th-pw-input-pad--valid-slot {
  padding-right: 4.35rem;
}

.th-pw-valid-dot {
  position: absolute;
  right: 2.65rem;
  top: 50%;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px #fff;
  pointer-events: none;
}

.th-pw-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #64748b;
  padding: 0.35rem 0.5rem;
  line-height: 1;
  border-radius: 8px;
}

.th-pw-toggle:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.th-pw-match--ok {
  color: #15803d;
}

.th-field-error {
  min-height: 0;
}

.th-icon-box {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
}

.th-icon-box .bi {
  color: inherit;
  line-height: 1;
}

.th-stat-value--soon {
  font-size: 1.125rem;
  font-weight: 600;
  color: #6b7280;
}

/* Action required section */
.th-action-section {
  --th-action-high: #dc2626;
  --th-action-high-bg: #fef2f2;
  --th-action-high-border: #fecaca;
  --th-action-medium: #d97706;
  --th-action-medium-bg: #fffbeb;
  --th-action-medium-border: #fde68a;
  --th-action-low: #2563eb;
  --th-action-low-bg: #eff6ff;
  --th-action-low-border: #bfdbfe;
  padding: 0.85rem 1rem;
}

.th-action-section.th-card {
  border: 1px solid var(--th-border);
  box-shadow: var(--th-shadow);
}

.th-action-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-bottom: 0.65rem;
  margin-bottom: 0.65rem;
  border-bottom: 1px solid var(--th-border);
}

.th-action-section-head-main {
  min-width: 0;
}

.th-action-section-title {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--th-text);
  letter-spacing: -0.01em;
  margin-bottom: 0.15rem;
}

.th-action-section-title .bi {
  color: var(--th-orange);
  font-size: 1rem;
}

.th-action-section-total {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--th-primary);
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 0.1rem;
}

.th-action-section-sub {
  font-size: 0.75rem;
  color: var(--th-muted);
}

.th-action-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.th-action-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--th-border);
  border-left-width: 4px;
  box-shadow: none;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
  color: inherit;
}

.th-action-item--high {
  border-left-color: var(--th-action-high);
  background: var(--th-action-high-bg);
  border-color: var(--th-action-high-border);
}

.th-action-item--medium {
  border-left-color: var(--th-action-medium);
  background: var(--th-action-medium-bg);
  border-color: var(--th-action-medium-border);
}

.th-action-item--low {
  border-left-color: var(--th-action-low);
  background: var(--th-action-low-bg);
  border-color: var(--th-action-low-border);
}

.th-action-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.th-action-item-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.75rem;
  padding: 0 0.4rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
}

.th-action-item--high .th-action-item-count {
  background: var(--th-action-high);
  color: #fff;
}

.th-action-item--medium .th-action-item-count {
  background: var(--th-action-medium);
  color: #fff;
}

.th-action-item--low .th-action-item-count {
  background: var(--th-action-low);
  color: #fff;
}

.th-action-item--high .th-action-item-icon {
  color: var(--th-action-high);
}

.th-action-item--medium .th-action-item-icon {
  color: var(--th-action-medium);
}

.th-action-item--low .th-action-item-icon {
  color: var(--th-action-low);
}

.th-action-item-content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.th-action-item-title {
  display: block;
  font-weight: 600;
  font-size: 0.8125rem;
  color: var(--th-text);
  line-height: 1.3;
}

.th-action-item-desc {
  display: block;
  font-size: 0.75rem;
  color: var(--th-muted);
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.th-action-priority {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  font-size: 0.625rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid transparent;
  line-height: 1;
}

.th-action-priority-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.th-action-priority--high {
  color: var(--th-action-high);
  background: #fff;
  border-color: #fca5a5;
}

.th-action-priority--high .th-action-priority-dot {
  background: var(--th-action-high);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25);
}

.th-action-priority--medium {
  color: #b45309;
  background: #fff;
  border-color: #fcd34d;
}

.th-action-priority--medium .th-action-priority-dot {
  background: var(--th-action-medium);
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.25);
}

.th-action-priority--low {
  color: var(--th-action-low);
  background: #fff;
  border-color: #93c5fd;
}

.th-action-priority--low .th-action-priority-dot {
  background: var(--th-action-low);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
}

.th-action-item-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-shrink: 0;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--th-border);
  background: #fff;
  color: var(--th-text);
  text-decoration: none !important;
  white-space: nowrap;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.th-action-item-cta .bi {
  font-size: 1.1rem;
  line-height: 1;
  transition: transform 0.15s ease;
}

.th-action-item--high .th-action-item-cta {
  color: var(--th-action-high);
  border-color: #fecaca;
}

.th-action-item--medium .th-action-item-cta {
  color: var(--th-action-medium);
  border-color: #fde68a;
}

.th-action-item--low .th-action-item-cta {
  color: var(--th-action-low);
  border-color: #bfdbfe;
}

.th-action-item-cta:hover,
.th-action-item-cta:focus-visible {
  text-decoration: none !important;
}

.th-action-item--high .th-action-item-cta:hover,
.th-action-item--high .th-action-item-cta:focus-visible {
  background: var(--th-action-high);
  border-color: var(--th-action-high);
  color: #fff;
}

.th-action-item--medium .th-action-item-cta:hover,
.th-action-item--medium .th-action-item-cta:focus-visible {
  background: var(--th-action-medium);
  border-color: var(--th-action-medium);
  color: #fff;
}

.th-action-item--low .th-action-item-cta:hover,
.th-action-item--low .th-action-item-cta:focus-visible {
  background: var(--th-action-low);
  border-color: var(--th-action-low);
  color: #fff;
}

.th-action-item-cta:hover .bi,
.th-action-item-cta:focus-visible .bi {
  transform: translateX(2px);
}

.th-action-all-clear {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  background: rgba(0, 143, 93, 0.06);
  border: 1px solid rgba(0, 143, 93, 0.18);
  border-left: 4px solid var(--th-green);
}

.th-action-quicklinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--th-border);
}

.th-action-quicklink {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--th-border);
  background: #fff;
  color: var(--th-text);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.th-action-quicklink:hover,
.th-action-quicklink:focus-visible {
  background: var(--th-sidebar-active-bg);
  border-color: #cfd4dc;
  color: var(--th-text);
}

.th-action-quicklink .bi {
  font-size: 0.85rem;
  color: #64748b;
}

.th-action-all-clear-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 143, 93, 0.12);
  color: var(--th-green);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

@media (max-width: 767.98px) {
  .th-action-item {
    flex-wrap: wrap;
    padding: 0.6rem 0.65rem;
  }

  .th-action-item-content {
    flex: 1 1 calc(100% - 7.5rem);
    order: 3;
  }

  .th-action-item-count {
    order: 4;
    margin-left: auto;
  }

  .th-action-item-cta {
    order: 5;
    margin-left: auto;
  }

  .th-action-item-desc {
    white-space: normal;
  }
}

.th-dashboard-panels .th-card {
  min-height: 100%;
}

.th-dashboard-intro {
  align-items: start;
}

.th-page-breadcrumb--dash {
  margin-bottom: 0.125rem;
}

.th-buyer-shortcuts {
  padding: 0.85rem 1rem;
}

.th-buyer-shortcuts-head {
  margin-bottom: 0.65rem;
}

.th-buyer-shortcuts-links.th-action-quicklinks {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

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

.th-dashboard-panel-link {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--th-primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 0.15rem;
}

.th-dashboard-panel-link:hover,
.th-dashboard-panel-link:focus-visible {
  color: var(--th-primary-dark);
  text-decoration: underline;
}

.th-dashboard-feed {
  display: flex;
  flex-direction: column;
}

.th-dashboard-feed-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #eef1f5;
}

.th-dashboard-feed-item:first-child {
  padding-top: 0;
}

.th-dashboard-feed-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.th-panel-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.75rem 1.25rem;
  min-height: 11rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed #dce3ec;
}

.th-panel-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eef2f6;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  margin-bottom: 0.65rem;
}

.th-panel-empty-icon .bi {
  line-height: 1;
}

.th-panel-empty-title {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--th-text);
  margin-bottom: 0.35rem;
}

.th-panel-empty-text {
  font-size: 0.8125rem;
  color: var(--th-muted);
  line-height: 1.45;
  max-width: 22rem;
}

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

.th-activity-icon--new {
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.12);
}

.th-activity-icon--approved {
  color: #15803d;
  background: rgba(22, 163, 74, 0.12);
}

.th-activity-icon--pending {
  color: #b45309;
  background: rgba(234, 179, 8, 0.16);
}

.th-activity-icon--rejected {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.1);
}

.th-activity-icon--auction {
  color: #6d28d9;
  background: rgba(124, 58, 237, 0.12);
}

.th-top-model-progress {
  background: #e8ecf1;
}

.th-top-model-progress .progress-bar {
  background: var(--th-primary);
}

.th-listing-thumb,
.th-listing-thumb-placeholder {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.th-listing-thumb {
  object-fit: cover;
}

.th-suppliers-dropdown-wrap {
  background: transparent;
  vertical-align: top;
}

.th-suppliers-dropdown {
  background-color: #f4f6f9;
  box-shadow: none;
}

.th-suppliers-dropdown .card-header {
  border-bottom: 1px solid var(--th-border) !important;
}

.th-suppliers-dropdown-wrap.th-subdetail {
  border-top: none;
  background: #f4f6f9;
  border-left: none;
  box-shadow: none;
}

.th-wts-suppliers-panel {
  padding: 0;
  background-color: #f4f6f9;
}

.th-wts-supplier-table-shell {
  margin: 0;
  padding: 0.5rem 0.75rem 0.65rem 1.5rem;
  overflow: visible;
  background-color: #f4f6f9;
  border-left: 3px solid rgba(47, 111, 237, 0.42);
}

.th-suppliers-inner-table {
  --bs-table-bg: transparent;
  --bs-table-hover-bg: #f3f4f6;
  --bs-table-border-color: #e5e7eb;
  margin-bottom: 0;
}

.th-wts-supplier-table-shell .th-suppliers-inner-table > :not(caption) > * > * {
  padding-left: 1rem;
  padding-right: 1rem;
}

.th-wts-supplier-table-shell .th-suppliers-inner-table thead > tr > * {
  background-color: transparent;
}

.th-suppliers-inner-table > tbody > tr:not(:last-child) > td {
  border-bottom: 1px solid #e5e7eb;
}

.th-suppliers-inner-table > tbody > tr:last-child > td {
  border-bottom: none;
}

.th-suppliers-inner-table .th-wts-supplier-thead-row th {
  padding-top: 0.55rem;
  padding-bottom: 0.65rem;
  font-size: 0.6875rem;
  font-weight: 700;
  color: #6b7280;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-bottom: 2px solid #e0e4e9;
  vertical-align: middle;
  background-color: transparent;
}

.th-suppliers-inner-table .th-wts-supplier-thead-row .th-wts-col-qty,
.th-suppliers-inner-table .th-wts-supplier-thead-row .th-wts-col-price,
.th-suppliers-inner-table .th-wts-supplier-thead-row .th-wts-col-margin,
.th-suppliers-inner-table .th-wts-supplier-thead-row .th-wts-col-listed,
.th-suppliers-inner-table .th-wts-supplier-thead-row .th-wts-col-actions,
.th-suppliers-inner-table tbody .th-wts-col-qty,
.th-suppliers-inner-table tbody .th-wts-col-price,
.th-suppliers-inner-table tbody .th-wts-col-margin,
.th-suppliers-inner-table tbody .th-wts-col-listed,
.th-suppliers-inner-table tbody .th-wts-col-actions {
  text-align: right;
}

.th-suppliers-inner-table tbody tr > td {
  background-color: #fff;
}

.th-suppliers-inner-table tbody tr:hover > td {
  background-color: #f9fafb;
}

.th-suppliers-inner-table .th-wts-supplier-thead-row .th-sort-icon {
  font-size: 0.9em;
}

.th-suppliers-inner-table thead th.th-sortable {
  cursor: pointer;
  white-space: nowrap;
}

.th-suppliers-inner-table thead th.th-sortable:hover {
  background: rgba(37, 99, 235, 0.06);
}

.th-sort-icon {
  font-size: 0.85em;
  vertical-align: -0.1em;
}

.th-device-info-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--th-text);
  margin-bottom: 1rem;
}

.th-device-info-label {
  font-size: 0.72rem;
  text-transform: capitalize;
}

.th-device-info-grid .fw-semibold {
  font-size: 0.95rem;
}

.th-device-info-dialog .modal-body {
  padding-top: 0.75rem;
}

.th-device-detail-panels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.th-device-detail-card {
  background: #f8fafc;
  border: 1px solid var(--th-border);
  border-radius: 14px;
  padding: 1.1rem 1.15rem 1.15rem;
}

.th-device-detail-card--offer {
  background: linear-gradient(180deg, #f0f7ff 0%, #f8fafc 100%);
  border-color: rgba(47, 111, 237, 0.18);
}

.th-device-detail-card-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.th-device-detail-card-icon {
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #fff;
  color: var(--th-primary);
  border: 1px solid rgba(47, 111, 237, 0.14);
  font-size: 1.05rem;
}

.th-device-detail-card-icon--offer {
  background: var(--th-primary);
  color: #fff;
  border-color: transparent;
}

.th-device-detail-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.15rem;
  color: var(--th-text);
}

.th-device-detail-card-desc {
  font-size: 0.78rem;
  color: #64748b;
  margin: 0;
  line-height: 1.4;
}

.th-device-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: stretch;
}

.th-device-detail-grid--offer-meta {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px dashed rgba(15, 23, 42, 0.1);
}

.th-device-detail-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.07);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  min-height: 100%;
  height: 100%;
}

.th-device-detail-item--wide {
  grid-column: 1 / -1;
}

.th-device-detail-item-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #f1f5f9;
  color: #64748b;
  font-size: 0.9rem;
}

.th-device-detail-item-body {
  min-width: 0;
  flex: 1;
}

.th-device-detail-item-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.2rem;
  line-height: 1.3;
}

.th-device-detail-item-value {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--th-text);
  line-height: 1.35;
  word-break: break-word;
}

.th-device-detail-item-value .th-color-swatch-wrap {
  margin-top: 0.1rem;
}

.th-device-detail-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
}

.th-device-detail-badge--category {
  background: #eef2ff;
  color: #4338ca;
  border-color: rgba(67, 56, 202, 0.12);
}

.th-device-detail-badge--grade {
  background: #ecfdf5;
  color: #047857;
  border-color: rgba(4, 120, 87, 0.12);
}

.th-device-detail-badge--vat {
  background: #fff7ed;
  color: #c2410c;
  border-color: rgba(194, 65, 12, 0.12);
}

.th-device-detail-region {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.th-device-offer-highlights {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  align-items: stretch;
}

.th-device-offer-highlights.d-none + .th-device-detail-grid,
.th-device-offer-highlights:empty + .th-device-detail-grid {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.th-device-detail-grid--offer-meta:only-child,
.th-device-offer-highlights.d-none + .th-device-detail-grid--offer-meta {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.th-device-offer-stat {
  background: #fff;
  border: 1px solid rgba(47, 111, 237, 0.14);
  border-radius: 12px;
  padding: 0.85rem 0.95rem;
  text-align: center;
}

.th-device-offer-stat-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.35rem;
}

.th-device-offer-stat-value {
  display: block;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--th-text);
  line-height: 1.2;
}

.th-device-offer-stat-value.th-price {
  color: var(--th-primary);
}

@media (max-width: 575.98px) {
  .th-device-detail-grid,
  .th-device-offer-highlights {
    grid-template-columns: 1fr;
  }

  .th-device-detail-item--wide {
    grid-column: auto;
  }
}

.th-modal-section + .th-modal-section {
  border-top: 1px solid var(--th-border);
  padding-top: 1.25rem;
}

.th-form-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #4b5563;
  margin-bottom: 0.85rem;
}

.th-input-placeholder::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.th-model-select-actions .btn-link,
.th-model-select-actions .th-model-request-link {
  color: var(--th-primary);
  text-decoration: none;
}

.th-model-select-actions .btn-link:hover,
.th-model-select-actions .btn-link:focus,
.th-model-select-actions .th-model-request-link:hover,
.th-model-select-actions .th-model-request-link:focus {
  color: var(--th-primary-dark);
  text-decoration: underline;
}

#modal-add-listing[data-form-mode="edit"] .wts-listing-add-only {
  display: none !important;
}

.th-new-model-panel {
  background: var(--th-primary-soft);
  border-color: rgba(47, 111, 237, 0.2) !important;
}

.th-new-model-panel-icon {
  width: 2.25rem;
  height: 2.25rem;
  background: #fff;
  color: var(--th-primary);
  font-size: 1.1rem;
  border: 1px solid rgba(47, 111, 237, 0.15);
}

.th-file-dropzone {
  position: relative;
  border: 2px dashed #c9d0d9;
  border-radius: 12px;
  background: #fafbfc;
  transition: border-color 0.15s ease, background 0.15s ease;
  cursor: pointer;
}

.th-file-dropzone--over {
  border-color: var(--th-primary);
  background: var(--th-primary-soft);
}

.th-file-dropzone-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.th-file-dropzone-inner {
  position: relative;
  z-index: 1;
  padding: 1.35rem 1rem;
  text-align: center;
  pointer-events: none;
}

.th-file-dropzone-icon {
  font-size: 1.75rem;
  color: var(--th-primary);
  margin-bottom: 0.35rem;
  display: block;
}

.th-file-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.65rem;
}

.th-file-preview-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--th-border);
  background: #f3f4f6;
}

.th-file-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.th-file-preview-badge {
  position: absolute;
  left: 0.35rem;
  bottom: 0.35rem;
  font-size: 0.625rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  pointer-events: none;
}

.th-file-preview-remove {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.65);
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.15s ease;
}

.th-file-preview-remove:hover {
  background: #b91c1c;
}

.th-file-preview-item--library {
  outline: 2px solid var(--th-primary);
  outline-offset: -2px;
}

.th-media-picker-dialog {
  max-width: min(1120px, calc(100vw - 1.5rem));
  width: 100%;
  margin: 0.75rem auto;
}

.th-media-picker-modal .modal-content {
  max-height: calc(100vh - 1.5rem);
  height: min(760px, calc(100vh - 1.5rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 8px;
  border: 1px solid #c3c4c7;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.18);
}

.th-media-picker-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #dcdcde;
  background: #fff;
  flex-shrink: 0;
}

.th-media-picker-topbar-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1d2327;
}

.th-media-picker-filterbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #dcdcde;
  background: #f6f7f7;
  flex-shrink: 0;
}

.th-media-picker-filterbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  min-width: 0;
  flex: 1 1 240px;
}

.th-media-picker-count-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #50575e;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}

.th-media-picker-filterbar-search {
  flex: 0 1 260px;
  width: 100%;
  max-width: 280px;
}

.th-media-picker-search-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #50575e;
  margin-bottom: 0.2rem;
}

.th-media-picker-search {
  position: relative;
}

.th-media-picker-search-input {
  border-radius: 4px;
  border-color: #8c8f94;
  background: #fff;
  min-height: 2rem;
  padding-right: 2rem;
}

.th-media-picker-search-input:focus {
  border-color: var(--th-primary);
  box-shadow: 0 0 0 1px var(--th-primary);
}

.th-media-picker-search-clear {
  position: absolute;
  right: 0.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #646970;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  text-decoration: none;
}

.th-media-picker-workspace {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.th-media-picker-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.th-media-picker-panel {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
}

.th-media-picker-panel .th-media-picker-grid {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.th-media-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  grid-auto-rows: auto;
  gap: 10px;
  padding: 12px;
  align-content: start;
}

.th-media-picker-loading,
.th-media-picker-empty {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 14rem;
  padding: 2rem 1.25rem;
  text-align: center;
  color: #1d2327;
}

.th-media-picker-loading {
  flex-direction: row;
  color: #646970;
  font-size: 0.875rem;
}

.th-media-picker-empty > i {
  font-size: 2rem;
  color: #a7aaad;
  margin-bottom: 0.25rem;
}

.th-media-picker-sidebar {
  width: 300px;
  flex-shrink: 0;
  border-left: 1px solid #dcdcde;
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.th-media-picker-sidebar-head {
  padding: 0.65rem 1rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #50575e;
  border-bottom: 1px solid #dcdcde;
  background: #f6f7f7;
  flex-shrink: 0;
}

.th-media-picker-sidebar-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
}

.th-media-picker-detail-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  max-height: 220px;
  margin-bottom: 0.85rem;
  padding: 0.5rem;
  background:
    linear-gradient(45deg, #e8e8e8 25%, transparent 25%),
    linear-gradient(-45deg, #e8e8e8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8e8e8 75%),
    linear-gradient(-45deg, transparent 75%, #e8e8e8 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-color: #f0f0f1;
  border: 1px solid #dcdcde;
  border-radius: 4px;
}

.th-media-picker-detail-preview img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.th-media-picker-detail-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1d2327;
  word-break: break-word;
  margin-bottom: 0.65rem;
}

.th-media-picker-detail-meta {
  font-size: 0.75rem;
  color: #646970;
  line-height: 1.5;
}

.th-media-picker-detail-meta dt {
  font-weight: 600;
  color: #50575e;
  margin-top: 0.45rem;
}

.th-media-picker-detail-meta dt:first-child {
  margin-top: 0;
}

.th-media-picker-detail-meta dd {
  margin: 0;
  word-break: break-word;
}

.th-media-picker-bottombar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.65rem 1rem;
  border-top: 1px solid #dcdcde;
  background: #f6f7f7;
  flex-shrink: 0;
}

.th-media-picker-bottombar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.65rem;
  min-width: 0;
  flex: 1 1 280px;
}

.th-media-picker-bottombar-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.th-media-picker-selection-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #1d2327;
  white-space: nowrap;
}

.th-media-picker-clear-btn {
  padding: 0;
  font-size: 0.8125rem;
  text-decoration: none;
  color: #b32d2e;
}

.th-media-picker-clear-btn:hover {
  color: #8a2424;
}

.th-media-picker-slots-label {
  white-space: nowrap;
}

.th-media-picker-selected-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.th-media-picker-strip-thumb {
  width: 36px;
  height: 36px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 4px;
  box-shadow: 0 0 0 1px #c3c4c7;
  overflow: hidden;
  background: #f0f0f1;
  cursor: pointer;
}

.th-media-picker-strip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.th-media-picker-strip-thumb.is-active {
  box-shadow: 0 0 0 2px var(--th-primary);
}

.th-media-picker-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  min-width: 0;
}

.th-media-picker-tile:focus-visible {
  outline: 2px solid var(--th-primary);
  outline-offset: 2px;
}

.th-media-picker-tile.is-disabled,
.th-media-picker-tile:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.th-media-picker-tile-frame {
  position: relative;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    linear-gradient(45deg, #e8e8e8 25%, transparent 25%),
    linear-gradient(-45deg, #e8e8e8 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8e8e8 75%),
    linear-gradient(-45deg, transparent 75%, #e8e8e8 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-color: #f0f0f1;
  border: 2px solid transparent;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px #dcdcde;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}

.th-media-picker-tile:hover:not(:disabled) .th-media-picker-tile-frame,
.th-media-picker-tile.is-focused .th-media-picker-tile-frame {
  border-color: #8c8f94;
}

.th-media-picker-tile.is-selected .th-media-picker-tile-frame {
  border-color: var(--th-primary);
  box-shadow: inset 0 0 0 1px var(--th-primary), 0 0 0 1px var(--th-primary);
}

.th-media-picker-tile img {
  max-width: calc(100% - 8px);
  max-height: calc(100% - 8px);
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  pointer-events: none;
}

.th-media-picker-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 3px;
  background: var(--th-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.12s ease, transform 0.12s ease;
  pointer-events: none;
  z-index: 2;
}

.th-media-picker-tile.is-selected .th-media-picker-check {
  opacity: 1;
  transform: scale(1);
}

.th-media-picker-tile-name {
  font-size: 0.6875rem;
  line-height: 1.25;
  color: #50575e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 2px;
}

@media (max-width: 991.98px) {
  .th-media-picker-sidebar {
    display: none;
  }

  .th-media-picker-dialog {
    max-width: calc(100vw - 1rem);
  }

  .th-media-picker-modal .modal-content {
    height: min(680px, calc(100vh - 1rem));
  }
}

@media (max-width: 575.98px) {
  .th-media-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    padding: 8px;
  }

  .th-media-picker-filterbar-search {
    max-width: none;
    flex-basis: 100%;
  }
}

.th-modal-footer-actions {
  padding: 1rem 1.25rem 1.25rem;
  gap: 0.75rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.th-gallery-view {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.th-gallery-hero-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f3f4f6;
  aspect-ratio: 16 / 10;
}

.th-gallery-hero-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: #f3f4f6;
}

.th-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
  z-index: 2;
}

.th-gallery-nav:hover {
  background: #fff;
  color: var(--th-primary);
}

.th-gallery-prev {
  left: 0.65rem;
}

.th-gallery-next {
  right: 0.65rem;
}

.th-gallery-counter {
  position: absolute;
  bottom: 0.65rem;
  right: 0.65rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  border-radius: 6px;
  z-index: 2;
}

.th-gallery-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.th-gallery-thumb-btn {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  width: 56px;
  height: 56px;
  background: #f3f4f6;
  flex-shrink: 0;
}

.th-gallery-thumb-btn.active {
  border-color: var(--th-primary);
}

.th-gallery-thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.th-device-gallery-empty {
  min-height: 200px;
}

.th-row-expand .th-device-info-trigger:hover {
  text-decoration: underline;
  color: var(--th-primary) !important;
}

.th-suppliers-inner-table .th-supplier-line-info:hover {
  text-decoration: underline;
  color: var(--th-primary) !important;
}

.th-table tbody tr.th-model-group-summary > td {
  background-color: #fff;
  border-color: #e5e7eb;
}

.th-table tbody tr.th-model-group-summary.table-active > td,
.th-table tbody tr.th-model-group-summary[data-suppliers-expanded="1"] > td {
  background-color: #fff;
}

.th-table tbody tr.th-model-group-summary[data-suppliers-expanded="1"] > td {
  border-bottom-color: transparent;
  padding-bottom: 0.7rem;
}

.th-table tbody tr.th-model-group-summary[data-suppliers-expanded="1"] + tr.th-detail-row > td {
  border-top: none;
  padding-top: 0;
}

.th-table tbody tr.th-detail-row + tr:not(.th-detail-row) > td {
  border-top: 1px solid #e5e7eb;
}

.th-wts-sep {
  display: inline-block;
  padding: 0 0.35rem;
  color: #9ca3af;
  font-weight: 400;
  line-height: 1;
  user-select: none;
}

.text-muted .th-wts-sep,
.small.text-muted .th-wts-sep {
  color: inherit;
  opacity: 0.85;
}

.th-model-summary-info {
  min-width: 0;
  overflow: visible;
  align-items: center;
}

tbody tr.th-model-group-summary:not(:first-child) td {
  border-top: none;
}

.th-wts-sku-under-group {
  padding-left: 0.5rem;
  margin-left: 0.25rem;
  border-left: 3px solid rgba(47, 111, 237, 0.35);
}

.th-suppliers-inner-table .th-wts-product-cell .th-listing-thumb,
.th-suppliers-inner-table .th-wts-product-cell .th-listing-thumb-placeholder {
  margin-left: 0.15rem;
}

.th-wts-suppliers-slide {
  overflow: hidden;
  max-height: 0;
}

.th-wts-suppliers-slide.th-wts-suppliers-slide-open {
  overflow: visible;
  max-height: none;
}

.th-suppliers-inner-table .th-wts-product-col,
.th-suppliers-inner-table .th-wts-product-cell {
  min-width: 220px;
  overflow: visible;
}

.th-model-summary-swatch {
  z-index: 4;
}

.th-table tbody tr.th-model-group-summary > td {
  overflow: visible;
}

.th-color-swatch-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  vertical-align: middle;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
}

.th-color-swatch-wrap .th-color-swatch {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}

.th-model-summary-swatch.th-color-swatch-wrap {
  width: 15px;
  height: 15px;
}

.th-model-summary-swatch.th-color-swatch-wrap .th-color-swatch {
  width: 15px;
  height: 15px;
}

.th-color-swatch-label {
  position: absolute;
  left: calc(100% + 6px);
  top: 50%;
  margin: 0;
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%);
  transition: opacity 0.15s ease, visibility 0.15s ease;
  z-index: 12;
}

.th-color-swatch-wrap:hover .th-color-swatch-label {
  opacity: 1;
  visibility: visible;
}

.th-color-swatch-wrap:focus,
.th-color-swatch-wrap:focus-visible {
  outline: 2px solid rgba(47, 111, 237, 0.45);
  outline-offset: 2px;
}

.th-color-swatch-wrap:focus .th-color-swatch-label,
.th-color-swatch-wrap:focus-visible .th-color-swatch-label,
.th-color-swatch-wrap:active .th-color-swatch-label {
  opacity: 0;
  visibility: hidden;
}

.th-color-swatch.th-color-swatch--light {
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.14);
  border-color: #94a3b8 !important;
}

.th-color-swatch.th-color-swatch--mix {
  background: linear-gradient(135deg, #2563eb 0%, #dc2626 33%, #16a34a 66%, #ca8a04 100%);
}

.th-color-swatch-label.th-color-swatch-label--mix {
  background: linear-gradient(135deg, #2563eb 0%, #dc2626 33%, #16a34a 66%, #ca8a04 100%);
  color: #ffffff;
}

.th-wts-flag-after-grade {
  line-height: 1;
}

.th-wts-region-badge-inline {
  margin-left: 0;
  font-size: 0.7rem;
  vertical-align: middle;
}

.th-suppliers-inner-table .th-wts-supplier-price-cell {
  min-width: 7rem;
  white-space: nowrap;
}

.th-suppliers-inner-table .th-wts-col-margin {
  min-width: 5.5rem;
  white-space: nowrap;
}

.th-suppliers-inner-table .th-wts-col-actions {
  min-width: 9.5rem;
  white-space: nowrap;
}

.th-suppliers-inner-table .th-wts-supplier-listed-cell {
  padding-left: 1rem;
  min-width: 7.5rem;
}

.th-suppliers-inner-table tbody td {
  padding-top: 0.8rem;
  padding-bottom: 0.8rem;
  vertical-align: middle;
}

.th-account-profile {
  align-items: flex-start;
}

.th-account-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: linear-gradient(145deg, var(--th-primary) 0%, var(--th-primary-dark) 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
}

.th-account-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.th-account-avatar-fallback {
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  user-select: none;
}

.th-account-profile-actions {
  flex: 1 1 12rem;
  min-width: 0;
}

.th-account-card {
  border-radius: 14px;
  max-width: 42rem;
}

.th-account-card .card-body {
  border-radius: 14px;
}

.th-account-fields {
  font-size: 0.9375rem;
}

.th-account-edit-link {
  color: var(--th-primary);
  font-weight: 600;
  font-size: 0.875rem;
}

.th-account-edit-link:hover {
  color: #1d4ed8;
}

.th-account-form .form-control {
  border-color: #dce3ed;
}

.th-account-form .form-control:focus {
  border-color: rgba(47, 111, 237, 0.45);
  box-shadow: 0 0 0 0.2rem rgba(47, 111, 237, 0.12);
}

.th-account-email-readonly {
  background-color: #f1f5f9 !important;
  color: #64748b;
  cursor: default;
}

.th-toast-host {
  position: fixed;
  top: 4.75rem;
  left: 0;
  right: 0;
  z-index: 10100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0 1rem;
  pointer-events: none;
}

.th-toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  max-width: min(24rem, calc(100vw - 2rem));
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
  background: #fff;
  color: #334155;
  border: 1px solid #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12), 0 2px 8px rgba(15, 23, 42, 0.06);
  transform: translateY(calc(-100% - 20px));
  opacity: 0;
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.32s ease;
}

.th-toast__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.8rem;
  line-height: 1;
}

.th-toast__text {
  min-width: 0;
}

.th-toast--in {
  transform: translateY(0);
  opacity: 1;
}

.th-toast--out {
  transform: translateY(calc(-100% - 20px));
  opacity: 0;
}

.th-toast--success .th-toast__icon {
  background: #22c55e;
  color: #fff;
}

.th-toast--danger .th-toast__icon {
  background: #ef4444;
  color: #fff;
}

.th-toast--warning .th-toast__icon {
  background: #f59e0b;
  color: #fff;
}

.th-toast--success,
.th-toast--danger,
.th-toast--warning {
  background: #fff;
  color: #334155;
  border-color: #e2e8f0;
}

@media (max-width: 991.98px) {
  body.th-app {
    overflow-x: hidden;
    overflow-y: auto;
    height: auto;
    min-height: 100dvh;
  }

  .th-app-shell,
  body.th-sidebar-collapsed .th-app-shell {
    padding-left: 0;
    padding-top: var(--th-app-header-height);
    flex-direction: column;
    height: auto;
    min-height: calc(100dvh - var(--th-app-header-height));
    overflow: visible;
  }

  .th-sidebar,
  body.th-sidebar-collapsed .th-sidebar {
    position: relative;
    left: auto;
    top: auto;
    width: 100%;
    height: auto;
    max-height: none;
    z-index: auto;
    overflow: visible;
  }

    body.th-sidebar-collapsed .th-sidebar-label {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    clip: auto;
    overflow: visible;
    white-space: normal;
  }

  body.th-sidebar-collapsed .th-sidebar-nav-group--wts .th-sidebar-submenu-slide,
  body.th-sidebar-collapsed .th-sidebar-nav-group--media .th-sidebar-submenu-slide,
  body.th-sidebar-collapsed .th-sidebar-nav-group--wtb .th-sidebar-submenu-slide {
    display: grid !important;
    grid-template-rows: 0fr !important;
    visibility: hidden !important;
  }

  body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-wts-toggle],
  body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-media-toggle],
  body.th-sidebar-collapsed .th-sidebar-accordion-toggle[data-th-wtb-toggle] {
    display: flex !important;
    justify-content: flex-start;
    padding: 0.5rem 0.75rem;
    gap: 0.65rem;
  }

  .th-sidebar-flyout {
    display: none !important;
  }

  body.th-sidebar-collapsed .th-sidebar-collapse-btn {
    display: none;
  }

  .th-sidebar-nav {
    overflow: visible;
  }

  .th-main-column {
    flex: 1 1 auto;
    min-height: calc(100dvh - var(--th-app-header-height));
    height: auto;
    max-height: none;
  }

  .th-main-column > main {
    overflow-y: visible;
  }
}

.th-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
}

.th-badge--success {
  background: #e6f4ef;
  color: var(--th-green);
}

.th-badge--warning {
  background: #fff4e6;
  color: var(--th-orange);
}

.th-badge--pending {
  background: #f3f4f6;
  color: #6b7280;
}

.th-badge--model {
  background: var(--th-model-soft);
  color: var(--th-model-dark);
}

.th-nav-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.35rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
  color: #fff;
}

.th-nav-tab-badge--warning {
  background: #f59e0b;
}

.th-nav-tab-badge--model {
  background: var(--th-model);
}

.th-nav-tab-badge--muted {
  background: #9ca3af;
}

.th-page-count-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.8rem 0.35rem 0.4rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--th-text);
  white-space: nowrap;
}

.th-page-count-pill--model {
  background: var(--th-model-soft);
  border: 1px solid rgba(99, 102, 241, 0.18);
}

.th-page-count-pill--warning {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
}

.th-page-count-pill--muted {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}

.th-page-count-pill__n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.35rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.th-page-count-pill--model .th-page-count-pill__n {
  background: var(--th-model);
}

.th-page-count-pill--warning .th-page-count-pill__n {
  background: #f59e0b;
}

.th-page-count-pill--muted .th-page-count-pill__n {
  background: #9ca3af;
}

.th-callout {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--th-border);
  font-size: 0.875rem;
  line-height: 1.45;
}

.th-callout--model {
  background: var(--th-model-soft);
  border-color: rgba(99, 102, 241, 0.2);
  color: var(--th-text);
}

.th-callout--model .th-callout-link {
  color: var(--th-model-dark);
  font-weight: 600;
  text-decoration: none;
}

.th-callout--model .th-callout-link:hover {
  color: var(--th-model);
  text-decoration: underline;
}

.th-callout--warning {
  background: #fff4e6;
  border-color: rgba(234, 88, 12, 0.25);
  color: var(--th-text);
}

.th-btn-success {
  background: var(--th-green);
  border-color: var(--th-green);
  color: #fff;
}

.th-btn-success:hover,
.th-btn-success:focus {
  background: var(--th-green-hover);
  border-color: var(--th-green-hover);
  color: #fff;
}

.js-model-reject {
  border-color: #d1d5db;
  color: var(--th-muted);
}

.js-model-reject:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: #fef2f2;
}

.th-wtb-vat-toggle .btn-check:checked + .btn {
  border-color: var(--th-primary) !important;
  color: var(--th-primary);
  background: var(--th-primary-soft);
}

.th-btn-matching {
  background: var(--th-purple);
  border-color: var(--th-purple);
  color: #fff;
  font-weight: 600;
}

.th-btn-matching:hover {
  background: #6d28d9;
  border-color: #6d28d9;
  color: #fff;
}

.th-btn-matching:active,
.th-btn-matching:focus,
.th-btn-matching:focus-visible {
  background: #6d28d9 !important;
  border-color: #6d28d9 !important;
  color: #fff !important;
  box-shadow: 0 0 0 0.2rem rgba(124, 58, 237, 0.35);
}

.th-btn-matching.text-white:active,
.th-btn-matching.text-white:focus,
.th-btn-matching.text-white:focus-visible {
  color: #fff !important;
}

.th-btn-matching:disabled,
.th-btn-matching.disabled {
  background: var(--th-purple) !important;
  border-color: var(--th-purple) !important;
  color: #fff !important;
  opacity: 0.72;
}

.th-wtb-table-responsive .table.th-table {
  table-layout: auto;
  width: 100%;
}

.table.th-table > :not(caption) > * > .th-wtb-actions-col {
  width: 1%;
  white-space: nowrap;
  text-align: end;
  vertical-align: middle;
}

.btn.th-btn-wtb-view {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border-radius: 8px;
  color: #4b5563;
  border-color: #d1d5db;
  background: #fff;
}

.btn.th-btn-wtb-view:hover {
  color: var(--th-primary);
  border-color: #bfd4f8;
  background: var(--th-primary-soft);
}

#wtb-table tbody tr.th-wtb-row:hover {
  background-color: rgba(29, 111, 240, 0.03);
}

.th-wtb-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background:
    linear-gradient(to right, #fff 30%, rgba(255, 255, 255, 0)),
    linear-gradient(to left, #fff 30%, rgba(255, 255, 255, 0)) 100% 0,
    radial-gradient(farthest-side at 0 50%, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0)),
    radial-gradient(farthest-side at 100% 50%, rgba(15, 23, 42, 0.12), rgba(15, 23, 42, 0)) 100% 0;
  background-repeat: no-repeat;
  background-size: 2.5rem 100%, 2.5rem 100%, 0.65rem 100%, 0.65rem 100%;
  background-attachment: local, local, scroll, scroll;
}

.th-wtb-shell .th-table th,
.th-matching-shell .th-table th {
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--th-muted);
  font-weight: 600;
}

.th-main-column > main {
  border: none;
  outline: none;
  box-shadow: none;
}

.th-import-history-card .th-table th:nth-child(2),
.th-import-history-card .th-table td:nth-child(2) {
  min-width: 12.5rem;
  max-width: 16rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.th-wts-table-card .th-table td.th-price,
.th-wts-table-card .th-table th.th-price {
  white-space: nowrap;
  min-width: 6.5rem;
}

.th-matching-shell .th-table td.small {
  max-width: 14rem;
  white-space: normal;
  word-break: break-word;
}

