@font-face{
    font-family:'Dana';
    src:url('../fonts/Dana-VF.woff2') format('woff2');
    font-weight:100 900;
    font-style:normal;
}

/* =========================
   Base / Defaults
========================= */
:root{
    --pd-bg: #f8fafc;
    --pd-card: #ffffff;
    --pd-text: #0f172a;
    --pd-muted: #64748b;
    --pd-border: #e5e7eb;
    --pd-border-2: #e2e8f0;
    --pd-primary: #4f46e5;
    --pd-primary-2: #4338ca;
    --pd-shadow: 0 12px 28px rgba(0,0,0,0.06);
    --pd-radius-lg: 20px;
    --pd-radius-md: 16px;
    --pd-radius-sm: 12px;
}

*{ box-sizing: border-box; }

.pd-wrapper{
    display:flex;
    min-height:85vh;
    background:var(--pd-bg);
    border-radius:20px;
    overflow:hidden;
    font-family:'Dana',Tahoma,sans-serif;
    direction:rtl;
}

/* =========================
   Sidebar
========================= */
.pd-sidebar{
    width:290px;
    background:#ffffff;
    border-left:1px solid var(--pd-border);
    padding:25px;
    transition:0.3s;
}

.pd-sidebar.collapsed{
    width:90px;
}

.pd-logo-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:35px;
}

.pd-logo{
    font-size:22px;
    font-weight:800;
    color:var(--pd-primary);
}

.pd-sidebar-toggle{
    background:none;
    border:none;
    font-size:20px;
    cursor:pointer;
}

.pd-menu-list{
    list-style:none;
    padding:0;
    margin:0;
}

.pd-menu-item a{
    display:flex;
    align-items:center;
    gap:12px;
    padding:14px 18px;
    text-decoration:none;
    color:var(--pd-muted);
    border-radius:12px;
    margin-bottom:8px;
    transition:0.25s;
}

.pd-menu-item a:hover{
    background:#f1f5f9;
}

.pd-menu-item.active a{
    background:#eef2ff;
    color:var(--pd-primary);
    font-weight:600;
}

.pd-icon{
    font-size:20px;
    width:24px;
    text-align:center;
}

.pd-sidebar.collapsed .pd-text{
    display:none;
}

/* =========================
   Main Area
========================= */
.pd-main{
    flex:1;
    padding:40px;
}

/* =========================
   Dashboard (Legacy base)
========================= */
.pd-dashboard{
    max-width:1000px; /* کمی بازتر برای UI جدید */
}

.pd-page-title{
    font-size:26px;
    margin-bottom:30px;
    color: var(--pd-text);
}

/* grid عمومی کارت‌ها */
.pd-cards-grid{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:22px;
}

/* کارت داشبورد (نسخه قدیمی شما) — نگه داشته می‌شود */
.pd-dashboard-card{
    display:flex;
    gap:18px;
    align-items:center;
    background:#ffffff;
    padding:26px;
    border-radius:18px;
    text-decoration:none;
    border:1px solid var(--pd-border);
    transition:0.25s;
    color: var(--pd-text);
}

.pd-dashboard-card:hover{
    transform:translateY(-4px);
    box-shadow:var(--pd-shadow);
}

/* آیکن قدیمی */
.pd-card-icon{
    font-size:32px;
    width:44px;
}

.pd-card-title{
    font-weight:700;
    font-size:16px;
    color:#1e293b;
}

.pd-card-desc{
    font-size:13px;
    color:var(--pd-muted);
    margin-top:4px;
}

