/* اجازه نمایش زیرمنوی کشویی بیرون از هدر (صفحه اصلی overflow:hidden دارد) */
.site-topbar:not(.site-topbar--mobile) {
    overflow: visible !important;
}
.site-topbar:not(.site-topbar--mobile) .site-topbar__nav {
    overflow: visible !important;
    max-height: none !important;
}
.site-topbar:not(.site-topbar--mobile) #navbar,
.site-topbar:not(.site-topbar--mobile) #trans-nav {
    overflow: visible !important;
}

/* زیرمنوی «سفارشات» — باز شدن با هاور */
#trans-nav li.om-orders-menu {
    position: relative !important;
    z-index: 500 !important;
    overflow: visible !important;
}
#trans-nav li.om-orders-menu > a {
    white-space: nowrap;
    font-size: inherit;
    font-weight: inherit;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    height: 40px !important;
    line-height: 40px !important;
    box-sizing: border-box !important;
}
#trans-nav li.om-orders-menu .om-front-notify {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 16px !important;
    height: 16px !important;
    padding: 0 4px !important;
    margin: 0 !important;
    border-radius: 4px !important;
    background: #ef4444 !important;
    color: #fff !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    letter-spacing: 0 !important;
    position: relative !important;
    top: -6px !important;
    left: auto !important;
    right: auto !important;
    flex: 0 0 auto !important;
    box-shadow: none !important;
    border: 0 !important;
}
#trans-nav li.om-orders-menu > ul > li > a .om-front-notify {
    top: 0 !important;
    border-radius: 4px !important;
}
#trans-nav li.om-orders-menu > ul {
    display: block !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    top: 40px !important;
    right: 0 !important;
    left: auto !important;
    min-width: 210px !important;
    width: max-content !important;
    z-index: 9999 !important;
    background: #ffffff !important;
    list-style: none !important;
    padding: 4px 0 !important;
    margin: 0 !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18) !important;
    border: 1px solid #dfe6e9 !important;
    height: auto !important;
    line-height: normal !important;
    transition: opacity .15s ease, visibility .15s ease;
}
#trans-nav li.om-orders-menu:hover > ul,
#trans-nav li.om-orders-menu:focus-within > ul {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}
#trans-nav li.om-orders-menu > ul > li,
#trans-nav li.om-orders-menu:hover > ul > li {
    float: none !important;
    display: block !important;
    position: static !important;
    width: 100% !important;
    height: 36px !important;
    line-height: 36px !important;
    background: #ffffff !important;
    font-size: 13px !important;
    padding: 0 !important;
    margin: 0 !important;
}
#trans-nav li.om-orders-menu > ul > li > a {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 16px !important;
    height: 36px !important;
    line-height: 36px !important;
    background: #ffffff !important;
    color: #2d3436 !important;
    text-decoration: none !important;
}
#trans-nav li.om-orders-menu > ul > li > a:hover {
    background: #eef6fc !important;
    color: #0984e3 !important;
}

/* —— پنل سفارشات مشتری —— */
.om-front {
    --om-blue: #0984e3;
    --om-blue-soft: #e8f3fc;
    --om-ink: #1e293b;
    --om-muted: #64748b;
    --om-line: #e2e8f0;
    --om-bg: #f8fafc;
    --om-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);
    direction: rtl;
    text-align: right;
    font-family: IRANSans, iransans, Tahoma, sans-serif;
}
.om-front .dw-cart-page-title {
    margin: 0 0 14px !important;
    color: var(--om-ink) !important;
    font-size: 26px !important;
    font-weight: 800 !important;
}
.om-front-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
    padding: 6px;
    background: var(--om-bg);
    border: 1px solid var(--om-line);
    border-radius: 12px;
    width: fit-content;
    max-width: 100%;
}
.om-front-tab {
    display: inline-flex;
    align-items: center;
    padding: 13px 22px;
    border-radius: 9px;
    background: transparent;
    color: var(--om-muted) !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 22px; /* 14 → +60% */
    transition: background .15s ease, color .15s ease;
}
.om-front-tab:hover {
    color: var(--om-blue) !important;
    background: #fff;
}
.om-front-tab.is-active {
    background: var(--om-blue) !important;
    color: #fff !important;
}

