/* ============================================================
   REMLEK — Main App Stylesheet (Dark Mode)
   ============================================================ */

/* ── GOOGLE FONTS ────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:wght@400;600;700;800&family=DM+Sans:wght@400;500;600&display=swap');

/* ── CSS VARIABLES ───────────────────────────────────────── */
:root {
    --color-bg:         #0B0F1A;
    --color-surface:    #141926;
    --color-surface2:   #1E2538;
    --color-border:     #2A3350;
    --color-primary:    #1A3CFF;
    --color-primary-dark: #1230CC;
    --color-accent:     #00D68F;
    --color-text:       #F0F4FF;
    --color-text-muted: #8A9BC4;
    --color-warning:    #F5A623;
    --color-error:      #FF4C6A;
    --color-success:    #00D68F;
    --gradient-primary: linear-gradient(135deg, #1A3CFF, #6C2BD9);
    --gradient-hero:    linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);

    --radius-sm:  4px;
    --radius-md:  6px;
    --radius-lg:  10px;
    --radius-xl:  12px;

    --shadow-card:  0 2px 8px rgba(0,0,0,0.18);
    --shadow-sheet: 0 -4px 20px rgba(0,0,0,0.35);

    --nav-height:    64px;
    --header-height: 60px;

    --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
    --font-body:    'DM Sans', system-ui, sans-serif;

    --transition-fast: 150ms ease;
    --transition-std:  250ms ease;
    --transition-slow: 350ms cubic-bezier(0.34,1.56,0.64,1);
}

/* ── RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    overflow-x: hidden;
    overscroll-behavior: none;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input, textarea, select {
    font-family: inherit;
    font-size: 16px;
    color: var(--color-text);
    background: var(--color-surface2);
}
img { display: block; max-width: 100%; }

/* ── APP WRAPPER ─────────────────────────────────────────── */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    max-width: 480px;
    margin: 0 auto;
    position: relative;
    background: var(--color-bg);
}

/* ── TOP APP BAR ─────────────────────────────────────────── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--header-height);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}
.app-header__logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.app-header__greeting {
    font-size: 13px;
    color: var(--color-text-muted);
    text-align: right;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── TAB CONTENT ─────────────────────────────────────────── */
#tab-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: calc(var(--nav-height) + 16px);
    -webkit-overflow-scrolling: touch;
}

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── BOTTOM NAV ──────────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    height: var(--nav-height);
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    display: flex;
    z-index: 200;
}
.nav-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
    position: relative;
}
.nav-tab.active {
    color: var(--color-primary);
}
.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
}
.nav-tab__icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.nav-tab__icon svg { width: 22px; height: 22px; }
.nav-tab__label { font-size: 11px; font-weight: 500; }
.nav-badge {
    display: none;
    position: absolute;
    top: -3px;
    right: -5px;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    background: #EF4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    padding: 0 3px;
    pointer-events: none;
}

/* ── CARDS ───────────────────────────────────────────────── */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* ── BUSINESS CARD ───────────────────────────────────────── */
.biz-card { margin: 0 16px 16px; }

.biz-card__image-wrap {
    position: relative;
    height: 180px;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.biz-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 400ms ease;
}
.biz-card:hover .biz-card__image { transform: scale(1.03); }

.biz-card__badge-category {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid rgba(255,255,255,0.15);
}
.biz-card__badge-commission {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--color-accent);
    color: #0B0F1A;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
}

.biz-card__body { padding: 14px 16px 0; }
.biz-card__name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}
.biz-card__desc {
    font-size: 14px;
    color: var(--color-text-muted);
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    margin-bottom: 6px;
}
.biz-card__price {
    font-size: 13px;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 12px;
}

