﻿/* ==== عمومی - لایوت و کارت‌ها ==== */
:root {
    --surface: #ffffff;
    --muted: #6c757d;
    --primary: #0d6efd;
    --bg: #f6f7fb;
    --ring: #e7e9ef;
    --danger: #dc3545;
    --ok: #16a34a;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    font-family: "Vazirmatn",system-ui,Segoe UI,Roboto,Arial,sans-serif;
    background: var(--bg);
    color: #111;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px;
}

/* ==== کارت ها ==== */
.card {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--ring);
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

.card-body {
    padding: 12px;
}

    .card-body h5 {
        margin: 0 0 6px;
        font-size: 14px;
        font-weight: 700;
    }

    .card-body p {
        margin: 0 0 6px;
        font-size: 12px;
        color: #555;
    }

/* ==== سایدبار ==== */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 240px;
    height: 100vh;
    padding-top: 70px;
    overflow-y: auto;
    background: linear-gradient(to bottom, #2c3e50, #1c2833);
    color: #eaeaea;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

    .sidebar .nav-item + .nav-item {
        margin-top: 0.3rem;
    }

    .sidebar .nav-link {
        color: #cfd8dc !important;
        margin: 0.3rem 1rem;
        padding: 0.6rem 1rem;
        border-radius: 0.75rem;
        font-size: 0.95rem;
        display: flex;
        align-items: center;
        background-color: #1f2d3d !important; /* رنگ ثابت */
        transition: none !important;
    }

        .sidebar .nav-link:hover,
        .sidebar .nav-link.active {
            background-color: #1f2d3d !important; /* جلوگیری از شفاف شدن */
            color: #ffffff !important;
        }

/* ==== دکمه نمایش/پنهان سایدبار ==== */
#toggleSidebarBtn {
    position: fixed;
    top: 60px;
    right: 10px;
    z-index: 1050;
    background: #1f2d3d !important;
    color: white !important;
    border: none;
    padding: 8px 10px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: none !important;
}

    #toggleSidebarBtn:hover {
        background-color: #1f2d3d !important; /* جلوگیری از تغییر رنگ */
        color: white !important;
    }

/* ==== Bottom Navigation ==== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1050;
    background: linear-gradient(to right, #1f2d3d, #2c3e50) !important;
    backdrop-filter: none !important; /* حذف اثر شفاف */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.4);
}

    .bottom-nav .nav-icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #e0e0e0 !important;
        font-size: 2rem;
        transition: none !important;
    }

        .bottom-nav .nav-icon span {
            font-size: 0.65rem;
            margin-top: 3px;
            color: #ccc !important;
            line-height: 1;
        }

        .bottom-nav .nav-icon:hover,
        .bottom-nav .nav-icon.active {
            color: #ffffff !important;
        }

            .bottom-nav .nav-icon:hover span,
            .bottom-nav .nav-icon.active span {
                color: #ffffff !important;
            }

    .bottom-nav.hide-labels .nav-icon span {
        display: none;
    }

/* ==== دکمه‌ها ==== */
.btn,
.btn:hover,
.btn:focus,
.btn:active {
    transition: none !important;
    opacity: 1 !important; /* جلوگیری از شفاف شدن */
}

.call-btn {
    background-color: #28a745 !important;
    color: #fff !important;
}

    .call-btn:hover,
    .call-btn:focus {
        background-color: #28a745 !important;
        color: #fff !important;
    }

/* ==== واکنشگرایی موبایل ==== */
@media (max-width: 767.98px) {
    #toggleSidebarBtn,
    .sidebar {
        display: none !important;
    }
    .has-bottom-nav {
        padding-bottom: 80px;
    }
}

/* ==== پروفایل ==== */
.profile-wrapper {
    background: linear-gradient(135deg, #1f2d3d, #2c3e50, #34495e);
    padding: 2rem;
    border-radius: 1.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
    color: #f0f0f0;
    transition: background 0.4s ease;
}

    .profile-wrapper::before {
        content: "";
        position: absolute;
        top: -25%;
        right: -25%;
        width: 220px;
        height: 220px;
        background: radial-gradient(circle, rgba(255, 255, 255, 0.06), transparent 70%);
        border-radius: 50%;
        z-index: 0;
    }

    .profile-wrapper > * {
        position: relative;
        z-index: 2;
    }

/* ==== آمار داشبورد ==== */
#dashboardStats {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    flex-wrap: nowrap;
    margin-top: 1rem;
}

    #dashboardStats .card {
        flex: 1 1 0;
        min-width: 0;
        background: rgba(255, 255, 255, 0.05);
        backdrop-filter: blur(6px);
        border-radius: 1rem;
        padding: 1rem;
        color: #e0e0e0;
        transition: none !important;
    }

    #dashboardStats .fw-bold {
        font-size: 1.1rem;
    }

@media (max-width: 768px) {
    #dashboardStats {
        flex-wrap: wrap;
    }

        #dashboardStats .card {
            flex: 0 0 48%;
            margin-bottom: 0.5rem;
        }

        #dashboardStats .fw-bold {
            font-size: 0.95rem;
        }

        #dashboardStats .text-light {
            font-size: 0.8rem;
        }
}

/* ==== کارت آمار موبایل ==== */
.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    border-radius: 1rem;
    padding: 0.75rem 0.5rem;
    color: #e0e0e0;
    min-width: 0;
    flex: 1 1 0;
}
