/* إعدادات عامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 2.5rem;
    color: #3498db;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.welcome-text {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Navigation */
.navbar {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.navbar-nav .nav-link {
    color: #2c3e50 !important;
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin: 0 0.25rem;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link i {
    margin-left: 0.5rem;
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 200px);
}

/* Dashboard Cards */
.dashboard-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.dashboard-card .card-body {
    padding: 2rem;
    position: relative;
}

.card-icon {
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 2rem;
    opacity: 0.3;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 1rem;
}

.card-amount {
    font-size: 2rem;
    font-weight: bold;
    margin: 0;
}

/* Card Types */
.income-card {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
}

.expense-card {
    background: linear-gradient(135deg, #e17055, #d63031);
    color: white;
}

.balance-card {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

.transactions-card {
    background: linear-gradient(135deg, #a29bfe, #6c5ce7);
    color: white;
}

/* Amount Colors */
.income-amount {
    color: #00b894;
}

.expense-amount {
    color: #e17055;
}

.balance-amount {
    color: #74b9ff;
}

.profit-value {
    color: #00b894;
    font-weight: bold;
}

.loss-value {
    color: #e17055;
    font-weight: bold;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid #dee2e6;
    border-radius: 15px 15px 0 0 !important;
    padding: 1rem 1.5rem;
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    color: #2c3e50;
}

.card-header h5 i {
    margin-left: 0.5rem;
    color: #3498db;
}

/* Tables */
.table {
    margin: 0;
}

.table th {
    border-top: none;
    font-weight: 600;
    color: #2c3e50;
    background: #f8f9fa;
}

.table td {
    vertical-align: middle;
    border-top: 1px solid #f1f3f4;
}

.table-hover tbody tr:hover {
    background: rgba(52, 152, 219, 0.05);
}

/* Badges */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-right: 4px solid #3498db;
}

.stat-label {
    font-weight: 500;
    color: #666;
}

.stat-value {
    font-weight: bold;
    font-size: 1.1rem;
}

.income-value {
    color: #00b894;
}

.expense-value {
    color: #e17055;
}

/* Forms */
.form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f5f8b);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #00b894, #00a085);
}

.btn-success:hover {
    background: linear-gradient(135deg, #00a085, #008f7a);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #e17055, #d63031);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #d63031, #c0392b);
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid rgba(255,255,255,0.5);
    color: white;
}

.btn-outline-light:hover {
    background: rgba(255,255,255,0.1);
    border-color: white;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    padding: 1.5rem 0;
    margin-top: auto;
}

/* Gender-specific styles */
.male-style {
    background: linear-gradient(135deg, #3498db, #2980b9);
}

.female-style {
    background: linear-gradient(135deg, #e91e63, #c2185b);
}

/* Responsive Design */
@media (max-width: 768px) {
    .logo h1 {
        font-size: 1.4rem;
    }
    
    .user-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .welcome-text {
        font-size: 1rem;
    }
    
    .card-amount {
        font-size: 1.5rem;
    }
    
    .dashboard-card .card-body {
        padding: 1.5rem;
    }
    
    .stat-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 1rem 0;
    }
    
    .logo {
        flex-direction: column;
        text-align: center;
    }
    
    .navbar-nav .nav-link {
        text-align: center;
        margin: 0.25rem 0;
    }
}

/* Print Styles */
@media print {
    .header, .navbar, .footer {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .dashboard-card {
        break-inside: avoid;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, #00b894, #00a085);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #e17055, #d63031);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, #fdcb6e, #e17055);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, #74b9ff, #0984e3);
    color: white;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.modal-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-title {
    font-weight: 600;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #3498db;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
} 