/* ============================================================
   Nidam Super � Mobile-First Design System
   ============================================================ */

:root {
    --blue:        #1E5AA8;
    --blue-dark:   #164680;
    --blue-light:  #E8F0FA;
    --green:       #2EAF5A;
    --green-dark:  #238A47;
    --green-light: #E6F7EC;
    --gold:        #F5A623;
    --gold-dark:   #D4890A;
    --gold-light:  #FEF3DC;

    --bg:          #F8F9FA;
    --surface:     #FFFFFF;
    --text:        #1A1A2E;
    --text-muted:  #6B7280;
    --border:      #E5E7EB;

    --radius-sm:   8px;
    --radius:      12px;
    --radius-lg:   20px;
    --radius-xl:   28px;

    --shadow-sm:   0 1px 3px rgba(0,0,0,.06);
    --shadow:      0 4px 16px rgba(30,90,168,.08);
    --shadow-lg:   0 8px 32px rgba(30,90,168,.12);

    --bottom-nav-h: 72px;
    --bottom-nav-fab: 58px;
    --touch-min:   48px;

    --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-brand:  'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition:  0.2s ease;

    --wallet-gradient: linear-gradient(145deg, var(--blue) 0%, #2563B8 50%, var(--green) 100%);
    --hub-gradient: linear-gradient(145deg, #164680 0%, var(--blue) 42%, var(--green) 100%);
    --hub-shell-gradient: linear-gradient(135deg, var(--blue) 0%, var(--green) 65%, var(--gold) 100%);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

body {
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    min-height: 100dvh;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: pan-y pinch-zoom;
    -webkit-font-smoothing: antialiased;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.app-shell {
    width: 100%;
    max-width: 100%;
    min-height: 100dvh;
    background: var(--bg);
    position: relative;
    overflow-x: clip;
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: calc(var(--bottom-nav-h) + 18px + env(safe-area-inset-bottom, 0px));
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

body:not(.app-ready) .app-main,
body:not(.app-ready) .bottom-nav {
    visibility: hidden;
}

body.auth-mode .bottom-nav {
    display: none;
}

body.auth-mode .app-main {
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}

body.auth-mode .app-shell {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
    padding-right: env(safe-area-inset-right, 0px);
}

main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, select, textarea { font-family: inherit; font-size: 15px; }

.container {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--radius-xl);
    background: var(--bg);
    border: 1px solid var(--border);
    min-height: var(--touch-min);
    font-size: 13px;
    font-weight: 600;
}

.lang-opt {
    color: var(--text-muted);
    transition: color var(--transition);
}

.lang-opt.active {
    color: var(--blue);
}

.lang-divider {
    color: var(--border);
    font-weight: 300;
}

/* ?? Hero ????????????????????????????????????????????????? */

.hero {
    padding: 32px 0 48px;
    background: linear-gradient(165deg, var(--blue) 0%, #2563B8 40%, var(--green) 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--bg);
    border-radius: 24px 24px 0 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: rgba(255,255,255,.15);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: var(--radius-xl);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}

.hero-badge-dot {
    width: 8px;
    height: 8px;
    background: var(--gold);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .6; transform: scale(1.3); }
}

.hero-title {
    font-size: clamp(28px, 7vw, 44px);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.hero-sub {
    font-size: clamp(15px, 3.5vw, 18px);
    line-height: 1.65;
    opacity: .92;
    max-width: 520px;
    margin: 0 auto 28px;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: var(--touch-min);
    padding: 12px 28px;
    border-radius: var(--radius-xl);
    font-size: 15px;
    font-weight: 600;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    width: 100%;
    max-width: 280px;
}

.btn:active {
    transform: scale(.97);
}

.btn-primary {
    background: var(--gold);
    color: #1A1A2E;
    box-shadow: 0 4px 16px rgba(245,166,35,.35);
}

.btn-primary:hover {
    background: var(--gold-dark);
    box-shadow: 0 6px 20px rgba(245,166,35,.45);
}

.btn-outline {
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1.5px solid rgba(255,255,255,.35);
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    background: rgba(255,255,255,.22);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 36px;
    flex-wrap: wrap;
}

.hero-stat {
    text-align: center;
}

.hero-stat-num {
    font-size: 22px;
    font-weight: 800;
    display: block;
}

.hero-stat-label {
    font-size: 12px;
    opacity: .75;
    font-weight: 500;
}

/* ?? Section shared ??????????????????????????????????????? */

.section {
    padding: 48px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 32px;
}

.section-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--green);
    margin-bottom: 8px;
}

.section-title {
    font-size: clamp(22px, 5vw, 32px);
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.section-sub {
    font-size: 15px;
    color: var(--text-muted);
    max-width: 480px;
    margin: 0 auto;
}

/* ?? Services Grid ???????????????????????????????????????? */

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.service-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 12px 6px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    min-width: 0;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
}

.service-card:active {
    transform: scale(.97);
}

.service-card.hidden {
    display: none;
}

.service-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.service-icon svg {
    width: 22px;
    height: 22px;
}

.service-icon.food      { background: #FEF3DC; color: #D4890A; }
.service-icon.jobs      { background: var(--blue-light); color: var(--blue); }
.service-icon.sports    { background: #FCE4EC; color: #C62828; }
.service-icon.soko      { background: var(--green-light); color: var(--green-dark); }
.service-icon.logistics { background: #EDE7F6; color: #5E35B1; }
.service-icon.errands   { background: #E0F7FA; color: #00838F; }
.service-icon.bills     { background: #FFF8E1; color: #F9A825; }
.service-icon.retail    { background: #E3F2FD; color: #1565C0; }
.service-icon.airbnb    { background: #FCE4EC; color: #C2185B; }
.service-icon.realestate{ background: #E8F5E9; color: #2E7D32; }
.service-icon.miniapps  { background: #F3E5F5; color: #7B1FA2; }

.service-name {
    font-size: 11px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.25;
    word-break: break-word;
    hyphens: auto;
    width: 100%;
    text-align: center;
}

.service-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.4;
    display: none;
}

/* ?? Why / Features ??????????????????????????????????????? */

.features-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: var(--surface);
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    min-width: 0;
}

.feature-text {
    min-width: 0;
    flex: 1;
}

.feature-text h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon svg {
    width: 22px;
    height: 22px;
}

.feature-icon.wallet  { background: var(--blue-light); color: var(--blue); }
.feature-icon.escrow  { background: var(--green-light); color: var(--green-dark); }
.feature-icon.pool    { background: var(--gold-light); color: var(--gold-dark); }
.feature-icon.qr      { background: #EDE7F6; color: #5E35B1; }
.feature-icon.voice   { background: #E0F7FA; color: #00838F; }
.feature-icon.tra     { background: #FFF8E1; color: #F9A825; }

/* ?? For You (Consumer / Merchant) ???????????????????????? */

.audience-cards {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.audience-card {
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.audience-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
}

.audience-card.consumer {
    background: linear-gradient(135deg, var(--blue) 0%, #2563B8 100%);
}

.audience-card.merchant {
    background: linear-gradient(135deg, var(--green) 0%, #34C759 100%);
}

.audience-card h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
    position: relative;
}

.audience-card p {
    font-size: 14px;
    opacity: .9;
    line-height: 1.55;
    position: relative;
}

.audience-icon {
    margin-bottom: 12px;
    position: relative;
    color: rgba(255,255,255,.95);
}

.audience-icon svg,
.icon-lg {
    width: 36px;
    height: 36px;
}

.icon-sm {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ?? Waitlist Form ???????????????????????????????????????? */

.join-section {
    background: var(--surface);
    padding-bottom: 24px;
}

.waitlist-form {
    max-width: 480px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input,
.form-group select {
    min-height: var(--touch-min);
}

.form-group textarea {
    display: block;
    min-height: 120px;
    line-height: 1.5;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(30,90,168,.12);
}

.form-group input::placeholder {
    color: #A0AEC0;
}

.role-toggle {
    display: flex;
    gap: 10px;
    width: 100%;
}

.role-option {
    flex: 1;
    min-width: 0;
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: all var(--transition);
    cursor: pointer;
}

.role-option.selected {
    border-color: var(--blue);
    background: var(--blue-light);
    color: var(--blue);
}

.role-option input {
    display: none;
}

.form-submit {
    width: 100%;
    margin-top: 8px;
}

.form-message {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    display: none;
}

.form-message.success {
    display: block;
    background: var(--green-light);
    color: var(--green-dark);
    border: 1px solid rgba(46,175,90,.25);
}

.form-message.error {
    display: block;
    background: #FEE2E2;
    color: #B91C1C;
    border: 1px solid rgba(185,28,28,.2);
}

/* ?? Bottom Navigation — floating bar + raised Home FAB ???? */

.bottom-nav {
    position: fixed;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    right: 12px;
    width: auto;
    max-width: 480px;
    margin: 0 auto;
    box-sizing: border-box;
    z-index: 100;
    height: var(--bottom-nav-h);
    padding: 0 6px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(229, 231, 235, 0.9);
    border-radius: 28px;
    box-shadow:
        0 10px 28px rgba(15, 28, 46, 0.12),
        0 2px 8px rgba(15, 28, 46, 0.06);
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color var(--transition), transform var(--transition);
    min-height: 56px;
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0 2px 10px;
    position: relative;
}

.bottom-nav-label {
    line-height: 1;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bottom-nav-item svg {
    opacity: .65;
    transition: opacity var(--transition);
}

.bottom-nav-item.active,
.bottom-nav-item:hover {
    color: var(--blue);
}

.bottom-nav-item.active svg,
.bottom-nav-item:hover svg {
    opacity: 1;
}

.bottom-nav-item:active:not(.bottom-nav-home) {
    transform: scale(0.96);
}

/* Raised circular Home FAB (Material docked FAB pattern) */
.bottom-nav-home {
    justify-content: flex-end;
    padding-bottom: 6px;
    z-index: 2;
}

.bottom-nav-home-fab {
    width: var(--bottom-nav-fab);
    height: var(--bottom-nav-fab);
    margin-top: calc(var(--bottom-nav-fab) * -0.42);
    margin-bottom: 2px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(145deg, var(--blue) 0%, #2563B8 52%, var(--green) 100%);
    box-shadow:
        0 8px 20px rgba(30, 90, 168, 0.38),
        0 0 0 5px rgba(255, 255, 255, 0.98);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bottom-nav-home-fab svg {
    opacity: 1;
    width: 24px;
    height: 24px;
}

.bottom-nav-home .bottom-nav-label {
    color: var(--blue);
    font-weight: 700;
}

.bottom-nav-home.active .bottom-nav-home-fab,
.bottom-nav-home:hover .bottom-nav-home-fab {
    transform: translateY(-2px) scale(1.04);
    box-shadow:
        0 12px 26px rgba(30, 90, 168, 0.42),
        0 0 0 5px rgba(255, 255, 255, 0.98);
}

.bottom-nav-home:active .bottom-nav-home-fab {
    transform: scale(0.96);
}

.bottom-nav-avatar-wrap {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--blue-light, #E8F0FA);
    color: var(--blue);
    border: 1.5px solid transparent;
}

.bottom-nav-item.active .bottom-nav-avatar-wrap {
    border-color: var(--blue);
}

.bottom-nav-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bottom-nav-avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1;
}

.bottom-nav-avatar-img.hidden,
.bottom-nav-avatar-initials.hidden {
    display: none !important;
}

.bottom-nav-cta {
    color: var(--gold-dark);
}

.bottom-nav-cta.active {
    color: var(--gold-dark);
}

/* Tablet (768px+) */

@media (min-width: 768px) {
    .hero {
        padding: 40px 0 56px;
    }

    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }

    .btn {
        width: auto;
    }

    .section {
        padding: 48px 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* ============================================================
   App screens (tab navigation)
   ============================================================ */

.app-main {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.app-screen {
    display: none;
    animation: screenIn 0.22s ease;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    align-self: stretch;
    box-sizing: border-box;
    overflow-x: clip;
}

.app-screen.active {
    display: block;
}

body.auth-mode #screen-auth.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    min-height: calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
}

@keyframes screenIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hidden {
    display: none !important;
}

body.sheet-open {
    overflow: hidden;
}

/* Home dashboard — wallet fixed, activity panels swipe sideways */
#screen-home.active {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--bottom-nav-h) - 18px - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px));
    max-height: calc(100dvh - var(--bottom-nav-h) - 18px - env(safe-area-inset-bottom, 0px) - env(safe-area-inset-top, 0px));
    overflow: hidden;
}

body.home-lock {
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
}

.dash-wallet-wrap {
    position: relative;
    z-index: 40;
    padding: 12px 0 8px;
    background: var(--bg);
    flex-shrink: 0;
}

.dash-wallet {
    padding: 20px;
    border-radius: var(--radius-xl);
    background: var(--wallet-gradient);
    color: #fff;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.dash-wallet-head {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.dash-wallet-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
    flex-shrink: 0;
}

.dash-greeting {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
}

.dash-balance-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.dash-balance-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.dash-balance-value {
    font-size: clamp(28px, 7vw, 36px);
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
    margin-bottom: 0;
    text-align: center;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

.dash-balance-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.dash-balance-toggle:active {
    transform: scale(0.94);
}

.dash-balance-toggle svg {
    width: 18px;
    height: 18px;
}

.dash-balance-toggle-icon {
    display: inline-flex;
}

.dash-wallet-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.dash-topup-btn {
    padding: 10px 16px;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    min-height: 40px;
    flex: 1 1 120px;
    max-width: 180px;
}

.dash-topup-btn:active {
    transform: scale(0.97);
}

.dash-wallet-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
}

.dash-add-funds-btn {
    background: #fff;
    color: var(--blue);
    border-color: #fff;
}

.dash-withdraw-btn {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.45);
}

.dash-order-btn {
    background: rgba(255, 255, 255, 0.15);
}

.dash-active-count {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.85;
}

.home-body {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    padding: 4px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.home-activity-rail {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 12px;
    padding: 0 16px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.home-activity-rail::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.home-activity-panel {
    flex: 0 0 calc(100vw - 48px);
    width: calc(100vw - 48px);
    max-width: calc(100vw - 48px);
    margin-bottom: 0;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.home-panel-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.home-panel-scroll::-webkit-scrollbar {
    display: none;
}

.home-activity-panel .activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.home-rail-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px 0 6px;
    flex-shrink: 0;
}

.home-rail-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: #c5ced9;
    transition: width 0.2s ease, background 0.2s ease;
}

.home-rail-dot.is-active {
    width: 18px;
    background: var(--blue);
}

.dash-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.dash-card-flush {
    padding-bottom: 12px;
}

.dash-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
    text-align: center;
}

.dash-card-head h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    width: 100%;
    text-align: center;
}

.dash-chart-total {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.dash-chart-total strong {
    color: var(--text);
    font-weight: 700;
}

.dash-badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--bg);
    padding: 4px 10px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
}

.dash-chart-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.dash-chart-scroll::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.dash-chart {
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 10px;
    height: 120px;
    padding: 0 4px;
    min-width: max-content;
    width: 100%;
}

.dash-chart-col {
    flex: 0 0 36px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 36px;
    height: 100%;
}

.dash-bar-track {
    flex: 1;
    width: 100%;
    max-width: 32px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.dash-bar {
    width: 100%;
    min-height: 4px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, var(--green) 0%, var(--blue) 100%);
    transition: height 0.4s ease;
}

.dash-chart-day {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
}

.dash-svc-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dash-svc-list-hscroll {
    flex-direction: row;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.dash-svc-list-hscroll::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.dash-svc-list-hscroll .dash-svc-balance {
    flex: 0 0 168px;
    width: 168px;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.dash-svc-balance {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    min-width: 0;
}

.dash-svc-balance:active {
    transform: scale(0.99);
}

.dash-svc-balance .service-icon {
    width: 40px;
    height: 40px;
}

.dash-svc-balance .service-icon svg {
    width: 20px;
    height: 20px;
}

.dash-svc-info {
    flex: 1;
    min-width: 0;
}

.dash-svc-info strong {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}

.dash-svc-amount {
    font-size: 13px;
    font-weight: 600;
    color: var(--green-dark);
    white-space: pre-line;
    line-height: 1.35;
}

[data-theme="dark"] .dash-svc-amount {
    color: var(--green);
}

.dash-empty {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    padding: 12px 8px;
    line-height: 1.5;
}

.dash-card-head .link-btn,
.dash-card-head .dash-badge {
    margin-left: auto;
    margin-right: auto;
}

.services-grid,
.home-services-grid {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.me-account-form,
.auth-panel,
.order-list {
    width: 100%;
}

@media (max-width: 767px) {
    .bottom-nav {
        left: 12px;
        right: 12px;
        margin: 0 auto;
    }

    .dash-wallet-wrap,
    .home-body,
    .screen-body {
        width: 100%;
    }
}

.home-services-grid {
    margin-top: 4px;
}

.link-btn {
    display: inline-block;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 8px 0;
}

.home-actions .btn,
.sheet-content .btn {
    width: 100%;
    max-width: none;
}

.btn-secondary {
    background: var(--surface);
    color: var(--blue);
    border: 1.5px solid var(--blue);
    box-shadow: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    box-shadow: none;
    margin-top: 8px;
}

/* Shared screen layouts */
.screen-top {
    padding: 20px 0 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.screen-top .container {
    text-align: center;
}

.screen-top .search-bar {
    text-align: left;
}

.screen-top-compact {
    padding-bottom: 12px;
}

.screen-title {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
    text-align: center;
}

.screen-sub {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
    text-align: center;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
}

/* Services intro card */
#screen-services .screen-title {
    margin-bottom: 14px;
}

.services-intro {
    margin: 0 auto 4px;
    max-width: 420px;
    text-align: left;
}

.services-intro-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 14px 12px;
    background: linear-gradient(135deg, rgba(30, 90, 168, 0.08) 0%, rgba(46, 175, 90, 0.08) 100%);
    border: 1px solid rgba(30, 90, 168, 0.14);
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset;
}

.services-intro-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--surface);
    color: var(--blue);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.services-intro-icon svg {
    width: 22px;
    height: 22px;
}

.services-intro-body {
    flex: 1;
    min-width: 0;
}

.services-intro-label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 4px;
}

.services-intro-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    margin: 0;
}

.services-intro-steps {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 6px;
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.services-intro-steps li {
    flex: 1;
    position: relative;
    min-width: 0;
}

.services-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 10px 4px;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    color: var(--text-muted);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    min-height: 100%;
}

.services-step.active,
.services-step:active {
    border-color: var(--blue);
    background: var(--blue-light);
    color: var(--blue);
}

.services-intro-steps li:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -5px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-top: 2px solid var(--border);
    border-right: 2px solid var(--border);
    transform: rotate(45deg);
    z-index: 1;
}

.services-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--blue) 0%, var(--green) 100%);
    flex-shrink: 0;
}

.services-step[data-service-step="myhub"] .services-step-num {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
}

.services-step[data-service-step="myhub"].active {
    border-color: var(--gold-dark);
    background: var(--gold-light);
    color: var(--gold-dark);
}

.services-hub-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.services-step-body {
    margin-top: 16px;
}

.services-step-panel {
    display: none;
    animation: servicesStepIn 0.22s ease;
}

.services-step-panel.active {
    display: block;
}

@keyframes servicesStepIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.services-step-card {
    position: relative;
    padding: 18px 18px 18px 52px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.services-step-card-order {
    border-color: rgba(46, 175, 90, 0.2);
    background: linear-gradient(135deg, var(--surface) 0%, var(--green-light) 100%);
}

.services-step-card-num {
    position: absolute;
    left: 16px;
    top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--blue) 0%, var(--green) 100%);
}

.services-step-card-order .services-step-card-num {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
}

.services-step-card-title {
    font-family: var(--font-brand);
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--text);
}

.services-step-card-text,
.services-step-lead {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-muted);
    margin: 0;
}

.services-step-lead {
    padding: 14px 16px;
    margin-bottom: 12px;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius-lg);
}

#servicesMyHubSection.services-step-panel {
    margin-top: 0;
}

#servicesStepSearch .search-results-section {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.my-hub-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.my-hub-head-simple {
    margin-bottom: 2px;
}

.my-hub-head-simple .services-hub-title {
    font-family: var(--font-brand);
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 4px;
}

.my-hub-head-simple .services-hub-sub {
    margin: 0;
}

.supplier-dashboard {
    position: relative;
    margin-top: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.my-hub-orders-panel {
    margin: 0;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.my-hub-hero {
    margin: 0 0 12px;
    padding: 14px 16px;
    border-radius: var(--radius-lg);
    background: var(--blue-light);
    color: var(--text);
    border: 1px solid rgba(30, 90, 168, 0.12);
    box-shadow: none;
}

.my-hub-greeting {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 4px;
    opacity: 1;
}

.my-hub-name {
    font-family: var(--font-brand);
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin: 0 0 6px;
}

.my-hub-earned {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    margin: 0;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
}

.my-hub-earned strong {
    font-size: 15px;
    font-weight: 800;
    color: var(--green-dark);
}

.my-hub-signin {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.my-hub-signin-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: 50%;
    background: var(--blue-light);
    color: var(--blue);
}

.my-hub-signin-ring svg {
    width: 28px;
    height: 28px;
}

.my-hub-signin-title {
    font-family: var(--font-brand);
    font-size: 17px;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--text);
}

.my-hub-signin-text {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    margin: 0 0 16px;
    max-width: 260px;
}

.my-hub-signin-btn {
    min-width: 180px;
}

.my-hub-empty {
    text-align: center;
    padding: 18px 12px;
    font-size: 13px;
    color: var(--text-muted);
    background: var(--surface);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.supplier-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 0 0 12px;
}

.supplier-stat {
    position: relative;
    padding: 14px 12px 12px 44px;
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    text-align: left;
    overflow: hidden;
}

.my-hub-stat-icon {
    position: absolute;
    left: 12px;
    top: 14px;
    width: 22px;
    height: 22px;
    opacity: 0.85;
}

.supplier-stat-listings {
    background: var(--blue-light);
    border-color: rgba(30, 90, 168, 0.12);
    color: var(--blue-dark);
}

.supplier-stat-orders {
    background: var(--green-light);
    border-color: rgba(46, 175, 90, 0.12);
    color: var(--green-dark);
}

.supplier-stat-earned {
    background: var(--gold-light);
    border-color: rgba(245, 166, 35, 0.18);
    color: var(--gold-dark);
}

.supplier-stat-escrow {
    background: var(--bg);
    border-color: var(--border);
    color: var(--text);
}

.supplier-stat-val {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: inherit;
    margin-bottom: 2px;
    line-height: 1.15;
}

.supplier-stat-lbl {
    font-size: 10px;
    color: inherit;
    opacity: 0.78;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.my-hub-panel {
    margin: 0 0 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.my-hub-panel-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.my-hub-panel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.my-hub-panel-dot-blue {
    background: var(--blue);
    box-shadow: 0 0 0 3px rgba(30, 90, 168, 0.18);
}

.my-hub-panel-dot-green {
    background: var(--green);
    box-shadow: 0 0 0 3px rgba(46, 175, 90, 0.18);
}

.my-hub-panel-dot-gold {
    background: var(--gold);
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
}

.my-hub-orders-badge {
    margin-left: auto;
}

.my-hub-panel-count {
    margin-left: auto;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
    background: var(--blue-light);
}

.supplier-subhead {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.supplier-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.supplier-list-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
}

.my-hub-listing {
    position: relative;
    padding: 12px 12px 12px 16px;
    border-left: 3px solid var(--blue);
    box-shadow: var(--shadow-sm);
}

.my-hub-listing-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    width: 100%;
    margin-bottom: 4px;
}

.my-hub-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--blue);
    background: var(--blue-light);
}

.my-hub-listing-title {
    flex: 1 1 100%;
    font-size: 14px;
    line-height: 1.3;
}

.my-hub-listing-price {
    margin-left: auto;
    font-weight: 800;
    font-size: 14px;
    color: var(--green-dark);
}

.supplier-list-item strong {
    flex: 1 1 100%;
}

.supplier-list-item span:last-child {
    margin-left: auto;
    font-weight: 700;
    color: var(--green-dark);
}

.my-hub-panel-orders .order-card {
    border-left: 3px solid var(--green);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .my-hub-panel,
[data-theme="royal"] .my-hub-panel {
    background: var(--surface);
}

[data-theme="dark"] .my-hub-listing,
[data-theme="royal"] .my-hub-listing,
[data-theme="dark"] .my-hub-panel-orders .order-card,
[data-theme="royal"] .my-hub-panel-orders .order-card {
    background: var(--surface);
}

[data-theme="dark"] .services-intro-card,
[data-theme="royal"] .services-intro-card {
    background: linear-gradient(135deg, rgba(30, 90, 168, 0.18) 0%, rgba(46, 175, 90, 0.12) 100%);
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

[data-theme="dark"] .services-intro-icon,
[data-theme="royal"] .services-intro-icon {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

.screen-body {
    padding-top: 16px;
    padding-bottom: 24px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: clip;
}

.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 0 14px;
    min-height: var(--touch-min);
    background: var(--bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-xl);
}

.search-bar input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 15px;
    color: var(--text);
    min-width: 0;
}

.search-bar input:focus {
    outline: none;
}

.search-bar svg {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Services grid (icon + name tiles) */

.empty-state {
    text-align: center;
    padding: 32px 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.empty-state.hidden {
    display: none;
}

/* Service detail sheet */
.sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    z-index: 200;
}

.service-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 201;
    background: var(--surface);
    border-radius: 20px 20px 0 0;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px));
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12);
    animation: sheetUp 0.28s ease;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.service-sheet::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.sheet-form-wrap {
    text-align: left;
    padding: 0 16px 8px;
    max-width: 100%;
    margin: 0 auto;
}

.sheet-form-wrap .sheet-icon-wrap,
.sheet-form-wrap h2,
.sheet-form-wrap .sheet-desc,
.sheet-form-wrap .sheet-order-estimate {
    text-align: center;
}

.service-request-form textarea {
    width: 100%;
    max-width: 100%;
    min-height: 120px;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    box-sizing: border-box;
    resize: vertical;
}

.service-request-form textarea:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(30,90,168,.12);
}

.me-requests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.me-request-item {
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.me-request-item strong {
    font-size: 14px;
    color: var(--text);
}

.me-request-item span {
    font-size: 12px;
    color: var(--text-muted);
}

.me-empty {
    font-size: 14px;
    color: var(--text-muted);
    padding: 12px 0;
    text-align: center;
}

.me-empty.hidden {
    display: none;
}

@keyframes sheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 4px;
    margin: 0 auto 16px;
}

.sheet-content h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.sheet-desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 16px;
}

.sheet-icon-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

/* Me screen � avatar + name always visible on Me tab */
.me-profile,
#meTopProfile,
#meTopProfile.hidden {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
    width: 100%;
    max-width: 100%;
    padding: 8px 0 12px;
    visibility: visible !important;
    opacity: 1 !important;
}

.me-avatar-wrap,
#meAvatarBtn,
#meAvatar {
    visibility: visible !important;
}

