/* ── Header ──────────────────────────────────────────────────── */

.mb-header .mb-header-inner {
  max-width: 1440px;
}

.db-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.db-nav .mb-button,
.db-logout-btn {
  padding: 5px 10px;
  font-size: 12.5px;
  border-radius: 7px;
}

/* ── Page layout ─────────────────────────────────────────────── */

.db-page {
  max-width: 1440px;
  margin: 10px auto 32px;
  padding: 0 20px;
  display: grid;
  gap: 8px;
}

.db-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* ── Sections ────────────────────────────────────────────────── */

.db-section {
  background: white;
  border: 1px solid var(--mb-border);
  border-radius: 10px;
  overflow: hidden;
}

.db-section-subtle {
  background: #fbfdfc;
  border-style: dashed;
}

.db-section-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: var(--mb-green-soft);
  border-bottom: 1px solid #d8e4de;
}

.db-section-label {
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mb-green-dark);
}

.db-section-date {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--mb-muted);
  text-transform: capitalize;
}

.db-section-body {
  padding: 2px 0;
}

/* ── Badges ──────────────────────────────────────────────────── */

.db-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ddeee7;
  color: var(--mb-green-dark);
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1;
}

.db-badge-red {
  background: #f5d5d4;
  color: #8b2020;
}

.db-badge-orange {
  background: #fce8d2;
  color: #7a4100;
}

.db-agenda-status {
  margin-left: auto;
  font-size: 11px;
  font-style: italic;
  color: var(--mb-muted);
}

/* ── Rows ────────────────────────────────────────────────────── */

.db-row {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-bottom: 1px solid #f0f4f2;
  min-height: 34px;
}

.db-row:last-child {
  border-bottom: none;
}

.db-row-time {
  flex: 0 0 44px;
  font-size: 11.5px;
  font-weight: 750;
  color: var(--mb-green-dark);
  text-align: right;
}

.db-row-name {
  flex: 1 1 0;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 750;
  color: var(--mb-green-dark);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.db-row-name:hover {
  text-decoration: underline;
}

.db-code {
  font-size: 11px;
  font-weight: 700;
  color: var(--mb-muted);
}

.db-row-meta {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--mb-muted);
  white-space: nowrap;
}

.db-row-action {
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
  color: var(--mb-green-dark);
  text-decoration: none;
  padding: 2px 7px;
  border-radius: 5px;
  background: var(--mb-green-soft);
  border: 1px solid #cad8d2;
  white-space: nowrap;
  line-height: 1.6;
}

.db-row-action:hover {
  background: #d5e8de;
  border-color: #b8ccc5;
}

.db-row-action-sec {
  background: transparent;
  border-color: var(--mb-border);
  color: var(--mb-muted);
}

.db-row-action-sec:hover {
  background: #f2f5f3;
  border-color: #c5cdc9;
}

/* ── Priority row ────────────────────────────────────────────── */

.db-row-priority {
  border-left: 3px solid #e67e22;
  background: #fefaf6;
  padding-left: 9px;
}

/* ── Signal rows ─────────────────────────────────────────────── */

.db-signal-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-bottom: 1px solid #f0f4f2;
  border-left: 3px solid transparent;
  min-height: 34px;
}

.db-signal-row:last-child {
  border-bottom: none;
}

.db-signal-row--red {
  border-left-color: #c0392b;
  background: #fdf7f7;
  padding-left: 9px;
}

.db-signal-row--orange {
  border-left-color: #e67e22;
  background: #fefaf6;
  padding-left: 9px;
}

.db-signal-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.db-signal-dot--red   { background: #c0392b; }
.db-signal-dot--orange { background: #e67e22; }

/* ── Subsection labels ───────────────────────────────────────── */

.db-sub-label {
  padding: 3px 12px 2px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mb-muted);
  background: #f7faf8;
  border-bottom: 1px solid #edf1ee;
}

/* ── Empty, error, loading, agenda ──────────────────────────── */

.db-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--mb-muted);
}

.db-agenda-note {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--mb-muted);
}

.db-loading {
  padding: 14px 0;
  font-size: 13px;
  color: var(--mb-muted);
  text-align: center;
}

.db-error {
  padding: 12px 16px;
  border-radius: 8px;
  background: #fde8e8;
  color: #8b2020;
  font-size: 13px;
  border: 1px solid #f5c6c6;
}

/* ── Action title in rows ────────────────────────────────────── */

.db-action-title {
  flex: 0 1 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Priority chips ──────────────────────────────────────────── */

.db-priority {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 10.5px;
  font-weight: 850;
  background: #eef2ef;
  color: var(--mb-muted);
}

.db-priority--urgent {
  background: #fde8e8;
  color: #8b2020;
}

.db-priority--high {
  background: #fce8d2;
  color: #7a4100;
}

.db-priority--paused {
  background: #fff3cd;
  color: #856404;
}

/* ── Responsive ──────────────────────────────────────────────── */

@media (max-width: 860px) {
  .db-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .db-page {
    padding: 0 12px;
  }

  .db-nav {
    width: 100%;
    margin-left: 0;
  }

  .db-row {
    flex-wrap: wrap;
    gap: 4px 7px;
  }

  .db-row-name {
    flex: 1 1 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
  }
}