/* باکس اطلاع‌رسانی زیر تب‌ها — هم‌عرض جدول/پنل لیست */
.om-panel-notice {
    width: 100%;
    box-sizing: border-box;
    margin: 0 0 18px;
    background: #fff;
    border: 1px solid var(--om-line);
    border-radius: 14px;
    box-shadow: var(--om-shadow);
    overflow: hidden;
}
.om-panel-notice__body {
    padding: 18px 22px;
    color: var(--om-ink);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.75;
    white-space: pre-wrap;
    word-break: break-word;
    text-align: right;
    text-indent: 0 !important;
    margin: 0;
}
.om-panel-notice__body.is-rich {
    white-space: normal;
    font-weight: 500;
}
.om-panel-notice__body.is-rich p,
.om-panel-notice__body.is-rich div {
    margin: 0 0 0.55em;
    text-indent: 0 !important;
    padding: 0;
}
.om-panel-notice__body.is-rich p:last-child,
.om-panel-notice__body.is-rich div:last-child {
    margin-bottom: 0;
}
.om-panel-notice__body.is-rich ul,
.om-panel-notice__body.is-rich ol {
    margin: 0 0 0.55em;
    padding-right: 1.3em;
}
.om-panel-notice__body.is-rich a {
    color: var(--om-blue);
    text-decoration: underline;
}
/* رنگ/سایز ادیتور نباید توسط استایل والد خنثی شود */
.om-panel-notice__body.is-rich font[color],
.om-panel-notice__body.is-rich span[style*="color"],
.om-panel-notice__body.is-rich font[style*="color"] {
    /* presentational color از HTML حفظ می‌شود */
}
.om-panel-notice__body.is-rich b,
.om-panel-notice__body.is-rich strong {
    font-weight: 800;
}
.om-panel-notice__body.is-rich font[size="7"] { font-size: 1.9em; }
.om-panel-notice__body.is-rich font[size="6"] { font-size: 1.55em; }
.om-panel-notice__body.is-rich font[size="5"] { font-size: 1.3em; }
.om-panel-notice__body.is-rich font[size="4"] { font-size: 1.12em; }
.om-panel-notice__body.is-rich font[size="3"] { font-size: 1em; }
.om-panel-notice__body.is-rich font[size="2"] { font-size: 0.9em; }
.om-panel-notice__body.is-rich font[size="1"] { font-size: 0.8em; }
/* سایزهای نسبی که ادیتور با span می‌گذارد */
.om-panel-notice__body.is-rich span[style*="font-size"] {
  line-height: inherit;
}

.om-front .woocommerce-message,
.om-front .woocommerce-error {
    padding: 12px 14px;
    margin: 0 0 14px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-weight: 600;
}
.om-front .woocommerce-message:empty,
.om-front .woocommerce-error:empty {
    display: none !important;
}
.om-front .woocommerce-message {
    background: #ecfdf5;
    color: #047857;
    border-color: #a7f3d0;
}
.om-front .woocommerce-error {
    background: #fef2f2;
    color: #b91c1c;
    border-color: #fecaca;
}

.om-detail {
    margin-top: 4px;
}
.om-detail__toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 14px;
}
.om-print-btn {
    text-decoration: none !important;
}
.om-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--om-line);
    background: #fff;
    color: var(--om-ink) !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 13px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.om-back:hover {
    border-color: #bfdbfe;
    color: var(--om-blue) !important;
    background: var(--om-blue-soft);
}
.om-back::before {
    content: "→";
    font-weight: 400;
}

