/* ============================================================
   Drawer redesign — shared design language (2b/3b/4b/4d/5b)
   בנוי מהטוקנים הקיימים; רק תצוגה, בלי שינוי נתונים/לוגיקה.
   ============================================================ */

/* תג-מצב מרובע עם נקודה */
.dz-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid;
  white-space: nowrap;
}
.dz-tag .dz-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dz-tag-success { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.dz-tag-success .dz-dot { background: #10b981; }
.dz-tag-warning { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.dz-tag-warning .dz-dot { background: #f59e0b; }
.dz-tag-neutral { color: #475569; background: #f8fafc; border-color: #e2e8f0; }
.dz-tag-neutral .dz-dot { background: #94a3b8; }
.dz-tag-purple  { color: #5b21b6; background: #f5f3ff; border-color: #ddd6fe; }
.dz-tag-purple .dz-dot { background: #8b5cf6; }
.dz-tag-info    { color: #1d4ed8; background: #eff6ff; border-color: #bfdbfe; }
.dz-tag-info .dz-dot { background: #2563eb; }
.dz-tag-danger  { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.dz-tag-danger .dz-dot { background: #ef4444; }

/* כותרת מגירה חדשה */
.dz-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dz-eyebrow { font-size: 12px; color: #5a6779; font-weight: 500; margin-bottom: 3px; }
.dz-headline { font-size: 20px; font-weight: 700; color: #1e293b; line-height: 1.25; }
.dz-amount { font-size: 26px; font-weight: 700; color: #1e293b; font-variant-numeric: tabular-nums; }
.dz-subline { font-size: 12.5px; color: #64748b; margin-top: 3px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.dz-tagrow { display: flex; align-items: center; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.dz-muted { font-size: 11.5px; color: #5a6779; }

/* רשימת שדות: תווית זעירה מעל ערך */
.dz-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.dz-field .dz-flabel { font-size: 11px; color: #5a6779; font-weight: 500; margin-bottom: 2px; }
.dz-field .dz-fvalue { font-size: 14px; font-weight: 600; color: #1e293b; word-break: break-word; }
.dz-field .dz-fvalue.dz-fvalue-sub { font-size: 11px; color: #5a6779; font-weight: 400; }
.dz-field-full { grid-column: 1 / -1; }

/* פס פעולות דביק בתחתית המגירה */
.dz-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 20px -24px -24px;
  padding: 14px 24px;
  border-top: 1px solid #eef1f6;
  background: #fbfcfe;
  z-index: 5;
  flex-wrap: wrap;
}
.dz-btn {
  padding: 10px 16px;
  font-size: 13.5px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}
.dz-btn-primary { flex: 1; background: #2563eb; color: #fff; }
.dz-btn-primary:hover { background: #1d4ed8; }
.dz-btn-navy { flex: 1; background: #2f4f7f; color: #fff; }
.dz-btn-navy:hover { background: #263f66; }
.dz-btn-approve { flex: 1; background: #059669; color: #fff; font-weight: 700; box-shadow: 0 2px 8px rgba(5, 150, 105, .25); }
.dz-btn-approve:hover { background: #047857; }
.dz-btn-ghost { background: #fff; border-color: #e2e8f0; color: #334155; }
.dz-btn-ghost:hover { border-color: #cbd5e1; background: #f8fafc; }
.dz-btn-reject { background: #fff; border-color: #fecaca; color: #dc2626; }
.dz-btn-reject:hover { background: #fef2f2; }
.dz-btn-danger-icon { width: 42px; padding: 10px 0; background: #fff; border-color: #fee2e2; color: #dc2626; }
.dz-btn-danger-icon:hover { background: #fef2f2; border-color: #fecaca; }
.dz-btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 7px; }

/* תפריט ⋯ (overflow) */
.dz-menu-wrap { position: relative; display: inline-flex; }
.dz-menu-btn {
  width: 42px;
  padding: 10px 0;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dz-menu-btn:hover { background: #f8fafc; }
.dz-menu {
  position: absolute;
  bottom: calc(100% + 8px);
  inset-inline-start: 0;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
  padding: 6px;
  display: none;
  flex-direction: column;
  min-width: 200px;
  z-index: 20;
}
.dz-menu.open { display: flex; }
.dz-menu-item {
  padding: 9px 10px;
  font-size: 12.5px;
  color: #334155;
  border-radius: 7px;
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  text-align: start;
  width: 100%;
}
.dz-menu-item:hover { background: #f1f5f9; }
.dz-menu-item.dz-menu-danger { color: #dc2626; }
.dz-menu-item.dz-menu-danger:hover { background: #fef2f2; }
.dz-menu-sep { height: 1px; background: #f1f5f9; margin: 4px 6px; }

/* רצועת תקציב דקה */
.dz-budget { background: #f8fafc; border: 1px solid #eef1f6; border-radius: 10px; padding: 12px 14px; }
.dz-budget-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.dz-budget-bar { height: 6px; background: #e6ebf2; border-radius: 3px; overflow: hidden; margin: 8px 0 6px; }
.dz-budget-bar > span { display: block; height: 100%; border-radius: 3px; }

/* צ'ק-ליסט דרישות הבקשה */
.dz-req-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dz-req-title { font-size: 13px; font-weight: 700; color: #1e293b; }
.dz-req { display: flex; align-items: flex-start; gap: 11px; padding: 12px 0; border-bottom: 1px solid #f1f5f9; }
.dz-req:last-child { border-bottom: none; }
.dz-req-body { flex: 1; min-width: 0; }
.dz-req-line { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dz-req-name { font-size: 13.5px; font-weight: 600; color: #1e293b; }
.dz-req-desc { font-size: 11.5px; color: #5a6779; margin-top: 3px; line-height: 1.5; }
.dz-req-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.dz-req-edit { background: transparent; border: none; color: #5a6779; cursor: pointer; padding: 4px; display: flex; flex-shrink: 0; }
.dz-req-edit:hover { color: #64748b; }

/* מקטע קבצים אחיד */
.dz-filerow { display: flex; align-items: center; gap: 11px; border: 1px solid #eef1f6; border-radius: 9px; padding: 9px 11px; }
.dz-file-thumb { width: 38px; height: 38px; border-radius: 7px; background: #eef2ff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dz-file-name { font-size: 13px; font-weight: 600; color: #1e293b; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dz-file-meta { font-size: 11px; color: #5a6779; }
.dz-file-acts { display: flex; gap: 2px; flex-shrink: 0; }
.dz-icon-btn { width: 30px; height: 30px; border-radius: 7px; background: transparent; border: none; color: #64748b; cursor: pointer; display: flex; align-items: center; justify-content: center; text-decoration: none; }
.dz-icon-btn:hover { background: #f1f5f9; }
.dz-icon-btn.dz-icon-danger { color: #cbd5e1; }
.dz-icon-btn.dz-icon-danger:hover { color: #b91c1c; background: #fef2f2; }
.dz-dropzone {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 7px;
  background: #fff;
  border: 1px dashed #cbd5e1;
  color: #475569;
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  justify-content: center;
}
.dz-dropzone:hover { border-color: #94a3b8; background: #f8fafc; }

/* סרגל הנהח"ש קומפקטי (הוצאה) */
.dz-strip { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #f8fafc; border: 1px solid #eef1f6; border-radius: 10px; padding: 11px 14px; flex-wrap: wrap; }
.dz-strip-info { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 12.5px; color: #475569; }

/* הערות (4b) */
.dz-note { display: flex; gap: 11px; margin-bottom: 14px; }
.dz-avatar { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.dz-avatar-blue { background: #dbeafe; color: #1d4ed8; }
.dz-avatar-amber { background: #fef3c7; color: #92400e; }
.dz-note-body { flex: 1; min-width: 0; }
.dz-note-head { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.dz-note-name { font-size: 13px; font-weight: 600; color: #1e293b; }
.dz-note-time { font-size: 11px; color: #5a6779; margin-inline-start: auto; }
.dz-note-text { font-size: 13px; color: #334155; line-height: 1.6; margin-top: 5px; word-break: break-word; }
.dz-composer { margin-top: auto; }
.dz-composer-actions { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.dz-seg { display: inline-flex; background: #f1f5f9; border-radius: 8px; padding: 2px; }
.dz-seg-opt {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.dz-seg-opt.active { color: #334155; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.dz-note-empty { text-align: center; color: #5a6779; font-size: 13px; padding: 28px 12px; }

/* היסטוריה (4d) — ציר זמן */
.dz-timeline { display: flex; flex-direction: column; }
.dz-tl-event { display: flex; gap: 12px; }
.dz-tl-gutter { width: 22px; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
.dz-tl-node { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; border: 2px solid; background: #fff; }
.dz-tl-rail { flex: 1; width: 2px; background: #eef1f6; margin: 4px 0; min-height: 8px; }
.dz-tl-body { flex: 1; min-width: 0; padding-bottom: 20px; }
.dz-tl-event:last-child .dz-tl-body { padding-bottom: 0; }
.dz-tl-title { font-size: 14px; font-weight: 700; color: #1e293b; }
.dz-tl-detail { font-size: 12.5px; color: #64748b; margin-top: 3px; line-height: 1.55; }
.dz-tl-time { font-size: 11px; color: #5a6779; margin-top: 4px; }

.dz-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-inline-start: 6px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 99px;
  background: #eff6ff;
  color: #2563eb;
}

@media (max-width: 768px) {
  .dz-fields { grid-template-columns: 1fr; }
}

