/* CRM VNO - design system. Tokens first, then base, layout, components. Light default, [data-theme=dark] override. */
:root {
  --font: "Be Vietnam Pro", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  /* surfaces */
  --bg: #F3F5F9; --surface: #FFFFFF; --surface-2: #F8FAFC; --surface-3: #EEF2F7;
  --border: #E2E8F0; --border-strong: #CBD5E1;
  --text: #0F172A; --text-2: #475569; --text-3: #8492A6;
  /* brand */
  --primary: #3949AB; --primary-hover: #2E3B8E; --primary-soft: #EBEDFA; --primary-text: #2E3B8E; --on-primary: #FFFFFF; --on-solid: #FFFFFF;
  --accent: #D97706; --accent-soft: #FEF3C7; --accent-text: #92400E;
  /* semantic */
  --success: #15803D; --success-soft: #DCFCE7; --success-text: #166534;
  --danger: #B91C1C; --danger-soft: #FEE2E2; --danger-text: #991B1B;
  --info: #0369A1; --info-soft: #E0F2FE; --info-text: #075985;
  --purple: #6D28D9; --purple-soft: #EDE9FE; --purple-text: #5B21B6;
  --neutral-soft: #EEF2F7; --neutral-text: #475569;
  /* sidebar */
  --sb-bg: #12182B; --sb-text: #AAB4CC; --sb-hover: #1C2540; --sb-active: #26325C; --sb-active-text: #FFFFFF; --sb-border: #222B47;
  /* shape + spacing (8px grid) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(15,23,42,.05);
  --shadow-2: 0 4px 16px rgba(15,23,42,.08);
  --shadow-3: 0 16px 48px rgba(15,23,42,.18);
  --ring: 0 0 0 3px rgba(57,73,171,.28);
  --role: #3949AB;
  /* type scale */
  --t-xs: 12px; --t-sm: 13px; --t-base: 14px; --t-md: 16px; --t-lg: 20px; --t-xl: 24px; --t-2xl: 30px;
  --sidebar-w: 248px; --topbar-h: 60px;
  /* kanban board (Trello-style): canvas, lists, cards, labels */
  /* the canvas uses the app's own background / surfaces, like every other screen */
  --board-bg: var(--bg); --board-bar: var(--surface); --board-text: var(--text); --board-glass: var(--surface-3); --board-glass-hover: var(--border);
  --k-list: #E9EDF3; --k-card: #FFFFFF; --k-text: var(--text); --k-sub: var(--text-2); --k-hover: rgba(9,30,66,.08); --k-focus: #388BFF;
  --k-shadow: 0 1px 1px rgba(9,30,66,.25), 0 0 1px rgba(9,30,66,.31);
  --k-green: #1F845A; --k-yellow: #F5CD47; --k-on-yellow: #533F04; --k-red: #C9372C; --k-on-badge: #FFFFFF;
  --lbl-1: #4BCE97; --lbl-2: #F5CD47; --lbl-3: #FEA362; --lbl-4: #F87168; --lbl-5: #9F8FEF; --lbl-6: #579DFF; --lbl-7: #6CC3E0; --lbl-8: #94C748; --lbl-text: #172B4D;
}
[data-theme=dark] {
  --bg: #0D1220; --surface: #151B2D; --surface-2: #1A2136; --surface-3: #212A42;
  --border: #272F48; --border-strong: #38435F;
  --text: #E7EBF4; --text-2: #A3AEC5; --text-3: #6F7B96;
  --primary: #8391F2; --primary-hover: #9AA6F6; --primary-soft: #232C57; --primary-text: #B5BFFA; --on-primary: #0D1220; --on-solid: #0D1220;
  --accent: #F5A524; --accent-soft: #3A2A0B; --accent-text: #FCD38A;
  --success: #4ADE80; --success-soft: #11301F; --success-text: #86EFAC;
  --danger: #F87171; --danger-soft: #3B1616; --danger-text: #FCA5A5;
  --info: #38BDF8; --info-soft: #0E2A3D; --info-text: #7DD3FC;
  --purple: #A78BFA; --purple-soft: #2A2050; --purple-text: #C4B5FD;
  --neutral-soft: #212A42; --neutral-text: #A3AEC5;
  --sb-bg: #0A0F1C; --sb-hover: #151C31; --sb-active: #222C52; --sb-border: #1B2340;
  --shadow-2: 0 4px 16px rgba(0,0,0,.35); --shadow-3: 0 16px 48px rgba(0,0,0,.55);
  --ring: 0 0 0 3px rgba(131,145,242,.35);
  --k-list: var(--surface); --k-card: var(--surface-3); --k-text: var(--text); --k-sub: var(--text-2); --k-hover: rgba(166,197,226,.16); --k-focus: #85B8FF;
  --k-shadow: 0 1px 1px rgba(3,4,4,.5), 0 0 1px rgba(3,4,4,.5);
  --k-green: #4BCE97; --k-yellow: #F5CD47; --k-on-yellow: #1D2125; --k-red: #F87168; --k-on-badge: #1D2125;
  --lbl-1: #216E4E; --lbl-2: #7F5F01; --lbl-3: #A54800; --lbl-4: #AE2E24; --lbl-5: #5E4DB2; --lbl-6: #0055CC; --lbl-7: #206A83; --lbl-8: #4C6B1F; --lbl-text: #DEE4EA;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 400 var(--t-base)/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: var(--t-xl); } h2 { font-size: var(--t-lg); } h3 { font-size: var(--t-md); } h4 { font-size: var(--t-base); }
p { margin: 0; }
a { color: var(--primary-text); text-decoration: none; } a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }
svg.ic { flex: none; vertical-align: middle; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .small { font-size: var(--t-sm); } .xs { font-size: var(--t-xs); }
.mono { font-family: var(--mono); font-size: .92em; } .num { font-variant-numeric: tabular-nums; text-align: right; }
.right { text-align: right; } .nowrap { white-space: nowrap; } .strong { font-weight: 600; }
.row { display: flex; align-items: center; gap: var(--s3); } .row.wrap { flex-wrap: wrap; } .row.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: var(--s3); } .grow { flex: 1; min-width: 0; }
.gap-1 { gap: var(--s2); } .gap-3 { gap: var(--s5); } .mt { margin-top: var(--s4); } .mt-2 { margin-top: var(--s5); }
.grid { display: grid; gap: var(--s4); } .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.hide { display: none !important; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sb-bg); color: var(--sb-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; border-right: 1px solid var(--sb-border); }
.brand { display: flex; align-items: center; gap: var(--s3); padding: var(--s4) var(--s4) var(--s3); color: #fff; }
.brand b { font-size: var(--t-md); letter-spacing: .02em; display: block; line-height: 1.1; }
.brand small { color: var(--sb-text); font-size: 11px; }
.role-chip { display: inline-flex; align-items: center; gap: 6px; margin: var(--s2) var(--s4) var(--s4); padding: 4px 10px; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 600; background: color-mix(in srgb, var(--role) 22%, transparent); color: #fff; border: 1px solid color-mix(in srgb, var(--role) 55%, transparent); width: fit-content; }
.role-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--role); }
.nav { padding: 0 var(--s3); display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #6C7794; padding: var(--s3) var(--s3) 6px; }
.nav-item { display: flex; align-items: center; gap: var(--s3); padding: 9px 12px; border-radius: var(--r); color: var(--sb-text); text-decoration: none !important; font-size: var(--t-base); transition: background .12s, color .12s; }
.nav-item:hover { background: var(--sb-hover); color: #fff; }
.nav-item.active { background: var(--sb-active); color: var(--sb-active-text); box-shadow: inset 3px 0 0 var(--role); }
.nav-item .cnt { margin-left: auto; font-size: 11px; background: var(--accent); color: var(--on-solid, #fff); border-radius: var(--r-pill); padding: 0 7px; font-weight: 600; }
.sb-foot { padding: var(--s3) var(--s4); border-top: 1px solid var(--sb-border); font-size: 11px; color: #6C7794; }
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { height: var(--topbar-h); display: flex; align-items: center; gap: var(--s3); padding: 0 var(--s5); background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.topbar .search { position: relative; flex: 1; max-width: 460px; }
.topbar .search input { width: 100%; padding-left: 36px; background: var(--surface-2); }
.topbar .search .ic { position: absolute; left: 11px; top: 11px; color: var(--text-3); }
.topbar .spacer { flex: 1; }
.icon-btn { position: relative; width: 38px; height: 38px; display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; border-radius: var(--r); color: var(--text-2); }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn .dot { position: absolute; top: -1px; right: -1px; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box; border-radius: var(--r-pill); background: var(--danger); color: var(--on-solid, #fff); font-size: 10px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--surface); }
.view { padding: var(--s5); flex: 1; max-width: 1560px; width: 100%; margin: 0 auto; animation: fadein .18s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s4); margin-bottom: var(--s5); flex-wrap: wrap; }
.page-head p { color: var(--text-2); margin-top: 2px; }
.crumbs { font-size: var(--t-sm); color: var(--text-3); margin-bottom: 4px; } .crumbs a { color: var(--text-2); }
.burger { display: none; }
.scrim { display: none; }
/* dropdown popovers */
.dd { position: relative; }
.dd-panel { position: absolute; right: 0; top: calc(100% + 8px); min-width: 280px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-3); z-index: 60; overflow: hidden; animation: fadein .12s ease; }
.dd-head { padding: var(--s3) var(--s4); font-weight: 600; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.dd-item { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border: 0; background: none; width: 100%; text-align: left; border-bottom: 1px solid var(--border); }
.dd-item:last-child { border-bottom: 0; } .dd-item:hover { background: var(--surface-2); }
.dd-item.sel { background: var(--primary-soft); }
.dd-scroll { max-height: 380px; overflow-y: auto; }
.sev { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }
.sev.danger { background: var(--danger); } .sev.warning { background: var(--accent); } .sev.info { background: var(--info); } .sev.success { background: var(--success); }

/* ---------- buttons + forms ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 38px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: 500; font-size: var(--t-base); white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--surface-3); } .btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); } .btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); } .btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: var(--on-solid, #fff); } .btn-danger:hover { filter: brightness(.92); background: var(--danger); }
.btn-success { background: var(--success); border-color: var(--success); color: var(--on-solid, #fff); } .btn-success:hover { filter: brightness(.92); background: var(--success); }
.btn-sm { height: 30px; padding: 0 10px; font-size: var(--t-sm); } .btn-lg { height: 48px; padding: 0 24px; font-size: var(--t-md); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label { font-size: var(--t-sm); font-weight: 500; color: var(--text-2); }
.field .req { color: var(--danger); }
.field .hint { font-size: var(--t-xs); color: var(--text-3); } .field .err { font-size: var(--t-xs); color: var(--danger); }
.input, .select, .textarea { width: 100%; height: 38px; padding: 0 12px; border: 1px solid var(--border-strong); border-radius: var(--r); background: var(--surface); color: var(--text); font: inherit; transition: border-color .12s, box-shadow .12s; }
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.input.invalid, .select.invalid { border-color: var(--danger); }
.input[readonly] { background: var(--surface-2); }
.input.mismatch { border-color: var(--accent); background: var(--accent-soft); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); } .form-grid .full { grid-column: 1 / -1; }
.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--r); padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 6px; color: var(--text-2); font-size: var(--t-sm); font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-1); }
/* Language switch EN | VI: topbar (every role, phone included) and login page */
.langsw { display: inline-flex; flex: none; background: var(--surface-3); border-radius: var(--r); padding: 2px; gap: 2px; }
.langsw-b { border: 0; background: transparent; min-width: 32px; height: 28px; padding: 0 8px; border-radius: 6px; color: var(--text-2); font-size: var(--t-xs); font-weight: 700; letter-spacing: .04em; cursor: pointer; }
.langsw-b.on { background: var(--role, var(--primary)); color: var(--on-solid, #fff); }
.login { position: relative; } .login-lang { position: absolute; top: var(--s4); right: var(--s4); z-index: 2; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: var(--t-sm); cursor: pointer; } .check input { margin-top: 3px; accent-color: var(--primary); width: 16px; height: 16px; }

/* ---------- cards, KPI, badges ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-1); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s4) 0; }
.card-h h3 { font-size: var(--t-md); } .card-b { padding: var(--s4); } .card-b.flush { padding: 0; }
.kpi { padding: var(--s4); display: flex; flex-direction: column; gap: 6px; position: relative; transition: border-color .12s, box-shadow .12s; }
.kpi.click { cursor: pointer; } .kpi.click:hover { border-color: var(--primary); box-shadow: var(--shadow-2); }
.kpi .lbl { color: var(--text-2); font-size: var(--t-sm); display: flex; align-items: center; gap: 8px; }
.kpi .val { font-size: var(--t-2xl); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: var(--t-xs); color: var(--text-3); }
.kpi .ico { width: 32px; height: 32px; border-radius: var(--r); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-text); }
.kpi.t-warning .ico { background: var(--accent-soft); color: var(--accent-text); } .kpi.t-danger .ico { background: var(--danger-soft); color: var(--danger-text); }
.kpi.t-success .ico { background: var(--success-soft); color: var(--success-text); } .kpi.t-info .ico { background: var(--info-soft); color: var(--info-text); }
.delta { font-size: var(--t-xs); font-weight: 600; } .delta.up { color: var(--success); } .delta.down { color: var(--danger); }
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--r-pill); font-size: var(--t-xs); font-weight: 600; white-space: nowrap; background: var(--neutral-soft); color: var(--neutral-text); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.badge.primary { background: var(--primary-soft); color: var(--primary-text); } .badge.info { background: var(--info-soft); color: var(--info-text); }
.badge.success { background: var(--success-soft); color: var(--success-text); } .badge.warning { background: var(--accent-soft); color: var(--accent-text); }
.badge.danger { background: var(--danger-soft); color: var(--danger-text); } .badge.purple { background: var(--purple-soft); color: var(--purple-text); }
.avatar { --sz: 32px; width: var(--sz); height: var(--sz); border-radius: 50%; display: inline-grid; place-items: center; font-size: calc(var(--sz) * .38); font-weight: 600; color: #fff; flex: none; letter-spacing: .02em; }
.avatar-stack { display: flex; } .avatar-stack .avatar { border: 2px solid var(--surface); margin-left: -8px; } .avatar-stack .avatar:first-child { margin-left: 0; }
.progress { height: 8px; background: var(--surface-3); border-radius: var(--r-pill); overflow: hidden; } .progress > i { display: block; height: 100%; background: var(--primary); border-radius: inherit; transition: width .3s; }
.progress.success > i { background: var(--success); } .progress.warning > i { background: var(--accent); } .progress.danger > i { background: var(--danger); }
.pill-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-pill); border: 1px solid var(--border-strong); background: var(--surface); font-size: var(--t-sm); }
.pill-chip.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary-text); font-weight: 500; }
.file-chip { display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); max-width: 100%; }
.file-chip .ft { width: 30px; height: 30px; border-radius: 6px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; background: #DC2626; }
.file-chip .ft.xls { background: #15803D; } .file-chip .ft.img { background: #0369A1; } .file-chip .ft.doc { background: #2563EB; }
.file-chip .fn { font-size: var(--t-sm); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .file-chip .fs { font-size: 11px; color: var(--text-3); }
.banner { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) var(--s4); border-radius: var(--r); border: 1px solid; font-size: var(--t-sm); }
.banner.ai { background: linear-gradient(90deg, var(--purple-soft), var(--primary-soft)); border-color: color-mix(in srgb, var(--purple) 35%, transparent); color: var(--text); }
.banner.ai .ic { color: var(--purple); } .banner.warn { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.banner.danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 40%, transparent); } .banner.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 40%, transparent); }
.banner.success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.empty { text-align: center; padding: var(--s7) var(--s5); color: var(--text-2); display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.empty .ei { width: 56px; height: 56px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; color: var(--text-3); margin-bottom: var(--s2); }
.empty h3 { color: var(--text); }

/* ---------- table ---------- */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--t-base); }
.tbl th { text-align: left; font-size: var(--t-xs); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); font-weight: 600; padding: 10px var(--s4); background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; user-select: none; position: sticky; top: 0; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--text); } .tbl th .sa { opacity: .6; margin-left: 4px; }
.tbl td { padding: 12px var(--s4); border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl.dense td { padding: 8px var(--s2); } .tbl.dense th { padding: 8px var(--s2); } .tbl tbody tr:last-child td { border-bottom: 0; }
.tbl.click tbody tr { cursor: pointer; } .tbl.click tbody tr:hover td { background: var(--surface-2); }
.tbl td.num, .tbl th.num { text-align: right; } .tbl td.c, .tbl th.c { text-align: center; }
.tbl tr.row-danger td { background: var(--danger-soft); } .tbl tr.row-warn td { background: var(--accent-soft); }
.tbl-input { height: 32px; padding: 0 8px; min-width: 0; }
.toolbar { display: flex; gap: var(--s3); align-items: center; flex-wrap: wrap; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); }
.toolbar .input, .toolbar .select { width: auto; min-width: 180px; }

/* ---------- kanban (Trello-style board) ----------
   .kboard = canvas (board bar + lists) inside the same centred .view container as every other screen, filling the window height under the top bar;
   the lists scroll sideways, a list scrolls its own cards. No overflow:hidden on .kboard, so board-bar dropdowns are not clipped. */
.kboard { display: flex; flex-direction: column; height: calc(100dvh - var(--topbar-h) - 2 * var(--s5)); min-height: 460px; background: var(--board-bg); color: var(--board-text); border: 1px solid var(--border); border-radius: var(--r-lg); }
.kboard-bar { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2) var(--s3); padding: 10px var(--s4); background: var(--board-bar); border-bottom: 1px solid var(--border); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.kboard-bar h1 { font-size: 18px; font-weight: 700; color: inherit; margin-right: var(--s1); }
.kboard-bar .sub { font-size: var(--t-sm); color: var(--text-2); }
.kboard-bar .grow { flex: 1; }
.kboard-bar .input, .kboard-bar .select { height: 32px; }
.kboard-bar .btn { height: 32px; }
.kb-ib { height: 32px; min-width: 32px; padding: 0 8px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: var(--r); background: var(--board-glass); color: var(--board-text); font-size: var(--t-sm); font-weight: 500; cursor: pointer; }
.kb-ib:hover { background: var(--board-glass-hover); }
.kboard .dd-panel { color: var(--text); }
.kb-pop { padding: var(--s3) var(--s4); font-size: var(--t-sm); color: var(--text-2); max-width: 360px; display: flex; flex-direction: column; gap: var(--s2); }
.kboard-foot { padding: 0 var(--s4) 10px; font-size: var(--t-xs); color: var(--text-2); }
.kboard-body { flex: 1; min-height: 0; display: flex; flex-direction: column; } .kboard-body > .kanban { flex: 1; min-height: 0; }
.kanban { display: flex; align-items: flex-start; gap: var(--s3); overflow-x: auto; overflow-y: hidden; padding: var(--s3) var(--s4) var(--s4); }
.kcol { flex: 0 0 272px; width: 272px; max-height: 100%; display: flex; flex-direction: column; background: var(--k-list); color: var(--k-text); border-radius: var(--r-lg); box-shadow: var(--k-shadow); }
.kcol.over { box-shadow: 0 0 0 2px var(--k-focus), var(--k-shadow); }
.kcol-h { display: flex; align-items: center; gap: 6px; padding: 8px 6px 4px 12px; }
.kcol-h .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--primary)); flex: none; }
.kcol-t { flex: 1; min-width: 0; font-size: var(--t-base); font-weight: 600; line-height: 20px; color: var(--k-text); overflow-wrap: anywhere; }
.kcol .n { font-size: var(--t-sm); color: var(--k-sub); padding: 0 2px; }
.k-ib { width: 32px; height: 32px; display: inline-grid; place-items: center; flex: none; border: 0; border-radius: var(--r); background: transparent; color: var(--k-sub); cursor: pointer; }
.k-ib:hover { background: var(--k-hover); color: var(--k-text); }
.kcol .dd-panel { min-width: 248px; }
.kmenu .dd-head { font-size: var(--t-sm); }
.kmenu .dd-item { align-items: center; padding: 8px var(--s4); border-bottom: 0; font-size: var(--t-sm); color: var(--text); }
.kmenu-sec { padding: 10px var(--s4) 4px; border-top: 1px solid var(--border); font-size: var(--t-xs); font-weight: 600; color: var(--text-3); }
.kmenu-ck { width: 16px; display: inline-grid; place-items: center; color: var(--primary); }
.kcol-cards { display: flex; flex-direction: column; gap: 8px; padding: 4px 8px 2px; overflow-y: auto; min-height: 8px; }
.kcol.over .kcol-cards::after { content: ''; flex: none; height: 40px; border-radius: var(--r); background: var(--k-hover); }
/* a list the dragged card may not enter: faded while dragging, red outline + the reason on hover (blockMove) */
.kcol.blocked { opacity: .6; transition: opacity .1s; } .kcol.blocked.over { opacity: 1; box-shadow: 0 0 0 2px var(--danger), var(--k-shadow); }
.kcol.blocked { position: relative; } .kcol.blocked .kcol-cards::after { display: none; }
.kcol-why { display: none; position: absolute; z-index: 2; top: 40px; left: 8px; right: 8px; box-shadow: var(--shadow-3); }
.kcol.blocked.over .kcol-why { display: flex; }
.kcol-why { gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r); background: var(--danger-soft); color: var(--danger-text); border: 1px solid var(--danger); font-size: var(--t-sm); line-height: 1.4; pointer-events: none; }
.kcol-why .ic { flex: none; margin-top: 1px; }
.kcol-add { display: flex; align-items: center; gap: 8px; margin: 4px 8px 8px; padding: 6px 8px; border: 0; border-radius: var(--r); background: transparent; color: var(--k-sub); font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.kcol-add:hover { background: var(--k-hover); color: var(--k-text); }
.kcol-end { height: 6px; }
.kcol .k-empty { font-size: var(--t-sm); color: var(--k-sub); padding: 6px 4px; }
.kcol.collapsed { flex: 0 0 auto; width: auto; }
.kcol-strip { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 44px; padding: 12px 0; border: 0; border-radius: var(--r-lg); background: transparent; color: var(--k-text); font: inherit; cursor: pointer; }
.kcol-strip:hover { background: var(--k-hover); }
.kcol-vt { writing-mode: vertical-rl; font-weight: 600; white-space: nowrap; }
.kcard { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 8px 12px 6px; background: var(--k-card); color: var(--k-text); border-radius: var(--r); box-shadow: var(--k-shadow); cursor: pointer; flex: none; }
.kcard:hover, .kcard:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--k-focus), var(--k-shadow); }
.kcard.dragging { background: var(--k-hover); box-shadow: none; } .kcard.dragging > * { visibility: hidden; }
.kcard-edit { position: absolute; top: 4px; right: 4px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--k-card); color: var(--k-sub); opacity: 0; transition: opacity .1s; pointer-events: none; }
.kcard:hover .kcard-edit, .kcard:focus-visible .kcard-edit { opacity: 1; }
.kcard .t { font-size: var(--t-base); line-height: 20px; overflow-wrap: anywhere; }
.klabels { display: flex; flex-wrap: wrap; gap: 4px; padding-right: 24px; }
.klabel { display: inline-block; max-width: 100%; height: 16px; line-height: 16px; padding: 0 8px; border-radius: 4px; background: var(--lc, var(--lbl-6)); color: var(--lbl-text); font-size: var(--t-xs); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kcard-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.kbadges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; font-size: var(--t-xs); color: var(--k-sub); }
.kbadge { display: inline-flex; align-items: center; gap: 4px; min-height: 20px; border-radius: 3px; white-space: nowrap; }
.kbadge.success, .kbadge.warning, .kbadge.danger { padding: 0 4px; font-weight: 500; }
.kbadge.success { background: var(--k-green); color: var(--k-on-badge); } .kbadge.danger { background: var(--k-red); color: var(--k-on-badge); } .kbadge.warning { background: var(--k-yellow); color: var(--k-on-yellow); }
.kbadge b { color: var(--k-text); }