.me-avatar-wrap {
    position: relative;
    display: flex !important;
    justify-content: center;
}

.me-avatar-btn {
    position: relative;
    display: flex !important;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    padding: 0;
    cursor: pointer;
    font-family: inherit;
}

.me-avatar-btn.me-avatar-readonly .me-avatar-edit {
    display: none;
}

.me-profile .screen-title,
.me-profile .screen-sub {
    text-align: center;
}

.me-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: var(--blue-light);
    color: var(--blue);
    display: flex !important;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 3px solid var(--surface);
    box-shadow: var(--shadow);
}

.me-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.me-avatar-img.hidden {
    display: none !important;
}

.me-avatar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.me-avatar-icon.me-avatar-initials {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--blue);
}

.me-avatar-icon.hidden {
    display: none !important;
}

.me-avatar-edit {
    position: absolute;
    right: -2px;
    bottom: -2px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
    box-shadow: var(--shadow-sm);
    pointer-events: none;
}

.me-section {
    margin-bottom: 24px;
}

.me-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-align: center;
}

.me-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.me-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    min-height: var(--touch-min);
}

.me-link svg {
    color: var(--blue);
}

.me-footer {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    padding: 16px 0 8px;
}

.me-settings {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    min-height: var(--touch-min);
}

.setting-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.me-lang-head {
    margin-bottom: 0;
}

