.st-wrap {
    --st-primary: #84BD00;
    --st-primary-dark: #79A908;
    --st-border: #e5e7eb;
    --st-bg: #f9fafb;
    --st-text: #1f2937;
    --st-muted: #6b7280;
    --st-radius: 10px;
    font-family: inherit;
    color: var(--st-text);
    max-width: 850px;
    margin: 0 auto;
    line-height: 1.8;
}

.st-wrap input,
.st-wrap textarea,
.st-wrap select,
.st-wrap button {
    font-family: inherit;
}

.st-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.st-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

/* ============================================================
   دکمه «ارسال تیکت جدید» (و دکمه ورود به حساب کاربری)
   برای تغییر رنگ/استایل این دکمه، فقط همین بلاک را ویرایش کنید.
   ============================================================ */
.st-btn-new-ticket {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--st-radius);
    border: none;
    background: #84BD00;
    color: #fff !important;
    text-decoration: none;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: all .15s ease;
}
.st-btn-new-ticket:hover {
    background: #79A908;
    border-color: none;
    color: #fff !important;
}

/* ============================================================
   دکمه «مشاهده لیست همه تیکت‌ها» / «بازگشت به لیست تیکت‌ها»
   برای تغییر رنگ/استایل این دکمه، فقط همین بلاک را ویرایش کنید.
   ============================================================ */
.st-btn-view-list {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #84BD00;
    color: #fff !important;
    border-radius: 10px;
    padding: 5px 25px;
    margin-top: 20px;
    border: none;
    text-decoration: none;
    font-size: 15px;
    font-family: inherit;
    cursor: pointer;
    transition: color .15s ease;
}
.st-btn-view-list:hover {
    background:#79A908;
    color: #fff !important;
    text-decoration: none;
}

/* ============================================================
   دکمه‌های «ارسال تیکت» و «ارسال پاسخ» (سابمیت فرم‌ها)
   عمداً بدون رنگ/بوردر/بک‌گراند اختصاصی رها شده‌اند تا ظاهر
   پیش‌فرض دکمه‌ی قالب شما (استایل بومی <button>) روی آن‌ها اعمال شود.
   اگر قالب شما دکمه‌ها را استایل نمی‌دهد و می‌خواهید این دکمه‌ها
   ظاهر مشخصی داشته باشند، رنگ/پدینگ دلخواه را همین‌جا اضافه کنید.
   ============================================================ */
.st-submit-btn {
    margin-top: 6px;
    padding:15px 25px !important;
    width: 100% !important;
}

.st-inline-form { margin-top: 4px; }

.st-notice {
    padding: 12px 16px;
    border-radius: var(--st-radius);
    margin-bottom: 16px;
    font-size: 14px;
}
.st-notice-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.st-notice-error   { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.st-notice-info    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.st-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--st-border);
    margin-bottom: 16px;
    overflow-x: auto;
}

.st-tab {
    padding: 10px 14px;
    text-decoration: none;
    color: var(--st-muted);
    font-size: 14px;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.st-tab-active { color: var(--st-primary); border-color: var(--st-primary); font-weight: 600; }

.st-list { display: flex; flex-direction: column; gap: 8px; }

.st-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border: 1px solid var(--st-border);
    border-radius: var(--st-radius);
    text-decoration: none;
    color: var(--st-text);
    transition: box-shadow .15s ease, border-color .15s ease;
}
.st-list-item:hover { border-color: var(--st-primary); box-shadow: 0 2px 8px rgba(0,0,0,.04); }

