/* =====================================================================
   Projects workspace — built on the warehouse design system (inventory.css,
   scoped under .iv). Only the pieces the warehouse doesn't have live here.
   ===================================================================== */

/* compact 7-step bar in the projects table */
.iv .pw-steps { display: flex; gap: 3px; width: 150px; }
.iv .pw-steps i { flex: 1; height: 7px; border-radius: 999px; background: #e2e8f0; }
.iv .pw-steps i.done { background: #10b981; }
.iv .pw-steps i.run { background: #f59e0b; }
.iv .pw-steps i.late { background: #e11d48; }

/* page title block inside .iv-top */
.iv .pw-title { min-width: 0; margin-inline-end: auto; }
.iv .pw-title h1 { font-size: 24px; font-weight: 800; margin: 0; line-height: 1.3; color: var(--iv-text); }
.iv .pw-title .crumb { font-size: 12.5px; color: var(--iv-muted); }
.iv .pw-title .sub { font-size: 13.5px; color: var(--iv-text-2); }
.iv .pw-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* workflow stepper on the project page */
.iv .pw-strip { padding: 14px 16px; margin-bottom: 16px; }
.iv .pw-stepper { display: flex; align-items: flex-start; overflow-x: auto; }
.iv .pw-step { flex: 1; min-width: 86px; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; padding: 6px 2px; border-radius: 12px; }
.iv .pw-step:hover { background: var(--iv-sub); }
.iv .pw-step::before { content: ''; position: absolute; top: 21px; right: calc(50% + 17px); left: calc(-50% + 17px); height: 2px; background: var(--iv-border-strong); }
.iv .pw-step:first-child::before { display: none; }
.iv .pw-step.done::before, .iv .pw-step.run::before { background: #10b981; }
.iv .pw-dot { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 2px solid var(--iv-border-input); background: #fff; color: var(--iv-muted); font-size: 13px; font-weight: 800; position: relative; z-index: 1; }
.iv .pw-dot .ti { font-size: 16px; }
.iv .pw-step.done .pw-dot { background: var(--iv-ok); border-color: var(--iv-ok); color: #fff; }
.iv .pw-step.run .pw-dot { border-color: var(--iv-warn); color: var(--iv-warn); background: var(--iv-warn-bg); }
.iv .pw-step .lbl { font-size: 13px; font-weight: 700; color: var(--iv-text); white-space: nowrap; }
.iv .pw-step .st { font-size: 11.5px; color: var(--iv-muted); white-space: nowrap; }
.iv .pw-step.run .st { color: var(--iv-warn); }
.iv .pw-step.done .st { color: var(--iv-ok); }
.iv .pw-step[disabled] { opacity: .5; cursor: not-allowed; }
.iv .pw-strip-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--iv-border); font-size: 13px; color: var(--iv-text-2); }

/* project page: content + summary aside */
.iv .pw-detail { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; gap: 20px; align-items: start; }
.iv .pw-aside { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 16px; }
.iv .pw-tabs { padding: 0; margin-bottom: 16px; }
.iv .pw-kv > div { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--iv-border); font-size: 13.5px; }
.iv .pw-kv > div:last-child { border-bottom: 0; }
.iv .pw-kv > div > span:first-child { color: var(--iv-text-2); white-space: nowrap; }
.iv .pw-kv > div > span:last-child { font-weight: 700; text-align: left; min-width: 0; overflow-wrap: anywhere; }
.iv .pw-mat { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; font-size: 13.5px; }

/* cards inside panels keep their own Tailwind content; give the old tables the warehouse look */
.iv .iv-card > .iv-card-title { padding-bottom: 10px; border-bottom: 1px solid var(--iv-border); }
.iv .iv-table thead tr { background: transparent; }

.iv .pw-sm-only { display: none; }
@media (max-width: 1023px) {
    .iv .pw-detail { grid-template-columns: minmax(0, 1fr); }
    .iv .pw-aside { position: static; }
}
@media (max-width: 767px) {
    .iv .pw-sm-only { display: flex; }
    .iv .pw-title h1 { font-size: 20px; }
}