.biz-card__manager {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid var(--color-border);
}
.biz-card__manager-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--color-surface2);
    flex-shrink: 0;
}
.biz-card__manager-name {
    font-size: 13px;
    color: var(--color-text-muted);
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.biz-card__manager-actions { display: flex; gap: 6px; }
.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--color-surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--color-text-muted);
    transition: background var(--transition-fast), color var(--transition-fast);
}
.icon-btn:hover { background: var(--color-border); }
.icon-btn--wa   { color: #4ADE80; }
.icon-btn--wa:hover { background: rgba(74,222,128,0.12); }
.icon-btn--call { color: #93B4FF; }
.icon-btn--call:hover { background: rgba(147,180,255,0.12); }

.biz-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 16px 14px;
}
.icon-btn--preview { color: #7BA3FF; }
.icon-btn--preview:hover { background: rgba(123,163,255,0.14); }

/* Expanded detail section */
.biz-card__detail {
    display: none;
    padding: 0 16px 16px;
    font-size: 14px;
    color: var(--color-text-muted);
    line-height: 1.7;
    border-top: 1px solid var(--color-border);
    animation: fadeIn 200ms ease;
}
.biz-card__detail.open { display: block; }

/* Already-deployed state */
.biz-card__deployed-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--color-accent);
    font-weight: 600;
    padding: 6px 0;
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 48px;
    padding: 0 20px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn--primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(26,60,255,0.2);
}
.btn--primary:hover { box-shadow: 0 4px 12px rgba(26,60,255,0.3); }

.btn--outline {
    background: transparent;
    color: var(--color-text);
    border: 1.5px solid var(--color-border);
}
@media (hover: hover) {
    .btn--outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
}

.btn--ghost {
    background: transparent;
    color: var(--color-text-muted);
}
.btn--ghost:hover { color: var(--color-text); }

.btn--danger {
    background: transparent;
    color: var(--color-error);
    border: 1.5px solid var(--color-error);
}

.btn--full { width: 100%; }
.btn--sm { height: 38px; font-size: 13px; padding: 0 14px; }
.btn--lg { height: 56px; font-size: 17px; border-radius: var(--radius-md); }

/* ── FORM ELEMENTS ───────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text);
}
.form-label span { color: var(--color-text-muted); font-weight: 400; }

.form-input, .form-select, .form-textarea {
    width: 100%;
    height: 56px;
    background: var(--color-surface2);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0 16px;
    font-size: 16px;
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    -webkit-appearance: none;
    appearance: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(26,60,255,0.12);
}
.form-input::placeholder { color: var(--color-text-muted); }
.form-textarea { height: auto; padding: 14px 16px; resize: vertical; min-height: 100px; }

.form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A9BC4' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-helper {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 6px;
}
.form-error {
    font-size: 13px;
    color: var(--color-error);
    margin-top: 6px;
    display: none;
}
.form-error.visible { display: block; }
.form-input.has-error, .form-select.has-error { border-color: var(--color-error); }

/* ── PIN PAD ─────────────────────────────────────────────── */
.pin-pad-wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; }

.pin-circles {
    display: flex;
    gap: 16px;
}
.pin-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: transparent;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.pin-circle--filled {
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.pin-circle--error {
    background: var(--color-error);
    border-color: var(--color-error);
}

.pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    width: 100%;
    max-width: 280px;
}
.pin-key {
    height: 68px;
    border-radius: var(--radius-md);
    background: var(--color-surface2);
    border: 1px solid var(--color-border);
    font-size: 22px;
    font-weight: 600;
    color: var(--color-text);
    font-family: var(--font-display);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-fast), transform var(--transition-fast);
    -webkit-tap-highlight-color: transparent;
}
.pin-key:active { background: var(--color-primary); transform: scale(0.94); }
.pin-key--filler { background: transparent; border-color: transparent; cursor: default; }
.pin-key--filler:active { background: transparent; transform: none; }

/* Shake animation */
@keyframes shake {
    0%,100%  { transform: translateX(0); }
    15%      { transform: translateX(-8px); }
    30%      { transform: translateX(8px); }
    45%      { transform: translateX(-6px); }
    60%      { transform: translateX(6px); }
    75%      { transform: translateX(-3px); }
    90%      { transform: translateX(3px); }
}
.shake { animation: shake 500ms ease; }

