/* =========================================================
   1. متغیرهای پایه (پالت رنگی دارک و شیشه‌ای)
========================================================= */
:root {
    --bg-dark: #0f172a; /* سرمه‌ای بسیار تیره */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-glow: rgba(56, 189, 248, 0.15);
}

/* =========================================================
   2. بک‌گراند اصلی و تنظیمات پایه
========================================================= */
body {
    font-family: 'Vazir', Tahoma, Arial, sans-serif;
    direction: rtl;
    padding: 20px;
    margin: 0;
    background-color: var(--bg-dark);
    background-image:
            radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
            radial-gradient(at 100% 100%, rgba(236, 72, 153, 0.1) 0px, transparent 50%);
    background-attachment: scroll;
    color: var(--text-primary);
    min-height: 100vh;
    min-height: 100dvh;
}

@media (hover: hover) and (pointer: fine) {
    body {
        background-attachment: fixed;
    }
}

@media (hover: none), (pointer: coarse) {
    body {
        background-attachment: scroll !important;
    }
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hidden {
    display: none !important;
}

/* =========================================================
   3. هدر سیستم و لوگو
========================================================= */
.header-controls {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 25px;
    padding: 15px 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
}

.logo {
    max-width: 110px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(255,255,255,0.2));
}

/* =========================================================
   4. دکمه‌های هدر (مدرن و نئونی)
========================================================= */
.header-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.header-buttons button {
    font-family: 'Vazir', Tahoma;
    cursor: pointer;
    border: 1px solid var(--glass-border);
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary) !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(5px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.header-buttons button:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.1) !important;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.1);
}

.header-buttons button:active {
    transform: translateY(1px);
}

/* رنگ نئونی مخصوص هر دکمه هدر در حالت Hover */
#logoutBtn:hover { border-color: #ef4444; box-shadow: 0 8px 25px rgba(239, 68, 68, 0.2); }
#managementBtn:hover { border-color: #6366f1; box-shadow: 0 8px 25px rgba(99, 102, 241, 0.2); }
#discountManagerBtn:hover { border-color: #ec4899; box-shadow: 0 8px 25px rgba(236, 72, 153, 0.2); }
#customersBtn:hover { border-color: #3b82f6; box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2); }
#dailySalesReportBtn:hover { border-color: #14b8a6; box-shadow: 0 8px 25px rgba(20, 184, 166, 0.2); }
#openChartBtn:hover { border-color: #06b6d4; box-shadow: 0 8px 25px rgba(6, 182, 212, 0.2); }
#purchasesBtn:hover { border-color: #10b981; box-shadow: 0 8px 25px rgba(16, 185, 129, 0.2); }
#inventoryBtn:hover { border-color: #f97316; box-shadow: 0 8px 25px rgba(249, 115, 22, 0.2); }
#openSmsPanelBtn:hover { border-color: #8b5cf6; box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2); }
#printSettingsBtn:hover { border-color: #cbd5e1; box-shadow: 0 8px 25px rgba(203, 213, 225, 0.2); }

.header-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

/* =========================================================
   5. فیلترها و هدر تاریخ (شیشه‌ای)
========================================================= */
.date-header {
    text-align: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-primary);
    padding: 10px;
    border-radius: 15px;
    margin-top: 20px;
    margin-bottom: 15px;
    box-shadow: var(--glass-shadow);
}

.order-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding: 12px 25px;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    box-shadow: var(--glass-shadow);
    color: var(--text-primary);
}

.order-filters label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.order-filters input[type="radio"] {
    margin-left: 5px;
}

/* =========================================================
   6. جدول سفارشات (مدرن و تاریک)
========================================================= */
/* =========================================================
   6. جدول سفارشات (مدرن، تاریک و خط‌کشی شده)
========================================================= */
.daily-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 20px;
    background: transparent !important;
    /* ایجاد یک کادر ظریف و گرد دور کل جدول */
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden; /* باعث میشه گوشه‌های جدول دقیقاً گرد بمونن */
}

.daily-table th {
    background: rgba(15, 23, 42, 0.8);
    color: #cbd5e1;
    padding: 15px 12px;
    border-bottom: 1px solid var(--glass-border);
    /* ❌ اضافه شدن خط عمودی بین هدرها */
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    font-weight: bold;
    font-size: 14px;
    text-align: center;
}

.daily-table td {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-primary);
    padding: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* ❌ اضافه شدن خط عمودی بین سلول‌ها */
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
    text-align: center;
    transition: background 0.2s;
}

/* حذف خط عمودیِ آخرین ستون (چون خود جدول کادر داره، نباید دو خطه بشه) */
.daily-table th:last-child,
.daily-table td:last-child {
    border-left: none;
}

/* حذف خط افقیِ آخرین سطر تا پایین جدول هم تمیز باشه */
.daily-table tbody tr:last-child td {
    border-bottom: none;
}

/* هاور روی سطرها */
.daily-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.06);
}

#customersListBody td.product-actions {
    display: table-cell !important;
    vertical-align: middle;
    height: inherit;
}
#customersListBody .customer-row-actions {
    display: flex;
    gap: 5px;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    min-height: 100%;
    width: 100%;
    box-sizing: border-box;
}
#customersListBody .customer-row-actions .edit-btn {
    background-color: #ffc107 !important;
    color: #000 !important;
}
#customersListBody .customer-row-actions .settle-customer-btn {
    background-color: #28a745 !important;
    color: #fff !important;
}
#customersListBody .customer-row-actions .delete-btn {
    background-color: #dc3545 !important;
    color: #fff !important;
}

/* رنگ سطرهای جدول */
tr.unconfirmed td { background: rgba(239, 68, 68, 0.15) !important; }
tr.confirmed td { background: rgba(34, 197, 94, 0.05) !important; }

/* متن‌های خاص داخل جدول */
ul.order-items {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: right;
}

/* رنگ سبز فسفری (نئونی) برای پرداخت شده */
.status-paid {
    color: #4ade80 !important;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(74, 222, 128, 0.3);
}

/* رنگ زرد برای پرداخت ناتمام */
.status-partial {
    color: #facc15 !important;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(250, 204, 21, 0.35);
}

/* رنگ قرمز ملایم و جذاب برای پرداخت نشده */
.status-unpaid {
    color: #f87171 !important;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(248, 113, 113, 0.3);
}

