/* ==========================================================================
   Homepage product showcase: a static, non-interactive picture of the
   shared inbox. Built with the same tokens and status colors the real
   Inbox (Stage 3) will use, so the two stay visually identical.
   ========================================================================== */

.db {
  display: grid;
  grid-template-columns: 200px 320px minmax(0, 1fr) 248px;
  grid-template-rows: minmax(0, 1fr);
  min-width: 1180px;
  height: 640px;
  font-size: 13px;
  color: var(--text);
  text-align: left;
}

.db > * { min-height: 0; overflow: hidden; }

/* Sidebar */
.db-side {
  display: flex;
  flex-direction: column;
  padding: 16px 10px 14px;
  background: linear-gradient(180deg, var(--brand-navy) 0%, var(--brand-navy-deep) 100%);
  color: var(--on-dark-muted);
}
.db-side .logo-word { font-size: 17px; }
.db-brand { display: flex; align-items: center; gap: 8px; padding: 2px 8px 18px; }
.db-nav { display: grid; gap: 2px; }
.db-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.db-nav-item.is-active { background: rgba(95, 214, 210, 0.16); color: #fff; box-shadow: inset 3px 0 0 #3CC7C4; }
.db-nav-item .count-badge { margin-left: auto; }
.db-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding: 12px 8px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.db-user-name { display: block; color: #fff; font-weight: 600; font-size: 13px; }
.db-user-role { display: block; font-size: 12px; }

.db-avatar {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: #E3E8F0;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
}
.db-side .db-avatar { background: #253047; color: #fff; }
.db-avatar-lg { width: 40px; height: 40px; font-size: 14px; }

/* Conversation list */
.db-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border-right: 1px solid var(--border);
}
.db-list-top { padding: 14px 14px 10px; display: grid; gap: 12px; border-bottom: 1px solid var(--border); }
.db-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.db-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.db-btn-block { width: 100%; height: 34px; font-size: 13px; }
.db-btn.is-on { background: var(--accent-soft); border-color: #B8CBF8; color: var(--accent); }
.db-btn-icon { width: 30px; padding: 0; }

.db-inbox-row { display: flex; align-items: center; gap: 6px; }
.db-inbox-row .db-btn { padding: 0 8px; font-size: 12px; gap: 5px; }
.db-inbox-row h4 { margin-right: auto; font-size: 16px; font-weight: 650; }
.db-search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius-sm);
  color: var(--label);
}
.db-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.db-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.db-chip b { font-weight: 600; color: var(--label); }
.db-chip.is-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.db-chip.is-on b { color: var(--on-dark-muted); }

.db-cards { flex: 1; overflow: hidden; }
.db-card {
  position: relative;
  display: grid;
  gap: 3px;
  padding: 8px 14px;
  min-height: 52px;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
.db-card.s-flagged { background: var(--status-flagged-bg); }
.db-card.s-followup { background: var(--status-followup-bg); }
.db-card.s-unread { background: var(--status-unread-bg); }
.db-card.s-pinned { background: var(--status-pinned-bg); }
.db-card.is-selected { box-shadow: inset 0 0 0 1.5px var(--accent); }
.db-l1, .db-l2 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.db-name { font-weight: 500; color: var(--ink); white-space: nowrap; }
.db-card.is-unread .db-name { font-weight: 700; }
.db-num { font-size: 11.5px; color: var(--label); white-space: nowrap; }
.db-time { margin-left: auto; font-size: 11.5px; color: var(--label); white-space: nowrap; }
.db-prev { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.db-card.is-unread .db-prev { color: var(--text); }
.db-assignee {
  display: inline-grid;
  place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #E3E8F0;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink);
  flex: none;
}
.db-card .tag { height: 18px; padding: 0 6px; font-size: 10.5px; }
.db-card .tag-pinned .icon { width: 13px; height: 13px; }

/* Conversation */
.db-convo { display: flex; flex-direction: column; min-width: 0; background: var(--bg-subtle-2); }
.db-convo-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.db-convo-id { flex: 1; min-width: 0; }
.db-convo-name, .db-convo-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.db-convo-name { font-size: 14.5px; font-weight: 650; color: var(--ink); }
.db-convo-sub { font-size: 12px; color: var(--label); }
.db-head-actions { display: flex; gap: 6px; }

.db-thread { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; overflow: hidden; }
.db-day { align-self: center; margin-bottom: 10px; font-size: 11.5px; font-weight: 600; color: var(--label); }
.db-msg { max-width: 72%; display: grid; gap: 4px; margin-bottom: 8px; }
.db-msg.in { align-self: flex-start; }
.db-msg.out { align-self: flex-end; justify-items: end; }
.db-bubble { padding: 9px 12px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; }
.db-msg.in .db-bubble { background: #fff; border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.db-msg.out .db-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.db-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--label); }
.db-meta .ok { color: var(--success); font-weight: 600; }

.db-compose { padding: 12px 16px 14px; background: #fff; border-top: 1px solid var(--border); }
.db-field {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--border-input);
  border-radius: var(--radius);
  font-size: 13.5px;
  color: var(--text);
}
.db-compose-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.db-counter { margin-right: auto; font-size: 11.5px; color: var(--label); }

/* Contact details */
.db-details { padding: 18px 16px; border-left: 1px solid var(--border); background: #fff; display: flex; flex-direction: column; }
.db-details h5 {
  margin: 0 0 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--label);
}
.db-person { display: flex; align-items: center; gap: 10px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.db-person-name { font-size: 14.5px; font-weight: 650; color: var(--ink); }
.db-dl { display: grid; gap: 12px; margin: 0; }
.db-dl dt { font-size: 11.5px; color: var(--label); }
.db-dl dd { margin: 2px 0 0; font-size: 13px; color: var(--text); }
.db-elig { display: inline-flex; align-items: center; gap: 5px; color: var(--success); font-weight: 600; }
.db-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.db-tags .tag { font-weight: 600; }
.db-details .db-btn { margin-top: auto; width: 100%; height: 32px; }
