/* * Modern Accounting Style - Vazir Font & Professional UI
 * Version: 3.0 (Modernized)
 */
/* =========================================
   مخفی‌سازی کامل هدر و فوتر قالب (Desktop & Mobile)
   ========================================= */

/* لیست جامع برای مخفی کردن هدر و فوتر در اکثر قالب‌ها */
header,                      /* تگ استاندارد هدر HTML5 */
footer,                      /* تگ استاندارد فوتر HTML5 */
#header, #footer,            /* شناسه‌های کلاسیک */
.site-header, .site-footer,  /* کلاس‌های استاندارد وردپرس */
#masthead, #colophon,        /* شناسه‌های قالب‌های پیش‌فرض وردپرس (Twenty Series) */
.main-header, .main-footer,  /* کلاس‌های عمومی */
.top-bar, .top-header,       /* نوارهای ابزار بالا */
.copyright-bar, .site-info,  /* بخش کپی‌رایت */
.elementor-location-header,  /* هدرهای ساخته شده با المنتور */
.elementor-location-footer,  /* فوترهای ساخته شده با المنتور */
#main-header,                /* قالب Divi */
.fusion-header-wrapper,      /* قالب Avada */
.fusion-footer,              /* قالب Avada */
.mob-menu-header-holder      /* منوهای موبایل متفرقه */
{
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* حذف فاصله‌های احتمالی که قالب به بدنه سایت می‌دهد */
html, body.page-template-default, body.page {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* اگر قالب شما نوار ادمین وردپرس (نوار سیاه بالا) را نمایش می‌دهد و می‌خواهید آن را هم در موبایل مخفی کنید */
@media screen and (max-width: 600px) {
    #wpadminbar {
        display: none !important;
    }
    html {
        margin-top: 0 !important;
    }
}

/* اطمینان از اینکه کانتینر افزونه تمام صفحه را پر می‌کند */
.accounting-wrapper {
    min-height: 100vh;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

/* اگر قالب شما از کلاس‌های خاص دیگری استفاده می‌کند، می‌توانید با Inspect Element پیدا کرده و اینجا اضافه کنید */

.accounting-wrapper {
    /* متغیرهای رنگی برای تغییر آسان تم */
    --primary-color: #2c3e50;       /* آبی نفتی تیره برای متون و هدرها */
    --accent-color: #3498db;        /* آبی روشن برای دکمه‌های اصلی */
    --accent-hover: #2980b9;
    --success-color: #27ae60;       /* سبز ملایم و حرفه‌ای */
    --danger-color: #e74c3c;        /* قرمز مات */
    --warning-color: #f39c12;       /* نارنجی */
    --bg-body: #f4f6f9;             /* پس‌زمینه کلی */
    --bg-card: #ffffff;             /* پس‌زمینه کارت‌ها */
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #e2e8f0;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.02);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.04);
    
    font-family: 'Vazir', Tahoma, sans-serif;
    direction: rtl;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.8;
    padding: 20px;
    min-height: 100vh;
}

.accounting-wrapper *, .accounting-wrapper *:before, .accounting-wrapper *:after {
    box-sizing: border-box;
}

/* --- Layout & Containers --- */

.accounting-wrapper .container-fluid, 
.accounting-wrapper .container {
    background-color: var(--bg-card);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    border: 1px solid var(--border-color);
}

/* هدرهای بخش‌ها */
.accounting-wrapper h3 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    display: inline-block;
}

/* باکس‌های اطلاعاتی (مثل هدر مشتری) */
.accounting-wrapper .cudetail {
    background: linear-gradient(135deg, #2c3e50, #4ca1af) !important; /* گرادینت مدرن */
    color: #fff !important;
    border-radius: var(--radius-md);
    padding: 20px !important;
    margin-bottom: 25px !important;
    box-shadow: 0 10px 20px rgba(44, 62, 80, 0.2);
    border: none !important;
}

.accounting-wrapper .cudetail span {
    color: #fff !important;
    font-size: 0.95rem;
}

/* --- Forms & Inputs --- */

.accounting-wrapper input[type="text"], 
.accounting-wrapper input[type="password"], 
.accounting-wrapper input[type="number"],
.accounting-wrapper input[type="file"],
.accounting-wrapper select,
.accounting-wrapper textarea,
.accounting-wrapper .p_input,
.accounting-wrapper .navbarinput {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #cbd5e0;
    background-color: #fff;
    color: var(--text-main);
    font-family: inherit;
    width: 100%;
    max-width: 100%;
    outline: none;
    transition: all 0.2s ease;
    box-shadow: none;
    font-size: 14px;
}

.accounting-wrapper input:focus,
.accounting-wrapper select:focus,
.accounting-wrapper textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

/* استایل فرم‌های داخل کادر */
.accounting-wrapper .form_content {
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-sm);
    background: #fff !important;
    padding: 30px !important;
}

/* --- Buttons --- */

.accounting-wrapper button, 
.accounting-wrapper .button, 
.accounting-wrapper input[type="submit"],
.navbarbutton, 
.submit_btn,
.accounting-wrapper a.button {
    padding: 10px 24px;
    border-radius: 8px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin: 5px;
}

.accounting-wrapper button:hover, 
.accounting-wrapper .button:hover,
.accounting-wrapper input[type="submit"]:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* دکمه‌های خاص */
.accounting-wrapper .submit_btn {
    background-color: var(--success-color) !important;
    border: none !important;
    width: auto;
    min-width: 120px;
}

.accounting-wrapper .submit_btn:hover {
    background-color: #219150 !important;
}

/* دکمه‌های آیکون دار کوچک */
.accounting-wrapper button i,
.accounting-wrapper .button i {
    font-size: 1.1em;
}

/* --- Tables (Modern & Clean) --- */

.accounting-wrapper .table-container {
    overflow-x: auto;
    background: transparent;
    box-shadow: none;
    padding: 0;
    margin-top: 20px;
}

.accounting-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.accounting-wrapper th {
    background-color: #f8fafc;
    color: var(--text-muted);
    padding: 15px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    text-align: center;
}

.accounting-wrapper td {
    padding: 14px 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
    text-align: center;
    font-size: 13.5px;
}

/* حذف استایل‌های اینلاین رنگی جداول قدیمی */
/* .accounting-wrapper table td[style*="background"] {
    background-color: transparent !important; /* اجبار به حذف رنگ پس‌زمینه اینلاین */
} */

