:root {
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: #1a2035;
    --bg-card-hover: #1f2a45;
    --bg-input: #0f1525;
    --border: #2a3555;
    --text-primary: #e8eaf0;
    --text-secondary: #8892a8;
    --text-muted: #5a6580;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --success: #22c55e;
    --success-bg: rgba(34, 197, 94, 0.15);
    --danger: #ef4444;
    --danger-bg: rgba(239, 68, 68, 0.15);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.15);
    --gradient-1: linear-gradient(135deg, #6366f1, #8b5cf6);
    --gradient-2: linear-gradient(135deg, #3b82f6, #6366f1);
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.2);
    --radius: 12px;
    --radius-sm: 8px;
    --bottom-nav-height: 68px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== LAYOUT ===== */
.app {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 16px calc(var(--bottom-nav-height) + 28px);
}
.app.admin-app { max-width: 600px; padding-bottom: 80px; }

/* ===== PROFILE HEADER (centered at top) ===== */
.profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0 20px;
    gap: 6px;
}
.profile-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin-bottom: 4px;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
    overflow: hidden;
}
.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-name {
    font-weight: 700;
    font-size: 20px;
    color: var(--text-primary);
}
.profile-id {
    font-size: 13px;
    color: var(--text-muted);
    font-family: monospace;
}

/* ===== OLD HEADER (for admin) ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    margin-bottom: 8px;
}
.header-left { display: flex; align-items: center; gap: 12px; }
.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.user-info { display: flex; flex-direction: column; }
.user-name { font-weight: 600; font-size: 15px; color: var(--text-primary); }
.user-id { font-size: 12px; color: var(--text-muted); font-family: monospace; }

/* ===== TABS (for admin) ===== */
.tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 4px;
    margin-bottom: 16px;
    overflow-x: auto;
}
.tab {
    flex: 1;
    padding: 10px 12px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
}
.tab.active {
    background: var(--accent);
    color: white;
    box-shadow: var(--shadow-glow);
}
.tab:hover:not(.active) { color: var(--text-primary); background: var(--bg-card); }

/* ===== BOTTOM NAVIGATION (floating) ===== */
.bottom-nav {
    position: fixed;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 448px;
    height: var(--bottom-nav-height);
    background: rgba(17, 24, 39, 0.92);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    z-index: 900;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(99, 102, 241, 0.08);
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
    border-radius: var(--radius-sm);
    min-width: 70px;
}
.bottom-nav-item.active {
    color: var(--accent);
}
.bottom-nav-item.active .bottom-nav-icon svg {
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.5));
}
.bottom-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: transform 0.2s;
}
.bottom-nav-item.active .bottom-nav-icon {
    transform: scale(1.1);
}
.bottom-nav-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { box-shadow: var(--shadow); }
.card-title {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    font-weight: 600;
}
.card-glow {
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: var(--shadow-glow);
}

/* ===== STATS GRID ===== */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    text-align: center;
}
.stat-value {
    font-size: 22px;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== BALANCE CARD ===== */
.balance-card {
    background: var(--gradient-1);
    border: none;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}
.balance-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.balance-label { font-size: 13px; color: rgba(255,255,255,0.7); margin-bottom: 4px; }
.balance-value { font-size: 32px; font-weight: 800; color: white; }
.balance-value span { font-size: 18px; font-weight: 400; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    text-decoration: none;
    color: white;
}
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--gradient-1); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-glow); }
.btn-primary:disabled { opacity: 0.5; pointer-events: none; }
.btn-secondary { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-primary); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-danger { background: var(--danger); }
.btn-danger:hover { opacity: 0.9; }
.btn-success { background: var(--success); }
.btn-sm { padding: 8px 14px; font-size: 13px; width: auto; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: var(--radius-sm); }
.btn-group { display: flex; gap: 8px; }
.btn-group .btn { flex: 1; }