.strikethrough-old-price {
    color: #94a3b8 !important;
    font-size: 12px;
    text-decoration: line-through;
    margin-right: 5px;
}
.loyalty-next-purchase {
    font-size: 11px;
    color: #38bdf8;
    font-weight: 700;
    margin-top: 6px;
    line-height: 1.45;
}
.order-customer-level {
    font-size: 12px;
    font-weight: 700;
    color: #7dd3fc;
    margin-bottom: 4px;
}
.loyalty-applied-note {
    font-size: 11px;
    font-weight: 500;
    margin-top: 6px;
    line-height: 1.5;
    color: var(--text-secondary);
}
/* بج‌ها (داخل سالن، بیرون بر...) */
.delivery-badge { padding: 4px 8px; border-radius: 6px; font-size: 11px; color: white; display: inline-block; font-weight: bold; }
.badge-dine { background: rgba(108, 117, 125, 0.8); border: 1px solid #6c757d; }
.badge-take { background: rgba(23, 162, 184, 0.8); border: 1px solid #17a2b8; }
.badge-car { background: rgba(253, 126, 20, 0.8); border: 1px solid #fd7e14; }
/* =========================================================
   7. پنجره‌های پاپ‌آپ (Modals)
========================================================= */
.modal-overlay {
    display: none; /* یا hidden */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* پس‌زمینه تیره */
    justify-content: center;
    align-items: center;
    z-index: 9999; /* مهم: برای اینکه روی همه چیز باشد */
    overflow-y: auto;
    overscroll-behavior: contain;
}

html.modal-open,
body.modal-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.modal-content {
    background: rgba(30, 41, 59, 0.85) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    color: var(--text-primary);
    border-radius: 20px;
    padding: 25px;
    width: 90%;
    max-width: 800px;
    position: relative;
}

.modal-content h2, .modal-content h3, .modal-content h4, .modal-content label, .modal-content span, .modal-content p {
    color: var(--text-primary) !important;
}

.customer-level-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(125, 211, 252, 0.28);
    border-radius: 10px;
    background: rgba(8, 47, 73, 0.72);
}
.customer-level-row b {
    color: #f8fafc;
}
.customer-level-row .customer-level-reward {
    color: #7dd3fc !important;
    margin-right: 8px;
    font-size: 13px;
}
.customer-level-row .customer-level-default-tag {
    font-size: 11px;
    color: #94a3b8 !important;
}
.customer-level-row .delete-customer-level-btn {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    font-size: 12px;
}
.customer-level-empty {
    font-size: 13px;
    color: #cbd5e1;
}

/* دکمه‌های بستن مدال */
.close-btn-modern {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    width: 35px;
    height: 35px;
    background: rgba(244, 63, 94, 0.1) !important;
    color: #f43f5e !important;
    border: 1px solid rgba(244, 63, 94, 0.2) !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s;
    font-size: 24px;
}

.close-btn-modern:hover {
    background-color: #f43f5e !important;
    color: white !important;
    transform: rotate(90deg);
}

/* اسکرول‌بار مدال‌ها */
.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-thumb { background-color: rgba(255,255,255,0.2); border-radius: 4px; }
.management-modal-content { max-width: 950px; max-height: 90vh; overflow-y: auto; text-align: right; }
#customersModal .modal-content { max-height: 80vh; overflow-y: auto; display: flex; flex-direction: column; }
.customers-toolbar {
    display: flex;
    gap: 10px;
    align-items: stretch;
    margin-bottom: 15px;
    padding: 0 5px;
}
.customers-toolbar #customerSearchInput {
    flex: 1;
    min-width: 0;
    width: auto;
    padding: 10px;
    font-family: 'Vazir', Tahoma, sans-serif;
    font-size: 14px;
    border-radius: 8px;
    box-sizing: border-box;
}
.customers-sms-btn {
    flex: 0 0 auto;
    background: #7c3aed;
    color: #fff;
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}
.customers-sms-btn:hover {
    background: #6d28d9;
}
@media (max-width: 640px) {
    .customers-toolbar {
        flex-direction: column;
    }
    .customers-sms-btn {
        width: 100%;
    }
}
#editOrderModal .modal-content { max-height: 85vh; overflow-y: auto; }

/* =========================================================
   8. فرم‌ها، اینپوت‌ها و تکست‌اریا (تاریک)
========================================================= */
input[type="text"], input[type="number"], input[type="tel"], textarea, select {
    background: rgba(15, 23, 42, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #e2e8f0 !important;
    border-radius: 8px;
    padding: 10px;
    font-family: 'Vazir', Tahoma, sans-serif;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

input::placeholder, textarea::placeholder { color: #64748b !important; }

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #38bdf8 !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

/* =========================================================
   9. استایل‌های اختصاصی بخش‌ها
========================================================= */

/* لیست پیشنهادات مشتری */
.suggestions-container {
    position: absolute;
    border: 1px solid rgba(255,255,255,0.1);
    background-color: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    width: calc(100% - 2px);
    max-height: 150px;
    overflow-y: auto;
    z-index: 1050;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}
.suggestion-item { padding: 10px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.05); color: #e2e8f0; }
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover { background-color: rgba(255,255,255,0.1); }
.customer-name-link { color: #38bdf8; text-decoration: none; cursor: pointer; font-weight: bold; border-bottom: 1px dashed #38bdf8; }
.customer-name-link:hover { color: #7dd3fc; }

/* بخش مدیریت محصولات (دو ستونه) */
.management-container { display: flex; gap: 20px; min-height: 500px; }
.categories-panel { flex: 1; border-left: 1px solid rgba(255,255,255,0.1); padding-left: 20px; }
.products-panel { flex: 3; }
.categories-panel ul { list-style: none; padding: 0; margin: 0; max-height: 400px; overflow-y: auto; }
.categories-panel li { padding: 10px; cursor: pointer; border-radius: 8px; margin-bottom: 5px; color: #e2e8f0; transition: background 0.2s;}
.categories-panel li:hover { background-color: rgba(255,255,255,0.05); }
.categories-panel li.active { background-color: #3b82f6; color: white; }
.add-category-form { display: flex; gap: 5px; margin-top: 15px; }

/* فرم ویرایش محصول و افزودن */
#productForm { display: none; background: rgba(0,0,0,0.2); padding: 15px; border-radius: 12px; margin-top: 15px; border: 1px solid rgba(255,255,255,0.05); }
#productForm .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-bottom: 10px; }

/* باکس افزودن آیتم در ویرایش سفارش */
.edit-add-item-box { background: rgba(0,0,0,0.2); padding: 15px 20px; border-radius: 12px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.05); }
.edit-add-item-box h4 { border-bottom: 1px dashed rgba(255,255,255,0.1); padding-bottom: 8px; margin-top:0; }
.edit-add-item-grid { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.edit-add-item-grid .form-group { display: flex; flex-direction: column; flex: 1; min-width: 140px; }
.edit-add-item-grid .description-group { flex: 2; min-width: 200px; }
#editAddItemBtn { background-color: #3b82f6; color: white; padding: 0 15px; border-radius: 8px; border: none; cursor: pointer; font-weight: bold; height: 38px; width: 100%; transition: background 0.2s; }
#editAddItemBtn:hover { background-color: #2563eb; }
.editable-item { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }

/* صورتحساب مشتری */
#customerInvoiceBody { max-height: 60vh; overflow-y: auto; padding: 5px; }
.customer-invoice-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
}
.customer-invoice-toolbar {
    display: flex;
    align-items: stretch;
    gap: 8px;
    flex-wrap: wrap;
}
.customer-invoice-toolbar__control,
.customer-invoice-toolbar__btn {
    box-sizing: border-box;
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    margin: 0;
    border-radius: 6px;
    font-family: 'Vazir', Tahoma, sans-serif;
    font-size: 13px;
    line-height: 1;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.customer-invoice-toolbar__control {
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.25);
    color: var(--text-primary);
    cursor: pointer;
}
.customer-invoice-toolbar__btn {
    border: none;
    cursor: pointer;
    font-weight: 600;
}
.customer-invoice-toolbar__btn--payment { background: #ffc107; color: #000; }
.customer-invoice-toolbar__btn--settle { background: #28a745; color: #fff; }
.customer-invoice-toolbar__btn--print { background: #007bff; color: #fff; }
.customer-invoice-toolbar__btn--close { background: #6c757d; color: #fff; }
.invoice-summary { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.05); border-radius: 12px; padding: 15px; margin-bottom: 20px; display: flex; justify-content: space-around; font-size: 16px; }
.paid-total { color: #4ade80; }
.unpaid-total { color: #f87171; }
.invoice-order-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 12px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
}
.invoice-order-card.paid {
    background: rgba(74, 222, 128, 0.06);
    border-color: rgba(74, 222, 128, 0.2);
}
.invoice-order-card.unpaid {
    background: rgba(248, 113, 113, 0.08);
    border-color: rgba(248, 113, 113, 0.25);
}
.invoice-order-card h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: var(--text-primary);
}
.invoice-order-card ul {
    padding-right: 20px;
    margin: 0 0 8px 0;
    color: var(--text-secondary);
}
.invoice-order-card .invoice-order-total {
    text-align: left;
    font-weight: bold;
    margin: 0;
    color: var(--text-primary);
}

/* گزارش فروش روزانه */
/* =========================================================
   اصلاح رنگ‌بندی گزارش فروش روزانه
========================================================= */
/* =========================================================
   اصلاح رنگ‌بندی گزارش فروش روزانه
========================================================= */

#dailySalesReportModal .report-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 15px;
    color: var(--text-primary);
}

/* این بخش مربوط به جمع کل است که پس‌زمینه سفید داشت */
#dailySalesReportModal .report-field.total-row {
    background-color: rgba(255, 255, 255, 0.08) !important; /* به جای سفید، شیشه‌ای ملایم */
    border-top: 2px solid #28a745 !important;
    margin-top: 15px;
    padding: 15px 10px !important;
    border-radius: 8px;
}

#dailySalesReportModal .report-value { font-weight: bold; font-size: 18px; direction: ltr; }
#dailySalesReportModal .report-value.card { color: #38bdf8; }
#dailySalesReportModal .report-value.cash { color: #facc15; }
#dailySalesReportModal .report-value.transfer { color: #4ade80; }
#dailySalesReportModal .report-value.settled { color: #c084fc; }
#dailySalesReportModal .report-value.unpaid { color: #f87171; }

/* فیلتر ساعت فروش روزانه */
.daily-time-filter {
    margin-bottom: 20px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.daily-time-filter-title {
    margin: 0 0 10px;
    font-weight: 700;
    color: var(--text-primary);
}
.daily-time-radios {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.daily-time-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 14px;
}
.daily-time-radio input { accent-color: #38bdf8; width: auto; }
.daily-time-radio:has(input:checked) { color: var(--text-primary); font-weight: 600; }
.daily-time-range-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.daily-time-field-btn {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.1);
    color: #e0f2fe;
    cursor: pointer;
    font-family: inherit;
    text-align: right;
}
.daily-time-field-label {
    font-size: 12px;
    color: #94a3b8;
}
.daily-time-field-value {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.04em;
    direction: ltr;
}

/* iOS-style time picker */
.ios-time-picker-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(4px);
}
.ios-time-picker-overlay.hidden { display: none !important; }
.ios-time-picker-sheet {
    width: min(420px, 100%);
    background: #1e293b;
    border-radius: 20px 20px 0 0;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
    animation: ios-sheet-up 0.28s ease;
}
@keyframes ios-sheet-up {
    from { transform: translateY(40px); opacity: 0.6; }
    to { transform: translateY(0); opacity: 1; }
}
.ios-time-picker-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #f8fafc;
}
.ios-time-picker-btn {
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 15px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
}
.ios-time-picker-btn.ghost { color: #94a3b8; }
.ios-time-picker-btn.primary {
    color: #0ea5e9;
    font-weight: 700;
}
.ios-time-picker-wheels {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    height: 220px;
    margin: 8px 20px 12px;
    overflow: hidden;
    direction: ltr;
}
.ios-time-picker-highlight {
    pointer-events: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 40px;
    margin-top: -20px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.06);
    z-index: 1;
}
.ios-time-picker-fade {
    pointer-events: none;
    position: absolute;
    left: 0;
    right: 0;
    height: 70px;
    z-index: 2;
}
.ios-time-picker-fade.top {
    top: 0;
    background: linear-gradient(to bottom, #1e293b 10%, transparent);
}
.ios-time-picker-fade.bottom {
    bottom: 0;
    background: linear-gradient(to top, #1e293b 10%, transparent);
}
.ios-time-colon {
    font-size: 28px;
    font-weight: 700;
    color: #f8fafc;
    z-index: 3;
}
.ios-time-wheel {
    height: 220px;
    overflow-y: hidden;
    scroll-behavior: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    position: relative;
    z-index: 3;
    touch-action: none;
}
.ios-time-wheel::-webkit-scrollbar { display: none; }
.ios-time-wheel-pad {
    height: 90px;
    flex-shrink: 0;
}
.ios-time-option {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    font-size: 22px;
    font-weight: 600;
    color: rgba(248, 250, 252, 0.35);
    transition: color 0.15s ease, transform 0.15s ease;
}
.ios-time-option.is-selected {
    color: #f8fafc;
    transform: scale(1.08);
}
/* تغییر قیمت گروهی */
.bulk-price-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255,255,255,0.05);
    border-right: 4px solid #38bdf8;
    padding: 16px 20px;
    border-radius: 12px;
    margin: 20px 0;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}
.bulk-price-icon { background-color: rgba(56, 189, 248, 0.1); color: #38bdf8; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.bulk-price-title { color: #f8fafc; font-size: 15px; font-weight: bold; margin-bottom: 2px; }
.bulk-price-subtitle { font-size: 12px; color: #94a3b8; }
.bulk-price-controls { display: flex; align-items: center; gap: 10px; flex-grow: 1; justify-content: flex-end; flex-wrap: wrap; }
.bulk-price-btn { background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); color: white; border: none; padding: 10px 20px; border-radius: 8px; font-family: 'Vazir'; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s ease; display: flex; align-items: center; gap: 6px; }

/* فرم مواد مصرفی */
#inventoryItemForm { text-align: right; background: rgba(0,0,0,0.2) !important; border: 1px solid rgba(255,255,255,0.05); padding: 20px; border-radius: 12px; margin-bottom: 20px; }
.inventory-form-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 15px; margin-bottom: 15px; }

/* هدر مودال مصرفی‌ها — جلوگیری از بیرون‌زدگی دکمه‌ها */
.inventory-modal-content {
    max-width: min(900px, calc(100vw - 24px)) !important;
    width: min(900px, calc(100vw - 24px)) !important;
    max-height: calc(100dvh - 24px);
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}
.inventory-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 12px;
    margin-bottom: 18px;
    min-width: 0;
}
.inventory-modal-header h2 {
    margin: 0;
    flex: 1 1 180px;
    min-width: 0;
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    line-height: 1.35;
}
.inventory-modal-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
}
.inventory-modal-actions button {
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
    padding: 8px 14px;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    cursor: pointer;
}
.inventory-close-btn {
    background: #dc3545 !important;
    color: white !important;
}

@media (max-width: 720px) {
    .inventory-modal-header {
        flex-direction: column;
        align-items: stretch;
    }
    .inventory-modal-actions {
        width: 100%;
        justify-content: stretch;
    }
    .inventory-modal-actions button {
        flex: 1 1 auto;
        text-align: center;
    }
    .inventory-form-grid {
        grid-template-columns: 1fr 1fr !important;
    }
}

@media (max-width: 480px) {
    .inventory-form-grid {
        grid-template-columns: 1fr !important;
    }
    .inventory-modal-actions {
        flex-direction: column;
    }
    .inventory-modal-actions button {
        width: 100%;
    }
}

/* برچسب‌های مواد مصرفی محصول (تم تیره) */
.ingredient-labels-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    min-height: 44px;
    margin-bottom: 15px;
    background: rgba(0, 0, 0, 0.25);
}
.recipe-ingredient-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(56, 189, 248, 0.18);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #e0f2fe;
}
.recipe-ingredient-text {
    color: #f8fafc;
    font-size: 13px;
    font-weight: 600;
}
.recipe-ingredient-chip .delete-ingredient-btn {
    background: none;
    border: none;
    color: #fb7185;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
}

/* ستون موجودی: فیلدها راست‌چین و هم‌تراز عمودی */
.stock-cell {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start; /* RTL: می‌چسبد به راست */
    gap: 10px;
    width: 100%;
}
.stock-cell .stock-input,
input.stock-input {
    width: 96px;
    min-width: 96px;
    max-width: 96px;
    flex: 0 0 96px;
    box-sizing: border-box;
    text-align: left;
    direction: ltr;
    -moz-appearance: textfield;
    appearance: textfield;
}
.stock-cell .stock-input::-webkit-outer-spin-button,
.stock-cell .stock-input::-webkit-inner-spin-button,
input.stock-input::-webkit-outer-spin-button,
input.stock-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.stock-cell .stock-meta {
    font-size: 11px;
    text-align: right;
    line-height: 1.35;
    flex: 1 1 auto;
    min-width: 0;
}
#inventoryItemForm input[inputmode="decimal"],
#inventoryItemForm input[type="text"].inventory-qty-input {
    direction: ltr;
    text-align: left;
}

/* چت باکس هوش مصنوعی */
#aiChatbox { height: 300px; border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 10px; overflow-y: auto; margin-bottom: 10px; background-color: rgba(0,0,0,0.2); display: flex; flex-direction: column; }
.chat-message { margin: 5px 0; padding: 8px 12px; border-radius: 15px; max-width: 80%; word-wrap: break-word; }
.user-message { background-color: rgba(52, 211, 153, 0.2); align-self: flex-start; color: #e2e8f0;}
.ai-message { background-color: rgba(244, 63, 94, 0.2); align-self: flex-end; color: #e2e8f0;}
.chat-input-area { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
#aiQueryInput { flex-grow: 1; border-radius: 20px; padding: 10px 15px; }
#sendAiQueryBtn { background-color: #3b82f6; border-radius: 20px; padding: 10px 20px; font-weight: bold; border: none; color: white; cursor: pointer;}
#voiceAiQueryBtn { background-color: #ef4444; color: white; width: 42px; height: 42px; border-radius: 50%; padding: 0; font-size: 16px; display: flex; justify-content: center; align-items: center; transition: all 0.3s; border: none; cursor: pointer;}
#voiceAiQueryBtn.recording { background-color: #b91c1c; animation: pulse 1.5s infinite; }

/* انیمیشن‌ها و آلارم‌ها */
@keyframes blinker { 50% { background-color: rgba(239, 68, 68, 0.4); } }
.alert-blinking { animation: blinker 1s linear infinite; border: 2px solid #ef4444 !important; }

@keyframes story-icon-blink {
    50% { opacity: 0.35; transform: scale(1.15); }
}
.story-screenshot-icon {
    cursor: pointer;
    display: inline-block;
    font-size: 20px;
    margin-top: 4px;
    animation: story-icon-blink 0.9s ease-in-out infinite;
    filter: drop-shadow(0 0 4px #a855f7);
}
.story-review-content {
    max-width: min(95vw, 600px);
    text-align: center;
    padding: 20px;
}
.story-review-image-wrap {
    max-height: 70vh;
    overflow: auto;
    border-radius: 12px;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px;
}
.story-review-image-wrap img {
    max-width: 100%;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}
.story-review-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}
.story-approve-btn {
    background: #22c55e !important;
    color: white !important;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}
.story-reject-btn {
    background: #ef4444 !important;
    color: white !important;
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}
.story-review-close-btn {
    margin-top: 12px;
    background: #64748b !important;
    color: white !important;
    padding: 8px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
}

#storyReviewModal {
    z-index: 10000 !important;
}

.story-submission-row {
    background: rgba(124, 58, 237, 0.08) !important;
}

.story-submission-row:hover {
    background: rgba(124, 58, 237, 0.14) !important;
}

@keyframes noteBlinker { 0% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } 100% { opacity: 1; transform: scale(1); } }
.note-alert-active { animation: noteBlinker 1.5s infinite; color: #ef4444; text-shadow: 0 0 8px rgba(239, 68, 68, 0.6); }
.note-alert-read { color: #64748b; animation: none; transform: scale(1); }

@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } 70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

/* =========================================================
   10. منوی همبرگری — در responsive-navigation.css
========================================================= */

/* =========================================================
   11. استایل‌های چاپ (فقط روی کاغذ)
========================================================= */
@media print {
    @page { margin: 0; size: auto; }
    html, body {
        height: auto !important; min-height: auto !important; margin: 0 !important; padding: 0 !important;
        overflow: visible !important; background-color: white !important; background-image: none !important;
        direction: rtl; font-family: 'Vazir', Tahoma, Arial, sans-serif; color: black !important;
    }
    body > * { display: none !important; }
    body > #receipt-print-area {
        display: block !important; position: relative !important; width: 100% !important;
        max-width: 80mm !important; margin: 0 auto !important; padding: 0 !important; border: none !important;
        box-shadow: none !important; background: white !important; color: black !important;
    }
    body.print-ledger-a5 > #receipt-print-area {
        max-width: 100% !important;
        padding: 0 4mm !important;
    }
    .print-area h2, .print-area h3, .print-area p, .print-area table { margin: 0; padding: 0; width: 100%; text-align: right; font-size: 10pt; color: black !important;}
    .print-area h2 { font-size: 12pt; text-align: center; margin-bottom: 5px; }
    .print-area h3 { font-size: 11pt; }
    .print-area hr { border: none; border-top: 1px dashed black; margin: 5px 0; }
    .print-area table { width: 100%; margin-top: 5px; }
    .print-area td, .print-area th { border-bottom: 1px dashed black; padding: 4px 0; font-size: 9pt; white-space: nowrap; color: black !important;}
    .print-area p:last-of-type { text-align: center; margin-top: 10px; }
    .ledger-print-table { font-size: 8pt !important; }
    .ledger-print-table th, .ledger-print-table td { font-size: 8pt !important; padding: 3px 2px !important; white-space: normal !important; }
}

.customer-ledger-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-top: 12px;
}
.customer-ledger-table th,
.customer-ledger-table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding: 8px 6px;
    text-align: right;
    vertical-align: top;
}
.customer-ledger-table th {
    font-weight: 700;
    color: var(--text-secondary);
    font-size: 12px;
}
.customer-ledger-table .ledger-debit { color: #f87171; font-weight: 600; }
.customer-ledger-table .ledger-credit { color: #4ade80; font-weight: 600; }
.customer-ledger-table .ledger-balance { color: var(--text-primary); font-weight: 700; }
.customer-ledger-table .ledger-detail { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.customer-ledger-table .ledger-method { font-size: 11px; color: #38bdf8; }
.ledger-summary-box {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 12px;
}
@media (max-width: 720px) {
    .ledger-summary-box { grid-template-columns: repeat(2, 1fr); }
}
.customer-ledger-table .ledger-discount { color: #fbbf24; font-weight: 600; }
.invoice-discount-box {
    margin: 8px 0;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    font-size: 13px;
    line-height: 1.7;
    color: #fde68a;
}
.customer-discount-cell {
    color: #fbbf24;
    font-weight: 700;
    font-size: 13px;
}
.customer-report-print-card {
    max-width: 420px;
    text-align: right;
}
.customer-report-print-hint {
    font-size: 13px;
    line-height: 1.8;
    color: #cbd5e1;
    margin: 0 0 16px;
}
.customer-report-print-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.customer-report-print-actions button {
    width: 100%;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-weight: 700;
    cursor: pointer;
    background: #007bff;
    color: #fff;
}
.customer-report-print-actions button.customer-report-print-cancel {
    background: #6c757d;
}
.ledger-summary-box > div {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    font-size: 13px;
}
/* =========================================================
   12. اصلاح نهایی و ضدگلوله ستون عملیات (Actions)
========================================================= */
/* =========================================================
   12. اصلاح نهایی و ضدگلوله ستون عملیات (Actions)
========================================================= */
/* =========================================================
   12. اصلاح نهایی و ضدگلوله ستون عملیات (بدون تداخل با جدول)
========================================================= */
.actions-container {
    /* flex کلاً حذف شد تا ساختار جدول به هم نریزد */
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    width: 1%;
    min-width: 220px;
    padding: 8px 4px !important;
}

#ordersContainer .col-final-price {
    width: 92px;
    max-width: 108px;
    white-space: normal;
    word-break: break-word;
    font-size: 13px;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
#ordersContainer .col-final-price .loyalty-applied-note,
#ordersContainer .col-final-price .strikethrough-old-price {
    font-size: 10px;
}
#ordersContainer .col-order-actions,
#ordersContainer .actions-container {
    white-space: nowrap !important;
    width: 1%;
}
#ordersContainer .actions-container button {
    margin: 1px !important;
    padding: 5px 7px !important;
}

/* استایل یکپارچه و فاصله‌دهی دکمه‌های عملیات */
.actions-container button,
.product-actions button {
    display: inline-flex !important; /* محتوای داخل دکمه را وسط‌چین نگه می‌دارد */
    align-items: center;
    justify-content: center;
    margin: 3px !important; /* ❌ جایگزین دستور gap: فاصله بین دکمه‌ها */
    font-family: 'Vazir', Tahoma, sans-serif !important;
    font-size: 11px !important;
    padding: 6px 10px !important;
    border-radius: 6px !important;
    border: none !important;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 30px;
    height: 30px;
}

/* رنگ‌بندی دقیق و یکسان */
.pay-btn { background-color: #3b82f6 !important; color: white !important; }
.pay-btn.paid { background-color: #22c55e !important; }
.pay-btn.partial { background-color: #eab308 !important; color: #111827 !important; }

#paymentModal .modal-content > button#payByCardBtn,
#paymentModal .modal-content > button#payByCashBtn,
#paymentModal .modal-content > button#payByTransferBtn,
#paymentModal .modal-content > button#payByMixedBtn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
#paymentModal .modal-content > button i {
    font-size: 15px;
}
.print-receipt-btn { background-color: #64748b !important; color: white !important; }
.confirm-btn { background-color: #f1f5f9 !important; color: #0f172a !important; }
.edit-order-btn { background-color: #64748b !important; color: white !important; }
.delete-order-btn, .delete-btn, .delete-product-btn {
    background-color: #ef4444 !important;
    color: white !important;
}

/* هاور دکمه‌ها */
.actions-container button:hover, .product-actions button:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
}
/* =========================================================
   13. استایل مدرن و یکپارچه برای تمام دکمه‌های سیستم
========================================================= */
/* =========================================================
   13. استایل مدرن و یکپارچه برای تمام دکمه‌های سیستم
========================================================= */
/* =========================================================
   13. استایل مدرن و یکپارچه برای تمام دکمه‌های سیستم (اصلاح شده)
========================================================= */

/* استایل عمومی فقط برای دکمه‌های اصلی و پرداخت اعمال شود */
button:not(.close-btn-modern):not(.hamburger-icon):not(.delete-order-btn):not(.delete-product-btn):not(.edit-order-btn):not(.confirm-btn):not(.pay-btn):not(.print-receipt-btn) {
    font-family: 'Vazir', Tahoma, sans-serif !important;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    background: rgba(255, 255, 255, 0.08) !important;
    color: var(--text-primary) !important;
    padding: 8px 16px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(5px);
}

/* فقط برای دکمه‌هایی که استایل عمومی دارند هاور تعریف کن */
button:not(.close-btn-modern):hover {
    background: rgba(255, 255, 255, 0.15) !important;
    transform: translateY(-2px);
}
/* =========================================================
   14. اصلاح اختصاصی مودال پرداخت (دکمه‌های پرداخت جدا، دکمه بستن جدا)
========================================================= */

/* 1. کوچک کردن اندازه کل پنجره مودال پرداخت */
#paymentModal .modal-content {
    max-width: 300px !important;
    padding: 20px !important;
    text-align: center;
    position: relative; /* برای اینکه دکمه بستن در جای درست باشد */
}

/* 2. هدف قرار دادن فقط دکمه‌های پرداخت (بدون درگیر شدن دکمه بستن) */
#paymentModal .modal-content button#payByCardBtn,
#paymentModal .modal-content button#payByCashBtn,
#paymentModal .modal-content button#payByTransferBtn {
    display: block !important;
    width: 100% !important;
    padding: 12px 10px !important;
    margin: 8px 0 !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    border: none !important;
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
}

/* افکت هاور برای دکمه‌های پرداخت */
#paymentModal .modal-content button#payByCardBtn:hover,
#paymentModal .modal-content button#payByCashBtn:hover,
#paymentModal .modal-content button#payByTransferBtn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* 3. دکمه بستن پرداخت: تنظیم دقیق برای اینکه بزرگ نشود */
#paymentModal .close-btn-modern {
    display: flex !important;
    position: absolute !important;
    top: 10px !important;
    left: 10px !important;
    width: 30px !important;
    height: 30px !important;
    font-size: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 50% !important;
    background: rgba(244, 63, 94, 0.1) !important;
    color: #f43f5e !important;
    border: none !important;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   15. یکپارچه‌سازی دکمه‌های انبار (Inventory)
========================================================= */

/* دکمه ذخیره در انبار */
.save-stock-btn  {
    background: rgba(40, 167, 69, 0.2) !important; /* سبز ملایم شیشه‌ای */
    color: #4ade80 !important;
    border: 1px solid rgba(74, 222, 128, 0.3) !important;
}
.delete-inventory-btn {
    background: rgba(40, 1, 69, 0.2) !important; /* سبز ملایم شیشه‌ای */
    color: #4ade80 !important;
    border: 1px solid rgba(74, 222, 128, 0.3) !important;
}

.save-stock-btn:hover {
    background: rgba(40, 167, 69, 0.4) !important;
}

/* دکمه حذف در انبار */


.delete-inventory-btn:hover {
    background: rgba(40, 167, 69, 0.4) !important;
}

/* دکمه "افزودن ماده جدید" در بالای جدول انبار */
#showAddItemFormBtn {
    background: linear-gradient(135deg, #0891b2, #0e7490) !important;
    color: white !important;
}

.pager-alert-overlay {
    z-index: 100080 !important;
    background: rgba(2, 6, 23, 0.72) !important;
    backdrop-filter: blur(6px);
    display: none;
}
.pager-alert-overlay.show {
    display: flex !important;
}
.pager-alert-card {
    width: min(460px, calc(100vw - 28px));
    text-align: center;
    padding: 28px 22px 22px;
    border-radius: 22px;
    background: rgba(30, 41, 59, 0.92);
    border: 1px solid rgba(56, 189, 248, 0.35);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
    animation: pagerAlertBlink 1.1s ease-in-out infinite;
    color: #f8fafc;
}
@keyframes pagerAlertBlink {
    0%, 100% { border-color: rgba(56, 189, 248, 0.35); }
    50% { border-color: rgba(125, 211, 252, 0.85); box-shadow: 0 0 28px rgba(56, 189, 248, 0.55), 0 25px 60px rgba(0, 0, 0, 0.55); }
}
.pager-alert-eyebrow {
    margin: 0 0 8px;
    color: #7dd3fc;
    font-size: 0.95rem;
    font-weight: 700;
}
.pager-alert-title {
    margin: 0;
    font-size: 1.15rem;
    color: #cbd5e1 !important;
    font-weight: 600;
}
.pager-alert-table {
    margin: 8px 0 18px;
    font-size: clamp(3.2rem, 12vw, 4.6rem);
    font-weight: 900;
    line-height: 1;
    color: #38bdf8;
}
.pager-alert-need-label {
    margin: 0 0 6px;
    color: #94a3b8;
    font-size: 1rem;
}
.pager-alert-need {
    margin: 0 0 22px;
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    font-weight: 900;
    color: #fbbf24;
}
.pager-alert-ack-btn {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 14px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 800;
    cursor: pointer;
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    color: #041018;
}

/* کادر شیشه‌ای برای مجموع هزینه‌ها */
.edit-totals-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.edit-totals-box .total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 15px;
    color: var(--text-primary);
}

.edit-totals-box .discount-input {
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-totals-box .discount-input input {
    width: 60px !important;
    text-align: center;
    background: rgba(15, 23, 42, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 5px !important;
}

.edit-totals-box .final-total {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    margin-top: 10px;
    font-size: 18px !important;
    font-weight: bold;
    color: #4ade80 !important; /* رنگ سبز برای مبلغ نهایی */
}

/* ========== حضور و غیاب ========== */
.attendance-modal-content {
    max-width: 760px;
    width: min(96vw, 760px);
    max-height: 90vh;
    overflow: auto;
    text-align: right;
    padding: 20px 22px 24px !important;
}

.attendance-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
    gap: 12px;
}

.attendance-modal-header h2,
.attendance-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.attendance-section {
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 14px;
    background: rgba(255, 255, 255, 0.03);
}

.attendance-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.attendance-section-head h3 {
    margin: 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.attendance-section-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(14, 165, 233, 0.18);
    color: #7dd3fc;
    font-size: 14px;
}

.attendance-staff-ops {
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.08), rgba(34, 197, 94, 0.05));
    border-color: rgba(14, 165, 233, 0.28);
}

.attendance-staff-ops-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.attendance-op-btn {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 88px;
    border-radius: 14px !important;
    border: 1px solid transparent !important;
    color: #fff !important;
    font-weight: 800 !important;
    cursor: pointer;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.attendance-op-btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.06);
}

.attendance-op-btn .op-icon {
    font-size: 22px;
}

.attendance-op-btn .op-label {
    font-size: 15px;
}

.attendance-op-btn.check-in {
    background: linear-gradient(145deg, #15803d, #22c55e) !important;
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.22);
}

.attendance-op-btn.check-out {
    background: linear-gradient(145deg, #b91c1c, #ef4444) !important;
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.22);
}

.attendance-mgmt {
    background: rgba(255, 255, 255, 0.025);
}

.attendance-mgmt-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.attendance-mgmt-btn {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(14, 165, 233, 0.4) !important;
    background: rgba(14, 165, 233, 0.16) !important;
    color: #7dd3fc !important;
    font-weight: 700 !important;
}

.attendance-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-bottom: 14px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
}

.attendance-tab {
    background: transparent !important;
    color: var(--text-secondary) !important;
    border: none !important;
    border-radius: 9px !important;
    padding: 9px 10px !important;
    font-weight: 600 !important;
    box-shadow: none !important;
}

.attendance-tab.active {
    background: rgba(14, 165, 233, 0.22) !important;
    color: #7dd3fc !important;
}

.attendance-panel {
    display: none;
}

.attendance-panel.active {
    display: block;
}

.staff-members-list,
.attendance-logs-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 12px;
    max-height: 48vh;
    overflow: auto;
    padding: 2px;
}

