/* ── Token Usage Styles ────────────────────────────────────────────────────── */

.tu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.tu-header h2 { margin: 0; font-size: 1.25rem; }
.tu-actions { display: flex; gap: 0.5rem; }

.tu-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.tu-metric-card { background: var(--card-bg, #1a1d23); border: 1px solid var(--border, #2a2d35); border-radius: 10px; padding: 1rem; text-align: center; }
.tu-metric-value { font-size: 1.75rem; font-weight: 700; color: var(--text, #e0e0e0); }
.tu-metric-label { font-size: 0.75rem; color: var(--text-secondary, #8a8f98); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.05em; }
.tu-metric-warning .tu-metric-value { color: #fbbf24; }

/* Subtabs */
.tu-subtabs { display: flex; gap: 0; border-bottom: 1px solid var(--border, #2a2d35); margin-bottom: 1rem; }
.tu-subtab { background: none; border: none; color: var(--text-secondary, #8a8f98); padding: 0.5rem 1rem; cursor: pointer; font-size: 0.875rem; border-bottom: 2px solid transparent; transition: all 0.15s; }
.tu-subtab:hover { color: var(--text, #e0e0e0); }
.tu-subtab.active { color: var(--accent, #7c5cfc); border-bottom-color: var(--accent, #7c5cfc); }

/* Chart Controls */
.tu-chart-controls { margin-bottom: 0.75rem; }

/* Provider Grid */
.tu-provider-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.75rem; margin-bottom: 1.5rem; }
.tu-provider-card { background: var(--card-bg, #1a1d23); border: 1px solid var(--border, #2a2d35); border-radius: 10px; padding: 1rem; }
.tu-provider-card h4 { margin: 0 0 0.5rem; font-size: 0.9rem; color: var(--accent, #7c5cfc); }
.tu-provider-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }
.tu-provider-stats > div { text-align: center; }
.tu-stat-val { display: block; font-weight: 700; font-size: 1rem; color: var(--text, #e0e0e0); }
.tu-stat-label { font-size: 0.65rem; color: var(--text-secondary, #8a8f98); text-transform: uppercase; }

/* Feature Bars */
.tu-features-list { display: flex; flex-direction: column; gap: 0.35rem; }
.tu-feature-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; }
.tu-feature-name { width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-secondary, #8a8f98); }
.tu-feature-bar { flex: 1; height: 8px; background: rgba(124, 92, 252, 0.1); border-radius: 4px; overflow: hidden; }
.tu-feature-fill { height: 100%; background: linear-gradient(90deg, rgba(124, 92, 252, 0.5), rgba(0, 214, 143, 0.5)); border-radius: 4px; }
.tu-feature-tokens { width: 80px; text-align: right; font-size: 0.75rem; }
.tu-feature-cost { width: 70px; text-align: right; font-size: 0.75rem; color: var(--text-secondary, #8a8f98); }

/* Recommendations */
.tu-recommendations { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.tu-rec-card { background: var(--card-bg, #1a1d23); border: 1px solid var(--border, #2a2d35); border-left: 3px solid var(--border, #2a2d35); border-radius: 8px; padding: 0.75rem 1rem; }
.tu-rec-high { border-left-color: var(--danger, #ff4d6a); }
.tu-rec-medium { border-left-color: #fbbf24; }
.tu-rec-low { border-left-color: var(--success, #00d68f); }
.tu-rec-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.25rem; }
.tu-rec-type { font-weight: 600; font-size: 0.85rem; }
.tu-rec-desc { font-size: 0.82rem; color: var(--text-secondary, #8a8f98); margin: 0.25rem 0; }
.tu-rec-savings { font-size: 0.8rem; color: var(--success, #00d68f); font-weight: 600; margin: 0; }

/* Savings Banner */
.tu-savings-banner { background: linear-gradient(135deg, rgba(0, 214, 143, 0.08), rgba(124, 92, 252, 0.08)); border: 1px solid rgba(0, 214, 143, 0.2); border-radius: 12px; padding: 1.25rem; text-align: center; margin-bottom: 1.5rem; }
.tu-savings-val { font-size: 2rem; font-weight: 700; color: var(--success, #00d68f); }
.tu-savings-val span { font-size: 1rem; font-weight: 400; }
.tu-savings-label { font-size: 0.85rem; color: var(--text-secondary, #8a8f98); margin-top: 0.25rem; }
.tu-savings-detail { font-size: 0.75rem; color: var(--text-secondary, #8a8f98); margin-top: 0.5rem; }

/* Compress Tool */
.tu-compress { margin-top: 0.5rem; }
.tu-textarea { width: 100%; padding: 0.5rem 0.75rem; background: var(--input-bg, #12141a); border: 1px solid var(--border, #2a2d35); border-radius: 6px; color: var(--text, #e0e0e0); font-size: 0.82rem; font-family: inherit; resize: vertical; }
.tu-compress-result { margin-top: 0.5rem; }
.tu-compress-stats { font-size: 0.8rem; color: var(--success, #00d68f); margin-bottom: 0.5rem; }

/* Budget */
.tu-budget-form { background: var(--card-bg, #1a1d23); border: 1px solid var(--border, #2a2d35); border-radius: 10px; padding: 1rem; margin-bottom: 1.25rem; }
.tu-budget-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-top: 0.5rem; }

/* Scan Banner */
.tu-scan-banner { padding: 0.75rem 1rem; border-radius: 8px; margin-bottom: 1rem; background: var(--card-bg, #1a1d23); border: 1px solid var(--border, #2a2d35); font-size: 0.85rem; }

/* Alerts */
.tu-alerts-list { display: flex; flex-direction: column; gap: 0.5rem; }
.tu-alert-card { padding: 0.75rem 1rem; border-radius: 8px; font-size: 0.85rem; display: flex; justify-content: space-between; align-items: center; }
.tu-alert-warning { background: rgba(251, 191, 36, 0.1); border: 1px solid rgba(251, 191, 36, 0.2); color: #fbbf24; }
.tu-alert-exceeded { background: rgba(255, 77, 106, 0.1); border: 1px solid rgba(255, 77, 106, 0.2); color: #ff4d6a; }
.tu-alert-cost { font-weight: 600; }
