/* Shared courier Web / Android 205: one inset owner, restrained depth +15%, corners -20%. */
:root,
:root[data-theme="dark"] {
  --bg: #071b26;
  --bg2: #081e2b;
  --surface: #0c2737;
  --surface2: #112f41;
  --surface3: #18394b;
  --line: #294758;
  --text: #f0f5fa;
  --sub: #afc3d2;
  --muted: #8ca6b8;
  --orange: #ff9a3c;
  --warm: #ff9a3c20;
  --shadow: 0 2px 3px rgba(0, 0, 0, 0.09470588235294117), 0 5px 12px rgba(0, 0, 0, 0.09470588235294117);
  --bb-card-radius: 7.2px;
  --bb-footer-height: 70px;
  --bb-safe-bottom: env(safe-area-inset-bottom, 0px);
}
:root[data-theme="light"] {
  --bg: #f3f6fa;
  --bg2: #edf2f8;
  --surface: #ffffff;
  --surface2: #f4f7fb;
  --surface3: #eaf0f7;
  --line: #d5e1ee;
  --text: #14283b;
  --sub: #5e7389;
  --muted: #7a8da2;
  --orange: #ed8224;
  --warm: #fff1e5;
  --shadow: 0 1px 2px rgba(21, 51, 78, 0.07215686274509803), 0 4px 10px rgba(21, 51, 78, 0.0496078431372549);
}
/* Native root padding owns system bars and keyboard; PWA keeps browser safe areas. */
:root[data-native-safe-insets="true"] { --bb-safe-bottom: 0px; }
html, body { background: var(--bg); }
body { color: var(--text); }