.attendance-logs-list {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
}

.staff-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
}

.staff-card-photo {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 12px;
    object-fit: cover;
    background: rgba(0, 0, 0, 0.25);
    display: block;
}

.staff-info-btn {
    width: 100%;
    padding: 7px 8px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(14, 165, 233, 0.35) !important;
    background: rgba(14, 165, 233, 0.12) !important;
    color: #7dd3fc !important;
    font-size: 11px !important;
    font-family: 'Vazir', Tahoma, sans-serif !important;
    cursor: pointer;
    transition: background 0.2s ease;
}

.staff-info-btn:hover {
    background: rgba(14, 165, 233, 0.22) !important;
}

.staff-info-modal-content {
    max-width: 420px;
    width: calc(100% - 24px);
}

.staff-info-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.staff-info-photo-wrap {
    display: flex;
    justify-content: center;
}

.staff-info-photo {
    width: 140px;
    height: 140px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.25);
}

.staff-info-grid {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.staff-info-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.staff-info-row dt {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

.staff-info-row dd {
    margin: 0;
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 600;
}

.staff-info-delete-btn {
    width: 100%;
    padding: 10px !important;
    border-radius: 10px !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
    font-size: 13px !important;
    cursor: pointer;
}

.staff-delete-btn {
    width: 34px !important;
    height: 34px !important;
    border-radius: 10px !important;
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(239, 68, 68, 0.35) !important;
    font-size: 18px !important;
    padding: 0 !important;
    cursor: pointer;
}

.staff-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.staff-form-layout {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 16px;
    align-items: start;
}

.staff-photo-block {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.staff-photo-frame {
    width: 140px;
    height: 140px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.7);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.staff-photo-frame img,
.staff-photo-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.staff-photo-frame.camera-live #staffPhotoPreview,
.staff-photo-frame.camera-live .staff-photo-placeholder {
    display: none !important;
}

.staff-photo-frame video.is-live,
.staff-photo-frame video:not(.hidden) {
    display: block !important;
}

.staff-photo-placeholder {
    color: var(--text-secondary);
    font-size: 13px;
}

.staff-photo-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    width: 100%;
}

.staff-photo-btns button {
    flex: 1;
    min-width: 64px;
    padding: 7px 8px !important;
    border-radius: 8px !important;
    border: 1px solid var(--glass-border) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-primary) !important;
    font-size: 12px !important;
}

.staff-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.staff-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
}

