.pv2{display:grid;gap:18px;color:#172033}.pv2 *{box-sizing:border-box}.pv2-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding:22px 24px;border:1px solid #dce7f7;border-radius:16px;background:linear-gradient(135deg,#fff,#f3f8ff)}.pv2-head span,.pv2-drawer-head span{font-size:11px;font-weight:800;letter-spacing:.14em;color:#246dde}.pv2-head h2,.pv2-drawer-head h2{margin:5px 0 4px;font-size:25px}.pv2-head p,.pv2-drawer-head p{margin:0;color:#66748c}.pv2-primary,.pv2 button{border:1px solid #c8d8ef;border-radius:9px;background:#fff;color:#24415f;padding:9px 13px;font:inherit;cursor:pointer}.pv2-primary,.pv2 .pv2-primary{border-color:#246dde;background:#246dde;color:#fff;font-weight:700}.pv2 button:disabled{cursor:not-allowed;opacity:.48}.pv2-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}.pv2-card{display:grid;gap:12px;padding:18px;border:1px solid #dce6f3;border-radius:14px;background:#fff;box-shadow:0 8px 24px rgba(31,65,110,.05)}.pv2-card header,.pv2-card footer{display:flex;gap:10px;align-items:center}.pv2-card header>span{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:#eaf3ff;color:#246dde;font-weight:900}.pv2-card header div{flex:1}.pv2-card h3,.pv2-card p{margin:0}.pv2-card small{display:block;color:#78869b}.pv2-card header em{font-style:normal;color:#12805c;background:#e8f8f1;padding:4px 8px;border-radius:999px}.pv2-card footer{justify-content:space-between}.pv2-price{display:flex;align-items:baseline;gap:5px}.pv2-price strong{font-size:24px;color:#155eef}.pv2-tags{display:flex;gap:6px;flex-wrap:wrap}.pv2-tags span{padding:4px 8px;border-radius:7px;background:#f2f6fb;color:#52627a;font-size:12px}.pv2-tags span.disabled{color:#9b5c12;background:#fff4dd}.pv2-loading,.pv2-empty{display:grid;place-items:center;min-height:180px;border:1px dashed #c9d6e8;border-radius:14px;background:#fff;color:#748197}.pv2-loading i{width:26px;height:26px;border:3px solid #dbe8f8;border-top-color:#246dde;border-radius:50%;animation:pv2spin .8s linear infinite}@keyframes pv2spin{to{transform:rotate(360deg)}}.pv2-error{display:flex;gap:10px;align-items:center;padding:13px 15px;border:1px solid #f0b8b8;border-radius:11px;background:#fff4f4;color:#8b2525}.pv2-error span{flex:1}.pv2-drawer-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;padding:20px 22px;border-bottom:1px solid #e4ebf4}.pv2-drawer-head button{width:36px;height:36px;border:0;border-radius:50%;background:#eef3f9;font-size:20px}.pv2-editor{display:grid;grid-template-columns:minmax(0,1fr) 300px;min-height:calc(100vh - 120px)}.pv2-editor-main{display:grid;align-content:start;gap:16px;padding:20px;overflow:auto}.pv2-editor-main section{padding:16px;border:1px solid #e0e8f2;border-radius:12px;background:#fff}.pv2-editor-main h3{margin:0 0 14px}.pv2-editor aside{display:grid;align-content:start;gap:14px;padding:20px;border-left:1px solid #e0e8f2;background:#f7faff}.pv2-editor aside h3,.pv2-editor aside p{margin:0}.pv2-editor aside div{display:grid;gap:7px}.pv2-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.pv2-form-grid label,.pv2-submit-form label,.pv2-review-form label{display:grid;gap:6px;color:#55647a;font-size:13px}.pv2-form-grid label.wide{grid-column:1/-1}.pv2 input,.pv2 textarea,.pv2 select,#drawer .pv2-editor input,#drawer .pv2-editor textarea,#drawer .pv2-editor select,#drawer .pv2-submit-form input,#drawer .pv2-submit-form textarea,#drawer .pv2-review-form input,#drawer .pv2-review-form textarea,#drawer .pv2-review-form select{width:100%;min-height:40px;border:1px solid #cbd8e8;border-radius:8px;background:#fff;padding:9px 10px;font:inherit;color:#172033}.pv2 textarea,#drawer .pv2-editor textarea{min-height:84px;resize:vertical}.pv2-check{display:flex!important;align-items:center!important;grid-template-columns:auto 1fr!important}.pv2-check input{width:auto!important}.pv2-picker{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:12px}.pv2-component{display:grid;gap:12px;padding:13px;border:1px solid #dce6f3;border-radius:10px;background:#f9fbfe;margin-top:10px}.pv2-component header{display:flex;align-items:center;gap:8px}.pv2-component header div{flex:1}.pv2-component header small{display:block;color:#77869b}.pv2-machine-block{display:grid;gap:3px;padding:10px;border:1px solid #efcf93;border-radius:8px;background:#fff8e9;color:#87520a}.pv2-locked{padding:12px;border-radius:9px;background:#eef5ff;color:#265c9c;font-weight:700}.pv2-submit-form,.pv2-review-form,.pv2-assignment{display:grid;gap:14px;padding:20px}.pv2-field{display:grid;gap:9px;padding:14px;border:1px solid #dce6f3;border-radius:11px;background:#fff}.pv2-field small{color:#758399}.pv2-field progress{width:100%}.pv2-review-values{display:grid;gap:12px;padding:20px}.pv2-review-values article{padding:13px;border:1px solid #dde6f1;border-radius:10px}.pv2-review-values article div{display:grid;gap:6px;margin-top:8px}.pv2-review-values article span{display:grid}.pv2-review-values small{color:#728096}.pv2-table{overflow:auto;border:1px solid #dce5f1;border-radius:12px;background:#fff}.pv2-table table{width:100%;border-collapse:collapse}.pv2-table th,.pv2-table td{padding:12px;border-bottom:1px solid #edf1f6;text-align:left;white-space:nowrap}.pv2-table td small{display:block;color:#758399}.pv2-list{display:grid;gap:9px}.pv2-list article{display:flex;align-items:center;gap:16px;padding:13px 15px;border:1px solid #dce6f3;border-radius:10px;background:#fff}.pv2-list article div{flex:1}.pv2-list small{display:block;color:#758399}.pv2-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}.pv2-metrics article{display:grid;gap:7px;padding:17px;border:1px solid #dce6f3;border-radius:12px;background:#fff}.pv2-metrics strong{font-size:22px}.pv2-assignment label{display:flex;gap:10px;align-items:center;padding:12px;border:1px solid #dce6f3;border-radius:9px}.pv2-assignment label input{width:auto}.pv2-assignment label span{display:grid}.pv2-assignment small{color:#758399}@media(max-width:900px){.pv2-editor{grid-template-columns:1fr}.pv2-editor aside{border-left:0;border-top:1px solid #e0e8f2}.pv2-head{padding:17px}.pv2-head h2{font-size:21px}.pv2-form-grid{grid-template-columns:1fr}.pv2-form-grid label.wide{grid-column:auto}.pv2-list article{align-items:flex-start;flex-wrap:wrap}.pv2-error{align-items:flex-start;flex-wrap:wrap}}
.pv2-pager{display:flex;justify-content:flex-end;align-items:center;gap:10px;padding:12px 0}.pv2-pager span{color:#66748c;font-size:13px}

/* Post-release targeted layout fixes for the seven Performance V2 views. */
.pv2 {
  width: 100%;
  min-width: 0;
}

/* Keep the wide template editor above the fixed ERP sidebar at narrow desktop widths. */
#drawer.pv2-template-drawer {
  z-index: 40;
}

.pv2-head > div,
.pv2-card,
.pv2-card header > div,
.pv2-list article > *,
.pv2-error > * {
  min-width: 0;
}

.pv2-head > div:last-child:not(:empty),
.pv2-card footer > span:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pv2-head h2,
.pv2-head p,
.pv2-card h3,
.pv2-card p,
.pv2-card small,
.pv2-list article,
.pv2-error,
.pv2-machine-block,
.pv2-review-values article,
.pv2-assignment span {
  overflow-wrap: anywhere;
}

.pv2-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.pv2-table {
  width: 100%;
  max-width: 100%;
  overscroll-behavior: contain;
}

.pv2-table table {
  min-width: 720px;
}

.pv2-metrics-single {
  grid-template-columns: minmax(240px, 420px);
}

#drawer .modal:has(> .pv2-drawer-head + .pv2-editor) {
  display: grid;
  width: min(1120px, calc(100vw - 32px));
  max-width: none;
  height: min(820px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

/* Performance V2 template editor: MINIMIZED must win over the editor grid rule above. */
#drawer.pv2-template-drawer[data-drawer-state="minimized"] > .modal:has(> .pv2-drawer-head + .pv2-editor) {
  display: none !important;
  visibility: hidden !important;
}

#drawer .modal:has(> .pv2-drawer-head + .pv2-editor) .pv2-drawer-head {
  min-width: 0;
  padding: 16px 20px 14px;
}

