:root {
    --ikwik-primary: #009F77;
    --ikwik-secondary: #FFFFFF;
    --ikwik-ink: #16332C;
    --ikwik-muted: #61746E;
    --ikwik-surface: #F5F8F7;
}

body {
    background: var(--ikwik-surface);
    color: var(--ikwik-ink);
}

/* Keep every form hint in the recognizable ikWik brand color. */
input::placeholder,
textarea::placeholder,
select::placeholder,
.form-control::placeholder {
    color: var(--ikwik-primary) !important;
    opacity: 1;
}

.home-hero { position: relative; overflow: hidden; isolation: isolate; border-radius: 16px; min-height: 260px; background: #17382d; display: flex; align-items: flex-end; }
.home-hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 65% 45%; z-index: -2; }
.home-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(8, 22, 17, .94), rgba(8, 22, 17, .36) 60%, rgba(8, 22, 17, .08)); }
.home-hero-copy { padding: 24px; max-width: 420px; color: #fff; }
.home-hero-eyebrow { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.home-hero-copy h1, .home-hero-copy h2 { color: #fff; font-size: 30px; line-height: 1.12; margin-bottom: 10px; letter-spacing: -.7px; }
.home-hero-copy p { color: #fff; max-width: 235px; margin: 0; font-size: 15px; line-height: 1.5; }
.home-action { color: inherit; text-decoration: none; border-radius: var(--ikwik-radius-panel); border: 1px solid rgba(0, 0, 0, .035); box-shadow: none; }
.home-action-send { background: #f5eee4; --home-art-color: #ad6c25; --home-art-surface: #eddbbf; }
.home-action-carry { background: #eaf0f7; --home-art-color: #416994; --home-art-surface: #d4e1f1; }
.home-action-work { background: #e6f2ec; --home-art-color: var(--ikwik-primary); --home-art-surface: #cce6d9; }
.home-action-earnings { background: #f0ebfb; --home-art-color: #7041bd; --home-art-surface: #e2d7f8; }
.home-action-earnings .home-action-art { width: 84px; height: 84px; }
.home-action-earnings .home-action-icon { font-size: 56px; }
.home-action .card-body { padding: 22px 10px; }
.home-action-art { display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 14px; background: var(--home-art-surface); transform: rotate(-6deg); }
.home-action .home-action-icon {
    display: block; font-size: 48px; color: var(--home-art-color); transform: rotate(6deg); filter: drop-shadow(0 5px 2px rgba(0, 0, 0, .12));
}
.home-action h2 { margin-bottom: 6px; font-size: 18px; }
.home-action p { margin: 0; font-size: 14px; color: var(--ikwik-muted); }
.home-action:hover { color: inherit; }
.home-action:active { transform: scale(.98); }
.home-action:focus-visible { outline: 3px solid var(--ikwik-primary); outline-offset: 3px; }
.email-otp-illustration { display: flex; justify-content: center; margin: 2px 0 22px; }
.email-otp-illustration .home-action-art { display: flex; width: 76px; height: 76px; align-items: center; justify-content: center; border-radius: 24px; margin: 0; background: #cce6d9; transform: rotate(-6deg); }
.email-otp-illustration .home-action-icon { display: block; font-size: 48px; color: var(--ikwik-primary); transform: rotate(6deg); filter: drop-shadow(0 5px 2px rgba(0, 0, 0, .12)); }
.auth-choice-divider { margin: 26px 0; text-align: center; color: var(--ikwik-ink); font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.6px; }
.journey-list-item .in::after { display: none !important; }
/* Work reuses home-sized art; balance tiles use the same treatment at compact scale. */
.work-enroll { padding: 0; font: inherit; cursor: pointer; }
.work-enroll .card-body { display: block; width: 100%; }
.work-tile-title { display: block; margin-bottom: 6px; font-size: 18px; font-weight: 700; }
.work-tile-subtitle { display: block; font-size: 14px; color: var(--ikwik-muted); }
.earnings-balances .earnings-balance { background: transparent; min-width: 0; }
.earnings-balances .earnings-balance .card-body { padding: 14px 4px; width: 100%; }
.earnings-balances .home-action-art { width: 42px; height: 42px; border-radius: 10px; margin-bottom: 12px; }
.earnings-balances .home-action-icon { font-size: 25px; }
.earnings-balance-label { font-size: 10px; font-weight: 600; text-transform: uppercase; overflow-wrap: anywhere; }
.earnings-balance-amount { display: block; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.earnings-balance-heading small { font-size: inherit; font-weight: inherit; text-transform: uppercase; }
.payout-country-flag { object-fit: contain; vertical-align: middle; }
.payout-profile-remove { background: transparent; border: 0; width: 40px; height: 40px; padding: 0; }
.payout-profile-remove ion-icon { font-size: 21px; }
.earnings-balance-available { --home-art-color: #007b59; --home-art-surface: #d5f1e5; }
.earnings-balance-pending { --home-art-color: #995700; --home-art-surface: #ffedc4; }
.earnings-balance-processing { --home-art-color: #7041bd; --home-art-surface: #eee3ff; }
.earnings-balance-paid { --home-art-color: #176caf; --home-art-surface: #deefff; }
.earnings-balance-other { --home-art-color: #555555; --home-art-surface: #e9e9e9; }
.home-steps { list-style: none; padding: 0; margin: 18px 0 0; }
.home-steps li { display: flex; gap: 14px; padding-bottom: 20px; }
.home-step-number { flex: 0 0 34px; height: 34px; border-radius: 50%; background: #e1ece7; color: #245c46; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; }
.home-steps h3 { font-size: 16px; margin: 0 0 5px; }
.home-steps p { font-size: 14px; line-height: 1.5; margin: 0; color: var(--ikwik-muted); }
body.dark-mode-active .home-action { background: #292929; border-color: #383838; }
body.dark-mode-active .home-action-send { --home-art-surface: #423425; --home-art-color: #edb669; }
body.dark-mode-active .home-action-carry { --home-art-surface: #363636; --home-art-color: #d3d3d3; }
body.dark-mode-active .home-action-work { --home-art-surface: #253e32; --home-art-color: #70d5a5; }
body.dark-mode-active .home-action-earnings { --home-art-surface: #372d50; --home-art-color: #c6adff; }
body.dark-mode-active .home-step-number { background: #292929; color: #fff; }
@media (min-width: 768px) {
    .home-hero { min-height: 300px; align-items: center; }
    .home-hero::before { background: linear-gradient(90deg, rgba(8, 22, 17, .9), rgba(8, 22, 17, .1)); }
    .home-hero-copy { padding: 36px; }
    .home-hero-copy h1, .home-hero-copy h2 { font-size: 38px; }
    .home-steps { display: flex; gap: 24px; }
    .home-steps li { flex: 1; }
}

/* Compact inner-page variant of the home hero. Content can grow with text zoom. */
.home-hero.page-hero { min-height: 150px; align-items: center; }
.page-hero .home-hero-image { object-position: 65% 48%; }
.page-hero::before { background: linear-gradient(90deg, rgba(8, 22, 17, .92), rgba(8, 22, 17, .52)); }
.page-hero .home-hero-copy { padding: 20px; max-width: 430px; }
.page-hero .home-hero-copy h1 { color: #fff; font-size: 28px; line-height: 1.15; margin: 0 0 8px; letter-spacing: -.6px; overflow-wrap: anywhere; }
.page-hero .home-hero-copy p { max-width: 245px; }
@media (min-width: 768px) {
    .home-hero.page-hero { min-height: 170px; }
    .page-hero .home-hero-copy { padding: 24px; }
    .page-hero .home-hero-copy h1 { font-size: 32px; }
}

/* Neutral dark form surfaces, including carrier fields and native selects. */
body.dark-mode-active .form-control,
body.dark-mode-active .custom-select,
body.dark-mode-active .form-select {
    background-color: #1a1a1a !important;
    color: #ffffff;
}

/* Reuse MobileKit listview/forms with small account-specific layout overrides. */
.account-settings .listview.inset { margin: 0; }
.notification-settings-card { margin: 0; }

/* Unified operational/financial activity feed. The larger tap targets match
   MobileKit list rows while letting the status remain scannable on one line. */
.activities-list .item { padding-top: 15px; padding-bottom: 15px; }
.activities-list .icon-box { width: 54px; height: 54px; min-width: 54px; margin-right: 14px; font-size: 28px; }
.activities-list .in { min-height: 54px; }
.activities-list footer { margin-top: 4px; color: var(--bs-secondary-color, #6c757d); font-size: .82rem; }
.activities-list .activity-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.activities-list .activity-summary { flex: 1 1 140px; min-width: 0; }
.activities-list .badge { flex: 0 0 auto; margin-left: 0; white-space: nowrap; }
/* A long lifecycle state cannot share a narrow mobile row with the chevron.
   Keep it readable by moving only the badge below the activity summary. */
@media (max-width: 390px) {
    .activities-list .activity-row { flex-wrap: wrap; gap: 6px 10px; }
    .activities-list .activity-row .badge { margin-left: 0; }
}

/* Anchor targets must clear the fixed MobileKit header when opened from Activities. */
[id^="earnings"], [id^="payout-"] { scroll-margin-top: 78px; }
.account-settings .account-field, .account-logout { width: 100%; min-width: 0; }
.account-settings .in { min-width: 0; }
.account-settings .account-email { overflow-wrap: anywhere; min-width: 0; }
.account-copy-badge { border: 0; flex-shrink: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.account-copy-badge:focus-visible { outline: 2px solid var(--ikwik-primary); outline-offset: 3px; }
.account-copy-fallback { position: fixed; top: 0; left: -9999px; }
.account-settings .form-group.basic { padding: 8px 0; }
/* Keep MobileKit's understated field underline, not the extra rectangular ring. */
.account-settings .form-control:focus {
    outline: none !important;
    box-shadow: none !important;
    border-color: var(--ikwik-primary) !important;
}
.account-list-button {
    width: 100%; border: 0; background: transparent; color: inherit;
    text-align: left; font: inherit;
}
.account-settings .form-switch { position: relative; flex: 0 0 56px; }
.account-settings .form-switch .form-check-input {
    display: block; position: absolute; opacity: 0; width: 56px; height: 30px;
    margin: 0; z-index: 4; cursor: pointer;
}
.account-settings .form-check-input:focus-visible ~ .form-check-label {
    outline: 2px solid var(--ikwik-primary); outline-offset: 4px; border-radius: 20px;
}
.account-settings .form-check-input:checked ~ .form-check-label:after {
    background-color: var(--ikwik-primary); border-color: var(--ikwik-primary) !important;
}
body.dark-mode-active {
    --ikwik-surface: #1a1a1a;
    --ikwik-ink: #ffffff;
    --ikwik-muted: #b0b0b0;
    background: var(--ikwik-surface); color: var(--ikwik-ink);
}
body.dark-mode-active .account-settings .text-muted,
body.dark-mode-active .account-settings .listview-title { color: var(--ikwik-muted) !important; }
body.dark-mode-active #account-kyc .modal-content { background: #292929; color: #ffffff; }
body.dark-mode-active #account-kyc .btn-close { filter: invert(1); }

.bg-primary,
.btn-primary,
.badge-primary {
    background-color: var(--ikwik-primary) !important;
    border-color: var(--ikwik-primary) !important;
}

.text-primary,
.btn-link,
.btn-outline-primary {
    color: var(--ikwik-primary) !important;
}

.btn-outline-primary {
    border-color: var(--ikwik-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background: var(--ikwik-primary) !important;
    color: var(--ikwik-secondary) !important;
}

.brand-logo {
    display: block;
    width: auto;
    max-width: 112px;
    max-height: 30px;
    object-fit: contain;
}

.hero-card {
    border: 0;
    background: linear-gradient(145deg, #FFFFFF 0%, #EAF7F2 100%);
}

.hero-logo {
    display: block;
    width: auto;
    max-width: 152px;
    max-height: 52px;
    margin: 0 0 24px;
    object-fit: contain;
}

.avatar-circle {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: #EAF7F2;
    color: var(--ikwik-primary);
    font-size: 25px;
}

.appBottomMenu .item.active,
.appBottomMenu .item.active ion-icon,
.appBottomMenu .item:focus-visible {
    color: var(--ikwik-primary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    max-width: 100%;
    padding: 4px 8px;
    border-radius: 999px;
    background: #EAF7F2;
    color: #08775A;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    overflow-wrap: anywhere;
}

.status-badge.status-warning {
    background: #FFF4D8;
    color: #8A5A00;
}

.status-badge.status-danger {
    background: #FDE9E7;
    color: #A83225;
}

.action-card,
.data-card {
    margin-bottom: 12px;
}

.data-card .card-body,
.action-card .card-body {
    padding: 16px;
}

.meta-line {
    margin: 5px 0 0;
    color: var(--ikwik-muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.empty-state {
    padding: 28px 18px;
    text-align: center;
    color: var(--ikwik-muted);
}

.empty-state ion-icon {
    display: block;
    margin: 0 auto 10px;
    color: var(--ikwik-primary);
    font-size: 42px;
}

.inline-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.inline-actions .btn {
    flex: 1 1 120px;
}

.field-error {
    margin: 6px 0 0;
    color: #A83225;
    font-size: 12px;
}

.screen[hidden] {
    display: none !important;
}

#message-region {
    min-height: 0;
}

.app-alert {
    margin: 12px 16px 0;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--ikwik-primary) !important;
    outline-offset: 2px;
}

/* Shared MobileKit geometry; radio circles, switches and joined controls stay native. */
.appHeader .pageTitle .brand-wordmark { color: #fff; font-size: 30px; font-weight: 700; letter-spacing: -1.4px; line-height: 1; }

.not-found-page .app-content,
.maintenance-page .app-content {
  min-height: 100vh;
}

.not-found-page .error-page,
.maintenance-page .error-page {
  padding-top: max(96px, calc(env(safe-area-inset-top) + 72px));
}

.not-found-illustration {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 180px;
  margin-bottom: 18px;
}

.not-found-illustration ion-icon {
  order: 1;
  width: 110px;
  height: 110px;
}

.not-found-illustration span {
  order: 2;
  margin-top: 4px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 2px;
  line-height: 1;
}

.maintenance-illustration {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  margin-bottom: 18px;
}

.maintenance-illustration ion-icon {
  width: 150px;
  height: 150px;
}
.app-content { --ikwik-radius-panel: 10px; --ikwik-radius-control: 5px; }
.app-content .card, .app-content .listview, .app-content .list-group,
.app-content .wide-block { border-radius: var(--ikwik-radius-panel); }
.app-content .listview > :first-child, .app-content .list-group > :first-child,
.app-content .card > .card-header { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.app-content .listview > :last-child, .app-content .list-group > :last-child,
.app-content .card > .card-footer { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.app-content .form-control, .app-content .form-select, .app-content .custom-select,
.app-content .form-group :is(.form-control, .custom-select, .form-select),
.app-content .btn:not(.btn-icon):not(.rounded-pill), .app-content .alert,
.app-content .dropdown-menu { border-radius: var(--ikwik-radius-control); }
.app-content .modal-content { border-radius: var(--ikwik-radius-panel); }
.app-content .modal-header { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.app-content .form-group.basic .form-control, .app-content .form-group.basic .custom-select {
    border: 1px solid #b5b5b5; padding-left: 12px; padding-right: 12px;
}
.app-content .input-group > :not(:first-child) { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.app-content .input-group > :not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
body.dark-mode-active .app-content .form-control,
body.dark-mode-active .app-content .form-group :is(.form-control, .custom-select, .form-select),
body.dark-mode-active .app-content .custom-select,
body.dark-mode-active .app-content .form-select { border-color: #1a1a1a; }
/* Replace Bootstrap's blue glow with the configured brand border. Preserve keyboard focus. */
body .app-content :is(.form-group, .searchbox, .input-group) :is(.form-control, .custom-select, .form-select):focus,
body .app-content :is(.form-control, .custom-select, .form-select):focus {
    border-color: var(--ikwik-primary) !important; outline: none !important; box-shadow: none !important;
}
body .app-content .form-check-input:focus {
    border-color: var(--ikwik-primary) !important; box-shadow: none !important;
    outline: 2px solid var(--ikwik-primary); outline-offset: 2px;
}
.app-content input:is([type="checkbox"], [type="radio"], [type="range"]) { accent-color: var(--ikwik-primary); }
.app-content input:is([type="checkbox"], [type="radio"], [type="range"]):focus-visible {
    outline: 2px solid var(--ikwik-primary); outline-offset: 2px;
}
body .app-content .form-check-input:focus-visible ~ .form-check-label {
    outline: 2px solid var(--ikwik-primary); outline-offset: 3px; border-radius: 6px;
}
body .app-content .form-check-input:checked ~ .form-check-label:after {
    background-color: var(--ikwik-primary) !important; border-color: var(--ikwik-primary) !important;
}
body .app-content .btn:focus, body .app-content .accordion-button:focus {
    box-shadow: none !important;
}

@media (min-width: 768px) {
    #appCapsule {
        max-width: 760px;
        margin: 0 auto;
        box-shadow: 0 0 40px rgba(20, 56, 46, .08);
        min-height: 100vh;
    }

    .appHeader,
    .appBottomMenu {
        width: min(760px, 100%);
        left: 50%;
        transform: translateX(-50%);
    }
}
/* Phase 25: small identity emblem reuses brand colors, not a new component framework. */
.kyc-emblem {
  display: inline-flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  background: rgba(0, 159, 119, .12);
  color: var(--ikwik-primary, #009F77);
  font-size: 34px;
}
.ikwik-suspended-emblem {
  display: inline-flex;
  width: 64px;
  height: 64px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(220, 53, 69, .12);
  color: #dc3545;
  font-size: 36px;
}
/* App-like selection on MobileKit only. Editable/read-only inputs remain copyable. */
body.ikwik-user-app,
body.ikwik-user-app * {
  -webkit-user-select: none;
  user-select: none;
}
body.ikwik-user-app input,
body.ikwik-user-app textarea,
body.ikwik-user-app [contenteditable]:not([contenteditable="false"]),
body.ikwik-user-app [contenteditable]:not([contenteditable="false"]) * {
  -webkit-user-select: text;
  user-select: text;
}
/* Phase 26: one coordinate picker can be attached to any location workflow. */
.location-picker { border: 1px solid rgba(0, 159, 119, .14); box-shadow: none; }
.carrier-status-list { border: 1px solid rgba(0, 159, 119, .14); }
.carrier-manual-location { max-height: 480px; opacity: 1; overflow: hidden; transition: opacity .2s ease, max-height .25s ease, margin .25s ease; }
.carrier-manual-location.is-hidden { max-height: 0; opacity: 0; margin: 0 !important; pointer-events: none; }
.location-picker-actions { display: flex; align-items: stretch; min-width: 0; }
.location-picker-actions .btn { flex: 1 1 0; min-width: 0; padding-left: 6px; padding-right: 6px; white-space: nowrap; }
.location-picker-actions > span { flex: 0 0 auto; }
.location-picker-actions ion-icon { vertical-align: -2px; }
.location-picker-selected { display: flex; align-items: center; gap: 10px; }
.location-picker-selected-icon { color: var(--ikwik-primary); font-size: 30px; line-height: 1; }
.location-picker-selected-copy { display: grid; flex: 1; min-width: 0; }
.location-picker-selected-copy span { color: var(--ikwik-muted); font-size: 13px; overflow-wrap: anywhere; }
.location-picker-message:not(:empty) { margin-top: 12px; }
.location-map-modal-content { overflow: hidden; }
.location-map-wrap { position: relative; height: min(55vh, 420px); background: #f2f5f4; }
#ikwik-location-map { width: 100%; height: 100%; }
.location-map-center-pin { position: absolute; z-index: 1; top: 50%; left: 50%; transform: translate(-50%, -100%); color: var(--ikwik-primary); font-size: 40px; pointer-events: none; filter: drop-shadow(0 2px 2px rgba(0,0,0,.28)); }
.location-map-center-pin:after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 12px; height: 5px; border-radius: 50%; background: rgba(0,0,0,.22); transform: translateX(-50%); }
.location-map-search { border-bottom: 1px solid rgba(0,0,0,.08); background: #fff; }
.location-map-search:focus-within { border-color: var(--ikwik-primary); box-shadow: inset 0 -2px 0 var(--ikwik-primary); }
#ikwik-location-place-search { min-height: 44px; }
#ikwik-location-place-search gmp-place-autocomplete { display: block; width: 100%; }
.location-map-search-status:not(:empty) { margin-top: 8px !important; }
body.dark-mode-active .location-picker, body.dark-mode-active .carrier-status-list, body.dark-mode-active .location-map-wrap { background: #292929; border-color: #383838; }
@media (max-width: 575px) { .location-map-wrap { height: 54vh; } .location-map-modal-content { border-radius: 0; } }
/* Create-delivery wizard: MobileKit's native progress component, with only
   small ikWik presentation refinements. */
.shipment-wizard { overflow: hidden; }
.shipment-wizard .form-wizard-section .button-item { border: 0; background: transparent; }
.shipment-wizard .form-wizard-section .button-item:disabled { cursor: default; opacity: 1; }
.wizard-intro { display: flex; gap: 12px; align-items: center; margin: 2px 0 18px; }
.wizard-intro-icon { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(0,159,119,.12); color: var(--ikwik-primary); font-size: 23px; }
.package-size-options { width: 100%; display: flex; }
.package-size-options .btn { flex: 1 1 auto; padding-left: 4px; padding-right: 4px; }
.shipment-photo-upload { min-height: 146px; }
.shipment-photo-upload label { position: relative; min-height: 146px; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.shipment-photo-upload label small { display: block; margin-top: 7px; color: var(--ikwik-muted); font-style: normal; font-weight: 400; }
.shipment-photo-upload label img { width: 100%; height: 100%; min-height: 146px; object-fit: cover; }
.wizard-note { display: flex; gap: 8px; align-items: flex-start; padding: 12px; margin: 16px 0; border-radius: var(--ikwik-radius-panel); background: rgba(0,159,119,.08); color: var(--ikwik-muted); font-size: 13px; }
.wizard-note ion-icon { flex: 0 0 auto; color: var(--ikwik-primary); font-size: 20px; }
/* Bootstrap modals are appended in the normal document flow. Theme them from
   the same SSR body class/cookie that themes the rest of MobileKit. */
body.dark-mode-active .location-map-modal-content,
body.dark-mode-active .location-map-modal-content .modal-header,
body.dark-mode-active .location-map-modal-content .modal-footer,
body.dark-mode-active .location-map-selection { background: #292929; color: #fff; border-color: #3d3d3d; }
body.dark-mode-active .location-map-modal-content .btn-close { filter: invert(1) grayscale(1) brightness(2); }
body.dark-mode-active .location-map-modal-content .text-muted { color: #b8b8b8 !important; }
body.dark-mode-active .location-map-search { background: #292929; border-color: #3d3d3d; color-scheme: dark; }
.shipment-detail-photo { width: 100%; max-width: 180px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--ikwik-radius-panel); }
.tracking-share-button { align-items: center; justify-content: center; gap: 5px; }
.tracking-share-button ion-icon { display: block; font-size: 16px; }
/* Keep the delivery reference readable: the share action sits below it on the right. */
.d-flex.justify-content-between.align-items-center.mb-2:has(> .tracking-share-button) { align-items: stretch !important; flex-wrap: wrap; }
.d-flex.justify-content-between.align-items-center.mb-2:has(> .tracking-share-button) > h2 { flex: 0 0 100%; }
.d-flex.justify-content-between.align-items-center.mb-2:has(> .tracking-share-button) > .tracking-share-button { margin-top: 8px; margin-left: auto; }
.ikwik-release-qr { display: block; width: fit-content; margin: 0 auto; overflow: hidden; border-radius: 10px; line-height: 0; }
.ikwik-release-qr canvas, .ikwik-release-qr img { display: block; border-radius: 10px; }
/* Full-width MobileKit action sheet camera surface for a deliberate QR scan. */
.journey-qr-camera { position: relative; height: max(300px, calc(50vh - 80px)); background: #111; overflow: hidden; }
.journey-qr-camera video { width: 100%; height: 100%; object-fit: cover; display: block; }
.journey-qr-camera-message { position: absolute; left: 16px; right: 16px; bottom: 20px; text-align: center; color: #fff; background: rgba(0,0,0,.62); border-radius: 5px; padding: 10px; }
/* Paid payout receipts reuse MobileKit's invoice structure while preserving
   a clean white document regardless of the account theme. */
.payout-receipt-page,
.payout-receipt-page #appCapsule,
.payout-receipt-page .app-content { background: #fff !important; color: #141515 !important; }
.payout-receipt-page #appCapsule { max-width: none; margin: 0; box-shadow: none; min-height: 100vh; }
.payout-receipt-page .appHeader { width: 100%; left: 0; transform: none; }
.payout-receipt-toolbar .pageTitle { font-size: 18px; font-weight: 600; }
.payout-receipt-toolbar .right { display: flex; align-items: center; gap: 2px; }
.payout-receipt-toolbar button.headerButton { appearance: none; border: 0; background: transparent; color: inherit; padding: 0; }
.payout-receipt-page .app-content,
.payout-receipt-page .payout-receipt-section { width: 100%; margin: 0 !important; padding: 0 !important; }
.payout-receipt-page .payout-receipt { width: 100%; min-height: calc(100vh - 58px); margin: 0 !important; padding: 34px 24px 24px; border-radius: 0; box-shadow: none; }
.payout-receipt .invoiceBackgroundLogo { width: 90%; left: 5%; top: 51%; }
.payout-receipt .payout-receipt-watermark img { width: 100%; opacity: .055; }
.payout-receipt-logo { color: var(--ikwik-primary); font-size: 28px; font-weight: 700; letter-spacing: -1.2px; line-height: 1; }
.payout-receipt .invoice-id { font-size: 11px; overflow-wrap: anywhere; text-align: right; }
.payout-receipt .invoice-person { position: relative; }
.payout-receipt .invoice-detail { position: relative; overflow: visible; }
.payout-receipt .invoice-detail .table { width: 100%; min-width: 0; margin-bottom: 0; table-layout: fixed; }
.payout-receipt .invoice-detail .table td { vertical-align: top; }
.payout-receipt .invoice-detail .table td:nth-child(2),
.payout-receipt .invoice-detail .table td:nth-child(3) { color: #4f5050; font-size: 10px; font-weight: 500; }
.payout-receipt .invoice-detail .table td { overflow-wrap: anywhere; word-break: normal; }
.payout-receipt .invoice-detail .receipt-detail-table { margin-bottom: 14px; }
.payout-receipt .invoice-detail .receipt-detail-table:last-child { margin-bottom: 0; }
@media (max-width: 480px) {
    .payout-receipt .invoice-detail .table thead { display: none; }
    .payout-receipt .invoice-detail .table,
    .payout-receipt .invoice-detail .table tbody,
    .payout-receipt .invoice-detail .table tr { display: block; width: 100%; }
    .payout-receipt .invoice-detail .table tbody tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px 18px; padding: 12px 0; border-top: 2px solid #141515; border-bottom: 1px solid #e1e1e1; }
    .payout-receipt .invoice-detail .table td,
    .payout-receipt .invoice-detail .table td:nth-child(2),
    .payout-receipt .invoice-detail .table td:nth-child(3) { display: block; min-width: 0; padding: 0 !important; border: 0; color: #141515; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
    .payout-receipt .invoice-detail .table td::before { content: attr(data-label); display: block; margin-bottom: 3px; color: #4f5050; font-size: 10px; font-weight: 600; text-transform: uppercase; }
    .payout-receipt .invoice-detail .table td:last-child { color: var(--ikwik-primary); }
}
.payout-receipt-reference { position: relative; display: flex; flex-direction: column; gap: 3px; margin-top: 18px; color: #4f5050; font-size: 11px; overflow-wrap: anywhere; }
.payout-receipt-reference strong { color: #141515; }
.payout-receipt .invoice-total { position: relative; }
.payout-receipt .invoice-bottom { position: relative; }
@media print {
    body.payout-receipt-page { background: #fff !important; }
    body.payout-receipt-page .appHeader,
    body.payout-receipt-page .appBottomMenu,
    body.payout-receipt-page #loader { display: none !important; }
    body.payout-receipt-page #appCapsule,
    body.payout-receipt-page .app-content { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; box-shadow: none !important; }
    body.payout-receipt-page .payout-receipt-section { padding: 0 !important; }
    body.payout-receipt-page .payout-receipt { margin: 0 !important; min-height: 0 !important; box-shadow: none !important; }
}
/* Profile photos are stored square for a predictable crop and presented as a
   circular avatar only in the interface. */
.profile-avatar-section { display: flex; justify-content: center; margin-top: -4px; margin-bottom: 14px; }
.profile-avatar-shell { position: relative; width: 100px; height: 100px; }
.profile-avatar-image, .profile-avatar-fallback { display: flex; width: 100px; height: 100px; align-items: center; justify-content: center; border: 4px solid #fff; border-radius: 50%; background: #fff; box-shadow: 0 5px 16px rgba(0,0,0,.18); object-fit: cover; color: var(--ikwik-primary); font-size: 32px; font-weight: 700; line-height: 1; }
.profile-avatar-edit { position: absolute; right: -4px; bottom: -1px; display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border: 3px solid #fff; border-radius: 50%; color: #fff; box-shadow: 0 3px 10px rgba(0,0,0,.18); font-size: 18px; }
.profile-avatar-edit:hover, .profile-avatar-edit:focus { color: #fff; }
.header-profile-link { display: inline-flex !important; align-items: center; justify-content: center; }
.header-profile-avatar { display: block; width: 31px; height: 31px; border: 2px solid rgba(255,255,255,.96); border-radius: 50%; object-fit: cover; }
.header-profile-initials { display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--ikwik-primary); font-size: 11px; font-weight: 700; line-height: 1; }
.ikwik-stakeholder-chip { display: flex; box-sizing: border-box; width: max-content; min-width: 120px; height: 40px; margin-top: 10px; max-width: 100%; color: inherit; vertical-align: top; }
.ikwik-stakeholder-chip.chip-media { padding-left: 40px; }
.ikwik-stakeholder-chip.chip-media img, .ikwik-stakeholder-avatar { width: 40px; height: 40px; border-radius: 50%; position: absolute; left: 0; top: 0; object-fit: cover; }
.ikwik-stakeholder-avatar { display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--ikwik-primary); font-size: 13px; font-weight: 700; line-height: 1; }
.ikwik-stakeholder-chip .chip-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: clip; white-space: nowrap; }
body.dark-mode-active .ikwik-stakeholder-chip { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.journey-detail-page > .journey-detail-card { margin: 0 16px !important; }
.journey-detail-page > .journey-detail-card + .journey-detail-card { margin-top: 16px !important; }
.journey-detail-stack > .journey-action-card { display: block !important; width: calc(100% - 32px) !important; min-width: 0; box-sizing: border-box; margin: 16px auto 0 !important; border-radius: 16px !important; overflow: hidden; }
.journey-detail-stack > .journey-action-card > .card-body { padding: 16px !important; }
body.dark-mode-active .journey-detail-stack > .journey-action-card { background: #292929 !important; }
/* Collection/arrival actions pair a tall evidence field with the next action.
   Keep one normal card rhythm between them regardless of utility CSS loading. */
.journey-detail-card form[data-photo-required] > .custom-file-upload { margin-bottom: 16px !important; }
.journey-detail-card form[data-photo-required] > .custom-file-upload + .btn { margin-top: 0 !important; }
.journey-leg-actions > form:first-child { margin-top: 0 !important; }
.journey-leg-actions > .accordion:last-child { margin-bottom: 0 !important; }
.ikwik-compensation-chip { margin: 0 0 12px; color: #fff; }
.ikwik-compensation-chip .chip-icon { background: var(--ikwik-primary) !important; color: #fff !important; }
.ikwik-compensation-chip .chip-label { color: #fff; }
.profile-avatar-crop-wrap { text-align: center; }
.profile-avatar-crop-wrap canvas { display: block; width: 100%; max-width: 330px; height: auto; margin: 0 auto; border-radius: 5px; background: #fff; touch-action: none; cursor: grab; }
.profile-avatar-crop-wrap canvas:active { cursor: grabbing; }
.profile-avatar-preview-wrap { text-align: center; }
.profile-avatar-preview { display: block; width: 160px; height: 160px; margin: 0 auto; border: 4px solid #fff; border-radius: 50%; object-fit: cover; box-shadow: 0 3px 12px rgba(0,0,0,.16); }
body.dark-mode-active .profile-avatar-crop-wrap canvas { border: 1px solid #3d3d3d; }
/* Delivery chat follows MobileKit's compact chat-page rhythm but remains a
   normal server-rendered page with progressively enhanced polling. */
.journey-chat-link { min-height: 56px; display: flex; align-items: center; gap: 10px; padding: 14px 2px; border-top: 1px solid rgba(0,0,0,.12); background: transparent !important; color: inherit !important; box-shadow: none !important; text-decoration: none; }
.journey-chat-link > span:first-child { display: inline-flex; align-items: center; gap: 11px; flex: 1; font-size: 16px; }
.journey-chat-link > span:first-child ion-icon { font-size: 25px; }.journey-chat-link > ion-icon { font-size: 21px; opacity: .55; }
.shipment-chat-link { margin: 0 0 12px; }.journey-chat-accordion-item .journey-chat-link { min-height: 0; padding: 1.25rem; border-top: 0; gap: 12px; }.journey-chat-accordion-item .journey-chat-link > ion-icon { flex: 0 0 24px; font-size: 25px; opacity: 1; }.journey-chat-accordion-item .journey-chat-link > span:not(.chat-unread-badge) { flex: 1; }.journey-chat-accordion-item .journey-chat-link::after { margin-left: 8px; }
.journey-chat-link > .chat-unread-badge { display: inline-flex; flex: 0 0 22px; align-items: center; justify-content: center; width: 22px; height: 22px; min-width: 22px; padding: 0; border-radius: 50%; font-size: 11px; line-height: 1; }
.chat-card { overflow: hidden; }.chat-card .card-header { padding: 14px 16px; }.chat-body { min-height: 50vh; max-height: 62vh; overflow-y: auto; padding: 16px; background: rgba(0,0,0,.025); }
.chat-message { display: flex; gap: 9px; margin: 0 0 15px; align-items: flex-start; }.chat-message-own { flex-direction: row-reverse; }.chat-message-system { justify-content: center; margin: 13px 0; }.chat-avatar { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; background: #fff; color: var(--ikwik-primary); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }.chat-avatar img { width: 100%;height:100%;object-fit:cover; }.chat-message-content { max-width: calc(100% - 48px); }.chat-sender { font-size: 12px; font-weight: 600; margin: 0 0 3px; }.chat-message-own .chat-sender { text-align:right; }.chat-bubble { padding: 10px 12px; border-radius: 12px; background: #f0f1f2; white-space: pre-wrap; overflow-wrap:anywhere; }.chat-message-own .chat-bubble { background: var(--ikwik-primary); color: #fff; border-bottom-right-radius: 3px; }.chat-message-other .chat-bubble { border-bottom-left-radius: 3px; }.chat-bubble img { display:block; width:220px; max-width:100%; border-radius:7px; }.chat-time { display:block; margin-top:3px; font-size:10px; opacity:.62; }.chat-message-own .chat-time{text-align:right}.chat-system-text { padding: 6px 11px; border-radius: 12px; background: rgba(0,0,0,.08); font-size: 11px; text-align: center; }.chat-translate { border:0; background:transparent; padding:4px 0 0; color:var(--ikwik-primary); font-size:12px; }.chat-translation { margin-top:6px; padding:7px 9px; border-left:2px solid var(--ikwik-primary); font-size:13px; opacity:.85; }.chat-compose { display:flex; align-items:center; gap:8px; padding:10px; border-top:1px solid rgba(0,0,0,.1); }.chat-compose textarea { flex:1; resize:none; min-height:40px; max-height:94px; padding:9px 11px; border-radius:20px; }.chat-photo-button { border:0;background:transparent;color:var(--ikwik-primary);font-size:24px;line-height:1; }.chat-send-button { border-radius:50%;width:40px;height:40px;padding:0;display:inline-flex;align-items:center;justify-content:center; }.chat-send-button ion-icon{font-size:19px}.dark-mode-active .chat-body { background: rgba(255,255,255,.025); }.dark-mode-active .chat-bubble { background:#343434; }.dark-mode-active .journey-chat-link{border-color:rgba(255,255,255,.12)}

/* Delivery chat follows MobileKit's page-chat message hierarchy. */
/* Menu overlays are absolute, so they never change the page's height. */
body.delivery-chat-shell .chat-compose-group .form-control,
body.delivery-chat-shell .chat-compose-group .chat-photo-button { background-color: var(--bs-tertiary-bg) !important; }
body.dark-mode-active.delivery-chat-shell .chat-compose-group .form-control,
body.dark-mode-active.delivery-chat-shell .chat-compose-group .chat-photo-button { background-color: #1a1a1a !important; }
.delivery-chat-shell .chat-translation.is-loading{display:inline-flex;align-items:center;gap:7px;color:var(--ikwik-primary)}
.delivery-chat-shell #appCapsule,.delivery-chat-shell .app-content{min-height:100vh}.delivery-chat-shell .app-content{padding:0 0 calc(76px + env(safe-area-inset-bottom))}.delivery-chat-page{padding:8px 0 0}.delivery-chat-messages{padding:4px 0 16px}.delivery-chat-shell .message-item.user .bubble{background:var(--ikwik-primary)}.delivery-chat-shell .message-item .bubble{white-space:pre-wrap;overflow-wrap:anywhere}.delivery-chat-shell .message-item{margin-top:15px}.delivery-chat-shell .message-item .content{position:relative;margin-bottom:5px}.delivery-chat-shell .chat-bubble-row{display:flex;align-items:center;gap:0}.delivery-chat-shell .message-item.user .chat-bubble-row{justify-content:flex-end}.delivery-chat-shell .message-item .bubble img{display:block;max-width:220px;width:100%;border-radius:8px}.delivery-chat-shell .chat-avatar-initial{display:inline-flex;align-items:center;justify-content:center;background:#fff;color:var(--ikwik-primary);font-weight:700}.delivery-chat-shell .chat-system-message{font-style:italic;padding:8px 22px;color:var(--ikwik-primary)!important}.delivery-chat-shell .chat-translation{font-size:13px;padding-top:8px}.delivery-chat-shell .chat-message-dropdown{position:relative;z-index:auto;flex:0 0 auto;display:inline-flex;margin-right:-5px}.delivery-chat-shell .chat-menu-trigger{display:inline-flex;width:30px;min-width:30px;height:32px;padding:0;align-items:center;justify-content:center;border-radius:50%;color:var(--ikwik-primary)!important}.delivery-chat-shell .chat-menu-trigger ion-icon{font-size:30px}.delivery-chat-shell .chat-message-dropdown .dropdown-menu{position:fixed!important;display:none;right:auto;left:0;top:0;min-width:172px;white-space:nowrap;z-index:1001}.delivery-chat-shell .chat-message-dropdown .dropdown-menu.show{display:block}.delivery-chat-shell .chat-message-dropdown .dropdown-item{justify-content:flex-start;color:var(--ikwik-primary)!important}.delivery-chat-shell .chat-message-dropdown .dropdown-item ion-icon{color:inherit!important}.delivery-chat-shell .chat-message-dropdown .dropdown-item.chat-menu-danger{color:#ec4433!important}.delivery-chat-shell .chatFooter{z-index:1000;padding-left:0;padding-right:8px}.delivery-chat-shell .chatFooter form{justify-content:flex-start;gap:8px}.delivery-chat-shell .chat-compose-group{margin:0;flex:1;min-width:0}.delivery-chat-shell .chat-compose-group .form-control{min-height:48px;height:48px;padding:0 13px;border:0;border-radius:0 24px 24px 0;background:var(--bs-tertiary-bg)}.delivery-chat-shell .chat-compose-group .chat-photo-button{margin-left:5px;width:48px;min-width:48px;height:48px;padding:0;border:0;border-radius:0!important;background:var(--bs-tertiary-bg)!important;color:var(--ikwik-primary)!important;display:inline-flex;align-items:center;justify-content:center}.delivery-chat-shell .chat-compose-group .chat-photo-button ion-icon{font-size:27px}.delivery-chat-shell .chat-send-button{width:48px;height:48px;border-radius:50%;border:0;flex:0 0 48px;margin:0;display:inline-flex;align-items:center;justify-content:center;background:var(--ikwik-primary);color:#fff}.delivery-chat-shell .chat-send-button ion-icon{font-size:28px}.delivery-chat-shell .chat-header-action{padding:0 8px;min-width:40px;height:44px;color:#fff!important}.delivery-chat-shell .chat-header-action ion-icon{font-size:27px}.delivery-chat-shell .chat-header-action:disabled{opacity:1}.dark-mode-active.delivery-chat-shell .message-item:not(.user) .bubble{background:#252b38}.dark-mode-active.delivery-chat-shell .message-divider{color:#aeb7c6}.dark-mode-active.delivery-chat-shell .chat-compose-group .form-control{background:#252b38;color:#fff}.dark-mode-active.delivery-chat-shell .chat-compose-group .chat-photo-button{background:#252b38!important;color:var(--ikwik-primary)!important}

/* Web OAuth stays visible in browsers. Native builds swap only providers
   supported by WebToNative; Android keeps the secure web Apple flow. */
.auth-provider-native{display:none}
html.ikwik-native-android .auth-provider-web-google,
html.ikwik-native-ios .auth-provider-web-google,
html.ikwik-native-ios .auth-provider-web-apple{display:none!important}
html.ikwik-native-android .auth-provider-native-google,
html.ikwik-native-ios .auth-provider-native-google,
html.ikwik-native-ios .auth-provider-native-apple{display:block}
.auth-provider-native .auth-spinner{vertical-align:-.125em}
.support-chat-intro{padding:12px 16px;background:rgba(0,168,132,.12);margin:8px 14px;border-radius:12px}.support-chat-intro strong,.support-chat-intro span{display:block}.support-chat-intro span{font-size:.85rem;margin-top:2px}.support-chat-page .delivery-chat-messages{padding-top:8px}.support-chat-page .bubble.support-chat-photo-bubble{padding:0;background:transparent!important}.support-chat-page .support-chat-photo-action{display:inline-flex;align-items:center;gap:7px;min-height:42px;padding:0 14px;border-color:var(--ikwik-primary);border-radius:12px;background:var(--ikwik-primary);color:#fff!important;text-transform:none}.support-chat-page .support-chat-photo-action:hover,.support-chat-page .support-chat-photo-action:focus{border-color:var(--ikwik-primary);background:var(--ikwik-primary);color:#fff!important;filter:brightness(1.06)}.support-chat-page .support-chat-photo-action ion-icon{font-size:20px}.support-chat-page .message-item.user .support-chat-photo-action{border-color:var(--ikwik-primary);background:var(--ikwik-primary);color:#fff!important}