.st-list-item-main { display: flex; flex-direction: column; gap: 4px; }
.st-list-item-title { font-weight: 600; font-size: 15px; color:#2d2c2c; }
.st-list-item-date { font-size: 12px; color: var(--st-muted); }

.st-empty { text-align: center; padding: 40px 0; color: var(--st-muted); font-size: 14px; }

.st-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.st-badge-pending   { background: #fef3c7; color: #92400e; }
.st-badge-reviewing { background: #dbeafe; color: #1e40af; }
.st-badge-answered  { background: #d1fae5; color: #065f46; }
.st-badge-trash     { background: #fee2e2; color: #991b1b; }

.st-pagination { display: flex; gap: 6px; margin-top: 16px; justify-content: center; }
.st-page-link {
    padding: 6px 12px;
    border: 1px solid var(--st-border);
    border-radius: 6px;
    text-decoration: none;
    color: var(--st-text);
    font-size: 13px;
}
.st-page-active { background: var(--st-primary); border-color: var(--st-primary); color: #fff; }

.st-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }

.st-label { font-size: 13px; font-weight: 600; color: var(--st-muted); margin-top: 15px;}

/* ============================================================
   فیلدهای فرم (عنوان تیکت / متن پیام)
   عمداً بدون رنگ، بوردر، بک‌گراند یا استایل فوکوس اختصاصی رها شده‌اند
   تا ظاهر آن‌ها کاملاً از استایل پیش‌فرض قالب شما پیروی کند.
   فقط عرض کامل و box-sizing نگه داشته شده تا از کادر فرم بیرون نزنند.
   ============================================================ */
.st-input, .st-textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--st-border);
    
}
.st-input:focus,
.st-textarea:focus {
    border-color: var(--st-primary) !important;
    outline: none;
    box-shadow: none;
}

.st-textarea { min-height: 120px; }

.st-dropzone {
    position: relative;
    border: 2px dashed var(--st-border);
    border-radius: var(--st-radius);
    background: var(--st-bg);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}
.st-dropzone:hover, .st-dropzone.st-dragover { border-color: var(--st-primary); background: #eff6ff; }

.st-dropzone-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--st-muted); font-size: 13px; pointer-events: none; }
.st-dropzone-hint { font-size: 11px; opacity: .8; }

.st-dropzone-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.st-upload-alert {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    font-size: 13px;
}

.st-file-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.st-file-row {
    font-size: 13px;
    background: var(--st-bg);
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid var(--st-border);
}
.st-file-row-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.st-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-file-status { font-size: 12px; white-space: wrap; }
.st-file-status-done { color: #059669; font-weight: 700; }
.st-file-status-error { color: #dc2626; }
.st-file-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.st-file-remove { color: #dc2626; cursor: pointer; font-size: 13px; background: none; border: none; }
.st-file-retry { color: var(--st-primary-dark); cursor: pointer; font-size: 13px; background: none; border: none; text-decoration: none; }

.st-progress-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}
.st-progress-track {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}
.st-progress-bar {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: var(--st-primary);
    transition: width .15s ease;
}
.st-progress-percent { font-size: 11px; color: var(--st-muted); min-width: 32px; text-align: left; }

.st-file-row.st-file-done .st-file-name { color: var(--st-text); }
.st-file-row.st-file-error { border-color: #fecaca; background: #fef2f2; }

.st-upload-status {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
}
.st-upload-status-waiting { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.st-upload-status-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }

.st-ticket-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }

.st-conversation { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }

.st-message {
    padding: 14px 16px;
    border-radius: var(--st-radius);
    border: 1px solid var(--st-border);
    background: #f8f9fa;
    max-width: 90%;
}
.st-message-user { align-self: flex-start; }
.st-message-admin { align-self: flex-end; background: #eff6ff; border-color: #bfdbfe; }

.st-message-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; color: var(--st-muted); margin-bottom: 6px; }
.st-message-sender { font-weight: bold; font-size: 13px }
.st-message-body { font-size: 16px; white-space: pre-wrap; word-break: break-word; }

.st-attachments { margin-top: 10px; display: flex; flex-direction: column; gap: 4px;}
.st-attachment { font-size: 13px; color: var(--st-primary); text-decoration: none;  background: #ffffff; border-radius: 10px; border: 1px solid #f0f0f0; padding: 1px 5px;}
.st-attachment:hover { text-decoration: underline; }

.st-form-actions { display: flex; justify-content: flex-start; }

@media (max-width: 600px) {
    .st-message { max-width: 100%; }
}
