:root {
  --bkc-red: #ef1b24;
  --bkc-red-deep: #9d0610;
  --bkc-bg: #08090b;
  --bkc-card: #111317;
  --bkc-card-2: #171a20;
  --bkc-line: rgba(255, 255, 255, 0.10);
  --bkc-muted: #9ba2af;
  --bkc-text: #f6f7f9;
  --bkc-blue: #58c7ff;
}

.bkc-dashboard,
.bkc-dashboard * { box-sizing: border-box; }

.bkc-dashboard {
  width: 100%;
  max-width: 1480px;
  min-width: 0;
  margin: 24px auto 48px;
  padding: 18px;
  color: var(--bkc-text);
  background:
    radial-gradient(circle at 8% 0%, rgba(239, 27, 36, .18), transparent 30%),
    radial-gradient(circle at 100% 20%, rgba(88, 199, 255, .08), transparent 32%),
    var(--bkc-bg);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 24px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, .35);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

.bkc-dashboard a { color: inherit; text-decoration: none; }
.bkc-dashboard h1,
.bkc-dashboard h2,
.bkc-dashboard p { margin: 0; }

.bkc-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 6px 22px;
}

.bkc-brand { display: flex; align-items: center; gap: 18px; min-width: 0; }
.bkc-brand__logo { width: 82px; height: 82px; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 3px rgba(239, 27, 36, .25); }
.bkc-eyebrow { color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.bkc-live-dot { display: inline-block; width: 9px; height: 9px; margin-right: 7px; border-radius: 50%; background: var(--bkc-red); box-shadow: 0 0 0 0 rgba(239,27,36,.7); animation: bkcPulse 1.8s infinite; }
.bkc-brand h1 { margin-top: 5px; font-size: clamp(28px, 4vw, 48px); line-height: 1; letter-spacing: -.04em; color: #fff; }
.bkc-brand p { margin-top: 9px; color: var(--bkc-muted); font-size: 15px; }

.bkc-hero__actions { display: grid; grid-template-columns: auto auto; align-items: center; gap: 8px 10px; justify-items: end; }
.bkc-risk { min-width: 115px; padding: 9px 13px; border: 1px solid var(--bkc-line); border-radius: 12px; background: rgba(255,255,255,.04); }
.bkc-risk span { display: block; color: var(--bkc-muted); font-size: 10px; text-transform: uppercase; letter-spacing: .13em; }
.bkc-risk strong { display: block; margin-top: 1px; color: #70e19d; font-size: 15px; }
[data-risk-level="watch"] .bkc-risk strong { color: #ffbf47; }
[data-risk-level="high"] .bkc-risk strong { color: #ff4d57; }
.bkc-refresh { appearance: none; padding: 11px 15px; color: #fff; background: var(--bkc-red); border: 0; border-radius: 11px; font: inherit; font-weight: 800; cursor: pointer; }
.bkc-refresh:hover { background: #ff3039; }
.bkc-refresh:disabled { opacity: .6; cursor: wait; }
.bkc-updated { grid-column: 1 / -1; color: var(--bkc-muted); font-size: 11px; }

.bkc-ticker { display: flex; align-items: center; min-height: 46px; overflow: hidden; border: 1px solid var(--bkc-line); border-radius: 12px; background: #0c0e12; }
.bkc-ticker > strong { align-self: stretch; display: flex; align-items: center; flex: 0 0 auto; padding: 0 16px; background: var(--bkc-red); color: #fff; font-size: 12px; letter-spacing: .08em; }
.bkc-ticker__track { min-width: 0; padding: 0 18px; overflow: hidden; color: #e9ebef; white-space: nowrap; text-overflow: ellipsis; font-size: 13px; }

.bkc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.bkc-kpi { min-height: 118px; padding: 17px; border: 1px solid var(--bkc-line); border-radius: 16px; background: linear-gradient(145deg, rgba(255,255,255,.06), rgba(255,255,255,.025)); }
.bkc-kpi > span { display: block; color: var(--bkc-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.bkc-kpi > strong { display: block; margin: 7px 0 3px; color: #fff; font-size: clamp(25px, 3vw, 36px); line-height: 1; }
.bkc-kpi > small { color: #7f8794; font-size: 11px; }

.bkc-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.bkc-panel { min-width: 0; overflow: hidden; padding: 18px; border: 1px solid var(--bkc-line); border-radius: 18px; background: linear-gradient(155deg, rgba(255,255,255,.055), rgba(255,255,255,.018)); }
.bkc-panel--map { grid-column: span 8; padding: 0; }
.bkc-panel--weather { grid-column: span 4; }
.bkc-panel--quakes,
.bkc-panel--events { grid-column: span 6; }
.bkc-panel--fx { grid-column: span 4; }
.bkc-panel--news { grid-column: span 8; }
.bkc-panel__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.bkc-panel--map .bkc-panel__head { padding: 18px 18px 0; }
.bkc-panel__head span:first-child { color: var(--bkc-red); font-size: 10px; font-weight: 900; letter-spacing: .14em; }
.bkc-panel__head h2 { margin-top: 3px; color: #fff; font-size: 19px; line-height: 1.2; }
.bkc-panel__head > a { padding-top: 8px; color: #dfe2e7; font-size: 12px; font-weight: 700; }
.bkc-source-pill { padding: 5px 8px; border: 1px solid var(--bkc-line); border-radius: 999px; color: var(--bkc-muted) !important; font-size: 9px !important; }

.bkc-map { width: 100%; height: 460px; background: #0b0d10; }
.bkc-map .leaflet-tile-pane { filter: grayscale(1) invert(.93) hue-rotate(180deg) brightness(.68) contrast(1.4); }
.bkc-map .leaflet-control-attribution { background: rgba(8,9,11,.8); color: #9ba2af; }
.bkc-map .leaflet-control-attribution a { color: #d8dbe1; }
.bkc-map .leaflet-popup-content-wrapper,
.bkc-map .leaflet-popup-tip { color: #fff; background: #16191f; }
.bkc-popup { display: grid; gap: 3px; min-width: 150px; }
.bkc-popup span { color: #b2b8c2; font-size: 11px; }
.bkc-legend { color: var(--bkc-muted); font-size: 10px; white-space: nowrap; }
.bkc-legend i { display: inline-block; width: 8px; height: 8px; margin: 0 4px 0 8px; border-radius: 50%; }
.bkc-legend .quake { background: #ff9a34; }
.bkc-legend .event { background: var(--bkc-blue); }

.bkc-weather-icon { color: #fff !important; font-size: 34px !important; letter-spacing: 0 !important; }
.bkc-weather-now { display: flex; align-items: center; gap: 16px; padding: 16px 0 18px; border-bottom: 1px solid var(--bkc-line); }
.bkc-weather-now > strong { color: #fff; font-size: 56px; line-height: 1; letter-spacing: -.06em; }
.bkc-weather-now div { display: grid; gap: 4px; }
.bkc-weather-now b { font-size: 15px; }
.bkc-weather-now span { color: var(--bkc-muted); font-size: 12px; }
.bkc-weather-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 15px 0; }
.bkc-weather-stats div { padding: 10px; border-radius: 10px; background: rgba(255,255,255,.04); }
.bkc-weather-stats span { display: block; color: var(--bkc-muted); font-size: 10px; }
.bkc-weather-stats strong { display: block; margin-top: 3px; font-size: 12px; }
.bkc-forecast { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.bkc-forecast__day { display: grid; justify-items: center; gap: 4px; padding: 9px 4px; border: 1px solid rgba(255,255,255,.06); border-radius: 10px; background: rgba(0,0,0,.15); }
.bkc-forecast__day span,
.bkc-forecast__day small { color: var(--bkc-muted); font-size: 9px; }
.bkc-forecast__day b { font-size: 18px; }
.bkc-forecast__day strong { font-size: 12px; }

.bkc-list { display: grid; }
.bkc-list__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; min-height: 64px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.07); }
.bkc-list__row--event { width: 100%; color: inherit; text-align: left; appearance: none; border-right: 0; border-bottom: 0; border-left: 0; background: transparent; font: inherit; }
.bkc-list__row--event.is-focusable { cursor: pointer; }
.bkc-list__row--event.is-focusable:hover,
.bkc-list__row--event.is-focusable:focus-visible { padding-left: 8px; background: rgba(88,199,255,.055); outline: none; }
.bkc-list__row:first-child { border-top: 0; }
.bkc-list__row:hover b { color: #fff; }
.bkc-list__row > div { display: grid; gap: 4px; min-width: 0; }
.bkc-list__row b { overflow: hidden; color: #e2e5e9; font-size: 13px; white-space: nowrap; text-overflow: ellipsis; transition: color .2s; }
.bkc-list__row span,
.bkc-list__row small { color: var(--bkc-muted); font-size: 10px; }
.bkc-list__row > small { text-align: right; }
.bkc-mag { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; color: #ffb155; background: rgba(255,154,52,.12); border: 1px solid rgba(255,154,52,.25); }
.bkc-mag.is-alert { color: #fff; background: rgba(239,27,36,.25); border-color: rgba(239,27,36,.55); }
.bkc-event-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: var(--bkc-blue) !important; background: rgba(88,199,255,.11); font-size: 18px !important; }
.bkc-list__row--event { grid-template-columns: auto minmax(0, 1fr); transition: padding .2s ease, background .2s ease; }

.bkc-fx { display: grid; gap: 9px; }
.bkc-fx__card { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; padding: 13px; border: 1px solid rgba(255,255,255,.07); border-radius: 12px; background: rgba(255,255,255,.035); }
.bkc-fx__card span { color: var(--bkc-red); font-weight: 900; }
.bkc-fx__card strong { color: #fff; font-size: 18px; }
.bkc-fx__card small { color: var(--bkc-muted); }
.bkc-panel__note { margin-top: 12px !important; color: #777f8c; font-size: 10px; }

.bkc-news { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.bkc-news__item { display: grid; grid-template-columns: 84px minmax(0,1fr); align-items: center; gap: 12px; min-height: 76px; border-top: 1px solid rgba(255,255,255,.07); }
.bkc-news__item:nth-child(-n+2) { border-top: 0; }
.bkc-news__item img { width: 84px; height: 58px; object-fit: cover; border-radius: 8px; background: #222; }
.bkc-news__item > div { display: grid; gap: 5px; min-width: 0; }
.bkc-news__item b { display: -webkit-box; overflow: hidden; color: #e9ebef; font-size: 13px; line-height: 1.35; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bkc-news__item span { color: var(--bkc-muted); font-size: 10px; }

.bkc-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 14px; padding: 16px 4px 2px; color: #777f8c; font-size: 10px; }
.bkc-footer strong { color: #aeb4bd; }
.bkc-footer a { color: #bfc4cc; text-decoration: underline; text-underline-offset: 2px; }
.bkc-sources { text-align: right; }
.bkc-empty { padding: 22px 0; color: var(--bkc-muted); font-size: 12px; }
.bkc-skeleton { height: 50px; margin: 7px 0; border-radius: 10px; background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.09), rgba(255,255,255,.04)); background-size: 200% 100%; animation: bkcShimmer 1.4s linear infinite; }
.bkc-dashboard.is-loading .bkc-refresh { animation: bkcFade 1s ease-in-out infinite alternate; }
.bkc-dashboard.has-error { border-color: rgba(239,27,36,.35); }

@keyframes bkcPulse { 70% { box-shadow: 0 0 0 9px rgba(239,27,36,0); } 100% { box-shadow: 0 0 0 0 rgba(239,27,36,0); } }
@keyframes bkcShimmer { to { background-position: -200% 0; } }
@keyframes bkcFade { to { opacity: .65; } }

@media (max-width: 1040px) {
  .bkc-panel--map,
  .bkc-panel--weather,
  .bkc-panel--quakes,
  .bkc-panel--events,
  .bkc-panel--fx,
  .bkc-panel--news { grid-column: span 12; }
  .bkc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .bkc-dashboard { width: 100%; max-width: 100%; margin: 8px 0 30px; padding: 10px; border-radius: 17px; }
  .bkc-hero { align-items: flex-start; flex-direction: column; padding: 8px 3px 16px; }
  .bkc-brand { align-items: flex-start; gap: 12px; }
  .bkc-brand__logo { width: 62px; height: 62px; }
  .bkc-brand h1 { font-size: 28px; }
  .bkc-brand p { font-size: 12px; }
  .bkc-hero__actions { width: 100%; grid-template-columns: 1fr auto; justify-items: stretch; }
  .bkc-risk { min-width: 0; }
  .bkc-updated { text-align: right; }
  .bkc-kpis { gap: 8px; }
  .bkc-kpi { min-height: 102px; padding: 13px; }
  .bkc-kpi > strong { font-size: 25px; }
  .bkc-grid { gap: 10px; }
  .bkc-panel { padding: 14px; border-radius: 14px; }
  .bkc-panel--map { padding: 0; }
  .bkc-panel--map .bkc-panel__head { padding: 14px 14px 0; }
  .bkc-legend { display: none; }
  .bkc-map { height: 340px; }
  .bkc-weather-now > strong { font-size: 48px; }
  .bkc-weather-stats { gap: 5px; }
  .bkc-weather-stats div { padding: 8px 6px; }
  .bkc-news { grid-template-columns: 1fr; }
  .bkc-news__item:nth-child(2) { border-top: 1px solid rgba(255,255,255,.07); }
  .bkc-list__row { grid-template-columns: auto minmax(0,1fr); }
  .bkc-list__row > small { display: none; }
  .bkc-footer { grid-template-columns: 1fr; }
  .bkc-sources { text-align: left; }
}