.me-lang-view {
    margin-top: 10px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.me-lang-current {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.me-lang-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.me-lang-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    text-align: left;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    min-height: var(--touch-min);
    transition: border-color var(--transition), background var(--transition);
}

.me-lang-choice.active {
    border-color: var(--blue);
    background: var(--blue-light);
}

.me-lang-choice-code {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 800;
    color: var(--blue);
    background: var(--bg);
    flex-shrink: 0;
}

.me-lang-choice.active .me-lang-choice-code {
    background: var(--blue);
    color: #fff;
}

.me-lang-choice-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.me-lang-cancel {
    width: 100%;
    margin-top: 4px;
}

.me-settings .lang-toggle {
    flex-shrink: 0;
}

.me-section-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: -12px 0 12px;
}

.me-theme-head {
    margin-bottom: 0;
}

.me-theme-head .me-label {
    margin-bottom: 0;
    text-align: left;
}

.me-theme-view {
    margin-top: 10px;
    padding: 14px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.me-theme-current {
    display: flex;
    align-items: center;
    gap: 14px;
}

.me-theme-current-swatch {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.me-theme-current-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.me-theme-picker {
    margin-top: 10px;
}

.me-theme-picker-hint {
    margin: 0 0 10px;
    text-align: left;
}

.me-theme-cancel {
    width: 100%;
    margin-top: 12px;
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.theme-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
    min-height: var(--touch-min);
}

.theme-card:active {
    transform: scale(0.98);
}

.theme-card.active {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(30, 90, 168, 0.15);
}

.theme-swatch {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--swatch-a) 0%, var(--swatch-b) 100%);
    box-shadow: var(--shadow-sm);
    border: 2px solid rgba(255, 255, 255, 0.35);
}

