/* workbook.css - extracted from mesh-PO_sheet.html */

.stats { height: 40px; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; padding: 0 14px; flex-shrink: 0; }
.stat { display: flex; align-items: baseline; gap: 6px; padding-right: 18px; margin-right: 18px; border-right: 1px solid #e5e7eb; white-space: nowrap; }
.stat:last-child { border-right: none; }
.s-label { font-size: 11px; color: #6b7280; }
.s-val { font-size: 13px; font-weight: 600; color: #111827; }
.s-val.dim { color: #9ca3af; font-weight: 500; }
.s-val.accent { color: #4f6ef7; }
.s-val.danger { color: #dc2626; }
.s-val.amber { color: #d97706; }
.s-val.green { color: #16a34a; }
.s-delta { font-size: 10px; font-weight: 600; }
.s-delta.pos { color: #16a34a; }
.s-delta.neg { color: #dc2626; }
.fbar { height: 32px; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; padding: 0 10px; gap: 7px; flex-shrink: 0; background: #fafafa; }
.fbar-ic { color: #9ca3af; display: flex; align-items: center; }
.fbar-sigma { font-size: 13px; color: #9ca3af; }
.fbar-input { flex: 1; font-size: 12px; border: none; background: transparent; outline: none; color: #374151; }
.table-wrap { flex: 1; overflow: auto; position: relative; background: white; box-shadow: inset -1px 0 0 #e5e7eb; max-width: 100%; transition: max-width 0.24s cubic-bezier(0.32, 0.72, 0, 1); }
.rn { width: 40px; min-width: 40px; text-align: center; font-size: 10px; color: #c4c9d4; background: #f9fafb; padding: 0 !important; border-right: 1px solid #e5e7eb; }
.col-po {
  position: sticky; left: 0; z-index: 5;
  background: white !important; width: 108px; min-width: 108px; max-width: 108px;
}
.col-amount {
  position: sticky; left: 158px; z-index: 5;
  background: white !important; border-right: 1px solid #e5e7eb !important;
  min-width: 175px; white-space: nowrap;
}
.col-expl {
  position: sticky; left: 333px; z-index: 5;
  background: white !important;
  min-width: 298px;
}
.col-preparer {
  position: sticky; left: 631px; z-index: 5;
  background: white !important; border-left: 1px solid #e5e7eb !important;
  width: 100px; min-width: 100px; max-width: 100px;
}
.col-reviewer {
  position: sticky; left: 731px; z-index: 5;
  background: white !important;
  width: 100px; min-width: 100px; max-width: 100px; overflow: hidden;
}
.col-status {
  position: sticky; left: 831px; z-index: 5;
  background: white !important; border-left: 1px solid #e5e7eb !important;
  width: 210px; min-width: 210px; max-width: 210px; overflow: hidden;
}
.col-cmt {
  position: sticky; left: 1041px; z-index: 5;
  background: white !important; border-left: 1px solid #e5e7eb !important; border-right: 1px solid #e5e7eb !important;
  width: 32px; min-width: 32px; max-width: 32px; text-align: center; padding: 0 !important;
}
.col-cmt::after {
  content: ''; position: absolute; top: 0; bottom: 0; right: -10px; width: 10px;
  background: linear-gradient(to right, rgba(0,0,0,0.07), transparent); pointer-events: none;
}
.status-ctrl-sel {
  width: calc(100% - 18px); margin: 0 9px; padding: 3px 6px;
  border: 1px solid #e5e7eb; border-radius: 4px; font-size: 11px;
  cursor: pointer; background: white; font-family: inherit; outline: none; color: #374151;
  max-width: 194px; box-sizing: border-box;
}
.status-ctrl-sel:hover { border-color: #4f6ef7; }
.btab { padding: 8px 6px 8px 12px; gap: 4px; }
.btab-chev { width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 3px; opacity: 0; transition: opacity 0.1s, background 0.1s; padding-right: 6px; box-sizing: content-box; cursor: pointer; }
.btab.on .btab-chev, .btab:hover .btab-chev { opacity: 1; }
.btab-chev:hover { background: #eef2ff; color: #4f6ef7; }
.btab-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; display: none; }
.btab-dot.on { display: inline-block; }
.btab-add { padding: 0 10px; color: #9ca3af; cursor: pointer; font-size: 18px; height: 36px; display: flex; align-items: center; border-radius: 4px; }
.btab-add:hover { color: #4f6ef7; background: #f9fafb; }
.tab-menu { position: fixed; min-width: 200px; background: white; border: 1px solid #e5e7eb; border-radius: 8px; box-shadow: 0 8px 24px rgba(17,24,39,0.12); padding: 4px; z-index: 600; display: none; font-size: 12px; }
.tab-menu.on { display: block; }
.tab-menu-item { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 5px; cursor: pointer; color: #374151; }
.tab-menu-item:hover { background: #f4f6fa; color: #111827; }
.tab-menu-item .tm-ico { color: #6b7280; flex-shrink: 0; display: flex; }
.tab-menu-item:hover .tm-ico { color: #374151; }
.tab-menu-item.danger { color: #dc2626; }
.tab-menu-item.danger:hover { background: #fef2f2; color: #b91c1c; }
.tab-menu-item.danger .tm-ico { color: #dc2626; }
.tab-menu-divider { height: 1px; background: #f3f4f6; margin: 4px 0; }
.tab-menu-section-lbl { font-size: 9.5px; color: #9ca3af; font-weight: 600; letter-spacing: 0.4px; text-transform: uppercase; padding: 6px 10px 4px; }
.tab-color-row { display: flex; gap: 6px; padding: 8px 10px; }
.tab-color-swatch { width: 18px; height: 18px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.tab-color-swatch:hover { border-color: rgba(0,0,0,0.15); }
.tab-color-swatch.on { border-color: #111827; }
@keyframes pulse-dot { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }
.btab { padding: 8px 12px; font-size: 12px; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; height: 36px; display: flex; align-items: center; }
.btab:hover { color: #374151; }
.btab-add { padding: 0 8px; color: #9ca3af; cursor: pointer; font-size: 16px; }
#statusRing { height: 100%; width: auto; min-height: 170px; max-height: 280px; display: block; }
.tab-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 15px; padding: 0 4px; border-radius: 7px; font-size: 9px; font-weight: 600; margin-left: 4px; background: #f3f4f6; color: #6b7280; }
.col-type { display: inline-flex; align-items: center; opacity: 0.55; flex-shrink: 0; }
.col-type svg { display: block; }
.col-type.src { color: #9ca3af; }
.row-menu {
  position: fixed;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.14);
  z-index: 10000;
  min-width: 170px;
  padding: 4px;
  display: none;
  user-select: none;
}
.row-menu-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  font-size: 12px;
  color: #111827;
  cursor: pointer;
  border-radius: 4px;
}
.row-menu-item:hover { background: #f5f6fa; }
.row-menu-item svg { color: #6b7280; flex-shrink: 0; }
.row-menu-hd {
  padding: 6px 10px 4px;
  font-size: 10px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
}
.cell-edit {
  width: 100%;
  font-size: 11px;
  padding: 4px 7px;
  border: 1px solid #4f6ef7;
  border-radius: 4px;
  outline: none;
  background: white;
  color: #111827;
  font-family: inherit;
  box-sizing: border-box;
}
.src-lock-tip {
  position: fixed;
  background: #1f2937;
  color: white;
  font-size: 10.5px;
  padding: 5px 9px;
  border-radius: 5px;
  white-space: nowrap;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -4px);
  transition: opacity 120ms, transform 120ms;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}
.src-lock-tip.on { opacity: 1; transform: translate(-50%, 0); }
.checklist-drawer {
  width: 0; flex-shrink: 0; background: #fcfcfd; border-right: 1px solid #e5e7eb;
  overflow: hidden; transition: width 0.22s ease;
  display: flex; flex-direction: column;
}
.cl-scroll { flex: 1; overflow-y: auto; padding: 0; }
.cl-head { display: flex; align-items: flex-start; gap: 8px; padding: 16px 16px 12px; }
.cl-title { font-size: 14px; font-weight: 600; color: #111827; line-height: 1.3; }
.cl-sub { font-size: 11px; color: #6b7280; margin-top: 2px; line-height: 1.35; }
.cl-collapse { margin-left: auto; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: none; border: 1px solid transparent; border-radius: 5px; color: #9ca3af; cursor: pointer; flex-shrink: 0; }
.cl-collapse:hover { background: #f3f4f6; color: #374151; }
.cl-policy { padding: 0 16px 12px; }
.cl-policy-lbl { font-size: 10px; color: #6b7280; font-weight: 500; margin-bottom: 4px; }
.cl-policy-hint { color: #9ca3af; font-weight: 400; }
.cl-policy-box { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px; border: 1px solid #e5e7eb; border-radius: 5px; background: white; margin-bottom: 6px; cursor: pointer; }
.cl-policy-name { font-size: 12px; color: #111827; font-weight: 500; }
.cl-policy-chips { display: flex; gap: 6px; align-items: center; }
.cl-chip { display: inline-flex; align-items: center; gap: 3px; font-size: 9.5px; font-weight: 500; padding: 2px 6px; border-radius: 9px; }
.cl-chip-active { background: #dcfce7; color: #15803d; }
.cl-chip-used { background: #f3f4f6; color: #6b7280; }
.cl-tabs { display: flex; gap: 0; padding: 0 16px; border-bottom: 1px solid #e5e7eb; margin-top: 4px; }
.cl-tab { padding: 8px 0; margin-right: 18px; font-size: 12px; color: #6b7280; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cl-tab:hover { color: #374151; }
.cl-tab.on { color: #4f6ef7; border-bottom-color: #4f6ef7; font-weight: 500; }
.cl-list { padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.cl-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 8px 8px 10px; border: 1px solid transparent; border-radius: 6px;
  cursor: pointer; background: white; position: relative;
}
.cl-item:hover { background: #f9fafb; border-color: #f3f4f6; }
.cl-item.on { background: #eef2ff; border-color: #c7d2fe; }
.cl-item-ic { width: 18px; height: 18px; display: flex; align-items: center; justify-content: center; color: #9ca3af; flex-shrink: 0; }
.cl-item.on .cl-item-ic { color: #4f6ef7; }
.cl-item-label { flex: 1; font-size: 11.5px; color: #111827; line-height: 1.35; }
.cl-item-count { font-size: 11px; color: #6b7280; font-variant-numeric: tabular-nums; flex-shrink: 0; padding: 0 4px; }
.cl-item.on .cl-item-count { color: #4f6ef7; font-weight: 600; }
.cl-newpolicy {
  margin: 0 16px 16px; padding: 8px 10px;
  background: white; border: 1px dashed #d1d5db; border-radius: 6px;
  font-size: 12px; color: #6b7280; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  flex-shrink: 0;
}
.cl-newpolicy:hover { border-color: #9ca3af; color: #374151; }
.col-health {
  position: sticky; left: 108px; z-index: 5;
  background: white !important; border-right: 1px solid #e5e7eb !important;
  width: 50px; min-width: 50px; max-width: 50px; text-align: center; padding: 0 4px !important;
}
.health-ring { display: inline-flex; align-items: center; gap: 4px; }
.health-ring svg { display: block; transform: rotate(-90deg); flex-shrink: 0; }
.data-panel { flex: 1; display: none; background: #ffffff; flex-direction: column; overflow: hidden; }
.data-panel.active { display: flex; }
.data-panel-toolbar { height: 40px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-bottom: 1px solid #e5e7eb; background: #fafafa; flex-shrink: 0; }
.data-panel-title { font-size: 12px; font-weight: 600; color: #111827; }
.data-panel-sub { font-size: 11px; color: #6b7280; }
.data-panel-scroll { flex: 1; overflow: auto; }
.data-tbl { width: 100%; border-collapse: collapse; font-size: 11px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; }
.data-tbl thead th { position: sticky; top: 0; z-index: 2; background: #f9fafb; text-align: left; font-weight: 500; color: #6b7280; font-size: 10px; text-transform: uppercase; letter-spacing: 0.3px; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; white-space: nowrap; }
.data-tbl thead th.r { text-align: right; }
.data-tbl tbody td { padding: 8px 10px; border-bottom: 1px solid #f3f4f6; color: #374151; white-space: nowrap; vertical-align: middle; }
.data-tbl tbody td.r { text-align: right; font-variant-numeric: tabular-nums; }
.data-tbl tbody tr:hover td { background: #fafbff; }
.data-tbl tbody td.muted { color: #9ca3af; }
.data-tbl .rn { width: 36px; color: #c4c9d4; text-align: center; font-size: 10px; background: #fafafa; }
.data-tbl td.merged-group { background: #fafbfc; border-right: 1px solid #eef0f3; vertical-align: top; }
.data-tbl tbody tr:hover td.merged-group { background: #f4f6fa; }
.data-tbl td.merged-group.r { text-align: right; }
.data-tbl tbody tr.group-start td { border-top: 1px solid #e5e7eb; }
.data-tbl tbody tr.group-start:first-child td { border-top: none; }
.data-tbl tbody tr.group-mid td { border-bottom-color: #f9fafb; }
.data-tbl td.act-col { width: 64px; padding: 4px 6px; text-align: right; }
.data-tbl td.act-col .row-acts { display: inline-flex; gap: 2px; opacity: 0; transition: opacity 0.1s; }
.data-tbl tbody tr:hover .row-acts { opacity: 1; }
.data-tbl .email-input { width: 100%; border: none; background: transparent; font: inherit; color: #4f6ef7; outline: none; padding: 0; }
.data-tbl .email-input::placeholder { color: #d1d5db; }
.data-tbl .name-input { width: 100%; border: none; background: transparent; font: inherit; color: #374151; outline: none; padding: 0; }
.data-tbl .name-input::placeholder { color: #d1d5db; }
.data-tbl tr.new-row td { background: #fffdf4 !important; }
.data-tbl tr.new-row td input:focus { box-shadow: inset 0 -1px 0 #4f6ef7; }
.data-tbl .group-sel { width: 100%; border: none; background: transparent; font: inherit; color: #374151; outline: none; padding: 2px 14px 2px 0; cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='9' height='9' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 2px center; }
.data-tbl .group-sel:focus { box-shadow: inset 0 -1px 0 #4f6ef7; }
.data-tbl .group-sel.empty { color: #d1d5db; }
.data-tbl td.merged-group input.group-sel { width: 100%; }
#shellView.tab-policy .policy-page { display: flex; }
#shellView.tab-policy > .stats,
#shellView.tab-policy > .fbar,
#shellView.tab-policy > #mainArea,
#shellView.tab-policy > .btabs,
#shellView.tab-policy > .footer,
#shellView.tab-policy > .test-banner,
#shellView.tab-journals > .stats,
#shellView.tab-journals > .fbar,
#shellView.tab-journals > #mainArea,
#shellView.tab-journals > .btabs,
#shellView.tab-journals > .footer,
#shellView.tab-journals > .test-banner { display: none !important; }
#shellView.tab-journals .journals-page { display: flex; }