.om-panel {
    background: #fff;
    border: 1px solid var(--om-line);
    border-radius: 14px;
    padding: 0;
    margin: 0 0 28px;
    overflow: hidden;
    box-shadow: var(--om-shadow);
}
.om-panel--detail .om-panel__head {
    align-items: center;
}
.om-panel__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--om-line);
    background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}
.om-panel__identity {
    min-width: 0;
}
.om-kicker {
    margin: 0 0 6px;
    color: var(--om-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
}
.om-panel__title {
    margin: 0;
    color: var(--om-ink);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.01em;
}
.om-status {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid transparent;
}
.om-status.is-warn { background: #fff7ed; color: #c2410c; border-color: #fed7aa; }
.om-status.is-ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.om-status.is-done { background: var(--om-blue-soft); color: #0369a1; border-color: #bfdbfe; }
.om-status.is-bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.om-status.is-info { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }

.om-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding: 16px 18px;
    background: #f8fafc;
    border-bottom: 1px solid var(--om-line);
}
.om-meta__item {
    background: #fff;
    padding: 14px 16px;
    display: grid;
    gap: 6px;
    border: 1px solid var(--om-line);
    border-radius: 10px;
    min-height: 76px;
    box-sizing: border-box;
}
.om-meta__item--total {
    background: linear-gradient(180deg, #f0f7ff 0%, #fff 100%);
    border-color: #bfdbfe;
}
.om-meta__label {
    color: var(--om-muted);
    font-size: 12px;
    font-weight: 600;
}
.om-meta__item strong {
    color: var(--om-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.45;
}
.om-meta__price {
    color: var(--om-blue) !important;
    font-size: 18px !important;
}
.om-meta__price small {
    font-size: 12px;
    font-weight: 600;
    color: var(--om-muted);
}
.om-meta__item--deadline {
    align-content: start;
}
.om-section {
    padding: 0;
}
.om-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 16px 22px 10px;
}
.om-section__title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    color: var(--om-ink);
}
.om-section__hint {
    margin: 0;
    font-size: 12px;
    color: var(--om-muted);
    font-weight: 600;
}

.om-table-wrap {
    width: 100%;
    overflow-x: auto;
}
.om-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 !important;
    background: #fff;
}
.om-table th,
.om-table td {
    padding: 13px 16px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--om-line) !important;
    text-align: right !important;
    vertical-align: middle !important;
    font-size: 14px;
    color: var(--om-ink);
    background: transparent !important;
}
.om-table thead th {
    background: #f1f5f9 !important;
    color: var(--om-muted) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    white-space: nowrap;
}
.om-table tbody tr:hover td {
    background: #f8fbff !important;
}
.om-table__name {
    font-weight: 700;
    min-width: 200px;
    line-height: 1.55;
}
.om-table tfoot td {
    background: #f8fafc !important;
    font-weight: 800 !important;
    color: var(--om-ink) !important;
    border-bottom: 0 !important;
}
.om-table--detail .om-col-qty,
.om-table--detail .om-col-price,
.om-table--detail .om-col-sum,
.om-table--detail .om-col-act {
    text-align: center !important;
    white-space: nowrap;
}
.om-table--detail .om-col-qty { width: 110px; }
.om-table--detail .om-col-price { width: 160px; }
.om-table--detail .om-col-sum { width: 140px; font-variant-numeric: tabular-nums; font-weight: 700; }
.om-table--detail .om-col-act { width: 56px; }
.om-table--detail .om-num {
    display: inline-block;
    min-width: 2ch;
    font-weight: 700;
}
.om-price-stack {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.om-price-stack__val {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
}
.om-tfoot-label {
    text-align: left !important;
    color: var(--om-muted) !important;
    font-size: 14px !important;
}
.om-tfoot-sum {
    text-align: center !important;
    font-size: 16px !important;
    color: var(--om-blue) !important;
}
.om-tfoot-sum small {
    margin-right: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--om-muted);
}
.om-table--list td:last-child,
.om-table--list th:last-child {
    text-align: left !important;
    white-space: nowrap;
}

