/* Base - الس - مشترک همه صفحات */

:root {
    --primary-green: #28a745;
    --dark-green: #1e7e34;
    --text-dark: #212529;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
}

body {
    font-family: "IRANSans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
}

.dashboard-wrap{
    margin-top: 58px;
}
/* Navbar */
.custom-navbar {
    background: var(--white);
    border-bottom: 1px solid #e9ecef;
    padding: 0.3rem 0;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    direction: ltr;
}

.navbar-left { display: flex; align-items: center; }
.navbar-right { display: flex; align-items: center; gap: 3rem; direction: rtl; }

.navbar-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e7e34;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.navbar-brand:hover { color: var(--dark-green); text-decoration: none; }
.navbar-logo { width: 28px; height: 28px; object-fit: contain; }

.navbar-menu { display: flex; align-items: center; gap: 2rem; }

.user-dropdown { position: relative; }

.user-dropdown-toggle {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    display: flex; align-items: center; justify-content: center;
    color: white; cursor: pointer;
    transition: all 0.3s ease;
}

.user-dropdown-toggle:hover { transform: scale(1.05); color: white; }
a.user-dropdown-toggle { text-decoration: none; color: white; }
a.user-dropdown-toggle:visited { color: white; }
.user-dropdown-toggle i { font-size: 0.95rem; }

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px); left: 0;
    min-width: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 0.5rem 0;
    opacity: 0; visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1100;
    direction: rtl;
}

.user-dropdown.open .user-dropdown-menu {
    opacity: 1; visibility: visible; transform: translateY(0);
}

.user-dropdown-menu a {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.7rem 1rem;
    color: var(--text-dark) !important;
    text-decoration: none !important;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.user-dropdown-menu a:hover {
    background: rgba(40, 167, 69, 0.1);
    color: var(--primary-green) !important;
}

.user-dropdown-menu a i { width: 20px; text-align: center; flex-shrink: 0; }

.user-dropdown-logout {
    display: flex; align-items: center; gap: 0.6rem;
    width: 100%;
    padding: 0.7rem 1rem;
    border: none; background: none;
    color: var(--text-dark) !important;
    cursor: pointer; font-size: 0.95rem;
    text-align: right;
    font-family: inherit;
}

.user-dropdown-logout:hover {
    background: rgba(40, 167, 69, 0.1);
    color: var(--primary-green) !important;
}

.user-dropdown-logout i { width: 20px; text-align: center; flex-shrink: 0; }
.user-dropdown-menu .dropdown-divider {
    height: 1px; background: #e9ecef; margin: 0.3rem 0;
}

.navbar-toggler {
    display: none;
    background: none; border: none;
    padding: 0.5rem; cursor: pointer;
}

.navbar-toggler-icon {
    display: block;
    width: 25px; height: 3px;
    background: var(--primary-green);
    border-radius: 2px;
    position: relative;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: "";
    position: absolute;
    width: 25px; height: 3px;
    background: var(--primary-green);
    border-radius: 2px;
}

.navbar-toggler-icon::before { top: -8px; }
.navbar-toggler-icon::after { top: 8px; }

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-green);
    background-color: rgba(40, 167, 69, 0.1);
    text-decoration: none;
}

.nav-link.active {
    color: #155724;
    background-color: rgba(30, 126, 52, 0.18);
}

.login-btn {
    background: var(--primary-green);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    display: flex; align-items: center; gap: 0.3rem;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: var(--dark-green);
    color: var(--white);
    text-decoration: none;
}

/* Footer */
.modern-footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.5rem; }
.footer-bottom-content { text-align: center; }
.copyright { color: #bdc3c7; margin: 0; font-size: 0.9rem; }
.company-link { color: var(--primary-green); text-decoration: none; font-weight: 600; }
.company-link:hover { color: var(--white); text-decoration: none; }

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 2rem; left: 2rem;
    width: 50px; height: 50px;
    background: var(--white);
    border: 2px solid var(--primary-green);
    border-radius: 50%;
    color: var(--primary-green);
    font-size: 1.2rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.scroll-to-top:hover {
    background: var(--primary-green);
    color: var(--white);
    transform: translateY(-2px);
}

.scroll-to-top.show { display: flex; }

/* Scrollbar & overflow */
html { scroll-behavior: smooth; overflow-x: hidden; }
body { overflow-x: hidden; }
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

/* Responsive Navbar */
@media (min-width: 769px) {
    .navbar-menu { display: flex !important; }
    .nav-link { width: auto !important; text-align: left !important; }
}

@media (max-width: 768px) {
    .navbar-container { padding: 0 1rem; }
    .navbar-toggler { display: block; }
    .navbar-menu {
        position: absolute;
        top: 100%; left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        display: none;
    }
    .navbar-menu.show { display: flex; }
}