/* ===== INPUTS ===== */
.input-group { margin-bottom: 14px; }
.input-group label {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}
.input, select, textarea {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
}
.input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}
textarea { resize: vertical; min-height: 80px; }
select { cursor: pointer; }
select option { background: var(--bg-secondary); }

/* ===== LIST ITEMS ===== */
.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    transition: background 0.2s;
}
.list-item:hover { background: var(--bg-card-hover); }
.list-item-info { flex: 1; }
.list-item-title { font-weight: 600; font-size: 14px; }
.list-item-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.list-item-actions { display: flex; gap: 6px; }

/* ===== CHART ===== */
.chart-container {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 16px;
    position: relative;
    height: 220px;
}
.chart-container canvas { width: 100% !important; height: 100% !important; }

/* ===== PERIOD SELECTOR ===== */
.period-selector {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}
.period-btn {
    flex: 1;
    padding: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}
.period-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

/* ===== EXPENSE CALENDAR ===== */
.expense-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
}
.expense-date {
    background: var(--bg-input);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    text-align: center;
    min-width: 50px;
}
.expense-date-day { font-size: 18px; font-weight: 700; color: var(--accent); }
.expense-date-month { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
.expense-info { flex: 1; }
.expense-amount { font-weight: 700; color: var(--danger); }
.expense-desc { font-size: 12px; color: var(--text-muted); }

/* ===== PROFILE EXPENSES SECTION ===== */
.profile-expenses-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ===== SECTION HEADER TOP (for Shops) ===== */
.section-header-top {
    padding: 20px 0 16px;
}

/* ===== USEFUL SECTION ===== */
.useful-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 0 20px;
    gap: 8px;
}
.useful-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}
.useful-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.useful-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.useful-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
}
.useful-card.open {
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}
.useful-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}
.useful-card-icon-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}
.useful-card-title {
    flex: 1;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}
.useful-card-arrow {
    color: var(--text-muted);
    transition: transform 0.3s;
    display: flex;
    align-items: center;
}
.useful-card.open .useful-card-arrow {
    transform: rotate(90deg);
}
.useful-card-body {
    display: none;
    padding: 0 16px 16px;
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.7;
}
.useful-card.open .useful-card-body {
    display: block;
}
.useful-card-body p {
    margin-bottom: 6px;
}
.useful-card-body b {
    color: var(--text-primary);
}

.support-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(99, 102, 241, 0.3);
    transition: all 0.2s;
    margin-top: 4px;
}
.support-link:hover {
    background: rgba(99, 102, 241, 0.2);
}

/* ===== SHOP CARD (redesigned) ===== */
.shop-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    transition: border-color 0.2s;
}
.shop-card:hover { border-color: rgba(99, 102, 241, 0.3); }
.shop-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}
.shop-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.shop-card-info {
    flex: 1;
    min-width: 0;
}
.shop-card-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.shop-card-username {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.shop-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.shop-status-dot.online {
    background: var(--success);
    box-shadow: 0 0 8px var(--success), 0 0 16px rgba(34, 197, 94, 0.3);
    animation: pulse-green 2s ease-in-out infinite;
}
.shop-status-dot.offline {
    background: var(--text-muted);
}
@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 4px var(--success), 0 0 8px rgba(34, 197, 94, 0.2); }
    50% { box-shadow: 0 0 8px var(--success), 0 0 20px rgba(34, 197, 94, 0.4); }
}
.shop-card-actions {
    display: flex;
    gap: 8px;
}
.shop-card-actions .btn {
    flex: 1;
    padding: 9px 12px;
    font-size: 13px;
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-secondary);
    border-radius: 16px 16px 0 0;
    padding: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}
.modal-title {
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-close {
    width: 32px; height: 32px;
    border: none;
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}
@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* ===== SECTIONS ===== */
.section { display: none; }
.section.active { display: block; }

/* ===== ROI BADGE ===== */
.roi-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}
.roi-badge.positive { background: var(--success-bg); color: var(--success); }
.roi-badge.negative { background: var(--danger-bg); color: var(--danger); }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.empty-state-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    margin: 0 auto 12px;
}
.empty-state-text { font-size: 14px; }