/* لیست فاکتورها: وسط‌چین، پدینگ متقارن، مبلغ یک‌خطی */
.om-panel--list .om-table-wrap {
    padding: 14px 10px 18px;
    box-sizing: border-box;
}
.om-table--invoices {
    table-layout: fixed;
    width: 100%;
}
.om-table--invoices th,
.om-table--invoices td {
    text-align: center !important;
    vertical-align: middle !important;
    padding: 12px 4px !important;
}
.om-table--invoices thead th {
    text-align: center !important;
}
.om-table--invoices th:nth-child(1),
.om-table--invoices td:nth-child(1) { width: 7%; }   /* ردیف */
.om-table--invoices th:nth-child(2),
.om-table--invoices td:nth-child(2) { width: 16%; }  /* نوع */
.om-table--invoices th:nth-child(3),
.om-table--invoices td:nth-child(3) { width: 13%; }  /* شماره */
.om-table--invoices th:nth-child(4),
.om-table--invoices td:nth-child(4) { width: 15%; }  /* تاریخ */
.om-table--invoices th:nth-child(5),
.om-table--invoices td:nth-child(5) {
    width: 26%;
    white-space: nowrap !important;
}  /* مبلغ + تومان */
.om-table--invoices th:nth-child(6),
.om-table--invoices td:nth-child(6) { width: 23%; }  /* عملیات */
.om-table--invoices td:last-child,
.om-table--invoices th:last-child {
    text-align: center !important;
}
.om-table--invoices .om-link-btn {
    justify-content: center;
    margin: 0 auto;
    white-space: nowrap;
}
/* فاکتور دیده‌نشده: نقطه کنار دکمه نمایش */
.om-table--invoices .om-inv-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    direction: ltr; /* دکمه، سپس نقطه در سمت راست فیزیکی */
}
.om-table--invoices .om-inv-action .om-link-btn {
    flex: 0 0 auto;
    margin: 0;
}
.om-table--invoices .om-unviewed-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--om-blue);
    visibility: hidden; /* جا رزرو می‌شود تا عرض دکمه ثابت بماند */
}
.om-table--invoices .om-unviewed-dot.is-on {
    visibility: visible;
}

.om-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 12px 8px;
}
.om-pager__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 10px 16px;
    border-radius: 8px;
    border: 1px solid var(--om-line);
    background: #fff;
    color: var(--om-ink) !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 14px;
}
.om-pager__btn:hover {
    border-color: #bfdbfe;
    color: var(--om-blue) !important;
    background: var(--om-blue-soft);
}
.om-pager__btn.is-disabled {
    opacity: .45;
    pointer-events: none;
    cursor: default;
}
.om-pager__info {
    font-size: 14px;
    font-weight: 700;
    color: var(--om-muted);
}
.om-pager__info small {
    margin-right: 6px;
    font-weight: 600;
}
.om-empty {
    text-align: center !important;
    color: var(--om-muted) !important;
    padding: 28px 16px !important;
}
.om-link-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 6px;
    background: var(--om-blue-soft);
    color: var(--om-blue) !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 13px;
}
.om-link-btn:hover {
    background: var(--om-blue);
    color: #fff !important;
}

