/* The companion experience is isolated from the administrative workspace. */
.companion-mode { background: #f3f6fb; }
.companion-shell { --companion-blue: #17458f; --companion-gold: #f7a81b; min-height: 100vh; min-height: 100dvh; max-width: 720px; margin: 0 auto; background: #f3f6fb; color: #20334c; }
.companion-shell *, .companion-mode dialog * { min-width: 0; }
.companion-shell a, .companion-shell button, .companion-mode dialog button { -webkit-tap-highlight-color: transparent; }
.companion-shell button, .companion-shell a.button, .companion-mode dialog button { min-height: 48px; min-width: 44px; border-radius: 12px; line-height: 1.35; white-space: normal; }
.companion-shell a.button { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .8rem 1rem; background: var(--companion-blue); color: #fff; text-align: center; font-weight: 700; text-decoration: none; border: 1px solid var(--companion-blue); }
.companion-shell a.button.secondary { color: var(--companion-blue); background: #fff; border-color: #cbd7e7; }
.companion-shell button:not(.secondary) { background: var(--companion-blue); border-color: var(--companion-blue); }
.companion-shell a:focus-visible, .companion-shell button:focus-visible, .companion-shell input:focus-visible, .companion-shell select:focus-visible, .companion-shell textarea:focus-visible { outline: 3px solid #a56400; outline-offset: 3px; }
.companion-shell h1, .companion-shell h2, .companion-shell h3, .companion-shell p, .companion-shell dd { overflow-wrap: anywhere; }
.companion-shell h1 { font-size: 1.65rem; line-height: 1.25; }
.companion-shell h2 { font-size: 1.13rem; line-height: 1.35; margin: .35rem 0 .65rem; }
.companion-shell h3 { font-size: 1.05rem; line-height: 1.35; margin: .25rem 0; }
.companion-shell p { line-height: 1.55; }
.companion-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding: calc(1rem + env(safe-area-inset-top, 0px)) max(1rem, env(safe-area-inset-right, 0px)) 1rem max(1rem, env(safe-area-inset-left, 0px)); background: #fff; border-bottom: 1px solid #dce5f0; }
.companion-header > a { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--companion-blue); min-height: 44px; }
.companion-header strong { display: block; font-size: .95rem; letter-spacing: .04em; }
.companion-header small { display: block; margin-top: .15rem; font-size: .72rem; color: #50647a; }
.companion-brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--companion-blue); background: #fff1d1; font-weight: 850; font-size: 1.45rem; }
.companion-profile { color: #51677c; font-size: .74rem; }
.companion-content { padding: 1.2rem max(1rem, env(safe-area-inset-right, 0px)) calc(7rem + env(safe-area-inset-bottom, 0px)) max(1rem, env(safe-area-inset-left, 0px)); }
.companion-content:focus { outline: none; }
.companion-pagehead { margin: .4rem 0 1.3rem; }
.companion-pagehead > p { margin: .55rem 0 0; color: #51677c; font-size: .96rem; }
.companion-skip { position: fixed; top: -8rem; left: 1rem; z-index: 50; padding: 1rem; background: #fff; }
.companion-skip:focus { top: 1rem; }
.companion-bottom-nav { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%, 720px); z-index: 20; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: .4rem max(.35rem, env(safe-area-inset-right, 0px)) calc(.4rem + env(safe-area-inset-bottom, 0px)) max(.35rem, env(safe-area-inset-left, 0px)); border-top: 1px solid #d4deeb; background: #fff; box-shadow: 0 -4px 20px #123b6609; }
.companion-bottom-nav > a { display: grid; justify-items: center; align-content: center; gap: .2rem; min-height: 58px; border-radius: 12px; color: #566a81; font-size: .77rem; font-weight: 650; text-decoration: none; }
.companion-bottom-nav > a[aria-current="page"] { background: #edf3fc; color: #17458f; box-shadow: inset 0 -3px var(--companion-gold); }
.companion-bottom-nav svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.companion-shell .companion-sell { width: 100%; min-height: 56px; margin: 0 0 1.2rem; font-size: 1.1rem; box-shadow: 0 5px 13px #17458f16; }
.companion-sell > span { font-size: 1.55rem; line-height: 1; }
.companion-card { padding: 1.1rem; margin: 0 0 1rem; border: 1px solid #dce5f0; border-radius: 17px; background: #fff; box-shadow: 0 3px 12px #173c6504; }
.companion-card-list { display: grid; gap: 1rem; }
.companion-card-list .companion-card { margin: 0; }
.companion-card-heading { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: .6rem; }
.companion-card-heading > div { flex: 1 1 150px; }
.companion-card-heading h2 { margin-top: 0; }
.companion-section-title { margin: 1.7rem 0 .65rem; align-items: center; }
.companion-section-title > a { display: inline-flex; align-items: center; min-height: 44px; padding: .45rem; font-weight: 650; }
.companion-eyebrow { display: block; font-size: .76rem; line-height: 1.4; color: #566c84; font-weight: 750; letter-spacing: .02em; margin-bottom: .3rem; }
.companion-status { display: inline-block; max-width: 100%; padding: .4rem .65rem; border-radius: 20px; color: #284666; background: #edf3f9; font-size: .76rem; font-weight: 700; line-height: 1.4; overflow-wrap: anywhere; }
.companion-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem .9rem; margin: 1rem 0; }
.companion-facts > div { display: grid; align-content: start; gap: .3rem; }
.companion-facts dt { font-size: .78rem; line-height: 1.4; color: #5a6e85; }
.companion-facts dd { margin: 0; font-size: .93rem; line-height: 1.4; font-weight: 650; }
.companion-campaign { font-size: .86rem; color: #51677c; margin: .5rem 0; }
.companion-help { font-size: .84rem; color: #51677c; margin: .75rem 0 1.1rem; }
.companion-remittance { background: #fffcf3; border-color: #ead9ae; }
.companion-amount { color: #644600; font-size: 1.35rem; overflow-wrap: anywhere; }
.companion-empty { text-align: center; color: #52677e; padding: 1.7rem 1rem; }
.companion-empty p { margin: .3rem 0 .8rem; }
.companion-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.companion-actions > a, .companion-actions > button { flex: 1 1 130px; }
.companion-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin: 0 0 1rem; }
.companion-toggle { display: flex; align-items: center; gap: .6rem; min-height: 48px; font-size: .86rem; line-height: 1.4; }
.companion-toggle input { width: 22px; height: 22px; flex-shrink: 0; }
.companion-pagination { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; margin: 1.2rem 0; }
.companion-pagination > span { padding: .4rem; font-size: .85rem; color: #566b80; }
.companion-footer-actions { display: flex; justify-content: center; margin: 1.5rem 0 .7rem; }
.companion-updated { color: #63758a; font-size: .76rem; text-align: center; margin: 1.1rem 0 .25rem; }
.companion-reservation h2 { color: #17458f; font-size: 1.55rem; letter-spacing: .06em; }
.companion-mode dialog { width: min(620px, calc(100vw - 1.4rem)); max-height: calc(100dvh - 2rem); padding: 1.1rem; border-radius: 18px; }
.companion-mode dialog .dialog-head button { min-width: 44px; min-height: 44px; }
.companion-mode dialog label, .companion-cancel-form { display: grid; gap: .65rem; }
.companion-mode dialog textarea { width: 100%; }
.companion-mode dialog .keyvalue { grid-template-columns: minmax(0, 1fr); }
.companion-mode dialog .keyvalue dd { margin: 0 0 .65rem; }
.companion-shell .digital-shell, .companion-shell .digital-form, .companion-shell .digital-result, .companion-shell .account-card { width: 100%; max-width: 100%; }
.companion-shell .digital-form, .companion-shell .digital-form form, .companion-shell .form-grid { grid-template-columns: minmax(0, 1fr); }
.companion-shell label { overflow-wrap: anywhere; }
.companion-shell input:not([type="checkbox"]):not([type="radio"]), .companion-shell select, .companion-shell textarea { width: 100%; max-width: 100%; min-height: 48px; font-size: 16px; }
.companion-shell .digital-methods { grid-template-columns: minmax(0, 1fr); }
.companion-shell .digital-actions { position: static; margin: 1rem 0; background: transparent; gap: .65rem; }
.companion-shell .digital-actions button { flex: 1 1 120px; }
.companion-shell .digital-number-grid { grid-template-columns: minmax(0, 1fr); }
.companion-shell .digital-summary, .companion-shell .price-summary { padding: 1rem; border-radius: 15px; }
.companion-shell .digital-shell .price-summary .price-grid { grid-template-columns: minmax(0, 1fr); }
.companion-shell .price-grid > div { display: flex; justify-content: space-between; align-items: center; gap: .7rem; padding: .85rem; }
.companion-shell .price-grid strong { font-size: 1.2rem; }
.companion-shell .mobile-sale-progress { margin-bottom: 1.3rem; }
.companion-shell .mobile-sale-progress > p { font-size: .95rem; color: #51677c; margin: .3rem 0 .85rem; }
.companion-shell .mobile-sale-progress ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); list-style: none; gap: .35rem; padding: 0; margin: 0; }
.companion-shell .mobile-sale-progress li { display: grid; justify-items: center; align-content: start; gap: .4rem; color: #536b86; font-size: .75rem; line-height: 1.3; text-align: center; overflow-wrap: anywhere; border-bottom: 3px solid #d9e3ef; padding-bottom: .6rem; }
.companion-shell .mobile-sale-progress li span:first-child { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #e9f0f8; font-size: .85rem; font-weight: 750; }
.companion-shell .mobile-sale-progress li[aria-current="step"] { color: #17458f; font-weight: 750; border-color: #f7a81b; }
.companion-shell .mobile-sale-progress li[aria-current="step"] span:first-child { background: #17458f; color: #fff; }
.companion-shell .mobile-selected-campaign { padding: .8rem; border-radius: 12px; background: #eaf2fc; color: #17458f; font-weight: 650; }
.companion-shell .living-carne { width: 100%; max-width: 100%; box-shadow: none; border-radius: 18px; }
.companion-shell .living-body { padding: 1rem; gap: 1.2rem; }
.companion-shell .living-body section { min-width: 0; }
.companion-shell .living-installments, .companion-shell .living-actions { grid-template-columns: minmax(0, 1fr); }
.companion-shell .living-next { padding: 1rem; }
.companion-shell .living-amounts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.companion-shell .living-timeline li { grid-template-columns: minmax(0, 1fr); gap: .45rem; }
.companion-shell .keyvalue, .companion-shell .living-acquisition { grid-template-columns: minmax(0, 1fr); gap: .3rem; }
.companion-shell .keyvalue dd, .companion-shell .living-acquisition dd { margin: 0 0 .65rem; }
.companion-shell .account-card { padding: 1.1rem; margin-bottom: 1rem; }
.companion-shell .table-wrap:has(.companion-reflow-table) { overflow: visible; background: transparent; border: 0; }
.companion-shell .companion-reflow-table, .companion-shell .companion-reflow-table tbody, .companion-shell .companion-reflow-table tr { display: block; min-width: 0; width: 100%; }
.companion-shell .companion-reflow-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.companion-shell .companion-reflow-table tr { border: 1px solid #dbe3ed; border-radius: 12px; padding: .8rem; margin-bottom: .8rem; background: #fff; }
.companion-shell .companion-reflow-table td { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); gap: .65rem; padding: .6rem .1rem; min-width: 0; overflow-wrap: anywhere; }
.companion-shell .companion-reflow-table td::before { content: attr(data-mobile-label); font-size: .8rem; font-weight: 650; color: #52677d; }
.companion-shell .companion-reflow-table td:last-child { border-bottom: 0; }
@media (min-width: 620px) {
  .companion-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .companion-shell .mobile-sale-progress li { font-size: .79rem; }
  .companion-content { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (max-width: 380px) {
  .companion-header { padding-left: .85rem; padding-right: .85rem; }
  .companion-profile { width: 100%; padding-left: 3.2rem; }
  .companion-content { padding-left: .85rem; padding-right: .85rem; }
  .companion-card { padding: .95rem; }
  .companion-shell .living-amounts { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  .companion-bottom-nav, .companion-header, .companion-actions, .companion-sell { display: none; }
  .companion-content { padding: 0; }
}
.companion-shell .companion-upcoming { list-style: none; padding: 0; margin: .5rem 0 0; }
.companion-shell .companion-upcoming li + li { border-top: 1px solid #dbe3ed; }
.companion-shell .companion-upcoming a { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding: .9rem 0; text-decoration: none; min-height: 48px; }
.companion-shell .companion-upcoming small { display: block; margin-top: .3rem; font-size: .8rem; }
.companion-mode dialog .companion-facts dd, .companion-mode dialog .companion-facts dt { overflow-wrap: anywhere; }
.companion-mode dialog .companion-deliveries { padding-left: 1.2rem; }
.companion-mode dialog .companion-deliveries li { padding: .6rem 0; }

/* Keep the payment action above the application navigation by using normal flow. */
.companion-shell .installment-summary { position: static; }
.companion-mode dialog input:not([type="checkbox"]):not([type="radio"]), .companion-mode dialog select { min-height: 48px; width: 100%; font-size: 16px; }
@media (max-width: 430px) {
  /* The current step remains fully visible above the numbered progress. */
  .companion-shell .mobile-sale-progress li > span:last-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
