:root {
  --navy: #0f2a44;
  --navy-2: #163a5f;
  --teal: #0d9488;
  --teal-dark: #0f766e;
  --bg: #f3f6f9;
  --card: #ffffff;
  --border: #d8e0ea;
  --text: #1e293b;
  --muted: #64748b;
  --danger: #dc2626;
  --ok: #059669;
  --warn: #d97706;
  --shadow: 0 8px 24px rgba(15, 42, 68, 0.08);
  --radius: 14px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: var(--font); color: var(--text); background: var(--bg); }
a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; padding: 10px 16px; font-weight: 600;
  cursor: pointer; font-size: 14px; text-decoration: none;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); text-decoration: none; }
.btn-primary:disabled,
.btn-primary:disabled:hover {
  background: var(--teal);
  color: #fff;
  opacity: 0.72;
  cursor: default;
}
.btn-secondary { background: #e8eef5; color: var(--navy); }
.btn-outline {
  background: transparent;
  border: 1px solid var(--teal);
  color: var(--teal-dark);
}
.btn-outline:hover { background: #f0fdfa; text-decoration: none; }
.btn-ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
.order-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.inline-inquire-form { display: inline; margin: 0; }
.btn-danger { background: #fee2e2; color: var(--danger); }
.btn-danger-solid {
  background: #b91c1c;
  color: #fff;
  border: 1px solid #991b1b;
  font-weight: 700;
}
.btn-danger-solid:hover {
  background: #991b1b;
  color: #fff;
  text-decoration: none;
}
.inline-delete-form { display: inline; margin: 0; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 8px; }
.input, select, textarea {
  width: 100%; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px; font-size: 14px; background: #fff; color: var(--text);
}
textarea { min-height: 80px; resize: vertical; }
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.field { margin-bottom: 14px; }
.flash {
  padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px;
}
.flash.ok { background: #ecfdf5; color: var(--ok); border: 1px solid #a7f3d0; }
.flash.err { background: #fef2f2; color: var(--danger); border: 1px solid #fecaca; }

/* Auth / picker */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center;
  background: linear-gradient(145deg, #0f2a44 0%, #0d4f5f 55%, #0d9488 100%);
  padding: 24px;
}
.auth-card {
  width: min(420px, 100%); background: #fff; border-radius: 18px;
  padding: 32px 28px; box-shadow: 0 20px 50px rgba(0,0,0,.25);
}
.auth-card h1 { margin: 0 0 6px; font-size: 24px; color: var(--navy); text-align: center; }
.auth-card .sub { color: var(--muted); margin-bottom: 22px; font-size: 14px; text-align: center; }
.brand-dot {
  width: 56px; height: 56px; border-radius: 50%;
  background: transparent;
  display: grid; place-items: center; color: var(--teal); font-weight: 800;
  margin: 0 auto 16px auto;
}
.brand-dot svg { width:56px; height:56px; display:block; }
.error-box { background: #fef2f2; color: var(--danger); padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }

.picker-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px; width: min(760px, 100%);
}
.picker-card {
  background: #fff; border-radius: 18px; padding: 24px; text-align: left;
  border: 2px solid transparent; cursor: pointer; box-shadow: var(--shadow);
  transition: .15s ease; width: 100%;
}
.picker-card:hover { border-color: var(--teal); transform: translateY(-2px); }
.picker-card h2 { margin: 0 0 6px; color: var(--navy); font-size: 20px; }
.picker-card p { margin: 0; color: var(--muted); font-size: 13px; }
.picker-badge {
  display: inline-block; margin-bottom: 12px; padding: 4px 10px; border-radius: 999px;
  background: #ecfeff; color: var(--teal-dark); font-size: 12px; font-weight: 700;
}

/* App shell */
.shell { min-height: 100vh; display: grid; grid-template-columns: 240px 1fr; }
.sidebar {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff; padding: 20px 16px; display: flex; flex-direction: column; gap: 8px;
}
.sidebar .logo { font-weight: 800; font-size: 18px; margin-bottom: 4px; }
.sidebar .co {
  font-size: 12px; opacity: .8; margin-bottom: 18px; padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}
.sidebar a.nav {
  color: #dbeafe; padding: 10px 12px; border-radius: 10px; font-size: 14px; font-weight: 600;
}
.sidebar a.nav:hover, .sidebar a.nav.active {
  background: rgba(13,148,136,.35); color: #fff; text-decoration: none;
}
.sidebar .sidebar-divider {
  height: 1px; border: 0; background: rgba(255,255,255,.4);
  margin: 12px 4px 10px; flex-shrink: 0; width: auto;
}
.sidebar .userbox { font-size: 12px; opacity: .85; line-height: 1.5; }
.main { padding: 22px 26px 40px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 18px; gap: 12px; flex-wrap: wrap;
}
.topbar h1 { margin: 0; font-size: 22px; color: var(--navy); }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px;
}
.grid-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.muted { color: var(--muted); font-size: 13px; }
.detail-value {
  display: block;
  font-weight: 700;
  color: var(--text);
  white-space: pre-wrap;
}
.detail-field { margin-bottom: 12px; }
.detail-field:last-child { margin-bottom: 0; }
.order-info-notes {
  margin-top: 0;
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
}
.order-info-notes .detail-field {
  margin-bottom: 0;
  padding: 6px 0;
}
.order-info-notes .detail-field + .detail-field {
  border-top: 1px solid var(--border);
  padding-top: 6px;
}

.order-info-grid {
  row-gap: 0;
  column-gap: 12px;
  align-items: stretch;
  overflow: hidden;
}
.order-info-grid > * {
  position: relative;
  padding: 6px 0;
  min-width: 0;
}
.order-info-grid > *:nth-child(-n+3) {
  padding-top: 0;
}
/* One light hairline between visual 3-column rows, not around each field. */
.order-info-grid > *:nth-child(3n+1):not(:first-child)::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: calc(300% + 24px);
  border-top: 1px solid var(--border);
  pointer-events: none;
}
.order-info-grid > .inquire-actions {
  grid-column: 1 / -1;
}
.order-info-grid > .inquire-actions::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  border-top: 1px solid var(--border);
  pointer-events: none;
}
/* One blank line under row 3 values, then the divider (notes on office). */
.order-info-grid > *:nth-child(7),
.order-info-grid > *:nth-child(8),
.order-info-grid > *:nth-child(9) {
  padding-bottom: 1em;
}
/* Customer: Request update lives in the row-3 third cell, not a full-width fourth row. */
/* Customer only: one blank line under the new row 2 (PI No., Incoterms, Route), then the hairline. */
.order-info-grid-customer > *:nth-child(4),
.order-info-grid-customer > *:nth-child(5),
.order-info-grid-customer > *:nth-child(6) {
  padding-bottom: 1em;
}
.order-info-grid-customer > .inquire-actions {
  grid-column: auto;
}
.order-info-grid-customer > .inquire-actions::before {
  content: none;
  border: none;
}
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.table th { font-size: 12px; color: var(--muted); font-weight: 700; }
.badge {
  display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: #e0f2fe; color: #075985;
}
.badge.done { background: #d1fae5; color: #065f46; }
.badge.pending { background: #fef3c7; color: #92400e; }
.badge.warn { background: #ffedd5; color: #9a3412; }
.lines-editor input { margin-bottom: 0; }
.lines-editor td { padding: 6px 4px; }
.pipeline {
  display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 16px;
}
.pipeline span {
  font-size: 11px; padding: 4px 8px; border-radius: 999px; background: #eef2f7; color: var(--muted);
}
.pipeline span.current { background: var(--teal); color: #fff; }
.doc-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 4px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.doc-item:last-child { border-bottom: none; }
.doc-item-main {
  display: contents;
}
.doc-item-title {
  grid-column: 1 / -1;
  display: block;
  margin-bottom: 0;
}
.doc-item-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 8px;
  row-gap: 4px;
  min-width: 0;
  grid-column: 1;
}
.doc-item-meta > .badge {
  grid-column: 1;
  grid-row: 1;
}
.doc-item-files {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  grid-column: 2;
}
.doc-item-filename,
.doc-item-updated {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-item-updated {
  grid-column: 3;
  grid-row: 1;
}
.doc-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
  grid-column: 2;
  align-self: start;
}
.doc-upload-form {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  flex-wrap: nowrap;
}
.doc-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.doc-upload-form label.btn {
  display: inline-flex;
  margin-bottom: 0;
  color: inherit;
  font-weight: 600;
}
.doc-file-name {
  display: inline-block;
  max-width: 140px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.doc-file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.doc-file-row .doc-item-filename { flex: 1 1 auto; }
.doc-remove-form { flex: 0 0 auto; }
a.doc-item-filename {
  color: var(--navy);
  font-weight: 600;
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.doc-item-filename:hover { text-decoration: underline; }
.doc-remove-form { margin: 0; display: inline-flex; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; }
.stat .n { font-size: 22px; font-weight: 800; color: var(--navy); }
.stat .l { font-size: 12px; color: var(--muted); }
.sidebar-customer {
  gap: 6px;
  padding: 22px 18px;
}
.sidebar-customer .app-brand {
  text-align: center;
  margin: 0 0 14px;
}
.sidebar-customer .logo {
  font-size: 16px;
  font-weight: 800;
  color: #e2e8f0;
  margin: 0;
  text-align: center;
  line-height: 1.2;
}
.sidebar-customer .co {
  font-size: inherit;
  opacity: 1;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255,255,255,.18);
  text-align: center;
}
.sidebar-customer .customer-identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}
.sidebar-customer .customer-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  flex: 0 1 auto;
}
.sidebar-customer .customer-identity .co-name {
  margin: 0;
}
.sidebar-customer .customer-name {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  margin: 0 0 10px;
  overflow-wrap: anywhere;
  text-align: center;
}
.sidebar-customer .co-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #cbd5e1;
  margin: 2px 0 0;
}
.sidebar-customer a.switch-company {
  display: inline-block;
  margin-top: 8px;
  color: #5eead4;
  font-size: 12px;
  font-weight: 600;
}
.sidebar-customer .sidebar-divider {
  margin: 14px 4px 8px;
}
.sidebar-customer .userbox {
  font-size: 12px;
  opacity: 1;
  line-height: 1.45;
}
.sidebar-customer .userbox-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}
.sidebar-customer .userbox-role {
  color: #94a3b8;
  margin-top: 2px;
}
.sidebar-customer .userbox-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
}
.sidebar-customer .userbox-actions a {
  color: #5eead4;
  font-size: 12px;
  font-weight: 600;
}
.sidebar-customer .userbox-actions a:hover {
  color: #ccfbf1;
  text-decoration: underline;
}
.sidebar-customer .lang-toggle-form {
  margin: 10px 0 0;
}
.sidebar-customer .btn-lang-toggle {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid #5eead4;
  border-radius: 6px;
  background: transparent;
  color: #5eead4;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
}
.sidebar-customer .btn-lang-toggle:hover {
  background: rgba(94, 234, 212, 0.12);
  color: #ccfbf1;
}
.sidebar-customer .sidebar-footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.sidebar-customer .sidebar-footer-links a {
  color: #5eead4;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
}
.sidebar-customer .sidebar-footer-links a:hover {
  color: #ccfbf1;
  text-decoration: underline;
}

.sidebar-office .office-brand {
  text-align: center;
  margin: 0 0 8px;
}
.sidebar-office .office-logo-wrap {
  margin: 0 0 12px;
}
.sidebar-office .office-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  flex: 0 1 auto;
}
.sidebar-office .logo {
  text-align: center;
  margin: 0;
  line-height: 1.2;
}
.sidebar-office .co-name {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.2;
  color: #cbd5e1;
  margin: 2px 0 0;
}
.sidebar-office .co {
  text-align: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
}
.sidebar-office a.switch-company {
  display: inline-block;
  color: #5eead4;
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .sidebar .sidebar-divider { width: 100%; }
  .sidebar-customer .logo,
  .sidebar-customer .co,
  .sidebar-office .office-brand,
  .sidebar-office .co { width: 100%; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .inquire-align-row { grid-template-columns: 1fr; }
  .inquire-row-spacer { display: none; }
  .order-info-grid > *:not(:first-child) {
    padding-top: 6px;
  }
  .order-info-grid > *:nth-child(-n+3):not(:first-child)::before,
  .order-info-grid > *:nth-child(n+4)::before,
  .order-info-grid > .inquire-actions::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    border-top: 1px solid var(--border);
    pointer-events: none;
  }
  .order-info-grid > *:nth-child(7),
  .order-info-grid > *:nth-child(8) {
    padding-bottom: 6px;
  }
  .order-info-grid > *:nth-child(9) {
    padding-bottom: 1em;
  }
  .order-info-grid-customer > *:nth-child(4),
  .order-info-grid-customer > *:nth-child(5) {
    padding-bottom: 6px;
  }
  .order-info-grid-customer > *:nth-child(6) {
    padding-bottom: 1em;
  }
}

