/* Purchase Requests Control Center — scoped local UI completion (2026-08-20). */
.purchase-control-center {
  display: grid;
  gap: 12px;
  width: 100%;
  min-width: 0;
  padding: 0 0 24px;
  color: #243b53;
}

.purchase-control-center .purchase-control-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 10px;
}

.purchase-control-center .purchase-control-header p,
.purchase-control-center .purchase-control-header h1,
.purchase-control-center .purchase-control-header span { margin: 0; }
.purchase-control-center .purchase-control-header p { color: #3973a9; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.purchase-control-center .purchase-control-header h1 { margin-top: 2px; color: #102a43; font-size: 19px; line-height: 1.2; }
.purchase-control-center .purchase-control-header span { display: block; margin-top: 4px; color: #627d98; font-size: 11px; }
.purchase-control-center .purchase-control-header > .button { flex: 0 0 auto; min-height: 34px; padding: 7px 12px; }

.purchase-control-center .purchase-control-kpis,
.purchase-control-center .purchase-control-workflow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  background: #fff;
  border: 1px solid #d9e2ec;
  border-radius: 9px;
}

.purchase-control-center .purchase-control-workflow { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.purchase-control-center .purchase-control-kpi,
.purchase-control-center .purchase-control-flow-step {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 9px 12px;
  background: #fff;
  border: 0;
  border-right: 1px solid #e7edf4;
  color: #243b53;
  text-align: left;
  cursor: pointer;
}
.purchase-control-center .purchase-control-kpi:last-child,
.purchase-control-center .purchase-control-flow-step:last-child { border-right: 0; }
.purchase-control-center .purchase-control-kpi::before,
.purchase-control-center .purchase-control-flow-step::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #9fb3c8; }
.purchase-control-center .purchase-control-kpi.blue::before,
.purchase-control-center .purchase-control-flow-step.blue::before { background: #2474b5; }
.purchase-control-center .purchase-control-kpi.green::before,
.purchase-control-center .purchase-control-flow-step.green::before { background: #1f8f61; }
.purchase-control-center .purchase-control-kpi.amber::before,
.purchase-control-center .purchase-control-flow-step.amber::before { background: #d58a12; }
.purchase-control-center .purchase-control-kpi.red::before,
.purchase-control-center .purchase-control-flow-step.red::before { background: #c63b4a; }
.purchase-control-center .purchase-control-kpi.purple::before,
.purchase-control-center .purchase-control-flow-step.purple::before { background: #7357b4; }
.purchase-control-center .purchase-control-kpi:hover,
.purchase-control-center .purchase-control-flow-step:hover { background: #f7fafc; }
.purchase-control-center .purchase-control-kpi span,
.purchase-control-center .purchase-control-flow-step small { overflow: hidden; color: #627d98; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.purchase-control-center .purchase-control-kpi b,
.purchase-control-center .purchase-control-flow-step b { overflow: hidden; color: #102a43; font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; }
.purchase-control-center .purchase-control-kpi small,
.purchase-control-center .purchase-control-flow-step span { overflow: hidden; color: #829ab1; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.purchase-control-center .purchase-control-filters {
  display: flex;
  align-items: end;
  gap: 7px;
  padding: 9px 10px;
  overflow-x: auto;
  background: #f7f9fc;
  border: 1px solid #dce5ef;
  border-radius: 9px;
}
.purchase-control-center .purchase-control-filters label { display: grid; flex: 0 0 126px; gap: 3px; }
.purchase-control-center .purchase-control-filters label.purchase-control-search { flex: 1 0 250px; }
.purchase-control-center .purchase-control-filters label > span { color: #627d98; font-size: 9px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.purchase-control-center .purchase-control-filters input,
.purchase-control-center .purchase-control-filters select { width: 100%; height: 32px; min-width: 0; padding: 4px 8px; background: #fff; border: 1px solid #cbd7e3; border-radius: 6px; color: #243b53; font-size: 11px; }
.purchase-control-center .purchase-control-filters > .ghost-button { height: 32px; padding: 5px 10px; white-space: nowrap; }

.purchase-control-center .purchase-control-focus-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(260px, .45fr); gap: 12px; }
.purchase-control-center .purchase-control-panel { min-width: 0; overflow: hidden; background: #fff; border: 1px solid #d9e2ec; border-radius: 9px; }
.purchase-control-center .purchase-control-panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; padding: 9px 12px; background: #fbfcfe; border-bottom: 1px solid #e7edf4; }
.purchase-control-center .purchase-control-panel > header h2,
.purchase-control-center .purchase-control-panel > header p { margin: 0; }
.purchase-control-center .purchase-control-panel > header h2 { color: #102a43; font-size: 14px; }
.purchase-control-center .purchase-control-panel > header p { margin-top: 2px; color: #829ab1; font-size: 10px; }
.purchase-control-center .purchase-control-panel > header > span { display: inline-flex; align-items: center; justify-content: center; min-width: 25px; height: 24px; padding: 0 7px; background: #eaf2f8; border-radius: 14px; color: #315b7d; font-size: 10px; font-weight: 800; }

.purchase-control-center .purchase-control-attention-list { display: grid; }
.purchase-control-center .purchase-control-attention { display: grid; grid-template-columns: 26px minmax(0, 1fr) 14px; align-items: start; gap: 8px; padding: 9px 11px; background: #fff; border: 0; border-bottom: 1px solid #edf2f7; color: #486581; text-align: left; cursor: pointer; }
.purchase-control-center .purchase-control-attention:last-child { border-bottom: 0; }
.purchase-control-center .purchase-control-attention:hover { background: #f8fbfd; }
.purchase-control-center .purchase-control-attention i { display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; background: #fff2dc; border-radius: 6px; color: #9a5d00; font-style: normal; }
.purchase-control-center .purchase-control-attention.critical i { background: #fdebed; color: #b72738; }
.purchase-control-center .purchase-control-attention svg { width: 14px; height: 14px; fill: currentColor; }
.purchase-control-center .purchase-control-attention b,
.purchase-control-center .purchase-control-attention small { display: block; }
.purchase-control-center .purchase-control-attention b { color: #243b53; font-size: 10px; }
.purchase-control-center .purchase-control-attention small { margin-top: 2px; color: #829ab1; font-size: 9px; }
.purchase-control-center .purchase-control-empty { display: grid; place-items: center; gap: 3px; min-height: 94px; padding: 16px; color: #829ab1; text-align: center; }
.purchase-control-center .purchase-control-empty svg { width: 20px; height: 20px; fill: #1f8f61; }
.purchase-control-center .purchase-control-empty b { color: #486581; font-size: 11px; }
.purchase-control-center .purchase-control-empty small { font-size: 9px; }

.purchase-control-center .purchase-control-boundaries ul { display: grid; margin: 0; padding: 0; list-style: none; }
.purchase-control-center .purchase-control-boundaries li { display: grid; gap: 2px; padding: 9px 11px; border-bottom: 1px solid #edf2f7; }
.purchase-control-center .purchase-control-boundaries li:last-child { border-bottom: 0; }
.purchase-control-center .purchase-control-boundaries b { color: #334e68; font-size: 10px; }
.purchase-control-center .purchase-control-boundaries span { color: #829ab1; font-size: 9px; }

.purchase-control-center .purchase-control-table-wrap { max-width: 100%; overflow: auto; }
.purchase-control-center .purchase-control-table-wrap table { width: 100%; border-collapse: collapse; font-size: 10px; }
.purchase-control-center .purchase-control-table-wrap th { padding: 7px 8px; background: #f4f7fa; border-bottom: 1px solid #d9e2ec; color: #627d98; font-size: 8px; font-weight: 800; letter-spacing: .035em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.purchase-control-center .purchase-control-table-wrap td { padding: 7px 8px; border-bottom: 1px solid #edf2f7; color: #334e68; vertical-align: middle; }
.purchase-control-center .purchase-control-table-wrap tbody tr:last-child td { border-bottom: 0; }
.purchase-control-center .purchase-control-table-wrap .clickable-row { cursor: pointer; }
.purchase-control-center .purchase-control-table-wrap .clickable-row:hover td { background: #f8fbfd; }
.purchase-control-center .purchase-control-table-wrap td b,
.purchase-control-center .purchase-control-table-wrap td small { display: block; }
.purchase-control-center .purchase-control-table-wrap td b { color: #243b53; font-size: 10px; }
.purchase-control-center .purchase-control-table-wrap td small { margin-top: 1px; color: #9aaabd; font-size: 8px; }
.purchase-control-center .purchase-control-table-wrap .number { text-align: right; font-variant-numeric: tabular-nums; }
.purchase-control-center .purchase-control-link { padding: 0; background: transparent; border: 0; color: #1665a5; font: inherit; font-weight: 700; cursor: pointer; text-decoration: underline; text-decoration-color: #b7cfdf; text-underline-offset: 2px; }
.purchase-control-center .purchase-control-due { color: #b72738; font-weight: 700; }
.purchase-control-center .purchase-control-empty-cell { padding: 22px !important; color: #829ab1 !important; text-align: center; }
.purchase-control-center .purchase-control-request-register > .table-wrap { margin: 0; border: 0; border-radius: 0; }

html body .modal[data-mode="purchase-request-form"] .modal-panel {
  display: flex;
  flex-direction: column;
  width: min(980px, calc(100vw - 48px));
  max-width: 980px;
  max-height: min(720px, calc(100vh - 48px));
  margin: auto;
  overflow: hidden;
}
html body .modal[data-mode="purchase-request-form"] .modal-header { flex: 0 0 auto; min-height: 62px; padding: 10px 16px; }
html body .modal[data-mode="purchase-request-form"] .modal-header .eyebrow { margin-bottom: 2px; font-size: 9px; }
html body .modal[data-mode="purchase-request-form"] .modal-header h2 { font-size: 17px; }
html body .modal[data-mode="purchase-request-form"] .modal-body { flex: 1 1 auto; min-height: 0; padding: 14px 16px; overflow-y: auto; }
html body .modal[data-mode="purchase-request-form"] .purchase-request-compact-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
html body .modal[data-mode="purchase-request-form"] .purchase-request-compact-form label { gap: 4px; font-size: 11px; }
html body .modal[data-mode="purchase-request-form"] .purchase-request-compact-form input,
html body .modal[data-mode="purchase-request-form"] .purchase-request-compact-form select { min-height: 34px; height: 34px; padding: 6px 9px; }
html body .modal[data-mode="purchase-request-form"] .purchase-request-compact-form textarea { min-height: 72px; max-height: 150px; padding: 8px 9px; resize: vertical; }
html body .modal[data-mode="purchase-request-form"] .purchase-request-compact-form .form-actions { margin-top: 2px; padding-top: 10px; gap: 8px; border-top: 1px solid #e7edf4; }
html body .modal[data-mode="purchase-request-form"] .purchase-request-compact-form .form-actions button { min-height: 34px; padding: 7px 12px; }

@media (max-width: 1050px) {
  .purchase-control-center .purchase-control-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .purchase-control-center .purchase-control-workflow { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .purchase-control-center .purchase-control-focus-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .purchase-control-center .purchase-control-header { align-items: flex-start; flex-direction: column; }
  .purchase-control-center .purchase-control-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .purchase-control-center .purchase-control-workflow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  html body .modal[data-mode="purchase-request-form"] .modal-panel { width: calc(100vw - 20px); max-height: calc(100vh - 20px); }
  html body .modal[data-mode="purchase-request-form"] .purchase-request-compact-form { grid-template-columns: 1fr; }
  html body .modal[data-mode="purchase-request-form"] .purchase-request-compact-form .span-2 { grid-column: 1; }
}
