/* ===== همسان — استایل‌های اختصاصی سایت همسان‌گزینی ===== */

:root {
    --hs-primary: #7c3aed;
    --hs-primary-2: #a855f7;
    --hs-gold: #d4af37;
    --hs-rose: #f472b6;
    --hs-teal: #14b8a6;
    --hs-ink: #1e1b2e;
}

/* ---------- صفحات عمومی ---------- */
.site-frame { min-height: 100vh; display: flex; flex-direction: column; }
.site-main { flex: 1; }

.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
    border-bottom: 1px solid #eee7fb;
}
.site-header .inner {
    max-width: 1200px; margin: 0 auto; padding: .7rem 1rem;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
}
.site-logo { font-weight: 800; font-size: 1.35rem; color: var(--hs-primary); text-decoration: none; display:flex; align-items:center; gap:.45rem; justify-self: start; }
.site-logo .dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--hs-primary), var(--hs-rose)); }
.site-nav { display: flex; gap: .2rem; flex-wrap: wrap; justify-self: center; }
.site-nav a { padding: .45rem .8rem; border-radius: 10px; color: #4b4560; text-decoration: none; font-weight: 500; font-size: .92rem; }
.site-nav a:hover, .site-nav a.active { background: #f4efff; color: var(--hs-primary); }
.site-cta { display: flex; gap: .5rem; justify-self: end; }

.hs-btn { display:inline-flex; align-items:center; justify-content:center; gap:.4rem; border-radius: 12px; padding: .55rem 1.2rem; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; font-size: .95rem; transition: .15s; }
.hs-btn-primary { background: linear-gradient(135deg, var(--hs-primary), var(--hs-primary-2)); color: #fff; }
.hs-btn-primary:hover { filter: brightness(1.08); color:#fff; }
.hs-btn-outline { border-color: var(--hs-primary); color: var(--hs-primary); background: #fff; }
.hs-btn-outline:hover { background: #f4efff; }
.hs-btn-ghost { color: #5b5470; background: transparent; }
.hs-btn-ghost:hover { background: #f3f0fa; }
.hs-btn-gold { background: linear-gradient(135deg,#d4af37,#b8912a); color:#fff; }
.hs-btn-sm { padding: .3rem .8rem; font-size: .85rem; border-radius: 9px; }
.hs-btn-block { width: 100%; }
.hs-btn:disabled { opacity:.55; cursor: not-allowed; }

/* ---------- هیرو لندینگ ---------- */
.hs-hero {
    position: relative; overflow: hidden;
    background: radial-gradient(1200px 500px at 80% -10%, #ede4ff 0%, transparent 60%),
                radial-gradient(900px 420px at 10% 110%, #ffe4f1 0%, transparent 55%),
                linear-gradient(180deg, #fbf9ff, #fff);
    padding: 4.5rem 1rem 3.5rem;
}
.hs-hero .inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 1.2fr .8fr; gap: 2.5rem; align-items: center; }
@media (max-width: 900px) { .hs-hero .inner { grid-template-columns: 1fr; } }
.hs-hero h1 { font-size: 2.4rem; font-weight: 800; color: var(--hs-ink); line-height: 1.45; margin-bottom: 1rem; }
.hs-hero h1 .grad { background: linear-gradient(135deg, var(--hs-primary), var(--hs-rose)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hs-hero p.lead { color: #57506e; font-size: 1.08rem; line-height: 2; margin-bottom: 1.6rem; }
.hs-hero .actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.hs-hero-art { position: relative; min-height: 280px; }
.hs-ring { position:absolute; border-radius: 50%; border: 2px dashed rgba(124,58,237,.25); }
.hs-ring.r1 { inset: 8% 6%; animation: hs-spin 40s linear infinite; }
.hs-ring.r2 { inset: 20% 18%; border-color: rgba(244,114,182,.3); animation: hs-spin 30s linear infinite reverse; }
@keyframes hs-spin { to { transform: rotate(360deg); } }
.hs-heart { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size: 5rem; filter: drop-shadow(0 12px 24px rgba(124,58,237,.3)); }

.hs-badges { display:flex; gap: 1.2rem; margin-top: 2rem; flex-wrap: wrap; }
.hs-badge { display:flex; align-items:center; gap:.5rem; color:#57506e; font-size:.88rem; }
.hs-badge i { color: var(--hs-primary); font-size: 1.1rem; }

/* ---------- سکشن‌ها ---------- */
.hs-section { padding: 4rem 1rem; }
.hs-section .inner { max-width: 1150px; margin: 0 auto; }
.hs-section.alt { background: #faf8ff; }
.hs-section h2 { text-align: center; font-weight: 800; color: var(--hs-ink); font-size: 1.7rem; margin-bottom: .5rem; }
.hs-section .sub { text-align:center; color: #6b6480; margin-bottom: 2.4rem; }

.hs-grid { display: grid; gap: 1.2rem; }
.hs-grid.c3 { grid-template-columns: repeat(3, 1fr); }
.hs-grid.c4 { grid-template-columns: repeat(4, 1fr); }
.hs-grid.c2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .hs-grid.c3, .hs-grid.c4 { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 600px) { .hs-grid.c3, .hs-grid.c4, .hs-grid.c2 { grid-template-columns: 1fr; } }

.hs-card { background: #fff; border: 1px solid #efeaf9; border-radius: 18px; padding: 1.5rem; box-shadow: 0 6px 24px -12px rgba(124,58,237,.15); transition: .2s; }
.hs-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px -16px rgba(124,58,237,.28); border-color: #ddd0f7; }
.hs-card .ic { width: 52px; height: 52px; border-radius: 14px; display:flex; align-items:center; justify-content:center; font-size: 1.5rem; margin-bottom: 1rem; background: linear-gradient(135deg,#f2ecff,#fdeaf4); }
.hs-card h3 { font-size: 1.08rem; font-weight: 700; color: var(--hs-ink); margin-bottom: .5rem; }
.hs-card p { color: #6b6480; font-size: .92rem; line-height: 1.9; margin: 0; }

/* ---------- تعرفه ---------- */
.hs-plan { position: relative; }
.hs-plan.featured { border: 2px solid var(--hs-primary); }
.hs-plan .price { font-size: 1.6rem; font-weight: 800; color: var(--hs-primary); margin: .6rem 0; }
.hs-plan .price small { font-size: .8rem; color: #8a84a0; font-weight: 400; }
.hs-plan ul { list-style: none; padding: 0; margin: 1rem 0 1.4rem; }
.hs-plan ul li { padding: .4rem 0; color: #57506e; font-size: .9rem; display: flex; gap: .5rem; align-items: baseline; }
.hs-plan ul li i { color: var(--hs-teal); }
.hs-plan ul li.off { color: #b3adbf; text-decoration: line-through; }
.hs-plan .badge-top { position: absolute; top: -12px; right: 20px; background: var(--hs-gold); color: #fff; padding: .15rem .8rem; border-radius: 20px; font-size: .75rem; font-weight: 700; }

/* ---------- آمار ---------- */
.hs-stats { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; }
.hs-stat { text-align: center; }
.hs-stat .num { font-size: 2.2rem; font-weight: 800; color: var(--hs-primary); }
.hs-stat .lbl { color: #6b6480; font-size: .9rem; }

/* ---------- فوتر ---------- */
.site-footer { background: #1e1b2e; color: #b8b2c9; margin-top: 4rem; }
.site-footer .inner { max-width: 1150px; margin: 0 auto; padding: 3rem 1rem 1.5rem; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2rem; }
@media (max-width: 800px) { .site-footer .cols { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; }
.site-footer a { color: #b8b2c9; text-decoration: none; display: block; padding: .25rem 0; font-size: .88rem; }
.site-footer a:hover { color: #fff; }
.site-footer .copy { border-top: 1px solid #35314a; margin-top: 2rem; padding-top: 1.2rem; text-align: center; font-size: .82rem; color: #8d879e; }
.site-install-btn { display: inline-flex; align-items: center; gap: .5rem; margin-top: 1rem; padding: .55rem 1.1rem; border: 1px solid #7c3aed; border-radius: 10px; background: rgba(124,58,237,.15); color: #d8ccff; font-family: inherit; font-size: .85rem; cursor: pointer; transition: .15s; }
.site-install-btn:hover { background: #7c3aed; color: #fff; }
.site-install-hint { font-size: .78rem; color: #a89cc8; margin-top: .6rem; }

/* ---------- کارت کاندید ---------- */
.cand-card { display: flex; gap: 1rem; background: #fff; border: 1px solid #eee8f8; border-radius: 16px; padding: 1rem; transition: .15s; }
.cand-card:hover { box-shadow: 0 10px 30px -14px rgba(124,58,237,.3); border-color: #ddd0f7; }
.cand-avatar { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; background: #f2ecff; flex-shrink: 0; }
.cand-avatar.ph { display:flex; align-items:center; justify-content:center; color:#a79bc8; font-size:2rem; }
.cand-info { flex: 1; min-width: 0; }
.cand-name { font-weight: 700; color: var(--hs-ink); display: flex; align-items: center; flex-wrap: wrap; gap: .2rem .4rem; }
.cand-meta { color: #6b6480; font-size: .85rem; margin-top: .2rem; display: flex; flex-wrap: wrap; gap: .35rem .9rem; }
.cand-about { color: #7a7490; font-size: .84rem; margin-top: .4rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cand-score { text-align: center; flex-shrink: 0; width: 76px; }
.cand-score .pct { font-size: 1.4rem; font-weight: 800; color: var(--hs-primary); }
.cand-score .lbl { font-size: .7rem; color: #8a84a0; }
.cand-actions { display: flex; gap: .4rem; margin-top: .5rem; flex-wrap: wrap; }

.badge-verified { display: inline-flex; align-items: center; gap: .2rem; color: var(--hs-teal); font-size: .75rem; }
.badge-mgr { font-size: .72rem; background: #f2ecff; color: var(--hs-primary); border-radius: 20px; padding: .1rem .55rem; }

/* ---------- ویزارد پروفایل ---------- */
.wiz-steps { display: flex; gap: .4rem; margin-bottom: 1.6rem; overflow-x: auto; padding-bottom: .3rem; }
.wiz-step { flex: 1; min-width: 90px; text-align: center; padding: .6rem .4rem; border-radius: 12px; background: #f6f3fc; color: #6b6480; font-size: .8rem; font-weight: 600; cursor: pointer; border: 1.5px solid transparent; white-space: nowrap; }
.wiz-step.active { background: #f2ecff; border-color: var(--hs-primary); color: var(--hs-primary); }
.wiz-step.done { background: #eafaf3; color: var(--hs-teal); }
.wiz-progress { height: 6px; background: #f0ecf9; border-radius: 10px; overflow: hidden; margin-bottom: 1.2rem; }
.wiz-progress > div { height: 100%; background: linear-gradient(90deg, var(--hs-primary), var(--hs-rose)); border-radius: 10px; transition: width .3s; }

/* ---------- چت ---------- */
.chat-shell { display: grid; grid-template-columns: 300px 1fr; gap: 0; background: #fff; border: 1px solid #eee8f8; border-radius: 18px; overflow: hidden; min-height: 65vh; }
@media (max-width: 800px) { .chat-shell { grid-template-columns: 1fr; } .chat-list { display:none; } .chat-shell.no-thread .chat-list { display:block; } .chat-shell.no-thread .chat-main { display:none; } }
.chat-list { border-inline-end: 1px solid #eee8f8; overflow-y: auto; max-height: 75vh; }
.chat-item { display: flex; gap: .7rem; padding: .85rem 1rem; cursor: pointer; border-bottom: 1px solid #f6f3fc; }
.chat-item:hover, .chat-item.active { background: #faf8ff; }
.chat-item .nm { font-weight: 600; font-size: .9rem; color: var(--hs-ink); }
.chat-item .pr { font-size: .78rem; color: #8a84a0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.chat-item .un { margin-inline-start: auto; background: var(--hs-primary); color: #fff; font-size: .7rem; border-radius: 20px; min-width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; }
.chat-main { display: flex; flex-direction: column; }
.chat-head { padding: .8rem 1.2rem; border-bottom: 1px solid #eee8f8; font-weight: 700; display: flex; align-items: center; gap: .6rem; }
.chat-body { flex: 1; overflow-y: auto; padding: 1.2rem; background: #faf9fe; display: flex; flex-direction: column; gap: .6rem; }
.msg-bubble { max-width: 70%; padding: .6rem 1rem; border-radius: 16px; font-size: .9rem; line-height: 1.8; }
.msg-bubble.me { align-self: flex-end; background: linear-gradient(135deg, var(--hs-primary), var(--hs-primary-2)); color: #fff; border-bottom-left-radius: 4px; }
.msg-bubble.them { align-self: flex-start; background: #fff; border: 1px solid #eee8f8; color: var(--hs-ink); border-bottom-right-radius: 4px; }
.msg-bubble .tm { display: block; font-size: .65rem; opacity: .65; margin-top: .2rem; }
.chat-input { display: flex; gap: .6rem; padding: .8rem 1.2rem; border-top: 1px solid #eee8f8; }
.chat-input input { flex: 1; border: 1px solid #e6dff5; border-radius: 12px; padding: .6rem 1rem; font-family: inherit; }
.chat-input input:focus { outline: none; border-color: var(--hs-primary); }

/* ---------- اعلان ---------- */
.notif-item { display: flex; gap: .8rem; padding: .8rem 1rem; border-bottom: 1px solid #f4f0fb; }
.notif-item.unread { background: #faf7ff; }
.notif-item .ic { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.notif-item .ti { font-weight: 600; font-size: .86rem; color: var(--hs-ink); }
.notif-item .bo { font-size: .78rem; color: #7a7490; }
.notif-item .dt { font-size: .68rem; color: #a09bb3; margin-top: .2rem; }

/* ---------- متفرقه ---------- */
/* ---------- بنر تکمیل پروفایل (داشبورد) ---------- */
.hs-complete-banner { display:flex; align-items:center; gap:1rem; flex-wrap:wrap;
    background: linear-gradient(135deg, var(--hs-primary), var(--hs-primary-2));
    color:#fff; border-radius:16px; padding:1.05rem 1.3rem;
    box-shadow: 0 12px 30px -12px rgba(124,58,237,.55); }
.hs-complete-banner .ic { width:44px; height:44px; border-radius:12px; flex-shrink:0;
    background:rgba(255,255,255,.18); display:flex; align-items:center; justify-content:center; font-size:1.35rem; }
.hs-complete-banner .bar { height:8px; background:rgba(255,255,255,.3); border-radius:10px; overflow:hidden; }
.hs-complete-banner .bar > div { height:100%; background:#fff; border-radius:10px; transition:width .3s; }
.hs-btn-light { background:#fff; color:var(--hs-primary); }
.hs-btn-light:hover { background:#f1ebff; color:var(--hs-primary); }

.hs-empty { text-align: center; padding: 3rem 1rem; color: #8a84a0; }
.hs-empty .ic { font-size: 3rem; margin-bottom: 1rem; opacity: .4; }
.hs-kpi { background:#fff; border:1px solid #eee8f8; border-radius:16px; padding:1.2rem 1.4rem; display:flex; align-items:center; gap:1rem; }
.hs-kpi .ic { width:48px; height:48px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:1.3rem; }
.hs-kpi .num { font-size:1.4rem; font-weight:800; color:var(--hs-ink); }
.hs-kpi .lbl { font-size:.8rem; color:#8a84a0; }
.hs-table { width:100%; border-collapse: collapse; font-size: .88rem; }
.hs-table th { text-align: right; padding: .7rem .8rem; color: #6b6480; font-weight: 600; border-bottom: 2px solid #f0ecf9; }
.hs-table td { padding: .7rem .8rem; border-bottom: 1px solid #f6f3fc; color: #3c3652; }
.hs-table tr:hover td { background: #faf8ff; }
.pill { display:inline-block; padding:.15rem .7rem; border-radius:20px; font-size:.75rem; font-weight:600; }
.pill.ok { background:#eafaf3; color:#0d9668; }
.pill.warn { background:#fef6e0; color:#b08a00; }
.pill.bad { background:#fdecec; color:#d63a3a; }
.pill.info { background:#eaf3ff; color:#2470d8; }
.pill.dim { background:#f0ecf9; color:#6b6480; }
.money { direction: ltr; unicode-bidi: embed; font-variant-numeric: tabular-nums; }

.ai-note { background: #fffbe8; border: 1px solid #f3e4a8; border-radius: 12px; padding: .7rem 1rem; font-size: .82rem; color: #7a6510; margin-top: 1rem; }

@media (max-width: 700px) {
    .site-header .inner { display: flex; flex-wrap: wrap; }
    .site-nav { order: 3; flex-basis: 100%; justify-content: center; }
    .hs-hero h1 { font-size: 1.7rem; }
}

/* ---------- نوار خروجی استاندارد گریدها (اکسل/چاپ/ستون‌ها) ---------- */
.hs-export { display:inline-flex; align-items:center; gap:.4rem; position:relative; }
.hs-export svg { width: 15px; height: 15px; }
.hs-export-note { font-size: .8rem; }
.hs-colpick { position: relative; }
.hs-colpick > summary { list-style: none; cursor: pointer; user-select: none; }
.hs-colpick > summary::-webkit-details-marker { display: none; }
.hs-colpick[open] > summary { background: #f4efff; }
.hs-colpick-body { position: absolute; z-index: 60; top: calc(100% + 6px); inset-inline-start: 0;
    background: #fff; border: 1px solid #e9e4f6; border-radius: 12px; box-shadow: 0 10px 30px #4c1d9522;
    padding: .6rem; min-width: 190px; max-height: 280px; overflow: auto; }
.hs-colpick-item { display: flex; align-items: center; gap: .45rem; padding: .28rem .3rem;
    font-size: .83rem; color: #3c3652; cursor: pointer; border-radius: 7px; white-space: nowrap; }
.hs-colpick-item:hover { background: #f6f3fc; }
.hs-colpick-item input { accent-color: var(--hs-primary); }

/* موبایل: دراپ‌داون انتخاب ستون نباید از لبهٔ ویوپورت بیرون بزند */
@media (max-width: 575.98px) {
    .hs-colpick-body { min-width: 160px; max-width: calc(100vw - 32px); }
    .hs-colpick-body .hs-colpick-item { white-space: normal; }
}

/* چاپ داخلی صفحات پنل: فقط کارت اصلی، بدون منو/هدر */
@media print {
    .app-sidebar, .app-header, .hs-export, .hs-colpick-body, .side-app, .main-header, footer { display: none !important; }
    .app-content, .main-content { margin: 0 !important; padding: 0 !important; }
    .hs-card { box-shadow: none !important; border: 1px solid #ddd; }
    .hs-table th { background: #eee !important; color: #000 !important; -webkit-print-color-adjust: exact; }
    thead { display: table-header-group; }
    tr { page-break-inside: avoid; }
}

/* کنترل‌های تلریک با محتوای لاتین */
.dir-ltr input, input.dir-ltr { direction: ltr; text-align: left; }
