﻿/* =================================================================
۱. متغیرها (CSS Variables)
================================================================= */
:root {
    --sidebar-width: 240px;
    --primary-red: #dc3545;
    --dark-gray: #343a40;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    --card-hover-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    --card-height: 350px; /* ارتفاع ثابت برای کارت‌ها */
}

/* =================================================================
۲. استایل‌های عمومی و بدنه (Body & General)
================================================================= */
body {
    background-color: var(--light-gray);
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    text-align: right;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =================================================================
۳. طرح‌بندی اصلی (Layout: Wrapper, Sidebar, Main Content)
================================================================= */
.dashboard-wrapper {
    display: flex;
    min-height: calc(100vh - 56px);
    margin-top: 0.1rem;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: white;
    border-left: 1px solid var(--border-color);
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

    .sidebar .nav-link {
        color: var(--dark-gray);
        padding: 0.75rem 1rem;
        border-radius: 8px;
        margin-bottom: 0.5rem;
        text-decoration: none;
        display: flex;
        align-items: center;
        transition: all 0.2s ease-in-out;
    }

        .sidebar .nav-link:hover {
            background-color: #f1f3f5;
            color: var(--primary-red);
            transform: translateX(-5px);
        }

        .sidebar .nav-link.active {
            background-color: var(--primary-red);
            color: white;
        }

        .sidebar .nav-link i {
            margin-left: 0.75rem;
            font-size: 1.2rem;
        }

.main-content {
    flex-grow: 1;
    padding: 0.1rem 2rem;
    min-width: 0;
}

/* --- استایل‌های کارت‌ها --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    animation: fadeIn 0.5s ease-in-out;
}



/* ... (بقیه کلاس‌های کارت و استایل‌های خاص مانند status-badge, glass-card, job-card و ... که در مرحله قبل پاک‌سازی شدند) ... */
.card-header-custom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

    .card-header-custom h5 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--dark-gray);
    }

    .card-header-custom .btn-close {
        font-size: 0.8rem;
    }

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-red);
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.activity-list .activity-item {
    display: flex;
    align-items: start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f5;
}

    .activity-list .activity-item:last-child {
        border-bottom: none;
    }

    .activity-list .activity-item i {
        color: var(--primary-red);
        margin-left: 1rem;
        font-size: 1.1rem;
    }

    .activity-list .activity-item p {
        margin: 0;
        font-size: 0.9rem;
    }

    .activity-list .activity-item small {
        color: #adb5bd;
    }

.sitemap-list a {
    display: block;
    padding: 0.5rem 0;
    color: var(--dark-gray);
    text-decoration: none;
    border-bottom: 1px dashed var(--border-color);
    transition: color 0.2s;
}

    .sitemap-list a:hover {
        color: var(--primary-red);
    }

.welcome-section-card {
    display: flex;
    align-items: center;
    background-color: white;
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--border-color);
}

.profile-pic-dashboard {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-red);
    margin-left: 1.5rem;
}

.welcome-text h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-gray);
    margin-bottom: 0.25rem;
}

.welcome-text p {
    color: #6c757d;
    font-size: 1rem;
}

.profPic {
    object-fit: cover;
    border: 3px solid var(--primary-red);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    gap: 6px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    animation: popfade 0.35s ease-out;
    letter-spacing: -0.2px;
}