.theme-card-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    line-height: 1.2;
}

.setting-row-toggle {
    cursor: pointer;
    align-items: center;
}

.setting-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.setting-hint {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.35;
}

.setting-switch {
    position: relative;
    flex-shrink: 0;
    width: 48px;
    height: 28px;
}

.setting-switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.setting-switch-track {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: var(--radius-xl);
    background: var(--border);
    transition: background var(--transition);
    position: relative;
}

.setting-switch-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    transition: transform var(--transition);
}

.setting-switch input:checked + .setting-switch-track {
    background: var(--blue);
}

.setting-switch input:checked + .setting-switch-track::after {
    transform: translateX(20px);
}

.setting-switch input:focus-visible + .setting-switch-track {
    outline: 2px solid var(--blue);
    outline-offset: 2px;
}

.me-account-form {
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.me-account-form .btn,
.me-account-form .form-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    margin-inline: auto;
    text-align: center;
}

/* Themes */
[data-theme="dark"] {
    --bg:          #0F1419;
    --surface:     #1A2332;
    --text:        #E8ECF0;
    --text-muted:  #9CA3AF;
    --border:      #2D3748;
    --blue-light:  rgba(30, 90, 168, 0.25);
    --green-light: rgba(46, 175, 90, 0.2);
    --gold-light:  rgba(245, 166, 35, 0.15);
    --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow:      0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg:   0 8px 32px rgba(0, 0, 0, 0.35);
    --wallet-gradient: linear-gradient(145deg, #1A2332 0%, #1E5AA8 55%, #2EAF5A 100%);
    --hub-gradient: linear-gradient(145deg, #1A2332 0%, #1E5AA8 50%, #2EAF5A 100%);
    --hub-shell-gradient: linear-gradient(135deg, #1E5AA8 0%, #2EAF5A 60%, #F5A623 100%);
}

[data-theme="ocean"] {
    --blue:        #0891B2;
    --blue-dark:   #0E7490;
    --blue-light:  #E0F7FA;
    --green:       #06B6D4;
    --green-dark:  #0891B2;
    --green-light: #CFFAFE;
    --bg:          #F0F9FF;
    --surface:     #FFFFFF;
    --text:        #0C4A6E;
    --text-muted:  #64748B;
    --border:      #BAE6FD;
    --wallet-gradient: linear-gradient(145deg, #0E7490 0%, #0891B2 50%, #06B6D4 100%);
}

[data-theme="sunset"] {
    --blue:        #EA580C;
    --blue-dark:   #C2410C;
    --blue-light:  #FFEDD5;
    --green:       #F59E0B;
    --green-dark:  #D97706;
    --green-light: #FEF3C7;
    --gold:        #FBBF24;
    --bg:          #FFFBEB;
    --surface:     #FFFFFF;
    --text:        #431407;
    --text-muted:  #78716C;
    --border:      #FED7AA;
    --wallet-gradient: linear-gradient(145deg, #C2410C 0%, #EA580C 50%, #F59E0B 100%);
}

[data-theme="forest"] {
    --blue:        #15803D;
    --blue-dark:   #166534;
    --blue-light:  #DCFCE7;
    --green:       #22C55E;
    --green-dark:  #16A34A;
    --green-light: #BBF7D0;
    --bg:          #F0FDF4;
    --surface:     #FFFFFF;
    --text:        #14532D;
    --text-muted:  #64748B;
    --border:      #BBF7D0;
    --wallet-gradient: linear-gradient(145deg, #166534 0%, #15803D 50%, #22C55E 100%);
}

[data-theme="royal"] {
    --blue:        #7C3AED;
    --blue-dark:   #6D28D9;
    --blue-light:  rgba(124, 58, 237, 0.2);
    --green:       #A78BFA;
    --green-dark:  #8B5CF6;
    --green-light: rgba(167, 139, 250, 0.15);
    --gold:        #FBBF24;
    --bg:          #12082A;
    --surface:     #1E1033;
    --text:        #F3E8FF;
    --text-muted:  #C4B5FD;
    --border:      #4C1D95;
    --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow:      0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg:   0 8px 32px rgba(0, 0, 0, 0.4);
    --wallet-gradient: linear-gradient(145deg, #4C1D95 0%, #7C3AED 50%, #A78BFA 100%);
}

[data-theme="dark"] .bottom-nav,
[data-theme="royal"] .bottom-nav {
    background: rgba(26, 35, 50, 0.96);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.35),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .bottom-nav-home-fab,
[data-theme="royal"] .bottom-nav-home-fab {
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.45),
        0 0 0 5px rgba(26, 35, 50, 0.98);
}

[data-theme="royal"] .bottom-nav {
    background: rgba(30, 16, 51, 0.96);
}

[data-theme="royal"] .bottom-nav-home-fab {
    box-shadow:
        0 8px 20px rgba(76, 29, 149, 0.45),
        0 0 0 5px rgba(30, 16, 51, 0.98);
}

[data-theme="dark"] .form-message.error,
[data-theme="royal"] .form-message.error {
    background: rgba(185, 28, 28, 0.2);
    color: #FCA5A5;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="royal"] input,
[data-theme="royal"] select,
[data-theme="royal"] textarea {
    background: var(--bg);
    color: var(--text);
    border-color: var(--border);
}

[data-theme="dark"] .theme-card.active,
[data-theme="royal"] .theme-card.active {
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.25);
}

/* Display preferences */
[data-text-size="large"] {
    font-size: 17px;
}

[data-text-size="large"] .screen-title {
    font-size: 26px;
}

[data-text-size="large"] .dash-balance-value {
    font-size: 36px;
}

[data-compact="true"] .dash-card {
    padding: 14px;
    margin-bottom: 12px;
}

[data-compact="true"] .me-section {
    margin-bottom: 18px;
}

[data-compact="true"] .setting-row {
    padding: 12px 14px;
}

[data-compact="true"] .screen-body {
    padding-bottom: 12px;
}

[data-reduce-motion="true"] *,
[data-reduce-motion="true"] *::before,
[data-reduce-motion="true"] *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
}

.balance-hidden {
    filter: blur(10px);
    opacity: 0.85;
    user-select: none;
    pointer-events: none;
}

.features-list-compact .feature-item {
    padding: 16px;
}

/* Splash loader */
.app-splash {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    background: var(--bg);
    transition: opacity 0.45s ease, visibility 0.45s ease;
}

.app-splash.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.splash-orbit {
    position: relative;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-splash .splash-orbit {
    width: 260px;
    height: 260px;
}

.splash-logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    animation: splashPulse 1.6s ease-in-out infinite;
}

.app-splash .splash-logo {
    width: 180px;
    height: 180px;
}

.splash-ring {
    position: absolute;
    border-radius: 50%;
    border: 3px solid transparent;
}

.app-splash .splash-ring {
    border-width: 4px;
}

.splash-ring-outer {
    inset: 0;
    border-top-color: var(--blue);
    border-right-color: rgba(30, 90, 168, 0.25);
    animation: splashSpin 1.1s linear infinite;
}

.splash-ring-inner {
    inset: 10px;
    border-bottom-color: var(--green);
    border-left-color: rgba(46, 175, 90, 0.25);
    animation: splashSpin 0.85s linear infinite reverse;
}

.app-splash .splash-ring-inner {
    inset: 22px;
}

.splash-tagline {
    font-family: var(--font-brand);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--blue);
    text-align: center;
}

.splash-tagline span {
    color: var(--green);
    letter-spacing: 0.2em;
}

@keyframes splashSpin {
    to { transform: rotate(360deg); }
}

@keyframes splashPulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.04); }
}

/* Auth screen */
.auth-wrap {
    min-height: auto;
    padding: 20px 16px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 480px;
    margin-inline: auto;
    box-sizing: border-box;
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    text-align: center;
    margin-bottom: 18px;
}

.auth-logo {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin: 0 auto 10px;
    display: block;
}

.auth-orbit {
    flex-shrink: 0;
    align-self: center;
    margin: 0 auto 16px;
}

.auth-orbit .splash-logo {
    width: 104px;
    height: 104px;
}

.auth-title {
    font-family: var(--font-brand);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 4px;
    line-height: 1.2;
    width: 100%;
    text-align: center;
}

.auth-title span {
    color: var(--green);
    letter-spacing: 0.1em;
}

.auth-sub {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    width: 100%;
    max-width: 320px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.auth-accent {
    width: 100vw;
    max-width: 100vw;
    height: 3px;
    margin: 4px 0 18px;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    border: 0;
    border-radius: 0;
    background: linear-gradient(90deg, var(--blue) 0%, var(--green) 100%);
    transform-origin: center;
    animation: authAccentGrow 0.7s ease-out both;
    pointer-events: none;
    flex-shrink: 0;
}

@keyframes authAccentGrow {
    from { transform: scaleX(0.12); opacity: 0.55; }
    to   { transform: scaleX(1);    opacity: 1; }
}

.auth-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    background: var(--surface);
    border: 1px solid #E4E7EC;
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 18px 40px rgba(16, 24, 40, 0.08);
    padding: 24px 22px 16px;
    box-sizing: border-box;
    overflow: visible;
}

.auth-card-title {
    font-size: 18px;
    font-weight: 700;
    text-align: left;
    margin: 0 0 16px;
    color: var(--text);
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 6px 0 0;
    padding: 0 16px;
    border: 1.5px solid var(--blue);
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: none;
}

.auth-submit:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
}