.filter-bar { margin-bottom: 14px; padding: 12px 16px; }
.filter-form { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-form label { margin: 0; font-size: 13px; }
.status-filter { width: auto; min-width: 160px; }
.inline-status-form { margin: 0; }
.status-select {
  width: auto; min-width: 128px; padding: 6px 8px; font-size: 13px;
  border-radius: 8px; background: #f0fdfa; border-color: #99f6e4; font-weight: 600;
}
.status-select option:disabled,
select option:disabled {
  color: #9ca3af;
  background: #f3f4f6;
}

.parts-search-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.parts-search-form .field { min-width: 260px; }

.spec-search-form { display: flex; flex-direction: column; gap: 14px; }
.spec-search-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.spec-search-form .field { min-width: 200px; margin-bottom: 0; flex: 1 1 200px; }
.spec-search-form .field-size { flex: 2 1 280px; min-width: 260px; }
.spec-search-submit { align-self: flex-end; flex: 0 0 auto; }
.spec-search-range { display: flex; gap: 8px; align-items: center; }
.spec-search-range .input { min-width: 96px; }
.spec-search-coil {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0; color: var(--text); white-space: nowrap; flex: 0 0 auto;
}
.spec-search-coil input { width: auto; margin: 0; accent-color: var(--teal); }
.spec-agg { margin-top: 16px; }
.spec-agg-title { margin: 0 0 14px; font-size: 18px; color: var(--navy); }

.pay-summary {
  display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px;
  padding: 10px 12px; background: #f0fdfa; border-radius: 10px; font-size: 13px;
}
.pay-form { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

.title-row {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap; min-width: 0;
}
.title-row h1 { margin: 0; }
.title-status-form {
  display: inline-flex; align-items: center; gap: 8px;
}
.title-status-label {
  margin: 0; font-size: 13px; color: var(--muted); font-weight: 700;
}
.title-status-select {
  min-width: 148px; font-size: 14px; padding: 8px 10px;
  background: #ecfeff; border-color: var(--teal); color: var(--navy);
}

.status-col-head { vertical-align: bottom; }
.header-status-filter {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  margin: 0;
}
.header-status-filter label {
  margin: 0; font-size: 12px; color: var(--muted); font-weight: 700;
}
.header-status-select {
  min-width: 132px; padding: 6px 8px; font-size: 13px;
  background: #fff7ed; border-color: #fdba74; font-weight: 700; color: var(--navy);
}

.owner-switch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; padding: 6px 12px; border-radius: 999px;
  background: #e8eef5; color: var(--navy); font-weight: 700; font-size: 13px;
}
.chip.on { background: var(--teal); color: #fff; }
.chip:hover { text-decoration: none; background: #d7e3ef; }
.chip.on:hover { background: var(--teal-dark); color: #fff; }

.owner-switch.owner-switch-equal .chip {
  min-width: 7.6em;
  justify-content: center;
  text-align: center;
  box-sizing: border-box;
}
.banner-readonly {
  background: #fff7ed; border: 1px solid #fdba74; color: #9a3412;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-size: 14px;
}
.banner-readonly a { color: #9a3412; font-weight: 700; }
fieldset.plain { border: none; padding: 0; margin: 0; min-width: 0; }
.table-scroll { overflow-x: auto; }

.banner-template {
  background: #ecfeff; border: 1px solid #99f6e4; color: #0f766e;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 14px; font-size: 14px;
}
.template-panel {
  background: #fff7ed; border: 1px dashed #fdba74; border-radius: 12px;
  padding: 14px 14px 12px; margin: 8px 0 18px;
}
.template-panel-title {
  font-weight: 700; color: #9a3412; margin-bottom: 4px; font-size: 14px;
}
.template-row {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end;
}
.template-save-bar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border);
}


.auth-card .brand-dot,
.auth-card .brand-mark {
  margin: 0 auto 16px auto !important;
  display: grid !important;
  place-items: center;
}

.brand-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-bottom: 16px;
}
.brand-wrap .brand-dot { margin-bottom: 0 !important; }

.login-card { padding: 36px 32px 32px; }
.brand-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  letter-spacing: 0.02em;
}
.auth-lock {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--teal);
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  box-shadow: 0 6px 16px rgba(13, 148, 136, 0.28);
}
.auth-lock svg { width: 34px; height: 34px; display: block; }
.login-card h1 { margin: 0 0 22px; font-size: 24px; font-weight: 700; }
.remember-row { margin: 2px 0 18px; }
.remember-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  margin: 0;
  cursor: pointer;
}
.remember-label input {
  width: auto;
  margin: 0;
  accent-color: var(--teal);
}
.btn-signin {
  width: 100%;
  padding: 12px 16px;
  font-size: 15px;
}
.forgot-row {
  margin: 16px 0 0;
  text-align: left;
  font-size: 14px;
}

