/* Zudo Inbox — email-format page (separate from dashboard cards). */

.zudo-inbox {
  width: min(100%, 56rem);
  max-width: 56rem;
  margin-inline: auto;
  box-sizing: border-box;
  padding: 0.9rem 1rem 5.7rem;
  color: #0f172a;
}

.zudo-inbox-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.85rem;
}

.zudo-inbox-head h1 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.zudo-inbox-head p {
  margin: 0.25rem 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.zudo-inbox-back {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  border-radius: 0.55rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
}

.zudo-inbox-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.75rem;
}

.zudo-inbox-search {
  flex: 1 1 12rem;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  padding: 0.55rem 0.7rem;
  font: inherit;
  background: #fff;
}

.zudo-inbox-filters {
  display: inline-flex;
  gap: 0.3rem;
  background: #f1f5f9;
  padding: 0.2rem;
  border-radius: 0.55rem;
}

.zudo-inbox-filters button {
  border: 0;
  background: transparent;
  padding: 0.4rem 0.65rem;
  border-radius: 0.4rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
}

.zudo-inbox-filters button.is-on {
  background: #fff;
  color: #0f172a;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.zudo-inbox-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
  min-height: 22rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  background: #fff;
  overflow: hidden;
}

@media (min-width: 48rem) {
  .zudo-inbox-layout {
    grid-template-columns: minmax(16rem, 22rem) minmax(0, 1fr);
    min-height: 28rem;
  }
}

.zudo-inbox-list {
  display: flex;
  flex-direction: column;
  max-height: 40vh;
  overflow: auto;
  border-bottom: 1px solid #e2e8f0;
}

@media (min-width: 48rem) {
  .zudo-inbox-list {
    max-height: none;
    border-bottom: 0;
    border-right: 1px solid #e2e8f0;
  }
}

.zudo-mail-row {
  display: grid;
  grid-template-columns: 0.7rem minmax(0, 1fr);
  gap: 0.55rem;
  align-items: start;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  background: #fff;
  padding: 0.7rem 0.8rem;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.zudo-mail-row:hover {
  background: #f8fafc;
}

.zudo-mail-row.is-active {
  background: #eff6ff;
}

.zudo-mail-row.is-unread .zudo-mail-sender,
.zudo-mail-row.is-unread .zudo-mail-subject {
  font-weight: 800;
  color: #0f172a;
}

.zudo-mail-row.is-read .zudo-mail-sender,
.zudo-mail-row.is-read .zudo-mail-subject {
  font-weight: 500;
  color: #334155;
}

.zudo-mail-dot {
  width: 0.45rem;
  height: 0.45rem;
  margin-top: 0.45rem;
  border-radius: 999px;
  background: transparent;
}

.zudo-mail-row.is-unread .zudo-mail-dot {
  background: #2563eb;
}

.zudo-mail-main {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.zudo-mail-top {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.zudo-mail-sender {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.zudo-mail-time {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 0.75rem;
}

.zudo-mail-subject {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}

.zudo-mail-preview {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
  font-size: 0.8rem;
}

.zudo-inbox-detail {
  min-height: 14rem;
  padding: 0.9rem 1rem 1.1rem;
  overflow: auto;
}

.zudo-inbox-detail-empty,
.zudo-inbox-empty {
  margin: 1.2rem 0;
  color: #64748b;
  font-size: 0.92rem;
}

.zudo-mail-detail-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.zudo-mail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0;
  color: #475569;
  font-size: 0.85rem;
}

.zudo-mail-flags {
  margin: 0.4rem 0 0.8rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.zudo-mail-thread {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.zudo-mail-bubble {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.7rem 0.8rem;
  background: #f8fafc;
}

.zudo-mail-bubble.is-outbound {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.zudo-mail-bubble header {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  color: #64748b;
}

.zudo-mail-compose {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.zudo-mail-compose-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.zudo-mail-compose-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #cbd5e1;
  border-radius: 0.55rem;
  padding: 0.65rem 0.75rem;
  font: inherit;
  resize: vertical;
  min-height: 5rem;
  background: #fff;
}

.zudo-mail-compose-input:disabled {
  background: #f8fafc;
  color: #94a3b8;
}

.zudo-mail-send {
  align-self: flex-end;
  border: 0;
  border-radius: 0.55rem;
  padding: 0.55rem 0.95rem;
  background: #1d4ed8;
  color: #fff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
}

.zudo-mail-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
