.auth-menu-billing {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
}

.billing-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.billing-panel-status,
.billing-panel-message {
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.billing-panel-status.error {
  color: #fca5a5;
}

.billing-current {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.billing-eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.billing-current h3 {
  margin: 0;
  color: var(--text-heading);
  font-size: 1.15rem;
}

.billing-current p {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 0.86rem;
}

.billing-current .billing-refresh-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
}

.billing-current .billing-refresh-btn:hover {
  color: var(--text-primary);
}

.billing-current .billing-refresh-btn.is-refreshing svg {
  animation: sentiqMotionProgressSpin 0.8s linear infinite;
}

.billing-usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.billing-meter {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.035);
}

.billing-meter-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.billing-meter-row strong {
  color: var(--text-primary);
  font-size: 0.8rem;
  white-space: nowrap;
}

.billing-meter-track {
  position: relative;
  height: 6px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
}

.billing-meter-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple-500), var(--accent-cool));
}

.billing-meter-description {
  display: block;
  margin-top: 0.4rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.35;
}

.billing-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.billing-plan-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  min-height: 178px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.035);
}

.billing-plan-card.active {
  border-color: rgba(139,92,246,0.38);
  background: rgba(139,92,246,0.08);
}

.billing-plan-card h4 {
  margin: 0 0 6px;
  color: var(--text-primary);
  font-size: 0.98rem;
}

.billing-plan-card p {
  color: var(--text-secondary);
  font-size: 0.8rem;
  line-height: 1.45;
}

.billing-plan-price {
  color: var(--text-heading);
  font-size: 0.95rem;
  font-weight: 700;
}

.billing-plan-action {
  width: 100%;
}

.billing-meter-unified {
  grid-column: span 2;
}

.billing-meter-track-unified i {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 1px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: 0 0 0 1px rgba(5, 6, 10, 0.6);
}

.billing-unified-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.74rem;
}

.billing-unified-breakdown strong {
  color: var(--text-secondary);
  font-weight: 700;
}

.text-quota-status {
  display: flex;
  min-height: 18px;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  padding: 7px 18px 0;
  color: rgba(156, 164, 180, 0.78);
  font-size: 0.69rem;
  line-height: 1.35;
  text-align: center;
  transition: color 160ms ease, opacity 160ms ease;
}

/* Guest mode already uses .guest-fast-only as its authenticated-state marker.
   Hide only the quota status copy; quota enforcement remains unchanged. */
.chat-input-wrapper:has(.execution-mode-control.guest-fast-only) .text-quota-status {
  display: none !important;
}

.text-quota-status[hidden] {
  display: none;
}

.text-quota-status-title {
  color: rgba(196, 202, 214, 0.86);
  font-weight: 650;
}

.text-quota-status-detail {
  color: rgba(137, 146, 164, 0.72);
}

.text-quota-status[data-state="fast-only"] .text-quota-status-title,
.text-quota-status.has-notice .text-quota-status-title {
  color: rgba(211, 201, 250, 0.92);
}

.text-quota-status[data-state="exhausted"] .text-quota-status-title {
  color: rgba(252, 185, 185, 0.92);
}

.chat-input-wrapper.is-text-quota-exhausted .chat-input-area {
  opacity: 0.58;
  filter: saturate(0.74);
}

.chat-input-wrapper.is-text-quota-exhausted .chat-input-area,
.chat-input-wrapper.is-text-quota-exhausted .chat-input-area * {
  cursor: not-allowed !important;
}

.execution-mode-option.is-quota-unavailable {
  color: rgba(139, 147, 164, 0.5);
  cursor: not-allowed;
}

@media (min-width: 721px) {
  .billing-meter[data-feature="deep_research"] {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .billing-usage-grid,
  .billing-plan-grid {
    grid-template-columns: 1fr;
  }

  .billing-current {
    flex-direction: column;
  }

  .billing-meter-unified {
    grid-column: span 1;
  }

  .text-quota-status {
    flex-wrap: wrap;
    gap: 2px 6px;
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .text-quota-status,
  .chat-input-wrapper.is-text-quota-exhausted .chat-input-area {
    transition: none;
  }
}

@media (forced-colors: active) {
  .text-quota-status,
  .text-quota-status-title,
  .text-quota-status-detail,
  .execution-mode-option.is-quota-unavailable {
    color: CanvasText;
  }

  .billing-meter-track-unified i {
    background: CanvasText;
    box-shadow: none;
  }

  .chat-input-wrapper.is-text-quota-exhausted .chat-input-area {
    opacity: 1;
    outline: 1px solid GrayText;
  }
}
.billing-checkout-loading {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: rgb(12 14 18 / 48%);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  color: #e2e3e5;
  font-family: inherit;
  font-size: 15px;
}

.billing-checkout-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgb(210 212 216 / 25%);
  border-top-color: #a5a8af;
  border-radius: 50%;
  animation: billing-checkout-spin 900ms linear infinite;
}

@keyframes billing-checkout-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .billing-checkout-spinner { animation: none; }
}
/* Flat account-management presentation. Plan selection lives on /plans/. */
#billing-panel .billing-current-label { display: block; margin-bottom: 12px; color: var(--text-secondary); text-transform: none; font-size: .85rem; font-weight: 600; }
.billing-details-section { padding: 22px 0; border-top: 1px solid var(--border-color, #ffffff18); }
.billing-details-section h4 { margin: 0 0 16px; font-size: .9rem; font-weight: 600; }
.billing-cancel-note, .billing-empty { color: var(--text-secondary, #a5a8b3); font-size: .82rem; line-height: 1.65; }
.billing-information { margin: 0; font-size: .85rem; }
.billing-information > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 18px; padding: 7px 0; }
.billing-information > div + div { border-top: 1px solid var(--border-color, #ffffff12); margin-top: 8px; padding-top: 15px; }
.billing-information dt { color: var(--text-secondary, #a5a8b3); }
.billing-information dd { margin: 0; overflow-wrap: anywhere; }
.billing-transactions-scroll { overflow-x: auto; }
.billing-transactions { width: 100%; border-collapse: collapse; font-size: .82rem; text-align: left; }
.billing-transactions th { color: var(--text-secondary, #a5a8b3); font-weight: 500; }
.billing-transactions th, .billing-transactions td { padding: 12px 8px 12px 0; border-bottom: 1px solid var(--border-color, #ffffff12); white-space: nowrap; }
.billing-explore { display: inline-block; margin: 12px 0; color: var(--text-primary, #e8e9ef); font-size: .85rem; text-underline-offset: 4px; }
.settings-data-links { margin: 20px 0 0; color: var(--text-secondary, #a5a8b3); font-size: .76rem; }
.settings-data-links a { color: inherit; text-decoration: none; }
.settings-data-links a:hover, .settings-data-links a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }
