﻿@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #0d9488; --primary-dark: #0f766e; --primary-light: #14b8a6; --primary-soft: #ccfbf1;
    --accent: #f59e0b; --accent-soft: #fef3c7;
    --bg: #f5f7fa; --surface: #ffffff; --surface-2: #f1f5f9; --surface-3: #e2e8f0;
    --border: #e5e9ef; --text: #0f172a; --text-soft: #334155; --text-muted: #64748b; --text-faint: #94a3b8;
    --success: #10b981; --danger: #ef4444; --info: #3b82f6; --warning: #f59e0b;
    --topbar-h: 58px; --bottomnav-h: 70px;
    --radius-xs: 8px; --radius-sm: 12px; --radius: 16px; --radius-lg: 22px; --radius-xl: 28px;
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
    --shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.14);
    --shadow-primary: 0 8px 24px rgba(13, 148, 136, 0.32);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body { font-family: 'Vazirmatn', Tahoma, sans-serif; background: #0f172a; color: var(--text); direction: rtl; font-size: 14px; line-height: 1.7; -webkit-font-smoothing: antialiased; }
.app-shell { display: flex; flex-direction: column; max-width: 480px; width: 100%; height: 100vh; margin: 0 auto; background: var(--bg); position: relative; overflow: hidden; }
@media (min-width: 600px) { .app-shell { box-shadow: 0 0 80px rgba(0,0,0,0.4); border-left: 1px solid rgba(255,255,255,0.05); border-right: 1px solid rgba(255,255,255,0.05); } }
.topbar { flex-shrink: 0; height: var(--topbar-h); background: rgba(255,255,255,0.95); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: 0 16px; display: flex; align-items: center; gap: 12px; z-index: 50; position: relative; }
.brand { font-size: 17px; font-weight: 800; color: var(--primary); display: flex; align-items: center; gap: 6px; letter-spacing: -0.3px; }
.brand .brand-logo { width: 34px; height: 34px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; box-shadow: 0 4px 12px rgba(13,148,136,0.35); color: white; }
.topbar-spacer { flex: 1; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; background: transparent; border: none; color: var(--text-soft); display: flex; align-items: center; justify-content: center; font-size: 19px; cursor: pointer; transition: all .2s; position: relative; flex-shrink: 0; }
.icon-btn:hover { background: var(--surface-2); color: var(--primary); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn .badge-dot { position: absolute; top: 8px; left: 8px; min-width: 16px; height: 16px; padding: 0 4px; background: var(--danger); color: white; font-size: 10px; font-weight: 700; border-radius: 999px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--surface); }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 999px; background: var(--surface-2); cursor: pointer; transition: all .2s; border: none; font-family: inherit; color: var(--text); }
.user-chip:hover { background: var(--surface-3); }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.user-chip .user-name { font-size: 12px; font-weight: 600; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#main-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 16px 24px; scroll-behavior: smooth; -webkit-overflow-scrolling: touch; }
#main-content::-webkit-scrollbar { width: 0; }
#main-content > .page { animation: pageIn .35s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.bottom-nav { flex-shrink: 0; height: var(--bottomnav-h); background: rgba(255,255,255,0.98); backdrop-filter: blur(20px); border-top: 1px solid var(--border); display: flex; align-items: stretch; padding: 0 6px; z-index: 50; position: relative; box-shadow: 0 -4px 20px rgba(15,23,42,0.04); }
.nav-btn { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; background: transparent; border: none; color: var(--text-faint); font-family: inherit; font-size: 10.5px; font-weight: 500; cursor: pointer; transition: all .25s; position: relative; padding: 6px 2px; border-radius: 12px; }
.nav-btn .nav-ic { font-size: 22px; line-height: 1; transition: all .25s; display: flex; align-items: center; justify-content: center; }
.nav-btn .nav-label { font-size: 10.5px; letter-spacing: -0.2px; }
.nav-btn:active { background: var(--surface-2); }
.nav-btn.active { color: var(--primary); }
.nav-btn.active .nav-ic { transform: scale(1.12); filter: drop-shadow(0 4px 8px rgba(13,148,136,0.3)); }
.nav-btn.active::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 3px; background: var(--primary); border-radius: 0 0 4px 4px; }
.nav-btn.fab-btn { flex: 0 0 62px; }
.nav-btn.fab-btn .nav-ic { width: 52px; height: 52px; background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; border-radius: 50%; font-size: 26px; margin-top: -22px; box-shadow: var(--shadow-primary); border: 4px solid var(--surface); transition: all .25s; }
.nav-btn.fab-btn:active .nav-ic { transform: scale(0.92) rotate(90deg); }
.nav-btn.fab-btn.active::before { display: none; }
.hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; border-radius: var(--radius-lg); padding: 22px 20px; position: relative; overflow: hidden; margin-bottom: 16px; }
.hero::before { content: ''; position: absolute; inset: 0; background-image: radial-gradient(circle at 15% 20%, rgba(255,255,255,0.18) 0%, transparent 45%), radial-gradient(circle at 85% 80%, rgba(255,255,255,0.1) 0%, transparent 45%); pointer-events: none; }
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: 19px; font-weight: 800; margin-bottom: 6px; line-height: 1.5; }
.hero p { font-size: 13px; opacity: 0.92; margin-bottom: 16px; line-height: 1.8; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.hero .btn-outline { background: rgba(255,255,255,0.18); color: white; border-color: rgba(255,255,255,0.35); }
.btn { padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 13.5px; transition: all .2s; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: none; cursor: pointer; font-family: inherit; line-height: 1.4; }
.btn:active { transform: scale(0.96); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; box-shadow: 0 4px 14px rgba(13,148,136,0.3); }
.btn-outline { background: var(--surface); color: var(--text); border: 1.5px solid var(--border); }
.btn-ghost { color: var(--text-soft); padding: 8px 12px; background: transparent; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 12.5px; border-radius: 10px; }
.btn-lg { padding: 14px 24px; font-size: 15px; border-radius: 14px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 20px 2px 12px; }
.section-title h2 { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.section-title .hint { font-size: 12.5px; color: var(--primary); font-weight: 600; cursor: pointer; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-xs); border: 1px solid var(--border); overflow: hidden; transition: all .25s; }
.stats-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
.stat-card { background: var(--surface); border-radius: var(--radius); padding: 14px; border: 1px solid var(--border); text-align: center; position: relative; overflow: hidden; }
.stat-card::before { content: ''; position: absolute; top: 0; right: 0; width: 40px; height: 40px; background: var(--primary-soft); border-radius: 50%; transform: translate(14px,-14px); opacity: 0.7; }
.stat-card .stat-value { font-size: 22px; font-weight: 800; color: var(--primary); position: relative; line-height: 1.2; }
.stat-card .stat-label { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; position: relative; }
.post { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 14px; margin-bottom: 12px; animation: pageIn .3s; }
.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.post-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg, var(--primary-soft), #e0f2fe); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; border: 2px solid var(--surface); box-shadow: 0 2px 8px rgba(13,148,136,0.15); }
.post-meta { flex: 1; min-width: 0; }
.post-meta .post-author { font-weight: 700; font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.post-meta .post-sub { font-size: 11.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.post-content { font-size: 13.5px; line-height: 1.9; margin-bottom: 12px; color: var(--text-soft); word-wrap: break-word; }
.post-actions { display: flex; gap: 4px; color: var(--text-muted); font-size: 12.5px; padding-top: 10px; border-top: 1px solid var(--border); }
.post-actions button { flex: 1; color: inherit; background: transparent; border: none; font-family: inherit; padding: 6px 8px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 5px; transition: all .2s; font-size: 12.5px; cursor: pointer; }
.post-actions button:hover { background: var(--surface-2); color: var(--primary); }
.post-actions button.liked { color: var(--danger); }
.badge { display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 600; background: var(--surface-2); color: var(--text-muted); line-height: 1.6; }
.badge-public { background: #dbeafe; color: #1d4ed8; }
.badge-private { background: var(--accent-soft); color: #b45309; }
.badge-admin { background: #fee2e2; color: #b91c1c; }
.badge-imam { background: #ede9fe; color: #6d28d9; }
.badge-trustee { background: #d1fae5; color: #065f46; }
.badge-member { background: var(--surface-2); color: var(--text-muted); }
.badge-success { background: #d1fae5; color: #065f46; }
.mosque-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.mosque-card { background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; cursor: pointer; transition: all .25s; display: flex; flex-direction: row; align-items: stretch; }
.mosque-card:active { transform: scale(0.985); }
.mosque-cover { width: 82px; min-height: 82px; background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%); display: flex; align-items: center; justify-content: center; font-size: 38px; color: white; flex-shrink: 0; }
.mosque-body { padding: 12px 14px; flex: 1; min-width: 0; }
.mosque-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; line-height: 1.5; }
.mosque-imam { font-size: 11.5px; color: var(--text-muted); margin-bottom: 8px; }
.mosque-footer { display: flex; gap: 10px; font-size: 11px; color: var(--text-muted); flex-wrap: wrap; }
.mosque-footer span { display: inline-flex; align-items: center; gap: 3px; background: var(--surface-2); padding: 2px 8px; border-radius: 8px; }
.room-header { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px; position: relative; overflow: hidden; }
.room-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.room-icon { width: 62px; height: 62px; background: rgba(255,255,255,0.22); border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 32px; flex-shrink: 0; border: 1px solid rgba(255,255,255,0.2); }
.room-info { flex: 1; min-width: 0; }
.room-info h1 { font-size: 16px; margin-bottom: 4px; line-height: 1.5; font-weight: 700; }
.room-info .room-sub { opacity: 0.85; font-size: 11.5px; line-height: 1.6; }
.room-stats { display: flex; gap: 6px; font-size: 11px; flex-wrap: wrap; margin-bottom: 12px; }
.room-stats span { background: rgba(255,255,255,0.18); padding: 4px 10px; border-radius: 999px; }
.room-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.room-actions .btn-primary { background: white; color: var(--primary); }
.room-actions .btn-outline { background: rgba(255,255,255,0.18); color: white; border-color: rgba(255,255,255,0.35); }
.tabs-pills { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 12px; margin: 0 -16px 8px; padding-right: 16px; padding-left: 16px; scrollbar-width: none; }
.tabs-pills::-webkit-scrollbar { display: none; }
.tab-pill { padding: 9px 16px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--border); color: var(--text-soft); font-weight: 600; font-size: 12.5px; white-space: nowrap; cursor: pointer; transition: all .25s; font-family: inherit; display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; }
.tab-pill.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border-color: var(--primary); box-shadow: 0 4px 12px rgba(13,148,136,0.25); }
.chat-container { display: flex; flex-direction: column; height: calc(100vh - var(--topbar-h) - var(--bottomnav-h) - 260px); min-height: 380px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.chat-head { padding: 12px 14px; border-bottom: 1px solid var(--border); font-weight: 700; font-size: 13.5px; display: flex; align-items: center; justify-content: space-between; background: var(--surface-2); flex-shrink: 0; }
.chat-messages { flex: 1; padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; background: var(--surface-2); }
.chat-messages::-webkit-scrollbar { width: 0; }
.chat-msg { max-width: 78%; padding: 8px 12px; border-radius: 14px; font-size: 13px; line-height: 1.65; animation: msgIn .25s; word-wrap: break-word; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.chat-msg.mine { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; align-self: flex-start; border-bottom-right-radius: 4px; }
.chat-msg.other { background: var(--surface); align-self: flex-end; border-bottom-left-radius: 4px; border: 1px solid var(--border); }
.chat-msg .sender { font-size: 10.5px; font-weight: 700; opacity: 0.85; margin-bottom: 3px; }
.chat-msg .msg-time { font-size: 9.5px; opacity: 0.65; text-align: left; margin-top: 4px; }
.chat-input { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.chat-input input { flex: 1; padding: 10px 14px; border-radius: 999px; border: 1.5px solid var(--border); outline: none; background: var(--surface-2); font-family: inherit; font-size: 13px; }
.chat-input input:focus { border-color: var(--primary-light); background: var(--surface); }
.chat-input button { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; border: none; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 8px; transition: all .2s; cursor: pointer; }
.list-item:active { transform: scale(0.99); }
.list-item .li-icon { width: 44px; height: 44px; background: linear-gradient(135deg, var(--primary-soft), #e0f2fe); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.list-item .li-content { flex: 1; min-width: 0; }
.list-item .li-title { font-weight: 700; font-size: 13.5px; margin-bottom: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.list-item .li-sub { font-size: 11.5px; color: var(--text-muted); }
.list-item .li-arrow { color: var(--text-faint); font-size: 16px; }
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 60px; margin-bottom: 14px; opacity: 0.4; }
.empty-state h3 { color: var(--text); font-size: 15px; margin-bottom: 6px; font-weight: 700; }
.empty-state p { font-size: 12.5px; margin-bottom: 16px; }
.locked-panel { text-align: center; padding: 34px 20px; background: var(--surface); border-radius: var(--radius); border: 2px dashed var(--border); margin-bottom: 12px; }
.locked-panel .lock-icon { width: 62px; height: 62px; background: var(--accent-soft); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; margin: 0 auto 14px; }
.locked-panel h3 { margin-bottom: 6px; font-size: 15px; }
.locked-panel p { color: var(--text-muted); font-size: 12.5px; margin-bottom: 16px; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,0.5); backdrop-filter: blur(4px); z-index: 1000; display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet { background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0; width: 100%; max-width: 480px; padding: 12px 16px 20px; box-shadow: 0 -8px 40px rgba(0,0,0,0.15); animation: sheetUp .3s cubic-bezier(0.4, 0, 0.2, 1); max-height: 85vh; overflow-y: auto; }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.sheet-handle { width: 40px; height: 4px; background: var(--surface-3); border-radius: 4px; margin: 0 auto 16px; }
.sheet-title { font-size: 16px; font-weight: 800; margin-bottom: 4px; text-align: center; }
.sheet-sub { font-size: 12.5px; color: var(--text-muted); text-align: center; margin-bottom: 18px; }
.sheet-menu-item { display: flex; align-items: center; gap: 14px; padding: 14px 12px; border-radius: var(--radius-sm); cursor: pointer; transition: all .2s; font-family: inherit; background: transparent; border: none; width: 100%; text-align: right; color: var(--text); font-size: 14px; }
.sheet-menu-item:hover { background: var(--surface-2); }
.sheet-menu-item .smi-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.sheet-menu-item .smi-content { flex: 1; }
.sheet-menu-item .smi-title { font-weight: 700; font-size: 13.5px; }
.sheet-menu-item .smi-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.sheet-menu-item .smi-arrow { color: var(--text-faint); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,0.55); backdrop-filter: blur(6px); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 20px; animation: fadeIn .2s; }
.modal { background: var(--surface); border-radius: var(--radius-lg); padding: 24px 22px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); animation: modalPop .3s; max-height: 90vh; overflow-y: auto; }
@keyframes modalPop { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-title { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.modal-sub { color: var(--text-muted); font-size: 12.5px; margin-bottom: 20px; line-height: 1.7; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: var(--text-soft); }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); outline: none; transition: all .2s; font-family: inherit; font-size: 13.5px; color: var(--text); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary-light); background: var(--surface); box-shadow: 0 0 0 3px rgba(20,184,166,0.12); }
.form-group textarea { resize: vertical; min-height: 80px; line-height: 1.7; }
.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 12.5px; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.alert-error { background: #fee2e2; color: #991b1b; }
.alert-success { background: #d1fae5; color: #065f46; }
.alert-info { background: #dbeafe; color: #1e40af; }
.modal-footer { display: flex; gap: 10px; margin-top: 20px; }
.modal-footer .btn { flex: 1; }
.divider { text-align: center; margin: 18px 0; position: relative; color: var(--text-muted); font-size: 11.5px; }
.divider::before { content: ''; position: absolute; top: 50%; right: 0; left: 0; height: 1px; background: var(--border); }
.divider span { background: var(--surface); padding: 0 12px; position: relative; }
.role-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.role-option { padding: 12px 10px; border: 2px solid var(--border); border-radius: var(--radius-sm); text-align: center; cursor: pointer; transition: all .2s; font-size: 12.5px; font-weight: 600; background: var(--surface); font-family: inherit; color: var(--text); }
.role-option.selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-dark); }
.role-option .role-icon { font-size: 22px; display: block; margin-bottom: 4px; }
.toast { position: fixed; bottom: calc(var(--bottomnav-h) + 20px); right: 50%; transform: translateX(50%); background: var(--text); color: white; padding: 11px 22px; border-radius: 999px; box-shadow: var(--shadow-lg); z-index: 2000; animation: toastIn .3s; font-size: 13px; font-weight: 600; max-width: 90%; text-align: center; }
@keyframes toastIn { from { opacity: 0; transform: translateX(50%) translateY(20px); } to { opacity: 1; transform: translateX(50%) translateY(0); } }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.news-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 2px 2px 12px; margin: 0 -16px; padding-right: 16px; padding-left: 16px; scrollbar-width: none; }
.news-scroll::-webkit-scrollbar { display: none; }
.news-item { min-width: 240px; max-width: 240px; background: var(--surface); border-radius: var(--radius); border: 1px solid var(--border); padding: 14px; cursor: pointer; flex-shrink: 0; }
.news-item .news-icon { width: 40px; height: 40px; background: linear-gradient(135deg, var(--primary-soft), #e0f2fe); border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; margin-bottom: 10px; }
.news-item .news-title { font-weight: 700; font-size: 13px; margin-bottom: 4px; line-height: 1.6; }
.news-item .news-content { font-size: 11.5px; color: var(--text-muted); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-item .news-date { font-size: 10.5px; color: var(--text-faint); margin-top: 8px; }
.profile-hero { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: white; border-radius: var(--radius-lg); padding: 24px 20px; margin-bottom: 16px; text-align: center; position: relative; overflow: hidden; }
.profile-hero .p-avatar { width: 84px; height: 84px; background: rgba(255,255,255,0.22); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 42px; margin: 0 auto 12px; border: 3px solid rgba(255,255,255,0.3); position: relative; z-index: 1; }
.profile-hero h2 { font-size: 19px; font-weight: 800; margin-bottom: 6px; position: relative; z-index: 1; }
.profile-hero .p-meta { font-size: 12.5px; opacity: 0.9; position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.profile-hero .p-meta .badge { background: rgba(255,255,255,0.22); color: white; }
.search-bar { position: relative; margin-bottom: 16px; }
.search-bar input { width: 100%; padding: 13px 44px 13px 16px; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface); outline: none; font-family: inherit; font-size: 13.5px; }
.search-bar .search-ic { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); color: var(--text-faint); font-size: 17px; pointer-events: none; }
.notif-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px; background: var(--surface); border-radius: var(--radius); margin-bottom: 8px; border: 1px solid var(--border); cursor: pointer; animation: pageIn .3s; }
.notif-item.unread { background: linear-gradient(135deg, var(--primary-soft), var(--surface)); border-color: var(--primary-light); }
.notif-item .n-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--surface-2); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.notif-item.unread .n-icon { background: linear-gradient(135deg, var(--primary), var(--primary-light)); color: white; }
.notif-item .n-content { flex: 1; min-width: 0; }
.notif-item .n-title { font-weight: 700; font-size: 13px; margin-bottom: 3px; }
.notif-item .n-desc { font-size: 11.5px; color: var(--text-muted); line-height: 1.6; }
.notif-item .n-time { font-size: 10.5px; color: var(--text-faint); margin-top: 4px; }
/* ==================== Admin Panel ==================== */
.admin-header {
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    overflow: hidden;
}
.admin-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 15%, rgba(20,184,166,0.25), transparent 45%);
    pointer-events: none;
}
.admin-header .admin-badge {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    box-shadow: 0 8px 20px rgba(13,148,136,0.4);
    position: relative;
    z-index: 1;
}
.admin-header .admin-info { flex: 1; position: relative; z-index: 1; min-width: 0; }
.admin-header h1 { font-size: 16px; font-weight: 800; margin-bottom: 4px; line-height: 1.5; }
.admin-header .admin-sub { font-size: 11.5px; opacity: 0.75; }

.admin-stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 14px;
    border: 1px solid var(--border);
    text-align: center;
    transition: all .25s;
}
.admin-stat-card:hover { border-color: var(--primary-light); }
.admin-stat-card .asc-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    margin: 0 auto 8px;
}
.admin-stat-card .asc-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}
.admin-stat-card .asc-label {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.room-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 8px;
    transition: all .2s;
}
.room-item:hover { border-color: var(--primary-light); }
.room-item .ri-icon {
    width: 42px; height: 42px;
    background: var(--surface-2);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.room-item .ri-content { flex: 1; min-width: 0; }
.room-item .ri-title { font-weight: 700; font-size: 13.5px; margin-bottom: 4px; }
.room-item .ri-sub { font-size: 11.5px; color: var(--text-muted); display: flex; gap: 6px; flex-wrap: wrap; }
.room-item .ri-actions { display: flex; gap: 4px; }
.room-item .ri-actions button {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: var(--surface-2);
    border: none;
    cursor: pointer;
    font-size: 15px;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
    color: var(--text-soft);
}
.room-item .ri-actions button:hover { background: var(--primary-soft); color: var(--primary); }
.room-item .ri-actions button.danger:hover { background: #fee2e2; color: var(--danger); }

.chip-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.chip-option {
    padding: 7px 14px;
    border-radius: 999px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
    cursor: pointer;
    transition: all .2s;
}
.chip-option:hover { border-color: var(--primary-light); }
.chip-option.selected {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(13,148,136,0.25);
}

.emoji-picker {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-top: 4px;
}
.emoji-opt {
    aspect-ratio: 1;
    border-radius: 10px;
    background: var(--surface-2);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 20px;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
    font-family: inherit;
}
.emoji-opt:hover { background: var(--primary-soft); }
.emoji-opt.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: scale(1.05);
}

.member-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 8px;
}
.member-item .mi-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    border: 2px solid var(--surface);
    box-shadow: 0 2px 8px rgba(13,148,136,0.15);
}
.member-item .mi-content { flex: 1; min-width: 0; }
.member-item .mi-name { font-weight: 700; font-size: 13px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.member-item .mi-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.member-item .mi-actions { display: flex; gap: 4px; }
.member-item .mi-actions button {
    padding: 6px 10px;
    border-radius: 8px;
    background: var(--surface-2);
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-soft);
    transition: all .2s;
}
.member-item .mi-actions button:hover { background: var(--primary-soft); color: var(--primary); }
.member-item .mi-actions button.danger:hover { background: #fee2e2; color: var(--danger); }

.progress-track {
    height: 8px;
    background: var(--surface-2);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 14px;
}
.progress-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .4s ease;
}

/* ==================== Room Advanced ==================== */
.member-picker {
    max-height: 260px;
    overflow-y: auto;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    background: var(--surface-2);
}
.member-pick-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
    margin-bottom: 4px;
    background: var(--surface);
}
.member-pick-item:hover { background: var(--primary-soft); }
.member-pick-item.selected { background: var(--primary-soft); border: 1.5px solid var(--primary); }
.member-pick-item .mp-avatar {
    width: 34px; height: 34px;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.member-pick-item .mp-info { flex: 1; min-width: 0; }
.member-pick-item .mp-name { font-size: 12.5px; font-weight: 600; }
.member-pick-item .mp-sub { font-size: 10.5px; color: var(--text-muted); }
.member-pick-item .mp-check {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    color: transparent;
    flex-shrink: 0;
}
.member-pick-item.selected .mp-check {
    background: var(--primary); border-color: var(--primary); color: white;
}

.invite-code-display {
    display: flex;
    gap: 6px;
    align-items: center;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 12px;
    padding: 12px;
    margin-top: 8px;
}
.invite-code-display code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 800;
    color: #92400e;
    letter-spacing: 1px;
}