/* ── SEARCH BAR ──────────────────────────────────────────── */
.search-wrap {
    position: relative;
    padding: 12px 16px 4px;
}
.search-input {
    width: 100%;
    height: 48px;
    background: var(--color-surface2);
    border: 1.5px solid var(--color-border);
    border-radius: 100px;
    padding: 0 44px 0 44px;
    font-size: 15px;
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-fast);
}
.search-input:focus { border-color: var(--color-primary); }
.search-icon, .search-clear {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateY(6px);
    font-size: 18px;
    color: var(--color-text-muted);
}
.search-icon { left: 30px; pointer-events: none; }
.search-clear {
    right: 30px;
    cursor: pointer;
    display: none;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 18px;
}
.search-clear.visible { display: block; }

/* ── FILTER CHIPS ────────────────────────────────────────── */
.filter-chips {
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.filter-chips::-webkit-scrollbar { display: none; }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    border: 1.5px solid var(--color-border);
    color: var(--color-text-muted);
    background: transparent;
    transition: all var(--transition-fast);
}
.chip.active, .chip:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}

/* ── BOTTOM SHEET ────────────────────────────────────────── */
.sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-std);
}
.sheet-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: 100%;
    max-width: 480px;
    background: var(--color-surface);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    box-shadow: var(--shadow-sheet);
    z-index: 400;
    transition: transform 300ms cubic-bezier(0.34,1.2,0.64,1);
    padding-bottom: env(safe-area-inset-bottom, 16px);
}
.bottom-sheet.open {
    transform: translateX(-50%) translateY(0);
}

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

.sheet-header {
    padding: 8px 20px 12px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sheet-title {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
}
.sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--color-text-muted);
}

.sheet-body { padding: 20px; }
.sheet-actions {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid var(--color-border);
}

/* ── STAT CARDS GRID ─────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 16px;
}
.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-card);
}
.stat-card__label {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}
.stat-card__value {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 800;
    color: var(--color-accent);
    line-height: 1;
}
.stat-card__value.muted { color: var(--color-text); }
.stat-card__value.warning { color: var(--color-warning); }

/* ── TRANSACTION ITEMS ───────────────────────────────────── */
.txn-list { padding: 0 16px; }
.txn-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
}
.txn-item:last-child { border-bottom: none; }
.txn-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--color-surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.txn-info { flex: 1; min-width: 0; }
.txn-name {
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.txn-meta {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: 2px;
}
.txn-right { text-align: right; flex-shrink: 0; }
.txn-amount {
    font-size: 15px;
    font-weight: 700;
    color: var(--color-accent);
}
.txn-date { font-size: 12px; color: var(--color-text-muted); margin-top: 2px; }

/* ── STATUS BADGES ───────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.3px;
}
.badge--success { background: rgba(0,214,143,0.15); color: var(--color-accent); }
.badge--pending { background: rgba(245,166,35,0.15); color: var(--color-warning); }
.badge--error   { background: rgba(255,76,106,0.15); color: var(--color-error); }
.badge--neutral { background: var(--color-surface2); color: var(--color-text-muted); }

/* ── TOAST NOTIFICATIONS ─────────────────────────────────── */
#toast-container {
    position: fixed;
    bottom: calc(var(--nav-height) + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 440px;
    padding: 0 16px;
    z-index: 1000;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--color-text);
    box-shadow: var(--shadow-card);
    pointer-events: all;
    cursor: pointer;
    transform: translateY(20px);
    opacity: 0;
    transition: transform var(--transition-std), opacity var(--transition-std);
    border-left: 4px solid var(--color-border);
}
.toast--visible { transform: translateY(0); opacity: 1; }
.toast--success { border-left-color: var(--color-success); }
.toast--error   { border-left-color: var(--color-error); }
.toast--info    { border-left-color: var(--color-primary); }
.toast--warning { border-left-color: var(--color-warning); }