/* ---------- drawer / modal / toast / tabs ---------- */
.overlay { position: fixed; inset: 0; background: rgba(8,12,24,.5); z-index: 80; animation: fade .15s; backdrop-filter: blur(2px); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(var(--w, 640px), 100vw); background: var(--surface); z-index: 81; box-shadow: var(--shadow-3); display: flex; flex-direction: column; animation: slidein .2s ease; }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-h, .modal-h { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); padding: var(--s4) var(--s5); border-bottom: 1px solid var(--border); }
.drawer-b { flex: 1; overflow-y: auto; padding: var(--s5); } .drawer-f, .modal-f { padding: var(--s3) var(--s5); border-top: 1px solid var(--border); display: flex; gap: var(--s2); justify-content: flex-end; align-items: center; background: var(--surface-2); }
.modal { position: fixed; z-index: 81; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(var(--w, 640px), calc(100vw - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-3); animation: pop .16s ease; }
@keyframes pop { from { transform: translate(-50%, -48%) scale(.98); opacity: 0; } to { transform: translate(-50%, -50%); opacity: 1; } }
.modal-b { padding: var(--s5); overflow-y: auto; }
.toasts { position: fixed; right: var(--s5); bottom: var(--s5); z-index: 100; display: flex; flex-direction: column; gap: var(--s2); }
.toast { display: flex; gap: var(--s3); align-items: center; min-width: 260px; max-width: 420px; padding: 12px 16px; background: var(--text); color: var(--surface); border-radius: var(--r); box-shadow: var(--shadow-3); animation: slidein .2s ease; font-size: var(--t-sm); }
.toast.success > .ic { color: #4ADE80; } .toast.error > .ic { color: #F87171; } .toast.warning > .ic { color: #FBBF24; }
.toast.error { align-items: flex-start; box-shadow: inset 4px 0 0 #F87171, var(--shadow-3); } .toast.error > .ic { margin-top: 2px; }
.toast-m { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; } .toast-m b { font-weight: 600; }
.toast-x { flex: none; width: 24px; height: 24px; display: grid; place-items: center; margin: -2px -6px 0 0; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: .7; cursor: pointer; } .toast-x:hover { opacity: 1; background: rgba(255,255,255,.12); }
.tabs { display: flex; gap: var(--s4); border-bottom: 1px solid var(--border); margin-bottom: var(--s4); overflow-x: auto; }
.tab { border: 0; background: none; padding: 10px 2px; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 6px; align-items: center; }
.tab:hover { color: var(--text); } .tab.on { color: var(--primary-text); border-bottom-color: var(--primary); }
.tab .tn { font-size: 11px; background: var(--surface-3); border-radius: var(--r-pill); padding: 0 7px; color: var(--text-2); }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: flex; gap: var(--s3); padding-bottom: var(--s4); position: relative; }
.timeline li::before { content: ""; position: absolute; left: 11px; top: 24px; bottom: 0; width: 1px; background: var(--border); } .timeline li:last-child::before { display: none; }
.timeline .tdot { width: 24px; height: 24px; border-radius: 50%; background: var(--primary-soft); color: var(--primary-text); display: grid; place-items: center; flex: none; }
.timeline .tdot.success { background: var(--success-soft); color: var(--success-text); } .timeline .tdot.warning { background: var(--accent-soft); color: var(--accent-text); } .timeline .tdot.danger { background: var(--danger-soft); color: var(--danger-text); }
.dropzone { border: 2px dashed var(--border-strong); border-radius: var(--r-lg); padding: var(--s5); text-align: center; color: var(--text-2); background: var(--surface-2); cursor: pointer; transition: all .12s; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.dropzone:hover, .dropzone.over { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px var(--s4); font-size: var(--t-base); } .kv dt { color: var(--text-2); } .kv dd { margin: 0; font-weight: 500; }
.sec-title { font-size: var(--t-sm); text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); font-weight: 600; margin: var(--s5) 0 var(--s3); }
.sec-title:first-child { margin-top: 0; }
.list-row { display: flex; align-items: center; gap: var(--s3); padding: 12px var(--s4); border-bottom: 1px solid var(--border); } .list-row:last-child { border-bottom: 0; }
.list-row.click { cursor: pointer; } .list-row.click:hover { background: var(--surface-2); }
.bar-row { display: grid; grid-template-columns: 130px 1fr 40px; gap: var(--s3); align-items: center; font-size: var(--t-sm); padding: 6px 0; }
/* paper = generic PDF-like preview (documents with a VNO sample use .pdoc below) */
.paper:not(.pdoc) { background: #fff; color: #1E293B; border: 1px solid var(--border); border-radius: 4px; box-shadow: var(--shadow-2); padding: 40px 44px; font-size: 12.5px; line-height: 1.5; max-width: 760px; margin: 0 auto; }
.paper:not(.pdoc) h2 { font-size: 20px; letter-spacing: .14em; color: #0F172A; } .paper:not(.pdoc) table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.paper:not(.pdoc) th { background: #EEF2F7; text-align: left; padding: 6px 8px; font-size: 11px; text-transform: uppercase; color: #475569; border: 1px solid #CBD5E1; } .paper:not(.pdoc) td { padding: 6px 8px; border: 1px solid #E2E8F0; }
.paper:not(.pdoc) .ph { display: flex; justify-content: space-between; border-bottom: 2px solid #3949AB; padding-bottom: 12px; margin-bottom: 14px; gap: 16px; } .paper:not(.pdoc) small { color: #64748B; }
/* gantt bars (shared) */
.gantt { display: grid; gap: 4px; font-size: var(--t-xs); }
/* ---------- role layouts ---------- */
[data-layout=tablet] { --sidebar-w: 96px; --t-base: 16px; --t-sm: 14px; --topbar-h: 68px; }
[data-layout=tablet] .btn { height: 48px; } [data-layout=tablet] .btn-sm { height: 40px; } [data-layout=tablet] .input, [data-layout=tablet] .select { height: 48px; }
[data-layout=tablet] .nav-item { flex-direction: column; text-align: center; gap: 4px; font-size: 12px; padding: 12px 4px; } [data-layout=tablet] .brand b, [data-layout=tablet] .brand small, [data-layout=tablet] .role-chip span, [data-layout=tablet] .sb-foot, [data-layout=tablet] .nav-label { display: none; }
[data-layout=tablet] .brand { justify-content: center; padding-left: 0; padding-right: 0; } [data-layout=tablet] .role-chip { margin-left: auto; margin-right: auto; padding: 4px 8px; }
[data-layout=tablet] .tbl td { padding-top: 16px; padding-bottom: 16px; }
[data-layout=portal] .app { grid-template-columns: 1fr; } [data-layout=portal] .sidebar { display: none; }
.subnav { display: none; gap: 4px; padding: 0 var(--s5); background: var(--surface); border-bottom: 1px solid var(--border); overflow-x: auto; }
[data-layout=portal] .subnav { display: flex; } .subnav a { padding: 12px 14px; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; text-decoration: none; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.subnav a.active { color: var(--primary-text); border-bottom-color: var(--role); } .subnav a:hover { color: var(--text); }
.portal-brand { display: none; align-items: center; gap: 10px; font-weight: 700; } [data-layout=portal] .portal-brand { display: flex; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(380px, 460px) minmax(0, 1fr); }
.login-l { padding: var(--s7) var(--s6); display: flex; flex-direction: column; justify-content: center; gap: var(--s5); background: var(--surface); border-right: 1px solid var(--border); }
.login-r { padding: var(--s7) var(--s6); display: flex; flex-direction: column; justify-content: center; max-width: 960px; background: radial-gradient(1200px 500px at 90% -10%, var(--primary-soft), transparent), var(--bg); }
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--s3); margin-top: var(--s4); }
.role-card { text-align: left; display: flex; gap: var(--s3); align-items: center; padding: var(--s3) var(--s4); border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); transition: all .14s; }
.role-card:hover { border-color: var(--rc); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.role-card b { display: block; line-height: 1.25; } .role-card div span { font-size: var(--t-xs); color: var(--text-2); }
.logo-mark { display: inline-grid; place-items: center; }

@media (max-width: 1100px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: minmax(0, 1fr); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; } .sidebar { position: fixed; z-index: 70; left: 0; width: 268px; transform: translateX(-100%); transition: transform .2s; } .app.nav-open .sidebar { transform: none; }
  .app.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(8,12,24,.5); z-index: 65; } .burger { display: inline-grid; }
  [data-layout=tablet] .app { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); } [data-layout=tablet] .sidebar { position: sticky; transform: none; width: auto; }
  .login { grid-template-columns: 1fr; } .login-l { border-right: 0; padding: var(--s5); } .login-r { padding: var(--s5); }
  .view { padding: var(--s4); } .g2, .g3, .g-split, .form-grid { grid-template-columns: minmax(0, 1fr); } .topbar { padding: 0 var(--s3); } .topbar .search { max-width: none; } .kboard { height: calc(100dvh - var(--topbar-h) - 2 * var(--s4)); }
}
[data-layout=portal] .burger, [data-layout=tablet] .burger { display: none !important; }

.select { appearance: none; -webkit-appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238492A6' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.kpi.sm { padding: var(--s3); } .kpi.sm .val { font-size: var(--t-lg); } .kpi.sm .lbl { font-size: var(--t-xs); }
.cell-stack { display: flex; flex-direction: column; gap: 4px; }

/* ---- best-price / best-value highlight (quote compare) ---- */
.tbl td.cell-best { background: var(--success-soft); color: var(--success-text); font-weight: 700; }

/* ---- wide tables: sticky first column + scroll affordance (shadow on the clipped edge) ---- */
.tbl-wrap.scroll-hint { position: relative; background:
  linear-gradient(to right, var(--surface) 30%, transparent) 0 0 / 40px 100% no-repeat local,
  linear-gradient(to left, var(--surface) 30%, transparent) 100% 0 / 40px 100% no-repeat local,
  linear-gradient(to right, rgba(15,23,42,.18), transparent) 0 0 / 14px 100% no-repeat scroll,
  linear-gradient(to left, rgba(15,23,42,.18), transparent) 100% 0 / 14px 100% no-repeat scroll; }
[data-theme=dark] .tbl-wrap.scroll-hint { background:
  linear-gradient(to right, var(--surface) 30%, transparent) 0 0 / 40px 100% no-repeat local,
  linear-gradient(to left, var(--surface) 30%, transparent) 100% 0 / 40px 100% no-repeat local,
  linear-gradient(to right, rgba(0,0,0,.55), transparent) 0 0 / 14px 100% no-repeat scroll,
  linear-gradient(to left, rgba(0,0,0,.55), transparent) 100% 0 / 14px 100% no-repeat scroll; }
.tbl-wrap.sticky-first .tbl th:first-child, .tbl-wrap.sticky-first .tbl td:first-child { position: sticky; left: 0; z-index: 2; box-shadow: 1px 0 0 var(--border-strong); }
.tbl-wrap.sticky-first .tbl td:first-child { background: var(--surface); } .tbl-wrap.sticky-first .tbl th:first-child { background: var(--surface-2); z-index: 3; }
.scroll-note { display: flex; align-items: center; gap: 6px; padding: 6px var(--s4); font-size: var(--t-xs); color: var(--text-3); border-bottom: 1px solid var(--border); background: var(--surface-2); }

/* ---- master-file row status colours (keyed by PO state) ---- */
.tbl tr.st-shipped td { background: var(--success-soft); } .tbl tr.st-cancelled td { background: var(--surface-3); } .tbl tr.st-po_not_signed td { background: var(--accent-soft); }
.tbl tr.st-po_signed td { background: var(--info-soft); } .tbl tr.st-rejected td { background: var(--danger-soft); } .tbl tr.st-tbi td { background: var(--purple-soft); }
.state-dot { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid var(--border-strong); }
.state-dot.st-shipped { background: var(--success-soft); } .state-dot.st-cancelled { background: var(--surface-3); } .state-dot.st-po_not_signed { background: var(--accent-soft); }
.state-dot.st-po_signed { background: var(--info-soft); } .state-dot.st-rejected { background: var(--danger-soft); } .state-dot.st-tbi { background: var(--purple-soft); }
.cell-clip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }

/* ---- Gantt timeline chart (positions left/width are set inline per bar; everything else here) ---- */
.gt-wrap { min-width: 820px; }
.gt-head, .gt-row { display: grid; grid-template-columns: 220px 1fr; border-bottom: 1px solid var(--border); }
.gt-row.late { background: var(--danger-soft); }
.gt-corner { padding: 8px 12px; font-size: var(--t-xs); color: var(--text-3); }
.gt-axis { position: relative; height: 30px; } .gt-axis .gt-tick-label { position: absolute; top: 8px; font-size: var(--t-xs); color: var(--text-3); }
.gt-label { padding: 6px 12px; } .gt-label .gt-sub.alert { color: var(--danger-text); }
.gt-track { position: relative; height: 46px; }
.gt-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--border); }
.gt-today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed var(--danger); z-index: 2; }
.gt-bar { position: absolute; height: 11px; border-radius: 3px; box-sizing: border-box; }
.gt-bar.plan { top: 7px; border: 1.5px solid var(--primary); background: var(--primary-soft); }
.gt-bar.actual { top: 24px; background: var(--info); } .gt-bar.actual.done { background: var(--success); } .gt-bar.actual.late { background: var(--danger); }
.gt-bar.actual.open { opacity: .8; background-image: repeating-linear-gradient(45deg, transparent 0 5px, rgba(255,255,255,.35) 5px 10px); }
.gt-ready { position: absolute; top: 14px; width: 12px; height: 12px; transform: rotate(45deg); background: var(--accent); z-index: 3; }
.gt-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 8px 12px; font-size: var(--t-xs); color: var(--text-2); }
.gt-key { display: inline-block; margin-right: 6px; vertical-align: middle; width: 16px; height: 8px; }
.gt-key.plan { border: 1.5px solid var(--primary); background: var(--primary-soft); } .gt-key.done { background: var(--success); } .gt-key.run { background: var(--info); } .gt-key.late { background: var(--danger); }
.gt-key.ready { width: 9px; height: 9px; background: var(--accent); transform: rotate(45deg); margin-right: 8px; } .gt-key.today { width: 0; height: 12px; border-left: 2px dashed var(--danger); }

