/* PLM Faslink — giao diện theo phong cách dashboard của Tremor (tremor.so): nền xám rất nhạt, thẻ trắng viền mảnh bo 8px,
   số liệu lớn đậm, nhãn xám, huy hiệu màu nhạt, biểu đồ màu xanh dương làm chủ đạo. Bố cục: thanh bên trắng + nội dung tối đa 1360px. */
:root {
  --bg: #F9FAFB;
  --surface: #FFFFFF;
  --surface-2: #F3F4F6;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --text: #111827;
  --text-2: #374151;
  --text-muted: #6B7280;
  --text-faint: #9CA3AF;
  --brand: #2563EB;
  --brand-600: #1D4ED8;
  --brand-50: #EFF6FF;
  --brand-100: #DBEAFE;
  --ok: #047857; --ok-bg: #ECFDF5; --ok-ring: #A7F3D0;
  --warn: #B45309; --warn-bg: #FFFBEB; --warn-ring: #FDE68A;
  --bad: #BE123C; --bad-bg: #FFF1F2; --bad-ring: #FECDD3;
  --info: #1D4ED8; --info-bg: #EFF6FF; --info-ring: #BFDBFE;
  --c1: #3B82F6; --c2: #06B6D4; --c3: #6366F1; --c4: #F59E0B; --c5: #10B981; --c6: #D946EF; --c7: #94A3B8;
  --radius: 8px; --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-pop: 0 10px 30px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .06);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --nav-w: 248px;
  /* tên cũ dùng bởi công cụ Quality Standard */
  --color-ink: #111827; --color-background: var(--bg); --color-surface: var(--surface); --color-surface-muted: var(--surface-2);
  --color-border: var(--border); --color-border-strong: var(--border-strong); --color-text: var(--text);
  --color-text-secondary: var(--text-muted); --color-text-muted: var(--text-faint); --color-accent: var(--brand);
  --color-success: #059669; --color-warning: #D97706; --color-error: #E11D48;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; text-wrap: balance; color: var(--text); }
h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 14px; font-weight: 600; }
code { font: 12px ui-monospace, "Cascadia Mono", monospace; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.num, td.r, .kpi .v { font-variant-numeric: tabular-nums; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* ---------- Khung ---------- */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }
.nav { background: var(--surface); border-right: 1px solid var(--border); padding: 18px 12px 16px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.brand .mark { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #2563EB, #06B6D4); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.brand b { display: block; font-size: 15px; line-height: 1.2; }
.brand span { font-size: 12px; color: var(--text-muted); }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text-2); font-size: 14px; font-weight: 500; }
.nav a svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--text-faint); }
.nav a:hover { background: var(--surface-2); text-decoration: none; }
.nav a.on { background: var(--brand-50); color: var(--brand-600); }
.nav a.on svg { color: var(--brand); }
.nav .sep { margin: 14px 10px 4px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-faint); }
.nav .who { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--border); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-100); color: var(--brand-600); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: 0 0 auto; }
.who .meta { min-width: 0; flex: 1; font-size: 12px; color: var(--text-muted); line-height: 1.35; }
.who .meta b { display: block; color: var(--text); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who .acts { display: flex; gap: 10px; margin-top: 2px; }
.who .acts a, .who .acts button { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: var(--brand); cursor: pointer; }
.topbar { display: none; }
main { min-width: 0; padding: 28px 40px 64px; }
#app { display: flex; flex-direction: column; gap: 24px; max-width: 1360px; margin: 0 auto; }

@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .nav { position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 40; transform: translateX(-100%); transition: transform .2s ease; box-shadow: none; }
  .nav.open { transform: none; box-shadow: 0 0 0 100vmax rgba(17, 24, 39, .35); }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--border); padding: 10px max(16px, env(safe-area-inset-left)); }
  .topbar button { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; padding: 5px 10px; cursor: pointer; }
  main { padding: 20px 16px 48px; }
}
@media (prefers-reduced-motion: reduce) { .nav { transition: none; } }