/* راه راه کردن جدول */
.accounting-wrapper tr:nth-child(even) {
    background-color: #fcfcfc;
}

/* .accounting-wrapper tr:hover td {
    background-color: #f1f5f9 !important;
} */

.accounting-wrapper tr:last-child td {
    border-bottom: none;
}

/* آیکون‌های عملیات در جدول */
.accounting-wrapper td i {
    font-size: 18px;
    margin: 0 5px;
    transition: transform 0.2s;
    cursor: pointer;
}
.accounting-wrapper td i:hover {
    transform: scale(1.2);
}

/* --- Pagination --- */
.accounting-wrapper .pagination a {
    background: #fff !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color) !important;
    margin: 0 3px;
    border-radius: 6px !important;
    transition: all 0.2s;
    box-shadow: none !important;
}

.accounting-wrapper .pagination a:hover,
.accounting-wrapper .pagination a[style*="background-color:white"] { /* حالت فعال */
    background-color: var(--accent-color) !important;
    color: #fff !important;
    border-color: var(--accent-color) !important;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .accounting-wrapper .container-fluid {
        padding: 15px;
    }
    .accounting-wrapper .buttons {
        display: flex;
        flex-direction: column;
    }
    .accounting-wrapper .buttons a {
        width: 100%;
        margin: 5px 0;
    }
    .accounting-wrapper table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* --- Utility Classes for Status Colors --- */
.status-paid { color: var(--success-color); font-weight: bold; }
.status-unpaid { color: var(--danger-color); font-weight: bold; }
.text-ltr { direction: ltr; display: inline-block; }


/* --- استایل‌های جدید ریسپانسیو --- */

/* زیبا کردن جدول‌ها در دسکتاپ */
.accounting-wrapper .table {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    margin-bottom: 1rem;
    vertical-align: middle;
}
.accounting-wrapper .table thead {
    background-color: #f8f9fa;
    color: #555;
}

/* تبدیل جدول به کارت در موبایل (عرض کمتر از 768px) */
@media screen and (max-width: 768px) {
    .accounting-wrapper .responsive-table {
        border: 0;
    }
    .accounting-wrapper .responsive-table thead {
        display: none; /* مخفی کردن هدر جدول */
    }
    .accounting-wrapper .responsive-table tr {
        display: block;
        margin-bottom: 15px;
        background: #fff;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        border: 1px solid #eee;
    }
    .accounting-wrapper .responsive-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        border-bottom: 1px solid #f0f0f0;
        padding: 12px 15px;
        font-size: 14px;
    }
    .accounting-wrapper .responsive-table td:last-child {
        border-bottom: 0;
    }
    /* نمایش عنوان ستون در سمت راست */
    .accounting-wrapper .responsive-table td::before {
        content: attr(data-label);
        font-weight: bold;
        float: right;
        color: #777;
        margin-left: 10px;
    }
    /* اصلاح نمایش دکمه‌ها در موبایل */
    .accounting-wrapper .responsive-table td:last-child {
        justify-content: center;
        background-color: #fcfcfc;
    }
}