.staff-form-grid input {
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.85);
    color: var(--text-primary);
    padding: 8px 12px;
    font-family: inherit;
}

.staff-birth-field {
    grid-column: 1 / -1;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
}

.staff-time-stack {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.staff-time-stack label {
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 12.5px;
    font-weight: 600;
}

.staff-time-stack input[type="time"],
.staff-birth-field input[type="text"],
.logs-date-input {
    width: 100%;
    box-sizing: border-box;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: rgba(15, 23, 42, 0.85);
    color: var(--text-primary);
    padding: 8px 12px;
    font-family: inherit;
    color-scheme: dark;
}

.staff-birth-field input[type="text"] {
    cursor: pointer;
}

.staff-time-stack input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.85;
    cursor: pointer;
}

.staff-save-btn {
    background: #0ea5e9 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px !important;
    font-weight: 700 !important;
}

.staff-birth-calendar {
    display: none;
    margin-top: 8px;
    width: 100%;
    max-width: 320px;
    padding: 8px;
    border-radius: 12px;
    overflow: visible;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    background: #0f172a !important;
    border: 1px solid rgba(125, 211, 252, 0.4);
    z-index: 5;
}

.staff-birth-calendar.is-open {
    display: block;
}

.staff-birth-calendar .datepicker-container-inline,
.staff-birth-calendar .datepicker-plot-area,
.staff-birth-calendar .datepicker-day-view,
.staff-birth-calendar .month-grid-box,
.staff-birth-calendar .datepicker-navigator,
.staff-birth-calendar .toolbox {
    width: 100% !important;
    background: #0f172a !important;
    color: #e2e8f0 !important;
    border: none !important;
    box-shadow: none !important;
}

