/* ================================================================
   Dashboard — layout & components (light editorial theme)
   ================================================================ */

.brand-link { display: inline-block; color: inherit; text-decoration: none; }
.lp-wordmark-img {
  display: block;
  height: 32px;
  width: auto;
  max-width: min(280px, 70vw);
  margin: 0 auto 4px;
}
@media (min-width: 720px) {
  .lp-wordmark-img { height: 48px; max-width: 360px; margin-bottom: 8px; }
}

.lp-nav {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 8px 0;
  border-top: 1px solid var(--lp-line);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  justify-content: flex-start;
}
.lp-nav::-webkit-scrollbar { display: none; }
@media (min-width: 720px) {
  .lp-nav { justify-content: center; gap: 28px; overflow-x: visible; }
}
.lp-nav a {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--lp-taupe);
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}
@media (min-width: 720px) {
  .lp-nav a { font-size: 0.7rem; letter-spacing: 0.32em; }
}
.lp-nav a:hover { color: var(--lp-charcoal); }
.lp-nav a.active {
  color: var(--lp-gold-deep);
  border-bottom-color: var(--lp-gold);
}

.lp-main {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 220px);
}

.lp-footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lp-taupe);
  border-top: 1px solid var(--lp-line);
  margin-top: 32px;
}
.lp-footer a { color: var(--lp-gold-deep); }
.lp-footer .sep { margin: 0 10px; color: var(--lp-line-2); }

/* ----- KPI row ----- */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 12px 0;
}
@media (min-width: 720px) {
  .kpi-row { grid-template-columns: repeat(4, 1fr); gap: 18px; padding: 28px 24px 0; }
}

.kpi {
  background: var(--lp-paper-2);
  border: 1px solid var(--lp-line);
  border-radius: var(--r-lg);
  padding: 14px 10px;
  text-align: center;
  box-shadow: var(--sh-card);
  overflow: hidden;
}
@media (min-width: 720px) { .kpi { padding: 20px 16px; } }
.kpi .lp-stat { font-size: 1.6rem; }
@media (min-width: 720px) { .kpi .lp-stat { font-size: 2.6rem; } }
.kpi .delta {
  font-size: 0.65rem;
  color: var(--lp-taupe);
  margin-top: 6px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}
.kpi .delta.up   { color: var(--lp-ok); }
.kpi .delta.down { color: var(--lp-error); }

/* ----- Section title ----- */
.section-title {
  max-width: 1100px;
  margin: 24px auto 10px;
  padding: 0 12px;
}
@media (min-width: 720px) {
  .section-title { margin: 36px auto 14px; padding: 0 16px; }
}
.section-title h2 { color: var(--lp-charcoal); }
.section-title .sub {
  font-size: 0.7rem;
  color: var(--lp-taupe);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 6px;
  font-weight: 500;
}

/* ----- Bot cards ----- */
.bot-card {
  background: var(--lp-paper-2);
  border: 1px solid var(--lp-line);
  border-radius: var(--r-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .2s, transform .15s, box-shadow .2s;
  cursor: pointer;
  box-shadow: var(--sh-card);
}
.bot-card:hover {
  border-color: var(--lp-gold-soft);
  transform: translateY(-2px);
  box-shadow: var(--sh-card-h);
}

.bot-card .head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.bot-card .name {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  color: var(--lp-charcoal);
  letter-spacing: 0.1em;
  font-weight: 500;
}
.bot-card .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--lp-taupe);
  box-shadow: 0 0 0 3px rgba(146,139,126,0.15);
}
.bot-card .dot.active { background: var(--lp-ok); box-shadow: 0 0 0 3px rgba(111,138,93,0.18); }
.bot-card .dot.stale  { background: var(--lp-warn); box-shadow: 0 0 0 3px rgba(184,137,63,0.18); }
.bot-card .dot.cold   { background: var(--lp-taupe); box-shadow: 0 0 0 3px rgba(146,139,126,0.18); }

