/* ========================================
   Reset & Base Styles
======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', 'Tahoma', sans-serif;
    direction: rtl;
    background-color: #f7fafc;
    color: #1a202c;
    line-height: 1.6;
}

/* ========================================
   Container & Layout
======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

/* ========================================
   Header Styles
======================================== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.3s;
}

.nav-menu a:hover {
    background: rgba(255, 255, 255, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 500;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   Sidebar Styles
======================================== */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #2d3748 0%, #1a202c 100%);
    color: white;
    position: sticky;
    top: 80px;
    height: calc(100vh - 80px);
    overflow-y: auto;
}

.sidebar-header {
    padding: 30px 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

.sidebar-header p {
    font-size: 14px;
    opacity: 0.7;
}

.sidebar-nav {
    padding: 20px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-right: 30px;
}

.sidebar-nav a.active {
    background: linear-gradient(90deg, #667eea, #764ba2);
    color: white;
    border-right: 4px solid #ffd700;
}

.sidebar-nav .icon {
    font-size: 20px;
    margin-left: 12px;
    width: 30px;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

.logout-link {
    color: #ff6b6b !important;
}

.logout-link:hover {
    background: rgba(255, 107, 107, 0.1) !important;
}

/* ========================================
   Main Content Area
======================================== */
.main-content {
    flex: 1;
    padding: 30px;
    background: #f7fafc;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 32px;
    color: #1a202c;
    margin-bottom: 8px;
}

.subtitle {
    color: #718096;
    font-size: 16px;
}

/* ========================================
   Stats Grid & Cards
======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.stat-card.blue { border-top: 4px solid #3b82f6; }
.stat-card.green { border-top: 4px solid #10b981; }
.stat-card.purple { border-top: 4px solid #8b5cf6; }
.stat-card.red { border-top: 4px solid #ef4444; }

.stat-icon {
    font-size: 48px;
    opacity: 0.8;
}

.stat-info h3 {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #1f2937;
    margin: 0;
}

.stat-info small {
    color: #9ca3af;
    font-size: 12px;
}

/* ========================================
   Quick Actions
======================================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 30px 0;
}

.action-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.action-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.action-btn .icon {
    font-size: 24px;
}

/* ========================================
   Sections
======================================== */
.section {
    background: white;
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.section h2 {
    font-size: 20px;
    color: #1a202c;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.view-all-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.view-all-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ========================================
   Tables
======================================== */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table td {
    color: #4b5563;
}

.data-table td strong {
    color: #1f2937;
    font-weight: 600;
}

/* ========================================
   Empty State
======================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px !important;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    color: #6b7280;
    font-size: 16px;
}

/* ========================================
   Buttons
======================================== */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
}

.btn-info {
    background: #3b82f6;
    color: white;
}

.btn-info:hover {
    background: #2563eb;
}

/* ========================================
   Footer Styles
======================================== */
.footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-top: 60px;
    padding: 40px 0 20px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 20px 30px;
}

.footer-section h4 {
    margin-bottom: 15px;
    font-size: 18px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}

.footer-section p,
.footer-section li {
    margin: 8px 0;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.footer-section a:hover {
    color: #ffd700;
    padding-right: 5px;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.footer-bottom p {
    margin: 5px 0;
}

.version {
    font-size: 12px;
    opacity: 0.7;
}

/* ========================================
   Forms (برای صفحات بعدی)
======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ========================================
   Responsive Design
======================================== */
@media (max-width: 768px) {
    .dashboard-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        top: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        grid-template-columns: 1fr;
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .nav-menu {
        flex-direction: column;
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
