/* ═══════════════════════════════════════
   10. STAT ROW
═══════════════════════════════════════ */
.stat-row {
  display: flex;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.stat-item {
  flex: 1;
  padding-right: 16px;
  border-right: 1px solid var(--border);
  margin-right: 16px;
}
.stat-item:last-child { border-right: none; margin-right: 0; padding-right: 0; }

.stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 3px;
  font-family: var(--font-mono);
}
.stat-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

/* ═══════════════════════════════════════
   11. DATA TABLE
═══════════════════════════════════════ */
.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.data-table th {
  text-align: left;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  white-space: nowrap;
}
.data-table td {
  padding: 7px 10px;
  font-size: 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--bg-raised);
  font-family: var(--font-mono);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.data-table td.primary         { color: var(--text-primary); }
.data-table tr:last-child td   { border-bottom: none; }
.data-table tr:hover td        { background: var(--bg-raised); }

/* Horizontal scrolling wrapper applied dynamically via JS or HTML wrap */
.data-table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.data-table-wrapper::-webkit-scrollbar { height: 4px; }
.data-table-wrapper::-webkit-scrollbar-track { background: transparent; }
.data-table-wrapper::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

/* ═══════════════════════════════════════
   12. PROBABILITY BARS
═══════════════════════════════════════ */
.prob-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  width: 100%;
}
.prob-bar-label {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  width: 90px;
  flex-shrink: 0;
}
.prob-bar-track {
  flex: 1;
  height: 4px;
  background: var(--bg-raised);
  border-radius: 2px;
  min-width: 0;
}
.prob-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.prob-bar-pct {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  width: 38px;
  text-align: right;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════
   13. PILLS
═══════════════════════════════════════ */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 2px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 500;
  white-space: nowrap;
  letter-spacing: 0.02em;
}
.pill.up      { background: var(--positive-dim); color: var(--positive); }
.pill.down    { background: var(--negative-dim); color: var(--negative); }
.pill.neutral { background: var(--bg-raised);    color: var(--text-secondary); }
.pill.warn    { background: var(--warning-dim);  color: var(--warning); }
.pill.accent  { background: var(--accent-dim);   color: var(--accent); }
.pill.success { background: var(--positive-dim); color: var(--positive); }

/* ═══════════════════════════════════════
   14. UTILITY — LABELS, EMPTY STATE
═══════════════════════════════════════ */
.section-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 0 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  color: var(--text-muted);
}
.empty-state svg { opacity: 0.25; }
.empty-state p   { font-size: 13px; }

/* ═══════════════════════════════════════
   15. BUTTONS
═══════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font-ui);
  /* Scoped to paint-only properties — avoids layout reflow on hover */
  transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
  letter-spacing: 0.01em;
}
.btn-primary   { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: #5da4ff; border-color: #5da4ff; }
.btn-secondary { background: transparent; color: var(--text-primary); border-color: var(--border-light); }
.btn-secondary:hover { background: var(--bg-raised); border-color: var(--text-muted); }
.btn-ghost     { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn-ghost:hover { background: var(--bg-raised); color: var(--text-primary); }


/* ═══════════════════════════════════════
   RESPONSIVE — COMPONENTS
═══════════════════════════════════════ */

/* ── Laptops / 1440px ── */
@media (max-width: 1440px) {
    .data-table th { font-size: 11px; padding: 4px 8px; }
    .data-table td { font-size: 13px; padding: 6px 8px; }
    .stat-value { font-size: 14px; }
    .prob-bar-label { width: 85px; font-size: 10px; }
    .prob-bar-pct { font-size: 10px; }
}

/* ── Tablets / iPads (1100px) ── */
@media (max-width: 1100px) {
    .stat-row { flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
    .stat-item {
        flex: 1 1 calc(50% - 4px);
        padding-right: 0;
        border-right: none;
        margin-right: 0;
    }
    .stat-value { font-size: 13px; }
    .stat-label { font-size: 9px; }

    .data-table th { font-size: 10px; padding: 4px 6px; letter-spacing: 0.05em; }
    .data-table td { font-size: 12px; padding: 5px 6px; }

    .prob-bar-label { width: 75px; font-size: 9px; }
    .prob-bar-pct   { width: 32px; font-size: 9px; }
    
    .pill { font-size: 10px; padding: 2px 6px; }
    .btn { padding: 8px 14px; font-size: 12px; }
}

/* ── Mobile / iPhones (768px) ── */
@media (max-width: 768px) {
    .stat-item { flex: 1 1 100%; border-right: none; }
    .stat-value { font-size: 14px; } /* Slightly larger for thumb readability on 1-column stack */
    
    .data-table th { font-size: 9px; padding: 3px 5px; }
    .data-table td { font-size: 11px; padding: 4px 5px; }

    .prob-bar-label { width: 65px; font-size: 9px; }
    .prob-bar-pct   { width: 30px; font-size: 9px; }

    .pill { font-size: 9px; padding: 2px 5px; letter-spacing: 0.01em; }
    .btn { padding: 7px 12px; font-size: 11px; }
    .section-label { font-size: 9px; }
    .empty-state p { font-size: 12px; }
}

/* ── Very Small Mobile (480px) ── */
@media (max-width: 480px) {
    .stat-value { font-size: 13px; }
    .stat-label { font-size: 8px; }
    
    /* Allow text inside buttons to wrap tightly if needed */
    .btn { padding: 6px 10px; font-size: 10px; }
    
    .prob-bar-label { width: 55px; font-size: 8px; }
    .prob-bar-pct   { width: 28px; font-size: 8px; }
    
    .data-table td { font-size: 10px; padding: 3px 4px; }
}

/* ═══════════════════════════════════════
   16. EXPIRED TRIAL MODAL
═══════════════════════════════════════ */
.expired-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}
.expired-modal {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 32px;
    max-width: 400px;
    width: 90%;
    text-align: center;
}
.expired-modal h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px;
}
.expired-modal p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 20px;
}
.expired-dismiss {
    display: inline-block;
    margin-top: 12px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font-ui);
}
.expired-dismiss:hover { color: var(--text-primary); }