/* ============================================
   RBM BRAND — ARCADE DASHBOARD v5
   Light theme · Bigger · Clean
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');
@import url('theme.css');
  --border: #dfe6e9;
  --text: #1a1a2e;
  --text-bright: #000000;
  --dim: #636e72;
  --shadow: 0 2px 8px rgba(0,0,0,0.04);
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  font-family: 'Inter', -apple-system, sans-serif;
  min-height: 100vh;
  color: var(--text);
  padding: 12px;
}

/* ---- CABINET ---- */
.cabinet {
  max-width: 1100px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  overflow: hidden;
}

/* ---- MARQUEE ---- */
.marquee {
  text-align: center;
  padding: 14px 20px 10px;
  background: linear-gradient(135deg, #fff5f5, #f0f4ff);
  border-bottom: 2px solid var(--border);
}
.marquee-inner {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 1px;
}
.marquee-sub {
  font-size: 12px;
  color: var(--dim);
  margin-top: 4px;
  font-weight: 400;
}

/* ---- SCENE (compact) ---- */
.scene-frame {
  margin: 0;
  background: #e8ecf1;
  overflow: hidden;
  position: relative;
  height: 200px;
}
#gameCanvas {
  width: 100%;
  height: 200px;
  display: block;
  image-rendering: pixelated;
}

/* HUD on scene */
.hud-overlay {
  position: absolute; top: 0; left: 0; right: 0; pointer-events: none;
}
.hud-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.5), transparent);
}
.clock {
  font-size: 12px;
  color: var(--gold);
  font-weight: 600;
  text-shadow: 0 0 6px rgba(0,0,0,0.3);
}
.scene-title {
  font-size: 10px;
  color: #fff;
  opacity: 0.8;
  letter-spacing: 2px;
}
.live-dot {
  font-size: 10px;
  color: var(--green);
  text-shadow: 0 0 6px rgba(0,0,0,0.3);
}

/* ---- PANELS ---- */
.panels-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 12px;
}

.info-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.panel-bori { border-top: 3px solid var(--bori); }
.panel-tars { border-top: 3px solid var(--tars); }

.panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.panel-avatar { font-size: 20px; }
.panel-title {
  font-size: 16px;
  font-weight: 700;
  flex: 1;
  letter-spacing: -0.3px;
}
.panel-bori .panel-title { color: var(--bori); }
.panel-tars .panel-title { color: var(--tars); }

.panel-badge {
  font-size: 10px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.panel-badge.online, .panel-badge.ok { background: #e8f8f0; color: var(--green); }
.panel-badge.unstable { background: #fef5e7; color: var(--gold); }
.panel-badge.fallback { background: #eef4fa; color: var(--tars); }
.panel-badge.blocked { background: #fdedec; color: var(--red); }

.panel-body { padding: 10px 12px; }

/* ---- Rows & cells ---- */
.p-row { display: flex; gap: 6px; margin-bottom: 5px; }
.p-cell {
  flex: 1;
  background: var(--bg);
  border-radius: 6px;
  padding: 8px 10px;
  min-height: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.p-cell.wide { flex: 1.5; }
.p-cell.full { flex: 100%; }
.p-cell.highlight-gold { background: #fef9e7; border: 1px solid #f9e79f; }

.p-label {
  font-size: 9px;
  color: var(--dim);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 3px;
}
.p-value {
  font-size: 14px;
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
}
.p-value.big {
  font-size: 20px;
  font-weight: 700;
}
.p-value.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  word-break: break-all;
}

.work-badge {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
}
.work-badge.working { background: #e8f8f0; color: var(--green); }
.work-badge.idle { background: var(--bg); color: var(--dim); }

/* Progress bar */
.progress-block { width: 100%; }
.progress-label {
  font-size: 9px;
  color: var(--dim);
  font-weight: 500;
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}
.progress-track {
  height: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  transition: width 0.8s ease;
  border-radius: 3px;
}
.fill-bori { background: linear-gradient(90deg, var(--bori), #ff8a80); }
.fill-tars { background: linear-gradient(90deg, var(--tars), #82c4ff); }

/* ---- LIMITS SECTION ---- */
.limits-section {
  margin-top: 8px;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.limits-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 9px;
  color: var(--dim);
  font-weight: 500;
  margin-bottom: 6px;
}
.limits-overall {
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}
.limits-overall.ok { background: #e8f8f0; color: var(--green); }
.limits-overall.warn { background: #fef5e7; color: var(--gold); }
.limits-overall.blocked { background: #fdedec; color: var(--red); }
.limits-overall.fallback { background: #eef4fa; color: var(--tars); }

.limits-body { display: flex; flex-direction: column; gap: 5px; }

.limit-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
}
.limit-card.cooldown { border-color: var(--gold); background: #fef9e7; }
.limit-card.unstable { border-color: #e17055; border-style: dashed; background: #fdf0ef; }
.limit-card.ok { border-color: #b0e0c0; }

.limit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3px;
}
.limit-provider {
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}
.limit-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block;
}
.limit-dot.green { background: var(--green); }
.limit-dot.red { background: var(--red); }
.limit-dot.yellow { background: var(--gold); }

.limit-status-text { font-size: 10px; font-weight: 500; }
.limit-status-text.cooldown-text { color: var(--gold); }
.limit-status-text.unstable-text { color: #e17055; }

.limit-bar {
  height: 6px;
  background: #e0e0e0;
  border-radius: 3px;
  overflow: hidden;
  margin: 4px 0 2px;
}
.limit-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold), #e17055);
  transition: width 0.5s ease;
}
.limit-bar-fill.green-bar { background: var(--green); }
.limit-bar-fill.warn { background: linear-gradient(90deg, var(--gold), #e17055); }
.limit-bar-fill.danger { background: linear-gradient(90deg, #e17055, var(--red)); }
.limit-bar-text { font-size: 9px; color: var(--dim); margin-top: 2px; }

/* 5h + weekly bar labels */
.limit-mini-label {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--dim);
  margin: 3px 0 2px;
}

/* ---- STATUS BAR ---- */
.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 8px 14px;
  background: var(--bg);
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--dim);
}

/* ---- ANIMATIONS ---- */
.blink { animation: blink 1.5s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* ---- RESPONSIVE ---- */
@media (max-width: 700px) {
  .panels-area { grid-template-columns: 1fr; }
  .p-row { flex-wrap: wrap; }
  .p-cell { min-width: 40%; }
}
