.vru-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-width: none;
  max-height: min(94dvh, 1040px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid #d5e2ef;
  border-radius: 18px;
  background: #f7fafd;
  color: #163858;
  box-shadow: 0 28px 90px rgba(8, 35, 68, .28);
  font-family: 'Manrope', 'DM Sans', sans-serif;
}
.vru-dialog::backdrop { background: rgba(5, 29, 57, .63); backdrop-filter: blur(3px); }
.vru-shell { display: grid; min-height: 420px; }
.vru-header { display: flex; align-items: center; gap: 15px; padding: 21px 26px 19px; border-bottom: 1px solid #e0e9f1; background: #fff; }
.vru-mark { display: grid; place-items: center; flex: 0 0 44px; height: 44px; border-radius: 13px; background: #eaf4fd; color: #1766a4; font-size: 13px; font-weight: 850; letter-spacing: -.06em; }
.vru-heading { min-width: 0; flex: 1; }
.vru-kicker { display: block; margin-bottom: 4px; color: #6683a0; font-size: 9px; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.vru-heading h2 { margin: 0; color: #12395f; font-size: 19px; font-weight: 800; letter-spacing: -.035em; }
.vru-heading p { margin: 4px 0 0; color: #71869a; font-size: 11px; line-height: 1.45; }
.vru-icon-button { display: grid; place-items: center; flex: 0 0 36px; width: 36px; height: 36px; border: 1px solid #dce7f0; border-radius: 10px; background: #fff; color: #4f6a83; font: 400 23px/1 sans-serif; cursor: pointer; }
.vru-icon-button:hover { border-color: #9fc5e4; background: #f3f9fe; }
.vru-content { display: grid; gap: 16px; padding: 18px 26px 24px; }
.vru-step-line { display: flex; align-items: center; gap: 10px; color: #9aabba; }
.vru-step { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 10px; }
.vru-step::first-letter { color: inherit; }
.vru-step b { font-weight: 650; }
.vru-step.is-done,.vru-step.is-active { color: #1768aa; }
.vru-step.is-active b { color: #143c61; }
.vru-step-line i { height: 1px; min-width: 18px; flex: 1; background: #d9e5ee; }
.vru-source { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 15px; border: 1px solid #dae6ef; border-radius: 11px; background: #fff; }
.vru-source-copy { display: grid; gap: 2px; min-width: 0; }
.vru-source-copy strong { overflow: hidden; color: #214565; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.vru-source-copy small { color: #7a8ea0; font-size: 10px; }
.vru-warning { margin: 0; padding: 9px 12px; border: 1px solid #f0dcae; border-radius: 8px; background: #fffaf0; color: #775a23; font-size: 10px; line-height: 1.5; }
.vru-warning strong { color: #674817; }
.vru-inline-usage { padding: 9px 12px; border: 1px solid #d8e6f0; border-radius: 8px; background: #f3f8fc; color: #668097; font-size: 10px; line-height: 1.5; }
.vru-inline-usage strong { color: #315b7c; }
.vru-approved-cost { margin: 0; padding: 9px 12px; border: 1px solid #d2e6da; border-radius: 8px; background: #f3faf6; color: #527661; font-size: 10px; }
.vru-approved-cost strong { color: #347253; }
.vru-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 9px 13px; border: 1px solid #c8d9e7; border-radius: 8px; background: #fff; color: #315571; font: 750 11px/1.2 'Manrope', sans-serif; cursor: pointer; text-decoration: none; transition: background .16s, border-color .16s, transform .16s; }
.vru-button:hover:not(:disabled) { transform: translateY(-1px); border-color: #91b8d8; background: #f3f9fe; }
.vru-button:focus-visible,.vru-icon-button:focus-visible,.vru-field input:focus-visible,.vru-field select:focus-visible,.vru-field textarea:focus-visible,.vru-person input:focus-visible,.vru-consent input:focus-visible { outline: 3px solid #abd0ed; outline-offset: 2px; }
.vru-button:disabled { cursor: not-allowed; opacity: .56; }
.vru-button-primary { border-color: #1767a6; background: #1767a6; color: #fff; }
.vru-button-primary:hover:not(:disabled) { border-color: #12558c; background: #12558c; }
.vru-button-secondary { border-color: #c9dceb; background: #f5fafe; color: #1b5f94; }
.vru-button-quiet { border-color: transparent; background: transparent; color: #667d90; }
.vru-file-button { position: relative; flex: none; overflow: hidden; }
.vru-file-button input { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; opacity: 0; }
.vru-empty { display: grid; justify-items: center; gap: 9px; padding: 36px 20px; border: 1px dashed #bed2e2; border-radius: 12px; background: #fff; text-align: center; }
.vru-empty strong { color: #234a69; font-size: 14px; }
.vru-empty p { max-width: 48ch; margin: 0 0 5px; color: #758a9c; font-size: 11px; line-height: 1.5; }
.vru-empty-icon { width: 36px; height: 42px; margin-bottom: 2px; border: 1px solid #a8c6dd; border-radius: 7px; background: linear-gradient(135deg, transparent 0 69%, #d7e8f4 70%), linear-gradient(#fff,#f1f8fd); box-shadow: inset 0 0 0 5px white; }
.vru-status { padding: 10px 12px; border: 1px solid #d0e1ed; border-radius: 8px; background: #f1f8fd; color: #285a7e; font-size: 11px; line-height: 1.45; }
.vru-status[hidden] { display: none; }
.vru-status.is-error { border-color: #edc9c4; background: #fff4f2; color: #85483f; }
.vru-status.is-success { border-color: #c5e3d6; background: #f0faf5; color: #347257; }
.vru-status.is-warning { border-color: #f0dcae; background: #fffaf0; color: #775a23; }
.vru-workspace { display: grid; grid-template-columns: minmax(220px, .78fr) minmax(0, 1.5fr); align-items: start; gap: 18px; }
.vru-document,.vru-section,.vru-outbound { min-width: 0; padding: 15px; border: 1px solid #dce7ef; border-radius: 11px; background: #fff; }
.vru-document { position: sticky; top: 0; }
.vru-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.vru-section-head h3,.vru-outbound h3 { margin: 0; color: #1a4264; font-size: 13px; font-weight: 800; letter-spacing: -.02em; }
.vru-kind-tag { padding: 5px 9px; border-radius: 999px; background: #edf6fd; color: #39749f; font-size: 9px; font-weight: 800; }
.vru-preview { display: grid; place-items: center; min-height: 270px; max-height: 510px; margin-top: 12px; overflow: hidden; border: 1px solid #e2eaf1; border-radius: 8px; background: repeating-linear-gradient(45deg,#f6f9fb,#f6f9fb 8px,#f0f5f8 8px,#f0f5f8 16px); }
.vru-preview img { display: block; width: 100%; height: auto; max-height: 510px; object-fit: contain; }
.vru-pdf-note { display: grid; justify-items: center; gap: 9px; padding: 22px; color: #667f94; text-align: center; font-size: 10px; }
.vru-pdf-note strong { color: #315571; overflow-wrap: anywhere; }
.vru-pdf-note a { color: #1265a3; font-weight: 750; }
.vru-pdf-frame { display: grid; width: 100%; min-height: 300px; height: min(60dvh,510px); grid-template-rows: 1fr auto; }
.vru-pdf-frame iframe { width: 100%; height: 100%; min-height: 0; border: 0; background: #fff; }
.vru-pdf-frame a { padding: 7px 9px; color: #1265a3; background: #fff; font-size: 10px; font-weight: 750; text-align: center; }
.vru-file-mark { display: grid; place-items: center; width: 46px; height: 56px; border: 1px solid #a9c8df; border-radius: 6px; background: #fff; color: #216fa9; font-size: 10px; font-weight: 850; }
.vru-privacy { margin: 11px 0 0; color: #9b6628; font-size: 10px; line-height: 1.5; }
.vru-review { display: grid; gap: 13px; min-width: 0; }
.vru-muted { margin: 8px 0 11px; color: #778b9d; font-size: 10px; line-height: 1.5; }
.vru-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 12px; }
.vru-field { display: grid; gap: 5px; min-width: 0; color: #506a80; font-size: 10px; font-weight: 750; }
.vru-wide { grid-column: 1/-1; }
.vru-field input,.vru-field select,.vru-field textarea { width: 100%; min-width: 0; min-height: 37px; padding: 8px 9px; border: 1px solid #d1dee8; border-radius: 7px; background: #fbfdff; color: #1b3f5d; font: 500 11px 'Manrope', sans-serif; }
.vru-field textarea { min-height: 62px; resize: vertical; }
.vru-evidence-box { margin-top: 13px; padding: 10px 11px; border-radius: 8px; background: #f5f9fc; color: #526f88; font-size: 10px; }
.vru-evidence-box>strong { color: #385b77; font-size: 10px; }
.vru-evidence { display: grid; gap: 5px; margin: 7px 0 0; padding-left: 17px; line-height: 1.45; }
.vru-evidence li { overflow-wrap: anywhere; }
.vru-review-note { margin: 8px 0 0; color: #7c8e9c; line-height: 1.5; }
.vru-outbound { border-color: #c8dced; background: #f6fbff; }
.vru-outbound pre { max-height: 180px; margin: 10px 0; padding: 11px; overflow: auto; border: 1px solid #dceaf5; border-radius: 7px; background: #fff; color: #31516c; font: 10px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.vru-consent { display: flex; align-items: flex-start; gap: 8px; margin: 9px 0; color: #456680; font-size: 10px; line-height: 1.5; }
.vru-consent input,.vru-person input { flex: none; margin: 2px 0 0; accent-color: #1767a6; }
.vru-cost,.vru-usage-line { margin: 8px 0 0; color: #6e8293; font-size: 10px; }
.vru-people { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }
.vru-person { display: flex; align-items: flex-start; gap: 8px; min-width: 0; padding: 9px; border: 1px solid #e1eaf1; border-radius: 7px; color: #385a76; font-size: 10px; }
.vru-person span { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.vru-person small { flex: none; color: #3572a0; font-size: 9px; font-weight: 750; }
.vru-title-field { margin-top: 12px; }
.vru-footer { position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 10px; padding: 13px 26px; border-top: 1px solid #dce7ef; background: rgba(255,255,255,.97); }
.vru-success-panel { display: grid; justify-items: center; gap: 8px; padding: 30px 18px; border: 1px solid #d0e5f3; border-radius: 12px; background: #fff; text-align: center; }
.vru-success-panel h3 { margin: 0; color: #18496f; font-size: 19px; }
.vru-success-panel p { margin: 0; color: #5f7b8e; font-size: 11px; }
.vru-success-panel ul { display: grid; gap: 5px; max-width: 480px; margin: 5px 0 0; padding-left: 18px; color: #886126; text-align: left; font-size: 11px; }
.vru-success-mark { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 50%; background: #e9f7f0; color: #358460; font-size: 18px; font-weight: 800; }

.vru-usage-dialog { width: min(900px,calc(100vw - 28px)); }
.vru-usage-shell { min-height: 300px; }
.vru-usage-content { display: grid; gap: 16px; padding: 20px 26px 25px; }
.vru-loading { min-height: 100px; display: grid; place-items: center; color: #6f8799; font-size: 11px; }
.vru-usage-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 9px; }
.vru-usage-summary>div { display: grid; gap: 7px; padding: 13px; border: 1px solid #dce7ef; border-radius: 9px; background: #fff; }
.vru-usage-summary span { color: #7b8fa0; font-size: 9px; font-weight: 750; }
.vru-usage-summary strong { color: #1d486a; font-size: 14px; overflow-wrap: anywhere; }
.vru-budget-state { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid #d3e7dd; border-radius: 8px; background: #f3faf6; color: #3f735c; font-size: 10px; font-weight: 750; }
.vru-budget-state.is-warning { border-color: #f0dfb9; background: #fffaf0; color: #7b5e28; }
.vru-budget-state.is-blocked { border-color: #edcfcb; background: #fff4f2; color: #824d46; }
.vru-state-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.vru-history h3 { margin: 0 0 9px; color: #1b4263; font-size: 13px; }
.vru-table-wrap { overflow: auto; border: 1px solid #dce7ef; border-radius: 8px; background: #fff; }
.vru-table-wrap table { width: 100%; border-collapse: collapse; font-size: 10px; }
.vru-table-wrap th,.vru-table-wrap td { padding: 10px 11px; border-bottom: 1px solid #e8eef3; text-align: left; white-space: nowrap; }
.vru-table-wrap th { background: #f5f9fc; color: #647e93; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.vru-table-wrap td { color: #355873; }
.vru-outcome { display: inline-block; padding: 4px 7px; border-radius: 99px; background: #eef5fa; color: #4a6a84; }
.vru-budget-list { display: grid; gap: 11px; }
.vru-budget-row { display: grid; grid-template-columns: 1.15fr 1.2fr minmax(130px,.75fr) auto; align-items: center; gap: 15px; padding: 15px; border: 1px solid #dce7ef; border-radius: 10px; background: #fff; }
.vru-budget-tenant { min-width: 0; }
.vru-budget-tenant h3 { margin: 0 0 3px; color: #1e4768; font-size: 13px; overflow-wrap: anywhere; }
.vru-budget-tenant small { color: #8798a7; font-size: 9px; overflow-wrap: anywhere; }
.vru-budget-metrics { display: grid; gap: 5px; color: #73899a; font-size: 9px; }
.vru-budget-metrics strong { color: #365a76; }
.vru-admin-state { color: #3f735c; font-weight: 750; }
.vru-admin-state.is-warning { color: #856326; }
.vru-admin-state.is-blocked { color: #824d46; }
.vru-limit-control { display: grid; gap: 5px; color: #617d93; font-size: 9px; font-weight: 750; }
.vru-limit-control input { width: 100%; min-width: 0; height: 36px; padding: 7px; border: 1px solid #cfdee9; border-radius: 7px; background: #fbfdff; color: #1d4260; font: 11px 'Manrope',sans-serif; }
.vru-budget-actions { display: grid; justify-items: end; gap: 4px; }
.vru-row-success,.vru-row-error { font-size: 9px; }
.vru-row-success { color: #397657; }
.vru-row-error { color: #894c43; }

@media(max-width:760px) {
  .vru-dialog { width: calc(100vw - 14px); max-height: calc(100dvh - 14px); border-radius: 13px; }
  .vru-header { padding: 16px; }
  .vru-content,.vru-usage-content { padding: 14px 16px 18px; }
  .vru-footer { padding: 11px 16px; }
  .vru-workspace { grid-template-columns: minmax(0,1fr); }
  .vru-document { position: static; }
  .vru-preview { min-height: 190px; max-height: 320px; }
  .vru-preview img { max-height: 320px; }
  .vru-pdf-frame { height: min(48dvh,320px); min-height: 190px; }
  .vru-budget-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .vru-budget-actions { justify-items: start; }
}
@media(max-width:480px) {
  .vru-header { gap: 10px; padding: 13px; }
  .vru-mark { flex-basis: 38px; height: 38px; }
  .vru-heading h2 { font-size: 16px; }
  .vru-heading p { font-size: 10px; }
  .vru-content,.vru-usage-content { gap: 11px; padding: 12px; }
  .vru-step-line { gap: 6px; }
  .vru-step { gap: 4px; font-size: 9px; }
  .vru-source { align-items: flex-start; flex-direction: column; }
  .vru-file-button { width: 100%; }
  .vru-fields,.vru-people,.vru-usage-summary { grid-template-columns: minmax(0,1fr); }
  .vru-wide { grid-column: auto; }
  .vru-footer { flex-direction: column-reverse; padding: 10px 12px; }
  .vru-footer .vru-button { width: 100%; }
  .vru-budget-row { grid-template-columns: minmax(0,1fr); }
  .vru-budget-actions { justify-items: stretch; }
  .vru-budget-actions .vru-button { width: 100%; }
  .vru-table-wrap table { min-width: 610px; }
}
@media(prefers-reduced-motion:reduce) {
  .vru-button { transition: none; }
  .vru-button:hover:not(:disabled) { transform: none; }
}