.auth-submit-secondary {
    background: #fff;
    color: var(--blue);
    border-color: var(--blue);
    margin-top: 10px;
}

.auth-submit-secondary:hover {
    background: var(--blue-light);
    color: var(--blue-dark);
}

.auth-text-link {
    display: block;
    width: 100%;
    border: none;
    background: transparent;
    color: var(--blue);
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    padding: 12px 4px 0;
    text-align: center;
}

.auth-register-link {
    color: var(--blue);
    padding-top: 2px;
}

.auth-lang {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin: 16px auto 0;
    padding: 3px;
    border: 1px solid #E4E7EC;
    background: #F2F4F7;
    border-radius: 999px;
    gap: 3px;
}

.auth-lang-btn {
    min-height: 0;
    height: 30px;
    min-width: 68px;
    padding: 0 14px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #667085;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 30px;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.auth-lang-btn[data-lang="sw"]:hover {
    color: var(--green-dark);
}

.auth-lang-btn[data-lang="en"]:hover {
    color: var(--blue);
}

.auth-lang-btn[data-lang="sw"].active {
    background: var(--green);
    color: #fff;
}

.auth-lang-btn[data-lang="en"].active {
    background: var(--blue);
    color: #fff;
}

[data-theme="dark"] .auth-lang {
    background: #1F2937;
    border-color: #2A3548;
}

[data-theme="dark"] .auth-lang-btn {
    color: #98A2B3;
}

.auth-panels {
    flex: 1;
    width: 100%;
    align-self: stretch;
}

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

.auth-panel .form-group {
    margin-bottom: 14px;
}

.auth-panel .form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #344054;
    margin-bottom: 6px;
}

.auth-panel .form-group input,
.auth-panel .form-group select {
    min-height: 46px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    font-size: 15px;
}

.auth-panel .form-group input:focus,
.auth-panel .form-group select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(30, 90, 168, 0.12);
}

.auth-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 0 8px;
}

.auth-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #D0D5DD;
}

.auth-step-dot.active {
    width: 22px;
    background: var(--blue);
}

.auth-step-dot.done {
    background: var(--green);
}

.auth-step-label {
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
    margin: 0 0 14px;
}

.signup-step {
    display: none;
}

.signup-step.active {
    display: block;
}

.form-row {
    display: flex;
    gap: 10px;
}

.form-row .form-group {
    flex: 1;
    min-width: 0;
}

.phone-field {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.phone-country-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 0 0 auto;
    min-width: 108px;
    min-height: 46px;
    padding: 0 10px;
    border: 1px solid #D0D5DD;
    border-radius: 8px;
    background: #F8FAFC;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.phone-country-btn:hover,
.phone-field.is-open .phone-country-btn {
    border-color: var(--blue);
}

.phone-flag {
    font-size: 18px;
    line-height: 1;
}

.phone-flag-img {
    width: 22px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
    display: block;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(16, 24, 40, 0.08);
}

.phone-dial {
    font-variant-numeric: tabular-nums;
}

.phone-caret {
    width: 0;
    height: 0;
    margin-left: 2px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #667085;
}

.phone-local {
    flex: 1;
    min-width: 0;
}

.phone-country-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 20;
    max-height: 240px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #E4E7EC;
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, 0.14);
    padding: 6px;
}

.phone-country-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    padding: 6px 10px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-align: left;
}

.phone-country-option:hover,
.phone-country-option.active {
    background: var(--blue-light);
}

.phone-country-name {
    flex: 1;
    min-width: 0;
}

.phone-country-option .phone-dial {
    color: var(--text-muted);
    font-weight: 600;
}

[data-theme="dark"] .phone-country-btn,
[data-theme="dark"] .phone-country-menu {
    background: #121826;
    border-color: #2A3548;
    color: #fff;
}

.auth-panel .btn,
.auth-panel .form-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    min-height: 48px;
    margin-inline: auto;
    margin-top: 6px;
    margin-bottom: 2px;
    text-align: center;
}

.auth-panel .form-message {
    text-align: center;
    min-height: 0;
    margin-top: 8px;
}

.auth-reset-title,
.auth-card-title {
    font-size: 18px;
    font-weight: 700;
    text-align: left;
    margin: 0 0 14px;
}

.auth-reset-lead {
    font-size: 13px;
    color: var(--text-muted);
    text-align: left;
    line-height: 1.45;
    margin: 0 0 16px;
}

.auth-code-input {
    text-align: center;
    letter-spacing: 0.42em;
    font-size: 22px;
    font-weight: 800;
}

body.auth-mode .app-shell {
    background:
        radial-gradient(900px 420px at 50% -80px, rgba(30, 90, 168, 0.08), transparent 58%),
        #F4F6F8;
}

body.auth-mode .auth-orbit {
    width: 88px;
    height: 88px;
    margin: 0 auto 8px;
}

body.auth-mode .auth-orbit .splash-logo {
    width: 56px;
    height: 56px;
}

body.auth-mode .auth-brand {
    margin-bottom: 16px;
}

body.auth-mode .auth-wrap {
    padding-top: 20px;
    padding-bottom: 24px;
}

body.auth-mode .auth-card {
    max-width: 380px;
    margin-inline: auto;
}

[data-theme="dark"] .auth-card {
    background: #151B28;
    border-color: #2A3548;
}

[data-theme="dark"] .auth-panel .form-group input,
[data-theme="dark"] .auth-panel .form-group select {
    background: #121826;
    border-color: #2A3548;
    color: #fff;
}

[data-theme="dark"] .auth-panel .form-group label {
    color: #D0D5DD;
}

[data-theme="dark"] .auth-submit-secondary {
    background: transparent;
    color: #93C5FD;
    border-color: #3B82F6;
}

