/**
 * Pharma Vitality Orders & Manufacturing workspace.
 * Loaded after pvdp.css and strictly scoped to .pvdp-orders.
 */
.pvdp-orders {
  --order-navy: #12212f;
  --order-navy-soft: #1d3548;
  --order-teal: #087f78;
  --order-teal-dark: #06635e;
  --order-teal-pale: #eaf8f6;
  --order-gold: #ad7700;
  --order-purple: #6941c6;
  --order-canvas: #f3f6f8;
  --order-card: #fff;
  --order-line: #dce3e8;
  --order-ink: #17232e;
  --order-muted: #617180;
  background: var(--order-canvas);
  color: var(--order-ink);
  min-height: 100vh;
}

.pvdp-orders button,
.pvdp-orders input,
.pvdp-orders select,
.pvdp-orders textarea { font: inherit; }
.pvdp-orders h1,
.pvdp-orders h2,
.pvdp-orders h3,
.pvdp-orders p { margin-block-start: 0; }
.pvdp-orders [hidden] { display: none !important; }

.pvdp-orders-hero {
  background:
    radial-gradient(circle at 84% 8%, rgba(13, 159, 148, .28), transparent 26rem),
    linear-gradient(130deg, #10212e, #18394a 68%, #0c635f);
  color: #fff;
  padding: 18px max(24px, calc((100vw - 1280px) / 2));
}

.pvdp-orders-topline,
.pvdp-orders-welcome,
.pvdp-orders-topbar,
.pvdp-orders-topbar > div,
.pvdp-orders-actions,
.pvdp-orders-brand,
.pvdp-orders-title-row,
.pvdp-orders-dialog-head,
.pvdp-orders-dialog-head-actions,
.pvdp-orders-dialog-actions,
.pvdp-orders-section-head,
.pvdp-orders-inline-actions {
  align-items: center;
  display: flex;
}

.pvdp-orders-topline,
.pvdp-orders-welcome,
.pvdp-orders-topbar,
.pvdp-orders-dialog-head,
.pvdp-orders-section-head { justify-content: space-between; }

.pvdp-orders-topline { border-bottom: 1px solid rgba(255, 255, 255, .14); padding-bottom: 15px; }
.pvdp-orders-brand { gap: 11px; }
.pvdp-orders-brand > span:last-child { display: grid; }
.pvdp-orders-brand strong { font-size: .92rem; }
.pvdp-orders-brand small { color: rgba(255, 255, 255, .68); font-size: .69rem; }
.pvdp-orders-actions { gap: 10px; }
.pvdp-orders-hero .pvdp-button:not(.pvdp-button--primary) { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .28); color: #fff; }
.pvdp-orders-welcome { gap: 32px; padding: 46px 0 40px; }
.pvdp-orders-welcome h1 { font-size: clamp(2rem, 4vw, 3.4rem); letter-spacing: -.04em; line-height: 1.05; margin-bottom: 12px; }
.pvdp-orders-welcome p { color: rgba(255, 255, 255, .8); margin-bottom: 7px; max-width: 750px; }
.pvdp-orders-welcome small { color: rgba(255, 255, 255, .62); }
.pvdp-orders-eyebrow { color: var(--order-teal); font-size: .72rem; font-weight: 850; letter-spacing: .12em; margin-bottom: 7px; text-transform: uppercase; }
.pvdp-orders-hero .pvdp-orders-eyebrow { color: #83e1d8; }
.pvdp-orders-title-row { flex-wrap: wrap; gap: 13px; }
.pvdp-orders-verified { align-items: center; background: rgba(234, 248, 246, .14); border: 1px solid rgba(131, 225, 216, .45); border-radius: 999px; color: #b4f3ec; display: inline-flex; font-size: .75rem; font-weight: 800; gap: 6px; padding: 6px 10px; }
.pvdp-orders-verified > span:first-child { align-items: center; background: #1ea89d; border-radius: 50%; color: #fff; display: inline-flex; height: 18px; justify-content: center; width: 18px; }

.pvdp-orders-service-note {
  align-items: flex-start;
  background: #fffbeb;
  border: 1px solid #f4d98c;
  border-radius: 14px;
  color: #744d00;
  display: flex;
  gap: 11px;
  margin: 20px auto 0;
  max-width: 1240px;
  padding: 13px 16px;
}
.pvdp-orders-service-note > span { align-items: center; background: #ffebb5; border-radius: 50%; display: inline-flex; flex: 0 0 24px; font-weight: 900; height: 24px; justify-content: center; }
.pvdp-orders-service-note p { display: grid; gap: 2px; margin: 0; }
.pvdp-orders-service-note p span { color: #88631b; font-size: .83rem; }

.pvdp-orders-content { margin: 0 auto; max-width: 1320px; padding: 28px 30px 60px; width: 100%; }
.pvdp-orders-kpis { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 34px; }
.pvdp-orders-kpis--factory { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pvdp-orders-kpis article { background: var(--order-card); border: 1px solid var(--order-line); border-radius: 15px; box-shadow: 0 3px 13px rgba(18, 33, 47, .04); display: grid; gap: 8px; min-height: 112px; padding: 19px; }
.pvdp-orders-kpis span { color: var(--order-muted); font-size: .76rem; font-weight: 750; }
.pvdp-orders-kpis strong { color: var(--order-navy); font-size: 1.85rem; line-height: 1; }
.pvdp-orders-section-head { gap: 18px; margin: 24px 0 13px; }
.pvdp-orders-section-head h2,
.pvdp-orders-section-head h3 { margin-bottom: 3px; }
.pvdp-orders-section-head p { color: var(--order-muted); font-size: .82rem; margin: 0; }
.pvdp-orders .pvdp-message--warning { background: #fffbeb; border-color: #f4d98c; color: #744d00; margin-bottom: 16px; }

.pvdp-orders-toolbar { align-items: end; background: var(--order-card); border: 1px solid var(--order-line); border-radius: 15px; display: grid; gap: 13px; grid-template-columns: minmax(250px, 1fr) minmax(190px, .38fr) auto; margin-bottom: 16px; padding: 15px; }
.pvdp-orders-toolbar--factory { grid-template-columns: minmax(260px, 1fr) 190px 155px 155px auto; }
.pvdp-orders-search input { background-image: radial-gradient(circle, transparent 6px, var(--order-muted) 6.5px, var(--order-muted) 7.5px, transparent 8px); background-position: 13px 14px; background-repeat: no-repeat; background-size: 18px 18px; padding-inline-start: 43px; }
[dir="rtl"] .pvdp-orders-search input { background-position: calc(100% - 13px) 14px; }
.pvdp-orders-loading { align-items: center; background: #fff; border: 1px solid var(--order-line); border-radius: 14px; color: var(--order-muted); display: flex; gap: 10px; justify-content: center; min-height: 110px; }

.pvdp-orders-table-wrap { background: #fff; border: 1px solid var(--order-line); border-radius: 15px; overflow: auto; }
.pvdp-orders-table { border-collapse: collapse; min-width: 880px; width: 100%; }
.pvdp-orders-table th { background: #f6f8f9; color: #52616e; font-size: .7rem; letter-spacing: .035em; padding: 12px 14px; text-align: start; text-transform: uppercase; }
.pvdp-orders-table td { border-top: 1px solid #e9edf0; font-size: .84rem; padding: 14px; vertical-align: middle; }
.pvdp-orders-table tbody tr:hover { background: #fbfdfd; }
.pvdp-orders-table--compact { min-width: 1040px; }
.pvdp-orders-table--compact td,
.pvdp-orders-table--compact th { padding: 10px; text-align: end; }
.pvdp-orders-table--compact td:first-child,
.pvdp-orders-table--compact th:first-child { min-width: 220px; text-align: start; }
.pvdp-orders-table--review { min-width: 1080px; }
.pvdp-orders-table strong { color: var(--order-navy); }
.pvdp-orders-table small { color: var(--order-muted); display: block; }
.pvdp-orders-cards { display: none; }
.pvdp-orders-empty { align-items: center; color: var(--order-muted); display: flex; flex-direction: column; gap: 5px; justify-content: center; min-height: 180px; text-align: center; }
.pvdp-orders-pagination { align-items: center; display: flex; gap: 8px; justify-content: center; padding: 16px; }

.pvdp-orders-status { border-radius: 999px; display: inline-flex; font-size: .68rem; font-weight: 850; padding: 5px 9px; white-space: nowrap; }
.pvdp-orders-status--draft { background: #f2f4f7; color: #475467; }
.pvdp-orders-status--pending-signature { background: #f4f3ff; color: #5925dc; }
.pvdp-orders-status--submitted,
.pvdp-orders-status--under-review { background: #eff8ff; color: #175cd3; }
.pvdp-orders-status--changes-requested { background: #fffaeb; color: #b54708; }
.pvdp-orders-status--factory-approved,
.pvdp-orders-status--quality-released,
.pvdp-orders-status--ready,
.pvdp-orders-status--delivered { background: #ecfdf3; color: #067647; }
.pvdp-orders-status--planned,
.pvdp-orders-status--in-production,
.pvdp-orders-status--partially-delivered { background: #f4f3ff; color: #5925dc; }
.pvdp-orders-status--rejected,
.pvdp-orders-status--cancelled { background: #fef3f2; color: #b42318; }
.pvdp-orders-progress { background: #e9eef1; border-radius: 999px; height: 6px; min-width: 90px; overflow: hidden; }
.pvdp-orders-progress > span { background: linear-gradient(90deg, var(--order-teal), #31b8ac); display: block; height: 100%; }

/* Staff/factory shell */
.pvdp-orders-shell { display: flex; min-height: 100vh; }
.pvdp-orders-sidebar { background: linear-gradient(180deg, #12212f, #172f40); color: #fff; display: flex; flex: 0 0 245px; flex-direction: column; min-height: 100vh; padding: 22px 16px; position: sticky; top: 0; }
.pvdp-orders-sidebar nav { display: grid; gap: 5px; margin-top: 38px; }
.pvdp-orders-sidebar nav a { align-items: center; border-radius: 9px; color: rgba(255, 255, 255, .73); display: flex; font-weight: 720; gap: 10px; padding: 11px; text-decoration: none; }
.pvdp-orders-sidebar nav a:hover,
.pvdp-orders-sidebar nav a[aria-current="page"] { background: rgba(255, 255, 255, .1); color: #fff; }
.pvdp-orders-sidebar-foot { border-top: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 5px; margin-top: auto; padding-top: 16px; }
.pvdp-orders-sidebar-foot small { color: rgba(255, 255, 255, .57); }
.pvdp-orders-main { flex: 1; min-width: 0; }
.pvdp-orders-topbar { background: #fff; border-bottom: 1px solid var(--order-line); gap: 20px; min-height: 86px; padding: 16px 28px; position: sticky; top: 0; z-index: 10; }
.pvdp-orders-topbar h1 { font-size: 1.3rem; margin-bottom: 2px; }
.pvdp-orders-topbar p { color: var(--order-muted); font-size: .78rem; margin: 0; }
.pvdp-orders-topbar > div:first-child { gap: 10px; }
.pvdp-orders-menu { display: none; }
.pvdp-orders-overlay { display: none; }
.pvdp-orders-topbar--admin { position: static; }

/* Dialog and builder */
.pvdp-orders-dialog { background: #fff; border: 0; border-radius: 20px; box-shadow: 0 30px 90px rgba(9, 22, 33, .3); color: var(--order-ink); max-height: calc(100vh - 34px); max-width: 1050px; padding: 0; width: calc(100% - 34px); }
.pvdp-orders-dialog--builder,
.pvdp-orders-dialog--factory { max-width: 1360px; }
.pvdp-orders-dialog--agreement { max-width: 800px; }
.pvdp-orders-dialog--signature { max-width: 650px; }
.pvdp-orders-dialog::backdrop { background: rgba(8, 20, 29, .72); backdrop-filter: blur(3px); }
.pvdp-orders-dialog > form { display: flex; flex-direction: column; max-height: calc(100vh - 34px); }
.pvdp-orders-dialog-head { background: #fff; border-bottom: 1px solid var(--order-line); gap: 18px; padding: 20px 24px; position: sticky; top: 0; z-index: 4; }
.pvdp-orders-dialog-head h2 { margin-bottom: 3px; }
.pvdp-orders-dialog-head p:last-child { color: var(--order-muted); margin: 0; }
.pvdp-orders-dialog-head-actions { gap: 9px; }
.pvdp-orders-dialog-actions { background: #fff; border-top: 1px solid var(--order-line); bottom: 0; gap: 10px; padding: 14px 22px; position: sticky; z-index: 4; }
.pvdp-orders-spacer { flex: 1; }
.pvdp-orders-detail-body,
.pvdp-orders-step { overflow: auto; padding: 22px 24px; }
.pvdp-orders-step { min-height: min(620px, calc(100vh - 225px)); }
.pvdp-orders-steps { background: #f8fafb; border-bottom: 1px solid var(--order-line); display: grid; grid-template-columns: repeat(4, 1fr); padding: 13px 24px; }
.pvdp-orders-steps span { align-items: center; color: var(--order-muted); display: flex; gap: 8px; position: relative; }
.pvdp-orders-steps span:not(:last-child)::after { background: #dce3e8; content: ""; height: 2px; inset-inline-end: 14px; position: absolute; width: calc(100% - 55px); }
.pvdp-orders-steps b { align-items: center; background: #e4eaed; border-radius: 50%; display: flex; flex: 0 0 27px; font-size: .75rem; height: 27px; justify-content: center; }
.pvdp-orders-steps em { font-size: .74rem; font-style: normal; font-weight: 800; }
.pvdp-orders-steps span[aria-current="step"] { color: var(--order-teal-dark); }
.pvdp-orders-steps span[aria-current="step"] b { background: var(--order-teal); color: #fff; }
.pvdp-orders-steps span[data-complete="true"] b { background: #d1fae5; color: #067647; }

.pvdp-orders-grid { display: grid; gap: 13px; margin-bottom: 15px; }
.pvdp-orders-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pvdp-orders-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pvdp-orders-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pvdp-orders-span-2 { grid-column: span 2; }
.pvdp-orders-grow { flex: 1; }
.pvdp-orders-line,
.pvdp-orders-attachment,
.pvdp-orders-plan-line { background: #fbfcfd; border: 1px solid var(--order-line); border-radius: 14px; margin-bottom: 13px; padding: 15px; }
.pvdp-orders-line > header { align-items: center; border-bottom: 1px solid #e8edef; display: flex; justify-content: space-between; margin-bottom: 13px; padding-bottom: 10px; }
.pvdp-orders-line .pvdp-field small { color: var(--order-muted); font-size: .7rem; margin-top: 3px; }
.pvdp-orders-field-policy { background: #fff; border: 1px solid #e5eaed; border-radius: 10px; padding: 10px; }
.pvdp-orders-field-policy[data-policy-mode="fixed"] { background: #f3f7f8; border-color: #d3dde2; }
.pvdp-orders-field-policy[data-policy-mode="fixed"] .pvdp-control { background: #edf2f4; color: #344054; cursor: not-allowed; }
.pvdp-orders-policy-badge { color: var(--order-muted); font-size: .64rem; margin-inline-start: 4px; }
.pvdp-orders-callout { align-items: center; background: var(--order-teal-pale); border: 1px solid #aee1dd; border-radius: 14px; color: var(--order-teal-dark); display: flex; gap: 12px; margin-bottom: 16px; padding: 15px; }
.pvdp-orders-callout > span { font-size: 1.6rem; }
.pvdp-orders-callout div { flex: 1; }
.pvdp-orders-callout p { color: #397a75; font-size: .79rem; margin: 2px 0 0; }
.pvdp-orders-preview { background: #f9fbfc; border: 1px solid var(--order-line); border-radius: 14px; color: var(--order-muted); min-height: 120px; padding: 16px; }
.pvdp-orders-preview-grid { display: grid; gap: 10px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pvdp-orders-preview-grid article { background: #fff; border: 1px solid #e4e9ec; border-radius: 10px; display: grid; gap: 4px; padding: 12px; }
.pvdp-orders-preview-grid span { font-size: .68rem; }
.pvdp-orders-preview-grid strong { color: var(--order-navy); font-size: 1.05rem; }
.pvdp-orders-preview-lines { border-top: 1px solid var(--order-line); display: grid; gap: 7px; margin-top: 14px; padding-top: 13px; }
.pvdp-orders-preview-line { align-items: center; display: flex; gap: 12px; justify-content: space-between; }

.pvdp-orders-attachment { position: relative; }
.pvdp-orders-attachment > .pvdp-button { inset-block-start: 10px; inset-inline-end: 10px; position: absolute; }
.pvdp-orders-file { padding: 7px; }
.pvdp-orders-attachment-alert { background: #eef7ff; border: 1px solid #c5e2fa; border-radius: 10px; color: #14578a; display: grid; margin-bottom: 13px; padding: 11px 13px; }
.pvdp-orders-attachment-alert span { font-size: .75rem; }

.pvdp-orders-agreement-card { align-items: center; background: #fffaf0; border: 1px solid #f0d28e; border-radius: 15px; display: flex; justify-content: space-between; margin-bottom: 16px; padding: 17px; }
.pvdp-orders-agreement-summary { align-items: flex-start; display: flex; gap: 11px; }
.pvdp-orders-agreement-summary > span { align-items: center; background: #f8df9d; border-radius: 50%; display: flex; flex: 0 0 26px; font-weight: 900; height: 26px; justify-content: center; }
.pvdp-orders-agreement-summary p { color: #7c5b17; font-size: .8rem; margin: 3px 20px 0 0; max-width: 780px; }
.pvdp-orders-consent { align-items: flex-start; background: #f7f9fa; border: 1px solid var(--order-line); border-radius: 13px; cursor: pointer; display: flex; gap: 12px; margin-bottom: 14px; padding: 15px; }
.pvdp-orders-consent input { height: 20px; margin-top: 2px; width: 20px; }
.pvdp-orders-consent span { display: grid; gap: 3px; }
.pvdp-orders-consent small { color: var(--order-muted); }
.pvdp-orders-final-disclaimer { background: #eff8ff; border-inline-start: 4px solid #2e90fa; border-radius: 10px; color: #175cd3; padding: 14px; }
.pvdp-orders-final-disclaimer p { margin: 4px 0 0; }
.pvdp-orders-immutable-review { background: #f7f7ff; border: 1px solid #d9d6fe; border-radius: 13px; color: #4a3b87; margin-bottom: 14px; padding: 15px; }
.pvdp-orders-immutable-review > p { font-size: .8rem; margin: 4px 0 0; }
.pvdp-orders-agreement-text { color: #344054; line-height: 1.8; max-height: min(65vh, 620px); overflow: auto; padding: 24px; white-space: pre-wrap; }
.pvdp-orders-signature-state { align-items: flex-start; background: #f4f3ff; border: 1px solid #d9d6fe; border-radius: 13px; color: #5925dc; display: flex; gap: 12px; margin-bottom: 17px; padding: 14px; }
.pvdp-orders-signature-state > span { font-size: 1.6rem; }
.pvdp-orders-signature-state p { color: #6941c6; font-size: .8rem; margin: 3px 0 0; }
.pvdp-orders-signature-warning { align-items: flex-start; background: #fff7ed; border: 1px solid #fdba74; border-inline-start: 4px solid #ea580c; border-radius: 13px; color: #9a3412; display: flex; gap: 12px; margin-bottom: 17px; padding: 14px; }
.pvdp-orders-signature-warning > span { align-items: center; background: #ffedd5; border-radius: 50%; display: inline-flex; flex: 0 0 26px; font-weight: 900; height: 26px; justify-content: center; }
.pvdp-orders-signature-warning p { font-size: .8rem; margin: 4px 0; }
.pvdp-orders-signature-warning small { color: #7c2d12; display: block; font-weight: 680; line-height: 1.5; }
.pvdp-orders-otp { font-size: 1.4rem !important; font-weight: 850; letter-spacing: .3em; text-align: center; }

/* Details, messages, factory review */
.pvdp-orders-detail-facts { display: grid; gap: 9px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pvdp-orders-detail-facts article { background: #f7f9fa; border-radius: 10px; display: grid; gap: 3px; padding: 11px; }
.pvdp-orders-detail-facts span { color: var(--order-muted); font-size: .68rem; }
.pvdp-orders-detail-facts strong { font-size: .82rem; overflow-wrap: anywhere; }
.pvdp-orders-file-list { display: grid; gap: 8px; }
.pvdp-orders-file-row { align-items: center; background: #f7f9fa; border: 1px solid var(--order-line); border-radius: 10px; display: flex; gap: 10px; justify-content: space-between; padding: 10px 12px; }
.pvdp-orders-file-row div { display: grid; }
.pvdp-orders-file-row small { color: var(--order-muted); }
.pvdp-orders-thread { background: #f8fafb; border: 1px solid var(--order-line); border-radius: 13px; display: grid; gap: 11px; max-height: 360px; min-height: 100px; overflow: auto; padding: 13px; }
.pvdp-orders-message { background: #fff; border: 1px solid #e5eaed; border-radius: 12px 12px 12px 3px; max-width: 78%; padding: 10px 12px; }
[dir="rtl"] .pvdp-orders-message { border-radius: 12px 12px 3px 12px; }
.pvdp-orders-message--mine { background: var(--order-teal-pale); border-color: #b6e2de; justify-self: end; }
.pvdp-orders-message--internal { background: #fffaeb; border-color: #f5d77d; }
.pvdp-orders-message header { align-items: center; display: flex; gap: 8px; justify-content: space-between; }
.pvdp-orders-message header small { color: var(--order-muted); }
.pvdp-orders-message p { margin: 6px 0 0; white-space: pre-wrap; }
.pvdp-orders-message-form { align-items: end; display: flex; gap: 10px; margin-top: 10px; }
.pvdp-orders-message-form textarea { flex: 1; }
.pvdp-orders-message-form .pvdp-field { min-width: 190px; }
.pvdp-orders-tabs { border-bottom: 1px solid var(--order-line); display: flex; gap: 4px; overflow: auto; }
.pvdp-orders-tabs button { background: transparent; border: 0; border-bottom: 3px solid transparent; color: var(--order-muted); font-weight: 780; padding: 12px 14px; white-space: nowrap; }
.pvdp-orders-tabs button[aria-selected="true"] { border-bottom-color: var(--order-teal); color: var(--order-teal-dark); }
.pvdp-orders-review-grid { display: grid; gap: 13px; grid-template-columns: 1fr 330px; margin-top: 14px; }
.pvdp-orders-agreement-proof { background: #f7f7ff; border: 1px solid #d9d6fe; border-radius: 14px; padding: 14px; }
.pvdp-orders-agreement-proof dl { display: grid; gap: 5px; font-size: .76rem; }
.pvdp-orders-agreement-proof dt { color: var(--order-muted); }
.pvdp-orders-agreement-proof dd { margin: 0; overflow-wrap: anywhere; }
.pvdp-orders-decision { align-items: end; background: #f7f9fa; border: 1px solid var(--order-line); border-radius: 14px; display: flex; gap: 12px; margin-top: 15px; padding: 14px; }
.pvdp-orders-decision-hint { color: var(--order-muted); display: block; line-height: 1.45; margin-top: 5px; max-width: 760px; }
.pvdp-orders-decision :disabled { cursor: not-allowed; opacity: .68; }
.pvdp-orders-plan-line { position: relative; }
.pvdp-orders-plan-line > .pvdp-button { inset-block-start: 8px; inset-inline-end: 8px; position: absolute; }
.pvdp-orders-fee-summary { margin-top: 18px; }
.pvdp-orders-timeline { border-inline-start: 2px solid #dce3e8; display: grid; gap: 15px; list-style: none; margin-inline-start: 8px; padding-inline-start: 23px; }
.pvdp-orders-timeline li { position: relative; }
.pvdp-orders-timeline li::before { background: var(--order-teal); border: 3px solid #d6f1ee; border-radius: 50%; content: ""; height: 12px; inset-inline-start: -30px; position: absolute; top: 4px; width: 12px; }
.pvdp-orders-timeline p { margin: 2px 0; }
.pvdp-orders-timeline small { color: var(--order-muted); }

/* Admin */
.pvdp-orders-entitlement-controls { align-items: end; background: #f7f9fa; border: 1px solid var(--order-line); border-radius: 14px; display: flex; gap: 18px; margin: 18px 0; padding: 14px; }
.pvdp-orders-entitlement-controls .pvdp-field { min-width: 320px; }
.pvdp-orders-entitlement-controls p { color: var(--order-muted); margin: 0; }
.pvdp-orders-toggle { align-items: center; background: #f7f9fa; border: 1px solid var(--order-line); border-radius: 10px; display: flex; gap: 9px; min-height: 46px; padding: 10px; }
.pvdp-orders-toggle input { height: 18px; width: 18px; }
.pvdp-orders-fieldset { border: 1px solid var(--order-line); border-radius: 13px; margin: 18px 0 0; padding: 14px; }
.pvdp-orders-fieldset legend { font-weight: 850; padding: 0 7px; }

@media (max-width: 1120px) {
  .pvdp-orders-kpis--factory { grid-template-columns: repeat(3, 1fr); }
  .pvdp-orders-toolbar--factory { grid-template-columns: 1fr 1fr 1fr; }
  .pvdp-orders-grid--5 { grid-template-columns: repeat(3, 1fr); }
  .pvdp-orders-detail-facts { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 860px) {
  .pvdp-orders-content { padding-inline: 18px; }
  .pvdp-orders-welcome { align-items: flex-start; flex-direction: column; }
  .pvdp-orders-kpis,
  .pvdp-orders-kpis--factory { grid-template-columns: repeat(2, 1fr); }
  .pvdp-orders-toolbar,
  .pvdp-orders-toolbar--factory { grid-template-columns: 1fr 1fr; }
  .pvdp-orders-grid--3,
  .pvdp-orders-grid--4,
  .pvdp-orders-grid--5 { grid-template-columns: repeat(2, 1fr); }
  .pvdp-orders-sidebar { inset: 0 auto 0 0; max-width: 280px; position: fixed; transform: translateX(-105%); transition: transform .2s ease; width: 82vw; z-index: 100; }
  [dir="rtl"] .pvdp-orders-sidebar { inset: 0 0 0 auto; transform: translateX(105%); }
  .pvdp-orders-sidebar[data-open="true"] { transform: translateX(0); }
  .pvdp-orders-overlay { background: rgba(8, 20, 29, .65); border: 0; inset: 0; position: fixed; z-index: 90; }
  .pvdp-orders-overlay[data-open="true"] { display: block; }
  .pvdp-orders-menu { display: inline-flex; }
  .pvdp-orders-review-grid { grid-template-columns: 1fr; }
  .pvdp-orders-agreement-card,
  .pvdp-orders-decision { align-items: stretch; flex-direction: column; }
}

@media (max-width: 650px) {
  .pvdp-orders-topline { align-items: flex-start; gap: 12px; }
  .pvdp-orders-topline,
  .pvdp-orders-topbar { flex-direction: column; }
  .pvdp-orders-actions { flex-wrap: wrap; }
  .pvdp-orders-welcome { padding-block: 30px; }
  .pvdp-orders-welcome h1 { font-size: 2rem; }
  .pvdp-orders-kpis,
  .pvdp-orders-kpis--factory,
  .pvdp-orders-toolbar,
  .pvdp-orders-toolbar--factory,
  .pvdp-orders-grid--3,
  .pvdp-orders-grid--4,
  .pvdp-orders-grid--5,
  .pvdp-orders-detail-facts,
  .pvdp-orders-preview-grid { grid-template-columns: 1fr; }
  .pvdp-orders-span-2 { grid-column: auto; }
  .pvdp-orders-table-wrap > .pvdp-orders-table:not(.pvdp-orders-table--compact):not(.pvdp-orders-table--review) { display: none; }
  .pvdp-orders-cards { display: grid; gap: 10px; padding: 10px; }
  .pvdp-orders-mobile-card { background: #fff; border: 1px solid var(--order-line); border-radius: 12px; display: grid; gap: 9px; padding: 13px; }
  .pvdp-orders-mobile-card header { align-items: flex-start; display: flex; justify-content: space-between; }
  .pvdp-orders-mobile-card dl { display: grid; gap: 5px; grid-template-columns: 1fr 1fr; margin: 0; }
  .pvdp-orders-mobile-card dt { color: var(--order-muted); font-size: .67rem; }
  .pvdp-orders-mobile-card dd { font-size: .8rem; margin: 0; }
  .pvdp-orders-dialog { border-radius: 0; height: 100vh; max-height: 100vh; width: 100vw; }
  .pvdp-orders-dialog > form { max-height: 100vh; }
  .pvdp-orders-steps em { display: none; }
  .pvdp-orders-steps span:not(:last-child)::after { width: calc(100% - 40px); }
  .pvdp-orders-dialog-head,
  .pvdp-orders-dialog-actions,
  .pvdp-orders-detail-body,
  .pvdp-orders-step { padding-inline: 15px; }
  .pvdp-orders-dialog-actions { flex-wrap: wrap; }
  .pvdp-orders-dialog-actions .pvdp-button { flex: 1; }
  .pvdp-orders-message-form { align-items: stretch; flex-direction: column; }
  .pvdp-orders-message { max-width: 94%; }
  .pvdp-orders-entitlement-controls { align-items: stretch; flex-direction: column; }
  .pvdp-orders-entitlement-controls .pvdp-field { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pvdp-orders *,
  .pvdp-orders *::before,
  .pvdp-orders *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (forced-colors: active) {
  .pvdp-orders-status,
  .pvdp-orders-verified,
  .pvdp-orders-service-note,
  .pvdp-orders-preview { border: 1px solid CanvasText; }
}
