/* Store Account Styles */
.store-account-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.store-account-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.income-card {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.expense-card {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    color: white;
}

.profit-card {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
    color: white;
}

.percentage-card {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: white;
}

.transaction-row {
    transition: all 0.2s ease;
}

.transaction-row:hover {
    background-color: #f8f9fa;
    transform: scale(1.01);
}

.income-row {
    border-left: 4px solid #28a745;
}

.expense-row {
    border-left: 4px solid #dc3545;
}

.chart-container {
    position: relative;
    height: 400px;
    margin: 20px 0;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.1);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.stat-card:hover::before {
    transform: translateX(0);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.8;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.filter-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.filter-section .form-group {
    margin-bottom: 1rem;
}

.filter-section label {
    font-weight: 600;
    color: #495057;
}

.transaction-table {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.transaction-table thead th {
    background: #343a40;
    color: white;
    border: none;
    padding: 1rem;
    font-weight: 600;
}

.transaction-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

.badge-custom {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.badge-income {
    background: #28a745;
    color: white;
}

.badge-expense {
    background: #dc3545;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* تحسين الأزرار العامة لتكون واضحة على جميع الشاشات */
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
    font-weight: 600;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    font-weight: 600;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
    color: white;
}

.btn-primary {
    background-color: #007bff;
    border-color: #007bff;
    color: white;
    font-weight: 600;
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #004085;
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .transaction-table {
        font-size: 0.875rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }

    /* إصلاح Header على الموبايل */
    .container-fluid > .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
    }

    .container-fluid > .d-flex.justify-content-between > div:last-child {
        width: 100%;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: stretch;
    }

    .container-fluid > .d-flex.justify-content-between > div:last-child .btn {
        width: 100%;
        margin: 0 !important;
        font-weight: 600;
        padding: 0.75rem 1rem;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    /* تحسين الأزرار على الموبايل */
    .btn-success {
        box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
    }

    .btn-success:hover {
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.4);
    }

    .btn-danger {
        box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
    }

    .btn-danger:hover {
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
    }

    .btn-secondary {
        box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
    }

    .btn-secondary:hover {
        box-shadow: 0 4px 12px rgba(108, 117, 125, 0.4);
    }

    .btn-primary {
        box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
    }

    .btn-primary:hover {
        box-shadow: 0 4px 12px rgba(0, 123, 255, 0.4);
    }

    /* إصلاح محاذاة الجدول */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* تحسين Cards على الموبايل */
    .card {
        margin-bottom: 1rem;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .card-header {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* إصلاح محاذاة Pagination */
    .card-footer {
        padding: 1rem;
        overflow-x: auto;
    }

    .pagination {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .pagination .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }

    /* تحسين Form Filters */
    .row.g-3 > div {
        margin-bottom: 1rem;
    }

    .row.g-3 .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    /* تحسين Modal على الموبايل */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .modal-content {
        border-radius: 8px;
    }

    .modal-header {
        padding: 1rem;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0 !important;
    }
}

@media (max-width: 480px) {
    h1.h3 {
        font-size: 1.25rem;
    }

    .card-header h6 {
        font-size: 0.875rem;
    }

    .table {
        font-size: 0.8rem;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
    }

    .btn-group-sm .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Animation for loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .transaction-table {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
    
    .stat-card {
        border: 1px solid #dee2e6;
        color: #000 !important;
    }
} 