/* -------------------------------------------------------
   AlphaEdge V2 (Prototype) — minimal styling
-------------------------------------------------------- */

body {
  background: #f6f7f9;
}

.auth-page {
  background: #0b1220;
  color: #f5f5f5;
}
.auth-page .card {
  border: 0;
}
.auth-page a {
  color: #9bd3ff;
}

.muted-hint {
  color: #6c757d;
  font-size: 0.95rem;
}

/* -------------------------------------------------------
   Dashboard grid: 2 rows × 4 columns = 8 tiles
-------------------------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

/* Each tile */
.dashboard-tile {
  background-color: #fff;
  border-radius: 0.6rem;
  position: relative;
  cursor: pointer;
  min-height: 200px;
  max-height: 220px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    grid-column 0.25s ease,
    grid-row 0.25s ease,
    opacity 0.25s ease;
}

.dashboard-tile .card {
  border: none;
  border-radius: 0.6rem;
  box-shadow: 0px 2px 10px rgba(0,0,0,0.06);
  height: 100%;
}

.dashboard-tile .card-header {
  background: #ffffff;
  font-weight: 600;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.dashboard-tile .card-body {
  flex: 1;
  padding: 0.75rem;
  overflow: hidden;
}

/* 3-state content blocks */
.state-default { display: block; }
.state-collapsed, .state-enlarged { display: none; }

.dashboard-tile.collapsed .state-default { display: none; }
.dashboard-tile.collapsed .state-collapsed { display: block; }

.dashboard-tile.enlarged .state-default { display: none; }
.dashboard-tile.enlarged .state-enlarged { display: block; }

/* Expanded layout (middle tile spans full width) */
.dashboard-grid.expanded-layout {
  grid-template-rows: auto auto auto;
}

.top-row { grid-row: 1 / 2; transform: scale(0.98); opacity: 0.85; }
.middle-row { grid-row: 2 / 3; }
.bottom-row { grid-row: 3 / 4; transform: scale(0.98); opacity: 0.9; }

.expanded {
  grid-column: 1 / 5 !important;
  z-index: 99;
  transform: scale(1.01);
  min-height: 60vh;
  max-height: none;
}

.expanded .card-body {
  overflow-y: auto;
  max-height: calc(60vh - 3rem);
}

.placeholder-metric {
  font-size: 1.3rem;
  font-weight: 700;
}

.placeholder-text {
  color: #6c757d;
  font-size: 0.95rem;
}

.tiny-data {
  font-weight: 700;
  font-size: 1.05rem;
}

.tile-content {
  font-size: 0.95rem;
  line-height: 1.4;
}

.hidden {
  display: none !important;
}

/* Loading state */
.tile-loading {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  color: #6c757d;
}
.tile-loading .spinner-border {
  width: 1rem;
  height: 1rem;
}

/* Gauge for recommendation */
.score-gauge {
  width: 140px;
  height: 12px;
  background: #e9ecef;
  border-radius: 20px;
  overflow: hidden;
}
.score-gauge-fill {
  height: 100%;
  width: 0%;
  background: #198754;
}

/* -------------------------------------------------------
   News ticker
-------------------------------------------------------- */
.news-ticker {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #0b1220;
  color: #ffffff;
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border-top: 1px solid rgba(255,255,255,0.12);
}

.news-label {
  font-size: 0.85rem;
  font-weight: 700;
  opacity: 0.85;
  white-space: nowrap;
}

.news-marquee {
  overflow: hidden;
  flex: 1;
}

.news-marquee-content {
  display: inline-block;
  white-space: nowrap;
  animation: marquee 28s linear infinite;
}

.news-item {
  display: inline-block;
  margin-right: 24px;
  opacity: 0.92;
}

@keyframes marquee {
  0%   { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