#drawer .modal:has(> .pv2-drawer-head + .pv2-editor) .pv2-editor {
  min-width: 0;
  min-height: 0;
  height: 100%;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr);
  overflow: hidden;
}

#drawer .modal:has(> .pv2-drawer-head + .pv2-editor) .pv2-editor-main,
#drawer .modal:has(> .pv2-drawer-head + .pv2-editor) .pv2-editor > aside {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
}

#drawer .modal:has(> .pv2-drawer-head + .pv2-editor) .pv2-editor > aside {
  align-content: start;
}

.pv2-picker > button {
  flex: 1 1 112px;
  min-width: 0;
}

.pv2-component header {
  flex-wrap: wrap;
}

.pv2-component header > div {
  min-width: 160px;
}

@media (max-width: 1100px) {
  .pv2-head {
    flex-wrap: wrap;
  }

  #drawer .modal:has(> .pv2-drawer-head + .pv2-editor) {
    width: min(960px, calc(100vw - 28px));
  }

  #drawer .modal:has(> .pv2-drawer-head + .pv2-editor) .pv2-editor {
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, .8fr);
  }
}

@media (max-width: 900px) {
  #drawer .modal:has(> .pv2-drawer-head + .pv2-editor) {
    display: block;
    width: min(94vw, 720px);
    height: auto;
    max-height: calc(100dvh - 32px);
    overflow: auto;
    overscroll-behavior: contain;
  }

  #drawer .modal:has(> .pv2-drawer-head + .pv2-editor) .pv2-editor {
    height: auto;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  #drawer .modal:has(> .pv2-drawer-head + .pv2-editor) .pv2-editor-main,
  #drawer .modal:has(> .pv2-drawer-head + .pv2-editor) .pv2-editor > aside {
    overflow: visible;
  }

  .pv2-head > div:last-child:not(:empty) {
    width: 100%;
  }

  .pv2-metrics-single {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .pv2-head {
    gap: 14px;
    padding: 15px;
  }

  .pv2-head > div:last-child:not(:empty) > button,
  .pv2-card footer > span:last-child,
  .pv2-card footer > span:last-child > button {
    width: 100%;
  }

  .pv2-card footer {
    align-items: stretch;
    flex-direction: column;
  }

  .pv2-list article {
    align-items: stretch;
    flex-direction: column;
  }

  .pv2-list article > button {
    width: 100%;
  }

  .pv2-picker > button {
    flex-basis: calc(50% - 7px);
  }
}

