.service-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    flex-shrink: 0;
}

.service-icon-badge-lg {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1.125rem;
}

.service-grid-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.quick-action-btn span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #111827;
    text-align: center;
    line-height: 1.25;
    letter-spacing: -0.01em;
}


.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.receipt-zigzag {
    position: relative;
}
.receipt-zigzag::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(135deg, #A0E7E5 25%, transparent 25%) -8px 0,
                linear-gradient(225deg, #A0E7E5 25%, transparent 25%) -8px 0,
                linear-gradient(315deg, #A0E7E5 25%, transparent 25%),
                linear-gradient(45deg, #A0E7E5 25%, transparent 25%);
    background-size: 16px 16px;
    background-color: #A0E7E5;
}

.success-starburst {
    clip-path: polygon(
        50% 0%, 61% 11%, 75% 5%, 79% 20%, 95% 22%, 88% 35%,
        100% 50%, 88% 65%, 95% 78%, 79% 80%, 75% 95%, 61% 89%,
        50% 100%, 39% 89%, 25% 95%, 21% 80%, 5% 78%, 12% 65%,
        0% 50%, 12% 35%, 5% 22%, 21% 20%, 25% 5%, 39% 11%
    );
}

/* Send money — processing spinner */
.send-processing-spinner {
    width: 5.25rem;
    height: 5.25rem;
    border-radius: 9999px;
    border: 6px solid rgba(1, 199, 177, 0.18);
    border-top-color: #01C7B1;
    border-right-color: #01C7B1;
}

/* Send result screens (success / failed) */
.send-result-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem max(2rem, env(safe-area-inset-bottom, 0px));
    text-align: center;
}

.send-result-inner {
    width: 100%;
    max-width: 22rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.send-result-icon {
    position: relative;
    width: 5.5rem;
    height: 5.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.send-result-icon--success {
    color: #fff;
}

.send-result-icon--failed {
    background: #fee2e2;
    border-radius: 9999px;
}

.send-result-starburst {
    position: absolute;
    inset: 0;
    background: #01C7B1;
}

.send-result-check {
    position: relative;
    z-index: 1;
    width: 2.75rem;
    height: 2.75rem;
}

.send-result-x {
    width: 3.5rem;
    height: 3.5rem;
    color: #ef4444;
}

.send-result-copy {
    width: 100%;
    margin-top: 1.75rem;
    margin-bottom: 1.5rem;
}

.send-result-brand {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #01C7B1;
    letter-spacing: 0.02em;
    margin: 0 0 0.375rem;
}

.send-result-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.3;
    margin: 0 0 0.75rem;
    text-align: center;
}

.send-result-message {
    font-size: 0.9375rem;
    color: #6b7280;
    line-height: 1.55;
    margin: 0;
    text-align: center;
    max-width: 20rem;
    margin-left: auto;
    margin-right: auto;
}

.send-result-message strong {
    color: #111827;
    font-weight: 700;
}

.send-result-details {
    width: 100%;
    background: #f3f4f6;
    border-radius: 1rem;
    padding: 0.875rem 1.125rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.send-result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.4375rem 0;
    font-size: 0.875rem;
    line-height: 1.35;
}

.send-result-row--total {
    border-top: 1px solid #e5e7eb;
    margin-top: 0.25rem;
    padding-top: 0.625rem;
}

.send-result-label {
    color: #9ca3af;
    flex-shrink: 0;
}

.send-result-value {
    color: #111827;
    font-weight: 700;
    text-align: right;
    word-break: break-word;
}

.send-result-value--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    letter-spacing: 0.01em;
}

.send-result-value--amount {
    font-size: 0.9375rem;
}

.send-result-btn {
    display: block;
    width: 100%;
    font-weight: 700;
    font-size: 1rem;
    padding: 1rem;
    border-radius: 0.875rem;
    text-align: center;
    transition: background-color 0.15s ease;
}

.send-result-btn--success {
    background-color: #01C7B1;
    color: #fff;
}

.send-result-btn--success:hover {
    background-color: #00A693;
}

.send-result-btn--failed {
    background-color: #01C7B1;
    color: #fff;
    margin-bottom: 0.75rem;
}

.send-result-btn--failed:hover {
    background-color: #00A693;
}

.send-result-btn--tax {
    background-color: #d97706;
    color: #fff;
    margin-bottom: 0.75rem;
}

.send-result-btn--tax:hover {
    background-color: #b45309;
}

.send-result-link {
    color: #01C7B1;
    font-weight: 600;
    font-size: 0.9375rem;
}

.send-result-footnote {
    margin: 0.875rem 0 0;
    font-size: 0.75rem;
    color: #9ca3af;
    text-align: center;
    line-height: 1.4;
}

.payment-option:has(input:checked) {
    background-color: rgba(160, 231, 229, 0.45);
}

input[type="radio"] {
    accent-color: #01C7B1;
}

.keypad-key {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.send-nav-home-active {
    background-color: #A0E7E5;
    border-radius: 9999px;
    padding: 6px;
}

@media (max-width: 380px) {
    .grid-cols-3.gap-3 > a {
        padding: 0.75rem;
    }
}

/* Hubtel-style shared UI */
.hub-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.hub-btn {
    width: 100%;
    background-color: #01C7B1;
    color: #fff;
    font-weight: 700;
    padding: 1rem;
    border-radius: 0.75rem;
    transition: background-color 0.15s ease;
}

.hub-btn:hover {
    background-color: #00A693;
}

.hub-input {
    width: 100%;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1rem;
    font-size: 1rem;
}

.hub-input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(1, 199, 177, 0.3);
}

.hub-page {
    background: #fff;
    min-height: 100vh;
}

.hub-section-title {
    font-size: 0.875rem;
    font-weight: 800;
    color: #374151;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
}

/* Send money flow — clearer type & color */
.send-flow-page {
    color: #111827;
}

.send-section-title {
    font-size: 0.8125rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.625rem;
    padding-left: 0.625rem;
    border-left: 4px solid #01C7B1;
    color: #0f766e;
}

.send-section-title--bank {
    border-left-color: #4338ca;
    color: #3730a3;
}

.send-section-title--momo {
    border-left-color: #0d9488;
    color: #115e59;
}

.send-field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 0.375rem;
}

.send-form-intro {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1rem;
    line-height: 1.45;
}

.send-field-input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    background: #f3f4f6;
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
}

