Add a dedicated disconnect flow that truncates mappings/queue, clears business-scoped IDs (shipping/fee/warehouse/bank), bridge token, sync meta, and best-effort Hesabix Woo bridge settings. Change-business and setup-complete now require this cleanup so reconnecting to a new business cannot reuse stale links. Also expose delete-data-on-uninstall in settings. Co-authored-by: Cursor <cursoragent@cursor.com>
774 lines
13 KiB
CSS
Executable file
774 lines
13 KiB
CSS
Executable file
/**
|
|
* Admin Styles for Hesabix V2
|
|
*
|
|
* @since 2.0.0
|
|
* @package Hesabix_V2
|
|
*/
|
|
|
|
/* RTL Support + IRANYekanWeb font (بدون اعمال به همهٔ زیرمجموعهها تا با Dashicons تداخل نگیرد) */
|
|
.hesabix-v2-wrap {
|
|
box-sizing: border-box;
|
|
font-family: 'IRANYekanWeb', sans-serif;
|
|
}
|
|
|
|
.hesabix-v2-wrap table,
|
|
.hesabix-v2-wrap input,
|
|
.hesabix-v2-wrap select,
|
|
.hesabix-v2-wrap textarea,
|
|
.hesabix-v2-wrap button,
|
|
.hesabix-v2-wrap label,
|
|
.hesabix-v2-wrap .button {
|
|
box-sizing: border-box;
|
|
font-family: 'IRANYekanWeb', sans-serif;
|
|
}
|
|
|
|
.hesabix-v2-wrap {
|
|
direction: rtl;
|
|
text-align: right;
|
|
}
|
|
|
|
/* Cards */
|
|
.hesabix-v2-card {
|
|
background: #fff;
|
|
padding: 20px;
|
|
margin: 20px 0;
|
|
border: 1px solid #ccd0d4;
|
|
border-radius: 4px;
|
|
box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
|
}
|
|
|
|
.hesabix-v2-card h2 {
|
|
margin-top: 0;
|
|
padding-bottom: 10px;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
/* Stats */
|
|
.hesabix-v2-stats {
|
|
display: flex;
|
|
gap: 20px;
|
|
margin: 20px 0;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.stat-box {
|
|
flex: 1;
|
|
min-width: 200px;
|
|
background: #fff;
|
|
padding: 20px;
|
|
border: 1px solid #ccd0d4;
|
|
border-radius: 4px;
|
|
text-align: center;
|
|
box-shadow: 0 1px 1px rgba(0,0,0,.04);
|
|
}
|
|
|
|
.stat-box h3 {
|
|
margin: 0 0 10px 0;
|
|
font-size: 14px;
|
|
color: #666;
|
|
text-transform: none;
|
|
letter-spacing: normal;
|
|
}
|
|
|
|
.stat-number {
|
|
font-size: 48px;
|
|
font-weight: bold;
|
|
color: #2271b1;
|
|
margin: 10px 0;
|
|
line-height: 1;
|
|
}
|
|
|
|
.stat-detail {
|
|
font-size: 14px;
|
|
color: #666;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
/* Status indicators */
|
|
.status-synced,
|
|
.status-success {
|
|
color: #00a32a;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.status-pending {
|
|
color: #f0b849;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.status-error {
|
|
color: #d63638;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Tables */
|
|
.hesabix-v2-wrap table.widefat {
|
|
border: 1px solid #ccd0d4;
|
|
margin-top: 15px;
|
|
}
|
|
|
|
.hesabix-v2-wrap table.widefat th {
|
|
font-weight: 600;
|
|
background: #f6f7f7;
|
|
}
|
|
|
|
/* Buttons */
|
|
.hesabix-v2-wrap .button {
|
|
font-family: 'IRANYekanWeb', sans-serif;
|
|
}
|
|
|
|
.hesabix-v2-wrap .button-primary {
|
|
background: #2271b1;
|
|
border-color: #2271b1;
|
|
}
|
|
|
|
.hesabix-v2-wrap .button-primary:hover {
|
|
background: #135e96;
|
|
border-color: #135e96;
|
|
}
|
|
|
|
/* Setup Wizard */
|
|
.hesabix-v2-setup-wizard {
|
|
max-width: 800px;
|
|
margin: 50px auto;
|
|
}
|
|
|
|
.wizard-container {
|
|
background: #fff;
|
|
padding: 30px;
|
|
border: 1px solid #ccd0d4;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,.1);
|
|
}
|
|
|
|
.wizard-step {
|
|
min-height: 300px;
|
|
}
|
|
|
|
.wizard-step h2 {
|
|
color: #2271b1;
|
|
margin-top: 0;
|
|
}
|
|
|
|
.hesabix-v2-setup-wizard #businesses-list {
|
|
margin: 20px 0;
|
|
}
|
|
|
|
/* Business Selection */
|
|
.business-item {
|
|
padding: 15px;
|
|
border: 1px solid #ddd;
|
|
margin: 10px 0;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.business-item:hover {
|
|
background: #f5f5f5;
|
|
border-color: #2271b1;
|
|
}
|
|
|
|
.business-item.selected {
|
|
background: #e3f2fd;
|
|
border-color: #2271b1;
|
|
border-width: 2px;
|
|
}
|
|
|
|
/* Loading */
|
|
.hesabix-v2-loading {
|
|
text-align: center;
|
|
padding: 40px;
|
|
}
|
|
|
|
.hesabix-v2-loading::after {
|
|
content: "...";
|
|
animation: dots 1.5s steps(4, end) infinite;
|
|
}
|
|
|
|
@keyframes dots {
|
|
0%, 20% { content: "."; }
|
|
40% { content: ".."; }
|
|
60%, 100% { content: "..."; }
|
|
}
|
|
|
|
/* Progress Bar */
|
|
progress {
|
|
width: 100%;
|
|
height: 30px;
|
|
border: 1px solid #ccd0d4;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
progress::-webkit-progress-bar {
|
|
background-color: #f0f0f1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
progress::-webkit-progress-value {
|
|
background-color: #2271b1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
progress::-moz-progress-bar {
|
|
background-color: #2271b1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
/* Notices */
|
|
.hesabix-v2-wrap .notice {
|
|
margin: 15px 0;
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 782px) {
|
|
.hesabix-v2-stats {
|
|
flex-direction: column;
|
|
}
|
|
|
|
.stat-box {
|
|
min-width: 100%;
|
|
}
|
|
|
|
.hesabix-v2-setup-wizard {
|
|
margin: 20px;
|
|
}
|
|
|
|
.wizard-container {
|
|
padding: 15px;
|
|
}
|
|
}
|
|
|
|
/* Dashboard specific */
|
|
.hesabix-v2-dashboard {
|
|
max-width: 1200px;
|
|
}
|
|
|
|
/* Form elements */
|
|
.hesabix-v2-wrap input[type="text"],
|
|
.hesabix-v2-wrap input[type="email"],
|
|
.hesabix-v2-wrap input[type="password"],
|
|
.hesabix-v2-wrap select,
|
|
.hesabix-v2-wrap textarea {
|
|
font-family: inherit;
|
|
direction: rtl;
|
|
text-align: right;
|
|
}
|
|
|
|
/* Connection status badge */
|
|
.connection-badge {
|
|
display: inline-block;
|
|
padding: 5px 15px;
|
|
border-radius: 12px;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.connection-badge.connected {
|
|
background: #d4edda;
|
|
color: #155724;
|
|
}
|
|
|
|
.connection-badge.disconnected {
|
|
background: #f8d7da;
|
|
color: #721c24;
|
|
}
|
|
|
|
/* Animation */
|
|
@keyframes fadeIn {
|
|
from { opacity: 0; transform: translateY(-10px); }
|
|
to { opacity: 1; transform: translateY(0); }
|
|
}
|
|
|
|
.hesabix-v2-card {
|
|
animation: fadeIn 0.3s ease-in-out;
|
|
}
|
|
|
|
/* Tooltip */
|
|
.hesabix-tooltip {
|
|
position: relative;
|
|
display: inline-block;
|
|
cursor: help;
|
|
}
|
|
|
|
.hesabix-tooltip:hover::after {
|
|
content: attr(data-tooltip);
|
|
position: absolute;
|
|
bottom: 125%;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: #333;
|
|
color: #fff;
|
|
padding: 5px 10px;
|
|
border-radius: 4px;
|
|
white-space: nowrap;
|
|
z-index: 1000;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* Connection snapshot + reconnect warning modal */
|
|
.hesabix-v2-muted {
|
|
color: #646970;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.hesabix-v2-connection-panel {
|
|
margin: 10px 0 14px;
|
|
padding: 14px;
|
|
background: #fcfcfc;
|
|
border: 1px solid #dcdcde;
|
|
border-radius: 4px;
|
|
max-width: 720px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.hesabix-v2-connection-panel--settings {
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.hesabix-v2-connection-detail-table {
|
|
margin-top: 10px;
|
|
background: #fff !important;
|
|
}
|
|
|
|
.hesabix-v2-connection-detail-table th {
|
|
width: 32%;
|
|
vertical-align: top;
|
|
font-weight: 600;
|
|
color: #50575e;
|
|
}
|
|
|
|
.hesabix-v2-connection-note {
|
|
margin: 0 0 8px;
|
|
}
|
|
|
|
.hesabix-v2-warn-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 100000;
|
|
background: rgba(0, 0, 0, 0.45);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 24px;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.hesabix-v2-warn-dialog {
|
|
max-width: 520px;
|
|
width: 100%;
|
|
background: #fff;
|
|
border-radius: 6px;
|
|
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
|
|
overflow: hidden;
|
|
direction: rtl;
|
|
text-align: right;
|
|
box-sizing: border-box;
|
|
font-size: 14px;
|
|
line-height: 1.65;
|
|
font-family: 'IRANYekanWeb', sans-serif;
|
|
}
|
|
|
|
.hesabix-v2-warn-dialog__header {
|
|
padding: 16px 20px;
|
|
border-bottom: 1px solid #dcdcde;
|
|
background: #fff8eb;
|
|
}
|
|
|
|
.hesabix-v2-warn-dialog__header h3 {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
line-height: 1.35;
|
|
color: #1d2327;
|
|
}
|
|
|
|
.hesabix-v2-warn-dialog__body {
|
|
padding: 18px 20px;
|
|
color: #1d2327;
|
|
}
|
|
|
|
.hesabix-v2-warn-dialog__body p {
|
|
margin: 0;
|
|
}
|
|
|
|
.hesabix-v2-warn-dialog__footer {
|
|
padding: 12px 20px 16px;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
justify-content: flex-end;
|
|
border-top: 1px solid #dcdcde;
|
|
background: #f6f7f7;
|
|
}
|
|
|
|
.hesabix-v2-connection-actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.hesabix-v2-warn-status {
|
|
margin-top: 10px !important;
|
|
color: #b32d2e;
|
|
}
|
|
|
|
/* تنظیمات — نکات اتصال (هشدار) */
|
|
.hesabix-v2-connection-notes {
|
|
margin: 0 0 18px !important;
|
|
padding: 10px 12px 14px !important;
|
|
max-width: 860px;
|
|
}
|
|
|
|
.hesabix-v2-connection-notes-list {
|
|
margin: 8px 0 10px !important;
|
|
padding-right: 1.25em !important;
|
|
padding-inline-start: 1.35em !important;
|
|
list-style: disc;
|
|
line-height: 1.65;
|
|
}
|
|
|
|
.hesabix-v2-connection-notes-list li {
|
|
margin: 6px 0;
|
|
}
|
|
|
|
.hesabix-v2-connection-notes-ark {
|
|
margin: 10px 0 0 !important;
|
|
font-size: 13px;
|
|
color: #1d2327;
|
|
line-height: 1.6;
|
|
padding-top: 8px;
|
|
border-top: 1px solid rgba(0, 0, 0, 0.08);
|
|
}
|
|
|
|
.hesabix-v2-settings-test-result {
|
|
clear: both;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.hesabix-v2-settings-test-result .notice {
|
|
margin: 6px 0 0 !important;
|
|
}
|
|
|
|
/* فهرست سفارشها — وضعیت حسابیکس */
|
|
.hesabix-v2-orders-page .hesabix-v2-orders-feedback .notice.inline {
|
|
margin: 6px 0 !important;
|
|
display: block;
|
|
}
|
|
|
|
.hesabix-v2-badge {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
border-radius: 3px;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.hesabix-v2-badge-ok {
|
|
background: #d5f0dd;
|
|
color: #14532d;
|
|
}
|
|
|
|
.hesabix-v2-badge-muted {
|
|
background: #f0f0f1;
|
|
color: #50575e;
|
|
}
|
|
|
|
.hesabix-v2-badge-error {
|
|
background: #fcf0f1;
|
|
color: #8a1116;
|
|
}
|
|
|
|
.hesabix-v2-badge-pending {
|
|
background: #fff8e5;
|
|
color: #684e07;
|
|
}
|
|
|
|
.hesabix-v2-badge-warn {
|
|
background: #ffe7c2;
|
|
color: #6a3b00;
|
|
}
|
|
|
|
.hesabix-v2-orders-help ul {
|
|
max-width: 900px;
|
|
}
|
|
|
|
/* —— Profit column / order panel —— */
|
|
.hesabix-v2-profit-amount {
|
|
font-weight: 700;
|
|
font-variant-numeric: tabular-nums;
|
|
letter-spacing: -0.01em;
|
|
}
|
|
|
|
.hesabix-v2-profit-positive {
|
|
color: #0f6b3c;
|
|
}
|
|
|
|
.hesabix-v2-profit-negative {
|
|
color: #b42318;
|
|
}
|
|
|
|
.hesabix-v2-profit-pct,
|
|
.hesabix-v2-profit-empty {
|
|
font-size: 12px;
|
|
color: #646970;
|
|
}
|
|
|
|
.hesabix-v2-profit-curr-hint {
|
|
font-size: 11px;
|
|
color: #646970;
|
|
}
|
|
|
|
.hesabix-v2-profit-details__warn {
|
|
color: #8a6116;
|
|
font-size: 11px;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.hesabix-v2-refresh-profit.button-link {
|
|
font-size: 11px;
|
|
padding: 0;
|
|
height: auto;
|
|
line-height: 1.4;
|
|
text-decoration: none;
|
|
color: #2271b1;
|
|
}
|
|
|
|
.hesabix-v2-refresh-profit.button-link:hover {
|
|
color: #135e96;
|
|
}
|
|
|
|
.hesabix-v2-profit-panel {
|
|
margin: 12px 0 16px;
|
|
padding: 12px;
|
|
border-radius: 8px;
|
|
background: linear-gradient(160deg, #f7faf8 0%, #eef4f8 100%);
|
|
border: 1px solid #d8e2ea;
|
|
}
|
|
|
|
.hesabix-v2-profit-panel__head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.hesabix-v2-profit-hero {
|
|
margin: 0 0 8px;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: baseline;
|
|
gap: 6px 10px;
|
|
}
|
|
|
|
.hesabix-v2-profit-hero__label {
|
|
display: block;
|
|
width: 100%;
|
|
font-size: 11px;
|
|
color: #50575e;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.hesabix-v2-profit-hero__value {
|
|
font-size: 18px;
|
|
font-weight: 800;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.hesabix-v2-profit-hero__pct {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
opacity: 0.85;
|
|
}
|
|
|
|
.hesabix-v2-profit-details {
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
|
|
.hesabix-v2-profit-details li {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
padding: 4px 0;
|
|
border-top: 1px solid rgba(0, 0, 0, 0.06);
|
|
font-size: 12px;
|
|
}
|
|
|
|
.hesabix-v2-profit-details__meta {
|
|
color: #646970;
|
|
font-weight: 400;
|
|
}
|
|
|
|
/* —— Marketplace upsell banner —— */
|
|
.hesabix-v2-mp-banner {
|
|
position: relative;
|
|
overflow: hidden;
|
|
margin: 16px 0 20px;
|
|
border-radius: 14px;
|
|
border: 1px solid #c9d8e8;
|
|
background: linear-gradient(135deg, #0b3d5c 0%, #1a5f7a 42%, #0e4d6b 100%);
|
|
color: #f4f8fb;
|
|
box-shadow: 0 10px 28px rgba(11, 61, 92, 0.18);
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__glow {
|
|
position: absolute;
|
|
inset: -40% auto auto -10%;
|
|
width: 55%;
|
|
height: 140%;
|
|
background: radial-gradient(circle at center, rgba(120, 200, 220, 0.28), transparent 68%);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__content {
|
|
position: relative;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 20px 28px;
|
|
align-items: stretch;
|
|
justify-content: space-between;
|
|
padding: 22px 24px;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__copy {
|
|
flex: 1 1 320px;
|
|
max-width: 640px;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__eyebrow {
|
|
margin: 0 0 6px;
|
|
font-size: 11px;
|
|
font-weight: 700;
|
|
letter-spacing: 0.06em;
|
|
text-transform: uppercase;
|
|
color: #9ed4e8;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__title {
|
|
margin: 0 0 8px;
|
|
font-size: 20px;
|
|
line-height: 1.35;
|
|
font-weight: 800;
|
|
color: #fff;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__text {
|
|
margin: 0 0 12px;
|
|
font-size: 13px;
|
|
line-height: 1.7;
|
|
color: rgba(244, 248, 251, 0.88);
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__alert {
|
|
margin: 0 0 12px;
|
|
padding: 8px 10px;
|
|
border-radius: 6px;
|
|
background: rgba(255, 196, 120, 0.16);
|
|
border: 1px solid rgba(255, 196, 120, 0.35);
|
|
color: #ffe7c2;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__alert--soft {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
border-color: rgba(255, 255, 255, 0.18);
|
|
color: rgba(244, 248, 251, 0.9);
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
align-items: center;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__cta {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 8px 16px;
|
|
border-radius: 8px;
|
|
background: #f0b429;
|
|
color: #1a2a33 !important;
|
|
font-weight: 700;
|
|
font-size: 13px;
|
|
text-decoration: none !important;
|
|
border: none;
|
|
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12);
|
|
transition: transform 0.15s ease, background 0.15s ease;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__cta:hover {
|
|
background: #ffc94a;
|
|
transform: translateY(-1px);
|
|
color: #122028 !important;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__refresh,
|
|
.hesabix-v2-mp-banner__dismiss {
|
|
background: transparent;
|
|
border: 1px solid rgba(255, 255, 255, 0.28);
|
|
color: #e8f3f8;
|
|
border-radius: 8px;
|
|
padding: 7px 12px;
|
|
font-size: 12px;
|
|
cursor: pointer;
|
|
font-family: inherit;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__refresh:hover,
|
|
.hesabix-v2-mp-banner__dismiss:hover {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__aside {
|
|
flex: 0 1 200px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
gap: 14px;
|
|
min-width: 160px;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__mark {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 8px;
|
|
padding: 14px 12px;
|
|
border-radius: 12px;
|
|
background: rgba(255, 255, 255, 0.08);
|
|
border: 1px solid rgba(255, 255, 255, 0.14);
|
|
font-weight: 800;
|
|
font-size: 15px;
|
|
letter-spacing: 0.02em;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__perks {
|
|
margin: 0;
|
|
padding: 0 0 0 16px;
|
|
font-size: 12px;
|
|
line-height: 1.7;
|
|
color: rgba(244, 248, 251, 0.85);
|
|
}
|
|
|
|
.hesabix-v2-bridge-hint {
|
|
border-right: 4px solid #2271b1;
|
|
}
|
|
|
|
@media (max-width: 782px) {
|
|
.hesabix-v2-mp-banner__title {
|
|
font-size: 17px;
|
|
}
|
|
|
|
.hesabix-v2-mp-banner__aside {
|
|
width: 100%;
|
|
}
|
|
}
|