.om-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    padding: 18px 20px 20px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid var(--om-line);
}
.om-action-card {
    background: #fff;
    border: 1px solid var(--om-line);
    border-radius: 12px;
    padding: 18px;
    display: grid;
    gap: 12px;
    margin: 0;
    align-content: start;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
}
.om-action-card h3 {
    margin: 0;
    font-size: 16px;
    color: var(--om-ink);
    font-weight: 800;
}
.om-action-card p {
    margin: 0;
    color: var(--om-muted);
    font-size: 13px;
    line-height: 1.7;
}
.om-action-card--alert {
    border-color: #fecaca;
    background: linear-gradient(180deg, #fff5f5 0%, #fff 100%);
}
.om-btn {
    appearance: none;
    border: 0;
    border-radius: 9px;
    padding: 12px 16px;
    font: inherit;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    color: #fff !important;
    text-align: center;
    transition: background .15s ease, transform .05s ease;
}
.om-btn:active { transform: translateY(1px); }
.om-btn--primary { background: var(--om-blue); }
.om-btn--primary:hover { background: #0873c7; }
.om-btn--accent { background: #0f766e; }
.om-btn--accent:hover { background: #0d9488; }
.om-file {
    display: grid;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    color: var(--om-ink);
}
.om-file input[type="file"] {
    width: 100%;
    padding: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    box-sizing: border-box;
}

.om-docs {
    padding: 16px 20px 20px;
    border-top: 1px solid var(--om-line);
}
.om-docs h3 {
    margin: 0 0 10px;
    font-size: 15px;
    color: var(--om-ink);
}
.om-docs ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.om-docs li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--om-line);
    border-radius: 8px;
    background: #fff;
}
.om-docs a {
    color: var(--om-blue) !important;
    font-weight: 700;
    text-decoration: none !important;
}
.om-docs time {
    color: var(--om-muted);
    font-size: 12px;
    white-space: nowrap;
}

.om-remain {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    margin-top: 2px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.4;
}
.om-remain.is-over {
    color: #b91c1c;
    background: #fee2e2;
}
.om-renew-note {
    margin: 0;
    padding: 14px 20px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.7;
    border-bottom: 1px solid var(--om-line);
    background: #fffbeb;
}
.om-row-changed td {
    background: #fff7ed !important;
}
.om-price-new {
    color: #c2410c !important;
}
.om-price-new .om-price-stack__val {
    font-weight: 800 !important;
}
.om-price-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #ffedd5;
    color: #c2410c;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}
.om-price-tag--bad {
    background: #fee2e2;
    color: #b91c1c;
}
.om-action-card--wide {
    grid-column: 1 / -1;
}
.om-action-card--compact {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
}
.om-action-card .om-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none !important;
    width: 100%;
    box-sizing: border-box;
}
.om-btn--inline {
    width: auto !important;
    min-width: 0;
    padding-inline: 18px;
    align-self: flex-start;
}
.om-row-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f2;
    color: #b91c1c;
    cursor: pointer;
}
.om-row-remove:hover {
    background: #fee2e2;
}
.om-confirm-row.is-removed {
    display: none !important;
}
.om-qty-input {
    width: 84px;
    max-width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    direction: ltr;
    background: #fff;
}
.om-qty-input:focus {
    outline: none;
    border-color: var(--om-blue);
    box-shadow: 0 0 0 3px rgba(9, 132, 227, 0.15);
}
.om-table--renew th:nth-child(5),
.om-table--renew td:nth-child(5) {
    white-space: nowrap;
}

/* مودال تایید پیش‌فاکتور */
body.om-modal-open {
    overflow: hidden;
}
.om-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
}
.om-modal[hidden] {
    display: none !important;
}
.om-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
}
.om-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(520px, 100%);
    max-height: min(86vh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    border: 1px solid var(--om-line);
    box-shadow: 0 20px 50px rgba(15, 23, 42, .28);
    display: flex;
    flex-direction: column;
}
.om-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--om-line);
    background: linear-gradient(180deg, #f8fbff 0%, #fff 100%);
}
.om-modal__head h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    color: var(--om-ink);
}
.om-modal__x {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--om-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.om-modal__x:hover { color: var(--om-ink); }
.om-modal__body {
    padding: 18px;
    display: grid;
    gap: 12px;
}
.om-modal__lead {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--om-ink);
    line-height: 1.7;
}
.om-modal__muted {
    margin: 0;
    font-size: 13px;
    color: var(--om-muted);
    line-height: 1.7;
}
.om-confirm-increase-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}
.om-confirm-increase-list li {
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    background: #fff7ed;
    color: #9a3412;
    font-size: 13px;
    line-height: 1.7;
}
.om-confirm-increase-list strong {
    color: #7c2d12;
}
.om-modal__notice {
    margin: 0;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    display: grid;
    gap: 8px;
}
.om-modal__notice p {
    margin: 0;
    font-size: 13px;
    color: #1e3a5f;
    line-height: 1.75;
}
.om-modal__foot {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 18px 16px;
    border-top: 1px solid var(--om-line);
    background: #f8fafc;
}
.om-modal__foot .om-btn {
    width: auto;
    min-width: 120px;
}
.om-btn--ghost {
    background: #fff !important;
    color: var(--om-ink) !important;
    border: 1px solid var(--om-line) !important;
}
.om-btn--ghost:hover {
    background: #f1f5f9 !important;
}