.staff-birth-calendar .pwt-btn,
.staff-birth-calendar .pwt-btn-today,
.staff-birth-calendar .header-row-cell,
.staff-birth-calendar .datepicker-navigator,
.staff-birth-calendar .month-item,
.staff-birth-calendar .year-item {
    color: #e2e8f0 !important;
    background: transparent !important;
}

.staff-birth-calendar .datepicker-day-view .table-days td span {
    background: transparent !important;
    border-color: transparent !important;
    color: #e2e8f0 !important;
    cursor: pointer !important;
}

.staff-birth-calendar .datepicker-day-view .table-days td.other-month span {
    color: #64748b !important;
}

.staff-birth-calendar .table-days td span:hover,
.staff-birth-calendar .month-item:hover,
.staff-birth-calendar .year-item:hover {
    background: rgba(14, 165, 233, 0.3) !important;
    color: #ffffff !important;
}

.staff-birth-calendar .table-days td.selected span,
.staff-birth-calendar .month-item-selected,
.staff-birth-calendar .year-item-selected {
    background: #0ea5e9 !important;
    color: #ffffff !important;
}

.staff-birth-calendar .pwt-btn-switch,
.staff-birth-calendar .pwt-btn-next,
.staff-birth-calendar .pwt-btn-prev,
.staff-birth-calendar .toolbox .pwt-btn-today {
    color: #7dd3fc !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.attendance-logs-toolbar {
    display: grid;
    grid-template-columns: minmax(72px, auto) 1fr minmax(72px, auto);
    gap: 8px;
    align-items: start;
    margin-bottom: 12px;
}

