/* ============================================
   استایل‌های اصلی سایت - بخش مدیر
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    direction: rtl;
    background: #f5f7fb;
    min-height: 100vh;
    display: flex;
}

/* ============================================
   سایدبار (منوی کناری)
   ============================================ */

.sidebar {
    width: 260px;
    min-width: 260px;
    background: linear-gradient(180deg, #1e3a5f 0%, #0f2b40 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    padding: 0 16px;
}

/* لینک پنل کاربری */
.user-panel-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 0 !important;
}

.user-panel-link:hover .user-panel {
    background: rgba(255,255,255,0.05);
}

/* پنل کاربری */
.sidebar .user-panel {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s;
    cursor: pointer;
}

.sidebar .user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    overflow: hidden;
}

.sidebar .user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar .user-info {
    flex: 1;
}

.sidebar .user-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.sidebar .user-role {
    font-size: 11px;
    color: #9ca3af;
}

/* منو */
.sidebar-nav {
    flex: 1;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 10px 0;
}

.sidebar-nav li {
    margin: 2px 0;
}

.sidebar-nav a {
    display: block;
    padding: 12px 18px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
    border-radius: 8px;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

/* ============================================
   بخش راست صفحه (هدر + محتوا)
   ============================================ */

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ============================================
   هدر
   ============================================ */

.header {
    background: linear-gradient(90deg, #1e3a5f 0%, #0f2b40 100%);
    color: white;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-left, .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    font-weight: bold;
    font-size: 18px;
}

.date-time {
    font-family: 'Vazir', 'Tahoma', sans-serif;
    font-size: 14px;
    color: #fff;
    padding: 6px 12px;
    border-radius: 20px;
    margin-left: 15px;
    direction: ltr;
}

.notif {
    position: relative;
    font-size: 20px;
    cursor: pointer;
}

.notif-badge {
    position: absolute;
    top: -8px;
    right: -12px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
}

.logout-btn {
    font-size: 18px;
    text-decoration: none;
    color: #f87171;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: 0.2s;
}

.logout-btn:hover {
    background: #ef4444;
    color: white;
}

/* ============================================
   محتوای اصلی
   ============================================ */

.content {
    flex: 1;
    padding: 20px;
    overflow-x: auto;
    background: #f5f7fb;
}

/* ============================================
   صفحه لاگین
   ============================================ */

.login-body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    background: linear-gradient(135deg, #1e3a5f 0%, #0f2b40 50%, #1e3a5f 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    background: #ffffff;
    width: 380px;
    max-width: 90%;
    padding: 32px 28px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    text-align: center;
}

.login-box h2 {
    margin: 0 0 24px;
    font-size: 22px;
    color: #1e3a5f;
    font-weight: 700;
}

.login-error {
    background: #fee2e2;
    color: #b91c1c;
    border-radius: 12px;
    padding: 10px 14px;
    margin-bottom: 20px;
    font-size: 13px;
}

.login-input {
    width: 100%;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1.5px solid #e2e8f0;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.login-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.login-button {
    width: 100%;
    margin-top: 6px;
    padding: 12px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(59,130,246,0.35);
}

/* ============================================
   Breadcrumb
   ============================================ */

.breadcrumb {
    margin-bottom: 20px;
    padding: 0 20px 12px 20px;
    border-bottom: 1px solid #eef2f6;
}

.breadcrumb-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
}

.breadcrumb-link {
    color: #6c7a8e;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

.breadcrumb-link:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.breadcrumb-separator {
    color: #cbd5e1;
    font-size: 14px;
}

.breadcrumb-current {
    color: #1a2c3e;
    font-weight: 600;
    background: #f1f5f9;
    padding: 4px 12px;
    border-radius: 6px;
}

/* ============================================
   تقویم شمسی
   ============================================ */

.jalali-date-input {
    direction: ltr;
    text-align: left;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    cursor: pointer;
    background-color: white;
}

.jalali-date-input:hover {
    border-color: #3b82f6;
}

.jalali-datepicker-container {
    animation: fadeInScale 0.2s ease-out;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ============================================
   ریسپانسیو
   ============================================ */

@media (max-width: 768px) {
    .sidebar {
        width: 220px;
        min-width: 220px;
    }
    
    .content {
        padding: 16px;
    }
    
    .header {
        padding: 10px 16px;
    }
    
    .date-time {
        font-size: 11px;
        margin-left: 8px;
    }
}