/* One vendor-style workspace. Earlier compact-width patches are intentionally overridden. */
.n1-po.j6b-workspace-open > .n1-editor-slot {
    width: 100%;
    margin-top: 12px;
}

/* Opening a PO now starts in the clean workspace, not the old overview. */
.n1-po.j6b-workspace-open > .n1-detail-hero {
    display: none !important;
}

.j7-readonly-badge {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0 11px;
    border-radius: 999px;
    background: #eef3f1;
    color: #52615c;
    font-size: 11px;
    font-weight: 700;
}

.j7-readonly :disabled {
    cursor: not-allowed;
}

.n1-po.j6b-workspace-open .j6-ta,
.n1-po.j6b-workspace-open .ps-panel,
.n1-po.j6b-workspace-open .j7-history-panel {
    width: 100%;
    max-width: none;
    margin: 0 !important;
    padding: 24px !important;
    box-sizing: border-box;
    border: 1px solid var(--line, #d4d7d6);
    border-radius: 18px;
    background: var(--surface, #fff);
    color: var(--text, #252827);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .06);
}

.j6b-tabs { display: none !important; }

.j6-head,
.ps-panel > header,
.j7-head {
    display: flex !important;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    padding: 0 0 14px !important;
    margin: 0 !important;
    border: 0 !important;
}

.j6-head h2,
.ps-panel > header h3,
.j7-head h2 {
    margin: 5px 0 10px;
    font-size: 24px;
}

.j6-head p,
.ps-panel > header p,
.j7-head p {
    margin: 0;
    color: var(--muted, #68706d);
}

.j7-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.j7-actions button {
    min-height: 40px;
    padding: 10px 14px;
    border: 1px solid var(--line, #d4d7d6);
    border-radius: 9px;
    background: var(--surface, #fff);
    color: inherit;
    font-weight: 700;
    cursor: pointer;
}

.j7-actions button.primary {
    border-color: var(--accent, #626967);
    background: var(--accent, #626967);
    color: var(--on-accent, #fff);
}

.j7-reminder,
.ps-review-notice,
.j7-history-count {
    padding: 11px 14px;
    margin: 0 0 14px;
    border: 0;
    border-radius: 9px;
    background: var(--soft, #f0f2f1);
    color: inherit;
}

.j6-process-strip,
.ps-status-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
    margin: 14px 0;
}

.j6-chip,
.ps-status-chip {
    display: grid;
    gap: 3px;
    min-height: 56px;
    padding: 10px 12px;
    border: 1px solid var(--line, #d4d7d6);
    border-radius: 9px;
    background: var(--surface-alt, var(--soft, #f0f2f1));
    color: inherit;
    text-align: left;
}

.j6-chip small,
.ps-status-chip small {
    color: var(--muted, #68706d);
    font-size: 11px;
}

.j6-chip.active,
.ps-status-chip.active {
    border-color: var(--accent, #626967);
    background: var(--accent, #626967);
    color: var(--on-accent, #fff);
    box-shadow: 0 7px 18px rgba(0, 0, 0, .16);
}

.j6-chip.active small,
.ps-status-chip.active small { color: var(--on-accent, #fff); opacity: .86; }

.j6-picker,
.ps-process-picker {
    display: grid;
    gap: 5px;
    width: 620px;
    max-width: 100%;
    margin: 12px 0 16px;
    padding: 0;
    border: 0;
    font-weight: 700;
}

.j6-picker select,
.ps-process-picker select {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line, #d4d7d6);
    border-radius: 9px;
    background: var(--surface, #fff);
    font-weight: 700;
}

.j6-editor,
.ps-single-review {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 16px;
    border: 1px solid var(--line, #d4d7d6);
    border-radius: 14px;
    background: var(--surface, #fff);
    box-sizing: border-box;
}

.j6-editor > header {
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line, #d4d7d6);
}

.j6-schedule {
    background: var(--soft, #f0f2f1);
}

.j6-fields {
    grid-template-columns: 1.05fr 1fr 1fr 1fr;
    gap: 12px;
}

.j6-fields label {
    padding: 9px;
    border: 1px solid transparent;
    border-radius: 10px;
}

.j6-fields label:hover,
.j6-fields label:focus-within {
    border-color: var(--accent, #626967);
    background: var(--surface, #fff);
    box-shadow: 0 0 0 3px var(--line, #d4d7d6);
}

.j6-target {
    margin-top: 12px;
    background: var(--soft, #f0f2f1);
}

.j7-actual {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
    padding: 11px 13px;
    margin-top: 12px;
    border: 1px solid var(--line, #d4d7d6);
    border-radius: 11px;
    background: var(--surface-alt, var(--soft, #f0f2f1));
    font-size: 12px;
}

.j7-actual span { color: var(--muted, #68706d); }

.j6-editor > footer .primary {
    min-width: 410px;
}

.j7-add-panel,
.j7-internal-settings {
    width: 100% !important;
    max-width: none !important;
    margin: 14px 0 0 !important;
    padding: 11px 14px;
    border: 1px solid var(--line, #d4d7d6);
    border-radius: 11px;
    background: var(--surface-alt, var(--soft, #f0f2f1));
    box-sizing: border-box;
}

.j7-add-panel summary,
.j7-internal-settings > summary {
    padding: 0 !important;
    border: 0 !important;
    cursor: pointer;
    font-weight: 700;
}

.j7-add-panel[open] summary,
.j7-internal-settings[open] > summary { margin-bottom: 10px; }

.j7-internal-settings .j6-order {
    margin: 12px 0;
}

.j7-history-table {
    overflow: auto;
    border: 1px solid var(--line, #d4d7d6);
    border-radius: 12px;
}

.j7-history-table table {
    width: 100%;
    border-collapse: collapse;
}

.j7-history-table th,
.j7-history-table td {
    padding: 10px;
    border-bottom: 1px solid var(--line, #d4d7d6);
    text-align: left;
}

@media (max-width: 1100px) {
    .j6-fields { grid-template-columns: 1fr 1fr; }
    .j6-fields .wide { grid-column: span 2; }
    .j6-head, .ps-panel > header, .j7-head { flex-direction: column; }
    .j7-actions { justify-content: flex-start; }
}

@media (max-width: 700px) {
    .n1-po.j6b-workspace-open .j6-ta,
    .n1-po.j6b-workspace-open .ps-panel,
    .n1-po.j6b-workspace-open .j7-history-panel { padding: 16px !important; }
    .j6-fields { grid-template-columns: 1fr; }
    .j6-fields .wide { grid-column: span 1; }
    .j7-actions { display: grid; width: 100%; }
    .j6-editor > footer .primary { min-width: 0; width: 100%; }
    .j7-actual { grid-template-columns: 1fr; }
}