.list-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.list-filters .field { margin: 0; min-width: 140px; flex: 1 1 140px; }
.list-filters .field input[type="search"],
.list-filters .field input[type="date"],
.list-filters .field select { min-width: 0; }
.list-filters-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  padding-bottom: 1px;
}
/* Customer ledger: right-align Open / Request update with Search; keep inquire width stable. */
.table-scroll-customer {
  padding-left: 16px;
  padding-right: 16px;
}
.table-scroll-customer .table th:last-child,
.table-scroll-customer .table td.order-row-actions {
  text-align: right;
}
.table-scroll-customer .order-row-actions {
  justify-content: flex-end;
}
/* Yueyang ledger: keep action cells as table-cells so Enter/Delete line up with the
   expand control; all row buttons share the current customer Enter height (29px). */
.table-scroll-yueyang .table tbody tr:not(.order-ledger-detail) > td {
  vertical-align: middle;
}
.table-scroll-yueyang td.order-row-actions {
  display: table-cell;
  vertical-align: middle;
  text-align: right;
  white-space: nowrap;
}
.table-scroll-yueyang td.order-row-actions > * {
  vertical-align: middle;
}
.table-scroll-yueyang td.order-row-actions > * + * {
  margin-left: 8px;
}
.table-scroll-yueyang:not(.table-scroll-customer) td.order-row-actions {
  text-align: left;
  min-width: 9.5rem;
}
.table-scroll-yueyang .inline-delete-form,
.table-scroll-yueyang .inline-inquire-form {
  display: inline-flex;
  margin: 0;
  align-items: center;
}
.table-scroll-yueyang .ledger-expand,
.table-scroll-yueyang .order-row-actions .btn.btn-sm {
  box-sizing: border-box;
  height: 29px;
  line-height: 1;
}
.table-scroll-yueyang .ledger-expand {
  padding-top: 0;
  padding-bottom: 0;
}
.table-scroll-yueyang .order-row-actions .btn.btn-sm {
  padding-top: 0;
  padding-bottom: 0;
}
.inquire-list-btn {
  display: inline-grid;
  justify-items: center;
  align-items: center;
  box-sizing: border-box;
}
.inquire-list-btn-sizer,
.inquire-list-btn-label {
  grid-area: 1 / 1;
  white-space: nowrap;
}
.inquire-list-btn-sizer {
  visibility: hidden;
  pointer-events: none;
}
.pay-status { font-size: 12px; line-height: 1.4; min-width: 168px; }
.pay-status .pay-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  white-space: nowrap;
}
.pay-status .pay-line + .pay-line { margin-top: 3px; }
.pay-status .pay-amt { color: var(--muted); font-weight: 500; }