.send-field-input::placeholder {
    color: #9ca3af;
    font-weight: 500;
}

.send-field-input:focus {
    outline: none;
    border-color: #01C7B1;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(1, 199, 177, 0.2);
}

.send-field-input--account {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    letter-spacing: 0.04em;
}

.send-field-error {
    color: #dc2626;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
}

.send-primary-btn {
    display: block;
    background: linear-gradient(135deg, #01C7B1 0%, #009688 100%);
    color: #fff;
    font-weight: 800;
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 4px 12px rgba(1, 199, 177, 0.35);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.send-primary-btn:hover {
    box-shadow: 0 6px 16px rgba(1, 199, 177, 0.45);
}

.send-provider-banner {
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
}

.send-provider-banner--momo {
    background: linear-gradient(135deg, #ecfdf5 0%, #ccfbf1 100%);
    border: 1px solid #99f6e4;
}

.send-provider-banner--bank {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border: 1px solid #c7d2fe;
}

.send-recipient-card {
    border: 1px solid transparent;
}

.send-recipient-card--momo {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #fcd34d;
}

.send-recipient-card--bank {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-color: #a5b4fc;
}

.send-recipient-title {
    font-size: 0.9375rem;
    font-weight: 800;
    color: #111827;
}

.send-recipient-primary {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1e1b4b;
}

.send-recipient-meta {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #4b5563;
}

.send-recipient-edit {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0d9488;
}

.send-keypad {
    background: linear-gradient(180deg, #e5e7eb 0%, #d1d5db 100%);
    border-radius: 1rem 1rem 0 0;
}

.card-brands-accepted .card-brand-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 1.375rem;
    padding: 0 0.35rem;
    border-radius: 0.25rem;
    background: #fff;
    border: 1px solid #e5e7eb;
}

.card-brand-svg {
    height: 0.875rem;
    width: auto;
    display: block;
}

.card-brand-svg--visa {
    width: 2rem;
    height: 0.625rem;
}

.card-brand-badge {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.125rem;
    min-width: 2.5rem;
    max-width: 4.75rem;
    height: 1.375rem;
    pointer-events: none;
    overflow: hidden;
}

.card-brand-badge--empty {
    opacity: 0.4;
}

.card-brand-badge--visa,
.card-brand-badge--mastercard,
.card-brand-badge--amex,
.card-brand-badge--discover,
.card-brand-badge--diners,
.card-brand-badge--jcb,
.card-brand-badge--unionpay,
.card-brand-badge--maestro,
.card-brand-badge--rupay,
.card-brand-badge--elo,
.card-brand-badge--mir {
    opacity: 1;
}

.card-brand-badge svg,
.card-brand-badge-svg {
    height: 1.125rem;
    width: auto;
    display: block;
    max-width: 100%;
}

.card-brand-badge-svg--visa {
    width: 2.125rem;
    height: 0.75rem;
}

.card-brand-badge-svg--text {
    height: 0.875rem;
    width: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.send-number-input {
    height: 2.875rem;
    max-width: 100%;
}

.checkout-panel {
    max-width: 100%;
    overflow: hidden;
}

.checkout-field {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    height: 2.75rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    background: #f3f4f6;
    border-radius: 0.75rem;
    border: none;
}

.checkout-field:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(1, 199, 177, 0.3);
}

.checkout-expiry-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr);
    gap: 0.5rem;
    width: 100%;
}

#card-details {
    overflow: hidden;
}

