/* استایل کلی سیستم انبارداری پتروشیمی */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', 'Arial', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: fixed;
    color: #2c3e50;
    line-height: 1.8;
    direction: rtl;
    font-weight: 400;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* نوار ناوبری */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1.2rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.nav-brand h2 {
    font-size: 1.6rem;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* دکمه همبرگر */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* منوهای dropdown */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.nav-dropdown-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-dropdown-toggle svg {
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.nav-dropdown.active .nav-dropdown-toggle svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    min-width: 200px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    margin-top: 0.5rem;
    overflow: hidden;
}

.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu a {
    display: block;
    color: #2c3e50;
    padding: 0.75rem 1.2rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-dropdown-menu a:last-child {
    border-bottom: none;
}

.nav-dropdown-menu a:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(-5px);
    box-shadow: none;
}

/* لینک‌های آیکونی در منو */
.nav-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.8rem !important;
    position: relative;
    min-width: 44px;
}

.nav-icon-link svg {
    color: white;
    transition: all 0.3s ease;
}

.nav-icon-link:hover svg {
    transform: scale(1.1);
    color: #fff;
}

/* نشانگر تعداد اعلان‌های خوانده نشده */
.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.user-info {
    color: white;
    font-size: 0.9rem;
}

/* محتوای اصلی */
.main-content {
    padding: 2.5rem 0;
    min-height: calc(100vh - 200px);
}

/* صفحه لاگین */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 2rem;
    color: #667eea;
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-info {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 0.9rem;
}

/* فرم‌ها */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

/* دکمه‌ها */
.btn {
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* دکمه‌های کوچک‌تر برای فرم‌ها */
.search-form .btn,
.form-group .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    margin: 0;
    min-width: 120px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1aa179 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.4);
}

.btn-block {
    width: 100%;
    display: block;
}

/* داشبورد */
.dashboard {
    width: 100%;
}

.dashboard h1 {
    margin-bottom: 2.5rem;
    color: #2c3e50;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
    position: relative;
    padding-bottom: 1rem;
}

.dashboard h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(102, 126, 234, 0.1);
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: visible;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.3);
}

.stat-card h3 {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.stat-number {
    font-size: 4rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin: 0;
    letter-spacing: -2px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
}

.dashboard-section {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(102, 126, 234, 0.1);
    min-height: auto;
    overflow: visible;
    transition: all 0.3s ease;
    position: relative;
    width: 100%;
}

.dashboard-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.dashboard-section:hover {
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
    transform: translateY(-3px);
    border-color: rgba(102, 126, 234, 0.2);
}

.dashboard-section .data-table {
    margin-top: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.dashboard-section .table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

.dashboard-section h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 700;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.dashboard-section h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* باکس اعلان‌ها */
.notifications-box {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e0e0e0;
}

.notifications-list {
    scrollbar-width: thin;
    scrollbar-color: #667eea #f0f0f0;
}

.notifications-list::-webkit-scrollbar {
    width: 6px;
}

.notifications-list::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 10px;
}

.notifications-list::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.notifications-list::-webkit-scrollbar-thumb:hover {
    background: #5568d3;
}

.notification-item:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* جداول */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 1rem;
    position: relative;
}

/* صفحه‌بندی */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    align-items: center;
    padding: 1rem 0;
}

.pagination .btn {
    transition: all 0.3s ease;
}

.pagination .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* انیمیشن‌های سبک */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in {
    animation: slideIn 0.4s ease-out;
}

/* بهبود نمایش داده‌ها */
.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* جستجوی سریع */
.quick-search {
    position: relative;
}

.quick-search-input {
    width: 100%;
    padding: 0.6rem 1rem;
    padding-left: 3rem;
    border: none;
    border-radius: 25px;
    background: rgba(255,255,255,0.2);
    color: white;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s;
}

.quick-search-input::placeholder {
    color: rgba(255,255,255,0.7);
}

.quick-search-input:focus {
    background: rgba(255,255,255,0.3);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.1);
}