.combo { position: relative; }
.combo-control { position: relative; }
.combo-input { padding-right: 36px; }
.combo-arrow {
  position: absolute;
  right: 1px;
  top: 1px;
  bottom: 1px;
  width: 34px;
  border: none;
  background: transparent;
  color: #334155;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: 0 9px 9px 0;
  padding: 0;
}
.combo-arrow svg { width: 16px; height: 16px; display: block; }
.combo-arrow:hover { color: var(--navy); background: #f1f5f9; }
.combo-menu {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  margin: 0;
  padding: 4px 0;
  list-style: none;
  max-height: 240px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.combo-menu[hidden] { display: none; }
.combo-option {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}
.combo-option:hover,
.combo-option.active { background: #ecfeff; }
.combo-option.is-current { font-weight: 700; color: var(--navy); }

.lines-editor select[name="line_unit"] {
  min-width: 132px;
}

.btn-edit-order {
  font-weight: 800;
  min-width: 96px;
  padding: 10px 18px;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 0 rgba(15, 118, 110, 0.25);
}
.line-cards { display: flex; flex-direction: column; gap: 10px; }
.line-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #f8fafc;
}
/* One card-wide grid. Size keeps its original mid-column track; Amount
   keeps its original 128px right-edge track. Unit price and Qty are placed
   onto those same columns so their left/right edges match. Qty and Amount
   share --line-qty-amount-width so type=number cannot shrink narrower than
   the amount box, including when the first line has no 删除 button. */
.line-card-body {
  --line-qty-amount-width: 128px;
  display: grid;
  grid-template-columns: minmax(180px, 2.6fr) minmax(110px, 1.3fr) var(--line-qty-amount-width);
  grid-template-rows: auto auto;
  gap: 10px 12px;
  align-items: start;
}
.lines-editor-cards .line-card-body {
  grid-template-columns: minmax(160px, 2.4fr) minmax(110px, 1.4fr) var(--line-qty-amount-width) 132px;
}
.line-card-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  grid-column: 1;
  grid-row: 1 / span 2;
}
.line-card-right,
.line-card-end {
  display: contents;
}
.line-col-size { grid-column: 2; grid-row: 1; min-width: 0; }
.line-col-qty { grid-column: 3; grid-row: 1; min-width: 0; }
.line-col-price { grid-column: 2; grid-row: 2; min-width: 0; }
.line-col-amount { grid-column: 3; grid-row: 2; min-width: 0; }
.line-col-unit { grid-column: 4; grid-row: 1; min-width: 0; }
.line-col-del { grid-column: 4; grid-row: 2; min-width: 0; }
.line-card-weights {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.line-col-weight,
.line-col-price,
.line-col-amount,
.line-col-del {
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.line-card .field { margin: 0; }
.line-card .field label { margin-bottom: 4px; display: block; }
.line-col-name { min-width: 0; }
.line-col-name textarea.line-name-input {
  min-height: 42px;
  resize: none;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.4;
  font: inherit;
  field-sizing: content;
}
.line-col-size .input,
.line-col-qty .input,
.line-col-price .input,
.line-col-amount .input,
.line-col-unit select,
.line-card-right .input,
.line-card-right select { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.line-col-qty,
.line-col-amount {
  width: var(--line-qty-amount-width, 128px);
  max-width: 100%;
  justify-self: stretch;
  box-sizing: border-box;
}
.line-col-qty .input,
.line-col-qty .line-qty,
.line-col-amount .input,
.line-col-amount .line-amount {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  field-sizing: fixed;
}
.line-col-price,
.line-metric-price {
  text-align: left;
  font-variant-numeric: tabular-nums;
}
.line-col-price label,
.line-col-price .muted {
  text-align: left;
  display: block;
}
.line-col-price .input,
.line-col-price .line-price,
.line-metric-price {
  font-variant-numeric: tabular-nums;
  text-align: left;
}
.line-col-qty {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.line-col-qty label,
.line-col-qty .muted,
.line-card .line-col-qty.field label {
  text-align: right;
  display: block;
}
.line-col-qty .input,
.line-col-qty .line-qty {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.line-col-amount {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.line-col-amount label,
.line-col-amount .muted {
  text-align: right;
  display: block;
}
.line-col-amount .input,
.line-col-amount .line-amount,
.line-metric-amount {
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.line-amount {
  background: #eef2f7;
  font-weight: 700;
  color: var(--navy);
  cursor: default;
}
.line-col-del { min-width: 52px; }
.lines-total {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 10px;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}
.lines-total strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
}
.line-name {
  font-weight: 700;
  color: var(--navy);
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}
.line-no { color: var(--muted); font-weight: 700; margin-right: 4px; }
.line-metric-price { font-weight: 600; color: var(--navy); }
.line-metric-amount { font-size: 16px; font-weight: 800; color: var(--navy); }
@media (max-width: 860px) {
  .line-card-body,
  .lines-editor-cards .line-card-body {
    grid-template-columns: minmax(110px, 1fr) var(--line-qty-amount-width, 128px);
    grid-template-rows: auto;
  }
  .line-card-left {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .line-col-size,
  .line-col-price { grid-column: 1; grid-row: auto; }
  .line-col-qty,
  .line-col-amount { grid-column: 2; grid-row: auto; }
  .line-col-unit,
  .line-col-del { grid-column: 1 / -1; grid-row: auto; }
}

/* Read-only order lines: name | size | qty on row 1; weights | price | amount on row 2
   so the dashed divider lines up and weights are not tacked under a tall name. */
.line-card-readonly .line-col-name {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.line-card-readonly .line-card-weights {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
  align-items: start;
}
.line-card-readonly .line-col-size { grid-column: 2; grid-row: 1; min-width: 0; }
.line-card-readonly .line-col-qty { grid-column: 3; grid-row: 1; min-width: 0; }
.line-card-readonly .line-col-price { grid-column: 2; grid-row: 2; min-width: 0; }
.line-card-readonly .line-col-amount { grid-column: 3; grid-row: 2; min-width: 0; }
.line-card-readonly .line-field-label {
  display: block;
  width: 100%;
  margin-bottom: 4px;
  color: var(--muted);
}
.line-card-readonly .line-col-qty .line-qty,
.line-card-readonly .line-col-amount .line-metric-amount {
  display: block;
  width: 100%;
  text-align: right;
  white-space: nowrap;
  box-sizing: border-box;
}
.line-card-readonly .line-name,
.line-card-readonly .line-name .line-no,
.line-card-readonly .line-qty,
.line-card-readonly .line-metric-price,
.line-card-readonly .line-metric-amount,
.line-card-readonly .line-col-uwt > div:not(.line-field-label),
.line-card-readonly .line-col-twt > div:not(.line-field-label),
.line-card-readonly .line-col-size > div:not(.line-field-label) {
  font-weight: 700;
}
@media (max-width: 860px) {
  .line-card-readonly .line-col-name,
  .line-card-readonly .line-card-weights {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .line-card-readonly .line-col-size,
  .line-card-readonly .line-col-price { grid-column: 1; grid-row: auto; }
  .line-card-readonly .line-col-qty,
  .line-card-readonly .line-col-amount { grid-column: 2; grid-row: auto; }
}

/* Account admin: shared column widths so role-group tables line up. */
.accounts-table {
  table-layout: fixed;
  width: 100%;
}
.accounts-table th,
.accounts-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.accounts-col-user { width: 14%; }
.accounts-col-name { width: 22%; }
.accounts-col-role { width: 10%; }
.accounts-col-companies { width: 14%; }
.accounts-col-customer { width: 12%; }
.accounts-col-actions { width: 28%; }
.account-display-form {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.account-display-form .input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 6px 8px;
  font-size: 12px;
}
.account-display-form .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}
.account-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  min-width: 0;
  vertical-align: top;
}
.account-action-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.account-action-row .input,
.account-action-row select.input {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 6px 8px;
  font-size: 12px;
}
.account-role-form select.input {
  grid-column: 1;
}
.account-role-form > button {
  grid-column: 3;
  justify-self: start;
}
.account-action-row .customer-name-field {
  grid-column: 1 / 3;
  min-width: 0;
}
.account-action-row .customer-name-field .input {
  width: 100%;
}
.account-action-row .btn {
  white-space: nowrap;
}
.account-delete-form {
  grid-template-columns: auto;
  justify-content: start;
}
.account-action-hint {
  margin: 0;
  font-size: 12px;
}
.account-customer-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.accounts-intro {
  margin: 0 0 8px;
}
.accounts-group-title {
  margin: 20px 0 10px;
  font-size: 15px;
  color: var(--navy);
}
.accounts-intro + .accounts-group-title {
  margin-top: 8px;
}
.order-lines-footer {
  text-align: right;
  font-size: 1.5em;
  font-weight: 700;
}

.login-history-heading {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--navy);
}
.login-history-table {
  table-layout: auto;
  width: 100%;
}
.login-history-table th,
.login-history-table td {
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.login-history-failed td {
  color: var(--muted);
}
.account-companies {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding-top: 8px;
}
.account-companies label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
}

.inquire-align-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: start;
}
.inquire-under-etd {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-width: 0;
}
.inquire-under-etd form { margin: 0; }
.inquire-status-hint {
  margin: 0;
  max-width: 100%;
  font-size: 12px;
  line-height: 1.4;
  color: var(--muted);
}

/* Sidebar account logos share one fixed 349:111 box (Balkansko Echo reference). */
.sidebar-customer .account-sidebar-logo-slot,
.sidebar-customer .customer-identity .sidebar-logo-slot,
.sidebar-office .office-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 349 / 111;
  box-sizing: border-box;
  background: #ffffff;
  border-radius: 8px;
  padding: 6px 8px;
}
.sidebar-customer .account-sidebar-logo-slot {
  margin: 0 0 10px;
}
.sidebar-logo-name {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  overflow-wrap: anywhere;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0 4px;
  color: var(--navy);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}
.sidebar-customer .account-sidebar-logo-slot .account-sidebar-logo {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  flex: 0 1 auto;
}
.account-logo-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}
.account-logo-choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 112px;
  padding: 8px 10px;
  border: 1px solid var(--line, #d1d5db);
  border-radius: 8px;
  cursor: pointer;
  background: #fff;
  text-align: center;
  font-size: 13px;
}
.account-logo-choice:has(input:checked) {
  border-color: var(--teal, #0f766e);
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.18);
}
.account-logo-choice img {
  display: block;
  max-width: 120px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}
.account-logo-choice .account-logo-none {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-weight: 600;
}
.account-logo-choice input {
  margin: 0;
}

.account-logo-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}
.account-logo-current {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.account-logo-current img {
  display: block;
  max-width: 160px;
  max-height: 64px;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}
.account-logo-upload {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  font-size: 13px;
}
.account-logo-none-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

/* Packing photo preview (click a photo filename) */
.photo-preview[hidden] { display: none !important; }
.photo-preview {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  background: rgba(15, 23, 42, 0.86); padding: 24px;
}
.photo-preview-figure { margin: 0; max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; align-items: center; }
.photo-preview-img { max-width: 92vw; max-height: 82vh; object-fit: contain; border-radius: 6px; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.4); }
.photo-preview-caption { margin-top: 10px; color: #e2e8f0; font-size: 14px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.photo-preview-hint { color: #94a3b8; }
.photo-preview-close {
  position: absolute; top: 14px; right: 18px; width: 40px; height: 40px;
  border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 26px; line-height: 1; cursor: pointer;
}
.photo-preview-nav {
  border: 0; border-radius: 50%; width: 44px; height: 44px; flex: 0 0 auto;
  background: rgba(255,255,255,.15); color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
}
.photo-preview-close:hover, .photo-preview-nav:hover { background: rgba(255,255,255,.3); }
body.photo-preview-open { overflow: hidden; }

/* Uploaded photo thumbnails in the document list */
a.doc-item-filename[data-photo-preview] { display: inline-flex; align-items: center; gap: 8px; }
.doc-thumb {
  width: 40px !important; height: 40px !important; max-width: 40px !important; flex: 0 0 40px; object-fit: cover;
  border-radius: 6px; border: 1px solid #d9e2ec; background: #f1f5f9;
}
a.doc-item-filename[data-photo-preview]:hover .doc-thumb { border-color: var(--navy); }
.doc-thumb-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 860px) {
  .doc-thumb { width: 32px !important; height: 32px !important; max-width: 32px !important; flex-basis: 32px; }
}


/* Yueyang customer document pack: name on top, then status + thumb + download */
.doc-item.doc-item-customer {
  display: block;
  padding: 14px 0;
}
.doc-item-customer .doc-item-title {
  display: block;
  font-size: 12px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 2px;
  grid-column: auto;
}
.doc-customer-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 15px;
  margin: 0 0 10px;
  word-break: break-all;
  line-height: 1.3;
}
.doc-customer-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.doc-customer-thumb-link {
  display: block;
  flex: 0 0 64px;
  line-height: 0;
  text-decoration: none;
}
.doc-customer-thumb-link:hover { text-decoration: none; }
.doc-customer-thumb {
  width: 64px;
  height: 64px;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: cover;
  object-position: top;
  background: #fff;
  display: block;
}
.doc-customer-thumb-link:hover .doc-customer-thumb { border-color: var(--navy); }
.doc-customer-thumb-empty,
.doc-customer-thumb-placeholder {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border-radius: 8px;
  box-sizing: border-box;
}
.doc-customer-thumb-empty {
  border: 1px dashed var(--border);
  background: transparent;
}
.doc-customer-thumb-placeholder {
  border: 1px solid var(--border);
  background-color: #e8eef4;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Crect x='12' y='8' width='24' height='32' rx='3' fill='%23fff' stroke='%2394a3b8' stroke-width='2'/%3E%3Cpath d='M18 20h12M18 26h12M18 32h8' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 40px 40px;
}
.doc-customer-dl { margin-left: auto; flex: 0 0 auto; }
.doc-customer-file + .doc-customer-file {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Yueyang order ledger: HCGR original arrow control; headered table typography unchanged. */
.ledger-expand-col {
  width: auto;
  padding-left: 8px;
  padding-right: 4px;
  vertical-align: middle;
  white-space: nowrap;
}
.ledger-expand {
  width: auto;
  height: auto;
  padding: 0 8px;
  border: 1px solid var(--teal);
  border-radius: 8px;
  background: var(--teal);
  color: #fff;
  cursor: pointer;
  line-height: normal;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  white-space: nowrap;
}
.ledger-expand-label {
  line-height: 1;
}
.ledger-expand:hover { background: var(--teal-dark); }
.ledger-expand .chev {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-90deg);
  transition: transform 0.15s ease;
}
.ledger-expand.is-open,
.ledger-expand[aria-expanded="true"] {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}
.ledger-expand.is-open:hover,
.ledger-expand[aria-expanded="true"]:hover { background: #f8fafc; }
.ledger-expand.is-open .chev,
.ledger-expand[aria-expanded="true"] .chev {
  transform: rotate(0deg);
}

tr.order-ledger-detail[hidden] {
  display: none !important;
}
tr.order-ledger-detail > td {
  padding: 0 10px 12px 52px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  /* Colspan cell must take the full ledger row; otherwise the inner
     table is sized against the 1% expand column and looks squashed. */
  width: 100%;
  overflow-x: auto;
}
.order-ledger-lines {
  width: auto;
  min-width: 100%;
  max-width: none;
  table-layout: auto;
  border-collapse: collapse;
  font-size: 13px;
}
.order-ledger-lines th,
.order-ledger-lines td {
  padding: 5px 14px 5px 0;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
  font-weight: 400;
  color: var(--text);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.order-ledger-lines th {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  padding-top: 4px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.order-ledger-lines tbody tr:last-child td {
  border-bottom: 0;
}
.order-ledger-empty {
  font-size: 13px;
  padding: 8px 0 2px;
}
@media (max-width: 960px) {
  tr.order-ledger-detail > td {
    padding-left: 16px;
    padding-right: 8px;
  }
  .order-ledger-lines th,
  .order-ledger-lines td {
    padding-right: 10px;
  }
}

/* Yueyang: expanded ledger lines hug the left and size to content
   instead of stretching across the full row. */
.table-scroll-yueyang .order-ledger-lines {
  width: max-content;
  min-width: 0;
  max-width: 100%;
  table-layout: auto;
}
.table-scroll-yueyang .order-ledger-lines th,
.table-scroll-yueyang .order-ledger-lines td {
  width: auto;
  padding-right: 16px;
  white-space: nowrap;
}
.table-scroll-yueyang .order-ledger-lines th:last-child,
.table-scroll-yueyang .order-ledger-lines td:last-child {
  padding-right: 0;
}
.table-scroll-yueyang .order-ledger-lines th:first-child,
.table-scroll-yueyang .order-ledger-lines td:first-child {
  white-space: normal;
}
.table-scroll-yueyang .order-ledger-lines .order-ledger-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table-scroll-yueyang .order-ledger-expand-body {
  width: max-content;
  max-width: 100%;
}
.table-scroll-yueyang .order-ledger-totals {
  margin: 6px 0 0;
  font-size: 10.4px;
  font-weight: 700;
  color: var(--text);
  text-align: right;
}


/* Yueyang compact office order pages: tighter row spacing and one-line
   fields that grow on Enter or wrap. Shared by the new/edit form
   (.order-form-compact) and the order detail page (.order-page-compact).
   HCGR can use the same classes to match. */
.order-form-compact,
.order-page-compact {
  --order-form-line-height: 1.25;
  --order-form-field-pad-y: 3px;
  --order-form-field-pad-x: 8px;
  --order-form-field-height: calc(
    (1em * var(--order-form-line-height)) + (2 * var(--order-form-field-pad-y)) + 2px
  );
}
.order-form-compact {
  padding: 6px 10px;
}
.order-form-compact h3,
.order-page-compact h3 {
  margin: 5px 0 3px;
}
.order-form-compact h3:first-child,
.order-page-compact h3:first-child,
.order-page-compact h3[style] {
  margin-top: 0;
}
.order-form-compact .grid-3,
.order-page-compact .grid-3 {
  gap: 4px;
}
.order-form-compact .field,
.order-page-compact .field {
  margin-bottom: 4px;
}
.order-form-compact label,
.order-page-compact label {
  margin-bottom: 1px;
}
.order-form-compact .input,
.order-form-compact select,
.order-form-compact textarea,
.order-page-compact .input,
.order-page-compact select,
.order-page-compact textarea {
  padding: var(--order-form-field-pad-y) var(--order-form-field-pad-x);
  line-height: var(--order-form-line-height);
  min-height: var(--order-form-field-height);
  height: var(--order-form-field-height);
  box-sizing: border-box;
  border-radius: 6px;
}
.order-form-compact .combo-input,
.order-page-compact .combo-input {
  padding-right: 32px;
}
.order-form-compact .combo-arrow,
.order-page-compact .combo-arrow {
  width: 28px;
  border-radius: 0 5px 5px 0;
}
.order-form-compact textarea,
.order-page-compact textarea {
  height: auto;
  min-height: var(--order-form-field-height);
  resize: none;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  field-sizing: content;
}
.order-form-compact .field > .muted,
.order-page-compact .field > .muted {
  margin: 1px 0 0;
  font-size: 12px;
}
.order-form-compact h3 + p.muted,
.order-page-compact h3 + p.muted {
  margin-top: 0;
  margin-bottom: 3px;
}
.order-form-compact .template-panel {
  padding: 4px 6px;
  margin: 3px 0 5px;
  border-radius: 8px;
}
.order-form-compact .template-row,
.order-page-compact .template-row {
  gap: 4px;
}
.order-form-compact .line-cards,
.order-page-compact .line-cards {
  gap: 3px;
}
.order-form-compact .line-card,
.order-page-compact .line-card {
  padding: 4px 6px;
  border-radius: 8px;
}
.order-form-compact .line-card-body,
.order-page-compact .line-card-body {
  gap: 3px 4px;
}
.order-form-compact .line-card-left,
.order-page-compact .line-card-left {
  gap: 3px;
}
.order-form-compact .line-card-weights,
.order-form-compact .line-col-weight,
.order-form-compact .line-col-price,
.order-form-compact .line-col-amount,
.order-form-compact .line-col-del,
.order-page-compact .line-card-weights,
.order-page-compact .line-col-weight,
.order-page-compact .line-col-price,
.order-page-compact .line-col-amount,
.order-page-compact .line-col-del {
  padding-top: 3px;
  gap: 3px;
}
.order-form-compact .line-card .field label,
.order-page-compact .line-card .field label {
  margin-bottom: 1px;
}
.order-form-compact .line-col-name textarea.line-name-input {
  min-height: var(--order-form-field-height);
}
.order-form-compact .lines-total {
  margin-top: 4px;
  gap: 4px;
}
.order-form-compact .line-add-row {
  margin: 3px 0 0;
}
.order-form-compact .actions {
  margin-top: 4px;
}

/* Order detail page: same tightness as the compact form. */
.order-page-compact .card {
  padding: 6px 10px;
  margin-bottom: 8px !important;
}
.order-page-compact .grid-2 > div > .card:last-child {
  margin-bottom: 0 !important;
}
.order-page-compact .card[style*="margin-top:16px"] {
  margin-top: 8px !important;
}
.order-page-compact .grid-2 {
  gap: 8px;
}
.order-page-compact .detail-field {
  margin-bottom: 4px;
}
.order-page-compact .detail-value {
  line-height: var(--order-form-line-height);
}
.order-page-compact .order-info-notes {
  padding-top: 3px;
}
.order-page-compact .order-info-notes .detail-field {
  padding: 3px 0;
}
.order-page-compact .order-info-notes .detail-field + .detail-field {
  padding-top: 3px;
}
.order-page-compact .order-info-grid {
  column-gap: 6px;
}
.order-page-compact .order-info-grid > * {
  padding: 3px 0;
}
.order-page-compact .order-info-grid > *:nth-child(-n+3) {
  padding-top: 0;
}
.order-page-compact .order-info-grid > *:nth-child(3n+1):not(:first-child)::before {
  width: calc(300% + 12px);
}
.order-page-compact .order-info-grid > *:nth-child(7),
.order-page-compact .order-info-grid > *:nth-child(8),
.order-page-compact .order-info-grid > *:nth-child(9),
.order-page-compact .order-info-grid-customer > *:nth-child(4),
.order-page-compact .order-info-grid-customer > *:nth-child(5),
.order-page-compact .order-info-grid-customer > *:nth-child(6) {
  padding-bottom: 0.5em;
}
.order-page-compact .order-info-grid .muted[style*="margin-top"] {
  margin-top: 2px !important;
}
.order-page-compact .table th,
.order-page-compact .table td {
  padding: 4px 6px;
}
.order-page-compact .pay-summary {
  gap: 7px;
  margin-bottom: 6px;
  padding: 5px 8px;
}
.order-page-compact .pay-form {
  margin-top: 6px;
  padding-top: 6px;
}
.order-page-compact .banner-readonly,
.order-page-compact .banner-template {
  padding: 5px 8px;
  margin-bottom: 7px;
}
.order-page-compact .doc-pack-actions {
  gap: 4px !important;
  margin-bottom: 6px !important;
}
.order-page-compact .doc-item {
  column-gap: 6px;
  padding: 5px 0;
}
.order-page-compact .template-save-bar {
  margin-top: 6px;
  padding-top: 5px;
  gap: 6px;
}
.order-page-compact .order-lines-footer {
  margin: 4px 0 0;
}
.order-page-compact .line-field-label {
  margin-bottom: 0;
}

.hint-12 { font-size: 12px; }
.accounts-add-title { font-size: 16px; }
.auth-links { font-size: 13px; }
.picker-hello { font-size: 13px; }
.picker-heading { font-size: 28px; }

/* Yueyang site-wide font scale: 80%. px sizes do not follow html font-size,
   so they are restated here. HCGR (no html.company-yueyang) is unchanged. */
html.company-yueyang { font-size: 80%; }
html.company-yueyang .btn { font-size: 11.2px; }
html.company-yueyang .btn-sm { font-size: 9.6px; }
html.company-yueyang .input,
html.company-yueyang select,
html.company-yueyang textarea { font-size: 11.2px; }
html.company-yueyang label { font-size: 9.6px; }
html.company-yueyang .flash { font-size: 11.2px; }
html.company-yueyang .auth-card h1 { font-size: 19.2px; }
html.company-yueyang .auth-card .sub { font-size: 11.2px; }
html.company-yueyang .error-box { font-size: 10.4px; }
html.company-yueyang .picker-card h2 { font-size: 16px; }
html.company-yueyang .picker-card p { font-size: 10.4px; }
html.company-yueyang .picker-badge { font-size: 9.6px; }
html.company-yueyang .sidebar .logo { font-size: 14.4px; }
html.company-yueyang .sidebar .co { font-size: 9.6px; }
html.company-yueyang .sidebar a.nav { font-size: 11.2px; }
html.company-yueyang .sidebar .userbox { font-size: 9.6px; }
html.company-yueyang .topbar h1 { font-size: 17.6px; }
html.company-yueyang .muted { font-size: 10.4px; }
html.company-yueyang .table { font-size: 11.2px; }
html.company-yueyang .table th { font-size: 9.6px; }
html.company-yueyang .badge { font-size: 9.6px; }
html.company-yueyang .pipeline span { font-size: 8.8px; }
html.company-yueyang .stat .n { font-size: 17.6px; }
html.company-yueyang .stat .l { font-size: 9.6px; }
html.company-yueyang .sidebar-customer .logo { font-size: 12.8px; }
html.company-yueyang .sidebar-customer .customer-name { font-size: 16px; }
html.company-yueyang .sidebar-customer .co-name { font-size: 10.4px; }
html.company-yueyang .sidebar-customer a.switch-company { font-size: 9.6px; }
html.company-yueyang .sidebar-customer .userbox { font-size: 9.6px; }
html.company-yueyang .sidebar-customer .userbox-name { font-size: 10.4px; }
html.company-yueyang .sidebar-customer .userbox-actions a { font-size: 9.6px; }
html.company-yueyang .sidebar-customer .btn-lang-toggle { font-size: 9.6px; }
html.company-yueyang .sidebar-customer .sidebar-footer-links a { font-size: 9.6px; }
html.company-yueyang .sidebar-office .co-name { font-size: 10.4px; }
html.company-yueyang .sidebar-office a.switch-company { font-size: 9.6px; }
html.company-yueyang .filter-form label { font-size: 10.4px; }
html.company-yueyang .status-select { font-size: 10.4px; }
html.company-yueyang .spec-agg-title { font-size: 14.4px; }
html.company-yueyang .pay-summary { font-size: 10.4px; }
html.company-yueyang .title-status-label { font-size: 10.4px; }
html.company-yueyang .title-status-select { font-size: 11.2px; }
html.company-yueyang .header-status-filter label { font-size: 9.6px; }
html.company-yueyang .header-status-select { font-size: 10.4px; }
html.company-yueyang .chip { font-size: 10.4px; }
html.company-yueyang .banner-readonly { font-size: 11.2px; }
html.company-yueyang .banner-template { font-size: 11.2px; }
html.company-yueyang .template-panel-title { font-size: 11.2px; }
html.company-yueyang .brand-name { font-size: 12px; }
html.company-yueyang .login-card h1 { font-size: 19.2px; }
html.company-yueyang .remember-label { font-size: 11.2px; }
html.company-yueyang .btn-signin { font-size: 12px; }
html.company-yueyang .forgot-row { font-size: 11.2px; }
html.company-yueyang .pay-status { font-size: 9.6px; }
html.company-yueyang .combo-option { font-size: 11.2px; }
html.company-yueyang .btn-edit-order { font-size: 12px; }
html.company-yueyang .lines-total { font-size: 11.2px; }
html.company-yueyang .lines-total strong { font-size: 14.4px; }
html.company-yueyang .line-metric-amount { font-size: 12.8px; }
html.company-yueyang .account-display-form .input { font-size: 9.6px; }
html.company-yueyang .account-action-row .input,
html.company-yueyang .account-action-row select.input { font-size: 9.6px; }
html.company-yueyang .account-action-hint { font-size: 9.6px; }
html.company-yueyang .accounts-group-title { font-size: 12px; }
html.company-yueyang .login-history-heading { font-size: 12.8px; }
html.company-yueyang .account-companies label { font-size: 11.2px; }
html.company-yueyang .inquire-status-hint { font-size: 9.6px; }
html.company-yueyang .sidebar-logo-name { font-size: 12px; }
html.company-yueyang .account-logo-choice { font-size: 10.4px; }
html.company-yueyang .account-logo-upload { font-size: 10.4px; }
html.company-yueyang .account-logo-none-option { font-size: 10.4px; }
html.company-yueyang .photo-preview-caption { font-size: 11.2px; }
html.company-yueyang .photo-preview-close { font-size: 20.8px; }
html.company-yueyang .photo-preview-nav { font-size: 24px; }
html.company-yueyang .photo-preview {
  align-items: flex-start;
  justify-content: flex-start;
  overflow: auto;
  padding: 56px 56px 32px;
  -webkit-overflow-scrolling: touch;
}
html.company-yueyang .photo-preview-figure {
  max-width: min(2000px, calc(100vw - 112px));
  max-height: none;
  width: min(2000px, calc(100vw - 112px));
  margin: 0 auto;
}
html.company-yueyang .photo-preview-img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
}
html.company-yueyang .photo-preview-close {
  position: fixed;
  z-index: 1002;
}
html.company-yueyang .photo-preview-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1001;
}
html.company-yueyang .photo-preview-prev { left: 8px; }
html.company-yueyang .photo-preview-next { right: 8px; }
html.company-yueyang .doc-item-customer .doc-item-title { font-size: 9.6px; }
html.company-yueyang .doc-customer-name { font-size: 12px; }
html.company-yueyang .ledger-expand { font-size: 9.6px; }
html.company-yueyang .ledger-expand .chev { font-size: 16px; }
html.company-yueyang .line-history-combo { width: 100%; }
html.company-yueyang .line-history-combo .combo-menu { z-index: 50; max-height: 220px; }
html.company-yueyang .line-card:has(.combo-menu:not([hidden])) { position: relative; z-index: 6; }
html.company-yueyang .line-col-name textarea.line-name-input.combo-input { padding-right: 36px; }
html.company-yueyang .order-ledger-lines { font-size: 10.4px; }
html.company-yueyang .order-ledger-lines th { font-size: 8.8px; }
html.company-yueyang .order-ledger-empty { font-size: 10.4px; }
html.company-yueyang .order-form-compact .field > .muted,
html.company-yueyang .order-page-compact .field > .muted { font-size: 9.6px; }
html.company-yueyang .hint-12 { font-size: 9.6px; }
html.company-yueyang .accounts-add-title { font-size: 12.8px; }
html.company-yueyang .auth-links { font-size: 10.4px; }
html.company-yueyang .picker-hello { font-size: 10.4px; }
html.company-yueyang .picker-heading { font-size: 22.4px; }

/* Yueyang login frosted-glass card (matches the approved group reference).
   Input icons are the only addition beyond that mock. HCGR is unchanged. */
html.company-yueyang .auth-wrap {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 20%, rgba(255,255,255,.34), transparent 34%),
    radial-gradient(circle at 84% 76%, rgba(125, 211, 252, .32), transparent 38%),
    radial-gradient(circle at 72% 16%, rgba(45, 212, 191, .26), transparent 32%),
    linear-gradient(145deg, #0f2a44 0%, #0d4f5f 55%, #0d9488 100%);
}
html.company-yueyang .auth-wrap::before,
html.company-yueyang .auth-wrap::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
html.company-yueyang .auth-wrap::before {
  width: 300px;
  height: 300px;
  left: 22%;
  top: 32%;
  background: rgba(255,255,255,.20);
  filter: blur(18px);
  transform: translate(-50%, -50%);
}
html.company-yueyang .auth-wrap::after {
  width: 260px;
  height: 260px;
  right: 16%;
  bottom: 14%;
  background: rgba(94, 234, 212, .22);
  filter: blur(20px);
}
html.company-yueyang .auth-card {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(22px) saturate(155%);
  -webkit-backdrop-filter: blur(22px) saturate(155%);
  border: 1px solid rgba(255,255,255,.78);
  box-shadow: 0 18px 44px rgba(15, 42, 68, .26);
}
html.company-yueyang .login-card h1,
html.company-yueyang .auth-card h1 {
  color: #0f2a44;
}
html.company-yueyang .auth-card .input,
html.company-yueyang .auth-card select,
html.company-yueyang .auth-card textarea {
  background: rgba(255,255,255,.94);
  border-color: rgba(15, 42, 68, .20);
  color: #0f172a;
}
html.company-yueyang .auth-card label {
  color: #334155;
}
html.company-yueyang .auth-card .remember-label {
  color: #1e293b;
}
html.company-yueyang .input-wrap-icon {
  position: relative;
}
html.company-yueyang .input-wrap-icon .input {
  padding-left: 38px;
}
html.company-yueyang .input-wrap-icon .input-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #475569;
  pointer-events: none;
}

/* Yueyang login copyright: same size/color as HCGR, centered. HCGR unchanged. */
html.company-yueyang .auth-card .auth-copy {
  margin: 16px 0 0;
  text-align: center;
  font-size: 9.6px;
  font-weight: 400;
  line-height: 1.4;
  color: rgba(15, 42, 68, 0.55);
  letter-spacing: 0.01em;
}

/* Yueyang sidebar: unified card footer, stronger active nav. HCGR unchanged. */
html.company-yueyang .sidebar a.nav:hover {
  background: rgba(13, 148, 136, .35);
  color: #fff;
  text-decoration: none;
}
html.company-yueyang .sidebar a.nav.active {
  background: linear-gradient(180deg, #14b8a6 0%, #0d9488 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(13, 148, 136, .28);
  text-decoration: none;
}
html.company-yueyang .sidebar .userbox-card {
  /* Sit directly under the nav, like the previous sidebar, instead of pinning to the bottom. */
  margin-top: 12px;
  padding: 12px 12px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  font-size: 12px;
  opacity: 1;
  line-height: 1.45;
}
html.company-yueyang .sidebar .userbox-card .userbox-name {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: 0.01em;
}
html.company-yueyang .sidebar .userbox-meta {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
html.company-yueyang .sidebar .meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #94a3b8;
}
html.company-yueyang .sidebar .meta-k {
  flex: 0 0 auto;
}
html.company-yueyang .sidebar .role-chip {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(94, 234, 212, .16);
  color: #99f6e4;
  font-size: 11px;
  font-weight: 700;
}
html.company-yueyang .sidebar .userbox-card .userbox-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, .1);
}
html.company-yueyang .sidebar .userbox-card .userbox-actions a {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  color: #99f6e4;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
html.company-yueyang .sidebar .userbox-card .userbox-actions a:hover {
  background: rgba(94, 234, 212, .12);
  color: #ccfbf1;
  text-decoration: none;
}
html.company-yueyang .sidebar .userbox-card .userbox-actions a.signout {
  color: #cbd5e1;
}
html.company-yueyang .sidebar-customer .userbox-card .sidebar-footer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
html.company-yueyang .sidebar-customer .userbox-card .sidebar-footer-links a {
  display: block;
  padding: 6px 8px;
  border-radius: 8px;
  color: #99f6e4;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
html.company-yueyang .sidebar-customer .userbox-card .sidebar-footer-links a:hover {
  color: #ccfbf1;
  text-decoration: none;
  background: rgba(94, 234, 212, .12);
}
html.company-yueyang .sidebar .userbox-card .lang-toggle-form {
  margin: 8px 0 0;
}
html.company-yueyang .sidebar .userbox-card {
  font-size: 9.6px;
}
html.company-yueyang .sidebar .userbox-card .userbox-name {
  font-size: 11.2px;
}
html.company-yueyang .sidebar .meta-row,
html.company-yueyang .sidebar .userbox-card .userbox-actions a,
html.company-yueyang .sidebar-customer .userbox-card .sidebar-footer-links a {
  font-size: 9.6px;
}
html.company-yueyang .sidebar .role-chip {
  font-size: 8.8px;
}

html.company-yueyang .accounts-role-switch { margin: 0 0 16px; }
html.company-yueyang .accounts-role-switch .chip { min-width: 6.4em; }
html.company-yueyang .latest-completion-input {
  width: 10.5rem;
  min-width: 10.5rem;
  padding: 4px 6px;
}
html.company-yueyang .order-delay-late {
  color: #c0392b;
  font-weight: 700;
  white-space: nowrap;
}

html.company-yueyang .table-scroll-yueyang .status-select {
  min-width: 0;
  width: auto;
  max-width: 100%;
  padding: 4px 6px;
}
html.company-yueyang .table-scroll-yueyang .pay-status {
  min-width: 0;
  width: auto;
}
html.company-yueyang .table-scroll-yueyang .pay-status .pay-line {
  gap: 0 4px;
  flex-wrap: wrap;
  justify-content: flex-start;
  white-space: normal;
}

/* Yueyang document pack (all roles): filename on top, thumb left, download right. */
html.company-yueyang .doc-pack-customer .doc-item {
  display: block;
  grid-template-columns: none;
  column-gap: 0;
  row-gap: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
html.company-yueyang .doc-pack-customer .doc-item:last-child { border-bottom: none; }
html.company-yueyang .doc-pack-customer .doc-item-title {
  display: block;
  font-size: 9.6px;
  font-weight: 400;
  color: var(--muted);
  margin: 0 0 2px;
}
html.company-yueyang .doc-pack-customer .doc-file-block + .doc-file-block { margin-top: 12px; }
html.company-yueyang .doc-pack-customer .doc-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 12px;
  margin: 0 0 10px;
  word-break: break-all;
}
html.company-yueyang .doc-pack-customer .doc-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
html.company-yueyang .doc-pack-customer .doc-row > .badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 9.6px;
  font-weight: 700;
  flex: 0 0 auto;
}
html.company-yueyang .doc-pack-customer a.doc-thumb {
  display: block;
  width: 64px !important;
  height: 64px !important;
  max-width: 64px;
  flex: 0 0 64px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  text-decoration: none;
}
html.company-yueyang .doc-pack-customer a.doc-thumb img {
  width: 100%;
  height: 100%;
  max-width: 64px;
  max-height: 64px;
  object-fit: cover;
  object-position: top;
  display: block;
}
html.company-yueyang .doc-pack-customer a.doc-thumb:hover { border-color: var(--navy); text-decoration: none; }
html.company-yueyang .doc-pack-customer .doc-thumb-empty {
  width: 64px;
  height: 64px;
  max-width: 64px;
  flex: 0 0 64px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: transparent;
  box-sizing: border-box;
}
html.company-yueyang .doc-pack-customer .doc-dl { margin-left: auto; }
html.company-yueyang .doc-pack-customer .doc-item-actions { margin-top: 10px; }
html.company-yueyang .doc-pack-customer .doc-item-updated { margin: 8px 0 0; font-size: 10.4px; }
html.company-yueyang .doc-pack-customer .doc-remove-form { margin: 0; }
@media (max-width: 720px) {
  html.company-yueyang .doc-pack-customer a.doc-thumb {
    width: 52px !important;
    height: 52px !important;
    max-width: 52px;
    flex: 0 0 52px;
  }
  html.company-yueyang .doc-pack-customer a.doc-thumb img { max-width: 52px; max-height: 52px; }
  html.company-yueyang .doc-pack-customer .doc-thumb-empty {
    width: 52px;
    height: 52px;
    max-width: 52px;
    flex: 0 0 52px;
  }
}
