:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --dark-color: #34495e;
    --light-color: #ecf0f1;
    --border-color: #ddd;
    --text-color: #333;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: var(--text-color);
    direction: rtl;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

header h1 {
    font-size: 1.5rem;
    color: var(--dark-color);
}

#user-info {
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.balance-card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.balance-card h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.balance-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.label {
    font-weight: 500;
}

.amount {
    font-weight: bold;
    font-size: 1.1rem;
}

.currency {
    color: #777;
    margin-right: 5px;
}

.net-balance {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--border-color);
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    flex: 1;
    text-align: center;
}

.btn:active {
    transform: scale(0.98);
}

.primary {
    background-color: var(--primary-color);
    color: white;
}

.primary:hover {
    background-color: #2980b9;
}

.secondary {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.secondary:hover {
    background-color: #bdc3c7;
}

.danger {
    background-color: var(--danger-color);
    color: white;
}

.danger:hover {
    background-color: #c0392b;
}

.success {
    background-color: var(--secondary-color);
    color: white;
}

.success:hover {
    background-color: #27ae60;
}

.tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 15px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #777;
    position: relative;
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content h2 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.requests-list, .history-list {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--shadow);
}

.request-item, .history-item {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.request-item:last-child, .history-item:last-child {
    border-bottom: none;
}

.request-header, .history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.request-amount, .history-amount {
    font-weight: bold;
    color: var(--primary-color);
}

.request-date, .history-date {
    font-size: 0.8rem;
    color: #777;
}

.request-status, .history-status {
    font-size: 0.9rem;
    padding: 3px 8px;
    border-radius: 15px;
    display: inline-block;
}

.status-pending {
    background-color: #f8f9fa;
    color: var(--warning-color);
    border: 1px solid var(--warning-color);
}

.status-completed {
    background-color: #f8f9fa;
    color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

.status-rejected {
    background-color: #f8f9fa;
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

.request-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.empty-state {
    text-align: center;
    padding: 30px;
    color: #777;
    font-style: italic;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #777;
}

.modal h2 {
    margin-bottom: 20px;
    text-align: center;
    color: var(--dark-color);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
}

.amount-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.amount-btn {
    padding: 8px 12px;
    background-color: var(--light-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    flex-grow: 1;
    text-align: center;
}

.amount-btn:hover {
    background-color: #ddd;
}

/* Responsive Adjustments */
@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    header h1 {
        font-size: 1.3rem;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
    }
}
