/* Page 3 — JOB workspace. Visual-only refresh; existing data and workflows remain unchanged. */
@media screen {
  .page-content:has(#job-opening) { --job-green:#0f5b49;--job-green-dark:#0a4638;--job-mint:#edf7f3;--job-line:#d6e2dd;--job-ink:#17352e; }
  .page-content:has(#job-opening) .section-anchor-nav { position:sticky;top:0;z-index:7;gap:5px;padding:5px 0 7px;background:linear-gradient(#f6f3ec 80%,rgba(246,243,236,0)); }
  .page-content:has(#job-opening) .section-anchor-nav a { min-height:30px;padding:5px 10px;border:1px solid #cddbd5;border-radius:7px;background:#fff;color:#284b42;font-weight:700;text-decoration:none; }
  .page-content:has(#job-opening) .section-anchor-nav a:hover,.page-content:has(#job-opening) .section-anchor-nav a:focus-visible { border-color:var(--job-green);background:var(--job-mint);outline:none; }
  .page-content:has(#job-opening) .job-workspace-shortcuts a {
    border:1px solid #c7d6d0 !important;
    background:#fff !important;
    color:#294a42 !important;
    box-shadow:none !important;
  }
  .page-content:has(#job-opening) .job-workspace-shortcuts a:is(:active,:focus-visible,.pst-shortcut-active,[aria-current="location"]) {
    border-color:var(--job-green-dark) !important;
    background:var(--job-green-dark) !important;
    color:#fff !important;
    outline:2px solid rgba(15,91,73,.22);
    outline-offset:2px;
  }
  #job-opening { scroll-margin-top:112px; }
  #job-opening > .panel.form-panel { overflow:hidden;padding:0 !important;border:1px solid var(--job-line);border-radius:11px;box-shadow:0 5px 18px rgba(16,59,48,.07); }
  #job-opening > .panel.form-panel > .panel-head { margin:0;padding:9px 13px 8px;border-bottom:1px solid #cfe0d9;background:linear-gradient(110deg,#e7f5ef,#f8fbf9 66%); }
  #job-opening > .panel.form-panel > .panel-head h3 { color:var(--job-green-dark);font-size:15px; }
  #job-opening > .panel.form-panel > .panel-head p { margin:1px 0 0;color:#5d746d; }
  #job-opening form.job-opening-form { padding:10px 12px 11px;background:#fff; }
  #job-opening form.job-opening-form > label { gap:3px; }
  #job-opening form.job-opening-form > label > span:first-child { color:#536a63;font-weight:700;line-height:1.2; }
  #job-opening form.job-opening-form > label:first-of-type > span:first-child { font-size:0 !important; }
  #job-opening form.job-opening-form > label:first-of-type > span:first-child::after { content:'เลข JOB (อัตโนมัติ)';font-size:12px; }
  #job-opening form.job-opening-form :is(input,select,.pst-thai-date-button) { min-height:32px !important;border-color:#c9d8d2;border-radius:6px;background:#fff; }
  #job-opening form.job-opening-form > label > :is(input,select,.pst-thai-date-button) { width:100% !important;min-width:0 !important;max-width:none !important;box-sizing:border-box; }
  #job-opening form.job-opening-form :is(input,select,.pst-thai-date-button):focus { border-color:var(--job-green);box-shadow:0 0 0 2px rgba(15,91,73,.12);outline:none; }
  #job-opening form.job-opening-form .auto-number { border-color:#103d33;background:#123d34;color:#ffe08c;font-weight:800;letter-spacing:.02em; }
  #job-opening form.job-opening-form .quotation-derived-value { background:#f2f5f3;color:#61716c; }
  #job-opening form.job-opening-form > label:nth-of-type(6) { display:none !important; }
  #job-opening form.job-opening-form > .form-actions { align-self:end;padding:0 !important; }
  #job-opening form.job-opening-form > .form-actions .primary { width:100%;min-height:34px;border:0;border-radius:7px;background:var(--job-green);color:#fff;font-weight:800;white-space:nowrap;box-shadow:0 3px 8px rgba(15,91,73,.18); }
  #job-opening form.job-opening-form > .form-actions .primary:hover:not(:disabled) { background:var(--job-green-dark);transform:translateY(-1px); }
  #job-register { scroll-margin-top:52px; }
  #job-register > .section-intro { padding:8px 1px 7px; }
  #job-register > .section-intro > div > span { color:var(--job-green);font-size:9px;font-weight:800;letter-spacing:.12em; }
  #job-register > .section-intro h2 { margin:1px 0;color:var(--job-ink);font-size:16px; }
  #job-register > .section-intro p { margin:0;color:#6b7d77;font-size:10px; }
  #job-register .job-search-panel { gap:6px 8px;margin-bottom:7px;padding:8px 10px;border:0;border-radius:9px;background:#092c33;box-shadow:0 4px 12px rgba(8,38,43,.12); }
  #job-register .job-search-panel label > span { margin-bottom:2px;color:#b8ccc6; }
  #job-register .job-search-panel :is(input,select,.pst-thai-date-button) { min-height:32px !important;border-color:#ffffff30;border-radius:6px; }
  #job-register .job-search-panel .job-search input { background:#fff;color:#163a32; }
  #job-register .job-result-summary { gap:7px;margin-bottom:8px; }
  #job-register .job-result-summary { display:none !important; }
  #job-register .job-result-summary article { min-height:62px;padding:8px 10px;border:1px solid var(--job-line);border-top:3px solid var(--job-green);border-radius:7px;background:#fff; }
  #job-register .job-result-summary span,#job-register .job-result-summary small { font-size:9px; }
  #job-register .job-result-summary b { margin:2px 0 0;color:var(--job-ink);font-size:15px; }
#job-register .job-document-settings { display:none !important; }
#job-register .job-document-help { display:none !important; }
  #job-register .job-document-settings > summary { padding:7px 10px;color:#486159;font-size:10px; }
  #job-register .job-registry-panel { overflow:hidden;border:1px solid var(--job-line);border-radius:10px;box-shadow:0 4px 14px rgba(16,59,48,.05); }
  #job-register .job-registry-head { padding:9px 12px;border-bottom:1px solid var(--job-line);background:linear-gradient(110deg,#eff8f4,#fff); }
  #job-register .job-registry-head b { color:var(--job-green-dark);font-size:12px; }
  #job-register .job-registry-table > article { padding:8px 11px;border-bottom-color:#e3ebe7; }
  #job-register .job-registry-table > article:hover { background:#f3faf7;box-shadow:inset 3px 0 0 var(--job-green); }
  #job-register .job-registry-table > article :is(button,select) { border-radius:6px; }
  #job-register .job-registry-table > article > button { color:var(--job-green-dark);font-weight:800; }
}
.system-job-document-settings fieldset { border:0;min-width:0;margin:0;padding:0; }
.system-job-document-settings .job-document-settings-grid { max-height:460px; }
.system-job-display-actions { display:flex;align-items:center;gap:12px;margin-top:12px; }
.system-job-display-actions [role="status"] { color:#526b63;font-size:12px; }
#job-register { position:relative; }
#job-register .pst-job-compact-register > .job-register-row {
  position:relative;
  grid-template-columns:160px minmax(260px,1fr) 92px 92px 122px !important;
  gap:7px !important;
  min-height:34px;
  margin-bottom:var(--pst-job-detail-space,0);
  padding:5px 9px !important;
  align-items:center;
  background:#fff;
  transition:background-color .16s ease,box-shadow .16s ease;
}
#job-register .pst-job-compact-register > .job-register-row:nth-of-type(even) { background:#f8faf9; }
#job-register .pst-job-compact-register > .job-register-row:hover { background:#eef7f3; }
#job-register .pst-job-compact-register > .job-register-row.pst-job-row-expanded { background:#e7f3ee;box-shadow:inset 4px 0 0 #0f5b49; }
#job-register .pst-job-compact-register .job-ref-cell { min-width:0;gap:0; }
#job-register .pst-job-compact-register .job-ref-cell .job-row-link { color:#172c33;font-size:10px;white-space:nowrap; }
#job-register .pst-job-compact-register .job-ref-cell > span { color:#64766f;font-size:9px;white-space:nowrap; }
#job-register .pst-job-compact-register .job-name-cell { min-width:0;gap:1px; }
#job-register .pst-job-compact-register .job-name-cell > b,
#job-register .pst-job-compact-register .job-name-cell > span { overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
#job-register .pst-job-compact-register .job-name-cell > b { color:#1b2f37;font-size:11px; }
#job-register .pst-job-compact-register .job-name-cell > span { color:#64766f;font-size:9px; }
#job-register .pst-job-compact-register .job-document-progress,
#job-register .pst-job-compact-register .job-budget-cell { display:none !important; }
#job-register .pst-job-compact-register .job-money-cell { min-width:0;gap:0;text-align:right; }
#job-register .pst-job-compact-register .job-money-cell > span { color:#71817c;font-size:8px; }
#job-register .pst-job-compact-register .job-money-cell > b { color:#172c33;font-size:10px;white-space:nowrap; }
#job-register .pst-job-compact-register > .job-register-row > select { width:122px;min-height:27px;padding:3px 22px 3px 7px;font-size:9px; }
#job-register > .modal-backdrop.pst-job-inline-detail {
  position:absolute !important;
  inset:auto auto auto auto !important;
  top:var(--pst-job-inline-top) !important;
  left:var(--pst-job-inline-left) !important;
  z-index:5;
  display:block !important;
  width:var(--pst-job-inline-width) !important;
  height:auto !important;
  min-height:0 !important;
  padding:0 !important;
  background:transparent !important;
  overflow:visible !important;
}
#job-register > .modal-backdrop.pst-job-inline-detail > .job-detail-modal {
  box-sizing:border-box;
  width:100% !important;
  max-width:none !important;
  max-height:min(72vh,760px) !important;
  margin:0 !important;
  padding:16px !important;
  border:1px solid #9bbcaf;
  border-top:4px solid #0f5b49;
  border-radius:0 0 9px 9px;
  background:#fff;
  overflow:auto !important;
  box-shadow:0 12px 24px rgba(12,52,43,.16);
}
#job-register > .modal-backdrop.pst-job-inline-detail > .job-detail-modal > .modal-head { position:sticky;top:-16px;z-index:2;margin:-16px -16px 12px;padding:11px 14px;background:#f4f8f6;border-bottom:1px solid #d4e2dc; }
#job-register > .modal-backdrop.pst-job-inline-detail > .job-detail-modal > .modal-head h2 { margin:1px 0;font-size:15px; }
#job-register > .modal-backdrop.pst-job-inline-detail > .job-detail-modal > .modal-head p { margin:0;font-size:10px; }
@media screen and (max-width:640px) {
  #job-register .pst-job-compact-register > .job-register-row { grid-template-columns:140px minmax(180px,1fr) 105px !important;min-width:470px; }
  #job-register .pst-job-compact-register .job-money-cell { display:none; }
  #job-register .pst-job-compact-register > .job-register-row > select { grid-column:4 !important;width:105px; }
  #job-register > .modal-backdrop.pst-job-inline-detail > .job-detail-modal { max-height:76vh !important; }
}
@media screen and (min-width:1101px) {
  .page-content #job-opening form.job-opening-form { display:grid !important;grid-template-columns:120px 100px 100px var(--job-customer-width,140px) minmax(240px,1fr) !important;gap:7px 8px !important;align-items:end; }
  .page-content #job-opening form.job-opening-form > label,.page-content #job-opening form.job-opening-form > .pst-auto-fit-field { width:auto !important;min-width:0; }
  .page-content #job-opening form.job-opening-form > label:nth-of-type(1) { grid-column:1;grid-row:1;width:120px !important; }
  .page-content #job-opening form.job-opening-form > label:nth-of-type(2) { grid-column:3;grid-row:1;width:100px !important; }
  .page-content #job-opening form.job-opening-form > label:nth-of-type(3) { grid-column:1 / -1;grid-row:2;width:calc(100% - 258px) !important;justify-self:start; }
  .page-content #job-opening form.job-opening-form > label:nth-of-type(4) { grid-column:4;grid-row:1;width:var(--job-customer-width,140px) !important;max-width:100%; }
  .page-content #job-opening form.job-opening-form > label:nth-of-type(5) { grid-column:2;grid-row:1;width:100px !important; }
  .page-content #job-opening form.job-opening-form > label:nth-of-type(5) .pst-thai-date-button { width:100px !important;height:38px !important;font-size:10px !important;white-space:nowrap; }
  .page-content #job-opening form.job-opening-form > label:nth-of-type(7) { grid-column:5;grid-row:1;width:max-content !important;max-width:100%;justify-self:start; }
  .page-content #job-opening form.job-opening-form > label:nth-of-type(7) select { width:var(--pst-select-fit-width,auto) !important;max-width:100% !important; }
  .page-content #job-opening form.job-opening-form > .form-actions { grid-column:5 !important;grid-row:2;width:250px !important;justify-self:end !important; }
  .page-content #job-opening form.job-opening-form:has(input[list="government-project-ref-list"]) { grid-template-columns:120px 100px minmax(240px,1fr) max-content 250px !important; }
  .page-content #job-opening form.job-opening-form:has(input[list="government-project-ref-list"]) > label:nth-of-type(2) { grid-column:2;grid-row:1;width:100px !important; }
  .page-content #job-opening form.job-opening-form:has(input[list="government-project-ref-list"]) > label:nth-of-type(3) { grid-column:3;grid-row:1;width:100% !important; }
  .page-content #job-opening form.job-opening-form:has(input[list="government-project-ref-list"]) > label:nth-of-type(4) { grid-column:4;grid-row:1;width:max-content !important;max-width:100%; }
  .page-content #job-opening form.job-opening-form:has(input[list="government-project-ref-list"]) > label:nth-of-type(4) select { width:var(--pst-select-fit-width,auto) !important;max-width:100% !important; }
  .page-content #job-opening form.job-opening-form:has(input[list="government-project-ref-list"]) > .form-actions { grid-column:5 !important;grid-row:1;width:250px !important; }
  .page-content #job-opening form.job-opening-form:has(input[list="government-project-ref-list"]) > .form-actions .primary { min-width:0 !important;font-size:10px !important;line-height:1.2;white-space:normal !important; }
  #job-register .job-search-panel { grid-template-columns:minmax(300px,2.6fr) minmax(130px,1fr) minmax(145px,1.15fr) 130px 130px; }
}
@media screen and (min-width:641px) and (max-width:1100px) {
  .page-content #job-opening form.job-opening-form { grid-template-columns:repeat(4,minmax(0,1fr)) !important; }
  .page-content #job-opening form.job-opening-form > label:nth-of-type(3),.page-content #job-opening form.job-opening-form > label:nth-of-type(4) { grid-column:span 2; }
  .page-content #job-opening form.job-opening-form > .form-actions { grid-column:4 !important;justify-self:stretch !important; }
  #job-register .job-search-panel { grid-template-columns:2fr 1fr 1fr; }
}
@media screen and (max-width:640px) {
  .page-content:has(#job-opening) .section-anchor-nav { overflow-x:auto;white-space:nowrap; }
  #job-opening > .panel.form-panel > .panel-head { padding:10px 11px 8px; }
  #job-opening form.job-opening-form { grid-template-columns:1fr !important;padding:9px; }
  .page-content #job-opening form.job-opening-form > .form-actions { grid-column:1 !important;width:100% !important; }
  #job-register .job-search-panel,#job-register .job-result-summary { grid-template-columns:1fr 1fr; }
  #job-register .job-search-panel .job-search { grid-column:1 / -1; }
  #job-register .job-result-summary article { min-height:66px; }
}
