/* ========================================
   Dashboard Styles - سیستم حسابداری
======================================== */

/* Stats Cards Specific Styling */
.stat-card .stat-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.stat-card .stat-icon.bg-primary {
    background: linear-gradient(135deg, #2563eb, #1e40af) !important;
}

.stat-card .stat-icon.bg-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.stat-card .stat-icon.bg-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.stat-card .stat-icon.bg-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

/* Chart Container */
#revenueChart {
    max-height: 300px;
}

/* Account Balance Items */
.account-balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.account-balance-item:last-child {
    border-bottom: none;
}

.account-name {
    display: flex;
    align-items: center;
    gap: 10px;
}

.account-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.account-details h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.account-details small {
    color: var(--text-muted);
    font-size: 12px;
}

.account-balance {
    text-align: left;
}

.account-amount {
    font-size: 16px;
    font-weight: 700;
    display: block;
}

.account-change {
    font-size: 12px;
    display: block;
}

/* Recent Transactions Table */
#recentTransactions tr {
    cursor: pointer;
}

.transaction-type {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.transaction-type.income {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.transaction-type.expense {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* Pending Items */
.pending-item {
    margin-bottom: 20px;
}

.pending-item:last-child {
    margin-bottom: 0;
}

/* Quick Actions */
.d-grid {
    display: grid;
}

.gap-2 {
    gap: 8px;
}

/* Top Customers/Suppliers Table */
.table-sm td,
.table-sm th {
    padding: 8px;
    font-size: 13px;
}

/* Chart Button Group */
.btn-group-sm .btn {
    font-size: 12px;
    padding: 4px 12px;
}

/* Period Filter Buttons */
.btn-group [data-period] {
    transition: all 0.2s;
}

.btn-group [data-period].active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive Adjustments */
@media (max-width: 1199px) {
    .stat-card {
        margin-bottom: 16px;
    }
}

@media (max-width: 767px) {
    .stat-card .stat-value {
        font-size: 24px;
    }

    .stat-card .stat-label {
        font-size: 13px;
    }

    .card-header .btn-group {
        margin-top: 10px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
}

/* Loading State for Cards */
.card.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.card.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h6 {
    font-size: 16px;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 0;
}