/* Buyer orders ecosystem */
.order-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-card {
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.order-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.order-card-top strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.order-summary {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
    margin-bottom: 10px;
}

.order-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.order-amount {
    font-size: 13px;
    font-weight: 700;
    color: var(--blue);
}

.order-status {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: var(--radius-xl);
    flex-shrink: 0;
}

.order-status-pending {
    background: var(--gold-light);
    color: var(--gold-dark);
}

.order-status-processing {
    background: var(--blue-light);
    color: var(--blue);
}

.order-status-completed {
    background: var(--green-light);
    color: var(--green-dark);
}

.order-card-compact {
    padding: 12px 14px;
}

.order-card-compact .order-summary {
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sheet-order-estimate {
    font-size: 14px;
    font-weight: 700;
    color: var(--green-dark);
    margin-bottom: 14px;
    padding: 10px 14px;
    background: var(--green-light);
    border-radius: var(--radius);
    text-align: center;
}

[data-theme="dark"] .sheet-order-estimate {
    color: var(--green);
    background: rgba(46, 175, 90, 0.15);
}

.order-intent {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 8px;
    border-radius: var(--radius-xl);
    flex-shrink: 0;
}

.order-intent-buy {
    background: var(--blue-light);
    color: var(--blue);
}

.order-intent-sell {
    background: var(--green-light);
    color: var(--green-dark);
}

.order-card-foot .order-status {
    display: inline;
    padding: 0;
    background: none;
    font-size: inherit;
    text-transform: none;
    letter-spacing: normal;
    color: var(--text-muted);
}

.intent-toggle {
    width: 100%;
}

/* Auth � mobile center (must stay after .app-screen.active) */
body.auth-mode #screen-auth.active {
    flex: 1;
}

body.auth-mode .auth-wrap {
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    padding-inline: 16px;
    box-sizing: border-box;
    align-items: center;
}

body.auth-mode .auth-brand,
body.auth-mode .auth-panels,
body.auth-mode .auth-panel.active {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

body.auth-mode .auth-card {
    width: 100%;
    max-width: 380px;
    box-sizing: border-box;
}

body.auth-mode .auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

body.auth-mode .auth-orbit {
    margin-inline: auto;
}

body.auth-mode .auth-title,
body.auth-mode .auth-sub {
    text-align: center;
    margin-inline: auto;
}

body.auth-mode .auth-tab {
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* Marketplace ecosystem */
.marketplace-wrap {
    padding: 0 16px 12px;
    text-align: left;
}

.marketplace-head {
    text-align: center;
    margin-bottom: 14px;
}

.marketplace-head h2 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
    letter-spacing: -0.2px;
}

.sheet-desc-box {
    text-align: left;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 14px 16px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--green);
    border-radius: var(--radius);
    margin-bottom: 4px;
}

.sheet-desc-box .sheet-desc {
    font-size: 15px;
    line-height: 1.55;
    word-break: break-word;
}

.sheet-desc-box:has(.sheet-desc:empty) {
    display: none;
}

.marketplace-head .sheet-desc {
    font-size: 14px;
    color: var(--text);
    line-height: 1.55;
    margin: 0;
}

.marketplace-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
    line-height: 1.45;
    padding: 10px 12px;
    background: var(--bg);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}

.marketplace-hint:empty {
    display: none;
}

.marketplace-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 4px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    margin-bottom: 14px;
}

.marketplace-search {
    margin-bottom: 12px;
}

.marketplace-tab {
    padding: 10px 8px;
    border-radius: var(--radius-xl);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    font-family: inherit;
    cursor: pointer;
    min-height: var(--touch-min);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.marketplace-tab.active {
    background: var(--surface);
    color: var(--blue);
    box-shadow: var(--shadow-sm);
}

.marketplace-panel {
    display: none;
}

.marketplace-panel.active {
    display: block;
}

.listing-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(52vh, 480px);
    overflow-y: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.listing-grid::-webkit-scrollbar {
    display: none;
}

.listing-grid-products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    max-height: min(58vh, 560px);
}

.listing-card {
    display: flex;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: transform var(--transition), box-shadow var(--transition);
}

.listing-card:active {
    transform: scale(0.99);
}

.listing-card-product {
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.listing-card-product .listing-card-img,
.listing-card-product .listing-card-img-placeholder {
    width: 100%;
    height: 120px;
    border-radius: 0;
}

.listing-card-product .listing-card-body {
    padding: 10px 10px 12px;
}

.listing-card-product .listing-card-title {
    font-size: 13px;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-card-product .listing-card-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.35;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-card-product .listing-card-foot {
    margin-bottom: 4px;
}

.listing-card-product .listing-card-price {
    font-size: 14px;
    font-weight: 800;
}

.listing-card-product .listing-card-supplier {
    margin-top: 2px;
    font-size: 10px;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    font-weight: 600;
}

.listing-card-img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg);
}

.listing-card-img-placeholder {
    background: linear-gradient(135deg, var(--blue-light), var(--green-light));
}

.listing-card-body {
    flex: 1;
    min-width: 0;
}

.listing-card-supplier {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.listing-card-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
    line-height: 1.25;
}

.listing-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.35;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.listing-card-foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.listing-card-region {
    color: var(--text-muted);
}

.listing-card-price {
    color: var(--green-dark);
    font-size: 13px;
}

.listing-card-cta {
    margin-left: auto;
    font-weight: 700;
    color: var(--blue);
    font-size: 12px;
}

.listing-detail {
    margin-bottom: 16px;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.listing-detail-img {
    width: 100%;
    max-height: 160px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.listing-detail-supplier {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.listing-detail-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.listing-detail-desc,
.listing-detail-meta {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
}

.listing-detail-price {
    font-size: 16px;
    font-weight: 800;
    color: var(--green-dark);
    margin-top: 8px;
}

.mp-back-btn {
    margin-bottom: 10px;
    padding-left: 0;
}

.listing-image-preview {
    margin-top: 8px;
    border-radius: var(--radius);
    overflow: hidden;
    max-height: 120px;
}

.listing-image-preview img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.supplier-listing-form .form-submit,
#serviceRequestForm .form-submit {
    width: 100%;
    max-width: none;
}

.marketplace-sheet .sheet-close {
    width: 100%;
    margin-top: 8px;
}

/* Wallet top-up sheet */
.wallet-sheet .wallet-sheet-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 12px;
    border-radius: 16px;
    background: var(--blue-light);
    color: var(--blue);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wallet-sheet .wallet-sheet-icon-withdraw {
    background: rgba(245, 166, 35, 0.15);
    color: var(--gold, #F5A623);
}

.wallet-sheet .wallet-sheet-icon svg {
    width: 28px;
    height: 28px;
}

.wallet-topup-form .form-group {
    margin-bottom: 14px;
}

.topup-amount-chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.topup-chip {
    padding: 10px 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    min-height: 40px;
}

.topup-chip.active {
    border-color: var(--blue);
    background: var(--blue-light);
    color: var(--blue);
}

.wallet-providers {
    border: none;
    padding: 0;
    margin: 0 0 14px;
    text-align: center;
}

.wallet-providers legend {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    text-align: left;
    width: 100%;
}

.provider-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    justify-items: stretch;
}

.provider-grid-single {
    grid-template-columns: 1fr;
    max-width: 160px;
    margin-inline: auto;
}

.provider-option-single {
    padding: 14px 12px;
    gap: 8px;
    border-color: var(--blue);
    background: var(--blue-light);
}

.provider-option-single:has(input:checked) {
    box-shadow: 0 0 0 2px rgba(30, 90, 168, 0.2);
}

.provider-logo-large {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    background: #fff;
    padding: 4px;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.provider-option-single span {
    font-size: 12px;
    font-weight: 800;
}

.provider-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    width: 100%;
    padding: 6px 2px;
    margin-bottom: 0;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 9px;
    font-weight: 700;
    text-align: center;
    min-height: 0;
    position: relative;
    background: var(--surface);
    box-sizing: border-box;
}

.provider-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.provider-logo {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
    object-position: center center;
    border-radius: 8px;
    flex-shrink: 0;
    margin-inline: auto;
}

.provider-option span {
    display: block;
    width: 100%;
    line-height: 1.1;
    color: var(--text);
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 2px;
    box-sizing: border-box;
}

.provider-option:has(input:checked) {
    border-color: var(--blue);
    background: var(--blue-light);
    box-shadow: 0 0 0 1px rgba(30, 90, 168, 0.12);
}

.provider-option:has(input:checked) span {
    color: var(--blue);
}

.provider-option:active {
    transform: scale(0.97);
}

/* Mini-app manager */
.service-sheet.miniapp-studio-mode .marketplace-tabs {
    display: none;
}

.service-sheet.miniapp-studio-mode .marketplace-head {
    text-align: left;
}

.service-sheet.miniapp-studio-mode .sheet-desc-box {
    background: linear-gradient(135deg, rgba(123, 31, 162, 0.08), rgba(30, 90, 168, 0.06));
    border-color: rgba(123, 31, 162, 0.15);
}

.service-sheet.miniapp-studio-mode #sheetTitle {
    font-family: var(--font-brand);
    color: #6A1B9A;
}

.miniapp-studio-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    margin-bottom: 12px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #F3E5F5 0%, #E8F0FA 100%);
    border: 1px solid rgba(123, 31, 162, 0.12);
}

.miniapp-studio-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 12px;
    background: linear-gradient(145deg, #7B1FA2, #9C27B0);
    color: #fff;
    box-shadow: 0 4px 12px rgba(123, 31, 162, 0.25);
}

.miniapp-studio-icon svg {
    width: 22px;
    height: 22px;
}

.miniapp-studio-title {
    font-family: var(--font-brand);
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 4px;
    color: #4A148C;
}

.miniapp-studio-sub {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-muted);
    margin: 0;
}

.miniapp-hint {
    margin-bottom: 12px;
}

.miniapp-empty-note {
    font-size: 13px;
    color: var(--text-muted);
    margin: -4px 0 12px;
    padding: 10px 12px;
    background: var(--bg);
    border-radius: var(--radius);
    border: 1px dashed var(--border);
}

[data-theme="dark"] .miniapp-studio-banner,
[data-theme="royal"] .miniapp-studio-banner {
    background: linear-gradient(135deg, rgba(123, 31, 162, 0.2), rgba(30, 90, 168, 0.12));
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .miniapp-studio-title,
[data-theme="royal"] .miniapp-studio-title {
    color: #CE93D8;
}

[data-theme="dark"] .service-sheet.miniapp-studio-mode #sheetTitle,
[data-theme="royal"] .service-sheet.miniapp-studio-mode #sheetTitle {
    color: #CE93D8;
}