/* ==================== Wallet Transfer ==================== */
.recipient-search {
    position: relative;
    margin-bottom: 10px;
}
.recipient-search input {
    width: 100%;
    padding: 11px 42px 11px 14px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--surface-2);
    font-family: inherit;
    font-size: 13px;
    outline: none;
}
.recipient-search input:focus { border-color: var(--primary-light); background: var(--surface); }
.recipient-search::after {
    content: '🔍';
    position: absolute;
    right: 14px; top: 50%; transform: translateY(-50%);
    font-size: 15px; pointer-events: none;
}
.recipient-list {
    max-height: 220px;
    overflow-y: auto;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    margin-bottom: 12px;
}
.recipient-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    transition: all .15s;
}
.recipient-item:last-child { border-bottom: none; }
.recipient-item:hover { background: var(--surface-2); }
.recipient-item.selected { background: var(--primary-soft); }

.verify-box {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    text-align: center;
}
.verify-code-input {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin: 10px 0;
    direction: ltr;
}
.verify-code-input input {
    width: 42px; height: 48px;
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    outline: none;
}
.verify-code-input input:focus { border-color: var(--primary); }

/* ==================== DM / Conversations ==================== */
.conv-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    background: var(--surface);
    border-radius: 14px;
    margin-bottom: 8px;
    cursor: pointer;
    border: 1px solid var(--border);
    transition: all .2s;
}
.conv-item:hover { border-color: var(--primary-light); box-shadow: var(--shadow-sm); }
.conv-item.unread { background: linear-gradient(135deg, var(--primary-soft), var(--surface)); border-color: var(--primary-light); }
.conv-item .conv-avatar {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0; position: relative;
}
.conv-item .conv-avatar .online-dot {
    position: absolute; bottom: 2px; left: 2px;
    width: 12px; height: 12px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid var(--surface);
}
.conv-item .conv-body { flex: 1; min-width: 0; }
.conv-item .conv-name { font-weight: 700; font-size: 13.5px; margin-bottom: 2px; }
.conv-item .conv-preview {
    font-size: 12px; color: var(--text-muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.conv-item .conv-meta { text-align: left; flex-shrink: 0; }
.conv-item .conv-time { font-size: 10.5px; color: var(--text-faint); }
.conv-item .conv-badge {
    display: inline-block;
    margin-top: 4px;
    background: var(--danger); color: white;
    font-size: 10px; font-weight: 700;
    padding: 2px 8px; border-radius: 999px;
}

.dm-container {
    display: flex; flex-direction: column;
    height: calc(100vh - var(--topbar-h) - var(--bottomnav-h) - 100px);
    min-height: 420px;
    background: var(--surface-2);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.dm-head {
    padding: 12px 14px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; gap: 10px;
    flex-shrink: 0;
}
.dm-head .dm-back {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: var(--surface-2);
    border: none; cursor: pointer;
    font-size: 16px;
    display: flex; align-items: center; justify-content: center;
}
.dm-head .dm-avatar {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}
.dm-head .dm-info { flex: 1; min-width: 0; }
.dm-head .dm-name { font-weight: 700; font-size: 14px; }
.dm-head .dm-status { font-size: 11px; color: var(--success); }

/* ==================== Mosque Boundary ==================== */
.boundary-map {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    max-width: 400px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 20px;
    border: 2px dashed var(--primary-light);
    overflow: hidden;
}
.boundary-center {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 60px; height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    color: white;
    box-shadow: 0 0 0 8px rgba(13, 148, 136, 0.15), 0 0 0 20px rgba(13, 148, 136, 0.08);
    z-index: 5;
}
.boundary-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid var(--primary-light);
    border-radius: 50%;
    pointer-events: none;
    animation: pulseRing 3s infinite;
}
@keyframes pulseRing {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}
.boundary-house {
    position: absolute;
    width: 26px; height: 26px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    cursor: pointer;
    transition: all .25s;
    background: var(--surface);
    border: 2px solid var(--border);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 3;
}
.boundary-house:hover { transform: scale(1.2); z-index: 10; }
.boundary-house.verified {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white; border-color: #047857;
}
.boundary-house.served {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white; border-color: #b45309;
}
.boundary-house.rejected {
    background: #fee2e2; border-color: #fca5a5; opacity: 0.6;
}
.boundary-legend {
    display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
    font-size: 11.5px; color: var(--text-muted);
    margin-bottom: 14px;
}
.boundary-legend span { display: flex; align-items: center; gap: 5px; }
.boundary-legend .legend-box {
    width: 14px; height: 14px; border-radius: 4px; display: inline-block;
}

/* ==================== Marketplace Home Feed ==================== */
.market-categories {
    display: flex; gap: 8px; overflow-x: auto;
    padding: 2px 0 12px;
    scrollbar-width: none;
}
.market-categories::-webkit-scrollbar { display: none; }
.market-cat {
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all .2s;
    flex-shrink: 0;
}
.market-cat.active { background: var(--primary); color: white; border-color: var(--primary); }

.product-grid-home {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.product-card-home {
    background: var(--surface);
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all .25s;
}
.product-card-home:hover { box-shadow: var(--shadow); border-color: var(--primary-light); }
.product-card-home .pc-image {
    height: 110px;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    display: flex; align-items: center; justify-content: center;
    font-size: 48px;
    position: relative;
}
.product-card-home .pc-image img {
    width: 100%; height: 100%; object-fit: cover;
}
.product-card-home .pc-badge {
    position: absolute; top: 6px; left: 6px;
    background: rgba(0,0,0,0.7); color: white;
    padding: 2px 8px; border-radius: 999px;
    font-size: 9.5px; font-weight: 700;
}
.product-card-home .pc-body { padding: 10px; }
.product-card-home .pc-title {
    font-size: 12.5px; font-weight: 700;
    line-height: 1.5; margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-card-home .pc-price {
    font-size: 12.5px;
    font-weight: 800;
    color: var(--primary);
}
.product-card-home .pc-seller {
    font-size: 10.5px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* ==================== Product Detail ==================== */
.product-detail-img {
    width: 100%;
    max-height: 300px;
    border-radius: 16px;
    object-fit: cover;
    margin-bottom: 14px;
}

/* ==================== Tags Input ==================== */
.tags-input-wrap {
    display: flex; flex-wrap: wrap; gap: 6px;
    padding: 8px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    min-height: 44px;
}
.tags-input-wrap input {
    flex: 1; min-width: 100px;
    border: none; background: transparent;
    outline: none; font-family: inherit;
    font-size: 13px;
}
.tag-chip {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}
.tag-chip button {
    border: none; background: transparent;
    color: var(--primary-dark);
    cursor: pointer; font-size: 13px;
    padding: 0; line-height: 1;
}

/* ==================== Real-time Notification Badge ==================== */
.live-badge {
    position: relative;
}
.live-badge::after {
    content: '';
    position: absolute;
    top: -2px; right: -2px;
    width: 10px; height: 10px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid var(--surface);
    animation: pulseDot 1.5s infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.15); }
}

/* ==================== Room Image Selection ==================== */
.room-img-preview {
    width: 80px; height: 80px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    display: flex; align-items: center; justify-content: center;
    font-size: 40px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid var(--border);
}
.room-img-preview img { width: 100%; height: 100%; object-fit: cover; }

.media-type-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}

/* ==================== Member Picker (Fixed) ==================== */
.member-picker-shell {
    background: var(--surface-2);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 8px;
    margin-bottom: 10px;
}
.member-picker-search {
    width: 100%;
    padding: 9px 12px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-family: inherit;
    font-size: 12.5px;
    outline: none;
    margin-bottom: 8px;
}
.member-picker-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}
.member-pick-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: all .15s;
    margin-bottom: 4px;
    background: var(--surface);
    border: 1.5px solid transparent;
}
.member-pick-item:hover { background: var(--primary-soft); }
.member-pick-item.selected {
    background: linear-gradient(135deg, var(--primary-soft), #ccfbf1);
    border-color: var(--primary);
}
.member-pick-item .mp-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; flex-shrink: 0;
    border: 2px solid var(--surface);
}
.member-pick-item .mp-info { flex: 1; min-width: 0; }
.member-pick-item .mp-name { font-size: 13px; font-weight: 600; }
.member-pick-item .mp-sub { font-size: 11px; color: var(--text-muted); }
.member-pick-item .mp-check {
    width: 26px; height: 26px;
    border-radius: 8px;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px;
    color: transparent;
    flex-shrink: 0;
    transition: all .2s;
    background: var(--surface);
}
.member-pick-item.selected .mp-check {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: scale(1.05);
}

