/* billing-settings.css — Billing & Usage UI (Light Mode) */

.bill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.bill-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.bill-card-wide { margin-bottom: 16px; }

.bill-card-balance {
  background: linear-gradient(135deg, #f0f4ff 0%, #e8ecff 100%);
  border-color: #6366f1;
}

.bill-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #64748b;
  margin-bottom: 16px;
  font-weight: 500;
}

.bill-balance {
  font-size: 48px;
  font-weight: 700;
  color: #1e293b;
  line-height: 1;
}

.bill-balance-sub {
  color: #94a3b8;
  font-size: 14px;
  margin-top: 4px;
  margin-bottom: 16px;
}

.bill-stats-row { display: flex; gap: 24px; }
.bill-stat-val { color: #334155; font-weight: 600; margin-right: 6px; }
.bill-stat-label { color: #94a3b8; font-size: 13px; }

.bill-low-warning {
  margin-top: 12px;
  padding: 8px 12px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  color: #92400e;
  font-size: 13px;
}

.bill-plan-name { font-size: 28px; font-weight: 700; color: #1e293b; }
.bill-plan-detail { color: #64748b; font-size: 14px; margin: 4px 0; }
.bill-plan-price { color: #6366f1; font-size: 20px; font-weight: 600; margin: 8px 0 16px; }

/* Buttons */
.bill-btn {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.bill-btn-primary { background: #6366f1; color: white; }
.bill-btn-primary:hover { background: #4f46e5; }
.bill-btn-outline { background: transparent; border: 1px solid #cbd5e1; color: #334155; }
.bill-btn-outline:hover { border-color: #6366f1; color: #6366f1; }
.bill-btn-sm { padding: 6px 12px; font-size: 13px; }
.bill-btn-muted { background: #f1f5f9; color: #94a3b8; cursor: default; }

/* Usage chart */
.bill-usage-bars { display: flex; flex-direction: column; gap: 12px; }
.bill-usage-row { display: grid; grid-template-columns: 140px 1fr 100px; align-items: center; gap: 12px; }
.bill-usage-label { color: #334155; font-size: 13px; font-weight: 500; text-transform: capitalize; }
.bill-usage-bar-track { height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.bill-usage-bar-fill { height: 100%; background: linear-gradient(90deg, #6366f1, #8b5cf6); border-radius: 4px; min-width: 4px; }
.bill-usage-val { color: #64748b; font-size: 13px; text-align: right; }

/* Tool cards */
.bill-tools-grid { display: flex; flex-direction: column; gap: 8px; }

.bill-tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: all 0.2s;
}

.bill-tool-card:not(.bill-tool-dimmed):hover { border-color: #6366f1; background: #f0f4ff; }
.bill-tool-dimmed { opacity: 0.6; }

.bill-tool-icon {
  width: 40px; height: 40px; border-radius: 10px;
  background: #ede9fe; display: flex; align-items: center;
  justify-content: center; color: #6366f1; font-size: 16px; flex-shrink: 0;
}

.bill-tool-info { flex: 1; }
.bill-tool-name { color: #1e293b; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.bill-tool-desc { color: #64748b; font-size: 13px; margin-top: 2px; }
.bill-tool-action { flex-shrink: 0; }
.bill-tool-locked { color: #94a3b8; font-size: 13px; }
.bill-tool-unlocked { color: #10b981; font-size: 13px; }

/* Badges */
.bill-badge { font-size: 11px; padding: 2px 8px; border-radius: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.bill-badge-green { background: #d1fae5; color: #065f46; }
.bill-badge-amber { background: #fef3c7; color: #92400e; }
.bill-badge-slate { background: #f1f5f9; color: #64748b; }

/* Transactions */
.bill-tx-list { display: flex; flex-direction: column; gap: 8px; }
.bill-tx-row { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.bill-tx-tool { color: #334155; font-size: 14px; flex: 1; }
.bill-tx-detail { color: #94a3b8; font-size: 13px; flex: 1; text-align: center; }
.bill-tx-amount { color: #ef4444; font-size: 14px; font-weight: 500; text-align: right; min-width: 100px; }
.bill-empty { color: #94a3b8; text-align: center; padding: 24px; font-size: 14px; }

/* Modal */
.bill-modal-overlay {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4); display: flex; align-items: center;
  justify-content: center; z-index: 1000;
}

.bill-modal {
  background: #ffffff; border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 32px; max-width: 800px; width: 90%; max-height: 80vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.bill-modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.bill-modal-header h3 { color: #1e293b; margin: 0; }
.bill-modal-close { background: none; border: none; color: #94a3b8; font-size: 24px; cursor: pointer; }

.bill-plans-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }

.bill-plan-card {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px;
  padding: 24px; text-align: center; position: relative;
}

.bill-plan-featured { border-color: #6366f1; box-shadow: 0 0 20px rgba(99,102,241,0.1); background: #f0f4ff; }
.bill-plan-popular { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); background: #6366f1; color: white; font-size: 11px; padding: 2px 12px; border-radius: 12px; font-weight: 600; }
.bill-plan-card-name { color: #1e293b; font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.bill-plan-card-price { font-size: 36px; font-weight: 700; color: #1e293b; }
.bill-plan-card-price span { font-size: 16px; color: #94a3b8; }
.bill-plan-card-credits { color: #10b981; font-size: 14px; margin: 8px 0; }
.bill-plan-card-desc { color: #64748b; font-size: 13px; margin-bottom: 16px; }

@media (max-width: 768px) {
  .bill-grid { grid-template-columns: 1fr; }
  .bill-usage-row { grid-template-columns: 100px 1fr 80px; }
  .bill-plans-grid { grid-template-columns: 1fr 1fr; }
}