/* ---------- Đầu trang ---------- */
.page-head > div { min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; }
.page-head .sub { color: var(--text-muted); margin: 6px 0 0; max-width: 82ch; }
.page-head .sub b { color: var(--text-2); font-weight: 600; }
.eyebrow { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.eyebrow a { color: var(--text-muted); }
.eyebrow a:hover { color: var(--brand); }
.season-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.hint { color: var(--text-muted); font-size: 13px; }
.muted { color: var(--text-muted); }

/* ---------- Thẻ ---------- */
.card-block, .card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 24px; min-width: 0; }
.card-block > h2, .card > h2 { margin-bottom: 4px; }
.card-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.card-head p { margin: 2px 0 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 24px; }
.grid-3-2 { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; }
@media (max-width: 1100px) { .grid-3-2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .grid2 { grid-template-columns: minmax(0, 1fr); } .card-block, .card { padding: 16px; } }

.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; min-width: 0; position: relative; }
.kpi.accent::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brand); }
.kpi .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.kpi .l { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.kpi .v { font-size: 28px; font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; color: var(--text); }
.kpi .v small { font-size: 14px; font-weight: 500; color: var(--text-muted); margin-left: 4px; letter-spacing: 0; }
.kpi .s { font-size: 12.5px; color: var(--text-muted); }
.kpi .bar { margin-top: 6px; }

.progress { height: 8px; border-radius: 999px; background: var(--brand-100); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 999px; background: var(--brand); }
.progress.thin { height: 6px; }
.progress.cyan { background: #CFFAFE; } .progress.cyan > i { background: var(--c2); }
.cell-bar { display: flex; align-items: center; gap: 10px; justify-content: flex-end; }
.cell-bar .progress { width: 72px; flex: 0 0 auto; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12.5px; color: var(--text-muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* Nút chuyển (segmented) */
.seg { display: inline-flex; background: var(--surface-2); border-radius: var(--radius); padding: 3px; gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { flex: 0 0 auto; }
.seg button { border: 0; background: none; font: 500 13px var(--font); color: var(--text-muted); padding: 5px 12px; border-radius: var(--radius-sm); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(16, 24, 40, .1); }

/* ---------- Nút, ô nhập ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text-2); font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap; box-shadow: var(--shadow); }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-600); }
.btn-accent { background: #0891B2; border-color: #0891B2; color: #fff; }
.btn-outline { background: var(--surface); }
.btn-danger { color: var(--bad); border-color: var(--bad-ring); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn[disabled], .btn.loading { opacity: .55; pointer-events: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; cursor: pointer; }

.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.form-row label, .field label { font-size: 13px; font-weight: 500; color: var(--text-2); }
input, select, textarea { font: 14px var(--font); color: var(--text); background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 7px 11px; min-height: 36px; max-width: 100%; box-shadow: var(--shadow); }
textarea { resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
input[type="checkbox"] { min-height: 0; box-shadow: none; width: 16px; height: 16px; accent-color: var(--brand); }
.field { display: flex; flex-direction: column; gap: 6px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 16px; }
.search-input { padding-left: 34px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239CA3AF'%3E%3Cpath fill-rule='evenodd' d='M9 3.5a5.5 5.5 0 1 0 3.4 9.8l3.2 3.2a.75.75 0 1 0 1-1l-3.1-3.3A5.5 5.5 0 0 0 9 3.5ZM5 9a4 4 0 1 1 8 0 4 4 0 0 1-8 0Z'/%3E%3C/svg%3E") no-repeat 10px center / 16px; }

/* ---------- Bảng ---------- */
.tw { overflow-x: auto; min-width: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.card-block .tw, .card .tw { box-shadow: none; }
table.product-table, table.t { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13.5px; }
.t th, .product-table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--text-muted); background: #FBFBFC; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; position: sticky; top: 0; z-index: 1; }
.t td, .product-table td { padding: 11px 14px; border-bottom: 1px solid #F0F1F3; vertical-align: middle; color: var(--text-2); }
.t tbody tr:last-child td { border-bottom: 0; }
.t td b { color: var(--text); font-weight: 600; }
.t td.r, .t th.r { text-align: right; white-space: nowrap; }
.t tr.click { cursor: pointer; }
.t tr.click:hover td { background: #F8FAFF; }
.t tr.sel td { background: var(--brand-50); }
.t tr.off td { color: var(--text-faint); }
.t tr.off td b { color: var(--text-faint); text-decoration: line-through; }
.t tfoot td { font-weight: 600; background: #FBFBFC; border-top: 1px solid var(--border); color: var(--text); }
.t .sub { display: block; font-size: 12px; color: var(--text-faint); margin-top: 1px; }

/* ---------- Huy hiệu ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border); }
.pill.ok { background: var(--ok-bg); color: var(--ok); box-shadow: inset 0 0 0 1px var(--ok-ring); }
.pill.warn { background: var(--warn-bg); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn-ring); }
.pill.bad { background: var(--bad-bg); color: var(--bad); box-shadow: inset 0 0 0 1px var(--bad-ring); }
.pill.info { background: var(--info-bg); color: var(--info); box-shadow: inset 0 0 0 1px var(--info-ring); }
.delta { display: inline-flex; align-items: center; gap: 3px; padding: 2px 7px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.delta.up { background: var(--ok-bg); color: var(--ok); }
.delta.down { background: var(--bad-bg); color: var(--bad); }
.delta.flat { background: var(--surface-2); color: var(--text-muted); }
.tag { display: inline-block; font-size: 12px; padding: 1px 7px; background: var(--surface-2); border-radius: 4px; color: var(--text-2); margin: 0 4px 3px 0; white-space: nowrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--text-faint); }
.dot.on { background: #10B981; box-shadow: 0 0 0 3px #D1FAE5; }

/* ---------- Biểu đồ ---------- */
.chart { position: relative; width: 100%; min-height: 240px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--text-faint); font-size: 12px; font-family: var(--font); }
.chart text.v { fill: var(--text-muted); font-size: 11px; font-weight: 500; }
.chart text.lbl { fill: var(--text-2); font-size: 12.5px; }
.chart .axis path, .chart .axis line { display: none; }
.chart .grid line { stroke: #EEF0F3; stroke-dasharray: 3 3; }
.chart .grid path { display: none; }
.chart .baseline { stroke: var(--border-strong); }
.chart rect.bar { transition: opacity .15s; }
.chart:hover rect.bar { opacity: .85; }
.chart rect.bar:hover { opacity: 1; }
.tip { position: absolute; pointer-events: none; background: var(--surface); color: var(--text-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; font-size: 12.5px; white-space: nowrap; z-index: 5; box-shadow: var(--shadow-pop); }
.tip b { display: block; color: var(--text); margin-bottom: 2px; }

/* ---------- Trạng thái ---------- */
.empty-state { padding: 32px; text-align: center; color: var(--text-muted); background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.error-msg { padding: 12px 16px; background: var(--bad-bg); border: 1px solid var(--bad-ring); border-radius: var(--radius); color: var(--bad); }
.note-box { padding: 12px 16px; background: var(--warn-bg); border: 1px solid var(--warn-ring); border-radius: var(--radius); color: #92400E; font-size: 13.5px; }
.ok-box { padding: 12px 16px; background: var(--ok-bg); border: 1px solid var(--ok-ring); border-radius: var(--radius); color: #065F46; font-size: 13.5px; }
.loading { color: var(--text-muted); padding: 40px 0; }
details > summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
details ul { margin: 10px 0 0; padding-left: 20px; line-height: 1.65; max-width: 92ch; color: var(--text-2); }

/* ---------- Hộp thoại, thông báo ---------- */
#modalRoot { position: fixed; inset: 0; background: rgba(17, 24, 39, .4); display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px 16px; z-index: 50; overflow-y: auto; backdrop-filter: blur(2px); }
#modalRoot[hidden] { display: none; }
.modal { background: var(--surface); width: min(620px, 100%); padding: 24px; border-radius: 12px; box-shadow: var(--shadow-pop); }
.modal.wide { width: min(920px, 100%); }
.modal h2 { font-size: 17px; margin-bottom: 14px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 20px; }
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #111827; color: #fff; padding: 10px 18px; border-radius: var(--radius); font-size: 13.5px; z-index: 60; max-width: calc(100vw - 32px); box-shadow: var(--shadow-pop); }
#toast.err { background: #BE123C; }
#toast[hidden] { display: none; }

/* ---------- Đăng nhập ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: radial-gradient(1200px 600px at 20% -10%, #DBEAFE, transparent), radial-gradient(900px 500px at 110% 110%, #CFFAFE, transparent), var(--bg); }
.login { background: var(--surface); width: min(400px, 100%); padding: 32px; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-pop); }
.login .brand { padding: 0 0 18px; }
.login h1 { font-size: 20px; }
.login form { margin-top: 18px; }
.login .btn { width: 100%; height: 40px; }

/* ---------- Chọn mã vải ---------- */
.picker { position: relative; }
.picker-list { position: absolute; left: 0; right: 0; top: 100%; margin-top: 4px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); max-height: 280px; overflow-y: auto; z-index: 10; box-shadow: var(--shadow-pop); }
.picker-list button { display: block; width: 100%; text-align: left; border: 0; border-bottom: 1px solid #F0F1F3; background: none; padding: 8px 12px; font: inherit; cursor: pointer; }
.picker-list button:hover { background: var(--brand-50); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip-x { display: inline-flex; align-items: center; gap: 6px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--brand-50); color: var(--brand-600); font-size: 12.5px; box-shadow: inset 0 0 0 1px var(--info-ring); }
.chip-x .hint { color: #60A5FA; font-size: 11.5px; }
.chip-x button { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; color: var(--brand); padding: 0 4px; }

/* ---------- Công cụ Quality Standard: đồng bộ với phong cách mới ---------- */
.qs-chip { border-radius: var(--radius-sm) !important; font-weight: 500 !important; font-size: 12px !important; }
.qs-chip.ok { background: var(--ok-bg) !important; color: var(--ok) !important; border-color: var(--ok-ring) !important; }
.qs-chip.warn { background: var(--warn-bg) !important; color: var(--warn) !important; border-color: var(--warn-ring) !important; }
.qs-chip.bad { background: var(--bad-bg) !important; color: var(--bad) !important; border-color: var(--bad-ring) !important; }
.qs-warn-box { border-radius: var(--radius); }
.qs-type, .qs-tab, .qs-search, .qs-pick { border-radius: var(--radius-sm); }
.qs-tab.on { background: var(--brand) !important; border-color: var(--brand) !important; }
.qs-type:has(input:checked) { border-color: var(--brand) !important; box-shadow: 0 0 0 3px var(--brand-100) !important; }
.qs-group-h { border-radius: var(--radius) var(--radius) 0 0; background: #FBFBFC !important; color: var(--text-2); }
.qs-crit:last-child { border-radius: 0 0 var(--radius) var(--radius); }
.qs-crit.off { background: #FAFAFB !important; }


/* Công tắc bật/tắt (Official launch) */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: var(--border-strong); border-radius: 999px; transition: background .15s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; background: #fff; border-radius: 50%; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.switch input:checked + span { background: var(--brand); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-100); }
.switch input:disabled + span { opacity: .5; cursor: default; }

/* Thư viện QS OneDrive */
.qsl-title { font-size: 14px; font-weight: 600; margin: 20px 0 8px; display: flex; gap: 10px; align-items: baseline; }
.qsl-sec { margin: 8px 0 12px; }
.qsl-h { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.qsl-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; }
.qsl-list li { line-height: 1.5; }
.tag.tag-warn { background: var(--warn-50, #FFFBEB); color: #B45309; }
.nowrap { white-space: nowrap; }
.lf-prog { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; }
.lf-prog .progress { flex: 1; }
.qsl-title .btn { font-weight: 500; }
.lf-prog[hidden] { display: none; }
.picker input { width: 100%; }
.form-row[hidden] { display: none; }

/* Phân quyền */
.perm-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.perm-head p { max-width: 760px; }
.perm-t th.perm-role { min-width: 150px; vertical-align: bottom; }
.perm-name { width: 100%; font-weight: 600; padding: 4px 8px; }
.perm-group td { background: var(--bg, #F9FAFB); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2, #6B7280); }
.perm-sel { min-width: 120px; padding: 5px 8px; border-radius: 6px; }
.perm-sel.edit, .perm-pill.edit { background: #ECFDF5; color: #047857; }
.perm-sel.view, .perm-pill.view { background: #EFF6FF; color: #1D4ED8; }
.perm-sel.none, .perm-pill.none { background: #F3F4F6; color: #6B7280; }
.perm-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 500; }