/* One surface language for Home, deliveries, ranking, profile and subpages. */
body :is(.card, .metric, .empty, .notice-panel, .queue-location,
  .bb-profile-panel, .bb-ranking-list, .bb-evolution, .bb-week-position,
  .bb-rank-stats > div, .bb-action-card, .bb-banner-action, .bb-rank-tile,
  .bb-profile-collapsible, .bb-performance-panel, .bb-support-info,
  .bb-route-control, .bb-delivery-wait, .bb-route-optimizer,
  .v122-link, .v122-kpis > div, .v122-row, .v122-slot,
  .v127-ranking-list, .v127-community-card, .v127-commission,
  .v127-entity, .v127-store-card, .v127-operation > div,
  .v127-rank-kpis > div, .v127-schedule-kpis > div, .v127-evolution,
  .v126-orders-summary,
  .v128-pix, .v128-withdraw-summary, .v128-statement-kpis > div,
  .v128-statement-days, .v128-movement, .v128-queue-position,
  .v128-queue-map, .v128-channels button, .profile-field,
  .leaderboard, .quick, .bb-registration-result) {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--bb-card-radius);
  box-shadow: var(--shadow);
}
/* Rows inside an existing surface stay flat; they are not nested cards. */
body :is(.bb-profile-panel, .bb-profile-collapsible, .card) > .v122-row,
body .v127-ranking-list .v127-ranking-row,
body .v128-statement-days > button {
  background: transparent;
  box-shadow: none;
  border-width: 0 0 1px;
  border-radius: 0;
}
body .card.orange,
body :is(.v128-wallet-balance, .v128-statement-total) {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--bb-card-radius);
  box-shadow: var(--shadow);
}
body .card.orange :is(.overline, .subtext),
body :is(.v128-wallet-balance, .v128-statement-total) > :is(small, span) { color: var(--sub); }
body .card.orange .wallet-balance,
body :is(.v128-wallet-balance, .v128-statement-total) > strong { color: var(--orange); }
body :is(.bb-ranking-hero, .bb-profile-hero, .v127-clan-hero, .v127-rank-top, .v128-finance-hero) {
  border-radius: var(--bb-card-radius);
  box-shadow: var(--shadow);
}
body .modal,
body #courierWorkspaceDialog {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9.6px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.24352941176470588);
  color: var(--text);
}
body .modal::backdrop { background: #07131d83; backdrop-filter: blur(3px); }
body :is(.bb-dialog-grid button, .v122-choices button, .v128-recovery-help summary) {
  background: var(--surface2);
  border: 1px solid var(--line);
  border-radius: 6.4px;
  box-shadow: none;
}
body :is(.v122-link, .v122-slot, .v128-movement) { transition: background-color 140ms ease, border-color 140ms ease; }
body :is(.primary, .soft, .outline, .small-button, .route-btn, .bb-tool, .bb-back) {
  border-radius: 5.6px;
  box-shadow: none;
}
body :is(.soft, .outline, .small-button, .route-btn, .bb-tool, .bb-back) {
  background: var(--surface);
  border-color: var(--line);
}
body :is(input, select, textarea) { border-color: var(--line); border-radius: 5.6px; }
body :is(input, select, textarea):focus { outline: 2px solid var(--orange); outline-offset: 1px; }
body :is(.bb-action-icon, .bb-rank-icon) {
  background: var(--warm);
  color: var(--orange);
  border: 0;
  border-radius: 6.4px;
  box-shadow: none;
}
body :is(.v122-choices button, .v122-slot).selected {
  border-color: var(--line);
  background: var(--surface2);
  box-shadow: inset 3px 0 0 var(--orange);
}

/* Home: 2.05 / 0.85 preserves banner width and reduces height by 15%. */
body .bb-home .bb-banner { aspect-ratio: 2.411764706; border-radius: 7.2px; }
body .bb-home .bb-banner a { display: block; width: 100%; height: 100%; }
body .bb-home .bb-banner img { display: block; width: 100%; height: 100%; max-height: none; object-fit: fill; }
body .bb-home .bb-dots { margin: 9px 0 13px; }
body .bb-online-switch.v126-home-online {
  margin: 3px 0 14px auto;
  min-height: 34px;
  height: auto;
  padding: 6px 9px;
  gap: 10px;
  max-width: 100%;
  box-shadow: none;
}
body .v126-home-online b { font-size: 11px; }
/* Switch track/knob both exactly 1.2 times the previous 24x14 / 10px. */
body .v126-home-online .bb-switch-track { width: 28.8px; height: 16.8px; flex-shrink: 0; }
body .v126-home-online .bb-switch-track i { width: 12px; height: 12px; top: 2.4px; left: 2.4px; }
body .v126-home-online.online .bb-switch-track i { transform: translateX(12px); }
body .bb-home-unified .bb-performance-panel { box-shadow: var(--shadow); }
body .bb-week-position.v127-rank-position { background: var(--surface); }
body .v126-home-orders { border: 1px solid transparent; border-radius: 6.4px; box-shadow: 0 2px 6px rgba(20, 44, 67, 0.07215686274509803); }
body .bb-home .bb-title { margin-top: 22px; margin-bottom: 12px; }
body .bb-action-card { min-height: 86px; }
body .bb-version { margin-bottom: 0; }

/* Vacancy offers share the card language; delivery offers keep their own flow. */
body .bb-shift-invite204 { padding: 18px; width: calc(100% - 28px); max-width: 420px; max-height: 88dvh; overflow-y: auto; }
.bb-shift-invite204__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.bb-shift-invite204__header h2, .bb-shift-invite204__header h3 { margin: 0; font-size: 18px; }
.bb-shift-invite204__details { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 9px 14px; margin: 16px 0; padding: 14px; background: var(--surface2); border-radius: 6.4px; }
.bb-shift-invite204__details dt { color: var(--sub); font-size: 12px; }
.bb-shift-invite204__details dd { margin: 0; color: var(--text); font-size: 13px; overflow-wrap: anywhere; }
.bb-shift-invite204__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.bb-shift-invite204__actions > button { flex: 1; min-height: 44px; }
.bb-shift-invite204__error { color: var(--red); font-size: 12px; line-height: 1.5; }
.bb-shift-pending204 { display: inline-flex; align-items: center; padding: 4px 8px; font-size: 10px; color: var(--orange); background: var(--warm); border-radius: 4.8px; }
.bb-shift-presentation204 { display: grid; gap: 7px; font-size: 12px; color: var(--sub); margin: 12px 0; }
.bb-shift-presentation204 input { width: 100%; }
.bb-shift-invites204 { margin: 15px 0; }
.bb-shift-invites204 > header { margin-bottom: 10px; }
.bb-shift-invites204 .card { padding: 13px; }

/* Docked bottom bar: no floating gap, enough scrolling space for the last card. */
body #shell { transform: none; filter: none; perspective: none; }
body .main-content,
body[data-view] .main-content {
  padding-bottom: calc(var(--bb-footer-height) + 24px + var(--bb-safe-bottom));
  scroll-padding-bottom: calc(var(--bb-footer-height) + 20px + var(--bb-safe-bottom));
}
body #shell > .tabbar {
  position: fixed;
  top: auto;
  bottom: 0;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 100%;
  max-width: 600px;
  min-height: calc(var(--bb-footer-height) + var(--bb-safe-bottom));
  margin: 0;
  padding: 4px 8px calc(5px + var(--bb-safe-bottom));
  background: var(--surface);
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: 0 -2px 12px rgba(20, 44, 67, 0.07215686274509803);
  backdrop-filter: none;
  z-index: 11;
}
body #shell > .tabbar .tab { min-height: 58px; padding: 4px 2px 7px; }
body #shell > .tabbar .tab::after { bottom: 0; }
@media (min-width: 760px) { body #shell > .tabbar { max-width: 460px; } }
@media (prefers-reduced-motion: reduce) { body :is(.v122-link, .v122-slot, .v128-movement) { transition: none; } }

/* Recent isolated components: reduce surface corners without changing circles or pins. */
body .bb-rank-refresh-button203 { border-radius: 8px; }
body .bb-rank-loading203 > span:last-child { border-radius: 6.4px; }
body dialog.bb-offer196 { border-radius: 9.6px; box-shadow: 0 18px 70px rgba(0, 0, 0, 0.46); }
body .bb-offer196-icon, body .bb-offer196-actions button { border-radius: 7.2px; }
body .bb-offer196-metrics { border-radius: 8px; }
body .bb-map204 { border-radius: 6.4px; }
body .bb-map204-controls button { border-radius: 4.8px; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15333333333333332); }
body .bb-map204-legend { border-radius: 4px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15333333333333332); }
body .bb-map204-caption { border-radius: 3.2px; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15333333333333332); }
/* The full-screen map also inherits the single inset owner. */
#courierWorkspaceDialog.bb-delivery-fullscreen204 .bb-map204-caption { bottom: calc(28px + var(--bb-safe-bottom)); }
#courierWorkspaceDialog.bb-delivery-fullscreen204 .bb-map204-credit { padding-bottom: calc(3px + var(--bb-safe-bottom)); }
