/* ============================================================
   استایل اصلی سیستم حسابداری (style.css)
   طراحی ساده، تمیز و واکنش‌گرا برای موبایل و دسکتاپ
   ============================================================ */

/* ---------- تنظیمات پایه ---------- */
/* بازنشانی پیش‌فرض‌های مرورگر */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* تنظیمات کلی بدنه صفحه */
body {
    font-family: var(--font-family, 'Vazirmatn'), 'Tahoma', sans-serif;
    background: var(--bg-color, #f4f6f9);
    color: var(--text-color, #1f2937);
    line-height: 1.6;
    direction: rtl;
}

/* ---------- نوار بالا (هدر) ---------- */
.topbar {
    background: var(--primary, #1e3a8a);
    color: #fff;
    padding: 0 16px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* تاریخ و ساعت در نوار بالا */
.topbar-date {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.8rem;
    color: #dbeafe;
    white-space: nowrap;
}

/* متن تاریخ */
.date-text {
    display: inline-block;
}

/* متن ساعت */
.clock-text {
    background: rgba(255, 255, 255, 0.15);
    padding: 2px 10px;
    border-radius: 6px;
    font-weight: bold;
    direction: ltr;
}

/* ---------- نوار حالت نمایش (ریسپانسیو) ---------- */
.resp-bar {
    background: #111827;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* برچسب حالت نمایش */
.resp-label {
    color: #9ca3af;
    margin-left: 4px;
}

/* دکمه حالت نمایش */
.resp-btn {
    color: #d1d5db;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid #374151;
    transition: background 0.2s;
}

/* دکمه فعال حالت نمایش */
.resp-btn.active {
    background: var(--primary, #1e3a8a);
    border-color: var(--primary, #1e3a8a);
    color: #fff;
}

/* حالت هاور دکمه حالت نمایش */
.resp-btn:hover:not(.active) {
    background: #374151;
}

/* ---------- حالت‌های ریسپانسیو (عرض کانتینر) ---------- */
/* موبایل عمودی */
body.mode-mobile .container { max-width: 480px; }
body.mode-mobile .cards-row { grid-template-columns: 1fr; }
/* موبایل افقی */
body.mode-mobile-l .container { max-width: 700px; }
body.mode-mobile-l .cards-row { grid-template-columns: repeat(2, 1fr); }
/* تبلت عمودی */
body.mode-tablet-p .container { max-width: 720px; }
/* تبلت افقی */
body.mode-tablet-l .container { max-width: 960px; }
/* دسکتاپ (پیش‌فرض) */
body.mode-desktop .container { max-width: 1100px; }
/* عریض */
body.mode-wide .container { max-width: 1600px; }
body.mode-wide .two-col { grid-template-columns: 1fr 1fr; }


/* فضای داخلی نوار بالا */
.topbar-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 8px;
}

/* نام برند در نوار بالا */
.brand {
    font-size: 1.2rem;
    font-weight: bold;
}

/* سرعت بارگذاری صفحه در کنار نام فروشگاه */
.load-speed {
    font-size: 0.78rem;
    color: #93c5fd;
    background: rgba(255, 255, 255, 0.12);
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* منوی ناوبری */
.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* هر لینک منو */
.nav-link {
    color: #dbeafe;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

/* حالت هاور لینک منو */
.nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* دکمه اعلان در منو */
.btn-notif {
    background: rgba(16, 185, 129, 0.25);
    border: 1px solid rgba(16, 185, 129, 0.5);
    color: #d1fae5;
}
.btn-notif:hover {
    background: rgba(16, 185, 129, 0.4);
    color: #fff;
}

/* دکمه خروج */
.btn-logout {
    background: #dc2626;
    color: #fff;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem;
}

/* ---------- کانتینر اصلی ---------- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* ---------- کارت‌ها ---------- */
.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* عنوان کارت */
.card-title {
    font-size: 1.05rem;
    color: var(--primary, #1e3a8a);
    margin-bottom: 14px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

/* عنوان بخش امنیت ورود در تنظیمات */
.sec-title {
    margin-top: 8px;
    color: #b45309;
    border-bottom-color: #fcd34d;
}

/* ---------- ردیف کارت‌های آماری ---------- */
.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

/* کارت آماری */
.stat-card {
    text-align: center;
    padding: 18px;
}

/* برچسب آمار */
.stat-label {
    display: block;
    color: #6b7280;
    font-size: 0.85rem;
    margin-bottom: 6px;
}

/* مقدار آمار */
.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 4px;
}

/* واحد آمار */
.stat-unit {
    color: #9ca3af;
    font-size: 0.8rem;
}

/* رنگ سبز برای اعداد مثبت (دریافتی/سود) */
.stat-green { color: #16a34a; }

/* رنگ قرمز برای اعداد منفی (هزینه/زیان) */
.stat-red { color: #dc2626; }

/* رنگ آبی برای تعداد تسک‌ها */
.stat-blue { color: #2563eb; }

/* ---------- رنگ اعداد داخل جداول ---------- */
.num-green { color: #16a34a; font-weight: bold; }
.num-red { color: #dc2626; font-weight: bold; }

/* ---------- دو ستون ---------- */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ---------- جدول‌ها ---------- */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

/* سلول‌های جدول */
.table th,
.table td {
    padding: 10px 8px;
    text-align: right;
    border-bottom: 1px solid #e5e7eb;
}

/* هدر جدول */
.table th {
    background: #f9fafb;
    color: #374151;
    font-weight: 600;
}

/* حالت هاور ردیف جدول */
.table tbody tr:hover {
    background: #f9fafb;
}

/* ---------- فرم‌ها ---------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

/* گروه فیلد فرم */
.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 5px;
    color: #374151;
}

/* راهنمای کوچک زیر فیلدها */
.form-hint {
    display: block;
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* جستجوی مشتری در فرم ثبت کار */
.customer-search-wrap input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    font-family: inherit;
    color: var(--text-color, #1f2937);
}

.customer-search-wrap input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* ورودی‌های فرم */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    font-family: inherit;
    color: var(--text-color, #1f2937);
}

/* تمرکز روی ورودی فرم */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* فیلد تمام‌عرض */
.full-width {
    grid-column: 1 / -1;
}

/* فیلد چسبیده به پایین (برای دکمه) */
.align-end {
    display: flex;
    align-items: flex-end;
}

/* گروه دکمه‌ها (همسطح و هم‌اندازه) */
.btn-group {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

/* دکمه‌های داخل گروه هم‌اندازه می‌شوند */
.btn-group .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    white-space: nowrap;
}

/* ---------- بخش لوازم (چندخطی) ---------- */
.levazem-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

/* قاب لوازم مخصوص هر کار */
.levazem-section {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    margin-top: 10px;
}

/* برچسب لوازم */
.levazem-label {
    display: block;
    font-size: 0.8rem;
    font-weight: bold;
    color: #475569;
    margin-bottom: 8px;
}

/* قاب کار چندتایی */
.karha-row {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 14px;
    position: relative;
}

/* فیلدهای داخل هر کار (چیدمان شبکه‌ای) */
.karha-fields {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 10px;
}

/* فیلدهای داخل کار */
.karha-fields .form-group {
    min-width: 0;
}

/* دکمه حذف کل کار */
.btn-remove-karha {
    margin-top: 10px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
}

/* دکمه کوچک */
.btn-sm {
    font-size: 0.8rem;
    padding: 6px 12px;
}

/* فیلد نام لوازم */
.levazem-name {
    flex: 2;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    font-family: inherit;
}

/* فیلد قیمت لوازم */
.levazem-price {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    font-family: inherit;
}

/* دکمه حذف خط لوازم */
.btn-remove {
    width: 34px;
    height: 38px;
    border: none;
    border-radius: 8px;
    background: #fee2e2;
    color: #dc2626;
    font-size: 1rem;
    cursor: pointer;
}

/* واکنش‌گرایی قاب کار در موبایل */
@media (max-width: 768px) {
    /* فیلدهای کار در موبایل دو ستونه می‌شوند */
    .karha-fields {
        grid-template-columns: 1fr 1fr;
    }
    /* فیلد عنوان کار تمام‌عرض */
    .karha-fields .form-group:first-child {
        grid-column: 1 / -1;
    }
}

/* دکمه افزودن لوازم در فرم کار */
.btn-levazem-add {
    margin-top: 6px;
}

/* ---------- برچسب‌های کار ---------- */
.task-customer {
    display: block;
    font-size: 0.8rem;
    color: #2563eb;
    margin-top: 3px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.task-price {
    display: block;
    font-size: 0.8rem;
    color: #1e3a8a;
    font-weight: bold;
    margin-top: 3px;
}

.task-paid {
    display: inline-block;
    font-size: 0.75rem;
    color: #166534;
    background: #dcfce7;
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 3px;
}

.task-unpaid {
    display: inline-block;
    font-size: 0.75rem;
    color: #991b1b;
    background: #fee2e2;
    padding: 2px 8px;
    border-radius: 6px;
    margin-top: 3px;
}

.task-amount {
    display: block;
    font-size: 0.8rem;
    color: #374151;
    margin-top: 3px;
}

.task-levazem {
    display: block;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 3px;
}

/* لوکیشن محل انجام کار در لیست کارها */
.task-location {
    display: block;
    font-size: 0.8rem;
    color: #2563eb;
    margin-top: 3px;
    text-decoration: none;
}

.task-location:hover {
    text-decoration: underline;
}

/* ---------- دکمه‌ها ---------- */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: opacity 0.2s;
}

/* دکمه اصلی */
.btn-primary {
    background: var(--primary, #1e3a8a);
    color: #fff;
}

/* دکمه ثانویه */
.btn-secondary {
    background: #6b7280;
    color: #fff;
}

/* دکمه تمام‌عرض */
.btn-block {
    width: 100%;
}

/* حالت هاور دکمه */
.btn:hover {
    opacity: 0.9;
}

/* دکمه حذف */
.btn-delete {
    color: #dc2626;
    text-decoration: none;
    font-size: 0.85rem;
    margin-left: 8px;
}

/* دکمه ویرایش */
.btn-edit {
    color: #2563eb;
    text-decoration: none;
    font-size: 0.85rem;
    margin-left: 8px;
}

/* دکمه ویرایش کار در لیست کارها */
.btn-edit-task {
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-left: 8px;
}

/* دکمه انجام شد (تسک) */
.btn-done {
    background: #16a34a;
    color: #fff;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-left: 8px;
}

/* دکمه بازگردانی تسک */
.btn-undo {
    background: #f59e0b;
    color: #fff;
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-left: 8px;
}

/* ---------- پیام‌ها (آلرت) ---------- */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* پیام موفقیت */
.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

/* پیام خطا */
.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ---------- کارت رمز روزانه ---------- */
.ramz-card {
    text-align: center;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #fff;
}

/* عنوان رمز روزانه */
.ramz-title {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 6px;
}

/* مقدار رمز روزانه */
.ramz-value {
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: 3px;
    margin-bottom: 10px;
    direction: ltr;
}

/* ---------- لیست تسک‌ها ---------- */
.task-list {
    list-style: none;
}

/* هر آیتم تسک */
.task-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    margin-bottom: 10px;
    background: #fafafa;
    color: var(--text-color, #1f2937);
}

/* اطلاعات تسک (عنوان + مشتری + ...) */
.task-info {
    flex: 1;
    min-width: 0;
    color: var(--text-color, #1f2937);
}

/* آیتم تسک انجام شده (متن کمرنگ) */
.task-done {
    opacity: 0.6;
}

/* عنوان تسک */
.task-title {
    font-weight: 500;
    display: block;
    color: var(--text-color, #1f2937);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* تاریخ سررسید تسک */
.task-deadline {
    display: block;
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 3px;
}

/* کنار هم قرار دادن دکمه‌های تسک */
.task-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.task-actions .btn-edit-task,
.task-actions .btn-done,
.task-actions .btn-delete,
.task-actions .btn-undo {
    min-width: 76px;
    text-align: center;
    justify-content: center;
}

@media (max-width: 480px) {
    .task-item {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .task-actions {
        justify-content: stretch;
    }
    .task-actions .btn-edit-task,
    .task-actions .btn-done,
    .task-actions .btn-delete,
    .task-actions .btn-undo {
        flex: 1 1 0;
        min-width: 0;
    }
}

/* ---------- متن خالی ---------- */
.empty-text {
    color: #9ca3af;
    text-align: center;
    padding: 20px 0;
}

/* ---------- قاب جدول (اسکرول افقی در موبایل) ---------- */
.table-wrap {
    overflow-x: auto;
}

/* ---------- نوار صفحه‌بندی ---------- */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
}

/* بخش انتخاب تعداد در صفحه */
.per-page {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.85rem;
    color: #6b7280;
}

/* لینک‌های انتخاب تعداد */
.per-page a {
    text-decoration: none;
    color: #374151;
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: background 0.2s;
}

/* حالت انتخاب شده لینک تعداد */
.per-page a.active {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}

/* حالت هاور لینک تعداد */
.per-page a:hover:not(.active) {
    background: #f3f4f6;
}

/* بخش دکمه‌های صفحه‌ها */
.page-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

/* لینک شماره صفحه */
.page-link {
    text-decoration: none;
    color: #374151;
    padding: 4px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: background 0.2s;
}

/* حالت انتخاب شده شماره صفحه */
.page-link.active {
    background: #1e3a8a;
    color: #fff;
    border-color: #1e3a8a;
}

/* حالت غیرفعال (قبلی/بعدی در ابتدا و انتها) */
.page-link.disabled {
    color: #9ca3af;
    background: #f3f4f6;
    cursor: not-allowed;
}

/* سه‌نقطه بین صفحات */
.page-dots {
    color: #9ca3af;
    padding: 0 4px;
}

/* حالت هاور شماره صفحه */
.page-link:hover:not(.active):not(.disabled) {
    background: #eef2ff;
}

/* ---------- فوتر ---------- */
.footer {
    text-align: center;
    padding: 20px;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* ---------- صفحه ورود ---------- */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
}

/* جعبه ورود */
.login-box {
    background: #fff;
    border-radius: 16px;
    padding: 36px 30px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* عنوان صفحه ورود */
.login-title {
    text-align: center;
    color: #1e3a8a;
    margin-bottom: 4px;
}

/* زیرعنوان صفحه ورود */
.login-subtitle {
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ---------- واکنش‌گرایی (ریسپانسیو) ---------- */
/* در صفحه‌های باریک (موبایل) */
@media (max-width: 768px) {
    /* منو به صورت عمودی و با اسکرول افقی قرار می‌گیرد */
    .nav {
        width: 100%;
        order: 3;
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 6px;
    }

    /* دو ستون به یک ستون تبدیل می‌شود */
    .two-col {
        grid-template-columns: 1fr;
    }

    /* ردیف کارت‌های آماری */
    .cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* در صفحه‌های خیلی باریک */
@media (max-width: 480px) {
    /* کارت‌های آماری یک ستونه */
    .cards-row {
        grid-template-columns: 1fr;
    }

    /* جدول‌ها اسکرول افقی می‌شوند */
    .table-wrap {
        overflow-x: auto;
    }
}

/* ---------- پالت رنگ تنظیمات ---------- */
.color-palette {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* هر دکمه رنگ در پالت */
.palette-color {
    width: 36px;
    height: 36px;
    border: 2px solid #fff;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
    transition: transform 0.15s;
}

/* حالت هاور دکمه رنگ */
.palette-color:hover {
    transform: scale(1.15);
}

/* ---------- فاکتور ---------- */
/* ردیف آیتم فاکتور */
.factor-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}

/* فیلد شرح آیتم فاکتور */
.factor-desc {
    flex: 3;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    font-family: inherit;
}

/* فیلد تعداد آیتم فاکتور */
.factor-qty {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    font-family: inherit;
}

/* فیلد قیمت آیتم فاکتور */
.factor-price {
    flex: 1.5;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.95rem;
    background: #fff;
    font-family: inherit;
}

/* قاب پیش‌نمایش فاکتور */
.invoice-preview-wrap {
    margin-top: 16px;
    overflow-x: auto;
    padding: 16px 0;
}

/* خود فاکتور */
.invoice {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 24px;
    max-width: 700px;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s;
}

/* سربرگ فاکتور */
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 2px solid #1e293b;
    padding-bottom: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

/* عنوان سربرگ فاکتور */
.invoice-header h2 {
    font-size: 1.3rem;
    color: #1e293b;
}

/* اطلاعات فاکتور */
.invoice-meta {
    font-size: 0.85rem;
    color: #475569;
    text-align: left;
    line-height: 1.8;
}

/* جدول فاکتور */
.invoice-table {
    margin: 0;
}

/* جدول فاکتور در حالت عمودی با عرض کامل */
.invoice-table th,
.invoice-table td {
    font-size: 0.9rem;
}

/* توضیحات فاکتور */
.invoice-note {
    margin-top: 12px;
    font-size: 0.85rem;
    color: #475569;
    border-top: 1px dashed #cbd5e1;
    padding-top: 10px;
}

/* ---------- صفحه گفتگوها (goftoguha.php) ---------- */
.chat-hint {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 16px;
    line-height: 1.8;
}

.chat-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    line-height: 1.9;
}

.chat-box h3 {
    color: #1e3a8a;
    font-size: 1rem;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.chat-box ul.chat-log {
    list-style: none;
    margin: 0 0 16px;
    padding: 0;
}

.chat-box ul.chat-log li {
    position: relative;
    padding: 10px 14px 10px 28px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-right: 3px solid #2563eb;
    border-radius: 8px;
    font-size: 0.88rem;
    color: #334155;
}

.chat-box ul.chat-log li::before {
    content: '▸';
    position: absolute;
    right: 10px;
    top: 10px;
    color: #2563eb;
    font-size: 0.9rem;
}

.chat-box ul.chat-log li b {
    color: #1e3a8a;
}

.chat-box code {
    background: #eef2ff;
    color: #3730a3;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.85rem;
    direction: ltr;
    display: inline-block;
}

/* ---------- تقویم شمسی (jalali-picker) ---------- */
.jalali-picker {
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 8px;
    width: 240px;
    z-index: 9999;
    direction: rtl;
    user-select: none;
}

/* سربرگ تقویم (ماه و سال و دکمه‌های رفتن) */
.jalali-picker .jp-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

/* عنوان ماه و سال */
.jalali-picker .jp-title {
    font-weight: bold;
    font-size: 0.9rem;
}

/* دکمه رفتن به ماه قبل/بعد */
.jalali-picker .jp-nav {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    color: #374151;
}

.jalali-picker .jp-nav:hover {
    background: #e5e7eb;
}

/* ردیف روزهای هفته */
.jalali-picker .jp-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 4px;
}

.jalali-picker .jp-week span {
    padding: 2px 0;
}

/* شبکه روزهای ماه */
.jalali-picker .jp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    text-align: center;
}

.jalali-picker .jp-grid span {
    padding: 5px 0;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: default;
}

/* خانه‌های قابل کلیک روز */
.jalali-picker .jp-day {
    cursor: pointer;
}

.jalali-picker .jp-day:hover {
    background: #dbeafe;
    color: #1e3a8a;
}

/* هایلایت امروز */
.jalali-picker .jp-today-mark {
    background: #1e3a8a;
    color: #fff;
    font-weight: bold;
}

/* پانویس تقویم (دکمه امروز) */
.jalali-picker .jp-foot {
    text-align: center;
    margin-top: 6px;
}

.jalali-picker .jp-today {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    padding: 4px 14px;
    cursor: pointer;
    font-size: 0.8rem;
    color: #3730a3;
}

.jalali-picker .jp-today:hover {
    background: #e0e7ff;
}

/* ---------- انتخاب لوکیشن روی نقشه ---------- */
/* ردیف فیلد لوکیشن (فیلد آدرس + دکمه نقشه) */
.loc-row {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* فیلد آدرس لوکیشن که با کلیک روی نقشه پر می‌شود */
.loc-row .loc-text {
    flex: 1;
}

/* دکمه باز کردن نقشه */
.map-picker-btn {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    white-space: nowrap;
}

.map-picker-btn:hover {
    background: #e0e7ff;
}

/* لینک مشاهده لوکیشن ثبت شده روی نقشه */
.loc-link {
    margin-top: 6px;
    font-size: 0.85rem;
    display: none;
    text-decoration: none;
}

/* پنجره نقشه */
.map-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 12px;
}

/* جعبه پنجره نقشه */
.map-modal-box {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 92vh;
    overflow: auto;
    padding: 12px;
}

/* سربرگ پنجره نقشه */
.map-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 10px;
}

/* دکمه بستن پنجره */
.map-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #6b7280;
    line-height: 1;
}

/* بخش نقشه */
.map-modal-map {
    height: 380px;
    border-radius: 8px;
}

/* راهنمای پنجره نقشه */
.map-hint {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 8px 0 6px;
}

/* فیلد نمایش آدرس خوانده شده */
.map-address {
    width: 100%;
    margin-bottom: 10px;
}

/* دکمه‌های پایین پنجره نقشه */
.map-modal-actions {
    display: flex;
    gap: 8px;
    justify-content: space-between;
}

/* در موبایل نقشه کوتاه‌تر می‌شود */
@media (max-width: 480px) {
    .map-modal-map {
        height: 300px;
    }
}

/* ---------- سوییچ روشن/خاموش ---------- */
.switch-label {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    position: relative;
}

.switch-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    background: #d1d5db;
    border-radius: 26px;
    transition: background 0.2s;
}

.switch-slider::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    top: 3px;
    right: 3px;
    transition: transform 0.2s;
}

.switch-label input:checked + .switch-slider {
    background: var(--primary, #1e3a8a);
}

.switch-label input:checked + .switch-slider::after {
    transform: translateX(-22px);
}

/* ---------- وضعیت فعال‌سازی اعلان ---------- */
.push-status {
    display: inline-block;
    margin-right: 10px;
    font-size: 0.9rem;
    color: #0f766e;
}

/* ---------- رادیوهای حالت اعلان ---------- */
.radio-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: 18px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #374151;
}

.radio-inline input {
    width: auto;
}

/* ---------- مراحل نصب برنامه ---------- */
.install-steps {
    margin: 0 0 10px 0;
    padding-right: 20px;
    font-size: 0.9rem;
    line-height: 2;
    color: #374151;
}
