/* همراه مامانئو — live web frontend restyled to the governing reference file
   (Telegram-blue, 2026-10-28). Tokens copied verbatim from the reference:
   header #229ED9, page #eaf4fc, surface #ffffff, surface-2 #eff7fd,
   ink #102a3d, ink-soft #476a84, ink-faint #7d9ab0, line #d3e7f5,
   brand-soft #e1f2fc, brand-deep #1479B4, accent #e8a13c,
   danger #c0392b, ok #1e8449, own bubble #effdde, chat bg #dce8f1,
   read ticks #4da34d, radii 18px, Vazirmatn font.
   The superseded cream/beige theme is fully removed. No class/id renamed that app.js depends on;
   new classes (hero, ring, quick, pin-chip, tg-search, club-banner,
   client-card, filter-row) are additive only. */
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{font-family:"Vazirmatn",Tahoma,system-ui,sans-serif;background:#eaf4fc;color:#102a3d;direction:rtl;padding-bottom:calc(74px + env(safe-area-inset-bottom))}
a{color:#229ED9}
.hidden{display:none!important}
.view{display:none;min-height:100vh;animation:fade .2s ease}
.view.active{display:block}
.view.chat-view.active{display:flex}
@keyframes fade{from{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}
.page{padding:16px 16px 110px}
.page h2{color:#102a3d;font-size:21px}
.page h3{color:#102a3d}
.center{text-align:center}
.left{text-align:right}
.muted{color:#476a84}
.small{font-size:12px}
.msg{color:#c0392b;min-height:1em}
/* Header — reference blue, white text */
.topbar{display:flex;align-items:center;gap:12px;background:#229ED9;color:#fff;border-bottom:0;padding:12px 16px;position:sticky;top:0;z-index:20;font-weight:800;box-shadow:0 1px 6px rgba(16,42,61,.18)}
.topbar .logo-sm{width:44px;height:44px;object-fit:contain;flex:none}
.topbar span{flex:1;text-align:center}
.topbar .icon-btn,.chat-header .icon-btn{display:inline-flex;align-items:center;justify-content:center;width:38px;height:38px;border-radius:50%;background:rgba(255,255,255,.18);border:0;color:#fff;font-size:18px;padding:0;flex-shrink:0}
.topbar .icon-btn:active,.chat-header .icon-btn:active{background:rgba(255,255,255,.35)}
.topbar .btn-small{background:#fff;border:0;color:#229ED9}
.logo{width:128px;height:128px;object-fit:contain;display:block;margin:8px auto 16px}
.logo-sm{width:36px;height:36px;object-fit:contain}
.avatar{width:42px;height:42px;border-radius:50%;object-fit:cover;background:#229ED9;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;flex-shrink:0}
.avatar.big{width:92px;height:92px;border:3px solid #e1f2fc}
.auth-card{max-width:480px;margin:30px auto;background:#fff;border:1px solid #d3e7f5;border-radius:20px;padding:18px 16px 8px;box-shadow:0 10px 30px rgba(20,109,168,.13)}
.auth-card h1{text-align:center;color:#102a3d;font-size:21px;font-weight:900}
label{display:block;margin:10px 0;font-size:14px}
input,textarea,select{width:100%;margin-top:4px;padding:12px 14px;border:1px solid #d3e7f5;border-radius:13px;font-family:inherit;font-size:15px;background:#eff7fd;color:#102a3d}
input:focus,textarea:focus,select:focus{border-color:#229ED9;outline:none}
textarea{min-height:70px;resize:vertical;line-height:1.9}
.btn-primary{display:block;width:100%;background:#229ED9;color:#fff;border:0;border-radius:14px;padding:13px 20px;font-family:inherit;font-size:14.5px;font-weight:800;cursor:pointer;margin:10px 0}
.btn-primary:active{transform:scale(.98)}
.btn{display:block;width:100%;background:#229ED9;color:#fff;border:0;border-radius:14px;padding:13px 20px;font-family:inherit;font-size:14.5px;font-weight:800;cursor:pointer;margin:10px 0}
.btn-primary:disabled{opacity:.55}
.btn-outline{display:inline-block;background:#e1f2fc;color:#229ED9;border:0;border-radius:14px;padding:10px 14px;font-family:inherit;font-weight:800;cursor:pointer;text-decoration:none;text-align:center}
.btn-small{background:#e1f2fc;color:#229ED9;border:0;border-radius:11px;padding:8px 14px;font-family:inherit;font-weight:700;cursor:pointer}
.btn.ghost{background:#e1f2fc;color:#229ED9}
.btn-row{display:block;width:100%;text-align:right;background:#fff;border:1px solid #d3e7f5;border-radius:16px;padding:14px 12px;font-family:inherit;font-size:13.5px;font-weight:700;cursor:pointer;margin:6px 0}
.link{background:none;border:0;color:#229ED9;font-family:inherit;font-weight:700;cursor:pointer;padding:8px}
.icon-btn{background:none;border:0;font-size:20px;cursor:pointer;padding:6px;color:#229ED9;text-decoration:none}
/* Tabs — underline style, reference blue */
.tabs{display:flex;gap:4px;flex-wrap:wrap;margin:12px 0;border-bottom:1px solid #d3e7f5}
.tab{flex:1;background:none;border:0;border-bottom:3px solid transparent;border-radius:0;padding:10px 4px;margin-bottom:-1px;font-family:inherit;font-size:14px;font-weight:800;color:#7d9ab0;cursor:pointer;white-space:nowrap;text-align:center}
.tab.active{background:none;color:#229ED9;border-bottom-color:#229ED9}
.card{background:#fff;border:1px solid #d3e7f5;border-radius:18px;padding:16px;margin:12px 0;box-shadow:0 10px 30px rgba(20,109,168,.13)}
.card.soft{background:#eff7fd}
.banner{background:#e1f2fc;border:1px solid #229ED9;color:#1479B4;border-radius:16px;padding:14px 16px;margin:12px 0;font-weight:800}
.banner.warn{background:#faf0d7;border-color:#b97a16;color:#b97a16}
/* Home hero — reference blue hero + countdown ring */
.hero{background:#229ED9;color:#fff;border-radius:22px;padding:20px;margin-bottom:14px;position:relative;overflow:hidden}
.hero h2{margin:0 0 4px;font-size:19px;font-weight:900;color:#fff}
.hero p{margin:0;font-size:13px;opacity:.9;line-height:1.9}
.countdown{display:flex;align-items:center;gap:16px;margin-top:16px}
.ring{position:relative;width:92px;height:92px;flex:none}
.ring svg{transform:rotate(-90deg)}
.ring .num{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center}
.ring .num b{font-size:26px;line-height:1}
.ring .num span{font-size:11px;opacity:.85}
.hero-meta{flex:1;font-size:13px;line-height:2}
.hero-meta b{font-size:14.5px}
/* Stats + account card (reference) */
.stats,.stat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.stat{background:#eff7fd;border:1px solid #d3e7f5;border-radius:16px;padding:12px 8px;text-align:center}
.stat b{display:block;font-size:20px;font-weight:900;color:#229ED9}
.stat span{font-size:11.5px;color:#476a84}
.stat-card{background:#eff7fd;border:1px solid #d3e7f5;border-radius:16px;padding:12px 8px;display:flex;flex-direction:column;gap:4px;font-family:inherit;cursor:pointer}
.stat-num{font-size:20px;font-weight:900;color:#229ED9}
.stat-label{font-size:11.5px;color:#476a84}
.stat-ic{width:36px;height:36px;border-radius:11px;background:#e1f2fc;color:#229ED9;display:flex;align-items:center;justify-content:center;font-size:19px;margin:0 auto 4px;flex-shrink:0}
.ic-blue{background:#e1f2fc;color:#229ED9}.ic-green{background:#e3f3e8;color:#1e8449}.ic-pink{background:#fbeae7;color:#c0392b}.ic-purple{background:#f0e9f8;color:#7a4f9e}.ic-grayblue{background:#e8eef7;color:#476a84}
.num-green{color:#1e8449}
.stat-dot{width:10px;height:10px;border-radius:50%;background:#c0392b;margin:6px auto;flex-shrink:0}
.account-row{display:flex;align-items:center;gap:10px}
.account-row .info{flex:1;min-width:0}
.account-row .phone{font-size:13px;color:#476a84;direction:ltr;text-align:right}
/* Quick grid — reference 2-column layout, file order set in index.html */
.quick,.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.quick button,.quick-grid button,.quick-card{background:#fff;border:1px solid #d3e7f5;border-radius:16px;padding:14px 12px;display:flex;align-items:center;gap:10px;text-align:right;font-weight:700;font-size:13.5px;font-family:inherit;color:#102a3d;cursor:pointer}
.quick .ic,.quick-ic{width:36px;height:36px;border-radius:11px;background:#e1f2fc;color:#229ED9;display:flex;align-items:center;justify-content:center;flex:none;font-size:19px}
.quick small{display:block;font-size:11px;color:#7d9ab0;font-weight:400;margin-top:2px;line-height:1.6}
.badge{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:700;padding:3px 10px;border-radius:999px;white-space:nowrap}
.badge.ok{background:#e3f3e8;color:#1e8449}
.badge.warn{background:#faf0d7;color:#b97a16}
.badge.danger{background:#fbeae7;color:#c0392b}
.badge.brand{background:#e1f2fc;color:#229ED9}
.section-title{font-size:15px;font-weight:800;margin:20px 2px 10px;display:flex;align-items:center;gap:8px;color:#102a3d}
.section-title:first-child{margin-top:2px}
/* Packages — reference plan style */
.packages{display:grid;gap:12px}
.package{background:#fff;border:2px solid #d3e7f5;border-radius:18px;padding:16px;cursor:pointer;position:relative;display:flex;gap:12px;align-items:center}
.package.selected{border-color:#229ED9;background:#e1f2fc}
.package .radio{width:22px;height:22px;border-radius:50%;border:2px solid #7d9ab0;flex:none;position:relative}
.package.selected .radio{border-color:#229ED9}
.package.selected .radio::after{content:"";position:absolute;inset:4px;border-radius:50%;background:#229ED9}
.package .pinfo{flex:1}
.package .popular{position:absolute;top:-10px;left:12px;background:#229ED9;color:#fff;font-size:12px;padding:3px 10px;border-radius:20px}
.price{font-size:16px;font-weight:800;color:#229ED9}
.card-number{direction:ltr;text-align:center;font-size:19px;font-weight:800;letter-spacing:2px;background:#eff7fd;border:1px dashed #229ED9;border-radius:13px;padding:13px;margin:10px 0 4px;color:#1479B4}
/* Bottom nav — reference: white bar, blue active item, 6 items */
.bottom-nav{position:fixed;bottom:0;right:0;left:0;display:flex;background:#fff;border-top:1px solid #d3e7f5;z-index:50;height:74px;padding-bottom:env(safe-area-inset-bottom)}
.bottom-nav button{flex:1;background:none;border:0;font-family:inherit;font-size:10.5px;font-weight:700;color:#7d9ab0;padding:0 1px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;cursor:pointer;position:relative}
.bottom-nav button.active{color:#229ED9}
.nav-badge{position:absolute;top:5px;left:calc(50% + 1px);background:#229ED9;color:#fff;border-radius:999px;font-size:10px;font-weight:800;min-width:18px;height:18px;line-height:18px;text-align:center;padding:0 5px}
.nav-badge.red{background:#c0392b}
/* Chats list — reference thread rows + search + pin chip */
.tg-search{display:flex;align-items:center;gap:8px;background:#eff7fd;border:1px solid #d3e7f5;border-radius:999px;padding:10px 15px;margin-bottom:10px}
.tg-search input{flex:1;border:none;background:none;outline:none;font-size:14px;min-width:0;color:inherit;font-family:inherit}
.chat-list{margin:0 -4px}
.chat-item{display:flex;gap:12px;align-items:center;width:100%;text-align:right;background:transparent;border:0;border-bottom:1px solid #d3e7f5;padding:10px 4px;cursor:pointer;font-family:inherit}
.chat-item:last-child{border-bottom:none}
.chat-item .meta{flex:1;min-width:0}
.chat-item .meta p{margin:2px 0;color:#476a84;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chat-item .top{display:flex;justify-content:space-between;align-items:baseline;gap:8px}
.unread{background:#229ED9;color:#fff;border-radius:999px;font-size:11px;font-weight:800;min-width:20px;height:20px;line-height:20px;text-align:center;padding:0 6px;display:inline-flex;align-items:center;justify-content:center}
.mention-badge{background:#c0392b;color:#fff;border-radius:999px;font-size:12px;font-weight:800;padding:1px 7px}
.pin-chip{display:inline-flex;align-items:center;gap:3px;flex:none;font-size:10px;font-weight:800;color:#229ED9;background:#e1f2fc;border-radius:999px;padding:2px 8px;margin-inline-start:7px;vertical-align:2px}
.pinned-label{color:#229ED9;font-size:12px}
.section-label{color:#102a3d;font-weight:800;margin:14px 4px 4px}
/* Chat view — reference Telegram-style header, bg, bubbles, ticks */
.chat-view{flex-direction:column;height:100dvh}
.chat-header{display:flex;align-items:center;gap:10px;background:#229ED9;color:#fff;border-bottom:0;padding:9px 12px;position:sticky;top:0;z-index:35;box-shadow:0 1px 6px rgba(16,42,61,.22)}
.chat-head-text{flex:1;min-width:0;display:flex;flex-direction:column}
.chat-head-text b{color:#fff}
.pin-bar{background:#faf0d7;border-bottom:1px solid #f0d9a0;padding:8px 12px;font-size:13px;cursor:pointer}
.messages{flex:1;overflow-y:auto;padding:14px 10px 8px;background-color:#dce8f1}
.msg-row{display:flex;margin:8px 0}
.msg-row.own{justify-content:flex-start}
[dir="rtl"] .msg-row.own{justify-content:flex-end}
.bubble{max-width:84%;background:#fff;border-radius:17px;border-end-start-radius:5px;padding:8px 11px 6px;box-shadow:0 1px 2px rgba(16,42,61,.13);overflow-wrap:anywhere}
.msg-row.own .bubble{background:#effdde;color:#17301d;border-end-start-radius:17px;border-end-end-radius:5px}
.bubble .sender{font-size:13px;color:#1479B4;font-weight:800;margin-bottom:2px}
.bubble .time{font-size:10.5px;color:#7d9ab0;text-align:left;display:block;margin-top:1px}
.msg-row.own .bubble .time{color:#4da34d}
.tick{color:#4da34d;font-weight:800}
.tick-sent{color:#7d9ab0;font-weight:800}
.day-sep{text-align:center;font-size:11.5px;margin:4px 0 8px}
.day-sep span{background:rgba(101,138,168,.38);color:#fff;padding:3px 12px;border-radius:999px;font-weight:700}
.voice-wrap{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.voice-wrap audio{height:36px;max-width:210px}
.voice-time{font-size:11.5px;font-weight:700;white-space:nowrap}
.bubble img,.bubble video{max-width:100%;border-radius:10px;cursor:pointer;display:block;margin-bottom:4px}
.reply-quote{border-right:3px solid #229ED9;background:#e1f2fc;padding:6px 8px;border-radius:8px;font-size:13px;color:#476a84;margin-bottom:6px;cursor:pointer}
.forward-label{font-size:12px;color:#7d9ab0;font-style:italic}
.mention-token{color:#1479B4;font-weight:800;background:#e1f2fc;padding:0 5px;border-radius:6px}
.msg-row.own .mention-token{background:rgba(255,255,255,.28);color:#fff}
.reactions{display:flex;gap:4px;flex-wrap:wrap;margin-top:4px}
.reaction{background:#e1f2fc;border-radius:999px;padding:1px 8px;font-size:12px;cursor:pointer}
.poll-box{background:#eff7fd;border-radius:12px;padding:8px;margin-top:4px}
.poll-opt-row{display:flex;justify-content:space-between;background:#fff;border-radius:10px;padding:6px 8px;margin:4px 0;cursor:pointer;border:1px solid #d3e7f5}
.welcome-card{background:#223140;color:#fff;border-radius:20px;padding:16px;text-align:center;margin:20px auto;max-width:320px}
#composer-wrap{position:sticky;bottom:0;background:#fff;border-top:1px solid #d3e7f5;padding:8px 10px calc(8px + env(safe-area-inset-bottom))}
.composer{display:flex;align-items:flex-end;gap:8px}
.composer-pill{flex:1;display:flex;align-items:flex-end;gap:2px;background:#eef4f9;border-radius:24px;padding:4px 6px;min-width:0}
.composer-pill textarea{flex:1;border:none;background:transparent;resize:none;max-height:96px;padding:8px 4px;font-size:14.5px;line-height:1.6;outline:none;min-width:0}
.composer .icon-btn{background:none;border:0;color:#7d9ab0}
.btn-send{background:#229ED9;color:#fff;border:0;border-radius:50%;width:48px;height:48px;font-size:18px;cursor:pointer;flex-shrink:0;box-shadow:0 3px 10px rgba(34,158,217,.35);display:flex;align-items:center;justify-content:center}
.btn-send svg{width:22px;height:22px}
.btn-send .plane{transform:scaleX(-1)}
.mention-box{position:absolute;bottom:76px;right:10px;left:10px;background:#fff;border:1px solid #d3e7f5;border-radius:16px;box-shadow:0 10px 30px rgba(20,109,168,.13);z-index:40;max-height:180px;overflow-y:auto}
.mention-item{padding:10px;cursor:pointer;border-bottom:1px solid #d3e7f5}
.emoji-panel{display:flex;flex-wrap:wrap;gap:2px;background:#fff;border-top:1px solid #d3e7f5;padding:8px}
.emoji-panel button{background:none;border:0;font-size:21px;cursor:pointer;width:40px;height:40px;border-radius:10px;line-height:1}
.voice-rec{display:flex;align-items:center;gap:10px;padding:6px}
/* Club — reference banner/chips, blue top strip, deterrent protection */
.club-banner{border-radius:20px;padding:18px;background:#e1f2fc;border:1px solid #d3e7f5;margin-bottom:14px}
.club-banner h3{margin:0 0 4px;font-size:18px;font-weight:900;color:#1479B4}
.club-banner p{margin:0;font-size:12.5px;color:#476a84;line-height:1.9}
.club-chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.club-chips span{color:#fff;font-size:11px;font-weight:800;padding:4px 11px;border-radius:999px}
.club-protected{user-select:none;-webkit-user-select:none}
.club-protected img,.club-protected video{-webkit-user-drag:none;pointer-events:auto}
.club-post{background:#fff;border:1px solid #d3e7f5;border-top:5px solid #229ED9;border-radius:18px;padding:14px;margin:12px 0;box-shadow:0 10px 30px rgba(20,109,168,.13)}
.club-post.blurred .post-body{filter:blur(13px) saturate(1.25);pointer-events:none;user-select:none}
.club-post img,.club-post video{max-width:100%;border-radius:12px}
.fab{position:fixed;bottom:88px;left:18px;width:56px;height:56px;border-radius:50%;background:#229ED9;color:#fff;border:0;font-size:30px;cursor:pointer;box-shadow:0 10px 22px rgba(34,158,217,.4);z-index:40}
/* Modals / sheets */
.modal{position:fixed;inset:0;background:rgba(8,30,48,.45);z-index:100;display:flex;align-items:flex-end;justify-content:center}
.modal-box{background:#fff;border-radius:22px 22px 0 0;padding:18px;width:100%;max-width:520px;max-height:85vh;overflow-y:auto;box-shadow:0 10px 30px rgba(20,109,168,.13)}
.lightbox-box{background:#fff;border-radius:20px;padding:14px;text-align:center;max-width:92vw}
.lightbox-box img{max-width:100%;max-height:70vh;border-radius:16px}
.toast{position:fixed;bottom:88px;right:50%;transform:translateX(50%);background:#102a3d;color:#fff;padding:10px 18px;border-radius:999px;z-index:200;font-size:13px;font-weight:700}
/* Deadlines — reference client cards + filter pills */
.filter-row{display:flex;gap:8px;margin-bottom:13px;flex-wrap:wrap}
.filter-row button{padding:7px 14px;border-radius:999px;border:1px solid #d3e7f5;background:#fff;font-size:12.5px;font-weight:700;color:#476a84;font-family:inherit;cursor:pointer}
.filter-row button.active{background:#229ED9;border-color:#229ED9;color:#fff}
.client-card{padding:15px 16px}
.client-top{display:flex;align-items:center;gap:11px}
.client-top .info{flex:1;min-width:0}
.client-top .name{font-weight:800;font-size:15px}
.client-top .plan-name{font-size:12px;color:#476a84}
.progress{height:9px;border-radius:99px;background:#eff7fd;border:1px solid #d3e7f5;overflow:hidden;margin:13px 0 8px}
.progress i{display:block;height:100%;border-radius:99px;background:#229ED9}
.progress i.warn{background:#e8a13c}
.progress i.danger{background:#c0392b}
.client-dates{display:flex;justify-content:space-between;font-size:12px;color:#476a84;flex-wrap:wrap;gap:4px}
.client-actions{display:flex;gap:8px;margin-top:12px;flex-wrap:wrap}
.client-actions .btn,.client-actions .btn-primary{width:auto;padding:9px 14px;font-size:12.5px;border-radius:11px}
.empty{text-align:center;color:#7d9ab0;font-size:13.5px;padding:34px 10px;line-height:2}
/* Home follow-up + group/contact rows kept from the live app */
.group-row{display:flex;align-items:center;gap:12px;background:#fff;padding:14px 16px;border-bottom:1px solid #d3e7f5}
.group-row-text{flex:1;min-width:0;display:flex;flex-direction:column}
.group-row-text b{color:#229ED9;font-size:16px}
.group-row-photo{margin-inline-start:auto}
.btn-row-3{display:flex;gap:8px;justify-content:center;margin:14px 0}
.btn-row-3>*{flex:1}
.fa-num{font-family:Tahoma,sans-serif}