/* Template simplification: fixed choices and stable live preview. */
.pv2-component-choices {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.pv2-component-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
  cursor: pointer;
}

.pv2-component-choice input {
  width: 18px !important;
  min-height: 18px !important;
  margin: 0;
  accent-color: #246dde;
}

.pv2-component-choice span {
  min-width: 0;
  color: #263b57;
  font-weight: 600;
}

.pv2-employee-preview section > small {
  color: #758399;
  font-size: 12px;
}

.pv2-employee-preview section {
  display: grid;
  gap: 7px;
  padding-top: 13px;
  border-top: 1px solid #dce6f3;
}

.pv2-employee-preview section > span {
  color: #344763;
  line-height: 1.55;
}

.pv2-employee-preview [data-preview-components] {
  display: grid;
  gap: 7px;
}

.pv2-employee-preview [data-preview-components] > span {
  padding: 8px 10px;
  border-radius: 8px;
  color: #285da9;
  background: #eaf3ff;
}

.pv2-employee-preview [data-preview-components] > em {
  color: #8793a4;
  font-size: 13px;
  font-style: normal;
}

.pv2-editor-error[hidden],
.pv2-employee-preview [hidden] {
  display: none;
}

.pv2-video-path-list {
  display: grid;
  gap: 8px;
}

.pv2-video-path-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.pv2-video-path-row > button {
  min-width: 68px;
}

.pv2-field [data-add-video-path] {
  justify-self: start;
}

@media (max-width: 620px) {
  .pv2-video-path-row {
    grid-template-columns: 1fr;
  }

  .pv2-video-path-row > button,
  .pv2-field [data-add-video-path] {
    width: 100%;
  }
}