.bot-card .metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.bot-card .metric .value {
  font-family: var(--ff-display);
  font-size: 1.5rem;
  color: var(--lp-charcoal);
  font-weight: 500;
  line-height: 1.1;
}
@media (min-width: 720px) { .bot-card .metric .value { font-size: 1.9rem; } }
.bot-card .metric .label {
  font-size: 0.6rem;
  color: var(--lp-taupe);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-top: 2px;
  font-weight: 500;
}
.bot-card .foot {
  font-size: 0.72rem;
  color: var(--lp-taupe);
  letter-spacing: 0.04em;
  padding-top: 12px;
  border-top: 1px solid var(--lp-line);
}
.bot-card .foot .rate {
  color: var(--lp-gold-deep);
  font-weight: 600;
}
.bot-card .foot .rate.good { color: var(--lp-ok); }
.bot-card .foot .rate.bad  { color: var(--lp-error); }

/* ----- Tables ----- */
.lp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.lp-table th {
  text-align: left;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lp-taupe);
  font-weight: 500;
  padding: 10px 8px;
  border-bottom: 1px solid var(--lp-line);
}
.lp-table td {
  padding: 14px 8px;
  border-bottom: 1px solid var(--lp-line);
  color: var(--lp-charcoal);
}
.lp-table tr:last-child td { border-bottom: none; }
.lp-table tr:hover td { background: rgba(184,151,120,0.06); }

/* ----- Health / System ----- */
.svc-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--lp-line);
}
.svc-row:last-child { border-bottom: none; }
.svc-row .name { color: var(--lp-charcoal); font-size: 0.95rem; font-weight: 500; }
.svc-row .detail { color: var(--lp-taupe); font-size: 0.75rem; margin-top: 2px; }

.err-item {
  padding: 12px 14px;
  border-left: 3px solid var(--lp-error);
  background: rgba(169,82,74,0.05);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin-bottom: 8px;
}
.err-item.n2 { border-left-color: var(--lp-warn); background: rgba(184,137,63,0.07); }
.err-item.n3 { border-left-color: var(--lp-taupe); background: rgba(146,139,126,0.07); }
.err-item .svc { color: var(--lp-gold-deep); font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 500; }
.err-item .msg { color: var(--lp-charcoal); font-size: 0.88rem; margin-top: 4px; }
.err-item .ts  { color: var(--lp-taupe); font-size: 0.7rem; margin-top: 4px; }

.heal-item {
  padding: 10px 14px;
  border-left: 3px solid var(--lp-ok);
  background: rgba(111,138,93,0.07);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin-bottom: 6px;
  font-size: 0.85rem;
  color: var(--lp-charcoal);
}
.heal-item .svc  { color: var(--lp-gold-deep); font-weight: 600; }
.heal-item .ts   { color: var(--lp-taupe); font-size: 0.7rem; margin-top: 2px; }

.chart-wrap {
  background: var(--lp-paper-2);
  border: 1px solid var(--lp-line);
  border-radius: var(--r-lg);
  padding: 22px;
  margin: 16px;
  max-width: 1100px;
  box-shadow: var(--sh-card);
}
@media (min-width: 720px) { .chart-wrap { margin: 18px auto; } }
.chart-wrap canvas { max-height: 320px; }

.loading {
  text-align: center;
  padding: 40px;
  color: var(--lp-taupe);
  font-size: 0.75rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 500;
}

.empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--lp-taupe);
  font-size: 0.88rem;
  font-style: italic;
}

/* ----- Insights toolbar ----- */
.insights-toolbar {
  max-width: 1100px;
  margin: 0 auto 14px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  background: var(--lp-paper-2);
  border: 1px solid var(--lp-line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
}
.insights-toolbar label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lp-taupe);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.insights-toolbar select {
  font-family: var(--ff-sans);
  padding: 8px 12px;
  background: var(--lp-paper);
  border: 1px solid var(--lp-line);
  border-radius: var(--r-md);
  font-size: 0.85rem;
  color: var(--lp-charcoal);
  letter-spacing: 0;
  text-transform: none;
}

