/* صفحه عمومی آمار زنده — هدر/فوتر هم‌سبک صفحه اصلی سایت */

body:has(.plive-page) {
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(34, 211, 238, 0.14), transparent 20%),
        radial-gradient(circle at 88% 14%, rgba(168, 85, 247, 0.18), transparent 22%),
        radial-gradient(circle at 50% 80%, rgba(59, 130, 246, 0.12), transparent 24%),
        linear-gradient(180deg, #050816 0%, #071122 42%, #08152b 100%);
    color: #e5eefc;
}

.plive-page.landing-tech {
    position: relative;
    overflow: visible;
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 24px 0 56px;
    direction: rtl;
    text-align: right;
    min-height: 100vh;
}

.plive-page .landing-constrained {
    max-width: 1240px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

.plive-page .tech-grid,
.plive-page .tech-orb {
    position: absolute;
    pointer-events: none;
}

.plive-page .tech-grid {
    inset: 0;
    background-image:
        linear-gradient(rgba(88, 104, 141, 0.11) 1px, transparent 1px),
        linear-gradient(90deg, rgba(88, 104, 141, 0.11) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 94%);
    opacity: 0.26;
}

.plive-page .tech-orb {
    border-radius: 999px;
    filter: blur(100px);
    opacity: 0.55;
}

.plive-page .tech-orb-a {
    top: 70px;
    right: -70px;
    width: 280px;
    height: 280px;
    background: rgba(34, 211, 238, 0.24);
}

.plive-page .tech-orb-b {
    left: -80px;
    top: 320px;
    width: 320px;
    height: 320px;
    background: rgba(99, 102, 241, 0.22);
}

.plive-page .tech-orb-c {
    left: 40%;
    bottom: 60px;
    width: 260px;
    height: 260px;
    background: rgba(217, 70, 239, 0.18);
}

.plive-page .topbar-shell,
.plive-page .footer-shell,
.plive-page .plive-main {
    position: relative;
    z-index: 1;
}

.plive-page .topbar-shell {
    z-index: 10;
    margin-bottom: 24px;
}

.plive-page .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 18px;
    border-radius: 26px;
    background: rgba(8, 17, 38, 0.64);
    border: 1px solid rgba(98, 123, 196, 0.26);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 70px rgba(0, 0, 0, 0.32);
}

.plive-page .brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #f8fbff;
    text-decoration: none;
}

.plive-page .brand-mark {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 249, 255, 0.92));
    border: 1px solid rgba(130, 164, 255, 0.36);
    overflow: hidden;
    padding: 5px;
}

.plive-page .brand-mark-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.plive-page .brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.plive-page .brand-copy strong {
    color: #f8fbff;
    font-size: 15px;
}

.plive-page .brand-copy small {
    color: #8ea4d5;
    font-size: 11px;
}

.plive-page .topbar-nav,
.plive-page .topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.plive-page .topbar-nav a,
.plive-page .footer-links a {
    text-decoration: none;
    color: #aebfe5;
    transition: color 0.18s ease, background 0.18s ease;
}

.plive-page .topbar-nav a {
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 13px;
}

.plive-page .topbar-nav a:hover,
.plive-page .topbar-nav a.is-active {
    color: #ffffff;
    background: rgba(96, 165, 250, 0.14);
}

.plive-page .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 800;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 13px;
    padding: 10px 18px;
}

.plive-page .btn:hover {
    transform: translateY(-2px);
}

.plive-page .btn-glow {
    background: linear-gradient(135deg, #22d3ee, #3b82f6 55%, #a855f7);
    color: #04101f;
    box-shadow: 0 10px 30px rgba(56, 189, 248, 0.28);
}

.plive-page .btn-outline {
    background: rgba(15, 23, 42, 0.45);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.35);
}

.plive-page .glass-card {
    background: rgba(8, 17, 38, 0.55);
    border: 1px solid rgba(98, 123, 196, 0.22);
    border-radius: 22px;
    backdrop-filter: blur(14px);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);
}

.plive-page .footer-shell {
    margin-top: 28px;
}

.plive-page .footer-panel {
    display: grid;
    grid-template-columns: 1.5fr 1fr 0.7fr;
    gap: 18px;
    align-items: center;
    padding: 20px 22px;
}

.plive-page .footer-brand {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plive-page .footer-brand strong {
    color: #ffffff;
    font-size: 17px;
}

.plive-page .footer-brand span,
.plive-page .footer-brand small {
    color: #8ea4d5;
    font-size: 13px;
}

.plive-page .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.plive-page .footer-links a:hover {
    color: #ffffff;
}

.plive-page .footer-enamad img {
    max-width: 110px;
    border-radius: 14px;
    background: #fff;
}

/* محتوای آمار */
.plive-body {
    padding: 4px 0 12px;
}

.plive-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.plive-head h2 {
    margin: 0 0 6px;
    font-size: 1.45rem;
    color: #f8fbff;
}

.plive-head p {
    margin: 0;
    color: #8ea4d5;
    font-size: 13px;
}

.plive-page .ap-live-kpi,
.plive-page .ap-live-map-card,
.plive-page .ap-live-city-list-card,
.plive-page .plive-foreign__chart-card,
.plive-page .plive-country-card {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(226, 232, 240, 0.9);
}

.plive-page .ap-live-kpi__label,
.plive-page .ap-live-map-card__head p,
.plive-page .ap-live-city-hint,
.plive-page .plive-foreign__head p {
    color: #64748b;
}

.plive-page .ap-live-kpi__value,
.plive-page .ap-live-map-card__head h3,
.plive-page .ap-live-city-list-card h3,
.plive-page .plive-foreign__head h3,
.plive-page .plive-country-card__name,
.plive-page .plive-country-card__count {
    color: #0f172a;
}

/* حالت فقط‌نمایش */
.plive-body[data-readonly="1"] .ap-prov {
    cursor: default !important;
}

.plive-body[data-readonly="1"] .ap-city-rank__go {
    display: none;
}

.plive-body[data-readonly="1"] .ap-city-rank__link,
.plive-body[data-readonly="1"] .ap-island-tile {
    pointer-events: none;
    text-decoration: none;
    cursor: default;
}

.plive-foreign {
    margin-top: 22px;
}

.plive-foreign__head {
    margin-bottom: 14px;
}

.plive-foreign__head h3 {
    margin: 0 0 4px;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #f8fbff;
}

.plive-foreign__head p {
    margin: 0;
    color: #8ea4d5;
    font-size: 13px;
}

.plive-foreign__chart-card {
    width: 100%;
    border-radius: 18px;
    padding: 18px 16px 12px;
    box-shadow: 0 2px 14px rgba(15, 23, 42, .08);
    margin-bottom: 14px;
    box-sizing: border-box;
}

#pliveForeignChart {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: 280px;
}

.plive-foreign__cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.plive-country-card {
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, .04);
}

.plive-country-card__name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 8px;
}

.plive-country-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #64748b;
}

.plive-country-card__count {
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.plive-country-card__bar {
    height: 8px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.plive-country-card__bar > span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #0ea5e9);
    width: 0;
    transition: width .6s ease;
}

@media (max-width: 1100px) {
    .plive-page .footer-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .plive-page .topbar-nav {
        display: none;
    }

    .plive-page .ap-live-map-section {
        grid-template-columns: 1fr;
    }

    .plive-page .ap-live-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 520px) {
    .plive-page .ap-live-kpis {
        grid-template-columns: 1fr;
    }

    .plive-page .topbar-actions .btn-glow {
        display: none;
    }
}
