/* ================== صندوق فرم‌های در انتظار تکمیل ================== */
#inboxPanel{position:fixed;top:58px;inset-inline-end:18px;width:min(420px,94vw);
  display:flex;flex-direction:column;background:#ffffff;border:1px solid #e8edf5;
  border-radius:18px;box-shadow:0 4px 20px rgba(0,0,0,.08);z-index:1200;overflow:hidden;
  opacity:0;pointer-events:none;transform:translateY(-8px);transition:opacity .18s ease,transform .18s ease}
#inboxPanel.open{opacity:1;pointer-events:auto;transform:none}

/* هدر */
.panel-header{padding:15px 20px;display:flex;align-items:center;gap:12px;border-bottom:1px solid #f3f4f6}
.header-title{font-size:15px;font-weight:800;color:#1f2937;flex:1;text-align:center}

.refresh-btn,.close-btn{width:34px;height:34px;border-radius:50%;border:1px solid #e5e7eb;
  background:#f9fafb;color:#4b5563;display:flex;align-items:center;justify-content:center;
  cursor:pointer;padding:0;flex:none;transition:all .2s ease}
.refresh-btn svg{width:17px;height:17px}
.close-btn{font-size:17px;line-height:1}
.close-btn:hover{background:#f3f4f6;color:#111827}
.refresh-btn:hover{background:#eef5ff;color:#2a7de1;transform:rotate(90deg)}

/* بدنه لیست */
.panel-body{padding:15px;max-height:min(450px,60vh);overflow-y:auto;flex:1;display:flex;flex-direction:column;gap:10px}
.panel-body::-webkit-scrollbar{width:5px}
.panel-body::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}
.panel-body::-webkit-scrollbar-thumb{background:#9ca3af;border-radius:10px}

/* آیتم‌ها */
.list-item{display:flex;align-items:flex-start;background-color:#FDF8ED;border:1px solid #F5E7CE;
  border-radius:12px;padding:12px;cursor:pointer;transition:all .2s ease}
.list-item:hover{background-color:#FBF0DC;transform:translateY(-1px)}
.list-item.read{background-color:#ffffff;border-color:#e8edf5;opacity:.82}

.icon-box{width:40px;height:40px;border-radius:10px;display:flex;align-items:center;justify-content:center;
  margin-left:12px;flex-shrink:0}
.icon-box svg{width:18px;height:18px;stroke:#fff;fill:none;stroke-width:2}

.item-content{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}
.item-title{font-size:13px;font-weight:700;color:#1f2937;line-height:1.6;display:flex;align-items:center;gap:6px}
.item-title .dot{width:5px;height:5px;background:#F59E0B;border-radius:50%;display:inline-block;flex:none}

.item-meta{font-size:11.5px;color:#6b7280;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.inbox-empty{padding:28px 12px;text-align:center;color:#6b7280;font-size:12.5px}

/* فوتر */
.panel-footer{padding:15px;border-top:1px solid #f3f4f6;background:#ffffff}
.btn-footer{width:100%;padding:10px;border:1px solid #e5e7eb;background-color:#ffffff;border-radius:10px;
  font-family:'Vazirmatn',sans-serif;font-size:13px;font-weight:700;color:#374151;cursor:pointer;
  text-align:center;transition:all .2s}
.btn-footer:hover{background-color:#f9fafb;border-color:#d1d5db}
.btn-footer:disabled{opacity:.55;cursor:default}

/* تم تاریک */
[data-theme="dark"] #inboxPanel{background:#152128;border-color:#22343b;box-shadow:0 24px 60px rgba(0,0,0,.5)}
[data-theme="dark"] .panel-header,[data-theme="dark"] .panel-footer{border-color:#22343b;background:transparent}
[data-theme="dark"] .header-title{color:#e2ece9}
[data-theme="dark"] .refresh-btn,[data-theme="dark"] .close-btn{background:#1a2632;border-color:#2b3d44;color:#c3d4d0}
[data-theme="dark"] .refresh-btn:hover{background:#123b3b;color:#7fd4cb}
[data-theme="dark"] .close-btn:hover{background:#22343b;color:#fff}
[data-theme="dark"] .list-item{background-color:#33290f;border-color:#5a4a1d}
[data-theme="dark"] .list-item:hover{background-color:#3d320f}
[data-theme="dark"] .list-item.read{background-color:#121d23;border-color:#22343b}
[data-theme="dark"] .item-title{color:#e2ece9}
[data-theme="dark"] .item-meta{color:#8aa09c}
[data-theme="dark"] .inbox-empty{color:#8aa09c}
[data-theme="dark"] .btn-footer{background:transparent;color:#c3d4d0;border-color:#2b3d44}
[data-theme="dark"] .btn-footer:hover{background:#1a2632;border-color:#3d555c}
[data-theme="dark"] .panel-body::-webkit-scrollbar-track{background:#121d23}
[data-theme="dark"] .panel-body::-webkit-scrollbar-thumb{background:#2b3d44}

@media(max-width:640px){
  #inboxPanel{top:54px;inset-inline-end:8px;inset-inline-start:8px;width:auto}
  .panel-body{max-height:55vh}
}
