.inbox-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 4.5rem 1rem 1rem;
  background: rgba(49, 53, 44, 0.28);
  direction: rtl;
}
.inbox-sheet[hidden] { display: none !important; }
.inbox-sheet-card {
  width: min(420px, 100%);
  max-height: min(82vh, 640px);
  overflow: auto;
  background: #FBF7F0;
  color: #31352C;
  border: 1px solid #E8D8BE;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(49, 53, 44, 0.16);
  padding: 1rem;
}
.inbox-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.inbox-sheet-head h2 { margin: 0; font-size: 1.15rem; color: #66001f; }
.inbox-sheet-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
.inbox-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  overflow-x: auto;
  margin-bottom: 0.75rem;
  padding-bottom: 0.25rem;
}
.inbox-tabs button {
  flex: 0 0 auto;
  border: 1px solid #59633A;
  background: transparent;
  color: #31352C;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  min-height: 40px;
  cursor: pointer;
}
.inbox-tabs button.is-on {
  background: #66001f;
  border-color: #66001f;
  color: #FBF7F0;
}
.inbox-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.55rem;
  padding: 0.7rem 0.4rem;
  border-bottom: 1px solid #E8D8BE;
  text-decoration: none;
  color: inherit;
  align-items: start;
}
.inbox-item.is-unread { background: rgba(120, 29, 58, 0.06); }
.inbox-dot {
  width: 8px;
  height: 8px;
  margin-top: 0.45rem;
  border-radius: 50%;
  background: #66001f;
}
.inbox-item:not(.is-unread) .inbox-dot { visibility: hidden; }
.inbox-item strong { display: block; font-size: 0.95rem; }
.inbox-item p { margin: 0.2rem 0 0; font-size: 0.85rem; opacity: 0.88; }
.inbox-item time { font-size: 0.75rem; color: #59633A; }
.inbox-item-del {
  border: 0;
  background: transparent;
  color: #66001f;
  cursor: pointer;
  min-width: 40px;
  min-height: 40px;
}
.inbox-empty { text-align: center; padding: 1.5rem 0.5rem; }
.inbox-all {
  display: block;
  text-align: center;
  margin-top: 0.8rem;
  color: #59633A;
  font-weight: 700;
}
.inbox-prio-urgent { border-inline-start: 3px solid #b42318; }
.inbox-prio-important { border-inline-start: 3px solid #66001f; }
.inbox-prio-alert { border-inline-start: 3px solid #c4a35a; }
.inbox-prio-info { border-inline-start: 3px solid #59633A; }
.header-bell.is-ring svg { animation: inbox-ring 0.7s ease-in-out 1; }
@keyframes inbox-ring {
  0%, 100% { transform: rotate(0); }
  20% { transform: rotate(-12deg); }
  40% { transform: rotate(10deg); }
  60% { transform: rotate(-6deg); }
}
.aya-nav .nav-count {
  margin-inline-start: auto;
  background: #66001f;
  color: #FBF7F0;
  border-radius: 999px;
  padding: 0 0.4rem;
  font-size: 0.7rem;
  min-width: 1.2rem;
  text-align: center;
}
@media (max-width: 767px) {
  .inbox-sheet {
    align-items: flex-end;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .inbox-sheet-card {
    width: 100%;
    max-height: min(88svh, 640px);
    border-radius: 18px 18px 0 0;
  }
  .inbox-item {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .inbox-tabs button {
    min-height: 44px;
  }
}
body.admin-view .inbox-sheet,
body.merchant-view .inbox-sheet { z-index: 120; }
