/* =============================================================
   NUSEI Dashboard — Databank + bucket placeholders
   Uses the same custom properties as css/styles.css.
   ============================================================= */

.databank { padding: 2px 0 24px; }

/* ---- tabs ---- */
.db-tabs {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--line, #e0dacf);
  margin-bottom: 16px;
}
.db-tab {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 15px;
  border: 0; border-bottom: 2px solid transparent;
  background: none; cursor: pointer;
  font-family: inherit; font-size: 13px; font-weight: 600;
  color: #7d766c;
  transition: color 0.15s, border-color 0.15s;
}
.db-tab span {
  padding: 1px 7px; border-radius: 999px;
  background: #ece7de; color: #6b655c;
  font-size: 10.5px; font-weight: 700;
}
.db-tab:hover { color: var(--navy, #071b38); }
.db-tab.is-active { color: var(--navy, #071b38); border-bottom-color: var(--orange, #f0651e); }
.db-tab.is-active span { background: var(--orange, #f0651e); color: #fff; }

/* ---- search + filters ---- */
.db-search {
  width: 100%; padding: 11px 14px; margin-bottom: 14px;
  border: 1px solid var(--line, #e0dacf); border-radius: 9px;
  background: #fff; font-family: inherit; font-size: 13.5px; color: var(--navy, #071b38);
}
.db-search:focus {
  outline: none; border-color: var(--orange, #f0651e);
  box-shadow: 0 0 0 3px rgba(240, 101, 30, 0.15);
}

.db-bar { margin-bottom: 14px; }
.db-filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.db-filters label { font-size: 11.5px; color: #6b655c; display: flex; gap: 6px; align-items: center; }
.db-filters select {
  padding: 6px 9px; border: 1px solid var(--line, #e0dacf); border-radius: 6px;
  background: #fff; font-family: inherit; font-size: 12px; color: var(--navy, #071b38);
}
.db-count { margin-left: auto; font-size: 11.5px; color: #8c867c; }

/* ---- chartbook banner ---- */
.db-hero-link {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border: 1px solid #d8d2c6; border-radius: 10px;
  background: linear-gradient(180deg, #0b2246 0%, #071b38 100%);
  color: #fff; text-decoration: none;
}
.db-hero-link strong { font-size: 14px; }
.db-hero-link span { flex: 1; font-size: 11.5px; color: rgba(255, 255, 255, 0.66); }
.db-hero-link em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--orange, #f0651e); }
.db-hero-link:hover em { text-decoration: underline; }

/* ---- cards ---- */
.db-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(305px, 1fr));
}
.db-card {
  padding: 15px 16px;
  border: 1px solid var(--line, #e0dacf); border-radius: 10px;
  background: #fff;
}
.db-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.db-card-title {
  margin: 0 0 6px; font-size: 13px; font-weight: 700; line-height: 1.35;
  color: var(--navy, #071b38);
}
.db-spark { flex: none; width: 132px; height: 34px; }

.db-latest { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 7px; }
.db-value { font-size: 22px; font-weight: 700; color: var(--navy, #071b38); }
.db-units { font-size: 11.5px; color: #6b655c; }
.db-asof { margin-left: auto; font-size: 10.5px; color: #a09a90; }

.db-meta { margin: 0 0 6px; font-size: 10.5px; line-height: 1.5; color: #8c867c; }
.db-note {
  margin: 0 0 9px; padding-left: 9px;
  border-left: 2px solid #ece7de;
  font-size: 10.5px; line-height: 1.55; color: #7d766c;
  max-height: 4.7em; overflow: hidden;
}

.db-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.db-btn {
  display: inline-block; padding: 6px 11px;
  border: 0; border-radius: 6px;
  background: var(--navy, #071b38); color: #fff;
  font-family: inherit; font-size: 11.5px; font-weight: 600;
  text-decoration: none; cursor: pointer;
}
.db-btn:hover { background: #0d2f5e; }
.db-btn.ghost { background: #f2efe9; color: var(--navy, #071b38); }
.db-btn.ghost:hover { background: #e6e1d8; }

/* ---- regulations ---- */
.db-reg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 9px; }
.db-reg-title { margin: 0 0 7px; font-size: 12px; line-height: 1.5; color: #4a453d; }
.db-pill {
  flex: none; padding: 2px 8px; border-radius: 999px;
  background: #f2efe9; color: #6b655c;
  font-size: 10px; font-weight: 700; white-space: nowrap;
}
.db-pill.ok { background: #e6f2ec; color: #1e6f5c; }

.db-empty { padding: 30px 0; text-align: center; color: #8c867c; font-size: 13px; }

/* ---- placeholder buckets ---- */
.bucket-placeholder {
  max-width: 520px; margin: 46px auto; padding: 34px 30px;
  border: 1px dashed #d8d2c6; border-radius: 12px;
  background: #faf8f4; text-align: center;
}
.bp-glyph { font-size: 30px; margin-bottom: 12px; opacity: 0.45; }
.bucket-placeholder h3 {
  margin: 0 0 9px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px; font-weight: 400; color: var(--navy, #071b38);
}
.bucket-placeholder p { margin: 0 0 9px; font-size: 12.5px; line-height: 1.65; color: #6b655c; }
.bp-ask { font-size: 11.5px !important; color: #8c867c !important; }
.bp-btn {
  margin-top: 5px; padding: 9px 18px;
  border: 0; border-radius: 8px;
  background: var(--orange, #f0651e); color: #fff;
  font-family: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
}
.bp-btn:hover { background: #d8560f; }

@media (max-width: 640px) {
  .db-grid { grid-template-columns: 1fr; }
  .db-hero-link { flex-direction: column; align-items: flex-start; gap: 5px; }
}

/* An empty bucket is ambiguous — Google Drive returns an empty list
   both for a folder with no files and for one that is not shared.
   The hint tells the operator which is more likely. */
.empty-box strong { display: block; margin-bottom: 6px; }
.empty-box .empty-hint {
  display: block; max-width: 52ch; margin: 0 auto;
  font-size: 11.5px; line-height: 1.6; color: #8c867c; font-weight: 400;
}
.empty-box .empty-hint em { font-style: normal; font-weight: 600; color: #6b655c; }

/* ---- Chartbook tab ---- */
.db-cb-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; margin-bottom: 12px;
}
.db-cb-head h3 {
  margin: 0 0 3px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px; font-weight: 400; color: var(--navy, #071b38);
}
.db-cb-head p { margin: 0; font-size: 11.5px; color: #8c867c; }

.db-cb-frame {
  width: 100%;
  height: calc(100vh - 300px);
  min-height: 520px;
  border: 1px solid var(--line, #e0dacf);
  border-radius: 10px;
  background: #fff;
}

.db-cb-note { margin: 10px 0 0; font-size: 11.5px; color: #8c867c; }
.db-cb-note strong { color: var(--navy, #071b38); }

/* =============================================================
   Monitoring week selector — month, then week
   ============================================================= */

.month-chips {
  display: flex; flex-wrap: wrap; gap: 7px;
  margin-bottom: 14px;
}

.month-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 13px;
  border: 1px solid var(--line, #e0dacf); border-radius: 999px;
  background: #fff;
  font-family: inherit; font-size: 12px; font-weight: 600;
  color: #6b655c; cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.month-chip:hover { border-color: #c9c2b5; color: var(--navy, #071b38); }

.month-chip.is-selected {
  background: var(--navy, #071b38);
  border-color: var(--navy, #071b38);
  color: #fff;
}

.month-chip-count {
  padding: 1px 7px; border-radius: 999px;
  background: #f0ece4; color: #7d766c;
  font-size: 10px; font-weight: 700;
}
.month-chip.is-selected .month-chip-count {
  background: rgba(255, 255, 255, 0.18); color: #fff;
}

/* Marks the month holding the latest week, so it stays findable
   after the client has browsed back through the archive. */
.month-chip-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--orange, #f0651e);
}

.week-bar-head-2 { margin-top: 2px; }

/* ---- data vintage ---- */
.db-vintage {
  margin: 0 0 14px; padding: 10px 13px;
  border: 1px solid #e3ddd0; border-left: 3px solid #b9b1a1; border-radius: 7px;
  background: #faf8f4;
  font-size: 11.5px; line-height: 1.6; color: #6b655c;
}
.db-vintage strong { color: var(--navy, #071b38); }

/* Past three weeks old, say so more loudly — a stale macro figure
   quoted as current is the failure this banner exists to prevent. */
.db-vintage.is-stale {
  border-color: #ecd9ae; border-left-color: #c98a1e; background: #fdf8ee; color: #8a6420;
}
.db-vintage.is-stale strong { color: #8a6420; }

/* Only ever visible when the deploy is on mock data. */
.data-badge.is-mock {
  background: #c0392b !important; color: #fff !important;
  font-weight: 700; letter-spacing: 0.04em;
}

/* Speech, Brief, Note — types beyond the original two. */
.adv-tag--other {
  background: #ede9f2;
  color: #5b3a8e;
}