/* ── SKELETON LOADER ─────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -400px 0; }
    100% { background-position: 400px 0; }
}
.skeleton {
    background: linear-gradient(90deg, var(--color-surface2) 25%, var(--color-border) 50%, var(--color-surface2) 75%);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: var(--radius-sm);
}

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--color-text-muted);
}
.empty-state__icon { font-size: 56px; margin-bottom: 16px; line-height: 1; }
.empty-state__title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 8px;
}
.empty-state__body { font-size: 15px; line-height: 1.6; }

/* ── LINK SHARE BOX ──────────────────────────────────────── */
.link-box {
    background: var(--color-surface2);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 13px;
    color: var(--color-text-muted);
    word-break: break-all;
    font-family: monospace;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.link-box__text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-box__copy {
    flex-shrink: 0;
    font-size: 18px;
    cursor: pointer;
    color: var(--color-primary);
    background: none;
    border: none;
}

/* ── SECTION HEADINGS ────────────────────────────────────── */
.section-heading {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
    padding: 8px 16px 4px;
}

/* ── PROFILE SECTIONS ────────────────────────────────────── */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px 20px;
    border-bottom: 1px solid var(--color-border);
    text-align: center;
}
.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 30px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
}
.profile-name {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 2px;
}
.profile-brand {
    font-size: 14px;
    color: var(--color-accent);
    font-weight: 600;
    margin-bottom: 10px;
}
.profile-id-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--color-surface2);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    padding: 4px 12px;
    font-size: 13px;
    font-family: monospace;
    color: var(--color-text-muted);
    cursor: pointer;
}

.settings-section {
    margin: 0 16px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-surface);
    overflow: hidden;
}
.settings-section__header {
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition-fast);
}
.settings-section__header.open { border-bottom-color: var(--color-border); }
.settings-section__title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    color: #7BA3FF;
    display: flex;
    align-items: center;
    gap: 8px;
}
.settings-section__arrow {
    color: var(--color-text-muted);
    font-size: 18px;
    transition: transform var(--transition-fast);
}
.settings-section__header.open .settings-section__arrow { transform: rotate(180deg); }
.settings-section__body {
    display: none;
    padding: 16px;
}
.settings-section__body.open { display: block; }

/* ── MY STORES CARD ──────────────────────────────────────── */
.store-card {
    margin: 0 16px 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    gap: 12px;
    box-shadow: var(--shadow-card);
}
.store-card__thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--color-surface2);
}
.store-card__info { flex: 1; min-width: 0; }
.store-card__name {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.store-card__date { font-size: 12px; color: var(--color-text-muted); margin-bottom: 4px; }
.store-card__stats { font-size: 13px; color: var(--color-accent); font-weight: 600; margin-bottom: 10px; }
.store-card__actions { display: flex; gap: 8px; }

/* ── NOTIFICATION ITEMS ──────────────────────────────────── */
.notif-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    gap: 12px;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.notif-item.unread { background: rgba(26,60,255,0.06); }
.notif-item:hover { background: var(--color-surface2); }
.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-primary);
    flex-shrink: 0;
    margin-top: 6px;
}
.notif-dot.read { background: transparent; }
.notif-content { flex: 1; }
.notif-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.notif-body { font-size: 13px; color: var(--color-text-muted); }
.notif-time { font-size: 11px; color: var(--color-text-muted); margin-top: 4px; }