.insights-row {
  padding: 10px 0;
  border-bottom: 1px solid var(--lp-line);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.insights-row:last-child { border-bottom: none; }
.insights-row .label { color: var(--lp-charcoal); font-size: 0.88rem; flex: 1; }
.insights-row .count {
  font-family: var(--ff-display);
  font-size: 1.3rem;
  color: var(--lp-gold-deep);
  min-width: 40px;
  text-align: right;
}
.insights-row .pct {
  font-size: 0.7rem;
  color: var(--lp-taupe);
  letter-spacing: 0.1em;
  min-width: 44px;
  text-align: right;
}

.chat-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--lp-line);
}
.chat-row:last-child { border-bottom: none; }
.chat-row .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.chat-row .score {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  font-weight: 500;
}
.chat-row .score.good { color: var(--lp-ok); }
.chat-row .score.bad  { color: var(--lp-error); }
.chat-row .outcome {
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lp-taupe);
  font-weight: 500;
}
.chat-row .summary {
  color: var(--lp-charcoal);
  font-size: 0.85rem;
  margin-top: 6px;
  line-height: 1.4;
}
.chat-row .coaching {
  color: var(--lp-gold-deep);
  font-size: 0.78rem;
  margin-top: 6px;
  font-style: italic;
  padding-left: 10px;
  border-left: 2px solid var(--lp-gold-soft);
}
.chat-row .links {
  margin-top: 8px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.chat-row .links a { margin-right: 12px; color: var(--lp-gold-deep); font-weight: 600; }
.chat-row .errors {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--lp-error);
}
.chat-row .errors span {
  display: inline-block;
  background: rgba(169,82,74,0.1);
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 4px;
  margin-bottom: 2px;
}

.reason-item {
  padding: 10px 14px;
  background: var(--lp-paper);
  border-left: 2px solid var(--lp-gold);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin-bottom: 8px;
  font-size: 0.85rem;
  color: var(--lp-charcoal);
  line-height: 1.4;
}

/* ----- Button ----- */
.lp-btn {
  font-family: var(--ff-sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 10px 18px;
  background: var(--lp-charcoal);
  color: var(--lp-paper);
  border: 1px solid var(--lp-charcoal);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .2s, transform .1s;
}
.lp-btn:hover { background: var(--lp-gold-deep); border-color: var(--lp-gold-deep); }
.lp-btn:active { transform: translateY(1px); }
.lp-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ----- Login ----- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  background: var(--lp-paper-2);
  border: 1px solid var(--lp-line);
  border-radius: var(--r-lg);
  padding: 40px 32px;
  max-width: 380px;
  width: 100%;
  box-shadow: var(--sh-card);
  text-align: center;
}
.login-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--lp-taupe);
  margin-bottom: 8px;
  text-align: left;
  font-weight: 500;
}
.login-input {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--ff-mono);
  font-size: 0.95rem;
  background: var(--lp-paper);
  border: 1px solid var(--lp-line);
  border-radius: var(--r-md);
  color: var(--lp-charcoal);
  margin-bottom: 18px;
  letter-spacing: 0.05em;
}
.login-input:focus {
  outline: none;
  border-color: var(--lp-gold);
}
.login-btn {
  width: 100%;
  padding: 14px;
  font-size: 0.75rem;
}
.login-error {
  background: rgba(169,82,74,0.08);
  border-left: 3px solid var(--lp-error);
  padding: 12px 14px;
  margin-bottom: 18px;
  color: var(--lp-error);
  font-size: 0.85rem;
  text-align: left;
  border-radius: 0 var(--r-md) var(--r-md) 0;
}
.login-foot {
  margin-top: 22px;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lp-taupe);
}

/* ----- Staff notifications ----- */
.notif-item {
  padding: 14px 16px;
  border-left: 3px solid var(--lp-taupe);
  background: rgba(146,139,126,0.05);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin-bottom: 8px;
}
.notif-item.info     { border-left-color: var(--lp-ok);   background: rgba(111,138,93,0.06); }
.notif-item.warn     { border-left-color: var(--lp-warn); background: rgba(184,137,63,0.07); }
.notif-item.critical { border-left-color: var(--lp-error); background: rgba(169,82,74,0.08); }
.notif-item .head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; flex-wrap: wrap;
}
.notif-item .title {
  color: var(--lp-charcoal);
  font-size: 0.95rem;
  font-weight: 500;
}
.notif-item .ts {
  color: var(--lp-taupe);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}
