:root {
--wpst-primary: #4F46E5;
--wpst-primary-hover: #4338CA;
--wpst-surface: rgba(255, 255, 255, 0.95);
--wpst-text: #1E293B;
--wpst-text-muted: #64748B;
--wpst-border: #E2E8F0;
--wpst-radius: 16px;
--wpst-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
--wpst-shadow-hover: 0 20px 40px -10px rgba(79, 70, 229, 0.2);
}

.wpst-box, .wpst-modal-inner, .wpst-dashboard {
font-family: inherit;
direction: rtl;
color: var(--wpst-text);
}

.wpst-subtitle {
color: var(--wpst-text-muted);
font-size: 14px;
margin-bottom: 24px;
font-family: inherit;
}

.wpst-glass {
background: var(--wpst-surface);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(255,255,255,0.4);
}

.wpst-box {
border-radius: var(--wpst-radius);
padding: 32px;
max-width: 700px;
margin: 30px auto;
box-shadow: var(--wpst-shadow);
}

.wpst-box h3 { margin-top: 0; font-weight: 700; color: #0F172A; font-family: inherit; }

.wpst-input-group { display: flex; gap: 16px; margin-bottom: 16px; }
.wpst-input-group > input { margin-bottom: 0 !important; }

@media (max-width: 600px) {
.wpst-input-group { flex-direction: column; gap: 16px; }
}

.wpst-form input, .wpst-form textarea {
width: 100%;
padding: 14px 18px;
border: 1.5px solid var(--wpst-border);
border-radius: 12px;
font-size: 14px;
background: #F8FAFC;
transition: all 0.3s ease;
box-sizing: border-box;
outline: none;
font-family: inherit;
}

.wpst-form input:focus, .wpst-form textarea:focus {
border-color: var(--wpst-primary);
background: #FFF;
box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.wpst-btn {
background: var(--wpst-primary);
color: #fff;
border: none;
padding: 14px 28px;
border-radius: 12px;
cursor: pointer;
font-size: 15px;
font-weight: 600;
transition: all 0.3s ease;
display: inline-flex;
align-items: center;
justify-content: center;
font-family: inherit;}

.wpst-btn:hover {
background: var(--wpst-primary-hover);
box-shadow: var(--wpst-shadow-hover);
transform: translateY(-2px);
}

.wpst-btn-sm { padding: 8px 16px; font-size: 13px; border-radius: 8px; }

.wpst-alert {
padding: 14px 20px;
border-radius: 12px;
margin-bottom: 20px;
font-size: 14px;
font-weight: 500;
font-family: inherit;
}

.wpst-alert.success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.wpst-alert.error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

.wpst-badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; font-family: inherit; }
.wpst-badge.open    { background: #DBEAFE; color: #1E40AF; }
.wpst-badge.pending { background: #ECFDF5; color: #065F46; }
.wpst-badge.closed  { background: #F1F5F9; color: #475569; }

.wpst-table-responsive { overflow-x: auto; }
.wpst-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; font-family: inherit; }
.wpst-table th { background: #F8FAFC; font-weight: 600; color: var(--wpst-text-muted); padding: 14px; text-align: right; border-bottom: 2px solid var(--wpst-border); }
.wpst-table td { padding: 16px 14px; border-bottom: 1px solid var(--wpst-border); vertical-align: middle; }
.wpst-table tbody tr:hover td { background: #F8FAFC; }

.wpst-dashboard {
background: #fff;
border-radius: var(--wpst-radius);
padding: 24px;
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
border: 1px solid var(--wpst-border);
font-family: inherit;
}

.wpst-dash-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--wpst-border); padding-bottom: 16px; margin-bottom: 20px; }
.wpst-dash-header h3 { margin: 0; font-size: 18px; font-weight: 700; color: #0F172A; }

.wpst-empty-state {
text-align: center;
padding: 40px 20px;
color: var(--wpst-text-muted);
background: #F8FAFC;
border-radius: 12px;
border: 1px dashed #CBD5E1;
}

.wpst-modal { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.6); backdrop-filter: blur(4px); z-index: 9999; display: flex; align-items: center; justify-content: center; }
.wpst-modal-inner { background: var(--wpst-surface); border-radius: 20px; padding: 32px; max-width: 600px; width: 92%; max-height: 85vh; overflow-y: auto; position: relative; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); font-family: inherit; }
.wpst-modal-close { position: absolute; top: 16px; left: 16px; background: #F1F5F9; border: none; width: 36px; height: 36px; border-radius: 18px; font-size: 16px; cursor: pointer; color: #64748B; transition: background 0.2s; }
.wpst-modal-close:hover { background: #E2E8F0; color: #0F172A; }

.wpst-ticket-detail-view .wpst-thread { display: flex; flex-direction: column; gap: 12px; max-height: 45vh; overflow-y: auto; padding-right: 5px; margin-top: 15px; }
.wpst-ticket-detail-view .wpst-msg { padding: 12px 16px; border-radius: 12px; max-width: 90%; font-size: 14px; line-height: 1.6; }
.wpst-ticket-detail-view .wpst-msg-head { font-weight: 700; margin-bottom: 6px; font-size: 12px; opacity: 0.7; }
.wpst-ticket-detail-view .wpst-msg-visitor { background: #f1f5f9; color: #1e293b; align-self: flex-start; border-radius: 12px 12px 12px 4px; }
.wpst-ticket-detail-view .wpst-msg-admin { background: var(--wpst-primary); color: white; align-self: flex-end; border-radius: 12px 12px 4px 12px; }

/* === Frontend Styles Overrides for Custom Previews === */

.wpst-woo-consult-btn {
display: block;
width: 100%;
text-align: center;
padding: 12px 20px;
color: #fff !important;
border-radius: 8px;
font-weight: 600;
margin: 15px 0;
text-decoration: none !important;
transition: 0.3s;
font-size: 15px;
font-family: inherit;
}
.wpst-woo-consult-btn:hover {
opacity: 0.9;
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}