/* ---- month calendar (logistics) ---- */
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.cal-dow { padding: 6px; font-size: var(--t-xs); font-weight: 600; color: var(--text-2); border-top: 1px solid var(--border); border-left: 1px solid var(--border); background: var(--surface-3); }
.cal-cell { min-height: 92px; padding: 6px; overflow: hidden; border-top: 1px solid var(--border); border-left: 1px solid var(--border); background: var(--surface); }
.cal-cell.empty { background: var(--surface-2); } .cal-cell.today { background: var(--primary-soft); }
.cal-day { font-size: var(--t-xs); margin-bottom: 4px; color: var(--text-2); } .cal-cell.today .cal-day { font-weight: 600; color: var(--text); }
.cal-ev { margin-bottom: 3px; cursor: pointer; }

/* ---- QC tablet: large segmented buttons + photo tiles ---- */
.seg-lg { display: flex; flex-wrap: wrap; gap: 8px; } .seg-lg .btn { min-height: 48px; min-width: 64px; font-size: var(--t-md); }
.photo-tiles { display: flex; flex-wrap: wrap; gap: 12px; }
.photo-tile { position: relative; width: 104px; height: 104px; border-radius: var(--r); overflow: hidden; border: 1px solid var(--border-strong); background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; }
.photo-tile .cap { position: absolute; left: 6px; bottom: 4px; font-size: var(--t-xs); color: #fff; text-shadow: 0 1px 2px #000; }
.photo-tile .del { position: absolute; top: 2px; right: 2px; width: 48px; height: 48px; background: rgba(0,0,0,.45); color: #fff; }
.photo-add { width: 104px; height: 104px; border-radius: var(--r); border: 2px dashed var(--border-strong); background: var(--surface-2); color: var(--text-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: var(--t-sm); cursor: pointer; }
.photo-add:hover { border-color: var(--primary); color: var(--primary); }
.tbl-wrap.sticky-first .tbl tr.row-warn td:first-child { background: var(--accent-soft); } .tbl-wrap.sticky-first .tbl tr.row-danger td:first-child { background: var(--danger-soft); }
.tbl-wrap.sticky-first .tbl td.cell-best:first-child { background: var(--success-soft); }

/* ---- wide tables: pin the last (action) column so it is never clipped ---- */
.tbl-wrap.sticky-last .tbl th:last-child, .tbl-wrap.sticky-last .tbl td:last-child { position: sticky; right: 0; z-index: 2; box-shadow: -1px 0 0 var(--border-strong); }
.tbl-wrap.sticky-last .tbl td:last-child { background: var(--surface); } .tbl-wrap.sticky-last .tbl th:last-child { background: var(--surface-2); z-index: 3; }
.tbl-wrap.sticky-last .tbl tr.row-warn td:last-child { background: var(--accent-soft); } .tbl-wrap.sticky-last .tbl tr.row-danger td:last-child { background: var(--danger-soft); }

/* tight: narrower cell padding for wide editable / comparison tables */
.tbl.tight th, .tbl.tight td { padding-left: 6px; padding-right: 6px; }

/* ---------- phone shell (QC + factory portal first; every role usable) ----------
   <=900px: sidebar becomes an off-canvas menu (hamburger). <=600px: QC (tablet layout) drops its 96px rail and the portal drops its top tabs; both get a bottom tab bar.
   <=640px: short tables turn into cards (ui.table / app.js labelTables), wide ones scroll inside .tbl-wrap. <=480px: every tap target is at least 44px. */
.bottomnav { display: none; }
.dd-item.click { cursor: pointer; } .dd-item.click:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
@media (max-width: 640px) {
  .tbl.cards { display: block; } .tbl.cards thead { display: none; } .tbl.cards tbody, .tbl.cards tfoot { display: block; }
  .tbl.cards tr { display: block; margin: 0 0 var(--s3); padding: var(--s2) var(--s3); border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
  .tbl.cards tr:hover td { background: transparent; }
  .tbl.cards td { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: 7px 0 !important; border: 0 !important; text-align: right; min-width: 0; word-break: break-word; }
  .tbl.cards td::before { content: attr(data-label); flex: 0 0 38%; max-width: 40%; text-align: left; color: var(--text-2); font-size: var(--t-xs); font-weight: 600; }
  .tbl.cards td[data-label=""]::before { display: none; } .tbl.cards td[data-label=""] { justify-content: flex-end; flex-wrap: wrap; }
  .tbl.cards td.num { font-variant-numeric: tabular-nums; }
  /* a long badge in a card row wraps inside its half instead of running over the label */
  .tbl.cards td > .badge { white-space: normal; height: auto; min-height: 22px; padding-top: 2px; padding-bottom: 2px; text-align: right; min-width: 0; max-width: 60%; }
  .tbl-wrap { max-width: 100%; -webkit-overflow-scrolling: touch; } .tbl-wrap:has(.tbl.cards) { overflow-x: visible; background: none; }
  .drawer { width: 100vw !important; } .modal { width: calc(100vw - 16px) !important; max-height: calc(100dvh - 16px); }
  .drawer-f, .modal-f { flex-wrap: wrap; } .drawer-f .btn, .modal-f .btn { flex: 1 1 auto; }
  .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: var(--s2); }
  .page-head { align-items: flex-start; } .page-head > .row { width: 100%; } .tabs { overflow-x: auto; flex-wrap: nowrap; } .tab { white-space: nowrap; }
}
@media (max-width: 600px) {
  [data-layout=tablet] .app, [data-layout=portal] .app { grid-template-columns: minmax(0, 1fr); }
  [data-layout=tablet] .sidebar, [data-layout=portal] .subnav { display: none; }
  [data-layout=tablet] .bottomnav, [data-layout=portal] .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: var(--surface); border-top: 1px solid var(--border-strong); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -2px 10px rgba(15,23,42,.08); }
  .bn-item { position: relative; flex: 1 1 0; min-width: 0; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 6px 2px; color: var(--text-2); text-decoration: none !important; font-size: 11px; font-weight: 600; border-top: 3px solid transparent; }
  .bn-item .bn-l { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bn-item.active { color: var(--primary-text); border-top-color: var(--role); background: var(--primary-soft); }
  .bn-item .cnt { position: absolute; top: 4px; left: calc(50% + 6px); font-size: 10px; min-width: 16px; text-align: center; background: var(--accent); color: var(--on-solid, #fff); border-radius: var(--r-pill); padding: 0 4px; font-weight: 700; }
  [data-layout=tablet] .main, [data-layout=portal] .main { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  [data-layout=tablet] { --topbar-h: 56px; } [data-layout=tablet] .topbar { gap: 4px; padding: 0 8px; }
  .view { overflow-x: clip; }
}
@media (max-width: 480px) {
  .langsw-b { min-width: 34px; height: 40px; padding: 0 4px; }
  .topbar { gap: 4px; padding: 0 8px; } .topbar .search { min-width: 0; } .topbar .search input { padding-left: 32px; }
  .portal-brand .pb-text { display: none; } [data-layout=tablet] .rolesw, [data-layout=portal] .rolesw { display: none; }
  .btn, .btn-sm, .btn-lg { min-height: 44px; height: auto; } .input, .select { height: 44px; } .textarea { min-height: 88px; }
  .icon-btn { width: 44px; height: 44px; } .tab, .seg button, .dd-item, .nav-item, .subnav a { min-height: 44px; } .seg button { padding: 8px 12px; }
  input[type=checkbox], input[type=radio] { width: 22px; height: 22px; } .check { min-height: 44px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .view { padding: var(--s3); } .kpi .val { font-size: var(--t-lg); }
  h1 { font-size: 22px; } .dd-panel { max-width: calc(100vw - 16px); }
  /* internal desktop-layout roles: the topbar (burger, role switch, EN | VI, glossary, bell, avatar) must fit 360-390 px: the role switch shrinks to an ellipsised chip */
  .topbar .rolesw { max-width: 78px; padding-left: 6px; padding-right: 4px; gap: 4px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; justify-content: flex-start; }
  .topbar .search { flex: 0 1 0; }
  /* narrow: role chip = colour dot + caret (the name stays in the dropdown, sidebar and title); the collapsed search box drops its stray border; the glossary ? keeps a 44px tap target */
  .topbar .rolesw .rolesw-l { display: none; } .topbar .rolesw { max-width: none; }
  [data-layout=desktop] .topbar .search { display: none; }
  .topbar .gl-btn { flex: 0 0 44px; min-width: 44px; }
}
/* internal desktop screens on a phone: nothing may push the page wider than the viewport (wide tables scroll inside .tbl-wrap, everything else wraps or scrolls in its own box) */
@media (max-width: 640px) {
  .row, .card-h, .list-row { flex-wrap: wrap; } .banner > div, .banner > span { min-width: 0; overflow-wrap: anywhere; } .view .row > * { max-width: 100%; } .card-h > *, .list-row > .grow { min-width: 0; }
  .seg { max-width: 100%; overflow-x: auto; } .seg button { white-space: nowrap; }
  .paper:not(.pdoc) { max-width: 100%; overflow-x: auto; padding: 20px 16px; } .paper:not(.pdoc) .ph { flex-wrap: wrap; }
  .kv { grid-template-columns: minmax(0, 1fr); } .kv dd { overflow-wrap: anywhere; }
  /* two-pane screens set their columns inline (list + detail, form + preview): stack them on a phone */
  .view .grid[style*="grid-template-columns: minmax"] { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 640px) { .file-chip { max-width: 100%; min-width: 0; } .file-chip .fn { overflow-wrap: anywhere; } }

/* Portal roles (factory + customer): touch targets >= 44px on phone / tablet inside views, drawers and dialogs (previously injected by supplier.js only) */
@media (max-width: 1024px) {
  [data-layout=portal] .view .btn, [data-layout=portal] .drawer .btn, [data-layout=portal] .modal .btn { min-height: 44px; }
  [data-layout=portal] .view .seg button, [data-layout=portal] .drawer .seg button, [data-layout=portal] .modal .seg button, [data-layout=portal] .view .tab, [data-layout=portal] .drawer .tab, [data-layout=portal] .modal .tab { min-height: 44px; }
  [data-layout=portal] .view .input, [data-layout=portal] .drawer .input, [data-layout=portal] .modal .input, [data-layout=portal] .view .select, [data-layout=portal] .drawer .select, [data-layout=portal] .modal .select { min-height: 44px; }
  [data-layout=portal] .view .icon-btn, [data-layout=portal] .drawer .icon-btn, [data-layout=portal] .modal .icon-btn { min-width: 44px; min-height: 44px; }
}
/* six bottom tabs (customer portal) must fit a 360px phone: tight padding, labels ellipsised */
@media (max-width: 600px) {
  [data-layout=portal] .bn-item { padding: 6px 0; font-size: 10px; letter-spacing: -.1px; }
  [data-layout=portal] .bn-item .cnt { left: calc(50% + 4px); }
}
/* new-RFQ item rows (customer portal) become one card per row on a phone so Qty / Rev stay thumb-sized */
@media (max-width: 600px) {
  .tbl.rfq-rows, .tbl.rfq-rows tbody, .tbl.rfq-rows tr, .tbl.rfq-rows td { display: block; width: 100%; }
  .tbl.rfq-rows thead { display: none; }
  .tbl.rfq-rows tr { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; margin-bottom: 10px; }
  .tbl.rfq-rows td { border: 0; padding: 4px 0; width: 100% !important; }
  .tbl.rfq-rows td::before { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
  .tbl.rfq-rows td:nth-child(1)::before { content: 'Row'; } .tbl.rfq-rows td:nth-child(2)::before { content: 'Item no. *'; } .tbl.rfq-rows td:nth-child(3)::before { content: 'Drawing no.'; }
  .tbl.rfq-rows td:nth-child(4)::before { content: 'Item name *'; } .tbl.rfq-rows td:nth-child(5)::before { content: 'Qty *'; } .tbl.rfq-rows td:nth-child(6)::before { content: 'Rev'; }
  .tbl.rfq-rows td:nth-child(7)::before { content: none; }
}

/* ---- Abbreviation glossary: auto-wrapped <abbr class="gl">, tap popover, glossary screen ---- */
abbr.gl { text-decoration: underline dotted; text-decoration-thickness: 1px; text-underline-offset: 2px; cursor: help; }
abbr.gl:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-radius: 2px; }
.gl-pop { position: fixed; z-index: 400; max-width: min(280px, calc(100vw - 16px)); box-sizing: border-box; padding: var(--s2) var(--s3); background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--r); box-shadow: var(--shadow-3); font-size: var(--t-sm); line-height: 1.4; display: flex; flex-direction: column; gap: 2px; }
.gl-pop b { color: var(--primary-text); }
.gl-btn { font-weight: 700; font-size: var(--t-md); border-color: var(--border); }
.gl-bar { justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); flex-wrap: wrap; }
.gl-search { position: relative; flex: 1 1 260px; max-width: 460px; }
.gl-search input { width: 100%; padding-left: 36px; }
.gl-search .ic { position: absolute; left: 11px; top: 11px; color: var(--text-3); }
.gl-abbr b { white-space: nowrap; }
/* kanban on phones: one list per swipe, board bar controls take a full row */
@media (max-width: 640px) {
  .kanban { scroll-snap-type: x mandatory; padding: var(--s3); }
  .kcol { flex-basis: min(272px, 84vw); width: min(272px, 84vw); scroll-snap-align: start; }
  .kboard-bar { padding: 10px var(--s3); } .kboard-bar .field { flex: 1 1 160px; width: auto !important; }
}

/* ===== PDF-faithful document pages (assets/docs.js): sizes in pt copied from VNO's sample PDFs / Excel templates ===== */
.pdoc-viewer { --z: 1; position: relative; background: #DADDE3; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px 12px; overflow: auto; max-width: 100%; }
[data-theme=dark] .pdoc-viewer { background: #0A0E18; }
.pdoc-viewer.full { max-height: calc(100vh - 170px); }
.pdoc-bar { position: sticky; top: 0; left: 0; z-index: 3; display: flex; justify-content: flex-end; align-items: center; gap: 4px; padding: 8px 0; margin: 0 -2px; }
.pdoc-btn { min-width: 30px; height: 28px; padding: 0 8px; display: inline-grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); font-size: 15px; line-height: 1; cursor: pointer; }
.pdoc-btn:hover { background: var(--surface-3); }
.pdoc-pct { min-width: 46px; text-align: center; font-size: var(--t-xs); font-variant-numeric: tabular-nums; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 6px; height: 28px; line-height: 26px; }
.pdoc-stack { display: flex; flex-direction: column; gap: 12px; width: max-content; min-width: 100%; }
.pdoc { zoom: var(--z, 1); position: relative; box-sizing: border-box; flex: none; margin: 0 auto; background: #fff; color: #000; box-shadow: 0 1px 3px rgba(0,0,0,.25), 0 4px 14px rgba(0,0,0,.12); overflow: hidden;
  font-family: Arial, Arimo, Helvetica, sans-serif; font-size: 7pt; line-height: 1.15; text-align: left; -webkit-font-smoothing: antialiased; }
.pdoc * { box-sizing: border-box; }
.pdoc b { font-weight: 700; }
.pdoc .pd-at { position: absolute; white-space: nowrap; line-height: 1; }
.pdoc .pd-at.pd-c { transform: translateX(-50%); }
.pdoc .pd-wrap, .pdoc .pd-at.pd-wrap { white-space: normal; }
.pdoc .pd-img { position: absolute; max-width: none; user-select: none; pointer-events: none; }
.pdoc .pd-rule { position: absolute; background: #000; }
.pdoc .pd-flow { position: relative; }
.pdoc .pd-wm { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%) rotate(-30deg); font: 700 110pt Arial, sans-serif; letter-spacing: 8pt; color: rgba(220, 38, 38, .10); pointer-events: none; white-space: nowrap; z-index: 2; }
.pdoc .pd-sig { position: absolute; display: grid; place-items: center; border: .8pt dashed #7C93B5; border-radius: 4pt; color: #5B7398; background: rgba(219, 234, 254, .35); font: italic 6.5pt Calibri, Carlito, Arial, sans-serif; text-align: center; padding: 4pt; z-index: 1; }
.pdoc .pd-row { height: 10pt; line-height: 10pt; white-space: nowrap; }
.pdoc .pd-row > span { vertical-align: top; }
.pdoc .pd-row.pd-wrap { white-space: normal; height: auto; }
.pdoc .pd-bar { width: 177pt; height: 10.1pt; line-height: 10.1pt; padding-left: 1.5pt; background: #A6A6A6; }
.pdoc .pd-signb, .pdoc .pd-po-foot, .pdoc .pd-ci-foot { position: relative; }
.pdoc .pd-po-foot { margin-top: 12.3pt; }
/* tables */
.pdoc .pd-t { width: 100%; border-collapse: collapse; table-layout: fixed; }
.pdoc .pd-t th, .pdoc .pd-t td { padding: 0 2pt; border: .6pt solid #000; vertical-align: middle; overflow: visible; overflow-wrap: anywhere; }
.pdoc .pd-t .c { text-align: center; } .pdoc .pd-t .r { text-align: right; } .pdoc .pd-t .b { font-weight: 700; }
/* quotation */
.pdoc .pd-qt th { height: 22.4pt; background: #D9D9D9; font: 700 6.1pt Arial, Arimo, sans-serif; text-align: center; border-top-width: 1.3pt; }
.pdoc .pd-qt th:first-child { border-left-width: 1.3pt; } .pdoc .pd-qt th:last-child { border-right-width: 1.3pt; }
.pdoc .pd-qt th.l { text-align: left; padding-left: 1.5pt; } .pdoc .pd-qt th.nr { border-right: 0; } .pdoc .pd-qt th.nl { border-left: 0; }
.pdoc .pd-qt td { height: 27pt; font: 6.1pt Arial, Arimo, sans-serif; line-height: 1.25; }
.pdoc .pd-qt td.q { font-size: 6.8pt; padding-right: .5pt; } .pdoc .pd-qt td.drw { font: 7.6pt Calibri, Carlito, Arial, sans-serif; }
.pdoc .pd-qt tr.tot td { height: 9.9pt; line-height: 9.9pt; }
.pdoc .pd-lt td { height: 16pt; }
/* purchase order */
.pdoc .pd-po { border: .7pt solid #000; }
.pdoc .pd-po th { height: 24.6pt; background: #969696; font: 700 7.3pt Arial, Arimo, sans-serif; text-align: center; border-width: .7pt; }
.pdoc .pd-po th.rm { background: #808080; font: 700 8pt Calibri, Carlito, Arial, sans-serif; vertical-align: bottom; padding-bottom: 3pt; }
.pdoc .pd-po td { border-width: .7pt; font: 6.6pt Helvetica, Arial, Arimo, sans-serif; line-height: 1.24; }
.pdoc .pd-po td.h73 { font-size: 7.3pt; } .pdoc .pd-po td.ari { font-family: Arial, Arimo, sans-serif; } .pdoc .pd-po td.desc { padding: 4pt 2pt; }
.pdoc .pd-po tr.it td { height: 40pt; } .pdoc .pd-po tr.gap td { height: 19pt; }
.pdoc .pd-po tr.tot td { height: 22.2pt; font: 700 7.3pt Arial, Arimo, sans-serif; }
.pdoc .pd-po tbody td:nth-child(5), .pdoc .pd-po tbody td:nth-child(7) { padding-right: 3pt; }
/* commercial invoice / packing list / invoice (Times New Roman) */
.pdoc .pd-ci th, .pdoc .pd-ci td, .pdoc .pd-pl th, .pdoc .pd-pl td { font-family: "Times New Roman", Times, Tinos, serif; border-width: .7pt; white-space: pre-line; }
.pdoc .pd-ci th { height: 30pt; overflow-wrap: normal; font-size: 7.6pt; font-weight: 700; text-align: center; line-height: 1.26; }
.pdoc .pd-ci td { height: 43.5pt; font-size: 7pt; line-height: 1.24; } .pdoc .pd-ci td.xs { font-size: 5.5pt; } .pdoc .pd-ci td.big { font-size: 8.3pt; }
.pdoc .pd-ci tr.tot td { height: 12.9pt; font-size: 7.6pt; font-weight: 700; }
.pdoc .pd-pl { border: 1.2pt solid #000; }
.pdoc .pd-pl th { height: 32.7pt; padding: 0 .3pt; font-size: 6.6pt; font-weight: 700; text-align: center; line-height: 1.27; border-width: .6pt; overflow-wrap: normal; } .pdoc .pd-pl th.cal { font-family: Calibri, Carlito, Arial, sans-serif; }
.pdoc .pd-pl td { height: 32.4pt; font-size: 6pt; line-height: 1.3; border-width: .6pt; } .pdoc .pd-pl td.r { padding-right: 2.8pt; }
.pdoc .pd-pl tr.tot td { height: 18.3pt; font-size: 7.2pt; font-weight: 700; border-bottom-width: 1.2pt; }
.pdoc .pd-ci-foot > div:not(.pd-at) { white-space: nowrap; }
/* Excel templates (RFQ, CAR) */
.pdoc .pd-sheet { position: absolute; }
.pdoc .pd-zoom { position: relative; }
.pdoc .pd-xl { border-collapse: collapse; table-layout: fixed; width: max-content; }
.pdoc .pd-xl td { padding: 0 2.2pt; font: 11pt Arial, Arimo, sans-serif; line-height: 1.15; white-space: nowrap; overflow: visible; vertical-align: bottom; border: 0; }
.pdoc .pd-xl td.c { text-align: center; } .pdoc .pd-xl td.wr { white-space: normal; } .pdoc .pd-xl td.cal { font-family: Calibri, Carlito, Arial, sans-serif; }
.pdoc .pd-xl td.bx { border: .75pt solid #000; vertical-align: middle; }
.pdoc .pd-xl td.hd { background: #D9D9D9; font-weight: 700; text-align: center; white-space: normal; }
.pdoc .pd-rfq td[class^="b1"], .pdoc .pd-rfq td.b-f, .pdoc .pd-rfq td.b-g, .pdoc .pd-rfq td.b-h { vertical-align: middle; }
.pdoc .pd-rfq .b13 { border-left: 1.5pt solid #000; border-top: 1.5pt solid #000; border-right: .75pt solid #000; border-bottom: .75pt solid #000; }
.pdoc .pd-rfq .b-f { border-left: .75pt solid #000; border-right: .75pt solid #000; border-top: 1.5pt solid #000; border-bottom: 1.5pt solid #000; }
.pdoc .pd-rfq .b-g { border-left: .75pt solid #000; border-right: .75pt solid #000; border-bottom: .75pt solid #000; }
.pdoc .pd-rfq .b-h { border-bottom: .75pt solid #000; } .pdoc .pd-rfq .t { border-top: 1.5pt solid #000; } .pdoc .pd-rfq .b-h.bb { border-bottom: 1.5pt solid #000; }
.pdoc .pd-rfq .b15a { border-left: 1.5pt solid #000; border-right: .75pt solid #000; border-bottom: .75pt solid #000; }
.pdoc .pd-rfq .b15c { border-right: .75pt solid #000; border-bottom: .75pt solid #000; }
.pdoc .pd-rfq .b17a { border-left: 1.5pt solid #000; border-bottom: 1.5pt solid #000; } .pdoc .pd-rfq .b17 { border-bottom: 1.5pt solid #000; }
.pdoc .pd-rfq .b17c { border-left: .75pt solid #000; border-bottom: 1.5pt solid #000; } .pdoc .pd-rfq .b17d { border-right: .75pt solid #000; border-bottom: 1.5pt solid #000; }
.pdoc .pd-rfq td.sigc { position: relative; }
.pdoc .pd-car td.tx { white-space: pre-line; vertical-align: top; padding: 3pt 3pt 6pt; }
.pdoc .pd-car td.bx { border-color: #000; }