/* ── LOADING SPINNER ─────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
.loading-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

/* ── MISC UTILITIES ──────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-error  { color: var(--color-error); }
.text-sm     { font-size: 13px; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.p-16  { padding: 16px; }
.p-20  { padding: 20px; }
.divider { height: 1px; background: var(--color-border); margin: 8px 0; }
.warn-box {
    background: rgba(245,166,35,0.1);
    border: 1px solid rgba(245,166,35,0.3);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 13px;
    color: var(--color-warning);
    line-height: 1.5;
}

/* ── LOGIN / SIGN-UP SCREENS ─────────────────────────────── */
.auth-screen {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 24px 40px;
    background: var(--color-bg);
}
.auth-logo {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}
/* Auth screen logo uses the shared component */
.auth-screen .remlek-logo,
.signup-header .remlek-logo {
    margin-bottom: 4px;
    justify-content: center;
}
.auth-tagline {
    font-size: 15px;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 40px;
}
.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 28px 24px;
    box-shadow: var(--shadow-card);
}
.auth-card__title {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
}
.auth-card__sub {
    font-size: 14px;
    color: var(--color-text-muted);
    margin-bottom: 24px;
}

/* Step slide transition */
.auth-steps-wrap { overflow: hidden; position: relative; }
.auth-step {
    transition: transform 300ms cubic-bezier(0.4,0,0.2,1), opacity 250ms ease;
    opacity: 0;
    position: absolute;
    width: 100%;
    top: 0;
    left: 0;
    transform: translateX(100%);
    pointer-events: none;
}
.auth-step.active {
    opacity: 1;
    position: relative;
    transform: translateX(0);
    pointer-events: all;
}
.auth-step.exit-left { transform: translateX(-100%); opacity: 0; pointer-events: none; }

/* ── REFERRAL BANNER ─────────────────────────────────────── */
.referral-banner {
    background: linear-gradient(135deg, rgba(26,60,255,0.2), rgba(108,43,217,0.2));
    border: 1px solid rgba(26,60,255,0.3);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    margin-bottom: 20px;
}

/* ── SIGN-UP PAGE SPECIFIC ───────────────────────────────── */
.signup-page {
    min-height: 100dvh;
    background: var(--color-bg);
    padding: 0 0 40px;
}
.signup-header {
    text-align: center;
    padding: 32px 24px 20px;
}
.signup-section {
    margin: 0 16px 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 20px;
}
.signup-section__title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--color-border);
}
.bank-section-note {
    background: var(--color-surface2);
    border-radius: var(--radius-md);
    padding: 12px;
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 16px;
}

/* ── SAFE AREA (iOS notch) ───────────────────────────────── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .bottom-nav { padding-bottom: env(safe-area-inset-bottom); height: calc(var(--nav-height) + env(safe-area-inset-bottom)); }
    #tab-content { padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom) + 16px); }
}

/* ── ANIMATIONS ──────────────────────────────────────────── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 200ms ease; }

/* ── PULL-TO-REFRESH ─────────────────────────────────────── */
.ptr-indicator {
    text-align: center;
    padding: 16px;
    font-size: 13px;
    color: var(--color-text-muted);
    display: none;
}
.ptr-indicator.visible { display: block; }

/* ── SHARED REMLEK LOGO ──────────────────────────────────── */
.remlek-logo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    flex-shrink: 0;
}
.remlek-logo__text {
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--color-text);
    letter-spacing: -0.3px;
    line-height: 1;
}
.remlek-logo__text em {
    font-style: normal;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── PROFILE AVATAR — PHOTO SUPPORT ─────────────────────── */
.profile-avatar {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.profile-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.profile-change-hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    margin-top: 6px;
    margin-bottom: 8px;
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid rgba(26,60,255,0.28);
    background: rgba(26,60,255,0.08);
    transition: background var(--transition-fast);
    font-family: var(--font-body);
}
.profile-change-hint:hover { background: rgba(26,60,255,0.16); }

/* ── PHOTO UPLOAD (Signup) ───────────────────────────────── */
.photo-upload-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.photo-upload-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-surface2);
    border: 2px dashed var(--color-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 26px;
    overflow: hidden;
    transition: border-color var(--transition-fast);
    position: relative;
}
.photo-upload-wrap:hover .photo-upload-circle { border-color: var(--color-primary); }
.photo-upload-circle img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}
.photo-upload-label {
    font-size: 12px;
    color: var(--color-text-muted);
    text-align: center;
}
