* { box-sizing: border-box; font-family: Arial, sans-serif; }
body { margin: 0; background: #eef2ff; color: #111827; }
.mobile-app { max-width: 430px; min-height: 100vh; margin: 0 auto; background: #fff; border: 1px solid #dbeafe; position: relative; }
.topbar { background: linear-gradient(135deg, #0f766e, #2563eb); color: #fff; padding: 14px; }
.topbar-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar h1 { margin: 6px 0 0; font-size: 18px; }
.topbar small { opacity: .95; }
.lang-switch { display: inline-flex; align-items: center; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.38); border-radius: 999px; padding: 2px; gap: 2px; }
.lang-switch-item { min-width: 40px; text-align: center; text-decoration: none; color: #fff; font-size: 11px; font-weight: 700; padding: 5px 8px; border-radius: 999px; transition: background .18s ease, color .18s ease; }
.lang-switch-item.active { background: #fff; color: #1d4ed8; }
.lang-switch-item:not(.active):hover { background: rgba(255,255,255,.15); }
.topbar-app-dl {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    font-size: 12px;
    max-width: 100%;
    line-height: 1.2;
}
.topbar-app-dl-icon { line-height: 1; }
@media (max-width: 380px) {
    .topbar-app-dl-text { display: none; }
}

/* Branch header: compact download (icon only) */
.topbar-branch-dl {
    padding: 4px 7px !important;
    font-size: 15px;
    line-height: 1;
    min-width: auto !important;
    flex-shrink: 0;
}

.app-release-table { width: 100%; margin-bottom: 8px; }
.app-release-table th,
.app-release-table td { vertical-align: middle; }
.app-release-actions { white-space: normal; }
.app-release-actions .inline-form { display: inline-block; margin: 2px 6px 2px 0; vertical-align: middle; }
.app-upload-form { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(0,0,0,.08); }
.app-upload-form label input[type=checkbox] { margin-right: 6px; }
.app-tick { color: #16a34a; font-weight: 700; font-size: 1.15em; }

.topbar-gear {
    font-size: 17px;
    line-height: 1;
    padding: 0;
    min-width: 32px;
    width: 32px;
    opacity: .92;
}
.topbar-gear:hover { opacity: 1; }
.lang-switch--card {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
}
.lang-switch--card .lang-switch-item {
    color: #475569;
    min-width: 86px;
    font-size: 13px;
    padding: 9px 14px;
}
.lang-switch--card .lang-switch-item.active {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}
.lang-switch--card .lang-switch-item:not(.active):hover {
    background: #e2e8f0;
    color: #0f172a;
}
.settings-card .settings-section-title {
    font-size: 15px;
    margin: 0 0 8px;
    font-weight: 800;
    color: #111827;
}
.settings-hint {
    font-size: 12px;
    margin: 0 0 14px;
    line-height: 1.45;
}
.settings-lang {
    margin-top: 4px;
}
.settings-card-muted {
    background: #f8fafc !important;
    border-style: dashed !important;
}
.settings-future {
    margin: 0;
    font-size: 12px;
    text-align: center;
    line-height: 1.4;
}
.balance-chip { position: relative; overflow: hidden; min-width: 118px; justify-content: center; }
.balance-chip--commission { min-width: 132px; }
.card.profile.profile-branch-dash {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}
.card.profile.profile-branch-dash > a {
    flex-shrink: 0;
}
.profile-branch-dash-text {
    flex: 1;
    min-width: 0;
}
.card.profile.profile-branch-dash .balance-chip--commission {
    flex-shrink: 0;
    align-self: center;
}
.balance-chip-text { position: relative; z-index: 2; white-space: nowrap; }
.balance-chip-loader {
    position: absolute;
    top: 0;
    right: -120%;
    width: 120%;
    height: 100%;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.45), rgba(255,255,255,0));
    transform: skewX(-20deg);
    opacity: 0;
}
.balance-chip.is-loading .balance-chip-loader { opacity: 1; animation: balanceLoaderSlide .95s ease-in-out; }
/* Revealed amount: dark text on light surface (cards / white background) */
.balance-chip.is-revealed {
    border-color: #2563eb;
    background: linear-gradient(180deg, #eff6ff, #dbeafe);
    color: #0f172a;
}
.topbar .balance-chip.is-revealed {
    border-color: rgba(255, 255, 255, 0.65);
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}
@keyframes balanceLoaderSlide {
    from { right: -130%; }
    to { right: 130%; }
}
.content { padding: 14px; padding-bottom: 88px; }
.card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 12px; margin-bottom: 12px; background: #fff; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dashboard-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.dashboard-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-height: 74px;
    padding: 9px 8px;
    border-radius: 12px;
    text-decoration: none;
    background: linear-gradient(160deg, #ffffff, #f2f7ff);
    border: 1px solid #dbeafe;
    box-shadow: 0 6px 12px rgba(37,99,235,.08);
    transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
    position: relative;
    overflow: hidden;
}
.dashboard-card::after {
    content: "";
    position: absolute;
    right: -18px;
    bottom: -18px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(37,99,235,.18), rgba(37,99,235,0));
    pointer-events: none;
}
.dashboard-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 16px rgba(37,99,235,.14);
    border-color: #bfdbfe;
    background: linear-gradient(160deg, #ffffff, #ebf3ff);
}
.dashboard-card-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: #fff;
    box-shadow: 0 6px 10px rgba(37,99,235,.22);
}
.dashboard-card-title {
    font-weight: 700;
    font-size: 11px;
    color: #111827;
    line-height: 1.25;
    word-break: break-word;
}
.btn, button { display: inline-flex; align-items: center; justify-content: center; border: 0; background: linear-gradient(135deg, #2563eb, #1d4ed8); color: #fff; padding: 11px 14px; border-radius: 12px; text-decoration: none; cursor: pointer; min-height: 44px; width: 100%; font-weight: 700; box-shadow: 0 6px 14px rgba(37,99,235,.25); transition: transform .15s ease, box-shadow .2s ease; }
.btn:hover, button:hover { transform: translateY(-1px); box-shadow: 0 10px 18px rgba(37,99,235,.22); }
.btn.alt { background: #0f766e; }
.btn.danger { background: #dc2626; }
.btn.csv { background: linear-gradient(135deg, #0ea5e9, #2563eb); }
.btn.pdf { background: linear-gradient(135deg, #22c55e, #15803d); }
.btn.image { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.btn.small { width: auto; min-height: 34px; padding: 6px 10px; border-radius: 9px; font-size: 12px; box-shadow: none; }
/* Ghost: readable on white cards / content */
.btn.ghost {
    background: linear-gradient(180deg, #f8fafc, #eff6ff);
    border: 1px solid #93c5fd;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}
.topbar .btn.ghost {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    box-shadow: none;
}
.btn.ghost:hover {
    border-color: #2563eb;
    background: linear-gradient(180deg, #eff6ff, #dbeafe);
    color: #0f172a;
}
.topbar .btn.ghost:hover {
    background: rgba(255, 255, 255, 0.28);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}
.btn.icon-only { width: 34px; min-width: 34px; padding: 0; font-size: 18px; }
input, select, textarea { width: 100%; padding: 10px; margin-top: 5px; margin-bottom: 10px; border: 1px solid #d1d5db; border-radius: 10px; }
.input-status-wrap { position: relative; }
.input-status-wrap input { padding-right: 36px; }
.input-status-indicator { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 16px; font-weight: 700; pointer-events: none; }
.input-status-indicator.ok { color: #047857; }
.input-status-indicator.bad { color: #b91c1c; }
label { font-size: 13px; font-weight: 700; color: #374151; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { border-bottom: 1px solid #e5e7eb; padding: 8px; text-align: left; }
.table-wrap { width: 100%; overflow: hidden; }
.user-list-table { table-layout: fixed; font-size: 11px; }
.user-list-table th, .user-list-table td { padding: 6px 4px; word-break: break-word; overflow-wrap: anywhere; }
.profile { display: flex; align-items: center; gap: 10px; }
.avatar { width: 60px; height: 60px; border-radius: 50%; object-fit: cover; background: #e5e7eb; }

/* User profile: fixed 2.5×2cm previews; tap photo → edit (✎) icon → pick + crop modal */
.user-profile-page .user-profile-photo-top {
    margin: 0 0 14px;
}
.user-profile-page .user-profile-photo-slot {
    display: inline-block;
    max-width: 100%;
}
.user-profile-page .user-profile-upload-frame {
    position: relative;
    display: inline-block;
    line-height: 0;
    vertical-align: top;
    cursor: pointer;
}
.user-profile-page .user-profile-edit-fab {
    position: absolute;
    bottom: 4px;
    right: 4px;
    z-index: 3;
    width: 28px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.88);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.92);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}
.user-profile-page .user-profile-tap-reveal:focus-within .user-profile-edit-fab,
.user-profile-page .user-profile-tap-reveal:hover .user-profile-edit-fab,
.user-profile-page .user-profile-show-tools .user-profile-edit-fab {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}
.user-profile-page .user-profile-upload-hint {
    margin: 8px 0 0;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    line-height: 1.35;
    max-width: 18rem;
}
/* Crop modal (profile page) */
.crop-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 4000;
    background: rgba(15, 23, 42, 0.55);
}
.crop-modal {
    position: fixed;
    inset: 0;
    z-index: 4001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    pointer-events: none;
}
.crop-modal[hidden],
.crop-modal-backdrop[hidden] {
    display: none !important;
}
.crop-modal-panel {
    pointer-events: auto;
    width: min(100%, 480px);
    max-height: min(92vh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}
.crop-modal-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}
.crop-modal-help {
    margin: 0 0 10px;
    font-size: 12px;
}
.crop-modal-image-wrap {
    max-height: min(52vh, 420px);
    background: #0f172a;
    border-radius: 8px;
    overflow: hidden;
}
.crop-modal-img {
    display: block;
    max-width: 100%;
}
.crop-modal-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}
.user-profile-page .user-profile-avatar-square {
    width: 2.5cm;
    height: 2cm;
    max-width: 100%;
    box-sizing: border-box;
    border-radius: 4px;
    object-fit: cover;
    object-position: center top;
    background: #e5e7eb;
    display: block;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}
.user-profile-page .user-profile-nominee-block {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
}
.user-profile-page .user-profile-subheading {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 800;
    color: #1f2937;
}
.user-profile-page .user-profile-nominee-photo-wrap {
    margin-bottom: 12px;
}
.user-profile-page .user-profile-nominee-preview {
    width: 2.5cm;
    height: 2cm;
    max-width: 100%;
}
/* Placeholder when no profile photo — silhouette + shadow, grayscale cue */
.avatar.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(165deg, #f3f4f6 0%, #d1d5db 55%, #9ca3af 100%);
    border: 2px solid rgba(255, 255, 255, 0.75);
    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.9),
        0 8px 18px rgba(15, 23, 42, 0.22),
        0 2px 6px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    color: #6b7280;
    filter: grayscale(1);
}
.avatar.avatar-placeholder .avatar-ph-icon {
    width: 68%;
    height: 68%;
    opacity: 0.55;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.22));
}
.member-view-page {
    font-size: 12px;
    line-height: 1.45;
}
.member-view-page .wreq-line {
    font-size: 11px;
    margin: 4px 0;
}
.member-view-page .member-view-h3 {
    font-size: 13px;
    margin: 0 0 8px;
}
.member-view-page .muted,
.member-view-page .member-view-muted {
    font-size: 11px;
}
.member-view-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}
.member-view-head .member-view-head-text b {
    font-size: 14px;
}
.member-view-page .stats {
    font-size: 11px;
}
.member-view-page .stat b {
    font-size: 13px;
}
.member-view-page .stat .muted {
    font-size: 10px;
}
.member-view-pw-box {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 11px;
    line-height: 1.4;
}
.member-view-pw-code {
    margin-top: 8px;
    font-family: ui-monospace, monospace;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.06em;
    word-break: break-all;
}
.member-view-actions .member-view-reset-btn {
    margin-top: 6px;
    max-width: 100%;
}
/* User list: full-width row = one tap target (admin + branch) */
.user-list-wide-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 8px;
}
.user-list-row-head {
    display: grid;
    gap: 6px;
    padding: 0 12px 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    min-width: min(100%, 380px);
}
.user-list-row-head--admin {
    grid-template-columns: 0.65fr 1.1fr 1fr 0.95fr 0.85fr;
}
.user-list-row-head--admin-flex {
    display: flex;
    gap: 8px;
    align-items: end;
    padding: 0 12px 6px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #6b7280;
    min-width: min(100%, 380px);
}
.user-list-row-head--admin-flex .user-list-row-head-main {
    flex: 1;
    min-width: 0;
    display: grid;
    gap: 6px;
    grid-template-columns: 0.65fr 1.1fr 1fr 0.95fr 0.85fr;
}
.user-list-row-head-branch-col {
    width: 72px;
    flex-shrink: 0;
    text-align: center;
    font-size: 9px;
    line-height: 1.2;
}
.user-list-row-admin-line {
    display: flex;
    gap: 8px;
    align-items: stretch;
    min-width: min(100%, 400px);
}
.user-list-row-admin-line .user-list-row-btn--admin {
    flex: 1;
    min-width: 0;
}
.branch-toggle-cell {
    width: 72px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.branch-enabled-form {
    margin: 0;
}
.branch-enabled-form .btn.small {
    padding: 6px 8px;
    font-size: 10px;
}
.user-list-row-head--branch {
    grid-template-columns: 0.48fr 0.88fr 0.82fr 0.78fr 0.65fr 0.72fr;
}
.user-list-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.user-list-row-btn {
    display: grid;
    gap: 6px;
    align-items: center;
    min-width: min(100%, 400px);
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    color: inherit;
    text-decoration: none;
    font-size: 11px;
    line-height: 1.3;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}
.user-list-row-btn:hover,
.user-list-row-btn:focus {
    border-color: #93c5fd;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.14);
    outline: none;
}
.user-list-row-btn:active {
    transform: scale(0.996);
}
.user-list-row-btn--admin {
    grid-template-columns: 0.65fr 1.1fr 1fr 0.95fr 0.85fr;
}
.user-list-row-btn--branch {
    grid-template-columns: 0.48fr 0.88fr 0.82fr 0.78fr 0.65fr 0.72fr;
}
.user-list-row-btn .ul-clip {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.top-avatar { width: 46px; height: 46px; border: 2px solid rgba(255,255,255,.7); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.stat { border-radius: 10px; background: #f9fafb; padding: 10px; border: 1px solid #e5e7eb; }

/* User dashboard: long amounts stay inside balance tiles */
.user-dash-balance .stat {
    min-width: 0;
    padding: 8px;
}
.user-dash-balance .user-dash-money {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.25;
    word-break: break-all;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
}
.user-dash-balance .stat .muted {
    font-size: 10px;
    margin-top: 4px;
    line-height: 1.2;
}

/* User savings / purchases / credit summary lines */
.user-mini-summary .user-inline-money {
    font-size: 11px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    word-break: break-all;
    overflow-wrap: anywhere;
}

/* User purchase table: narrow money columns so “Final” does not spill */
.user-purchases-table {
    font-size: 10px;
}
.user-purchases-table th,
.user-purchases-table td {
    padding: 5px 3px;
    vertical-align: top;
}
.user-purchases-table th:nth-child(2),
.user-purchases-table td:nth-child(2) {
    word-break: break-word;
    overflow-wrap: anywhere;
}
.user-purchases-table .td-money,
.user-purchases-table .td-money-final {
    text-align: right;
    white-space: normal;
}
.user-purchases-table .td-money {
    font-size: 10px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.025em;
    word-break: break-all;
    overflow-wrap: anywhere;
}
.user-purchases-table .td-money-final {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: -0.035em;
}
.table-wrap-user-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.user-withdraw-table .td-money,
.user-savings-table .td-money,
.user-credit-table .td-money {
    text-align: right;
    font-size: 11px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
    word-break: break-all;
    overflow-wrap: anywhere;
}
.muted { color: #6b7280; font-size: 12px; }
.error { color: #b91c1c; font-weight: 700; }
.success { color: #047857; font-weight: 700; }
.bottom-nav { 
    position: fixed; 
    bottom: 0; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 100%; 
    max-width: 430px; 
    display: grid; 
    grid-template-columns: repeat(5, 1fr); 
    gap: 8px; 
    background: rgba(255,255,255,.94); 
    backdrop-filter: blur(14px);
    border-top: 1px solid rgba(209,213,219,.65); 
    padding: 10px 10px 12px; 
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -16px 44px rgba(17,24,39,.12);
    z-index: 30;
    overflow: visible;
}

.bottom-nav-indicator{
    position: absolute;
    top: 8px;
    left: 0;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    background: linear-gradient(135deg, #7c3aed, #2563eb, #06b6d4);
    box-shadow: 0 16px 34px rgba(37,99,235,.24);
    transform: translateX(calc(var(--x, 0px) - 26px));
    z-index: 0;
    pointer-events: none;
}
.bottom-nav.ready .bottom-nav-indicator{
    transition: transform .42s cubic-bezier(.2,.95,.2,1);
}
.bottom-nav.no-active .bottom-nav-indicator{
    opacity: 0;
    transform: translateX(-999px);
}

.bottom-nav-indicator::after{
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 52px;
    height: 52px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,.85);
    transform: translate(-50%, -50%) scale(.55);
    opacity: 0;
}

.bottom-nav.wave .bottom-nav-indicator::after{
    animation: bottomNavRipple .65s ease-out;
}

@keyframes bottomNavRipple{
    0% { opacity: .85; transform: translate(-50%, -50%) scale(.55); }
    55% { opacity: .25; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.35); }
}
.bottom-nav a { 
    text-align: center; 
    font-size: 9px; 
    text-decoration: none; 
    color: #1f2937; 
    background: rgba(238,242,255,.75); 
    padding: 6px 1px 5px; 
    border-radius: 14px; 
    font-weight: 700; 
    display: flex; 
    flex-direction: column; 
    gap: 1px; 
    align-items: center; 
    justify-content: center; 
    min-height: 48px; 
    border: 1px solid rgba(219,234,254,.85);
    transition: transform .28s cubic-bezier(.2,.95,.2,1), color .18s ease, opacity .18s ease;
    position: relative;
    overflow: visible;
    z-index: 1;
}
.bottom-nav a span { 
    font-size: 16px; 
    line-height: 1; 
    transition: transform .28s cubic-bezier(.2,.95,.2,1), filter .28s cubic-bezier(.2,.95,.2,1), background .18s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 14px;
    background: rgba(238,242,255,.9);
}
.bottom-nav a.active{
    color: #fff;
    background: transparent;
    border-color: transparent;
}
.bottom-nav a.active span{
    background: rgba(255,255,255,.98);
    transform: translateY(-5px) scale(1.03);
    filter: drop-shadow(0 7px 10px rgba(0,0,0,.13));
}
.bottom-nav a.clicked{
    animation: bottomNavTap .22s ease;
}
@keyframes bottomNavTap {
    0% { transform: scale(1); }
    45% { transform: scale(.96); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce){
    .bottom-nav.ready .bottom-nav-indicator{ transition: none; }
    .bottom-nav a, .bottom-nav a span{ transition: none; }
    .bottom-nav a.clicked{ animation: none; }
}

.download-actions{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 8px 0;
}

.bottom-nav a.bottom-nav-center{
    min-height: 66px;
    padding-top: 10px;
}
.bottom-nav a.bottom-nav-center span{
    width: 38px;
    height: 38px;
    border-radius: 18px;
}

.bottom-nav a.bottom-nav-plus{
    min-height: 56px;
}
.bottom-nav a.bottom-nav-plus span{
    width: 36px;
    height: 36px;
    border-radius: 16px;
}
.product-row { border: 1px solid #dbeafe; border-radius: 12px; padding: 10px; margin-bottom: 10px; background: linear-gradient(180deg, #f8fbff, #f3f7ff); }
.qty-wrap { display: grid; grid-template-columns: 40px 1fr 40px; gap: 8px; align-items: center; }
.qty-wrap input { margin: 0; text-align: center; }
.total-box { border: 1px dashed #93c5fd; border-radius: 12px; padding: 10px; background: #eff6ff; font-weight: 700; }
.cart-preview { border: 1px solid #cfe3d5; border-radius: 14px; padding: 10px; margin-bottom: 10px; background: #f3faf5; }
.cart-preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 13px; color: #14532d; }
.cart-badge { background: #dcfce7; border: 1px solid #86efac; color: #166534; border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.cart-list-empty { font-size: 12px; color: #6b7280; background: #fff; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 10px; }
.cart-list { display: grid; gap: 8px; }
.cart-item { background: #fff; border: 1px solid #d1fae5; border-radius: 12px; padding: 9px; display: flex; align-items: center; gap: 10px; box-shadow: 0 8px 18px rgba(16, 185, 129, 0.08); }
.cart-item-icon { width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; background: #ecfdf5; border: 1px solid #a7f3d0; }
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-title { font-size: 13px; font-weight: 700; color: #111827; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #4b5563; }
.cart-item-amount { text-align: right; }
.cart-item-amount small { display: block; font-size: 10px; color: #6b7280; }
.cart-item-amount strong { font-size: 13px; color: #166534; }
.cart-summary { border-top: 1px dashed #9ae6b4; margin-top: 8px; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; }
.cart-summary small { display: block; font-size: 11px; color: #6b7280; }
.cart-summary strong { font-size: 14px; color: #111827; }
.cart-summary-price strong { color: #166534; }
.card-summary { margin-top: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-form { margin: 6px 0 10px; }
.inline-form .btn { min-height: 34px; padding: 7px 10px; width: auto; border-radius: 9px; box-shadow: none; }
.search-select { position: relative; margin-bottom: 10px; }
.search-select-trigger { background: #fff; color: #374151; border: 1px solid #d1d5db; box-shadow: none; font-weight: 500; justify-content: flex-start; }
.search-select-list { display: none; position: absolute; left: 0; right: 0; top: calc(100% - 6px); z-index: 30; max-height: 220px; overflow: auto; background: #fff; border: 1px solid #d1d5db; border-radius: 10px; box-shadow: 0 12px 20px rgba(0,0,0,.08); padding: 6px; }
.search-select.open .search-select-list { display: block; }
.search-select-input { margin: 0 0 8px; }
.search-select-item { width: 100%; text-align: left; border: 0; background: #f9fafb; color: #111827; border-radius: 8px; padding: 8px; margin-bottom: 6px; box-shadow: none; min-height: 0; }
.search-select-item:last-child { margin-bottom: 0; }
.item-edit-form { padding: 10px; border: 1px solid #d1fae5; }
.qty-inline { display: grid; grid-template-columns: 40px 1fr 40px; gap: 8px; align-items: center; }
.qty-inline input { margin: 0; text-align: center; }
.qty-inline .btn.small { width: 40px; min-width: 40px; padding: 0; min-height: 38px; }
.cart-line { border: 1px solid #d1fae5; border-radius: 12px; background: #fff; padding: 10px; box-shadow: 0 6px 12px rgba(16, 185, 129, 0.08); }
.cart-line-top { display: grid; grid-template-columns: 1.8fr 40px 72px 40px 92px 110px; gap: 6px; align-items: center; margin-bottom: 8px; }
.cart-line-bottom { display: grid; grid-template-columns: 1fr 1fr 1fr 110px 90px; gap: 6px; align-items: center; }
.cart-line input, .cart-line select { margin: 0; }
.btn-line { min-height: 38px; padding: 0 8px; border-radius: 8px; }
.item-delete-form .btn-line { width: auto; min-width: 78px; }
.action-inline { display: grid; gap: 4px; min-width: 88px; }
.action-inline button, .action-inline .btn { min-height: 30px; padding: 5px 8px; font-size: 11px; border-radius: 8px; box-shadow: none; }
/* Commission-withdraw request cards (branch + admin): body full width above action row */
.withdraw-req-stack { display: flex; flex-direction: column; gap: 8px; }
.withdraw-req-card {
    padding: 8px 11px 10px;
    margin-bottom: 0;
    border-radius: 11px;
    border-color: #e8edf5;
    background: linear-gradient(180deg, #ffffff 0%, #fafbff 100%);
}
.withdraw-req-body {
    width: 100%;
    display: block;
}
.withdraw-req-card .withdraw-req-serial {
    font-size: 11px;
    font-weight: 800;
    color: #1d4ed8;
    letter-spacing: 0.02em;
    margin: 0 0 6px 0;
    padding-bottom: 6px;
    border-bottom: 1px dashed #dbeafe;
}
.withdraw-req-card .wreq-line {
    margin: 0 0 4px 0;
    font-size: 13px;
    line-height: 1.42;
    color: #111827;
    word-break: break-word;
    overflow-wrap: anywhere;
}
.withdraw-req-card .wreq-line strong {
    color: #4b5563;
    font-weight: 700;
}
.withdraw-req-card .wreq-line-amount {
    margin-top: 4px !important;
    font-weight: 700;
    color: #0369a1;
    font-size: 14px;
}
.withdraw-req-card .wreq-line-date {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px !important;
}
.wreq-empty {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}
.withdraw-req-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 12px;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e5e7eb;
}
.withdraw-req-actions button,
.withdraw-req-actions .btn {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    min-height: 36px;
    font-size: 12px;
    font-weight: 800;
    padding: 8px 12px;
    border-radius: 11px;
    box-shadow: 0 3px 8px rgba(37, 99, 235, 0.15);
}
.withdraw-req-actions button[type="submit"]:not(.danger) {
    background: linear-gradient(135deg, #22c55e, #15803d);
    border: 0;
    color: #fff;
}
.withdraw-req-actions button.btn.danger {
    background: linear-gradient(135deg, #fb7185, #dc2626);
    border: 0;
    color: #fff;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.2);
}
.withdraw-req-form-card label { margin-top: 4px; }
.withdraw-req-form-card input,
.withdraw-req-form-card select { margin-bottom: 8px; }
.withdraw-req-form-card button { margin-top: 6px; }
.wreq-note { font-size: 12px; margin: -2px 0 8px !important; line-height: 1.4; }
.wreq-compact-head { font-size: 13px; margin-bottom: 8px !important; line-height: 1.45; }
.wreq-history-title {
    margin: 0 0 4px 2px;
    font-size: 12px;
    font-weight: 700;
}

/* Admin — Add Money Requests (matches withdraw-req card style) */
.money-req-filter-card {
    padding: 10px 12px;
    margin-bottom: 10px;
}
.money-req-filter-form {
    display: grid;
    gap: 8px;
}
.money-req-filter-form label {
    margin: 0;
    font-size: 12px;
}
.money-req-filter-form select {
    margin: 4px 0 0;
    padding: 9px 10px;
    font-size: 13px;
}
.money-req-filter-form button {
    margin-top: 4px;
    min-height: 40px;
    font-size: 13px;
}
.money-req-stack {
    margin-top: 0;
}
.money-req-card .money-req-pending-form {
    display: block;
    margin: 0;
}
.money-req-note-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #4b5563;
    margin: 8px 0 4px;
}
.money-req-note-input {
    width: 100%;
    margin: 0 0 0 !important;
    padding: 9px 10px;
    font-size: 13px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
}
.money-req-pending-form .withdraw-req-actions {
    margin-top: 10px;
}

/* Admin — Head Office Deposits list (same card UX as Add Money Requests) */
.hod-admin-filter .hod-admin-total {
    margin: 12px 0 10px;
    font-size: 13px;
    line-height: 1.45;
}
.hod-admin-report-btn {
    display: flex !important;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    min-height: 44px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border: 0;
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.22);
}
.hod-dep-card .hod-dep-review-form .money-req-note-label:first-of-type {
    margin-top: 4px;
}

/* Branch — Head Office Deposit (overview + form) */
.hod-page {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hod-flash {
    padding: 10px 12px;
    margin-bottom: 0;
}
.hod-flash-msg {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}
.hod-summary-card {
    padding: 14px 14px 16px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: linear-gradient(165deg, #ffffff 0%, #f4f8ff 50%, #fafbff 100%);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.06);
}
.hod-page-title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.hod-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.hod-stat {
    border-radius: 12px;
    padding: 11px 10px 12px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}
.hod-stat-head {
    display: flex;
    align-items: flex-start;
    gap: 6px;
}
.hod-stat-icon {
    font-size: 17px;
    line-height: 1;
    flex-shrink: 0;
}
.hod-stat-label {
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}
.hod-stat-sub {
    font-size: 9px;
    margin: -4px 0 0;
    line-height: 1.2;
}
.hod-stat-value {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.01em;
}
.hod-stat-value--highlight {
    color: #0369a1;
    font-size: 16px;
}
.hod-stat--collection {
    border-left: 3px solid #3b82f6;
}
.hod-stat--sales {
    border-left: 3px solid #8b5cf6;
}
.hod-stat--pending-dep {
    border-left: 3px solid #f59e0b;
}
.hod-stat--available {
    border-left: 3px solid #10b981;
    background: linear-gradient(180deg, #f0fdf9 0%, #ffffff 55%);
}

.hod-form-card {
    padding: 14px 14px 16px;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}
.hod-section-title {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 800;
    color: #111827;
}
.hod-branch-pill {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 8px;
    padding: 8px 12px;
    margin: 0 0 16px;
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    background: #f1f5f9;
    border-radius: 999px;
    border: 1px solid #e2e8f0;
}
.hod-branch-pill-k {
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.hod-branch-pill-tag {
    font-size: 10px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, #dbeafe, #eff6ff);
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
}
.hod-form .hod-form-block {
    margin-bottom: 14px;
}
.hod-form .hod-form-block:last-of-type {
    margin-bottom: 6px;
}
.hod-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 4px;
}
.hod-form .hod-input {
    margin-top: 0;
    margin-bottom: 0;
    padding: 11px 12px;
    font-size: 14px;
    border-radius: 11px;
    border: 1px solid #d1d5db;
}
.hod-field-hint {
    margin: 6px 0 0;
    font-size: 11px;
    color: #64748b;
    font-weight: 600;
}
.hod-custom-dates {
    margin-bottom: 14px !important;
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
}
.hod-custom-dates .hod-label {
    margin-top: 8px;
}
.hod-custom-dates .hod-label:first-child {
    margin-top: 0;
}
.hod-submit {
    margin-top: 18px;
    border-radius: 13px;
    min-height: 48px;
    font-size: 14px;
    font-weight: 800;
    background: linear-gradient(135deg, #0f766e, #2563eb);
    border: 0;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

.hod-report-card {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #bfdbfe;
    background: linear-gradient(135deg, #eff6ff 0%, #ffffff 55%);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.08);
}
.hod-report-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
}
.hod-report-title {
    display: block;
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}
.hod-report-desc {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
}
.hod-report-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 46px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 13px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    border: 0;
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.28);
    text-decoration: none;
    color: #fff !important;
}
.hod-report-btn-icon {
    font-size: 16px;
}
