/* ظرف اصلی فرم‌ها و پنل‌های افزونه را با عرض خوانا نمایش می‌دهیم. */
@font-face { font-family: Vazirmatn; src: url('../fonts/Vazirmatn.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
.cwm-wrap { max-width: 1040px; margin: 24px auto; padding: 24px; direction: rtl; text-align: right; background:#f1f5f9; color:#1e3a5f; border-radius:18px; font: 16px/1.9 Vazirmatn,Tahoma,sans-serif; box-sizing:border-box; }
.cwm-wrap *, .cwm-wrap input, .cwm-wrap select, .cwm-wrap textarea, .cwm-wrap button { font-family:inherit; box-sizing:border-box; }
.cwm-wrap h3 { border-inline-start:5px solid #0f766e; padding-inline-start:14px; font-size:1.45em; }
.cwm-wrap a { color:#0f766e; text-decoration:underline; }
.cwm-card { padding:20px; margin:16px 0; border:1px solid #dbe4ed; background:#fff; border-radius:12px; overflow-wrap:anywhere; }
.cwm-message { background:#f1f5f9; border-inline-start:3px solid #0f766e; margin:12px 0; padding:12px; border-radius:8px; white-space:normal; }
.cwm-badge { display:inline-block; background:#e1f3f0; color:#115e59; padding:4px 12px; border-radius:20px; }
.cwm-wrap summary { cursor:pointer; font-weight:600; padding:8px 0; }
.cwm-wrap :focus-visible { outline:3px solid #0f766e; outline-offset:3px; }
.cwm-form input,.cwm-form textarea,.cwm-form select { border:1px solid #b5c3d2; border-radius:8px; background:white; color:#182c43; font-size:16px; min-width:0; }
.cwm-wrap .cwm-button { border:0; background:#0f766e; color:#fff; border-radius:8px; font-size:16px; min-height:44px; }
.cwm-wrap .cwm-button:hover { background:#115e59; }
@media(max-width:600px) { .cwm-wrap { padding:12px; margin:12px 0; border-radius:10px; } .cwm-card { padding:12px; } .cwm-form .cwm-button { width:100%; } .cwm-table { font-size:14px; } }

/* فرم‌ها را به صورت ستونی و با فاصله مناسب بین فیلدها نمایش می‌دهیم. */
.cwm-form { display: grid; gap: 14px; }

/* label هر فیلد را خوانا و کمی پررنگ نمایش می‌دهیم. */
.cwm-form label { display: grid; gap: 6px; font-weight: 600; }

/* ورودی‌ها، لیست‌ها و textareaها را هم‌اندازه و سازگار با قالب سایت می‌کنیم. */
.cwm-form input, .cwm-form select, .cwm-form textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; }

/* بخش پرونده جدید را از بقیه فرم جدا می‌کنیم. */
.cwm-fieldset { border: 1px solid #dcdcde; padding: 16px; display: grid; gap: 12px; }

/* دکمه اصلی عملیات را خوانا و قابل کلیک نمایش می‌دهیم. */
.cwm-button { width: fit-content; padding: 10px 20px; cursor: pointer; }

/* ظاهر عمومی پیام‌ها را تعیین می‌کنیم. */
.cwm-notice { padding: 12px 14px; margin: 12px 0; border: 1px solid; }

/* پیام موفقیت را با کنتراست ملایم نمایش می‌دهیم. */
.cwm-success { background: #f0f8f1; border-color: #7aa782; }

/* پیام خطا را با کنتراست ملایم نمایش می‌دهیم. */
.cwm-error { background: #fff1f1; border-color: #c98282; }

/* متن راهنما را کمی کم‌رنگ‌تر از متن اصلی نشان می‌دهیم. */
.cwm-help { opacity: .78; }

/* برای جداکردن بخش‌های پنل از خط افقی استفاده می‌کنیم. */
.cwm-separator { margin: 28px 0; }

/* در نمایش موبایل، جدول را قابل اسکرول افقی می‌کنیم. */
.cwm-table-wrap { overflow-x: auto; }

/* جدول اطلاعات را با عرض کامل نمایش می‌دهیم. */
.cwm-table { width: 100%; border-collapse: collapse; }

/* سلول‌های جدول را با حاشیه و فاصله داخلی مشخص می‌کنیم. */
.cwm-table th, .cwm-table td { border: 1px solid #dcdcde; padding: 9px; vertical-align: top; }

/* کارت آماری، فهرست فشرده و جزئیات مستقل نسخه سوم. */
/* کارپوشه: دسترسی غیرمجاز بدون پیوند و با توضیح متنی مشخص است. */
.cwm-role-choices label{display:flex;align-items:center;gap:8px;}
.cwm-workfolder-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;}
.cwm-wrap .cwm-workfolder-card{display:flex;flex-direction:column;gap:14px;padding:26px;border-radius:14px;background:#1e3a5f;color:#fff;text-decoration:none;border:2px solid transparent;overflow-wrap:anywhere;}
.cwm-workfolder-card strong{font-size:19px;}.cwm-workfolder-card span{font-size:14px;}
.cwm-wrap a.cwm-workfolder-card:hover{background:#0f766e;color:#fff;}
.cwm-wrap a.cwm-workfolder-card:focus-visible{outline:3px solid #0f766e;outline-offset:4px;}
.cwm-wrap .cwm-workfolder-disabled{background:#e8edf2;color:#657384;border-color:#d9e0e7;cursor:not-allowed;}
@media(max-width:600px){.cwm-workfolder-grid{grid-template-columns:1fr;}}
.cwm-v3 { max-width:1160px; }
.cwm-topbar { font:15px/1.8 Vazirmatn,Tahoma,sans-serif; display:flex; gap:20px; justify-content:space-between; align-items:center; padding:12px 24px; background:#1e3a5f; color:#fff; direction:rtl; }
.cwm-topbar a { color:#fff; text-decoration:none; }
.cwm-count { display:inline-block; min-width:26px; text-align:center; padding:0 6px; margin-inline-start:5px; background:#d2f5ee; color:#134e4a; border-radius:20px; }
.cwm-sr { position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0; }
.cwm-stats { display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin:20px 0; }
.cwm-wrap a.cwm-stat { background:white;border:1px solid #dce6ef;border-radius:12px;display:flex;flex-direction:column;padding:16px;text-decoration:none;color:#1e3a5f; }
.cwm-stat strong {font-size:28px;color:#0f766e;}
.cwm-filters {display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto auto;gap:10px;align-items:end;background:#fff;padding:14px;border:1px solid #dbe4ed;border-radius:12px;margin:16px 0;}
.cwm-filters label {display:grid;gap:5px;font-size:13px;min-width:0;}
.cwm-filters input,.cwm-filters select {width:100%;min-width:0;border:1px solid #b5c3d2;border-radius:7px;padding:8px;background:white;font:inherit;min-height:42px;}
.cwm-row {display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff;border:1px solid #dce6ef;padding:14px 18px;margin:8px 0;border-radius:10px;overflow-wrap:anywhere;}
.cwm-row p {margin:4px 0;font-size:14px;color:#52657a;}
.cwm-row-actions {display:flex;gap:14px;align-items:center;flex-wrap:wrap;}
.cwm-detail > summary {color:#0f766e;cursor:pointer;list-style:none;display:inline-block;border:1px solid #bddbd5;border-radius:8px;padding:7px 12px;background:#f4fbf9;}
.cwm-modal {width:min(760px,94vw);max-height:88vh;overflow:auto;border:0;padding:24px;margin:auto;box-shadow:0 24px 80px #14243c50;}
.cwm-modal::backdrop {background:#10233d99;backdrop-filter:blur(2px);}
.cwm-close {float:left;border:1px solid #bdcbd7;border-radius:8px;padding:7px 14px;background:white;color:#1e3a5f;cursor:pointer;font:inherit;}
.cwm-dialog-body {clear:both;}
.cwm-dialog-body > h3 {padding-top:12px;}
.cwm-empty {background:white;text-align:center;padding:32px;border:1px dashed #b7c7d6;border-radius:12px;margin:16px 0;color:#52657a;}
.cwm-pagination {display:flex;gap:18px;align-items:center;justify-content:center;flex-wrap:wrap;padding:20px 0;}
.cwm-tabs {display:flex;gap:10px;border-bottom:1px solid #ccdbe6;padding-bottom:10px;}
.cwm-tabs a {padding:8px 16px;border-radius:8px;text-decoration:none;}
.cwm-tabs a[aria-current] {background:#1e3a5f;color:white;}
.cwm-case-preview {display:grid;grid-template-columns:110px 1fr;gap:8px;background:#eef3f8;padding:16px;border-radius:8px;}
.cwm-case-preview dt {font-weight:600;}.cwm-case-preview dd {margin:0;color:#465b70;}
.cwm-form fieldset {border:1px solid #cbd9e4;border-radius:12px;padding:16px;display:grid;gap:12px;min-width:0;background:#fff;}
.cwm-form fieldset[disabled] {opacity:.55;}
.cwm-form [hidden] {display:none !important;}
.cwm-form input[type="checkbox"] {width:auto;min-height:auto;accent-color:#0f766e;}
.cwm-forward-item label {display:flex;align-items:center;gap:8px;font-weight:400;}
.cwm-conversation {background:white;border:1px solid #cbdce7;border-radius:14px;padding:20px;margin:20px 0;}
.cwm-message {max-width:90%;overflow-wrap:anywhere;}.cwm-message.cwm-mine {margin-inline-start:auto;background:#e5f5f0;}
.cwm-state-pending,.cwm-state-waiting {background:#fff1ce;color:#73510d;}
.cwm-state-blocked,.cwm-state-suspended,.cwm-state-returned {background:#ffe4e6;color:#9f1239;}
.cwm-state-completed,.cwm-state-approved,.cwm-state-active {background:#dff5e8;color:#17603b;}
.cwm-state-in_progress {background:#e0ecff;color:#204f94;}
.cwm-wrap button:disabled {opacity:.6;cursor:not-allowed;}
.cwm-event {border-inline-start:3px solid #c3ded8;padding-inline-start:12px;}
.cwm-inbox-page {margin:0;background:#eaf0f6;}
@media(max-width:850px){.cwm-filters{grid-template-columns:1fr 1fr;}.cwm-row{align-items:flex-start;flex-wrap:wrap;}.cwm-row > div:first-child{flex-basis:100%;}.cwm-row-actions{width:100%;justify-content:space-between;}.cwm-stats{grid-template-columns:1fr 1fr;}}
@media(max-width:480px){.cwm-filters{grid-template-columns:1fr;}.cwm-modal{padding:14px;width:96vw;}.cwm-topbar{padding:10px 14px;}.cwm-conversation{padding:12px;}.cwm-case-preview{grid-template-columns:1fr;}.cwm-message{max-width:100%;}}

.cwm-mail-navigation{display:flex;flex-wrap:wrap;gap:12px;margin-block:12px 20px}.cwm-mail-navigation a{display:inline-flex;align-items:center;min-height:44px;max-width:100%;box-sizing:border-box;white-space:normal}