.quick-search-button {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.quick-search-button:hover {
    transform: scale(1.1);
}

.quick-search-button:active {
    transform: scale(0.95);
}

/* استایل‌های چاپ */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .navbar,
    .footer,
    .page-header button,
    .search-form,
    .btn,
    .nav-menu,
    .filter-actions {
        display: none !important;
    }
    
    .page-header {
        border-bottom: 2px solid #000;
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
    
    .page-header h1 {
        margin: 0;
        color: #000;
    }
    
    .card {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        box-shadow: none;
        margin-bottom: 1rem;
        padding: 1rem;
    }
    
    .card h2 {
        border-bottom: 1px solid #ddd;
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
        color: #000;
    }
    
    .data-table {
        border: 1px solid #000;
        width: 100%;
    }
    
    .data-table th {
        background: #f0f0f0 !important;
        color: #000 !important;
        border: 1px solid #000;
        padding: 0.5rem;
    }
    
    .data-table td {
        border: 1px solid #ddd;
        padding: 0.5rem;
    }
    
    .data-table tbody tr {
        page-break-inside: avoid;
    }
    
    .badge {
        border: 1px solid #000;
        background: white !important;
        color: #000 !important;
    }
    
    .dashboard-section {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 1rem;
    }
    
    @page {
        margin: 2cm;
        size: A4;
    }
    
    .no-print {
        display: none !important;
    }
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.95rem;
    min-width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.data-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.data-table th {
    padding: 1.2rem 1rem;
    text-align: right;
    font-weight: 700;
    border-bottom: none;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.data-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 0.95rem;
}

.data-table tbody tr {
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.text-center {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-style: italic;
}

/* بج‌ها */
.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: #333;
}

.badge-secondary {
    background: #6c757d;
    color: white;
}

/* پیام‌ها */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* صفحه مدیریت */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid #667eea;
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.page-header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

/* کارت‌ها */
.card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    border: 1px solid rgba(102, 126, 234, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px 20px 0 0;
}

.card:hover {
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
    transform: translateY(-3px);
    border-color: rgba(102, 126, 234, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.card-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 700;
}

.card-header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* فرم‌های جستجو و فیلتر */
.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.search-form .form-group {
    margin-bottom: 0;
}

.search-form .form-group:last-child {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: flex-start;
}

.search-form .form-group:last-child .btn {
    flex-shrink: 0;
}

/* دکمه‌های مدیریت فیلتر */
.filter-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.filter-actions .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
    min-width: 120px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.search-form input,
.search-form select {
    flex: 1;
    min-width: 200px;
}

/* فوتر */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.footer p {
    margin: 0;
    font-weight: 500;
}

/* Checkbox های فیلدهای نمایش */
.field-checkbox {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid #e0e0e0;
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', 'Arial', sans-serif;
    direction: rtl;
    min-height: 44px;
    flex-wrap: nowrap;
}

.field-checkbox:hover {
    border-color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
    transform: translateY(-2px);
}

.field-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    max-width: 18px;
    max-height: 18px;
    cursor: pointer;
    accent-color: #667eea;
    flex-shrink: 0;
    margin: 0 !important;
    padding: 0 !important;
    vertical-align: middle;
    align-self: center;
    position: relative;
    top: 0;
    left: 0;
}

.field-checkbox span {
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
    line-height: 1.4;
    user-select: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    white-space: nowrap;
}

.fields-grid {
    direction: rtl;
}

/* فرم جستجو */
.search-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.search-form .form-group {
    margin-bottom: 0;
}

/* Input تاریخ شمسی */
.jalali-date-input {
    font-family: 'Vazirmatn', 'Vazir', 'Tahoma', 'Arial', sans-serif;
    direction: ltr;
    text-align: center;
    letter-spacing: 2px;
    font-size: 1.1rem;
}

.jalali-date-input:focus {
    letter-spacing: 3px;
}

/* ریسپانسیو */
@media (max-width: 1400px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card {
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-section {
        padding: 2rem;
    }
    
    .card {
        padding: 2rem;
    }
}

/* دکمه همبرگر */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }
    
    .navbar {
        padding: 0.8rem 0;
    }
    
    .navbar .container {
        flex-wrap: wrap;
        gap: 0.8rem;
        padding: 0.5rem 0;
        position: relative;
    }
    
    .nav-brand {
        flex: 1;
        text-align: right;
    }
    
    .nav-brand h2 {
        font-size: 1.1rem;
        margin: 0;
    }
    
    /* نمایش دکمه همبرگر */
    .hamburger-menu {
        display: flex;
        order: 1;
    }
    
    /* جستجوی سریع در موبایل */
    .quick-search {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0.5rem 0 !important;
        order: 3;
    }
    
    /* منو در حالت موبایل */
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0.4rem;
        align-items: stretch;
        order: 4;
        background: rgba(102, 126, 234, 0.98);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 0.5rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.2);
        max-height: calc(100vh - 150px);
        overflow-y: auto;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu > a {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        text-align: center;
        width: 100%;
        display: block;
        border-radius: 6px;
    }
    
    .nav-dropdown {
        width: 100%;
    }
    
    .nav-dropdown-toggle {
        width: 100%;
        text-align: center;
        padding: 0.7rem 1rem !important;
        font-size: 0.9rem;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.5rem;
        border-radius: 6px;
    }
    
    .nav-dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 0.4rem;
        margin-bottom: 0;
        box-shadow: none;
        border: 1px solid rgba(255,255,255,0.25);
        background: rgba(255,255,255,0.15);
        backdrop-filter: blur(10px);
        border-radius: 6px;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    
    .nav-dropdown.active .nav-dropdown-menu {
        display: block;
        max-height: 500px;
        padding: 0.5rem 0;
    }
    
    .nav-dropdown-menu a {
        color: white;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        padding: 0.6rem 1rem;
        text-align: center;
        display: block;
        font-size: 0.85rem;
        border-radius: 0;
    }
    
    .nav-dropdown-menu a:first-child {
        border-top: none;
    }
    
    .nav-dropdown-menu a:last-child {
        border-bottom: none;
    }
    
    .nav-dropdown-menu a:hover {
        background: rgba(255,255,255,0.25);
        color: white;
        transform: none;
    }
    
    .nav-icon-link {
        width: 100%;
        justify-content: center;
        padding: 0.7rem 1rem !important;
        border-radius: 6px;
    }
    
    .user-info {
        order: 2;
        width: 100%;
        text-align: center;
        font-size: 0.85rem;
        padding: 0.5rem 0;
    }
    
    .user-info {
        font-size: 0.85rem;
        text-align: center;
        width: 100%;
    }
    
    .main-content {
        padding: 1rem 0;
    }
    
    .dashboard h1 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-card {
        padding: 2rem 1.5rem;
        min-height: 120px;
    }
    
    .stat-card h3 {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .dashboard-section {
        padding: 1.5rem;
        min-height: auto;
        overflow-x: auto;
    }
    
    .dashboard-section .data-table {
        min-width: 600px;
    }
    
    .dashboard-section h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .card-header h2 {
        font-size: 1.2rem;
    }
    
    .table-wrapper {
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    .data-table {
        font-size: 0.85rem;
        min-width: 600px;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
    
    .data-table th {
        font-size: 0.75rem;
        padding: 0.75rem 0.5rem;
    }
    
    .form-group {
        margin-bottom: 1.25rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* جلوگیری از zoom در iOS */
    }
    
    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-form input,
    .search-form select {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .volume-indicator {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .volume-text {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 8px;
    }
    
    .stat-card {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .dashboard-section {
        padding: 1rem;
    }
    
    .notifications-box {
        padding: 1rem;
    }
    
    .notifications-list {
        max-height: 300px !important;
    }
    
    .notification-item {
        padding: 0.75rem !important;
    }
    
    .card {
        padding: 1rem;
    }
}

/* نمایش حجم بشکه */
.volume-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-bar {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.volume-fill {
    height: 100%;
    background: linear-gradient(90deg, #28a745, #20c997);
    transition: width 0.3s;
}

.volume-text {
    min-width: 80px;
    text-align: left;
    font-size: 0.9rem;
}