/* =========================
   Buttons / Alerts (Shared)
========================= */
.pd-btn-primary{
    background:var(--pd-primary);
    color:white;
    border:none;
    padding:10px 18px;
    border-radius:8px;
    cursor:pointer;
    font-size:14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.pd-btn-primary:hover{
    background:var(--pd-primary-2);
    color: #fff;
}

.pd-alert-success{
    background:#ecfdf5;
    color:#065f46;
    padding:12px 15px;
    border-radius:8px;
    margin-bottom:20px;
    border:1px solid #a7f3d0;
}

.pd-divider{
    margin:20px 0;
    border:none;
    border-top:1px solid var(--pd-border);
}

/* =========================
   Settings Page Styles
========================= */
.pd-settings-card{
    background:#ffffff;
    padding:25px;
    border-radius:16px;
    border:1px solid var(--pd-border);
    margin-bottom:20px;
}

.pd-form-group{
    margin-bottom:15px;
}

.pd-form-group label{
    display:block;
    margin-bottom:8px;
    color:var(--pd-muted);
}

.pd-form-group input{
    width:100%;
    padding:12px;
    border:1px solid var(--pd-border);
    border-radius:10px;
    font-family:inherit;
}

.pd-btn-save{
    background:var(--pd-primary);
    color:#fff;
    border:none;
    padding:12px 30px;
    border-radius:10px;
    cursor:pointer;
    font-weight:600;
}

.pd-badge{
    background:#ef4444;
    color:white;
    padding:2px 7px;
    border-radius:10px;
    font-size:11px;
    margin-right:auto;
    min-width:18px;
    text-align:center;
}

/* =========================
   Profile Styles
========================= */
.pd-profile-grid{
    display:grid;
    grid-template-columns: 300px 1fr;
    gap:25px;
    margin-top:20px;
}

.pd-profile-card{
    background:#fff;
    border-radius:16px;
    padding:25px;
    text-align:center;
    border:1px solid var(--pd-border);
}

.pd-avatar img{
    border-radius:50%;
    margin-bottom:15px;
}

.pd-user-email{
    color:var(--pd-muted);
    font-size:14px;
}

.pd-profile-form-card{
    background:#fff;
    border-radius:16px;
    padding:30px;
    border:1px solid var(--pd-border);
}

/* توجه: شما pd-form-group را دوباره تعریف کرده بودید؛
   اینجا به همان تعریف قبلی بسنده می‌کنیم تا تداخل کمتر شود. */
.pd-form-group{
    display:flex;
    flex-direction:column;
    margin-bottom:18px;
}
.pd-form-group label{
    font-size:13px;
    margin-bottom:6px;
    color:#334155;
}
.pd-form-group input{
    padding:10px 12px;
    border-radius:8px;
    border:1px solid #cbd5e1;
    font-size:14px;
}
.pd-form-group input:focus{
    outline:none;
    border-color:var(--pd-primary);
}

/* =========================
   Transactions
========================= */
.pd-transactions-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.pd-card {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--pd-border-2);
}

/* کیف پول */
.pd-wallet-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, var(--pd-primary) 0%, #7c3aed 100%);
    color: white;
    border: none;
}

.pd-wallet-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pd-wallet-info i {
    font-size: 40px;
    height: 40px;
    width: 40px;
}

/* بسته‌ها */
.pd-plans-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.pd-plan-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--pd-border-2);
    position: relative;
}

.pd-plan-card.featured { border: 2px solid var(--pd-primary); }
.pd-plan-card.cip { background: #f8fafc; border: 2px solid #1e293b; }

.pd-plan-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--pd-primary);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
}

.pd-plan-price {
    font-weight: bold;
    font-size: 1.2rem;
    margin: 20px 0;
    color: #1e293b;
}

/* جدول و فرم فیش */
.pd-billing-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
}

.pd-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.pd-table th, .pd-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid #f1f5f9;
}

