/* ═══════════════════════════════════════════════════════════════
   سیستم مشاوره مربی Pro v2.0 — استایل اصلی
   ═══════════════════════════════════════════════════════════════ */

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

:root {
    --cc-bg:       #ffffff;
    --cc-bg2:      #f4f7fb;
    --cc-bg3:      #eef2f8;
    --cc-bg4:      #e4eaf4;
    --cc-border:   #d0daea;
    --cc-text:     #1a2a3a;
    --cc-text2:    #4a6080;
    --cc-text3:    #8099b3;
    --cc-accent:   #00447f;
    --cc-accent2:  #003366;
    --cc-green:    #22d17a;
    --cc-red:      #ff4f6a;
    --cc-yellow:   #f5a623;
    --cc-radius:   16px;
    --cc-font:     'Vazirmatn', Tahoma, sans-serif;
}

/* ── Reset & Base ─────────────────────────────────────────────── */
#cc-athlete-app,
#cc-coach-app {
    font-family: var(--cc-font);
    direction: rtl;
    color: var(--cc-text);
    background: var(--cc-bg);
    min-height: 80vh;
    border-radius: var(--cc-radius);
    overflow: hidden;
}

/* ── Auth wall ────────────────────────────────────────────────── */
.cc-auth-wall {
    text-align: center; padding: 80px 20px;
    font-family: var(--cc-font); direction: rtl; color: var(--cc-text2);
    background: var(--cc-bg); border-radius: var(--cc-radius);
}
.cc-auth-icon { font-size: 56px; display: block; margin-bottom: 16px; }
.cc-auth-wall a { color: var(--cc-accent); }

/* ─────────────────────────────────────────────────────────────────
   ATHLETE APP
────────────────────────────────────────────────────────────────── */
#cc-athlete-app { position: relative; }

.cc-screen { display: none; }
.cc-screen--active { display: flex; flex-direction: column; }

/* ── کارت‌های مربیان ────────────────────────────────────────── */
.cc-coaches-header {
    padding: 40px 32px 24px;
    background: linear-gradient(135deg, rgba(0,68,127,.08) 0%, transparent 60%);
    border-bottom: 1px solid var(--cc-border);
}
.cc-coaches-title {
    font-size: 26px; font-weight: 800; margin: 0 0 6px;
    background: linear-gradient(135deg, #fff 30%, var(--cc-accent));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.cc-coaches-subtitle { font-size: 14px; color: var(--cc-text2); margin: 0; }

.cc-coaches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px; padding: 28px 32px;
}

.cc-coach-card {
    background: var(--cc-bg3); border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius); padding: 22px;
    cursor: pointer; transition: all .25s ease; position: relative; overflow: hidden;
}
.cc-coach-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(0,68,127,.06), transparent);
    opacity: 0; transition: opacity .3s;
}
.cc-coach-card:hover {
    border-color: var(--cc-accent); transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,68,127,.18);
}
.cc-coach-card:hover::before { opacity: 1; }