.badge-active {
    background: linear-gradient(135deg, #1cc88a, #17a673);
}

.badge-invisible {
    background: linear-gradient(135deg, #6c757d, #495057);
}

.badge-waiting {
    background: linear-gradient(135deg, #f6c23e, #e0a800);
    color: #2c2c2c !important;
}

.badge-visible {
    background: linear-gradient(135deg, #36b9cc, #258f9b);
}

.status-badge .icon {
    font-size: 16px;
}

@keyframes popfade {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }

    70% {
        opacity: .9;
        transform: scale(1.05);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.glass-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 40px 20px;
    animation: fadeIn .7s ease;
}

.glass-card {
    width: 100%;
    max-width: 600px;
    padding: 35px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(14px);
}

.glass-title {
    text-align: center;
    font-weight: bold;
    margin-bottom: 25px;
    color: black;
    text-shadow: 0 0 10px rgba(255,255,255,0.4);
}

.glass-input-group {
    margin-bottom: 20px;
    color: black;
    font-weight: 500;
}

    .glass-input-group label {
        margin-bottom: 6px;
        display: block;
    }

.glass-input {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: black;
    font-size: 1rem;
    outline: none;
    transition: 0.25s;
}

    .glass-input:focus {
        border-color: rgba(255, 255, 255, 0.7);
        background: rgba(255, 255, 255, 0.25);
    }

.glass-button {
    padding: 12px 40px;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.2);
    color: black;
    font-weight: bold;
    backdrop-filter: blur(10px);
    transition: 0.3s;
    cursor: pointer;
}

    .glass-button:hover {
        background: rgba(255, 255, 255, 0.35);
        transform: translateY(-2px);
        box-shadow: 0 0 12px rgba(255,255,255,0.4);
    }
 
.job-card {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.1);
    margin-top: 20px;
}

.detail-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #2d3748;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 30px;
    margin-top: 20px;
}

.item-title {
    font-weight: bold;
    color: #4a5568;
    margin-bottom: 5px;
}

.item-value {
    background: #f7fafc;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.back-btn {
    margin-top: 25px;
}

.truncate-text {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.extra-height-card {
    min-height: calc(100% + 20px);
}

.text-warning {
    color: #ffcc00 !important;
}

.company-logo {
    width: 55px;
    height: 55px;
    object-fit: cover;
}

.company-logo-placeholder {
    width: 55px;
    height: 55px;
    background-color: #f1f1f1;
}

.d-flex {
    min-width: 0 !important;
}

.company-title-area {
    min-width: 0 !important;
    flex: 1;
}

    .card-title, .company-title-area p {
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.subscription-card {
    min-height: 380px;
    padding-top: 15px;
    padding-bottom: 15px;
    border-radius: 18px;
}

.card-flexible-height {
    height: auto !important;
    min-height: 350px;
}

.card-3-height {
    height: auto !important;
    min-height: 450px;
}

/* =================================================================
--- Responsive Styles (Tablet & Mobile) ---
================================================================= */

/* Tablet Styles (max-width: 991px) */
@media (max-width: 991px) {
    .dashboard-wrapper {
        flex-direction: column; /* Stack sidebar on top */
    }

    .sidebar {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid var(--border-color);
        padding: 1rem;
        flex-direction: row; /* Make nav items horizontal */
        flex-wrap: wrap;
        justify-content: center;
    }

        .sidebar .nav-link {
            margin: 0.25rem;
            padding: 0.5rem 1rem;
        }

            .sidebar .nav-link i {
                margin-left: 0.5rem;
            }

    .main-content {
        padding: 1rem;
    }

    .content-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1rem;
    }

    .welcome-section-card {
        flex-direction: column;
        text-align: center;
    }

    .profile-pic-dashboard {
        margin-left: 0;
        margin-bottom: 1rem;
    }
}

/* Mobile Styles (max-width: 576px) */
@media (max-width: 576px) {
    .sidebar {
        flex-direction: column; /* Stack nav items vertically again on small mobile */
    }

        .sidebar .nav-link {
            width: 100%;
            justify-content: center;
        }

    .main-content {
        padding: 0.5rem;
    }

    .content-grid {
        grid-template-columns: 1fr; /* Force single column for better readability */
    }

    .grid-2 {
        grid-template-columns: 1fr; /* Single column layout for details */
        gap: 15px;
    }


    .glass-container {
        padding: 20px 10px;
    }

    .glass-card {
        padding: 20px;
    }
}

/*fFor print Resume*/
/* --- CSS مخصوص چاپ --- */
@media print {
    body {
        font-family: Tahoma, Arial, sans-serif;
        color: #000; /* متن سیاه برای چاپ */
        background: #fff; /* پس‌زمینه سفید */
    }

    /* کارت‌ها با هدر */
    .card {
        page-break-inside: avoid; /* جلوگیری از جدا شدن کارت‌ها بین صفحات */
        border: 1px solid #ccc;
        box-shadow: none; /* حذف سایه برای چاپ */
    }

    .card-header {
        background-color: #d81921 !important; /* رنگ هدر سازمانی */
        color: #fff !important;
        font-weight: bold;
        padding: 0.5rem 1rem;
    }

    /* حذف دکمه‌ها و المنت‌های ناوبری */
    a, button, .btn, .form-select {
        display: none !important;
    }

    /* جلوگیری از شکستن خطوط */
    .text-end, .text-muted, .badge {
        text-align: right !important;
        color: #000 !important;
        background: none !important;
    }

    /* جدول‌ها و لیست‌ها */
    ul, li {
        list-style-type: disc;
        margin-left: 1rem;
        color: #000;
    }
}
/*برای چاپ حرفه ایی */
/* ===============================
   PRINT RESUME DESIGN (PRO)
================================ */

@media print {

    body {
        background: white !important;
        font-family: IRANSans, Tahoma;
    }

    nav, header, footer, .btn, .sidebar {
        display: none !important;
    }

    .print-resume {
        display: block !important;
        padding: 20px;
    }

    .qr-print-mini {
        width: 50px !important;
        height: 50px !important;
        object-fit: contain;
        border: 1px solid black;
    }

    .resume-body {
        display: grid;
        grid-template-columns: 30% 70%;
        gap: 25px;
    }

    /* ستون راست */
    .resume-right {
        border-left: 2px solid #333;
        padding-left: 15px;
        font-size: 13px;
    }

    .resume-box {
        margin-bottom: 20px;
    }

        .resume-box h6 {
            font-weight: bold;
            margin-bottom: 6px;
            border-bottom: 1px solid #000;
            padding-bottom: 4px;
        }

    /* ستون چپ */
    .resume-left {
        font-size: 14px;
    }

    .resume-section {
        margin-bottom: 25px;
    }

        .resume-section h5 {
            font-weight: bold;
            border-bottom: 2px solid black;
            margin-bottom: 10px;
            padding-bottom: 5px;
        }

    /* تایم‌لاین پرینت */
    .timeline-print {
        list-style: none;
        padding: 0;
    }

        .timeline-print li {
            padding: 8px 0;
            border-right: 3px solid #000;
            padding-right: 12px;
            margin-bottom: 10px;
        }
}

/*End of For print Resume*/
