/* Schindler Global Spare Parts Hub - light theme */
:root {
  --red: #E30613;
  --red-dark: #B90510;
  --red-soft: #FDECEE;
  --ink: #1B1F24;
  --ink-2: #3C4650;
  --muted: #6B7682;
  --line: #E3E7EC;
  --line-2: #EEF1F5;
  --bg: #F6F8FA;
  --card: #FFFFFF;
  --ok: #1F8A4C;
  --warn: #B8791B;
  --info: #1F5FA8;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .05);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", "Helvetica Neue", Arial, "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

/* ---------- top bar ---------- */
.topbar {
  background: #fff; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.topbar-inner {
  max-width: 1360px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo-text { font-size: 17px; font-weight: 700; letter-spacing: .2px; }

.topnav { display: flex; gap: 4px; margin-left: 8px; flex: 1; }
.topnav a {
  padding: 7px 12px; border-radius: 7px; color: var(--ink-2); font-weight: 500;
}
.topnav a:hover { background: var(--line-2); text-decoration: none; }
.topnav a.active { background: var(--red-soft); color: var(--red-dark); }

.top-utils { display: flex; align-items: center; gap: 8px; }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.lang-switch a { padding: 5px 11px; color: var(--muted); font-size: 12px; }
.lang-switch a.active { background: var(--red); color: #fff; }
.lang-switch a:hover { text-decoration: none; }
.currency-chip {
  border: 1px solid var(--line); border-radius: 7px; padding: 5px 10px;
  font-size: 12px; color: var(--ink-2); background: #fff;
}
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px;
  border: 1px solid var(--line); border-radius: 20px; background: #fff;
}
.avatar {
  width: 26px; height: 26px; border-radius: 50%; background: var(--red-soft);
  color: var(--red-dark); font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.user-chip .who { font-size: 12px; color: var(--ink-2); }
.user-chip .role { font-size: 10px; color: var(--muted); display: block; }

/* ---------- search + brand bar ---------- */
.searchbar { background: #fff; border-bottom: 1px solid var(--line); }
.searchbar-inner { max-width: 1360px; margin: 0 auto; padding: 14px 20px; display: flex; gap: 14px; align-items: center; }
.searchbox { flex: 1; position: relative; }
.searchbox input {
  width: 100%; padding: 12px 130px 12px 42px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink);
}
.searchbox input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(227, 6, 19, .1); }
.searchbox .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbox .btn-search {
  position: absolute; right: 5px; top: 5px; bottom: 5px; padding: 0 20px;
  background: var(--red); color: #fff; border: none; border-radius: 6px; cursor: pointer; font-weight: 600;
}
.searchbox .btn-search:hover { background: var(--red-dark); }

.brandbar { background: #fff; border-bottom: 1px solid var(--line); }
.brandbar-inner {
  max-width: 1360px; margin: 0 auto; padding: 0 20px; display: flex; gap: 4px; overflow-x: auto;
}
.brandbar a {
  padding: 11px 16px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  border-bottom: 3px solid transparent; white-space: nowrap;
}
.brandbar a:hover { color: var(--red); text-decoration: none; }
.brandbar a.active { color: var(--red-dark); border-bottom-color: var(--red); }

/* ---------- layout ---------- */
.wrap { max-width: 1360px; margin: 0 auto; padding: 18px 20px 60px; }
.sidebar { width: 236px; flex: 0 0 236px; }
.main { flex: 1; min-width: 0; }
.layout { display: flex; gap: 18px; align-items: flex-start; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.panel-hd { padding: 12px 16px; border-bottom: 1px solid var(--line-2); font-weight: 700; font-size: 13px; display: flex; justify-content: space-between; align-items: center; }
.panel-bd { padding: 12px 16px; }

.navgroup { margin-bottom: 6px; }
.navgroup > .navgroup-title {
  padding: 8px 10px; font-size: 12px; font-weight: 700; color: var(--ink);
  text-transform: uppercase; letter-spacing: .5px; display: flex; justify-content: space-between; cursor: pointer;
}
.navgroup > .navgroup-title:hover { color: var(--red); }
.navgroup ul { list-style: none; margin: 0; padding: 0 0 4px 0; }
.navgroup li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 10px 7px 14px; color: var(--ink-2); font-size: 13px; border-radius: 6px;
}
.navgroup li a:hover { background: var(--line-2); color: var(--red); text-decoration: none; }
.navgroup li a.active { background: var(--red-soft); color: var(--red-dark); font-weight: 600; }
.navgroup li .chev { color: var(--muted); font-size: 11px; }
.navgroup li ul { padding-left: 12px; }
.navgroup li ul a { font-size: 12px; color: var(--muted); padding: 6px 10px; }
.navgroup li ul a.active { color: var(--red-dark); background: var(--red-soft); }

/* ---------- cards / grids ---------- */
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(206px, 1fr)); gap: 14px; }
.cat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0; display: block; color: var(--ink); transition: .15s; overflow: hidden;
}
.cat-card:hover { border-color: var(--red); box-shadow: var(--shadow); text-decoration: none; transform: translateY(-1px); }
.cat-card .cc-thumb {
  aspect-ratio: 16 / 9; width: 100%; border-radius: 0; background: linear-gradient(135deg, #F2F5F8, #E7ECF2);
  display: flex; align-items: center; justify-content: center; font-size: 26px; color: #9AA6B2;
  overflow: hidden;
}
.cat-card .cc-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat-card .cc-body { padding: 10px 14px 12px; }
.cat-card .cc-name { font-weight: 600; font-size: 13px; }
.cat-card .cc-meta { font-size: 11px; color: var(--muted); margin-top: 2px; }

.section-title { font-size: 15px; font-weight: 700; margin: 22px 0 10px; display: flex; justify-content: space-between; align-items: flex-end; }
.section-title .more { font-size: 12px; font-weight: 500; color: var(--red); }

/* ---------- product list ---------- */
.prod-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.prod {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; transition: .15s;
}
.prod:hover { box-shadow: var(--shadow); border-color: #D7DDE4; }
.prod-img {
  flex: none; width: 100%; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #F3F6F9, #E9EEF3);
  display: flex; align-items: center; justify-content: center; color: #A7B2BD; font-size: 13px; position: relative;
}
.prod-img img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.prod-img .badge-oem {
  position: absolute; left: 8px; top: 8px; background: rgba(27, 31, 36, .82); color: #fff;
  font-size: 11px; padding: 2px 8px; border-radius: 4px; font-weight: 600;
}
/* supply status dot in the top-right corner of the picture box */
.prod-img .status-dot {
  position: absolute; right: 10px; top: 10px; width: 12px; height: 12px; border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .9);
}
.status-dot.st-active { background: #2E9E5B; }
.status-dot.st-disc { background: #C0392B; }
.prod-bd { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.prod-pn { font-family: "Consolas", "SFMono-Regular", monospace; font-size: 13px; font-weight: 700; color: var(--ink); }
.prod-desc { font-size: 12.5px; color: var(--ink-2); min-height: 34px; }
.prod-meta { font-size: 11.5px; color: var(--muted); }
.prod-row { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; border-top: 1px dashed var(--line-2); }
.price { font-size: 17px; font-weight: 700; color: var(--red); }

/* ---------- pagination ---------- */
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; }
.pager .pg-btn {
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 7px; background: #fff;
  color: var(--ink-2); font-size: 13px; font-weight: 500; white-space: nowrap;
}
.pager .pg-btn:hover { border-color: var(--red); color: var(--red); text-decoration: none; }
.pager .pg-info { font-size: 12.5px; color: var(--muted); }
.price small { font-size: 11px; color: var(--muted); font-weight: 500; }
.lead { font-size: 11.5px; color: var(--muted); }

/* ---------- product detail ---------- */
.detail-grid { display: grid; grid-template-columns: 380px 1fr; gap: 18px; align-items: start; }
.detail-img {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
}
.detail-img .ph { height: 320px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #F3F6F9, #E9EEF3); color: #A7B2BD; }
.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { padding: 9px 12px; border-bottom: 1px solid var(--line-2); font-size: 13px; text-align: left; vertical-align: top; }
.spec-table th { width: 190px; color: var(--muted); font-weight: 500; background: #FAFBFC; }
.spec-table td { color: var(--ink); }
.spec-table .mono { font-family: "Consolas", monospace; font-weight: 600; }

/* ---------- table ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); text-align: left; vertical-align: middle; }
.tbl th { background: #FAFBFC; color: var(--muted); font-weight: 600; font-size: 12px; }
.tbl tbody tr:hover { background: #FCFDFE; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.mono { font-family: "Consolas", "SFMono-Regular", monospace; }

/* ---------- buttons / forms ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 7px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer;
  font-size: 13px; font-weight: 500; font-family: inherit;
}
.btn:hover { border-color: #C9D2DA; text-decoration: none; }
.btn-primary { background: var(--red); border-color: var(--red); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px;
  font-size: 13px; font-family: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px rgba(227, 6, 19, .1); }
.form-inline { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.form-inline .field { margin-bottom: 0; }

/* ---------- misc ---------- */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-PENDING { background: #FFF4E0; color: var(--warn); }
.badge-CONFIRMED { background: #E7F0FB; color: var(--info); }
.badge-SHIPPED { background: #E6F4EC; color: var(--ok); }
.badge-CLOSED { background: #EEF1F5; color: var(--muted); }
.badge-CANCELLED { background: #FDECEE; color: var(--red-dark); }
.badge-OPEN { background: #FFF4E0; color: var(--warn); }
.badge-CONVERTED { background: #E6F4EC; color: var(--ok); }
.badge-admin { background: var(--red-soft); color: var(--red-dark); }
.badge-muted { background: #EEF1F5; color: var(--muted); }

.alert { padding: 11px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; }
.alert-ok { background: #E6F4EC; color: #14663A; border: 1px solid #BFE3CE; }
.alert-err { background: var(--red-soft); color: var(--red-dark); border: 1px solid #F6CFD3; }
.alert-info { background: #E7F0FB; color: #17497F; border: 1px solid #C7DEF6; }
.alert-warn { background: #FFF6E6; color: #8A5A0B; border: 1px solid #F0DDB4; }

.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .big { font-size: 34px; opacity: .35; margin-bottom: 8px; }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.kpi .k { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 18px; font-weight: 700; margin-top: 2px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; font-size: 13px; color: var(--ink-2); border-bottom: 2px solid transparent; font-weight: 500; }
.tabs a.active { color: var(--red-dark); border-bottom-color: var(--red); font-weight: 600; }
.tabs a:hover { text-decoration: none; color: var(--red); }

.footer { border-top: 1px solid var(--line); background: #fff; margin-top: 40px; }
.footer-inner { max-width: 1360px; margin: 0 auto; padding: 18px 20px; color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

.note { font-size: 12px; color: var(--muted); }
.hidden-row { display: none; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb12 { margin-bottom: 12px; }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; }

/* ---------- form / page furniture ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px;
             margin-bottom: 16px; flex-wrap: wrap; }
.page-title { font-size: 21px; font-weight: 700; margin: 0 0 4px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0 14px; }
.form-grid .field { min-width: 0; }
.form-grid .grow2 { grid-column: span 2; }
.form-grid .grow3 { grid-column: span 3; }

/* three-step guidance */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 18px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.step-n { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
          border-radius: 50%; background: var(--red); color: #fff; font-size: 12.5px; font-weight: 700; margin-bottom: 9px; }
.step h3 { font-size: 14px; margin: 0 0 5px; font-weight: 650; }
.step p { font-size: 12.5px; color: var(--muted); margin: 0 0 11px; line-height: 1.55; }

/* dropzone */
.dropzone { border: 2px dashed var(--line); border-radius: 10px; padding: 26px 18px; text-align: center;
            background: #FBFCFD; transition: border-color .15s, background .15s; }
.dropzone.dragover { border-color: var(--red); background: var(--red-soft); }
.dropzone .dz-icon { font-size: 30px; opacity: .35; }
.dropzone .dz-text { font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.dropzone .dz-sub { font-size: 12px; color: var(--muted); margin-top: 4px; }
.dropzone input[type=file] { margin-top: 12px; }
.dz-name { margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--red-dark); }

.mt4 { margin-top: 4px; }

/* image slots (product drawings) */
.img-slots { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.img-slot { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: #FBFCFD; }
.img-slot-hd { font-size: 12.5px; font-weight: 650; color: var(--ink-2); margin-bottom: 9px; }
.img-preview { height: 170px; border: 1px dashed var(--line); border-radius: 6px; background: #fff;
               display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 10px; }
.img-preview img { max-width: 100%; max-height: 100%; object-fit: contain; cursor: pointer; }
.img-empty { text-align: center; color: #C3CBD4; }
.img-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.img-form input[type=file] { font-size: 12px; flex: 1; min-width: 150px; }

/* selected pictures list on the create form (compact rows + click preview) */
.pic-chooser { display: flex; gap: 14px; align-items: flex-start; margin-top: 6px; flex-wrap: wrap; }
.pic-list { display: flex; flex-direction: column; gap: 3px; flex: 1 1 320px; min-width: 280px; max-width: 430px; }
.pic-item { display: flex; align-items: center; gap: 6px; padding: 1px 8px;
            border: 1px solid var(--line); border-radius: 8px; background: #fafbfc; font-size: 12px; cursor: pointer; }
.pic-item:hover { border-color: var(--ink); }
.pic-item.active { border-color: var(--ink); background: #eef2f7; }
.pic-item.primary { border-color: var(--red); background: #fff5f5; }
.pic-item.primary.active { background: #ffe9e9; }
.pic-idx { flex: none; width: 16px; height: 16px; border-radius: 50%; background: var(--ink);
           color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.pic-item.primary .pic-idx { background: var(--red); }
.pic-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pic-size { flex: none; color: var(--muted); font-size: 11px; }
.pic-primary { flex: none; font-size: 11px; cursor: pointer; white-space: nowrap;
               color: var(--red); font-weight: 600; }
.pic-primary input { margin: 0 3px 0 0; vertical-align: -2px; cursor: pointer; }
.pic-preview { flex: none; width: 210px; border: 1px solid var(--line); border-radius: 8px;
               background: #fafbfc; padding: 8px; text-align: center; }
.pic-preview img { max-width: 100%; max-height: 170px; object-fit: contain; border-radius: 4px; background: #fff; }
.pic-preview-name { font-size: 11px; color: var(--muted); margin-top: 5px; word-break: break-all; }
.img-add { border-top: 1px dashed var(--line); padding-top: 14px; }
.img-add .img-form input[type=file] { max-width: 420px; }

/* drawing thumbnails on the detail page */
.thumb-row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.thumb { width: 76px; height: 62px; border: 1px solid var(--line); border-radius: 6px;
          background: #fff; cursor: pointer; object-fit: contain; padding: 3px; }
.thumb.on { border-color: var(--red); box-shadow: 0 0 0 2px rgba(227, 6, 19, .14); }

/* main picture: clicking opens the full-screen viewer in a new tab */
.detail-img-link { position: relative; display: block; cursor: zoom-in; }
.detail-img-link img { width: 100%; height: auto; max-height: 420px; object-fit: contain; background: #fff; }
.detail-img-cta {
  position: absolute; right: 10px; bottom: 10px; background: rgba(16, 24, 40, .72); color: #fff;
  font-size: 12px; padding: 6px 10px; border-radius: 20px; pointer-events: none;
  opacity: 0; transition: opacity .15s ease;
}
.detail-img-link:hover .detail-img-cta { opacity: 1; }
@media (hover: none) { .detail-img-cta { opacity: .92; } }

/* login */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #F6F8FA 0%, #EDF1F5 100%); }
.login-card { width: 380px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.login-card h1 { font-size: 19px; margin: 14px 0 4px; }
.login-card .sub { color: var(--muted); font-size: 12.5px; margin-bottom: 20px; }

@media (max-width: 980px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; flex: none; }
  .detail-grid { grid-template-columns: 1fr; }
  /* keep the desktop header framework on tablets/phones: logo + utils row,
     then the nav as a full-width horizontally scrollable strip below it */
  .topbar-inner { flex-wrap: wrap; row-gap: 4px; }
  .logo { flex: none; }
  .logo-text { white-space: nowrap; }
  .top-utils { margin-left: auto; flex-wrap: wrap; justify-content: flex-end; row-gap: 6px; }
  .topnav {
    order: 3; flex-basis: 100%; margin-left: 0; overflow-x: auto;
    -webkit-overflow-scrolling: touch; padding-bottom: 4px;
  }
  .topnav a { white-space: nowrap; }
}

@media (max-width: 720px) {
  .form-grid .grow2, .form-grid .grow3 { grid-column: span 1; }
  .topbar-inner { padding: 8px 12px; gap: 8px; }
  .logo-text { font-size: 15px; }
  .lang-switch a { padding: 5px 8px; }
  .currency-chip { padding: 5px 7px; }
  .user-chip { padding: 3px 8px 3px 3px; }
  .user-chip .who {
    display: inline-block; max-width: 120px; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; vertical-align: bottom;
  }
  .topbar .btn-sm { padding: 5px 9px; font-size: 12px; }
  .topnav a { padding: 7px 10px; font-size: 13px; }
  .searchbar-inner { padding: 10px 12px; gap: 8px; }
  .searchbox input { padding: 10px 78px 10px 36px; font-size: 13px; }
  .searchbox .btn-search { padding: 0 14px; }
  .btn-cam { font-size: 16px; }
  .brandbar-inner { padding: 0 12px; }
  .brandbar a { padding: 10px 12px; font-size: 12.5px; }
  .wrap { padding: 12px 12px 40px; }
}

/* ---- category breadcrumb + level chips (4-level taxonomy) ---- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--red); }
.crumbs a.on { color: var(--ink); font-weight: 600; }
.crumbs .sep { color: #C3CAD3; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-block; padding: 5px 12px; border: 1px solid var(--line); border-radius: 999px;
        background: #fff; color: var(--ink-2); font-size: 12.5px; text-decoration: none; }
.chip:hover { border-color: var(--red); color: var(--red); background: var(--red-soft); }

/* ---- auto translate helpers ---- */
.tr-btn { margin-left: 8px; font-size: 11.5px; padding: 2px 8px; vertical-align: middle; }
.tr-btn:disabled { opacity: .55; cursor: wait; }
.tr-ok { outline: 2px solid #9FC7EF; border-radius: 4px; transition: outline-color .4s; }

/* ---- custom file picker ---- */
.file-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.file-wrap { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; }
.file-name { max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* RFQ new: E & E radio options */
.ee-cell .ee-opt { display: flex; align-items: center; gap: 4px; font-size: 12px; color: #3C4650; white-space: nowrap; margin: 2px 0; }
.ee-cell .ee-opt input { margin: 0; }

/* material review states */
.badge-active { background: #E6F4EC; color: var(--ok); }
.badge-pending { background: #FFF4E0; color: var(--warn); }
.badge-rejected { background: #FDECEE; color: var(--red-dark); }
.badge-draft { background: #EEF1F5; color: var(--muted); }

/* ---- hub owner approval strip (admin) ---- */
.approval-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: #FFF8E8; border: 1px solid #F0DDB4; border-radius: 8px; padding: 8px 14px; }
.as-title { font-weight: 700; font-size: 13px; color: #8A5A0B; }
.as-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #5A6472; background: #fff; border: 1px solid #E3E7EC; border-radius: 20px; padding: 3px 12px; text-decoration: none; }
.as-item:hover { border-color: #F0DDB4; }
.as-item b { font-size: 12.5px; }
.as-hot { background: #FDECEE; border-color: #F3C2C8; color: var(--red-dark); font-weight: 700; }

/* ---- pending edit diff ---- */
.pe-new { color: #1E6B3A; background: #F0F8F1; font-weight: 600; }

/* ---- delete request box (supplier form) ---- */
.badge-warn { background: #FFF4E0; color: #8A5A0B; }
.btn-danger { background: var(--red-dark, #B03A48); color: #fff; border-color: var(--red-dark, #B03A48); }
.btn-danger:hover { filter: brightness(.92); }
.delreq-box { margin-top: 8px; }
.delreq-box > summary { display: inline-flex; cursor: pointer; list-style: none; }
.delreq-box > summary::-webkit-details-marker { display: none; }
.delreq-form { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; max-width: 460px; }
.delreq-form textarea { width: 100%; }
.inline-form { display: inline-flex; margin-left: 8px; }

/* supplier revision note in the pending-edits queue */
.pe-note-cell { max-width: 240px; overflow-wrap: anywhere; font-size: 12.5px; color: #3C4650; }

/* discontinued (supplier asked to phase the part out) */
.badge-discontinued { background: #FDECEE; color: var(--red-dark); }
.badge-archived { background: #EEF1F5; color: #475569; }
.price.muted { color: #99A1AC; }

/* ---- search by picture ---- */
.imgq-form { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.imgq-drop { flex: none; width: 190px; height: 143px; border: 2px dashed var(--line);
  border-radius: 10px; background: #fafbfc; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 6px; cursor: pointer;
  overflow: hidden; position: relative; }
.imgq-drop:hover { border-color: var(--red); background: #fff7f7; }
.imgq-drop img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.imgq-icon { font-size: 26px; line-height: 1; }
.imgq-pick { font-size: 12px; color: var(--muted); }
.imgq-drop input[type="file"] { display: none; }
.imgq-side { flex: 1 1 320px; min-width: 260px; }
.imgq-err { margin-top: 10px; font-size: 13px; color: var(--red); background: #fff5f5;
  border: 1px solid #f3d3d3; border-radius: 8px; padding: 8px 12px; }
.imgq-score { position: absolute; right: 8px; bottom: 8px; background: rgba(27, 31, 36, .82);
  color: #fff; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; }
.btn-cam { display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 38px; height: 38px; border-radius: 8px; background: #fff; border: 1px solid var(--line);
  font-size: 17px; margin-left: 8px; }
.btn-cam:hover { border-color: var(--red); }
