/* thirdProject.css - CLEANED & FINAL */

/* GLOBAL */
body {
    font-family: Arial, Helvetica, Tahoma, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f6f7fb;
    color: #111827;
}

[lang="fa"] body,
[dir="rtl"] body {
    font-family: Tahoma, "Segoe UI", Arial, sans-serif;
}

/* UTILITIES */
.bg-red {
    background-color: rgb(255, 62, 62);
}

.bg-purple {
    background-color: #9694ff !important;
}

.bg-primary {
    background-color: #4f7df0 !important;
}

.bg-success {
    background-color: #28a745 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

.bg-teal {
    background-color: #2dd4bf !important;
}

.bg-coral {
    background-color: #ff7e7e !important;
}

.btn-gray {
    background-color: #e8eefc;
    color: #4f7df0;
    border: none;
    font-weight: 600;
}

.btn-gray:hover {
    background-color: #d6e0fb;
    color: #2d5fd9;
}

.bg-gray {
    background-color: #f1f3f9;
}

.text-primary {
    color: #4f7df0 !important;
}

/* LANGUAGE TOGGLE */
.lang-toggle {
    min-width: 44px;
    border-radius: 8px;
    border-color: #4f7df0;
    color: #4f7df0;
}

.lang-toggle:hover {
    background-color: #4f7df0;
    color: #fff;
}

/* BOOTSTRAP OVERRIDES */
.card {
    border: none !important;
    border-radius: 0.85rem;
    box-shadow: 0 2px 10px rgba(18, 25, 40, 0.05);
    background: #fff;
}

.card-header {
    padding: 1rem 1.25rem;
    background-color: #fff;
    border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}

/* SIDEBAR */
.asidebar {
    width: 250px;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #ffffff;
    transition: all 0.5s ease-out;
    padding: 2rem 1rem;
    overflow-y: auto;
    z-index: 1030;
    border-right: 1px solid rgba(0, 0, 0, 0.04);
}

.asidebar.inactive {
    margin-left: -260px;
}

/* RTL: sidebar on the right */
[dir="rtl"] .asidebar {
    left: auto;
    right: 0;
    border-right: none;
    border-left: 1px solid rgba(0, 0, 0, 0.04);
}

[dir="rtl"] .asidebar.inactive {
    margin-left: 0;
    margin-right: -260px;
}

/* SIDEBAR HEADER */
.asidebar h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #4f7df0;
}

/* SIDEBAR LINK GROUP */
.list-unstyled {
    padding-left: 0;
    margin: 0;
}

.sidebarItem {
    margin-bottom: 0.25rem;
}

.sidebarlink {
    text-decoration: none;
    color: #0f172a;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: all 0.25s ease;
    font-weight: 600;
    font-size: 0.95rem;
}

.sidebarlink i {
    font-size: 1.05rem;
}

.sidebarlink:hover {
    background-color: rgba(79, 125, 240, 0.08);
    color: #4f7df0;
}

.sidebarItem.active > .sidebarlink {
    background-color: #4f7df0;
    color: #fff;
}

.sidebarItem.active > .sidebarlink:hover {
    color: #fff;
}

/* RTL spacing for icons: flip me-2 effect */
[dir="rtl"] .sidebarlink i.me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

[dir="rtl"] .sidebarlink .ms-auto {
    margin-left: 0 !important;
    margin-right: auto !important;
}

/* SUBMENU */
.submenu {
    list-style: none;
    margin: 0.4rem 0 0 0;
    padding: 0 0 0 1.25rem;
}

[dir="rtl"] .submenu {
    padding: 0 1.25rem 0 0;
}

.submenu-item a {
    text-decoration: none;
    padding: 0.45rem 0.75rem;
    display: block;
    color: #25396f;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    border-radius: 6px;
}

.submenu-item a:hover {
    background-color: rgba(79, 125, 240, 0.08);
    color: #4f7df0;
}

/* MAIN */
.main {
    background-color: transparent;
    min-height: 100vh;
    transition: all 0.5s ease-out;
    margin-left: 0;
    padding: 1.25rem 1.5rem;
}

.main.active {
    margin-left: 250px;
}

[dir="rtl"] .main.active {
    margin-left: 0;
    margin-right: 250px;
}

/* HEADER */
header .bi-list {
    cursor: pointer;
}

header .dropdown .bi {
    cursor: pointer;
}

/* RTL margin helpers used inside header/cards */
[dir="rtl"] .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

[dir="rtl"] .me-2 {
    margin-right: 0 !important;
    margin-left: 0.5rem !important;
}

/* STATS ICON */
.stats-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.3rem;
}

/* CARDS inside content */
.content .card {
    margin-bottom: 1rem;
}

/* TABLE */
.table {
    --bs-table-bg: transparent;
}

.table th {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid #eef0f6;
}

.table td {
    border-bottom: 1px solid #f4f5fa;
}

.table img {
    object-fit: cover;
}

/* PROFILE CARD */
img.rounded-circle {
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    object-position: center top;
}

/* Force square dimensions for known avatar sizes used in the markup */
img.rounded-circle[style*="width: 58px"],
img.rounded-circle[style*="width:58px"] {
    height: 58px !important;
}

img.rounded-circle[style*="width: 64px"],
img.rounded-circle[style*="width:64px"] {
    height: 64px !important;
}

img.rounded-circle[style*="width: 50px"],
img.rounded-circle[style*="width:50px"] {
    height: 50px !important;
}

img.rounded-circle[style*="width: 78px"],
img.rounded-circle[style*="width:78px"] {
    height: 78px !important;
}

.profile-avatar {
    border: 2px solid #eef2ff;
}

/* PROGRESS */
.progress {
    height: 0.95rem;
    background: rgba(15, 23, 42, 0.06);
    border-radius: 0.6rem;
    overflow: hidden;
}

.progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.78rem;
    color: #fff;
}

/* DONUT CHART card body padding tweak */
#chartdiv2 {
    direction: ltr;
}

/* Responsive tweaks */
@media (max-width: 991.98px) {
    .asidebar {
        width: 240px;
        padding: 1.25rem;
    }

    .main.active {
        margin-left: 0;
    }

    [dir="rtl"] .main.active {
        margin-right: 0;
    }
}

/* Alpine hide */
[x-cloak] {
    display: none !important;
}