@media (max-width: 720px) {
    .om-panel__head {
        flex-direction: column;
        align-items: stretch;
    }
    .om-panel__title { font-size: 22px; }
    .om-meta { grid-template-columns: 1fr; }
    .om-section__head {
        padding-inline: 16px;
    }
    .om-actions {
        grid-template-columns: 1fr;
        padding: 14px;
    }
    .om-table--detail .om-col-price,
    .om-table--detail .om-col-sum {
        width: auto;
    }
    .om-modal__foot {
        flex-direction: column-reverse;
    }
    .om-modal__foot .om-btn {
        width: 100%;
    }
}

/*
 * موبایل واقعی (تاچ) — نه max-width، چون viewport قالب width=1175 است
 * و media(max-width:720) روی گوشی معمولاً match نمی‌شود.
 * فونت متن جدول‌ها حداقل ~۴۰٪ بزرگ‌تر از دسکتاپ.
 */
@media (pointer: coarse), (hover: none) {
    .om-front .om-table th,
    .om-front .om-table td {
        font-size: 29px !important; /* 26 → +10% */
        padding: 18px 12px !important;
        line-height: 1.55 !important;
    }
    .om-front .om-table thead th {
        font-size: 24px !important; /* 22 → +10% */
    }
    .om-front .om-table__name {
        font-size: 29px !important;
        line-height: 1.55 !important;
    }
    .om-front .om-table--list .om-link-btn {
        font-size: 25px !important; /* 23 → +10% */
        padding: 11px 16px;
    }
    .om-front .om-tfoot-label {
        font-size: 29px !important;
    }
    .om-front .om-tfoot-sum {
        font-size: 32px !important;
    }
    .om-front .om-tfoot-sum small {
        font-size: 24px !important;
    }
    .om-front .om-empty {
        font-size: 25px !important;
    }
    .om-front .om-table--detail .om-num,
    .om-front .om-price-stack__val {
        font-size: 29px !important;
    }
    .om-front .om-front-tab {
        font-size: 22px !important;
        padding: 13px 22px !important;
    }
    .om-front .om-pager__btn,
    .om-front .om-pager__info {
        font-size: 22px !important;
    }
    .om-front .om-panel--list .om-table-wrap {
        padding: 14px 10px 18px;
    }
    .om-front .om-table--invoices th,
    .om-front .om-table--invoices td {
        padding: 14px 3px !important;
    }
    .om-front .om-table--invoices th:nth-child(5),
    .om-front .om-table--invoices td:nth-child(5) {
        white-space: nowrap !important;
    }
}

/* وقتی کلاس موبایل قالب فعال است (fallback) */
body:has(.site-topbar--mobile) .om-front .om-table th,
body:has(.site-topbar--mobile) .om-front .om-table td {
    font-size: 29px !important;
    padding: 18px 12px !important;
    line-height: 1.55 !important;
}
body:has(.site-topbar--mobile) .om-front .om-table thead th {
    font-size: 24px !important;
}
body:has(.site-topbar--mobile) .om-front .om-table--list .om-link-btn {
    font-size: 25px !important;
    padding: 11px 16px;
}