.logs-nav-btn {
    min-width: 72px !important;
    height: auto !important;
    min-height: 42px !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--glass-border) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    padding: 8px 10px !important;
    line-height: 1.4 !important;
    white-space: nowrap !important;
}

.logs-nav-btn:disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.logs-date-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
}

.logs-date-label {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 14px;
}

.logs-date-input.hidden {
    display: none !important;
}

.logs-search-btn {
    background: rgba(14, 165, 233, 0.18) !important;
    color: #7dd3fc !important;
    border: 1px solid rgba(14, 165, 233, 0.4) !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}

.logs-date-calendar {
    max-width: 300px;
}

.attendance-log-group {
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
}

.attendance-log-group-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.attendance-log-group-head em {
    margin-right: auto;
    font-style: normal;
    color: var(--text-secondary);
    font-size: 12px;
}

.attendance-log-group.in .attendance-log-group-head {
    background: rgba(34, 197, 94, 0.12);
}

.attendance-log-group.out .attendance-log-group-head {
    background: rgba(239, 68, 68, 0.12);
}

.attendance-log-group-body {
    display: flex;
    flex-direction: column;
}

.attendance-log-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 11px 12px;
    border: none;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 13px;
    background: transparent;
}

.attendance-log-group-body .attendance-log-row:last-child {
    border-bottom: none;
}

