/* فونت‌ها */
@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir.eot');
    src: url('../fonts/Vazir.eot?#iefix') format('embedded-opentype'),
    url('../fonts/Vazir.woff2') format('woff2'),
    url('../fonts/Vazir.woff') format('woff'),
    url('../fonts/Vazir.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

:root {
    --primary-color: #FF5722;
    --secondary-color: #FF7043;
    --light-gray: #f5f5f5;
    --dark-gray: #333;
    --medium-gray: #999;
    --border-radius: 10px;
    --text-color: #333;
    --light-text: #777;
    --bg-color: #f5f5f5;
    --card-radius: 16px;
    --item-radius: 12px;
}

/* استایل‌های پایه */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazir', Tahoma, Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    direction: rtl;
    text-align: right;
    padding-bottom: 70px;
}

/* هدر */
.app-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-right {
    display: flex;
    align-items: center;
}

.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    margin-left: 10px;
    padding: 0;
}

.header-title {
    font-size: 1.1rem;
    font-weight: 500;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-icon {
    background: none;
    border: none;
    color: white;
    font-size: 1.1rem;
    margin-right: 15px;
    padding: 0;
}

/* منوی کناری */
.sidebar {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background-color: white;
    z-index: 1000;
    transition: right 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
}

.sidebar.active {
    right: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background-color: var(--primary-color);
    color: white;
}

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

.sidebar-close {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    background: none;
    color: white;
    padding: 0;
}

.sidebar-menu {
    padding: 15px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.sidebar-item:hover {
    background-color: #f9f9f9;
}

.sidebar-item.active {
    background-color: #fff5f2;
    font-weight: 500;
    color: var(--primary-color);
}

.sidebar-item.active i {
    color: var(--primary-color);
}

.sidebar-item i {
    margin-left: 15px;
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    color: #666;
}

/* منوی عملیات سریع */
.quick-action-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.3s ease;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: flex-end;
}

.quick-action-menu.active {
    opacity: 1;
}

.quick-action-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    right: 0;
    bottom: 0;
}

.quick-action-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    border-radius: 20px 20px 0 0;
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.quick-action-menu.active .quick-action-panel {
    transform: translateY(0);
}

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

.quick-action-header h5 {
    font-size: 1.1rem;
    margin: 0;
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.quick-action-grid-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.grid-item-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.expense-bg {
    background-color: #FFEBEE;
    color: #F44336;
}

.income-bg {
    background-color: #E8F5E9;
    color: #4CAF50;
}

.transfer-bg {
    background-color: #E3F2FD;
    color: #2196F3;
}

.person-bg {
    background-color: #FFF3E0;
    color: #FF9800;
}

.account-bg {
    background-color: #F3E5F5;
    color: #9C27B0;
}

.category-bg {
    background-color: #E0F2F1;
    color: #009688;
}

.grid-item-label {
    font-size: 0.9rem;
    text-align: center;
}

/* استایل‌های صفحه داشبورد */
.dashboard-container {
    padding-bottom: 20px;
}

/* بخش حساب‌ها */
.accounts-section {
    margin-bottom: 20px;
}

.accordion-item {
    border: none;
    background-color: transparent;
}

.accordion-button {
    padding: 10px;
    background-color: transparent;
    box-shadow: none;
}

.accordion-button::after {
    display: none;
}

.accordion-button i {
    transition: transform 0.3s ease;
}

.accordion-button.collapsed i {
    transform: rotate(180deg);
}

.account-cards {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 5px 0;
    margin-bottom: 15px;
}

.account-card {
    flex: 0 0 auto;
    width: 48%;
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.account-type {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.account-balance {
    display: flex;
    flex-direction: column;
}

.balance {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.currency {
    font-size: 0.7rem;
    color: #999;
}

/* بخش عملیات */
.operations-section {
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.operations-title {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #333;
}

.operations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.operation-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
}

.operation-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.operation-icon.expense {
    background-color: #FF5722;
    color: white;
}

.operation-icon.income {
    background-color: #4CAF50;
    color: white;
}

.operation-icon.transfer {
    background-color: #2196F3;
    color: white;
}

.operation-icon.report {
    background-color: #9C27B0;
    color: white;
}

.operation-label {
    font-size: 0.8rem;
    color: #333;
}

/* بخش هزینه‌های پرکاربرد */
.frequent-expenses {
    margin: 20px 0;
}

.section-title {
    font-size: 1rem;
    margin-bottom: 15px;
    color: #333;
}

.expenses-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.expense-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.expense-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.expense-name {
    font-size: 0.7rem;
    color: #666;
    text-align: center;
}

/* بخش توزیع هزینه‌ها */
.expense-distribution {
    margin: 20px 0;
    background-color: white;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chart-container {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.donut-chart {
    position: relative;
    width: 200px;
    height: 200px;
}

.chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.chart-value {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.chart-label {
    font-size: 0.8rem;
    color: #999;
}

/* بخش آخرین تراکنش‌ها */
.latest-transactions {
    margin: 20px 0;
}

.transactions-list {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.transaction-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f1f1f1;
}

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

.transaction-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    margin-left: 15px;
    background-color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.transaction-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.transaction-details {
    flex: 1;
}

.transaction-title {
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.transaction-date {
    font-size: 0.75rem;
    color: #999;
}

.transaction-amount {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.transaction-amount.expense {
    color: #FF5722;
}

.transaction-amount.income {
    color: #4CAF50;
}

.amount {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 3px;
}

.d-none {
    display: none !important;
}