.checkout-submit {
    box-sizing: border-box;
}

.provider-logo-img {
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.06);
    padding: 2px;
    box-sizing: border-box;
}

.provider-logo-img[class*="rounded-xl"] {
    padding: 4px;
}

.brand-name {
    letter-spacing: -0.02em;
    line-height: 1.1;
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: hidden;
}

/* Home page header */
.home-header {
    background: #fff;
    padding-top: max(0.625rem, env(safe-area-inset-top, 0px));
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 0.875rem;
}

.home-header-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.home-header-profile {
    position: relative;
    flex-shrink: 0;
    display: block;
}

.home-header-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 9999px;
    background: linear-gradient(145deg, #2563eb 0%, #60a5fa 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.home-header-avatar--photo {
    object-fit: cover;
    display: block;
}

.home-header-greeting {
    flex: 1;
    min-width: 0;
    text-align: left;
}

.home-header-title {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.375rem;
    font-size: 1.125rem;
    font-weight: 800;
    color: #111827;
    margin: 0;
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.home-header-title-text {
    min-width: 0;
}

.home-header-sub {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0.1875rem 0 0;
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.3;
}

.home-header-status-dot {
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 9999px;
    background: #22c55e;
    flex-shrink: 0;
}

.home-header-notify {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: #374151;
    transition: background-color 0.15s ease;
}

.home-header-notify:hover {
    background: #f9fafb;
}

.home-header-notify-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.home-header-notify-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    border-radius: 9999px;
    background: #e51c23;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.home-header--guest {
    padding-bottom: 0.625rem;
}

.home-header-guest-inner {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-header-logo {
    display: inline-flex;
}

.app-shell {
    width: 100%;
    max-width: 28rem;
    margin-left: auto;
    margin-right: auto;
    overflow-x: hidden;
}

/* Prevent iOS zoom on input focus */
@media (max-width: 767px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    .checkout-field,
    .send-number-input,
    .hub-input {
        font-size: 16px !important;
    }
}

.balance-amount {
    font-size: clamp(1.5rem, 8vw, 2.25rem);
    line-height: 1.2;
    word-break: break-word;
}

.page-title {
    font-size: clamp(1.125rem, 4.5vw, 1.5rem);
}

img,
svg,
video {
    max-width: 100%;
    height: auto;
}

/* Bottom nav safe area (iPhone home indicator) */
.safe-bottom-nav {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.app-shell-pad {
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}

/* Admin panel */
.admin-shell {
    min-height: 100vh;
    overflow-x: hidden;
}

.admin-nav-scroll {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.admin-nav-scroll::-webkit-scrollbar {
    display: none;
}

.admin-nav-scroll a {
    white-space: nowrap;
    flex-shrink: 0;
}

.admin-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-table-wrap table {
    min-width: 520px;
}

.admin-card-grid {
    display: grid;
    gap: 0.75rem;
}

@media (max-width: 639px) {
    .admin-main {
        padding: 1rem;
    }

    .admin-page-title {
        font-size: 1.25rem;
    }

    .admin-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .admin-stat-grid .text-3xl {
        font-size: 1.5rem;
    }

    .admin-action-row {
        flex-direction: column;
        align-items: stretch !important;
    }

    .admin-action-row input,
    .admin-action-row .border {
        width: 100% !important;
        max-width: 100%;
    }

    .admin-action-row form {
        width: 100%;
    }
}

@media (min-width: 640px) {
    .admin-main {
        padding: 1.5rem;
    }
}

/* Send flow pages without bottom nav */
.send-flow-page {
    padding-bottom: max(2rem, env(safe-area-inset-bottom, 0px));
}

.keypad {
    max-width: 100%;
}

@media (max-width: 380px) {
    .keypad-key {
        padding-top: 0.625rem;
        padding-bottom: 0.625rem;
        font-size: 1.125rem;
    }
}