.attendance-log-row strong {
    display: block;
}

.attendance-log-row small {
    color: var(--text-secondary);
}

.log-row-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.attendance-log-row .log-time {
    text-align: left;
    color: var(--text-secondary);
    font-size: 12px;
    direction: ltr;
    font-weight: 700;
}

.log-delete-btn {
    background: rgba(248, 113, 113, 0.15) !important;
    color: #fca5a5 !important;
    border: 1px solid rgba(248, 113, 113, 0.4) !important;
    border-radius: 8px !important;
    padding: 4px 10px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
}

.log-delete-btn:hover {
    background: rgba(248, 113, 113, 0.28) !important;
    color: #fecaca !important;
}

.attendance-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 24px 12px;
}

.attendance-empty.small {
    padding: 14px 8px;
    font-size: 13px;
}

.attendance-camera-overlay {
    z-index: 10050;
}

.attendance-camera-content {
    max-width: 420px;
    width: min(94vw, 420px);
    text-align: center;
}

.attendance-camera-frame {
    width: 100%;
    aspect-ratio: 3 / 4;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    margin: 12px 0;
    border: 1px solid var(--glass-border);
}

.attendance-camera-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attendance-camera-status {
    color: var(--text-secondary);
    min-height: 24px;
    margin: 0 0 12px;
    font-size: 13px;
}