/* ===== TOAST (top position) ===== */
.toast {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%) translateY(-80px);
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    z-index: 2000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    box-shadow: var(--shadow);
    max-width: calc(100% - 32px);
    text-align: center;
    opacity: 0;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: var(--accent); color: white; border: none; }
.toast.error { background: var(--danger); color: white; border: none; }

/* ===== LOADING ===== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== ADMIN SPECIFIC ===== */

/* Hamburger button */
.hamburger-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}
.hamburger-btn:hover { border-color: var(--accent); }
.hamburger-line {
    width: 18px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 1px;
    transition: all 0.3s;
}
.hamburger-btn.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.hamburger-btn.open .hamburger-line:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Admin drawer */
.admin-drawer-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 800;
    transition: opacity 0.3s;
}
.admin-drawer-overlay.open { display: block; }

.admin-drawer {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100%;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    z-index: 850;
    transition: left 0.3s ease;
    overflow-y: auto;
    padding: 20px 0;
}
.admin-drawer.open { left: 0; }

.admin-drawer-header {
    padding: 16px 20px 24px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}
.admin-drawer-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}
.admin-drawer-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-drawer-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-family: inherit;
}
.admin-drawer-item:hover { background: var(--bg-card); color: var(--text-primary); }
.admin-drawer-item.active {
    color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
    border-right: 3px solid var(--accent);
}
.admin-drawer-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.admin-drawer-item.active .admin-drawer-icon {
    background: rgba(99, 102, 241, 0.15);
}

/* Hide old admin-nav in admin.html */
.admin-nav { display: none; }

.product-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.product-type-badge.countable { background: var(--success-bg); color: var(--success); }
.product-type-badge.uncountable { background: var(--warning-bg); color: var(--warning); }
.product-type-badge.non_unique { background: rgba(59, 130, 246, 0.15); color: #3b82f6; }
.product-type-badge.unique { background: rgba(168, 85, 247, 0.15); color: #a855f7; }
.product-type-badge.circular { background: var(--warning-bg); color: var(--warning); }

.user-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.user-badge.admin { background: rgba(99, 102, 241, 0.2); color: var(--accent); }
.user-badge.blocked { background: var(--danger-bg); color: var(--danger); }

/* ===== CHOICE BUTTONS (create shop page) ===== */
.choice-group {
    display: flex;
    gap: 10px;
}
.choice-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}
.choice-btn:hover:not(.disabled) {
    border-color: var(--accent);
}
.choice-btn.selected {
    border-color: var(--accent);
    background: rgba(99, 102, 241, 0.08);
    color: var(--accent);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}
.choice-btn.disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.choice-soon {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--bg-card);
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ===== REFERRAL LINK FRAME ===== */
.referral-link-frame {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
}
.referral-link-text {
    flex: 1;
    font-size: 12px;
    color: var(--accent);
    font-family: monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.referral-copy-btn {
    flex-shrink: 0;
}

/* ===== SUB-PARTNER SECTION ===== */
.sub-partner-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

/* ===== COMPACT CHOICE BUTTONS ===== */
.choice-group-compact .choice-btn {
    padding: 12px 8px;
    gap: 6px;
}

/* ===== SHOP CARD AVATAR IMAGE ===== */
img.shop-card-avatar {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    flex-shrink: 0;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 340px) {
    .stats-grid { grid-template-columns: 1fr; }
    .stat-value { font-size: 18px; }
    .balance-value { font-size: 26px; }
    .btn-group { flex-direction: column; }
    .profile-avatar { width: 60px; height: 60px; font-size: 24px; }
    .profile-name { font-size: 18px; }
    .shop-card-actions { flex-direction: column; }
}

@media (min-width: 768px) {
    .app { max-width: 520px; padding: 0 20px calc(var(--bottom-nav-height) + 32px); }
    .app.admin-app { max-width: 680px; }
}