.custom-member-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
    min-height: 30px;
}
.custom-member-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
}
.custom-member-chip button {
    border: none;
    background: rgba(255,255,255,0.25);
    color: white;
    width: 18px; height: 18px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    display: flex; align-items: center; justify-content: center;
    padding: 0;
}

/* ==================== Product Discount ==================== */
.product-price-wrap {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.product-price-original {
    font-size: 11px;
    text-decoration: line-through;
    color: var(--text-faint);
}
.product-price-final {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary);
}
.product-discount-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    z-index: 2;
}
.pc-old-price {
    font-size: 10.5px;
    text-decoration: line-through;
    color: var(--text-faint);
    margin-right: 4px;
}

/* ==================== Announcement Mention ==================== */
.mention-box {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    border: 2px solid #fbbf24;
}
.mention-label {
    font-size: 11.5px;
    font-weight: 700;
    color: #92400e;
    margin-bottom: 6px;
}
.mention-user-display {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border-radius: 10px;
    padding: 10px;
}
.mention-user-display .mu-avatar {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
}

/* ==================== Personal Announcement Receiver Info ==================== */
.receiver-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #fce7f3, #fbcfe8);
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 12.5px;
}
.receiver-info .ri-icon {
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.7);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

/* ==================== Service Dashboard ==================== */
.sd-stat-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.sd-stat {
    background: var(--surface);
    border-radius: 12px;
    padding: 10px 6px;
    border: 1px solid var(--border);
    text-align: center;
}
.sd-stat .sd-val { font-size: 18px; font-weight: 800; line-height: 1.2; }
.sd-stat .sd-label { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.sd-stat.pending .sd-val { color: #f59e0b; }
.sd-stat.approved .sd-val { color: #10b981; }
.sd-stat.rejected .sd-val { color: #ef4444; }
.sd-stat.fulfilled .sd-val { color: #3b82f6; }

.req-card {
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid var(--border);
    padding: 14px;
    margin-bottom: 10px;
    border-right: 4px solid var(--border);
}
.req-card.pending { border-right-color: #f59e0b; }
.req-card.approved { border-right-color: #10b981; }
.req-card.rejected { border-right-color: #ef4444; }
.req-card.fulfilled { border-right-color: #3b82f6; }

.req-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.req-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.req-body { flex: 1; min-width: 0; }
.req-name { font-weight: 700; font-size: 13px; }
.req-date { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.req-data {
    background: var(--surface-2);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    font-size: 12px;
    line-height: 1.9;
}
.req-data .rd-row { display: flex; gap: 6px; }
.req-data .rd-key { color: var(--text-muted); min-width: 90px; }
.req-data .rd-val { color: var(--text); font-weight: 600; }

.req-actions {
    display: flex; gap: 6px; flex-wrap: wrap;
    padding-top: 10px; border-top: 1px solid var(--border);
}
.req-actions button {
    flex: 1; padding: 8px 12px;
    border-radius: 10px; border: none;
    font-family: inherit; font-weight: 600;
    font-size: 12px; cursor: pointer;
    transition: all .2s;
}
.req-actions button.approve { background: #d1fae5; color: #065f46; }
.req-actions button.approve:hover { background: #10b981; color: white; }
.req-actions button.reject { background: #fee2e2; color: #991b1b; }
.req-actions button.reject:hover { background: #ef4444; color: white; }
.req-actions button.fulfill { background: #dbeafe; color: #1e40af; }
.req-actions button.fulfill:hover { background: #3b82f6; color: white; }

/* ==================== Gift Packet ==================== */
.gift-packet {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    border: 2px dashed #f59e0b;
    position: relative;
    overflow: hidden;
}
.gift-packet::before {
    content: '🎁';
    position: absolute;
    top: -10px; left: -10px;
    font-size: 80px;
    opacity: 0.15;
    transform: rotate(-15deg);
}
.gift-packet .gp-title {
    font-weight: 800; font-size: 13.5px;
    color: #92400e; margin-bottom: 6px;
    display: flex; align-items: center; gap: 6px;
}
.gift-packet .gp-amount {
    font-size: 20px; font-weight: 800;
    color: #b45309; margin: 6px 0;
}
.gift-packet .gp-desc {
    font-size: 11.5px; color: #92400e;
    margin-bottom: 10px; line-height: 1.7;
}
.gift-packet .gp-claim-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
    transition: all .2s;
    position: relative;
    z-index: 1;
}
.gift-packet .gp-claim-btn:active { transform: scale(0.97); }
.gift-packet .gp-claimed {
    text-align: center;
    font-weight: 700;
    color: #065f46;
    background: #d1fae5;
    padding: 10px;
    border-radius: 10px;
    font-size: 12.5px;
}
.gift-packet .gp-progress {
    height: 6px;
    background: rgba(255,255,255,0.5);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.gift-packet .gp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f59e0b, #dc2626);
    transition: width .4s;
}

/* ==================== Delivery Options ==================== */
.delivery-option {
    display: flex; align-items: center; gap: 10px;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    margin-bottom: 8px;
    background: var(--surface);
    transition: all .2s;
}
.delivery-option:hover { border-color: var(--primary-light); }
.delivery-option.selected {
    border-color: var(--primary);
    background: linear-gradient(135deg, var(--primary-soft), #ccfbf1);
}
.delivery-option .do-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.delivery-option .do-body { flex: 1; }
.delivery-option .do-title { font-weight: 700; font-size: 13px; }
.delivery-option .do-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.delivery-option .do-cost { font-size: 12px; font-weight: 800; color: var(--primary); }
.delivery-option .do-check {
    width: 24px; height: 24px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    color: transparent;
    font-size: 13px;
}
.delivery-option.selected .do-check {
    background: var(--primary); border-color: var(--primary); color: white;
}

/* ==================== Upcoming Events (Countdown) ==================== */
.upcoming-card {
    background: linear-gradient(135deg, #7c3aed, #4c1d95);
    color: white;
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}
.upcoming-card::after {
    content: '';
    position: absolute;
    top: -50px; right: -50px;
    width: 150px; height: 150px;
    background: radial-gradient(circle, rgba(255,255,255,0.15), transparent);
    border-radius: 50%;
}
.upcoming-card .uc-title {
    font-weight: 800; font-size: 15px;
    margin-bottom: 6px; position: relative; z-index: 1;
}
.upcoming-card .uc-desc {
    font-size: 12.5px; opacity: 0.9;
    line-height: 1.7; margin-bottom: 14px;
    position: relative; z-index: 1;
}
.upcoming-card .uc-timer {
    display: flex; gap: 8px;
    position: relative; z-index: 1;
}
.upcoming-card .uc-time-block {
    flex: 1;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}
.upcoming-card .uc-time-val {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
}
.upcoming-card .uc-time-label {
    font-size: 10.5px;
    opacity: 0.85;
    margin-top: 3px;
}
.upcoming-card .uc-date {
    display: inline-block;
    background: rgba(255,255,255,0.18);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    margin-bottom: 10px;
    position: relative; z-index: 1;
}

/* ==================== Service with Image ==================== */
.service-img-preview {
    width: 100%;
    height: 140px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    display: flex; align-items: center; justify-content: center;
    font-size: 60px;
    overflow: hidden;
    margin-bottom: 10px;
}
.service-img-preview img { width: 100%; height: 100%; object-fit: cover; }
.service-card-img {
    width: 100%;
    height: 100px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 10px;
}

/* ==================== V9 Animations ==================== */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes slideUpIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideRightIn { from { opacity: 0; transform: translateX(-30px); } to { opacity: 1; transform: translateX(0); } }
@keyframes popIn { 0% { transform: scale(0.85); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 8px rgba(13,148,136,0.3); } 50% { box-shadow: 0 0 22px rgba(13,148,136,0.55); } }
@keyframes shimmerMove { 0% { background-position: -200% center; } 100% { background-position: 200% center; } }
@keyframes iconBounce { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-4px) scale(1.08); } }

.anim-slide-up { animation: slideUpIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both; }
.anim-slide-right { animation: slideRightIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) both; }
.anim-pop { animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) both; }
.anim-glow { animation: glowPulse 2.5s ease-in-out infinite; }
.anim-icon-bounce { animation: iconBounce 2.5s ease-in-out infinite; }

/* ==================== Enhanced Stats ==================== */
.stats-row-wide {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}
.stat-card-anim {
    background: var(--surface);
    border-radius: 14px;
    padding: 12px 8px;
    border: 1px solid var(--border);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: popIn 0.4s both;
}
.stat-card-anim:nth-child(1) { animation-delay: 0.05s; }
.stat-card-anim:nth-child(2) { animation-delay: 0.1s; }
.stat-card-anim:nth-child(3) { animation-delay: 0.15s; }
.stat-card-anim:nth-child(4) { animation-delay: 0.2s; }
.stat-card-anim:nth-child(5) { animation-delay: 0.25s; }
.stat-card-anim:nth-child(6) { animation-delay: 0.3s; }
.stat-card-anim:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card-anim .stat-icon-wrap {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px;
    margin: 0 auto 6px;
    transition: all 0.3s;
}
.stat-card-anim:hover .stat-icon-wrap {
    transform: scale(1.15) rotate(-8deg);
    box-shadow: 0 6px 16px rgba(13, 148, 136, 0.25);
}
.stat-card-anim .stat-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.2;
}
.stat-card-anim .stat-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ==================== Horizontal Scroll ==================== */
.hscroll-section {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 4px 16px 14px;
    margin: 0 -16px;
    scrollbar-width: none;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.hscroll-section::-webkit-scrollbar { display: none; }

.hscroll-card {
    flex-shrink: 0;
    min-width: 150px;
    max-width: 180px;
    background: var(--surface);
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    animation: slideUpIn 0.4s both;
}
.hscroll-card:nth-child(1) { animation-delay: 0.05s; }
.hscroll-card:nth-child(2) { animation-delay: 0.1s; }
.hscroll-card:nth-child(3) { animation-delay: 0.15s; }
.hscroll-card:nth-child(4) { animation-delay: 0.2s; }
.hscroll-card:nth-child(5) { animation-delay: 0.25s; }
.hscroll-card:nth-child(6) { animation-delay: 0.3s; }
.hscroll-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow); }
.hscroll-card:active { transform: scale(0.97); }

.hscroll-card-icon {
    height: 82px;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    display: flex; align-items: center; justify-content: center;
    font-size: 40px;
    position: relative;
    overflow: hidden;
}
.hscroll-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.hscroll-card-body { padding: 9px 11px; }
.hscroll-card-title {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    margin-bottom: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hscroll-card-sub { font-size: 10.5px; color: var(--text-muted); }

/* ==================== Discover Tabs ==================== */
.discover-tabs {
    display: flex;
    background: var(--surface);
    border-radius: 14px;
    padding: 4px;
    margin-bottom: 14px;
    gap: 4px;
    box-shadow: var(--shadow-xs);
    border: 1px solid var(--border);
}
.discover-tab {
    flex: 1;
    padding: 10px 16px;
    border-radius: 10px;
    background: transparent;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.25s;
}
.discover-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}

/* ==================== Micro animations ==================== */
.list-item { transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.list-item:hover { transform: translateX(-3px); }
.list-item:hover .li-icon { transform: scale(1.12) rotate(-6deg); }

.post { transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); animation: slideUpIn 0.4s both; }
.post:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.btn { transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px) scale(0.97); }

.form-group input, .form-group textarea, .form-group select {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.form-group input:focus, .form-group textarea:focus {
    transform: translateY(-1px);
}

.chip-option { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.chip-option:active { transform: scale(0.95); }

.nav-btn { transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1); }
.nav-btn:active .nav-ic { transform: scale(0.85); }

.emoji-opt { transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.emoji-opt:active { transform: scale(0.88); }
.emoji-opt.selected { animation: popIn 0.3s; }

/* ==================== Slogan ==================== */
.app-slogan {
    font-size: 11.5px;
    opacity: 0.92;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* ==================== Chat input fix ==================== */
.chat-input input:focus { transform: none; }

/* ==================== Token request card ==================== */
.token-request-card {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    border: 2px solid #3b82f6;
    position: relative;
    overflow: hidden;
}
.token-request-card::before {
    content: '💰';
    position: absolute;
    top: -10px; left: -10px;
    font-size: 70px;
    opacity: 0.15;
    transform: rotate(-15deg);
}

/* ==================== V19: Revenue & Promo ==================== */
.sub-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
}
.sub-status-active { background: linear-gradient(135deg,#10b981,#059669); color: white; }
.sub-status-expired { background: #fee2e2; color: #991b1b; }
.sub-status-none { background: var(--surface-2); color: var(--text-muted); }

.gift-card-visual {
    background: linear-gradient(135deg,#7c3aed 0%,#4c1d95 50%,#1e1b4b 100%);
    color: white;
    border-radius: 20px;
    padding: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(124,58,237,0.35);
    margin-bottom: 14px;
    animation: slideUpIn 0.4s both;
}
.gift-card-visual::before {
    content: '';
    position: absolute;
    top: -40px; right: -40px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
    border-radius: 50%;
}
.gift-card-visual::after {
    content: '🎁';
    position: absolute;
    bottom: -20px; left: -10px;
    font-size: 100px;
    opacity: 0.08;
    transform: rotate(-15deg);
}
.gift-card-visual .gc-label { font-size: 11px; opacity: 0.85; letter-spacing: 2px; position: relative; z-index: 1; }
.gift-card-visual .gc-amount { font-size: 30px; font-weight: 800; margin: 8px 0 4px; position: relative; z-index: 1; }
.gift-card-visual .gc-code {
    font-family: 'Courier New', monospace;
    font-size: 18px;
    letter-spacing: 4px;
    background: rgba(255,255,255,0.15);
    padding: 8px 12px;
    border-radius: 10px;
    margin-top: 10px;
    position: relative;
    z-index: 1;
    text-align: center;
}

.discount-code-input {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
}
.discount-code-input input {
    flex: 1;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 13px;
    background: var(--surface-2);
    outline: none;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.discount-code-input input:focus { border-color: var(--primary-light); background: var(--surface); }
.discount-code-input button {
    padding: 11px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg,var(--primary),var(--primary-dark));
    color: white;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.2s;
}
.discount-code-input button:active { transform: scale(0.96); }

.discount-applied {
    background: linear-gradient(135deg,#d1fae5,#a7f3d0);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 12.5px;
    color: #065f46;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border: 2px dashed #10b981;
}
.discount-applied button {
    background: transparent;
    border: none;
    color: #991b1b;
    font-weight: 700;
    cursor: pointer;
    font-size: 16px;
    padding: 2px 8px;
}

.revenue-setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: var(--surface);
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    gap: 10px;
}
.revenue-setting-row .rsr-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    flex: 1;
}
.revenue-setting-row input {
    width: 90px;
    padding: 8px 10px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    text-align: center;
    background: var(--surface-2);
    outline: none;
}
.revenue-setting-row input:focus { border-color: var(--primary-light); background: white; }
.revenue-setting-row .rsr-unit {
    font-size: 11px;
    color: var(--text-muted);
    min-width: 40px;
    text-align: center;
}

.sub-tier-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: all 0.2s;
}
.sub-tier-card:hover { border-color: var(--primary-light); }
.sub-tier-card .stc-amount {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
}
.sub-tier-card .stc-label {
    font-size: 11.5px;
    color: var(--text-muted);
    margin-top: 2px;
}
.sub-tier-card .stc-price {
    text-align: left;
}
.sub-tier-card .stc-price-val {
    font-size: 16px;
    font-weight: 800;
    color: #b45309;
}
.sub-tier-card .stc-price-label {
    font-size: 10.5px;
    color: var(--text-muted);
}

@keyframes slideRightIn {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}
.anim-slide-right { animation: slideRightIn 0.35s both; }

/* ==================== V20: Fund, Anonymous, "به توان هم" ==================== */
.fund-card-hero {
    background: linear-gradient(135deg, #0d9488 0%, #0f766e 50%, #134e4a 100%);
    color: white;
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(13,148,136,0.35);
    animation: slideUpIn 0.4s both;
}
.fund-card-hero::before {
    content: '💰';
    position: absolute;
    bottom: -30px; left: -10px;
    font-size: 140px;
    opacity: 0.1;
    transform: rotate(-12deg);
}
.fund-card-hero::after {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%);
    border-radius: 50%;
}
.fund-card-hero .fch-label { font-size: 12px; opacity: 0.9; letter-spacing: 1px; position: relative; z-index: 1; }
.fund-card-hero .fch-amount { font-size: 32px; font-weight: 800; margin: 8px 0 6px; position: relative; z-index: 1; line-height: 1.2; }
.fund-card-hero .fch-sub { font-size: 11.5px; opacity: 0.85; position: relative; z-index: 1; }
.fund-card-hero .fch-actions { display: flex; gap: 8px; margin-top: 16px; position: relative; z-index: 1; }
.fund-card-hero .fch-actions button {
    flex: 1;
    padding: 10px 14px;
    border-radius: 12px;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    transition: all 0.2s;
}
.fund-card-hero .fch-actions button.primary {
    background: white;
    color: #0f766e;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.fund-card-hero .fch-actions button.secondary {
    background: rgba(255,255,255,0.2);
    color: white;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
}
.fund-card-hero .fch-actions button:active { transform: scale(0.97); }

/* Campaign cards */
.campaign-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.campaign-card:hover { border-color: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow); }
.campaign-card .cc-header {
    display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.campaign-card .cc-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.campaign-card .cc-title { font-weight: 700; font-size: 13.5px; }
.campaign-card .cc-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.campaign-card .cc-progress-track {
    height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; margin: 8px 0;
}
.campaign-card .cc-progress-fill {
    height: 100%; border-radius: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.4s ease;
}
.campaign-card .cc-stats {
    display: flex; justify-content: space-between; font-size: 11px; color: var(--text-muted);
    margin-bottom: 8px;
}

/* Anonymous toggle */
.anon-toggle-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: linear-gradient(135deg, #f3e8ff, #e9d5ff);
    border-radius: 14px;
    margin-bottom: 14px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}
.anon-toggle-row.active {
    background: linear-gradient(135deg, #ddd6fe, #c4b5fd);
    border-color: #7c3aed;
}
.anon-toggle-row .atr-icon {
    width: 44px; height: 44px;
    background: rgba(255,255,255,0.7);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
}
.anon-toggle-row .atr-body { flex: 1; min-width: 0; }
.anon-toggle-row .atr-title { font-weight: 700; font-size: 13px; color: #4c1d95; }
.anon-toggle-row .atr-sub { font-size: 11px; color: #6b21a8; margin-top: 2px; line-height: 1.5; }
.anon-toggle-row .atr-switch {
    width: 46px; height: 26px;
    background: rgba(255,255,255,0.7);
    border-radius: 999px;
    position: relative;
    transition: all 0.3s;
    flex-shrink: 0;
    border: 2px solid #a78bfa;
}
.anon-toggle-row.active .atr-switch { background: #7c3aed; border-color: #7c3aed; }
.anon-toggle-row .atr-switch::after {
    content: '';
    position: absolute;
    top: 2px; right: 2px;
    width: 18px; height: 18px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.anon-toggle-row.active .atr-switch::after { right: 22px; }

/* "به توان هم" section */
.ttm-hero {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    color: white;
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 14px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(245,158,11,0.35);
}
.ttm-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(255,255,255,0.2), transparent 45%),
                radial-gradient(circle at 85% 80%, rgba(255,255,255,0.12), transparent 45%);
    pointer-events: none;
}
.ttm-hero .ttm-badge {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}
.ttm-hero h1 { font-size: 22px; font-weight: 800; margin-bottom: 6px; position: relative; z-index: 1; }
.ttm-hero p { font-size: 12.5px; opacity: 0.92; line-height: 1.7; position: relative; z-index: 1; }

.ttm-card {
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    padding: 14px;
    margin-bottom: 12px;
    animation: slideUpIn 0.4s both;
    position: relative;
    overflow: hidden;
}
.ttm-card .ttm-cat-badge {
    position: absolute;
    top: 0; left: 0;
    background: linear-gradient(135deg,#f59e0b,#b45309);
    color: white;
    padding: 4px 12px 4px 16px;
    font-size: 10.5px;
    font-weight: 700;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 999px;
}
.ttm-card .ttm-card-body { margin-top: 22px; }
.ttm-card .ttm-title { font-weight: 700; font-size: 14px; line-height: 1.6; margin-bottom: 6px; }
.ttm-card .ttm-desc { font-size: 12.5px; color: var(--text-soft); line-height: 1.8; margin-bottom: 12px; }
.ttm-card .ttm-mosque-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    margin-bottom: 10px;
}
.ttm-card .ttm-progress-wrap { margin-bottom: 12px; }
.ttm-card .ttm-progress-track {
    height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden;
}
.ttm-card .ttm-progress-fill {
    height: 100%; border-radius: 5px;
    background: linear-gradient(90deg,#f59e0b,#d97706);
    transition: width 0.5s ease;
}
.ttm-card .ttm-amounts {
    display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted);
    margin-top: 6px;
}

.ttm-status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
}
.ttm-status-pending { background: #fef3c7; color: #92400e; }
.ttm-status-approved { background: #d1fae5; color: #065f46; }
.ttm-status-rejected { background: #fee2e2; color: #991b1b; }
.ttm-status-completed { background: #dbeafe; color: #1e40af; }

.ttm-cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.ttm-cat-option {
    padding: 12px 10px;
    border-radius: 12px;
    background: var(--surface);
    border: 2px solid var(--border);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
}
.ttm-cat-option:hover { border-color: #f59e0b; }
.ttm-cat-option.selected {
    background: linear-gradient(135deg,#fef3c7,#fde68a);
    border-color: #f59e0b;
    color: #92400e;
}
.ttm-cat-option .tco-icon { font-size: 22px; display: block; margin-bottom: 4px; }

/* ==================== V23: Stories ==================== */
.stories-bar {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 4px 16px 14px;
    margin: 0 -16px 6px;
    scrollbar-width: none;
    scroll-behavior: smooth;
}
.stories-bar::-webkit-scrollbar { display: none; }

.story-bubble {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    flex-shrink: 0;
    animation: popIn 0.4s both;
}

.story-ring {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #dc2626, #7c3aed);
    padding: 3px;
    position: relative;
    transition: all 0.25s;
}
.story-ring:hover { transform: scale(1.06); }
.story-ring.seen {
    background: var(--surface-3);
    opacity: 0.75;
}
.story-ring.seen:hover { opacity: 1; }

.story-ring-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: white;
    padding: 2px;
    position: relative;
    overflow: hidden;
}
.story-ring-inner .story-content {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    overflow: hidden;
}
.story-ring-inner .story-content img {
    width: 100%; height: 100%; object-fit: cover;
}
.story-ring-inner .story-content video {
    width: 100%; height: 100%; object-fit: cover;
}

.story-add-badge {
    position: absolute;
    bottom: -2px; right: -2px;
    width: 22px; height: 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(13,148,136,0.4);
}

.story-new-dot {
    position: absolute;
    top: -2px; right: -2px;
    width: 14px; height: 14px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 8px rgba(239,68,68,0.5);
    animation: pulseDot 1.8s infinite;
}
@keyframes pulseDot {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.85; }
}

.story-name {
    font-size: 10.5px;
    color: var(--text-soft);
    max-width: 72px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

/* Story Viewer */
.story-viewer-backdrop {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}
.story-viewer {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    position: relative;
    background: #000;
    overflow: hidden;
}
.story-progress-bar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    height: 3px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    display: flex;
    gap: 3px;
    z-index: 10;
}
.story-progress-segment {
    flex: 1;
    height: 100%;
    background: rgba(255,255,255,0.35);
    border-radius: 2px;
    overflow: hidden;
    position: relative;
}
.story-progress-fill {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    background: white;
    width: 0;
    transition: width 0.05s linear;
}

.story-header {
    position: absolute;
    top: 26px;
    right: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 10;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
}
.story-header .story-avatar-small {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
    border: 2px solid white;
    overflow: hidden;
}
.story-header .story-avatar-small img {
    width: 100%; height: 100%; object-fit: cover;
}
.story-header .story-info {
    flex: 1;
    min-width: 0;
}
.story-header .story-name {
    font-weight: 700;
    font-size: 13px;
    color: white;
    max-width: 100%;
    text-align: right;
}
.story-header .story-time {
    font-size: 11px;
    opacity: 0.85;
}
.story-header .story-close {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(0,0,0,0.35);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(10px);
}

.story-content-area {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #000;
}
.story-content-area img,
.story-content-area video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.story-text-content {
    padding: 40px 30px;
    text-align: center;
    color: white;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.8;
    text-shadow: 0 3px 8px rgba(0,0,0,0.5);
    max-width: 90%;
}

.story-nav-zone {
    position: absolute;
    top: 60px;
    bottom: 0;
    width: 30%;
    z-index: 5;
    cursor: pointer;
}
.story-nav-zone.left { left: 0; }
.story-nav-zone.right { right: 0; }

.story-viewers-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    color: white;
    font-size: 12px;
    text-align: center;
    z-index: 10;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* Create Story Sheet */
.story-media-type-selector {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}
.story-type-btn {
    flex: 1;
    padding: 12px;
    border-radius: 12px;
    background: var(--surface);
    border: 2px solid var(--border);
    cursor: pointer;
    text-align: center;
    font-family: inherit;
    font-weight: 600;
    font-size: 12.5px;
    transition: all 0.2s;
}
.story-type-btn.selected {
    background: linear-gradient(135deg, var(--primary-soft), #ccfbf1);
    border-color: var(--primary);
    color: var(--primary-dark);
}
.story-type-btn .icon {
    font-size: 22px;
    display: block;
    margin-bottom: 4px;
}

/* ==================== V25: Story Visibility ==================== */
.story-visibility-card {
    background: var(--surface-2);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1.5px solid var(--border);
}
.story-visibility-card .svc-title {
    font-size: 12.5px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}
.story-vis-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.story-vis-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: var(--surface);
    border-radius: 10px;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-align: right;
    color: var(--text);
    font-size: 12.5px;
    width: 100%;
}
.story-vis-option:hover { border-color: var(--primary-light); }
.story-vis-option.selected {
    background: linear-gradient(135deg, var(--primary-soft), #ccfbf1);
    border-color: var(--primary);
    color: var(--primary-dark);
}
.story-vis-option .svo-icon {
    width: 34px; height: 34px;
    background: var(--surface-2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}
.story-vis-option.selected .svo-icon {
    background: rgba(255,255,255,0.7);
}
.story-vis-option .svo-content { flex: 1; min-width: 0; }
.story-vis-option .svo-title { font-weight: 700; font-size: 12.5px; }
.story-vis-option .svo-sub { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }

.story-selection-list {
    max-height: 220px;
    overflow-y: auto;
    background: var(--surface-2);
    border-radius: 12px;
    padding: 6px;
    margin-top: 8px;
}
.story-select-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    cursor: pointer;
    background: var(--surface);
    margin-bottom: 4px;
    transition: all 0.2s;
}
.story-select-item:hover { background: var(--primary-soft); }
.story-select-item.selected {
    background: linear-gradient(135deg, var(--primary-soft), #ccfbf1);
    border: 1.5px solid var(--primary);
}
.story-select-item .ssi-avatar {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-soft), #e0f2fe);
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.story-select-item .ssi-content { flex: 1; min-width: 0; }
.story-select-item .ssi-title { font-weight: 600; font-size: 12.5px; }
.story-select-item .ssi-sub { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.story-select-item .ssi-check {
    width: 24px; height: 24px;
    border-radius: 8px;
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
    color: transparent;
    flex-shrink: 0;
    background: var(--surface);
}
.story-select-item.selected .ssi-check {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.story-info-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(0,0,0,0.4);
    border-radius: 999px;
    font-size: 9.5px;
    color: white;
    backdrop-filter: blur(6px);
    margin-top: 3px;
    font-weight: 600;
}