.cc-coach-card-top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 14px; }
.cc-coach-card-photo { position: relative; flex-shrink: 0; }
.cc-coach-card-img {
    width: 60px; height: 60px; border-radius: 14px; object-fit: cover;
    border: 2px solid var(--cc-border);
}
.cc-coach-card-initials {
    width: 60px; height: 60px; border-radius: 14px;
    background: linear-gradient(135deg, var(--cc-accent), #00447f);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; color: #fff;
}
.cc-coach-online-dot {
    position: absolute; bottom: 2px; left: 2px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--cc-green); border: 2px solid var(--cc-bg3);
    box-shadow: 0 0 8px var(--cc-green);
}
.cc-coach-card-info { flex: 1; min-width: 0; }
.cc-coach-card-name { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.cc-coach-card-specialty { font-size: 13px; color: var(--cc-accent); margin: 0 0 4px; font-weight: 500; }
.cc-coach-card-exp { font-size: 12px; color: var(--cc-text3); margin: 0; }
.cc-coach-card-desc {
    font-size: 13px; color: var(--cc-text2); line-height: 1.6;
    margin: 0 0 16px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cc-coach-card-footer { display: flex; align-items: center; justify-content: space-between; }
.cc-coach-card-price { font-size: 15px; font-weight: 700; color: var(--cc-accent); }

.cc-consult-btn {
    background: linear-gradient(135deg, var(--cc-accent), var(--cc-accent2));
    color: #fff; border: none; border-radius: 10px;
    padding: 9px 18px; font-family: var(--cc-font); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: all .2s;
}
.cc-consult-btn:hover { opacity: .9; transform: scale(1.03); }

.cc-no-coaches { color: var(--cc-text2); font-size: 15px; padding: 40px; text-align: center; }

/* ── Chat Topbar ─────────────────────────────────────────────── */
.cc-chat-topbar {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 20px; background: var(--cc-bg2);
    border-bottom: 1px solid var(--cc-border); flex-shrink: 0;
}
.cc-back-btn {
    background: var(--cc-bg4); border: 1px solid var(--cc-border); border-radius: 10px;
    color: var(--cc-text2); padding: 8px 14px; cursor: pointer;
    font-family: var(--cc-font); font-size: 13px; display: flex; align-items: center; gap: 6px;
    transition: all .2s; flex-shrink: 0;
}
.cc-back-btn:hover { background: var(--cc-bg3); color: var(--cc-text); }
.cc-chat-topbar-info { display: flex; align-items: center; gap: 12px; flex: 1; }
.cc-topbar-photo { width: 40px; height: 40px; border-radius: 11px; object-fit: cover; flex-shrink: 0; }
.cc-topbar-initials, .cc-topbar-avatar-coach {
    width: 40px; height: 40px; border-radius: 11px;
    background: linear-gradient(135deg, var(--cc-accent), #00447f);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.cc-topbar-name { font-size: 15px; font-weight: 700; }
.cc-topbar-status { font-size: 12px; color: var(--cc-text3); margin-top: 1px; }

/* ── Chat Locked ─────────────────────────────────────────────── */
#cc-chat-locked {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 32px; background: var(--cc-bg);
}
.cc-locked-card {
    background: var(--cc-bg3); border: 1px solid var(--cc-border);
    border-radius: 24px; padding: 48px 40px; text-align: center; max-width: 400px; width: 100%;
    box-shadow: 0 24px 64px rgba(0,68,127,.15);
    animation: cc-fadeup .3s ease;
}
.cc-locked-icon { font-size: 64px; margin-bottom: 20px; display: block; }
.cc-locked-title { font-size: 22px; font-weight: 800; margin: 0 0 10px; }
.cc-locked-desc { font-size: 14px; color: var(--cc-text2); margin: 0 0 24px; line-height: 1.6; }
.cc-locked-price {
    font-size: 36px; font-weight: 800; color: var(--cc-accent); margin-bottom: 4px;
    background: linear-gradient(135deg, var(--cc-accent), #00447f);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.cc-locked-unit { font-size: 14px; color: var(--cc-text3); margin: 0 0 28px; }
.cc-locked-note { font-size: 13px; color: var(--cc-red); margin-top: 12px; min-height: 20px; }

.cc-pay-btn {
    width: 100%; padding: 15px; border-radius: 14px; border: none;
    background: linear-gradient(135deg, #22d17a, #16a34a);
    color: #fff; font-family: var(--cc-font); font-size: 15px; font-weight: 700;
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all .2s; box-shadow: 0 8px 24px rgba(34,209,122,.25);
}
.cc-pay-btn:hover { opacity: .9; transform: translateY(-2px); box-shadow: 0 12px 32px rgba(34,209,122,.35); }
.cc-pay-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.cc-btn-spinner {
    width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff; border-radius: 50%; animation: cc-spin .7s linear infinite; display: inline-block;
}

/* ── Messages ────────────────────────────────────────────────── */
.cc-messages-body {
    flex: 1; overflow-y: auto; padding: 20px 24px;
    display: flex; flex-direction: column; gap: 2px;
    background: var(--cc-bg); min-height: 0;
}
.cc-messages-body::-webkit-scrollbar { width: 4px; }
.cc-messages-body::-webkit-scrollbar-thumb { background: var(--cc-bg4); border-radius: 4px; }

.cc-messages-list { display: flex; flex-direction: column; gap: 10px; }

.cc-message { display: flex; flex-direction: column; }
.cc-message.cc-msg--mine { align-items: flex-end; }
.cc-message.cc-msg--other { align-items: flex-start; }

.cc-msg-bubble {
    max-width: 68%; padding: 12px 16px; border-radius: 18px; font-size: 14px;
    line-height: 1.65; word-break: break-word; animation: cc-fadeup .2s ease;
}
.cc-msg--mine .cc-msg-bubble {
    background: linear-gradient(135deg, var(--cc-accent), var(--cc-accent2));
    color: #fff; border-bottom-left-radius: 4px;
}
.cc-msg--other .cc-msg-bubble {
    background: var(--cc-bg3); border: 1px solid var(--cc-border);
    color: var(--cc-text); border-bottom-right-radius: 4px;
}
.cc-msg-bubble p { margin: 0 0 4px; }
.cc-msg-bubble p:last-child { margin: 0; }
.cc-msg-img {
    max-width: 220px; border-radius: 12px; cursor: pointer;
    transition: transform .2s; display: block; margin-bottom: 4px;
}
.cc-msg-img:hover { transform: scale(1.02); }
.cc-msg-meta { font-size: 11px; color: var(--cc-text3); margin-top: 4px; }

/* ── Chat Footer ─────────────────────────────────────────────── */
.cc-chat-footer {
    display: flex; align-items: flex-end; gap: 10px;
    padding: 14px 20px; background: var(--cc-bg2);
    border-top: 1px solid var(--cc-border); flex-shrink: 0;
}
.cc-msg-input {
    flex: 1; background: var(--cc-bg4); border: 1px solid var(--cc-border);
    border-radius: 14px; color: var(--cc-text); font-family: var(--cc-font);
    font-size: 14px; padding: 12px 16px; resize: none; outline: none;
    transition: border-color .2s; min-height: 48px; max-height: 120px; line-height: 1.5;
}
.cc-msg-input:focus { border-color: var(--cc-accent); }
.cc-msg-input::placeholder { color: var(--cc-text3); }

.cc-img-btn {
    width: 48px; height: 48px; border-radius: 14px; border: 1px solid var(--cc-border);
    background: var(--cc-bg4); color: var(--cc-text2); cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all .2s; flex-shrink: 0;
}
.cc-img-btn:hover { background: var(--cc-bg3); color: var(--cc-text); }

.cc-send-btn {
    width: 48px; height: 48px; border-radius: 14px; border: none;
    background: linear-gradient(135deg, var(--cc-accent), var(--cc-accent2));
    color: #fff; cursor: pointer; display: flex; align-items: center;
    justify-content: center; transition: all .2s; flex-shrink: 0;
}
.cc-send-btn:hover { opacity: .9; transform: scale(1.05); }
.cc-send-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.cc-chat-closed-bar {
    background: rgba(255,79,106,.08); border-top: 1px solid rgba(255,79,106,.2);
    padding: 14px 20px; text-align: center; font-size: 14px; color: var(--cc-red);
    font-weight: 600; flex-shrink: 0;
}

/* ─────────────────────────────────────────────────────────────────
   COACH APP
────────────────────────────────────────────────────────────────── */
#cc-coach-app {
    display: flex;
    border: 1px solid var(--cc-border);
}

/* ── Sidebar ─────────────────────────────────────────────────── */
.cc-coach-sidebar {
    width: 300px; background: var(--cc-bg2);
    border-left: 1px solid var(--cc-border);
    display: flex; flex-direction: column; flex-shrink: 0;
    overflow: hidden;
}
.cc-coach-sidebar-header { padding: 18px 16px 12px; border-bottom: 1px solid var(--cc-border); }
.cc-coach-sidebar-profile { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.cc-coach-sidebar-avatar { width: 40px; height: 40px; border-radius: 11px; overflow: hidden; flex-shrink: 0; }
.cc-coach-sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cc-coach-sidebar-name { font-size: 14px; font-weight: 700; }
.cc-coach-sidebar-role { font-size: 12px; color: var(--cc-accent); }

.cc-search-input {
    width: 100%; background: var(--cc-bg4); border: 1px solid var(--cc-border);
    border-radius: 10px; color: var(--cc-text); font-family: var(--cc-font);
    font-size: 13px; padding: 9px 12px; outline: none; transition: border-color .2s;
    margin-bottom: 10px;
}
.cc-search-input:focus { border-color: var(--cc-accent); }
.cc-search-input::placeholder { color: var(--cc-text3); }

.cc-coach-sidebar-tabs { display: flex; gap: 4px; }
.cc-tab-btn {
    flex: 1; padding: 7px 4px; border-radius: 8px; border: none;
    background: transparent; color: var(--cc-text2); font-family: var(--cc-font);
    font-size: 12px; cursor: pointer; transition: all .2s;
}
.cc-tab-btn:hover { background: var(--cc-bg3); color: var(--cc-text); }
.cc-tab-btn--active { background: var(--cc-accent) !important; color: #fff !important; }

.cc-sessions-list { overflow-y: auto; flex: 1; }
.cc-sessions-list::-webkit-scrollbar { width: 3px; }
.cc-sessions-list::-webkit-scrollbar-thumb { background: var(--cc-bg4); border-radius: 3px; }

.cc-session-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; cursor: pointer; transition: background .15s;
    border-bottom: 1px solid #d0dce8; position: relative;
}
.cc-session-item:hover { background: var(--cc-bg3); }
.cc-session-item--active { background: rgba(0,68,127,.1); border-right: 3px solid var(--cc-accent); padding-right: 13px; }
.cc-session-item--closed { opacity: .65; }

.cc-session-item-avatar { position: relative; flex-shrink: 0; }
.cc-avatar-initials {
    width: 44px; height: 44px; border-radius: 12px;
    background: linear-gradient(135deg, #00447f, #00447f);
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; font-weight: 700; color: #fff;
}
.cc-status-dot {
    position: absolute; bottom: 0; left: 0;
    width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--cc-bg2);
}
.cc-dot--active { background: var(--cc-green); box-shadow: 0 0 6px var(--cc-green); }
.cc-dot--closed { background: var(--cc-text3); }

.cc-session-item-info { flex: 1; min-width: 0; }
.cc-session-item-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-session-item-date { font-size: 11px; color: var(--cc-text3); margin-top: 3px; }

.cc-unread-badge {
    background: var(--cc-accent); color: #fff; font-size: 11px;
    font-weight: 700; padding: 2px 7px; border-radius: 20px; flex-shrink: 0;
}
.cc-empty-msg { color: var(--cc-text3); font-size: 13px; text-align: center; padding: 32px 16px; }
.cc-error-msg { color: var(--cc-red); font-size: 13px; text-align: center; padding: 24px 16px; }

/* ── Coach Chat Area ─────────────────────────────────────────── */
.cc-coach-chat-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.cc-empty-state {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--cc-text3); gap: 10px;
}
.cc-empty-icon { font-size: 60px; opacity: .4; }
.cc-empty-text { font-size: 16px; font-weight: 600; color: var(--cc-text2); }
.cc-empty-sub { font-size: 13px; }

#cc-coach-chat-wrap { display: flex; flex-direction: column; height: 100%; }

.cc-end-session-btn {
    padding: 9px 16px; border-radius: 10px;
    border: 1px solid rgba(255,79,106,.35); background: rgba(255,79,106,.08);
    color: var(--cc-red); font-family: var(--cc-font); font-size: 13px;
    font-weight: 600; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.cc-end-session-btn:hover { background: rgba(255,79,106,.18); border-color: var(--cc-red); }

.cc-session-status-badge { display: inline-block; }
.cc-badge {
    font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 20px;
}
.cc-badge--active { background: rgba(34,209,122,.12); color: var(--cc-green); }
.cc-badge--closed { background: rgba(90,90,114,.2); color: var(--cc-text3); }

/* ── Confirm Modal ───────────────────────────────────────────── */
.cc-modal-overlay {
    position: fixed; inset: 0; background: rgba(0,20,50,.7); backdrop-filter: blur(8px);
    z-index: 9999; display: flex; align-items: center; justify-content: center;
}
.cc-modal-box {
    background: var(--cc-bg2); border: 1px solid var(--cc-border);
    border-radius: 22px; padding: 36px; width: 360px; max-width: 90vw;
    text-align: center; animation: cc-fadeup .25s ease;
}
.cc-modal-icon { font-size: 52px; margin-bottom: 16px; }
.cc-modal-title { font-size: 20px; font-weight: 800; margin: 0 0 10px; }
.cc-modal-text { font-size: 14px; color: var(--cc-text2); margin: 0 0 28px; line-height: 1.6; }
.cc-modal-btns { display: flex; gap: 12px; }
.cc-modal-cancel {
    flex: 1; padding: 12px; border-radius: 12px; border: 1px solid var(--cc-border);
    background: transparent; color: var(--cc-text2); font-family: var(--cc-font);
    font-size: 14px; cursor: pointer; transition: all .2s;
}
.cc-modal-cancel:hover { background: var(--cc-bg3); }
.cc-modal-confirm {
    flex: 1; padding: 12px; border-radius: 12px; border: none;
    background: var(--cc-red); color: #fff; font-family: var(--cc-font);
    font-size: 14px; font-weight: 700; cursor: pointer; transition: all .2s;
}
.cc-modal-confirm:hover { opacity: .9; }

/* ── Lightbox ────────────────────────────────────────────────── */
.cc-lightbox {
    position: fixed; inset: 0; background: rgba(0,20,50,.92);
    z-index: 99999; display: flex; align-items: center; justify-content: center;
}
.cc-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 12px; }
.cc-lightbox-close {
    position: absolute; top: 20px; right: 20px; background: rgba(0,68,127,.3);
    border: none; color: #fff; width: 40px; height: 40px; border-radius: 50%;
    font-size: 18px; cursor: pointer; transition: background .2s;
}
.cc-lightbox-close:hover { background: rgba(0,68,127,.5); }

/* ── Toast ───────────────────────────────────────────────────── */
.cc-toast {
    position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(20px);
    background: var(--cc-bg3); border: 1px solid var(--cc-border); border-radius: 12px;
    padding: 12px 22px; font-family: var(--cc-font); font-size: 14px; color: var(--cc-text);
    box-shadow: 0 8px 32px rgba(0,0,0,.4); z-index: 99999; opacity: 0;
    transition: all .3s ease; white-space: nowrap; direction: rtl;
}
.cc-toast--show { opacity: 1; transform: translateX(-50%) translateY(0); }
.cc-toast--success { border-color: rgba(34,209,122,.4); color: var(--cc-green); }
.cc-toast--error { border-color: rgba(255,79,106,.4); color: var(--cc-red); }

/* ── Loading Spinner ─────────────────────────────────────────── */
.cc-loading-spinner { display: flex; justify-content: center; padding: 48px; }
.cc-spinner {
    width: 36px; height: 36px; border: 3px solid var(--cc-bg4);
    border-top-color: var(--cc-accent); border-radius: 50%;
    animation: cc-spin .8s linear infinite;
}

/* ── Keyframes ───────────────────────────────────────────────── */
@keyframes cc-spin { to { transform: rotate(360deg); } }
@keyframes cc-fadeup {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
    .cc-coaches-grid { grid-template-columns: 1fr; padding: 16px; }
    .cc-coaches-header { padding: 24px 16px 16px; }
    .cc-msg-bubble { max-width: 85%; }
    .cc-chat-topbar { padding: 12px 14px; gap: 10px; }
    .cc-coaches-title { font-size: 20px; }
    .cc-locked-card { padding: 36px 24px; }
}

/* ═══════════════════════════════════════════════════════
   کارت مربی - مدرن v3
═══════════════════════════════════════════════════════ */
.cc-coach-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    border: 1.5px solid #f0f0f0;
}
.cc-coach-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0,0,0,.13);
    border-color: var(--cc-primary, #00447f);
}
.cc-coach-card-photo-wrap {
    position: relative;
    height: 160px;
    background: linear-gradient(135deg, #cce0f5 0%, #f0fdf4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.cc-coach-card-photo { position: relative; }
.cc-coach-card-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.cc-coach-card-initials {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: var(--cc-primary, #00447f);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.15);
}
.cc-coach-card-body {
    padding: 16px 16px 8px;
    flex: 1;
}
.cc-coach-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0 0 4px;
    color: #1a2a3a;
}
.cc-coach-card-specialty {
    font-size: .85rem;
    color: #6b7280;
    margin: 0 0 8px;
}
.cc-coach-card-badge {
    display: inline-block;
    font-size: .75rem;
    background: #cce0f5;
    color: #003366;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}
.cc-coach-card-desc {
    font-size: .82rem;
    color: #6b7280;
    margin: 8px 0 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.cc-coach-card-footer {
    padding: 12px 16px;
    border-top: 1px solid #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.cc-coach-card-price {
    font-size: .9rem;
    font-weight: 700;
    color: #059669;
}
.cc-coach-info-btn {
    background: var(--cc-primary, #00447f);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 7px 16px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .1s;
    font-family: inherit;
}
.cc-coach-info-btn:hover { background: #003366; transform: scale(1.04); }

/* ═══════════════════════════════════════════════════════
   مودال اطلاعات مربی
═══════════════════════════════════════════════════════ */
.cc-coach-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,20,50,.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .3s;
    backdrop-filter: blur(4px);
}
.cc-coach-modal-overlay.cc-coach-modal--visible { opacity: 1; }
.cc-coach-modal-box {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 24px;
    position: relative;
    box-shadow: 0 24px 64px rgba(0,0,0,.2);
    transform: scale(.95);
    transition: transform .3s;
}
.cc-coach-modal--visible .cc-coach-modal-box { transform: scale(1); }
.cc-coach-modal-close {
    position: absolute;
    top: 16px;
    left: 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: background .15s;
}
.cc-coach-modal-close:hover { background: #e5e7eb; }
.cc-modal-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.cc-modal-photo-wrap { flex-shrink: 0; }
.cc-modal-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #cce0f5;
}
.cc-modal-initials {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--cc-primary, #00447f);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cc-modal-name { font-size: 1.2rem; font-weight: 700; margin: 0 0 4px; }
.cc-modal-specialty { font-size: .85rem; color: #6b7280; margin: 0 0 8px; }
.cc-modal-badges { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cc-modal-online { font-size: .78rem; color: #059669; font-weight: 600; }
.cc-modal-offline { font-size: .78rem; color: #9ca3af; }
.cc-modal-insta {
    font-size: .78rem;
    color: #e1306c;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}
.cc-modal-insta:hover { text-decoration: underline; }
.cc-modal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    background: #f9fafb;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 16px;
}
.cc-modal-stat { text-align: center; }
.cc-modal-stat-val { display: block; font-size: 1.3rem; font-weight: 700; color: #1a2a3a; }
.cc-modal-stat-lbl { font-size: .72rem; color: #9ca3af; }
.cc-modal-section { margin-bottom: 14px; }
.cc-modal-section-title { font-size: .85rem; font-weight: 700; color: #374151; margin: 0 0 6px; }
.cc-modal-section-text { font-size: .83rem; color: #4b5563; line-height: 1.7; margin: 0; }
.cc-modal-footer { border-top: 1px solid #f3f4f6; padding-top: 16px; margin-top: 8px; text-align: center; }
.cc-modal-pay-btn {
    width: 100%;
    justify-content: center;
    font-size: 1rem;
    padding: 14px;
    border-radius: 14px;
}
.cc-modal-price-note { font-size: .82rem; color: #6b7280; margin: 10px 0 0; }
.cc-modal-price-note strong { color: #059669; }

/* ═══════════════════════════════════════════════════════
   صفحه چت اختصاصی [cc_athlete_chat]
═══════════════════════════════════════════════════════ */
.cc-my-sessions-list { padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.cc-my-session-card {
    background: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    border: 1.5px solid #f0f0f0;
    transition: border-color .2s, box-shadow .2s;
}
.cc-my-session-card:hover {
    border-color: var(--cc-primary, #00447f);
    box-shadow: 0 4px 20px rgba(0,68,127,.1);
}
.cc-session-card-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}
.cc-session-coach-img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}
.cc-session-card-info { flex: 1; min-width: 0; }
.cc-session-card-name { font-size: .95rem; font-weight: 700; color: #1a2a3a; margin-bottom: 2px; }
.cc-session-card-spec { font-size: .78rem; color: #6b7280; margin-bottom: 2px; }
.cc-session-card-date { font-size: .72rem; color: #9ca3af; }

/* تنظیمات: فیلد URL صفحه چت */
.cc-chat-url-note { font-style: italic; color: #6b7280; font-size: .82rem; }

/* ══ کارت‌های مربیان - v4 ══════════════════════════════════ */
.cc-coach-card {
    background:#fff; border-radius:20px; overflow:hidden;
    box-shadow:0 2px 16px rgba(0,0,0,.07); cursor:pointer;
    transition:transform .2s,box-shadow .2s;
    display:flex; flex-direction:column;
    border:1.5px solid #f0f0f0;
}
.cc-coach-card:hover { transform:translateY(-4px); box-shadow:0 8px 32px rgba(0,0,0,.13); border-color:#00447f; }
.cc-coach-card-photo-wrap {
    height:160px; background:linear-gradient(135deg,#cce0f5,#f0fdf4);
    display:flex; align-items:center; justify-content:center;
}
.cc-coach-card-photo { position:relative; }
.cc-coach-card-img { width:90px;height:90px;border-radius:50%;object-fit:cover;border:3px solid #fff;box-shadow:0 2px 12px rgba(0,0,0,.15); }
.cc-coach-card-initials { width:90px;height:90px;border-radius:50%;background:#00447f;color:#fff;font-size:2rem;font-weight:700;display:flex;align-items:center;justify-content:center;border:3px solid #fff; }
.cc-coach-card-body { padding:16px 16px 8px; flex:1; }
.cc-coach-card-name { font-size:1.05rem;font-weight:700;margin:0 0 4px;color:#1a1a2e; }
.cc-coach-card-specialty { font-size:.85rem;color:#6b7280;margin:0 0 8px; }
.cc-coach-card-badge { display:inline-block;font-size:.75rem;background:#cce0f5;color:#003366;padding:2px 10px;border-radius:20px;margin-bottom:8px; }
.cc-coach-card-desc { font-size:.82rem;color:#6b7280;margin:8px 0 0;line-height:1.6;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden; }
.cc-coach-card-footer { padding:12px 16px;border-top:1px solid #f3f4f6;display:flex;align-items:center;justify-content:space-between;gap:8px; }
.cc-coach-card-price { font-size:.9rem;font-weight:700;color:#059669; }
.cc-coach-info-btn { background:#00447f;color:#fff;border:none;border-radius:10px;padding:7px 16px;font-size:.85rem;font-weight:600;cursor:pointer;transition:background .2s;font-family:inherit; }
.cc-coach-info-btn:hover { background:#003366; }

/* ══ مودال مشخصات مربی ═══════════════════════════════════ */
.cc-coach-modal-overlay { position:fixed;inset:0;background:rgba(0,0,0,.55);z-index:99999;display:flex;align-items:center;justify-content:center;padding:16px;opacity:0;transition:opacity .3s;backdrop-filter:blur(4px); }
.cc-coach-modal-overlay.cc-coach-modal--visible { opacity:1; }
.cc-coach-modal-box { background:#fff;border-radius:24px;width:100%;max-width:460px;max-height:90vh;overflow-y:auto;padding:28px 24px 24px;position:relative;box-shadow:0 24px 64px rgba(0,0,0,.2);transform:scale(.94);transition:transform .3s; }
.cc-coach-modal--visible .cc-coach-modal-box { transform:scale(1); }
.cc-coach-modal-close { position:absolute;top:14px;left:14px;background:#f3f4f6;border:none;border-radius:50%;width:32px;height:32px;cursor:pointer;font-size:1rem;display:flex;align-items:center;justify-content:center;color:#374151;transition:background .15s; }
.cc-coach-modal-close:hover { background:#e5e7eb; }
.cc-modal-header { display:flex;gap:16px;align-items:flex-start;margin-bottom:20px; }
.cc-modal-photo-wrap { flex-shrink:0; }
.cc-modal-photo { width:80px;height:80px;border-radius:50%;object-fit:cover;border:3px solid #cce0f5; }
.cc-modal-initials { width:80px;height:80px;border-radius:50%;background:#00447f;color:#fff;font-size:1.8rem;font-weight:700;display:flex;align-items:center;justify-content:center; }
.cc-modal-name { font-size:1.2rem;font-weight:700;margin:0 0 4px; }
.cc-modal-specialty { font-size:.85rem;color:#6b7280;margin:0 0 8px; }
.cc-modal-badges { display:flex;gap:10px;align-items:center;flex-wrap:wrap; }
.cc-modal-online { font-size:.78rem;color:#059669;font-weight:600; }
.cc-modal-offline { font-size:.78rem;color:#9ca3af; }
.cc-modal-insta { font-size:.78rem;color:#e1306c;text-decoration:none;display:flex;align-items:center;gap:4px;font-weight:600; }
.cc-modal-stats { display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:12px;background:#f9fafb;border-radius:16px;padding:16px;margin-bottom:16px; }
.cc-modal-stat { text-align:center; }
.cc-modal-stat-val { display:block;font-size:1.3rem;font-weight:700;color:#1a1a2e; }
.cc-modal-stat-lbl { font-size:.72rem;color:#9ca3af; }
.cc-modal-section { margin-bottom:14px; }
.cc-modal-section-title { font-size:.85rem;font-weight:700;color:#374151;margin:0 0 6px; }
.cc-modal-section-text { font-size:.83rem;color:#4b5563;line-height:1.7;margin:0; }
.cc-modal-footer { border-top:1px solid #f3f4f6;padding-top:16px;margin-top:8px;text-align:center; }
.cc-modal-pay-btn { width:100%;justify-content:center;font-size:1rem;padding:14px;border-radius:14px;display:flex;align-items:center;gap:8px; }
.cc-modal-price-note { font-size:.82rem;color:#6b7280;margin:10px 0 0; }
.cc-modal-price-note strong { color:#059669; }

/* ══ لیست جلسات ورزشکار ══════════════════════════════════ */
.cc-my-sessions-list { padding:12px;display:flex;flex-direction:column;gap:10px; }
.cc-my-session-card { background:#fff;border-radius:16px;padding:14px 16px;display:flex;align-items:center;gap:14px;cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,.06);border:1.5px solid #f0f0f0;transition:border-color .2s,box-shadow .2s; }
.cc-my-session-card:hover { border-color:#00447f;box-shadow:0 4px 20px rgba(0,68,127,.1); }
.cc-session-card-avatar { position:relative;width:48px;height:48px;flex-shrink:0; }
.cc-session-coach-img { width:48px;height:48px;border-radius:50%;object-fit:cover; }
.cc-session-card-info { flex:1;min-width:0; }
.cc-session-card-name { font-size:.95rem;font-weight:700;color:#1a1a2e;margin-bottom:2px; }
.cc-session-card-spec { font-size:.78rem;color:#6b7280;margin-bottom:2px; }
.cc-session-card-date { font-size:.72rem;color:#9ca3af; }

/* ══ نوار تماس با مربی (بالای چت ورزشکار) ══════════════════ */
.cc-coach-contact-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    background: linear-gradient(135deg, #cce0f5 0%, #cce0f5 100%);
    border-bottom: 1px solid #c7d2fe;
    gap: 12px;
    flex-shrink: 0;
}
.cc-contact-bar-info {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .88rem;
    font-weight: 600;
    color: #003366;
    direction: ltr;
}
.cc-contact-bar-info svg { color: #003366; flex-shrink: 0; }
.cc-call-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #00447f;
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 7px 14px;
    font-size: .82rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, transform .15s;
    flex-shrink: 0;
    font-family: inherit;
}
.cc-call-btn:hover { background: #003366; transform: translateY(-1px); color: #fff; }

/* ══ بج وضعیت جلسه در تاپبار ورزشکار ══════════════════════ */
.cc-session-status-badge { margin-right: auto; }
.cc-badge { font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 20px; white-space: nowrap; }
.cc-badge--active { background: #d1fae5; color: #059669; }
.cc-badge--closed { background: #fee2e2; color: #dc2626; }

/* ══ دکمه باز کردن فرم مشخصات در فوتر چت ══════════════════ */
.cc-info-form-trigger-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid #cce0f5;
    background: #eef4fb;
    color: #00447f;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background .2s, transform .15s;
}
.cc-info-form-trigger-btn:hover { background: #cce0f5; transform: scale(1.08); }

/* ══ مودال فرم مشخصات ورزشکار ══════════════════════════════ */
.cc-athlete-form-box {
    max-width: 480px;
    width: 95%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.cc-modal-close-x {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 14px;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.cc-modal-close-x:hover { background: #e5e7eb; }
.cc-athlete-form { text-align: right; }
.cc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}
.cc-form-group { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.cc-form-group label { font-size: .8rem; font-weight: 600; color: #374151; }
.cc-form-group input,
.cc-form-group select {
    padding: 9px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    font-size: .88rem;
    font-family: inherit;
    background: #f9fafb;
    color: #1a2a3a;
    direction: rtl;
    transition: border-color .2s;
    outline: none;
}
.cc-form-group input:focus,
.cc-form-group select:focus { border-color: #00447f; background: #fff; }
.cc-form-group select { cursor: pointer; }
.cc-modal-confirm--send {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.cc-modal-confirm--send svg { flex-shrink: 0; }

/* ══ نمایش پیام جدول مشخصات در چت ══════════════════════════ */
.cc-msg-bubble pre,
.cc-msg-bubble p { white-space: pre-wrap; word-break: break-word; }

@media (max-width: 480px) {
    .cc-form-row { grid-template-columns: 1fr; }
    .cc-coach-contact-bar { padding: 8px 12px; }
    .cc-contact-bar-info { font-size: .8rem; }
}

/* ═══════════════════════════════════════════════════════
   ATHLETE CHAT APP — layout کاملاً مثل پنل مربی
═══════════════════════════════════════════════════════ */
#cc-athlete-chat-app {
    display: flex;
    border: 1px solid var(--cc-border);
    font-family: var(--cc-font);
    direction: rtl;
    color: var(--cc-text);
    background: var(--cc-bg);
    border-radius: var(--cc-radius);
    overflow: hidden;
}

/* ── Sidebar ── */
.cc-athlete-sidebar {
    width: 300px;
    background: var(--cc-bg2);
    border-left: 1px solid var(--cc-border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    overflow: hidden;
}

/* آواتار عکس مربی در لیست */
.cc-session-coach-thumb {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    object-fit: cover;
}

/* ── Chat Area ── */
.cc-athlete-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--cc-bg);
}

#cc-athlete-chat-wrap {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ── Responsive mobile ── */
@media (max-width: 768px) {
    .cc-form-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════
   v7 — موبایل تلگرام‌مانند: هر دو پنل تمام‌صفحه
   ═══════════════════════════════════════════════════════════════ */

/* دکمه بازگشت — فقط موبایل نمایش داده می‌شه */
.cc-back-mobile {
    display: none;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: var(--cc-accent);
    font-family: var(--cc-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 2px;
    flex-shrink: 0;
}
.cc-back-mobile svg { flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════════
   کادر هر دو پنل: ارتفاع ثابت، بدون media query
   ══════════════════════════════════════════════════════════════ */

/* --- ابعاد کادر: همیشه ثابت --- */
#cc-coach-app,
#cc-athlete-chat-app {
    position: relative;
    height: 75svh;
    min-height: 480px;
    max-height: 680px;
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    overflow: hidden;
    flex-direction: row;
}

/* --- sidebar: همیشه absolute و slide‌پذیر --- */
#cc-coach-app .cc-coach-sidebar,
#cc-athlete-chat-app .cc-athlete-sidebar {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
    z-index: 2;
    transform: translateX(0);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
}

/* --- ناحیه چت: همیشه پشت sidebar --- */
#cc-coach-app .cc-coach-chat-area,
#cc-athlete-chat-app .cc-athlete-chat-area {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    transform: translateX(-100%);
    transition: transform .32s cubic-bezier(.4,0,.2,1);
    display: flex;
    flex-direction: column;
}

/* --- slide: وقتی کاربر روی آیتم میزنه --- */
#cc-coach-app.cc-panel-chat-open .cc-coach-sidebar,
#cc-athlete-chat-app.cc-panel-chat-open .cc-athlete-sidebar {
    transform: translateX(100%);
}
#cc-coach-app.cc-panel-chat-open .cc-coach-chat-area,
#cc-athlete-chat-app.cc-panel-chat-open .cc-athlete-chat-area {
    transform: translateX(0);
}

/* --- دسکتاپ (≥900px): دوستونه، بدون slide --- */
@media (min-width: 900px) {
    #cc-coach-app,
    #cc-athlete-chat-app {
        height: 85vh;
        min-height: 600px;
        max-height: 900px;
    }

    #cc-coach-app .cc-coach-sidebar,
    #cc-athlete-chat-app .cc-athlete-sidebar {
        position: relative;
        width: 300px;
        height: 100%;
        transform: none;
        border-left: 1px solid var(--cc-border);
        flex-shrink: 0;
    }

    #cc-coach-app .cc-coach-chat-area,
    #cc-athlete-chat-app .cc-athlete-chat-area {
        position: relative;
        flex: 1;
        height: 100%;
        transform: none;
    }

    /* در دسکتاپ cc-panel-chat-open هیچ تاثیری نداره */
    #cc-coach-app.cc-panel-chat-open .cc-coach-sidebar,
    #cc-athlete-chat-app.cc-panel-chat-open .cc-athlete-sidebar {
        transform: none;
    }
    #cc-coach-app.cc-panel-chat-open .cc-coach-chat-area,
    #cc-athlete-chat-app.cc-panel-chat-open .cc-athlete-chat-area {
        transform: none;
    }

    .cc-back-mobile { display: none !important; }
}

/* --- موبایل: دکمه بازگشت نمایان --- */
@media (max-width: 899px) {
    .cc-back-mobile { display: flex; }
    .cc-chat-footer { padding-bottom: max(14px, env(safe-area-inset-bottom)); }
}

/* ═══════════════════════════════════════════════════════════════
   تغییرات v8 — بکگراند سفید پنل‌های چت + رنگ آبی #00447f
   ═══════════════════════════════════════════════════════════════ */

/* متغیرهای رنگی پنل‌های چت - بکگراند سفید */
#cc-athlete-chat-app,
#cc-coach-app {
    --cc-bg:     #ffffff;
    --cc-bg2:    #f4f7fb;
    --cc-bg3:    #eef2f8;
    --cc-bg4:    #e2eaf4;
    --cc-border: #d0dce8;
    --cc-text:   #1a2a3a;
    --cc-text2:  #4a6278;
    --cc-text3:  #8aa0b4;
    --cc-accent: #00447f;
    --cc-accent2:#003366;
    background: #ffffff;
    color: #1a2a3a;
    border: 1px solid #d0dce8;
}

/* سایدبار */
#cc-athlete-chat-app .cc-athlete-sidebar,
#cc-coach-app .cc-coach-sidebar {
    background: #f4f7fb;
    border-left: 1px solid #d0dce8;
}

/* هدر سایدبار */
#cc-athlete-chat-app .cc-coach-sidebar-header,
#cc-coach-app .cc-coach-sidebar-header {
    border-bottom: 1px solid #d0dce8;
    background: #f4f7fb;
}

/* آیتم‌های لیست */
#cc-athlete-chat-app .cc-session-item,
#cc-coach-app .cc-session-item {
    border-bottom: 1px solid #e2eaf4;
    color: #1a2a3a;
}
#cc-athlete-chat-app .cc-session-item:hover,
#cc-coach-app .cc-session-item:hover {
    background: #eef2f8;
}
#cc-athlete-chat-app .cc-session-item--active,
#cc-coach-app .cc-session-item--active {
    background: rgba(0,68,127,.08);
    border-right: 3px solid #00447f;
}

/* ناحیه پیام‌ها */
#cc-athlete-chat-app .cc-messages-body,
#cc-coach-app .cc-messages-body {
    background: #ffffff;
}

/* حباب پیام خودم */
#cc-athlete-chat-app .cc-msg--mine .cc-msg-bubble,
#cc-coach-app .cc-msg--mine .cc-msg-bubble {
    background: linear-gradient(135deg, #00447f, #003366);
    color: #fff;
}

/* حباب پیام طرف مقابل */
#cc-athlete-chat-app .cc-msg--other .cc-msg-bubble,
#cc-coach-app .cc-msg--other .cc-msg-bubble {
    background: #eef2f8;
    border: 1px solid #d0dce8;
    color: #1a2a3a;
}

/* تاپبار چت */
#cc-athlete-chat-app .cc-chat-topbar,
#cc-coach-app .cc-chat-topbar {
    background: #f4f7fb;
    border-bottom: 1px solid #d0dce8;
}

/* فوتر چت */
#cc-athlete-chat-app .cc-chat-footer,
#cc-coach-app .cc-chat-footer {
    background: #f4f7fb;
    border-top: 1px solid #d0dce8;
}

/* ورودی پیام */
#cc-athlete-chat-app .cc-msg-input,
#cc-coach-app .cc-msg-input {
    background: #ffffff;
    border: 1.5px solid #d0dce8;
    color: #1a2a3a;
}
#cc-athlete-chat-app .cc-msg-input:focus,
#cc-coach-app .cc-msg-input:focus {
    border-color: #00447f;
}

/* دکمه ارسال */
#cc-athlete-chat-app .cc-send-btn,
#cc-coach-app .cc-send-btn {
    background: linear-gradient(135deg, #00447f, #003366);
}

/* دکمه تصویر */
#cc-athlete-chat-app .cc-img-btn,
#cc-coach-app .cc-img-btn {
    background: #eef2f8;
    border: 1px solid #d0dce8;
    color: #00447f;
}

/* تب‌های فعال */
#cc-athlete-chat-app .cc-tab-btn--active,
#cc-coach-app .cc-tab-btn--active {
    background: #00447f !important;
    color: #fff !important;
}

/* اینپوت جستجو */
#cc-athlete-chat-app .cc-search-input,
#cc-coach-app .cc-search-input {
    background: #ffffff;
    border: 1.5px solid #d0dce8;
    color: #1a2a3a;
}

/* بج خوانده‌نشده */
#cc-athlete-chat-app .cc-unread-badge,
#cc-coach-app .cc-unread-badge {
    background: #00447f;
}

/* نقش (مربی/ورزشکار) */
#cc-athlete-chat-app .cc-coach-sidebar-role,
#cc-coach-app .cc-coach-sidebar-role {
    color: #00447f;
}

/* آواتار */
#cc-athlete-chat-app .cc-avatar-initials,
#cc-coach-app .cc-avatar-initials {
    background: linear-gradient(135deg, #00447f, #003366);
}

/* اسپینر */
#cc-athlete-chat-app .cc-spinner,
#cc-coach-app .cc-spinner {
    border: 3px solid #e2eaf4;
    border-top-color: #00447f;
}

/* empty state */
#cc-athlete-chat-app .cc-empty-state,
#cc-coach-app .cc-empty-state {
    background: #ffffff;
}

/* نوار تماس */
.cc-coach-contact-bar {
    background: linear-gradient(135deg, #cce0f5 0%, #deeeff 100%);
    border-bottom: 1px solid #a8c8e8;
}
.cc-contact-bar-info,
.cc-contact-bar-info svg { color: #00447f; }
.cc-call-btn { background: #00447f; }
.cc-call-btn:hover { background: #003366; }


/* ═══════════════════════════════════════════════════════════════
   پاپ‌آپ شاگردان برتر مربی
   ═══════════════════════════════════════════════════════════════ */

/* ── آواتارهای شاگرد در مودال مربی ── */
.cc-modal-athletes-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}
.cc-modal-athlete-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: transform .2s;
    width: 64px;
}
.cc-modal-athlete-thumb:hover { transform: translateY(-3px); }
.cc-modal-athlete-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #cce0f5;
    box-shadow: 0 2px 8px rgba(0,68,127,.15);
    transition: border-color .2s, box-shadow .2s;
}
.cc-modal-athlete-thumb:hover .cc-modal-athlete-img {
    border-color: #00447f;
    box-shadow: 0 4px 16px rgba(0,68,127,.3);
}
.cc-modal-athlete-initials {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00447f, #003366);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #cce0f5;
}
.cc-modal-athlete-name {
    font-size: 11px;
    color: #374151;
    text-align: center;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 64px;
}

/* ── پاپ‌آپ جزئیات شاگرد ── */
.cc-athlete-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,20,50,.6);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .3s;
    backdrop-filter: blur(6px);
}
.cc-athlete-popup-overlay.cc-athlete-popup--visible { opacity: 1; }
.cc-athlete-popup-box {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-width: 440px;
    max-height: 88vh;
    overflow-y: auto;
    padding: 28px 24px 24px;
    position: relative;
    box-shadow: 0 32px 80px rgba(0,0,0,.28);
    transform: scale(.92) translateY(20px);
    transition: transform .3s;
    direction: rtl;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
}
.cc-athlete-popup--visible .cc-athlete-popup-box {
    transform: scale(1) translateY(0);
}
.cc-athlete-popup-close {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
    transition: background .15s;
    z-index: 2;
}
.cc-athlete-popup-close:hover { background: #e5e7eb; }
.cc-apop-header {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
}
.cc-apop-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #cce0f5;
    box-shadow: 0 4px 16px rgba(0,68,127,.15);
    flex-shrink: 0;
}
.cc-apop-avatar-initials {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00447f, #003366);
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.cc-apop-info { flex: 1; }
.cc-apop-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a2a3a;
    margin: 0 0 6px;
}
.cc-apop-sport {
    display: inline-block;
    font-size: .8rem;
    color: #00447f;
    font-weight: 600;
    background: #e8f0fa;
    padding: 3px 10px;
    border-radius: 20px;
}
.cc-apop-section {
    margin-bottom: 16px;
    border-top: 1px solid #f0f4f8;
    padding-top: 14px;
}
.cc-apop-section-title {
    font-size: .88rem;
    font-weight: 700;
    color: #00447f;
    margin: 0 0 8px;
}
.cc-apop-section-text {
    font-size: .84rem;
    color: #374151;
    line-height: 1.8;
    margin: 0;
}
.cc-apop-photos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 8px;
    margin-top: 4px;
}
.cc-apop-photo {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s;
    border: 1.5px solid #e0eaf4;
}
.cc-apop-photo:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(0,68,127,.2);
    border-color: #00447f;
}