.status-success { color: #16a34a; font-weight: bold; }
.status-pending { color: #ca8a04; font-weight: bold; }

.pd-btn-success {
    background: #16a34a;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
}

/* ==========================================================
   NEW: Dashboard PRO Styles (Hero / Overview / Services / Tip)
   این بخش، داشبورد جدید را خوشگل می‌کند و به صفحات دیگر کاری ندارد.
========================================================== */

/* Hero */
.pd-dashboard-hero{
    display:grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 18px;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(15,23,42,0.18);
}

.pd-dashboard-hero::before{
    content:"";
    position:absolute;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    top:-70px;
    left:-70px;
}

.pd-dashboard-hero::after{
    content:"";
    position:absolute;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: rgba(59,130,246,0.18);
    bottom:-55px;
    right:-55px;
}

.pd-dashboard-hero-content,
.pd-dashboard-hero-visual{
    position: relative;
    z-index: 1;
}

.pd-dashboard-eyebrow{
    display:inline-block;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.14);
}

.pd-dashboard-hero .pd-page-title{
    margin: 12px 0 8px;
    color: #fff;
    font-size: 30px;
    font-weight: 900;
}

.pd-dashboard-subtitle{
    margin: 0;
    margin-top: 6px;
    color: rgba(255,255,255,0.84);
    line-height: 1.9;
    font-size: 13px;
    max-width: 680px;
}

.pd-dashboard-actions{
    display:flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.pd-btn-secondary{
    background: rgba(255,255,255,0.12);
    color:#fff;
    border: 1px solid rgba(255,255,255,0.16);
    padding:10px 18px;
    border-radius: 10px;
    cursor:pointer;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}

.pd-btn-secondary:hover{
    background: rgba(255,255,255,0.18);
    color:#fff;
}

/* Hero stat cards */
.pd-dashboard-hero-visual{
    display:flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
}

.pd-hero-stat-card{
    display:flex;
    align-items:center;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
}

.pd-hero-stat-icon{
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(255,255,255,0.12);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size: 24px;
    flex-shrink:0;
}

.pd-hero-stat-label{
    font-size: 12px;
    color: rgba(255,255,255,0.72);
    margin-bottom: 4px;
}

.pd-hero-stat-value{
    font-size: 15px;
    font-weight: 900;
    color:#fff;
}

/* Overview */
.pd-dashboard-overview{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.pd-overview-box{
    background: var(--pd-card);
    border: 1px solid var(--pd-border-2);
    border-radius: 20px;
    padding: 18px;
    display:flex;
    gap: 12px;
    align-items:flex-start;
    box-shadow: 0 10px 25px rgba(15,23,42,0.04);
}

.pd-overview-icon{
    font-size: 22px;
    line-height: 1;
    margin-top: 1px;
}

.pd-overview-box strong{
    display:block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--pd-text);
}

.pd-overview-box p{
    margin:0;
    font-size: 13px;
    line-height: 1.9;
    color: var(--pd-muted);
}

/* Services section wrapper */
.pd-dashboard-services{
    background: var(--pd-card);
    border: 1px solid var(--pd-border-2);
    border-radius: 24px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.05);
}

.pd-section-head{
    margin-bottom: 14px;
}

.pd-section-head h2{
    margin:0 0 6px;
    font-size: 20px;
    font-weight: 900;
    color: var(--pd-text);
}

.pd-section-head p{
    margin:0;
    color: var(--pd-muted);
    font-size: 13px;
    line-height: 1.8;
}

/* Services cards grid (override old grid just inside services) */
.pd-dashboard-services .pd-cards-grid{
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Services cards style - distinct from old dashboard card look */
.pd-dashboard-services .pd-dashboard-card{
    align-items: stretch;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    min-height: 210px;
    border: 1px solid rgba(255,255,255,0.35);
    box-shadow: none;
    transform: none;
    transition: transform .25s ease, box-shadow .25s ease;
    position: relative;
    overflow: hidden;
}

.pd-dashboard-services .pd-dashboard-card:hover{
    transform: translateY(-6px);
    box-shadow: 0 18px 35px rgba(15,23,42,0.08);
}

/* top row */
.pd-card-top{
    display:flex;
    align-items:center;
    justify-content: space-between;
    gap: 10px;
}

/* icon chip */
.pd-dashboard-services .pd-card-icon{
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size: 30px;
    background: rgba(255,255,255,0.55);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

/* badge */
.pd-card-badge{
    font-size: 11px;
    font-weight: 800;
    color: #334155;
    background: rgba(255,255,255,0.72);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

/* content */
.pd-dashboard-services .pd-card-content{
    display:flex;
    flex-direction: column;
    gap: 8px;
}

.pd-dashboard-services .pd-card-title{
    font-size: 17px;
    font-weight: 900;
    color: var(--pd-text);
}

.pd-dashboard-services .pd-card-desc{
    font-size: 13px;
    color: #334155;
    line-height: 1.9;
    margin-top: 0;
}

/* arrow */
.pd-card-arrow{
    margin-top: auto;
    font-size: 18px;
    color: #334155;
    opacity: 0.7;
}

/* Tip */
.pd-dashboard-tip{
    display:flex;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1px solid #fed7aa;
}

.pd-tip-icon{
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: rgba(255,255,255,0.65);
    display:flex;
    align-items:center;
    justify-content:center;
    font-size: 26px;
    flex-shrink:0;
}

.pd-dashboard-tip h3{
    margin: 0 0 6px;
    color: #9a3412;
    font-weight: 900;
}

.pd-dashboard-tip p{
    margin: 0;
    color: #7c2d12;
    line-height: 1.9;
    font-size: 13px;
}

/* =========================
   Responsive
========================= */
@media (max-width: 1100px){
    .pd-dashboard-hero{
        grid-template-columns: 1fr;
    }

    .pd-dashboard-overview{
        grid-template-columns: 1fr;
    }

    .pd-dashboard-services .pd-cards-grid{
        grid-template-columns: 1fr;
    }

    /* fallback for any old pages using 2-column dashboard grid */
    .pd-cards-grid{
        grid-template-columns: 1fr;
    }

    .pd-profile-grid{
        grid-template-columns: 1fr;
    }

    .pd-billing-row{
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px){
    .pd-main{
        padding: 22px;
    }

    .pd-sidebar{
        width: 260px;
        padding: 18px;
    }

    .pd-dashboard-hero{
        padding: 20px;
        border-radius: 18px;
    }

    .pd-dashboard-services{
        padding: 16px;
        border-radius: 18px;
    }

    .pd-dashboard-card{
        padding: 18px;
        border-radius: 16px;
    }

    .pd-dashboard-actions{
        flex-direction: column;
    }

    .pd-btn-primary,
    .pd-btn-secondary{
        width: 100%;
    }
}
