/* Procurement inside a project: the purchase list, the five phases of the process and one request.
   White surfaces. Colour goes on icons, borders and text: blue for requests, amber for approvals, lavender for
   orders, mint for paid and done. */
.procure-page{display:grid;gap:18px;min-width:0}
.procure-page>.page-head{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:14px}
.procure-page .module-heading .button svg{width:16px;height:16px;margin-right:6px;vertical-align:-3px}

/* Summary cards */
.procure-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.procure-kpi{display:flex;align-items:flex-start;gap:12px;padding:16px;border:1px solid #dde2ea;border-radius:18px;background:#fff;min-width:0}
.procure-kpi>div{display:grid;gap:2px;min-width:0}
.procure-kpi span{color:#667085;font-size:12px;font-weight:700}
.procure-kpi strong{color:#20283d;font-size:21px;line-height:1.2;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.procure-kpi small{color:#98a2b3;font-size:11px;font-weight:600}
.procure-kpi-icon{display:grid;place-items:center;flex:none;width:40px;height:40px;border:1.5px solid currentColor;border-radius:15px;background:#fff}
.procure-kpi-icon svg{width:20px;height:20px}
.procure-kpi.is-blue .procure-kpi-icon{color:#2563eb}
.procure-kpi.is-amber .procure-kpi-icon{color:#d97706}
.procure-kpi.is-lavender .procure-kpi-icon{color:#6d5dd3}
.procure-kpi.is-mint .procure-kpi-icon{color:#15936b}
.procure-kpi.is-amber strong{color:#b45309}

/* The process: five phases joined by arrows, each with its two stages */
.procure-phases{display:grid;grid-template-columns:repeat(4,minmax(0,1fr) 22px) minmax(0,1fr);align-items:stretch}
.procure-phase{display:grid;align-content:start;gap:10px;padding:14px;border:1px solid #dde2ea;border-radius:18px;background:#fff;min-width:0}
.procure-phase.has-items{border-color:#b9c8ec}
.procure-phase-head{display:flex;align-items:center;gap:8px;min-width:0}
.procure-phase-head b{flex:1;min-width:0;color:#20283d;font-size:14px}
.procure-phase-icon{display:grid;place-items:center;flex:none;width:30px;height:30px;border:1.5px solid #c7d2ea;border-radius:12px;color:#0b3a8f}
.procure-phase-icon svg{width:16px;height:16px}
.procure-phase.has-items .procure-phase-icon{border-color:#0b3a8f}
.procure-phase-count{min-width:26px;padding:1px 8px;border:1px solid #c7d2ea;border-radius:15px;color:#0b3a8f;font-size:12px;font-weight:800;text-align:center;font-variant-numeric:tabular-nums}
.procure-phase-stages{display:grid;gap:6px}
.procure-phase-stages button{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:36px;padding:6px 10px;border:1px solid #e3e6ee;border-radius:15px;background:#fff;color:#475467;font:inherit;font-size:12px;font-weight:600;text-align:left;cursor:pointer}
.procure-phase-stages button span{min-width:0}
.procure-phase-stages button b{color:#0b3a8f;font-size:13px;font-variant-numeric:tabular-nums}
.procure-phase-stages button:hover{border-color:#9fb3df}
.procure-phase-stages button.active{border-color:#0b3a8f;color:#0b3a8f;box-shadow:inset 0 0 0 1px #0b3a8f}
.procure-phase-arrow{display:grid;place-items:center;color:#9fb3df;font-size:26px;font-weight:300}

/* The list */
.procure-table-panel{display:grid;gap:12px;padding:16px;border-radius:18px}
.procure-filters{display:flex;flex-wrap:wrap;gap:10px}
.procure-filters input,.procure-filters select{flex:1 1 220px;min-width:0;padding:10px 12px;border:1px solid #cfd6e2;border-radius:15px;font:inherit;font-size:14px;background:#fff}
.procure-all{flex:none}
.procure-all.active{border-color:#0b3a8f!important;color:#0b3a8f}
.procure-table{width:100%;border-collapse:collapse;font-size:14px}
.procure-table th{padding:10px 12px;color:#667085;font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;border-bottom:1px solid #e3e6ee}
.procure-table td{padding:12px;border-bottom:1px solid #eef1f6;vertical-align:middle;color:#253247}
.procure-table td small{display:block;color:#667085;font-size:12px;margin-top:2px}
.procure-table tr[data-procure-row]{cursor:pointer}
.procure-table tr[data-procure-row]:hover td{box-shadow:inset 0 -1px 0 #c7d2ea}
.procure-table tr.is-selected td{box-shadow:inset 0 -1px 0 #9fd8b6}
.procure-table a{color:#0b3a8f;font-weight:700;text-decoration:none}
.procure-number{font-variant-numeric:tabular-nums;font-weight:700;white-space:nowrap}
.procure-table td .procure-you{color:#b45309;font-weight:700}
.procure-mini{display:inline-grid;grid-template-columns:repeat(5,14px);gap:3px;vertical-align:middle}
.procure-mini i{height:6px;border-radius:3px;background:#e3e6ee}
.procure-mini i.is-done{background:#15936b}
.procure-mini i.is-current{background:#2563eb}
.procure-mini.is-stopped{display:inline;color:#98a2b3;font-size:12px;font-weight:700}
.procure-empty{display:grid;justify-items:center;gap:8px;padding:28px 16px;text-align:center;color:#596579}
.procure-empty .procure-kpi-icon{color:#0b3a8f}
.procure-empty b{color:#20283d;font-size:15px}
.procure-empty p{margin:0;font-size:13px}
.procure-page .procure-ai-tag{color:#4338ca}

/* Forms and steps */
.procure-form,.procure-step,.procure-card,.procure-side-card{display:grid;gap:14px;padding:18px;border-radius:18px;min-width:0}
.procure-step{border:1px solid #bfd3f5;background:#fff}
.procure-step.is-quiet{border-color:#dde2ea}
.procure-step h4,.procure-card h3,.procure-side-card h3{margin:0;font-size:15px;color:#20283d}
.procure-step p{margin:0}
.procure-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.procure-grid label,.procure-project{display:grid;gap:5px;color:#475467;font-size:12px;font-weight:700;min-width:0}
.procure-grid .is-wide{grid-column:1/-1}
.procure-page input:not([type=checkbox]):not([type=file]),.procure-page select,.procure-page textarea{width:100%;min-width:0;padding:10px 12px;border:1px solid #cfd6e2;border-radius:15px;font:inherit;font-size:14px;font-weight:500;color:#20283d;background:#fff}
.procure-page input:focus,.procure-page select:focus,.procure-page textarea:focus{outline:none;border-color:#0b3a8f}
.procure-check{display:flex!important;align-items:center;gap:8px;grid-column:1/-1}
.procure-check input{width:18px;height:18px}
.procure-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.procure-note{margin:0;color:#667085;font-size:12px}
.procure-warn{color:#b42318;font-weight:700}
.procure-danger{background:#b42318!important;border-color:#b42318!important;color:#fff!important}
.procure-items{display:grid;gap:8px}
.procure-items-head,.procure-item{display:grid;grid-template-columns:minmax(0,3fr) minmax(60px,.7fr) minmax(70px,.8fr) minmax(110px,1.3fr) 36px;gap:8px;align-items:start}
.procure-items-head span{color:#667085;font-size:11px;font-weight:800}
.procure-price{display:grid;gap:2px}
.procure-remove{width:36px;height:40px;padding:0!important;font-size:18px}
.procure-total{margin:0;text-align:right;color:#475467;font-size:13px}
.procure-total b{color:#20283d;font-size:15px}
.procure-aina{display:grid;gap:10px;padding:14px;border:1px solid #c7c2f2;border-radius:18px;background:#fff}
.procure-aina>div{display:grid;gap:2px}
.procure-aina strong{color:#4338ca;font-size:14px}
.procure-aina span{color:#596579;font-size:12px}

/* One request: its heading, the ten steps joined by a line, and the details beside AiNA Financial and the history */
.procure-request-head{display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 18px;border:1px solid #dde2ea;border-radius:18px;background:#fff}
.procure-request-head h2{margin:4px 0 2px;font-size:22px;color:#20283d}
.procure-request-head p{margin:0;color:#596579;font-size:13px}
.procure-head-side{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.procure-stepper{display:grid;grid-template-columns:repeat(10,minmax(0,1fr));margin:0;padding:4px 0 0;list-style:none}
.procure-stepper li{position:relative;display:grid;justify-items:center;gap:6px;text-align:center;min-width:0}
.procure-stepper li::before{content:"";position:absolute;top:15px;left:-50%;width:100%;height:2px;background:#e3e6ee;z-index:0}
.procure-stepper li:first-child::before{display:none}
.procure-stepper li.is-done::before,.procure-stepper li.is-current::before{background:#15936b}
.procure-stepper span{position:relative;z-index:1;display:grid;place-items:center;width:32px;height:32px;border:1.5px solid #cfd6e2;border-radius:50%;background:#fff;color:#98a2b3;font-size:12px;font-weight:800}
.procure-stepper b{color:#98a2b3;font-size:11px;line-height:1.25;padding:0 2px}
.procure-stepper li.is-done span{border-color:#15936b;color:#15936b}
.procure-stepper li.is-done b{color:#475467}
.procure-stepper li.is-current span{border-color:#0b3a8f;background:#0b3a8f;color:#fff;box-shadow:0 0 0 4px #dbe4f7}
.procure-stepper li.is-current b{color:#0b3a8f}
.procure-progress{display:none}
.procure-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,340px);gap:16px;align-items:start}
.procure-main,.procure-side{display:grid;gap:14px;min-width:0}
.procure-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:0}
.procure-facts div{min-width:0}
.procure-facts dt{color:#667085;font-size:11px;font-weight:800}
.procure-facts dd{margin:2px 0 0;color:#20283d;font-size:14px;font-weight:600;overflow-wrap:anywhere}
.procure-facts dd a{color:#0b3a8f}
.procure-facts .is-red{color:#b42318}
.procure-need{margin:0;color:#253247;font-size:14px;line-height:1.55;white-space:pre-line}
.procure-match{display:grid;gap:8px;margin:0;padding:0;list-style:none}
.procure-match li{display:grid;grid-template-columns:70px minmax(0,1fr);gap:2px 10px;padding:10px 12px;border:1px solid #dde2ea;border-radius:15px}
.procure-match li.is-ok{border-color:#b9e5cb}.procure-match li.is-ok b{color:#15936b}
.procure-match li.is-bad{border-color:#f5b5ae}.procure-match li.is-bad b{color:#b42318}
.procure-match small{grid-column:2;color:#667085}
.procure-more{border:1px solid #dde2ea;border-radius:18px;background:#fff}
.procure-more summary{padding:12px 16px;cursor:pointer;font-weight:700;color:#475467}
.procure-more .procure-step{border:0;border-top:1px solid #eef1f6;border-radius:0}
.procure-aina-panel{border:1px solid #c7c2f2}
.procure-aina-panel h3{color:#4338ca}
.procure-aina-result{display:grid;gap:8px;font-size:13px;color:#253247}
.procure-aina-result p{margin:0}
.procure-aina-result ul{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.procure-aina-result li{display:flex;align-items:flex-start;gap:8px}
.procure-history{display:grid;gap:12px;margin:0;padding:0;list-style:none}
.procure-history li{display:grid;gap:2px;padding-left:12px;border-left:2px solid #dde2ea}
.procure-history b{font-size:13px;color:#20283d}
.procure-history small{color:#667085;font-size:11px}
.procure-history span{color:#475467;font-size:12px}

@media(max-width:1200px){
  .procure-phases{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .procure-phase-arrow{display:none}
  .procure-stepper{grid-template-columns:repeat(5,minmax(0,1fr));row-gap:16px}
  .procure-stepper li:nth-child(6)::before{display:none}
}
@media(max-width:1100px){.procure-layout{grid-template-columns:minmax(0,1fr)}}

/* Phones: phases stacked in one card, the request's progress as one bar, and each request as a card */
@media(max-width:760px){
  .procure-page{gap:14px}
  .procure-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .procure-kpi{flex-direction:column;gap:8px;padding:12px;border-radius:16px}
  .procure-kpi-icon{width:32px;height:32px;border-radius:12px}
  .procure-kpi-icon svg{width:16px;height:16px}
  .procure-kpi strong{font-size:17px}
  .procure-kpi small{display:none}
  .procure-phases{grid-template-columns:minmax(0,1fr);gap:0;border:1px solid #dde2ea;border-radius:18px;background:#fff;overflow:hidden}
  .procure-phase{gap:6px;padding:10px 12px;border:0;border-top:1px solid #eef1f6;border-radius:0}
  .procure-phase:first-child{border-top:0}
  .procure-phase-stages{grid-template-columns:repeat(2,minmax(0,1fr))}
  .procure-phase-stages button{min-height:34px;padding:5px 9px;font-size:11.5px}
  .procure-stepper{display:none}
  .procure-progress{display:grid;gap:10px;padding:12px 14px;border:1px solid #dde2ea;border-radius:18px;background:#fff}
  .procure-progress>div{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 10px}
  .procure-progress>div b{font-size:15px;color:#20283d}
  .procure-progress>div span{color:#667085;font-size:12px}
  .procure-progress-now{color:#0b3a8f;font-size:13px;font-weight:700}
  .procure-progress ol{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:4px;margin:0;padding:0;list-style:none}
  .procure-progress li{display:grid;gap:4px}
  .procure-progress li i{height:6px;border-radius:3px;background:#e3e6ee}
  .procure-progress li small{color:#98a2b3;font-size:10px;font-weight:700;text-align:center}
  .procure-progress li.is-done i{background:#15936b}
  .procure-progress li.is-current i{background:#0b3a8f}
  .procure-progress li.is-current small{color:#0b3a8f}
  .procure-request-head{padding:14px}
  .procure-request-head h2{font-size:19px}
  .procure-head-side{width:100%;justify-content:space-between}
  .procure-step,.procure-card,.procure-side-card,.procure-form{padding:14px;border-radius:16px}
  .procure-grid{grid-template-columns:minmax(0,1fr)}
  .procure-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .procure-items-head{display:none}
  .procure-item{grid-template-columns:minmax(0,1fr) minmax(0,1fr) 36px}
  .procure-item>input[name=description]{grid-column:1/-1}
  .procure-item .procure-price{grid-column:1/3}
  .procure-filters{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}
  .procure-filters input{grid-column:1/-1}
  .procure-filters.is-project{grid-template-columns:minmax(0,1fr) auto}
  .procure-filters.is-project input{grid-column:1}
  .procure-filters select{flex:none;width:100%}
  .procure-filters .procure-all{white-space:nowrap}
  .procure-table-panel{padding:12px}
  .procure-table-panel .table-wrap{margin:0!important;padding:0!important;overflow:visible}
  .procure-table:has(tr[data-procure-row]) thead{display:none}
  body table.procure-table:not([data-x]) tbody tr[data-procure-row]{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:4px 10px;padding:12px 6px;border-bottom:1px solid #eef1f6}
  body table.procure-table:not([data-x]) tbody tr[data-procure-row] td{display:block;padding:0;border:0;text-align:left!important}
  body table.procure-table:not([data-x]) tbody tr[data-procure-row] td::before{content:none!important}
  /* Columns: number, request, project (all projects only), stage, progress, amount, needed by */
  .procure-table tr[data-procure-row] td:nth-child(1){grid-column:1;grid-row:1;color:#667085;font-size:12px}
  .procure-table tr[data-procure-row] td:nth-child(2){grid-column:1/-1;grid-row:2;font-size:15px}
  .procure-table:not(.is-project) tr[data-procure-row] td:nth-child(3){grid-column:1/-1;grid-row:3;color:#596579;font-size:13px}
  .procure-table:not(.is-project) tr[data-procure-row] td:nth-child(4),.procure-table.is-project tr[data-procure-row] td:nth-child(3){grid-column:2;grid-row:1;justify-self:end}
  .procure-table:not(.is-project) tr[data-procure-row] td:nth-child(5),.procure-table.is-project tr[data-procure-row] td:nth-child(4){grid-column:1/-1;grid-row:4}
  .procure-table:not(.is-project) tr[data-procure-row] td:nth-child(6),.procure-table.is-project tr[data-procure-row] td:nth-child(5){grid-column:1;grid-row:5;font-weight:700}
  .procure-table:not(.is-project) tr[data-procure-row] td:nth-child(7),.procure-table.is-project tr[data-procure-row] td:nth-child(6){grid-column:2;grid-row:5;justify-self:end;color:#596579;font-size:12px}
  .procure-table tr[data-procure-row] td small{display:inline;margin-left:6px}
  .procure-table tr[data-procure-row] td:nth-child(2) small{display:block;margin-left:0}
}

/* Files of a request: one drop area and a tree with versions and AiNA Financial's reading */
.procure-files-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:8px}
.procure-drop{position:relative;display:grid;justify-items:center;gap:4px;padding:20px 14px;border:2px dashed #b9c3d9;border-radius:18px;background:#fff;text-align:center;cursor:pointer}
.procure-drop:hover,.procure-drop.is-dragging{border-color:#0b3a8f}
.procure-drop input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}
.procure-drop-icon{display:grid;place-items:center;width:40px;height:40px;border:1.5px solid #0b3a8f;border-radius:15px;color:#0b3a8f}
.procure-drop-icon svg{width:20px;height:20px}
.procure-drop b{color:#0b3a8f;font-size:14px}
.procure-drop small{color:#667085;font-size:12px}
.procure-file-tree{display:grid;gap:10px;margin:0;padding:0;list-style:none}
.procure-file{display:grid;gap:8px;padding:12px;border:1px solid #e3e6ee;border-radius:16px;min-width:0}
.procure-file-row{display:flex;align-items:center;gap:10px;min-width:0}
.procure-file-icon{display:grid;place-items:center;flex:none;width:34px;height:34px;border:1px solid #c7d2ea;border-radius:12px;color:#0b3a8f}
.procure-file-icon svg{width:17px;height:17px}
.procure-file-name{display:grid;flex:1;min-width:0}
.procure-file-name a{color:#0b3a8f;font-weight:700;text-decoration:none;overflow-wrap:anywhere}
.procure-file-name small{color:#667085;font-size:11px}
.procure-file-reading{display:grid;gap:8px;padding-left:44px}
.procure-file-reading p{margin:0;color:#253247;font-size:13px}
.procure-file-facts{display:flex;flex-wrap:wrap;gap:6px 14px}
.procure-file-facts span{display:grid;font-size:13px;font-weight:600;color:#20283d}
.procure-file-facts small{color:#667085;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em}
.procure-file-reading button,.procure-read{justify-self:start}
.procure-read{margin-left:44px}
.procure-versions{padding-left:44px;font-size:12px;color:#475467}
.procure-versions summary{cursor:pointer;font-weight:700}
.procure-versions ul{display:grid;gap:4px;margin:6px 0 0;padding:0;list-style:none}
.procure-versions li{display:flex;gap:8px;align-items:baseline}
.procure-versions a{color:#0b3a8f;font-weight:700}
@media(max-width:760px){.procure-file-reading,.procure-versions{padding-left:0}.procure-read{margin-left:0}}
.procure-start{margin:0}
.procure-attach small{color:#667085;font-size:12px;font-weight:400;line-height:1.4}
/* Total cost of ownership and supplier scorecards. */
.procure-tco-fields{padding:12px 14px;border:1px solid #dde2ea;border-radius:15px}
.procure-tco-fields summary{cursor:pointer;font-weight:700;color:#20283d;font-size:13px}
.procure-tco-fields[open] summary{margin-bottom:8px}
.procure-supplier,.procure-best{display:inline-block;width:fit-content;margin-top:4px;padding:2px 8px;border:1px solid currentColor;border-radius:15px;font-size:11px;font-weight:700;background:#fff}
.procure-best{color:#2c6e50}
.procure-supplier.is-strong{color:#2c6e50}.procure-supplier.is-good{color:#2457a6}.procure-supplier.is-watch{color:#b54708}
.procure-supplier.is-poor,.procure-supplier.is-blocked{color:#b42318}.procure-supplier.is-new{color:#667085}
.procure-table td small.procure-supplier,.procure-table td small.procure-best{display:block}
.procure-note.is-warm{color:#b54708;font-weight:600}
.sup-table tr.sup-row{cursor:pointer}
.sup-table tr.sup-row:hover td,.sup-table tr.sup-row.is-open td{box-shadow:inset 0 -1px 0 #c7d2ea}
.sup-score{display:inline-grid;place-items:center;min-width:40px;height:28px;padding:0 6px;border:2px solid currentColor;border-radius:15px;font-weight:800;font-size:14px;box-sizing:border-box}
.sup-score.is-strong{color:#2c6e50}.sup-score.is-good{color:#2457a6}.sup-score.is-watch{color:#b54708}.sup-score.is-poor,.sup-score.is-blocked{color:#b42318}.sup-score.is-new{color:#98a2b3}
.sup-detail td{background:#fff;padding:16px!important}
.sup-detail-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;text-align:left}
.sup-detail-grid h4{margin:0 0 10px;font-size:14px;color:#20283d}
.sup-parts{list-style:none;margin:0 0 10px;padding:0;display:grid;gap:8px}
.sup-parts li{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr) 90px;align-items:center;gap:10px;font-size:13px}
.sup-parts li span small{display:block;color:#98a2b3;font-size:11px}
.sup-parts li b{text-align:right;font-size:12px;color:#344156}
.sup-bar{height:8px;border:1px solid #dde2ea;border-radius:15px;overflow:hidden}
.sup-bar i{display:block;height:100%;background:#3f8f6b;border-radius:15px}
.sup-requests{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:13px}
.sup-requests small{display:block;color:#667085}
.sup-form{margin:0}
@media (max-width:900px){.sup-detail-grid{grid-template-columns:minmax(0,1fr)}}
.procure-supplier,.procure-best{white-space:nowrap;line-height:1.4}
.procure-table td b{white-space:nowrap}
.procure-po-actions{display:flex;flex-wrap:wrap;gap:8px;margin:4px 0 6px}
.procure-po-actions .button svg{width:16px;height:16px;margin-right:6px;vertical-align:-3px}