.attendance-verify-btn {
    width: 100% !important;
    background: #0ea5e9 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 10px !important;
    padding: 12px !important;
    font-weight: 700 !important;
}

.attendance-toast {
    position: fixed;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%) translateY(20px);
    background: rgba(15, 23, 42, 0.96);
    color: #f8fafc;
    border: 1px solid rgba(125, 211, 252, 0.45);
    padding: 12px 18px;
    border-radius: 12px;
    z-index: 11000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
    font-weight: 700;
}

.attendance-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.attendance-toast.ok {
    border-color: rgba(74, 222, 128, 0.55);
}

.attendance-toast.err {
    border-color: rgba(248, 113, 113, 0.55);
}

.datepicker-container.lutus-pdp-box,
.datepicker-container {
    z-index: 100200 !important;
}

/* تقویم داخل مودال پیامک */
.datepicker-container.crm-sms-pdp {
    z-index: 100250 !important;
}

.datepicker-container.lutus-pdp-box {
    position: fixed !important;
    padding: 0 !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45) !important;
    background: #0f172a !important;
}

.datepicker-container.lutus-pdp-box .datepicker-plot-area,
.datepicker-container .datepicker-plot-area {
    background: #0f172a !important;
    border: 1px solid rgba(125, 211, 252, 0.35) !important;
    color: #e2e8f0 !important;
    border-radius: 12px !important;
}

.datepicker-container .pwt-btn,
.datepicker-container .datepicker-day-view .table-days td span,
.datepicker-container .month-item,
.datepicker-container .year-item,
.datepicker-container .header-row-cell,
.datepicker-container .toolbox .pwt-btn-today {
    color: #e2e8f0 !important;
}

.datepicker-container .datepicker-day-view .table-days td span,
.datepicker-container .month-item,
.datepicker-container .year-item {
    background: transparent !important;
}

.datepicker-container .month-item:hover,
.datepicker-container .year-item:hover,
.datepicker-container .datepicker-day-view .table-days td span:hover {
    background: rgba(14, 165, 233, 0.3) !important;
    color: #ffffff !important;
}

.datepicker-container .month-item-disable,
.datepicker-container .year-item-disable,
.datepicker-container .datepicker-day-view .table-days td.disabled span {
    color: #64748b !important;
}

.datepicker-container .table-days td.selected span,
.datepicker-container .month-item-selected,
.datepicker-container .year-item-selected {
    background: #0ea5e9 !important;
    color: #ffffff !important;
}

.lutus-pdp-close {
    display: none !important;
}

/* =========================================================
   تنظیمات پرینتر
========================================================= */
.settings-check-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
}

.settings-check-list label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: var(--text-primary) !important;
    margin: 0;
}

.settings-check-list input[type="checkbox"] {
    transform: scale(1.15);
    accent-color: #38bdf8;
}

.settings-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

@media (max-width: 700px) {
    .staff-form-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .staff-form-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .attendance-logs-toolbar {
        grid-template-columns: minmax(64px, auto) 1fr minmax(64px, auto);
    }
}

@media print {
    .receipt-copy-wrap { page-break-after: always; }
    .receipt-copy-wrap:last-child { page-break-after: auto; }
}

/* ===== کمپین پیامک CRM ===== */
.crm-sms-credit-box {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(14, 165, 233, 0.12);
    border: 1px solid rgba(125, 211, 252, 0.35);
    color: #e2e8f0 !important;
    font-weight: 700;
}

#crmSmsCreditBox .crm-sms-credit-value,
#crmSmsCreditValue.crm-sms-credit-value {
    color: #38bdf8 !important;
    font-size: 1.25em;
    font-weight: 800;
    margin-right: 4px;
}

.crm-sms-notify-overlay {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    background: rgba(2, 6, 23, 0.72) !important;
    align-items: center;
    justify-content: center;
}

.crm-sms-notify-card {
    width: min(420px, 92vw);
    background: linear-gradient(160deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.98));
    border: 1px solid rgba(125, 211, 252, 0.35);
    border-radius: 18px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(56, 189, 248, 0.08);
    padding: 22px 20px 18px;
    text-align: center;
    color: #f8fafc;
    animation: crmSmsNotifyIn 0.22s ease-out;
}

@keyframes crmSmsNotifyIn {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.crm-sms-notify-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    background: rgba(14, 165, 233, 0.15);
    border: 1px solid rgba(125, 211, 252, 0.3);
}

.crm-sms-notify-card.is-ok .crm-sms-notify-icon {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(74, 222, 128, 0.35);
}

.crm-sms-notify-card.is-err .crm-sms-notify-icon {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(248, 113, 113, 0.4);
}

.crm-sms-notify-card.is-warn .crm-sms-notify-icon {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
}

.crm-sms-notify-title {
    margin: 0 0 8px !important;
    font-size: 18px !important;
    color: #f8fafc !important;
}

.crm-sms-notify-text {
    margin: 0 0 16px !important;
    color: #cbd5e1 !important;
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
}

.crm-sms-notify-input-wrap {
    margin: 0 0 14px;
}

.crm-sms-notify-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    background: rgba(15, 23, 42, 0.85);
    color: #f8fafc;
    font-family: inherit;
    resize: vertical;
}

.crm-sms-notify-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.crm-sms-notify-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    min-width: 96px;
}

.crm-sms-notify-btn--primary {
    background: linear-gradient(135deg, #0ea5e9, #0284c7);
    color: #fff;
}

.crm-sms-notify-btn--primary:hover {
    filter: brightness(1.08);
}

.crm-sms-notify-btn--ghost {
    background: rgba(148, 163, 184, 0.18);
    color: #e2e8f0;
}

.crm-sms-notify-btn--ghost:hover {
    background: rgba(148, 163, 184, 0.28);
}