.miniapp-section-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 12px;
    color: var(--text);
}

.miniapp-signin {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    background: var(--bg);
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
}

.miniapp-preview-wrap {
    margin-bottom: 18px;
}

.miniapp-preview-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-align: left;
}

.miniapp-preview-img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.miniapp-preview-img-placeholder {
    background: linear-gradient(145deg, #F3E5F5, #E1BEE7);
}

.miniapp-preview-body {
    flex: 1;
    min-width: 0;
}

.miniapp-preview-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #F3E5F5;
    color: #7B1FA2;
    margin-bottom: 6px;
}

.miniapp-preview-title {
    display: block;
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
    color: var(--text);
}

.miniapp-preview-tagline {
    font-size: 13px;
    font-weight: 600;
    color: var(--blue);
    margin: 0 0 6px;
}

.miniapp-preview-meta,
.miniapp-preview-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 0 6px;
    line-height: 1.4;
}

.miniapp-preview-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.miniapp-preview-foot strong {
    color: var(--text);
    font-size: 13px;
}

.miniapp-form {
    text-align: left;
}

.marketplace-sheet .marketplace-tabs.hidden {
    display: none;
}

/* Escrow wallet */
.dash-escrow {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.dash-escrow strong {
    color: var(--orange-dark, #c2410c);
    font-weight: 700;
}

/* Order escrow badges */
.order-escrow {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.order-escrow-held {
    background: var(--orange-light, #ffedd5);
    color: var(--orange-dark, #c2410c);
}

.order-escrow-released {
    background: var(--green-light);
    color: var(--green-dark);
}

.order-escrow-refunded {
    background: var(--bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* Order actions & reviews */
.order-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.order-actions .btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    min-height: auto;
}

.review-box {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.review-prompt {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.star-picker {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.star-pick {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--border);
    cursor: pointer;
    padding: 0 2px;
    line-height: 1;
}

.star-pick.active,
.star-pick:hover {
    color: #f59e0b;
}

.review-comment {
    width: 100%;
    margin-bottom: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 13px;
    resize: vertical;
    background: var(--surface);
    color: var(--text);
}

.review-thanks {
    font-size: 13px;
    color: var(--green-dark);
    font-weight: 600;
}

/* Star ratings */
.star-rating {
    display: inline-flex;
    gap: 1px;
    vertical-align: middle;
}

.star-rating .star {
    color: var(--border);
    font-size: 14px;
    line-height: 1;
}

.star-rating .star-on {
    color: #f59e0b;
}

.star-rating-sm .star {
    font-size: 11px;
}

.listing-card-rating {
    display: block;
    margin: 2px 0 4px;
    font-size: 11px;
    color: var(--text-muted);
}

.listing-card-rating small {
    font-size: 10px;
}

/* Supplier dashboard (legacy hooks - see My Hub section above) */

.search-results-section {
    margin-top: 20px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.search-results-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 12px;
    color: var(--text);
}

.search-results-grid {
    max-height: none;
}

.search-result-card {
    text-align: left;
}

.search-result-hub {
    font-size: 11px;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.activity-list-hscroll {
    flex-direction: row;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: 4px;
}

.activity-list-hscroll::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.activity-list-hscroll .activity-card {
    flex: 0 0 240px;
    width: 240px;
    max-width: 78vw;
}

.activity-list-compact .activity-card {
    padding: 10px 12px;
}

.activity-card {
    padding: 12px 14px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.activity-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.activity-card-top strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-align: right;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity-type {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.activity-type-order {
    background: var(--blue-light);
    color: var(--blue);
}

.activity-type-sale {
    background: var(--green-light);
    color: var(--green-dark);
}

.activity-type-listing {
    background: #FEF3C7;
    color: #B45309;
}

.activity-type-topup {
    background: #EDE9FE;
    color: #6D28D9;
}

.activity-type-miniapp {
    background: #F3E5F5;
    color: #7B1FA2;
}

.activity-summary {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0 0 8px;
    line-height: 1.35;
}

.activity-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.activity-amount {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.orders-page-panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 16px;
}

/* Notifications & order badges */
.bottom-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    color: #fff;
    background: var(--orange-dark, #ea580c);
    box-shadow: 0 0 0 2px var(--surface);
}

.bottom-nav-badge {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 16px;
    height: 16px;
    font-size: 9px;
}

.me-tab-title {
    margin: 0;
    padding: 8px 0 4px;
    text-align: center;
}

.me-tab-title.hidden {
    display: none;
}

.me-profile-head {
    margin-bottom: 10px;
}

.me-profile-head .me-label {
    margin-bottom: 0;
    text-align: left;
}

.me-profile-view {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
}

.me-profile-setup-btn {
    width: 100%;
    margin-top: 12px;
}

.me-profile-facts {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.me-profile-fact {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.me-profile-fact dt {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.me-profile-fact dd {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    word-break: break-word;
}

.me-profile-form-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.me-profile-form-actions .btn {
    width: 100%;
}

.me-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    min-width: 0;
}

.me-section-head .me-label {
    margin: 0;
    min-width: 0;
    flex: 1;
}

.me-section-head .link-btn {
    flex-shrink: 0;
}

.me-orders-badge {
    position: static;
    flex-shrink: 0;
}

.order-card-unread {
    border-color: rgba(30, 90, 168, 0.35);
    box-shadow: 0 0 0 1px rgba(30, 90, 168, 0.12);
}

.order-new-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #fff;
    background: var(--blue);
    vertical-align: middle;
}

.app-toast-wrap {
    position: fixed;
    top: calc(12px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 10001;
    width: min(92vw, 360px);
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-toast {
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.app-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.app-toast-success {
    border-left: 4px solid var(--green);
    background: linear-gradient(90deg, rgba(46, 175, 90, 0.1) 0%, var(--surface) 40%);
}

/* --- Responsive: fit all screen sizes without clipping --- */
.dash-card,
.me-settings,
.me-account-form,
.marketplace-wrap,
.services-step-body,
.sheet-form-wrap,
.dash-wallet-wrap,
.home-body {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.setting-row {
    min-width: 0;
}

.setting-row .link-btn {
    flex-shrink: 0;
}

.services-intro-steps {
    overflow: hidden;
}

.me-account-form .form-group input,
.me-account-form .form-group select,
.service-request-form input,
.service-request-form select,
.service-request-form textarea {
    max-width: 100%;
}

@media (max-width: 380px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .services-grid {
        gap: 8px;
    }

    .service-card {
        padding: 10px 4px;
    }

    .service-name {
        font-size: 10px;
    }

    .provider-grid {
        gap: 4px;
    }

    .provider-option {
        padding: 5px 1px;
        font-size: 8px;
    }

    .provider-logo {
        width: 26px;
        height: 26px;
    }

    .services-step {
        font-size: 9px;
        padding: 8px 2px;
        gap: 4px;
    }

    .services-step-num {
        width: 20px;
        height: 20px;
        font-size: 10px;
    }

    .theme-grid {
        gap: 8px;
    }

    .theme-swatch {
        width: 36px;
        height: 36px;
    }
}

@media (min-width: 768px) {
    .container {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Live chat */
.myhub-top-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.myhub-top-copy {
    min-width: 0;
    flex: 1;
}

.chat-bell-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.chat-bell-btn:active { transform: scale(0.96); }

.chat-bell-badge {
    position: absolute;
    top: -4px;
    right: -4px;
}

.chat-inbox-panel { margin-top: 14px; }
.chat-inbox-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0 16px 10px;
}

.chat-thread-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 12px 12px;
}

.chat-thread-item {
    display: flex;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    font-family: inherit;
    color: inherit;
}

.chat-thread-item.has-unread {
    border-color: rgba(30, 90, 168, 0.35);
    background: var(--blue-light, #E8F0FA);
}

.chat-thread-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}

.chat-thread-body { min-width: 0; flex: 1; }
.chat-thread-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 2px;
}
.chat-thread-top strong { font-size: 14px; }
.chat-thread-top time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }
.chat-thread-preview {
    font-size: 13px;
    color: var(--text);
    margin: 0 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-thread-meta { font-size: 11px; color: var(--text-muted); margin: 0; }
.chat-unread-pill {
    display: inline-flex;
    min-width: 18px;
    padding: 0 6px;
    height: 18px;
    border-radius: 999px;
    background: var(--orange-dark, #ea580c);
    color: #fff;
    font-weight: 800;
    align-items: center;
    justify-content: center;
}

.chat-sheet-content { display: flex; flex-direction: column; max-height: min(86vh, 720px); }
.chat-sheet-head {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}
.chat-sheet-titles { flex: 1; min-width: 0; }
.chat-sheet-titles h2 { font-size: 18px; margin: 0; }
.chat-sheet-sub { font-size: 12px; color: var(--text-muted); margin: 2px 0 0; }
.chat-sheet-close { width: auto; margin: 0; padding: 8px 12px; min-height: 36px; }
.chat-back-btn { margin-top: 4px; }

.chat-panel { display: none; flex: 1; min-height: 0; flex-direction: column; }
.chat-panel.active { display: flex; }

.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 4px 12px;
    min-height: 220px;
    max-height: 42vh;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.chat-bubble-row { display: flex; }
.chat-bubble-row.is-mine { justify-content: flex-end; }
.chat-bubble {
    max-width: 82%;
    padding: 10px 12px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
}
.chat-bubble-row.is-mine .chat-bubble {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}
.chat-bubble p { margin: 0; font-size: 14px; line-height: 1.35; white-space: pre-wrap; word-break: break-word; }
.chat-bubble time {
    display: block;
    margin-top: 4px;
    font-size: 10px;
    opacity: 0.7;
}

.chat-composer {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-top: 10px;
    align-items: end;
}
.chat-composer textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    resize: none;
    min-height: 44px;
    background: var(--surface);
    color: var(--text);
}
.chat-vendor-btn {
    width: 100%;
    margin-top: 12px;
}

/* Official Mini-Apps directory */
.official-apps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-bottom: 8px;
}

.official-app-card {
    display: grid;
    grid-template-columns: 52px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.official-app-card:active {
    transform: scale(0.985);
}

.official-app-card:hover {
    border-color: rgba(30, 90, 168, 0.35);
    box-shadow: 0 6px 16px rgba(15, 28, 46, 0.08);
}

.official-app-logo {
    position: relative;
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--app-color, #1E5AA8) 16%, #fff);
    display: grid;
    place-items: center;
    overflow: hidden;
    flex-shrink: 0;
}

.official-app-logo img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    border-radius: 8px;
    position: relative;
    z-index: 2;
    background: #fff;
}

.official-app-initials {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--app-color, #1E5AA8);
    letter-spacing: -0.02em;
    z-index: 1;
}

.official-app-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.official-app-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.official-app-cat {
    font-size: 11px;
    font-weight: 700;
    color: var(--app-color, var(--blue));
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.official-app-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.official-app-cta {
    font-size: 12px;
    font-weight: 700;
    color: var(--blue);
    white-space: nowrap;
}

@media (min-width: 520px) {
    .official-apps-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ============================================================
   My Hub v2 � workspace layout + direct messaging
   ============================================================ */
#screen-myhub.active {
    display: block;
}

.hub2-shell {
    min-height: calc(100dvh - var(--bottom-nav-h) - 24px);
    background:
        radial-gradient(1200px 420px at 10% -10%, rgba(15, 76, 129, 0.14), transparent 55%),
        linear-gradient(180deg, #0f2744 0%, #123456 28%, var(--bg) 28%, var(--bg) 100%);
}

.hub2-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 22px 16px 28px;
    color: #f4f7fb;
}

.hub2-kicker {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.72;
}

.hub2-title {
    margin: 0;
    font-family: var(--font-brand);
    font-size: clamp(26px, 6vw, 34px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.hub2-sub {
    margin: 8px 0 0;
    max-width: 34ch;
    font-size: 13px;
    line-height: 1.45;
    opacity: 0.82;
}

.hub2-msg-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.hub2-msg-btn:active { transform: scale(0.97); }

.hub2-msg-badge {
    position: absolute;
    top: -6px;
    right: -4px;
}

.hub2-body {
    margin-top: -8px;
    padding-bottom: 28px;
}

.hub2-compose {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid rgba(15, 39, 68, 0.08);
    box-shadow: 0 18px 40px rgba(15, 39, 68, 0.12);
    margin-bottom: 16px;
}

.hub2-compose-copy h2 {
    margin: 0 0 4px;
    font-family: var(--font-brand);
    font-size: 18px;
    font-weight: 800;
    color: #0f2744;
    letter-spacing: -0.02em;
}

.hub2-compose-copy p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
}

.hub2-compose-form {
    display: grid;
    gap: 10px;
}

.hub2-field {
    display: grid;
    gap: 6px;
}

.hub2-field > span {
    font-size: 12px;
    font-weight: 700;
    color: #334155;
}

.hub2-field input {
    width: 100%;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid #d7dee8;
    border-radius: 12px;
    background: #f7f9fc;
    font: inherit;
    color: var(--text);
}

.hub2-field input:focus {
    outline: 2px solid rgba(30, 90, 168, 0.25);
    border-color: var(--blue);
    background: #fff;
}

.hub2-compose-submit {
    min-height: 48px;
    border-radius: 12px;
    margin-top: 2px;
}

.hub2-dashboard {
    display: grid;
    gap: 14px;
}

.hub2-signin {
    text-align: center;
    padding: 28px 18px;
    border-radius: 18px;
    background: #fff;
    border: 1px solid var(--border);
}

.hub2-signin-mark {
    width: 58px;
    height: 58px;
    margin: 0 auto 12px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #e8eef7;
    color: #0f2744;
}

.hub2-signin-mark svg { width: 28px; height: 28px; }
.hub2-signin h4 {
    margin: 0 0 6px;
    font-size: 18px;
    color: #0f2744;
}
.hub2-signin p {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 13px;
}

.hub2-profile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #123456 0%, #1e5aa8 100%);
    color: #fff;
}

.hub2-profile-avatar {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.18);
    font-size: 20px;
    font-weight: 800;
    flex-shrink: 0;
}

.hub2-profile-label {
    margin: 0;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.75;
}

.hub2-profile-name {
    margin: 2px 0;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hub2-profile-phone {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

.hub2-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.hub2-metric {
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--border);
}

.hub2-metric-val {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #0f2744;
    letter-spacing: -0.02em;
    margin-bottom: 2px;
}

.hub2-metric-lbl {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hub2-columns {
    display: grid;
    gap: 12px;
}

.hub2-block {
    padding: 14px;
    border-radius: 16px;
    background: #fff;
    border: 1px solid var(--border);
}

.hub2-block-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.hub2-block-head h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: #0f2744;
}

.hub2-count {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e8eef7;
    color: #1e5aa8;
    font-size: 12px;
    font-weight: 800;
}

.hub2-listing-stack,
.hub2-order-stack {
    display: grid;
    gap: 8px;
}

.hub2-listing {
    display: grid;
    gap: 4px;
    padding: 12px;
    border-radius: 12px;
    background: #f7f9fc;
    border: 1px solid #e5ebf3;
}

.hub2-listing-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.hub2-listing strong {
    font-size: 14px;
    color: var(--text);
}

.hub2-listing-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--green-dark);
}

.hub2-empty {
    margin: 0;
    padding: 12px 4px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}

.hub2-chat-sheet .chat-sheet-content {
    background: #f4f7fb;
}

.hub2-chat-head {
    background: #fff;
    border-bottom: 1px solid var(--border);
    margin: -4px -4px 0;
    padding: 8px 4px 12px;
}

.hub2-compose-form-sheet {
    padding: 4px 0 12px;
}

.hub2-chat-threads-wrap {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px dashed #d7dee8;
}

.hub2-chat-threads-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.hub2-chat-threads-head h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    color: #0f2744;
}

.hub2-chat-threads-hint {
    margin: 4px 0 10px;
    font-size: 12px;
    color: var(--text-muted);
}

.hub2-thread-list {
    max-height: 220px;
}

.chat-thread-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--border);
}

.chat-thread-banner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #0f2744;
    color: #fff;
    font-weight: 800;
    flex-shrink: 0;
}

.chat-thread-banner-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.chat-thread-banner-copy strong {
    font-size: 14px;
    color: #0f2744;
}

.chat-thread-banner-copy span {
    font-size: 12px;
    color: var(--text-muted);
}

.hub2-composer {
    background: #fff;
    border-top: 1px solid var(--border);
    margin: 0 -4px -4px;
    padding: 10px 8px calc(10px + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 720px) {
    .hub2-metrics {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    .hub2-columns {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
    .hub2-compose {
        grid-template-columns: 1.1fr 1fr;
        align-items: center;
    }
}

[data-theme="dark"] .hub2-compose,
[data-theme="dark"] .hub2-block,
[data-theme="dark"] .hub2-metric,
[data-theme="dark"] .hub2-signin,
[data-theme="royal"] .hub2-compose,
[data-theme="royal"] .hub2-block,
[data-theme="royal"] .hub2-metric,
[data-theme="royal"] .hub2-signin {
    background: var(--surface);
}

[data-theme="dark"] .hub2-field input,
[data-theme="royal"] .hub2-field input,
[data-theme="dark"] .hub2-listing,
[data-theme="royal"] .hub2-listing {
    background: var(--bg);
}

/* Icon-only sheet back (replaces Close text buttons) */
.sheet-icon-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
}

.sheet-icon-back:active {
    transform: scale(0.94);
    background: var(--bg);
}

.marketplace-head {
    position: relative;
}

.marketplace-head .sheet-icon-back {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}

.sheet-form-wrap {
    position: relative;
}

.sheet-form-wrap > .sheet-icon-back {
    position: absolute;
    top: 4px;
    left: 4px;
    z-index: 2;
}

.hub2-chat-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hub2-chat-head .sheet-icon-back {
    margin-left: -4px;
}

/* Password show/hide (any password input) */
.password-field {
    position: relative;
    display: block;
    width: 100%;
}

.password-field input[type="password"],
.password-field input[type="text"] {
    width: 100%;
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
}

.password-toggle:hover,
.password-toggle:focus-visible {
    background: var(--bg);
    color: var(--text);
    outline: none;
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    display: block;
}

.password-toggle-icon.hidden {
    display: none !important;
}