.notif-item .detail {
  color: var(--lp-charcoal);
  font-size: 0.85rem;
  margin-top: 6px;
  line-height: 1.4;
}
.notif-item .meta {
  color: var(--lp-taupe);
  font-size: 0.7rem;
  margin-top: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Banners / disclaimers */
.lp-banner {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  margin-bottom: 20px;
}
.lp-banner.warn {
  background: rgba(184,151,120,0.12);
  border: 1px solid var(--lp-gold-deep, #B89778);
  color: var(--lp-charcoal, #2C2A28);
}
.lp-note {
  color: var(--lp-taupe, #928B7E);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  margin-top: 4px;
}

/* ----- Global search ----- */
.lp-search-wrap {
  position: relative;
  max-width: 340px;
  margin: 8px auto 0;
  padding: 0 12px;
}
.lp-search {
  width: 100%;
  padding: 7px 12px;
  font-family: var(--ff-sans);
  font-size: 0.8rem;
  background: var(--lp-paper-2);
  border: 1px solid var(--lp-line);
  border-radius: var(--r-md);
  color: var(--lp-charcoal);
}
.lp-search:focus { outline: none; border-color: var(--lp-gold); }
.lp-search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  z-index: 100;
  background: var(--lp-paper-2);
  border: 1px solid var(--lp-line);
  border-radius: 0 0 var(--r-md) var(--r-md);
  box-shadow: var(--sh-card-h);
  max-height: 320px;
  overflow-y: auto;
}
.lp-search-results.open { display: block; }
.search-item {
  display: block;
  padding: 10px 14px;
  color: var(--lp-charcoal);
  text-decoration: none;
  border-bottom: 1px solid var(--lp-line);
  font-size: 0.85rem;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover { background: rgba(184,151,120,0.08); }
.search-item .name { font-weight: 600; }
.search-item .detail { font-size: 0.72rem; color: var(--lp-taupe); margin-top: 2px; }
.search-empty {
  padding: 14px;
  text-align: center;
  color: var(--lp-taupe);
  font-size: 0.8rem;
}

/* ----- Export CSV button ----- */
.lp-btn-sm {
  font-family: var(--ff-sans);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  padding: 6px 12px;
  background: transparent;
  color: var(--lp-gold-deep);
  border: 1px solid var(--lp-gold-soft);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .2s;
}
.lp-btn-sm:hover { background: rgba(184,151,120,0.1); }

/* ----- Calendar ----- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}
.cal-header {
  text-align: center;
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lp-taupe);
  padding: 8px 0;
  font-weight: 600;
}
.cal-day {
  min-height: 56px;
  background: var(--lp-paper-2);
  border: 1px solid var(--lp-line);
  border-radius: var(--r-sm);
  padding: 4px;
  font-size: 0.68rem;
}
@media (min-width: 720px) { .cal-day { min-height: 80px; padding: 6px; font-size: 0.75rem; } }
.cal-day.today { border-color: var(--lp-gold); background: rgba(184,151,120,0.06); }
.cal-day.empty { background: transparent; border-color: transparent; min-height: auto; }
.cal-day .day-num {
  font-weight: 600;
  color: var(--lp-charcoal);
  font-size: 0.8rem;
  margin-bottom: 4px;
}
.cal-day .cal-event {
  font-size: 0.62rem;
  padding: 2px 4px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: rgba(111,138,93,0.12);
  color: var(--lp-charcoal);
}
.cal-day .cal-count {
  font-size: 0.6rem;
  color: var(--lp-gold-deep);
  font-weight: 600;
}
.cal-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  padding: 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.cal-nav .month-label {
  font-family: var(--ff-display);
  font-size: 1.4rem;
  color: var(--lp-charcoal);
  min-width: 200px;
  text-align: center;
}
.cal-nav button {
  background: transparent;
  border: 1px solid var(--lp-line);
  border-radius: var(--r-md);
  padding: 8px 14px;
  cursor: pointer;
  color: var(--lp-charcoal);
  font-size: 1rem;
}
.cal-nav button:hover { border-color: var(--lp-gold); }

/* ----- Compare mode ----- */
.compare-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lp-taupe);
  cursor: pointer;
  margin-left: auto;
}
.compare-toggle input[type="checkbox"] { accent-color: var(--lp-gold-deep); }
.kpi .compare {
  font-size: 0.62rem;
  color: var(--lp-taupe);
  margin-top: 4px;
  letter-spacing: 0.1em;
}
.kpi .compare .val { font-weight: 600; }
.kpi .compare .up { color: var(--lp-ok); }
.kpi .compare .down { color: var(--lp-error); }

/* ----- Alerts badge ----- */
/* ----- Funnel ----- */
.funnel-stage {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.funnel-bar {
  height: 36px;
  background: linear-gradient(90deg, var(--lp-gold), var(--lp-gold-soft));
  border-radius: var(--r-sm);
  min-width: 4px;
  transition: width .6s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
}
.funnel-bar .funnel-val {
  font-family: var(--ff-display);
  font-size: 1.1rem;
  color: var(--lp-paper-2);
  font-weight: 600;
}
.funnel-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lp-taupe);
  white-space: nowrap;
  min-width: 100px;
}
.funnel-pct {
  font-size: 0.72rem;
  color: var(--lp-gold-deep);
  font-weight: 600;
  white-space: nowrap;
}

/* ----- Heatmap ----- */
.heatmap-grid {
  display: grid;
  grid-template-columns: 40px repeat(24, 1fr);
  gap: 2px;
  font-size: 0.6rem;
}
.hm-label {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 4px;
  color: var(--lp-taupe);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hm-hour {
  text-align: center;
  color: var(--lp-taupe);
  font-size: 0.55rem;
  padding: 2px 0;
}
.hm-cell {
  aspect-ratio: 1;
  border-radius: 2px;
  min-height: 14px;
}

/* ----- Timeline ----- */
.tl-item {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--lp-line);
}
.tl-item:last-child { border-bottom: none; }
.tl-dot {
  width: 8px; height: 8px; border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.tl-dot.chat { background: var(--lp-gold); }
.tl-dot.voice { background: var(--lp-ok); }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-size: 0.85rem; color: var(--lp-charcoal); font-weight: 500; }
.tl-detail { font-size: 0.75rem; color: var(--lp-taupe); margin-top: 2px; }
.tl-time { font-size: 0.65rem; color: var(--lp-taupe); white-space: nowrap; margin-top: 2px; }

/* ----- Source bars ----- */
.source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--lp-line);
}
.source-row:last-child { border-bottom: none; }
.source-name { font-size: 0.82rem; color: var(--lp-charcoal); min-width: 100px; }
.source-bar-wrap { flex: 1; background: var(--lp-line); height: 6px; border-radius: 3px; overflow: hidden; }
.source-bar { height: 100%; background: var(--lp-gold); border-radius: 3px; }
.source-count { font-size: 0.82rem; color: var(--lp-gold-deep); font-weight: 600; min-width: 40px; text-align: right; }
.source-pct { font-size: 0.68rem; color: var(--lp-taupe); min-width: 38px; text-align: right; }

/* ----- Dark mode ----- */
.dark-toggle {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 200;
  background: var(--lp-charcoal);
  color: var(--lp-paper);
  border: none;
  border-radius: 50%;
  width: 40px; height: 40px;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: var(--sh-card-h);
  display: flex;
  align-items: center;
  justify-content: center;
}
body.dark {
  --lp-paper: #1a1917;
  --lp-paper-2: #2C2A28;
  --lp-charcoal: #f0ebe3;
  --lp-charcoal-2: #faf7f2;
  --lp-line: #3a3834;
  --lp-line-2: #4a4640;
  --lp-taupe: #a09888;
  --lp-cream: #252320;
}
body.dark .dark-toggle { background: var(--lp-gold); color: #1a1917; }
body.dark .lp-search { background: #2C2A28; color: #f0ebe3; border-color: #3a3834; }

.alert-badge {
  display: inline-block;
  background: var(--lp-error);
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1.2;
}
