:root { color-scheme: light; }

* { font-family: 'Ravi', system-ui, sans-serif; }

/* فرم‌ها و کلاس mono هم همان فونت برنامه را بگیرند (Tailwind font-mono را خنثی می‌کند) */
input, textarea, select, button,
.font-mono {
    font-family: 'Ravi', system-ui, sans-serif !important;
}

html, body { margin: 0; padding: 0; min-height: 100%; }
/* غیرفعال‌کردن زوم (دابل‌تپ) چون برنامه به‌صورت وب‌اپ اجرا می‌شود */
html, body { touch-action: manipulation; -ms-touch-action: manipulation; }
body { -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* اعداد فارسی برای نمایش */
.nums-fa { font-feature-settings: "ss01"; }

/* ===== نوار پیشرفت لودینگ بالای صفحه ===== */
#nprogress { pointer-events: none; }
.app-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 9999;
    background: transparent; overflow: hidden;
}
.app-progress > span {
    display: block; height: 100%; width: 0%;
    background: linear-gradient(90deg, #3b73f6, #22d3ee);
    box-shadow: 0 0 10px rgba(59,115,246,.7);
    transition: width .25s ease;
}

@keyframes stmt-row-enter {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.stmt-row-enter { animation: stmt-row-enter 0.4s ease-out; }

/* جدول صورتحساب — بدون اسکرول افقی، عرض ستون‌ها بر اساس محتوا */
.stmt-table {
    table-layout: auto;
    width: 100%;
    max-width: 100%;
    border-collapse: collapse;
}
.stmt-table th,
.stmt-table td {
    vertical-align: top;
}
.stmt-table .stmt-desc {
    width: 100%;
    word-break: break-word;
    overflow-wrap: break-word;
}
.stmt-table .stmt-amt {
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
    text-align: center;
    line-height: 1.4;
    letter-spacing: normal;
    font-variant-numeric: normal;
}

/* ===== ترنزیشن بین صفحات (محو نرم بدون پرش) ===== */
.page-enter-active { transition: opacity .16s ease; }
.page-leave-active { transition: opacity .1s ease; }
.page-enter-from, .page-leave-to { opacity: 0; }

/* ===== ترنزیشن مودال ===== */
.modal-enter-active, .modal-leave-active { transition: opacity .12s ease; }
.modal-enter-from, .modal-leave-to { opacity: 0; }
.pop-enter-active { transition: all .14s cubic-bezier(.34,1.56,.64,1); }
.pop-leave-active { transition: all .1s ease; }
.pop-enter-from, .pop-leave-to { opacity: 0; transform: scale(.94) translateY(8px); }

/* ===== شیت پایین صفحه ===== */
.sheet-enter-active { transition: transform .24s cubic-bezier(.32,.72,0,1), opacity .24s ease; }
.sheet-leave-active { transition: transform .18s ease, opacity .18s ease; }
.sheet-enter-from, .sheet-leave-to { opacity: 0; transform: translateY(100%); }

/* ===== اسکرول‌بار بدون رزرو فضا (overlay مثل موبایل) ===== */
/* پنهان به‌صورت پیش‌فرض و بدون اشغال هیچ فضایی در دو طرف */
::-webkit-scrollbar { width: 0; height: 0; background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; }
* { scrollbar-width: none; }

/* حذف فلش اعداد input */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* انیمیشن اسپینر */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .7s linear infinite; }

/* اسکلتون لودینگ */
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.skeleton {
    background: #e2e8f0;
    background-image: linear-gradient(90deg, #e2e8f0 0px, #f1f5f9 200px, #e2e8f0 400px);
    background-size: 800px 100%;
    animation: shimmer 1.4s infinite linear;
    border-radius: 8px;
}

[v-cloak] { display: none; }

/* ===== فضای امن iOS در حالت تمام‌صفحه PWA (status bar بالا و نوار خانه پایین) ===== */
.app-header-safe { padding-top: env(safe-area-inset-top, 0px); }
.app-bottomnav-safe { padding-bottom: env(safe-area-inset-bottom, 0px); }
.app-fab-safe { bottom: calc(6rem + env(safe-area-inset-bottom, 0px)); }

/* چاپ فاکتور */
@media print {
    .no-print { display: none !important; }
    body { background: #fff !important; }
    .print-area { box-shadow: none !important; }
}
