:root {
  --bg-color: #0d0f12;
  --panel-bg: #161920;
  --text-main: #f0f2f5;
  --text-muted: #8b949e;
  --accent: #e53e3e;
  --accent-glow: rgba(229, 62, 62, 0.4);
  --border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background: var(--bg-color);
  color: var(--text-main);
}

button,
input {
  font: inherit;
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

.app-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.glass-panel {
  width: 100%;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--panel-bg);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  padding: 2rem;
}

.glass-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.main-panel {
  max-width: 800px;
}

.title {
  margin-bottom: 0.5rem;
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
}

.subtitle {
  margin-bottom: 2rem;
  color: var(--text-muted);
  text-align: center;
}

.search-box {
  display: flex;
  width: 100%;
  max-width: 600px;
  gap: 1rem;
  margin: 0 auto 2rem;
}

input {
  min-width: 0;
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-main);
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

input:focus {
  outline: none;
  border-color: var(--text-muted);
}

button,
.admin-open-site {
  border: 0;
  border-radius: 8px;
  background: var(--text-main);
  color: var(--bg-color);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

button:hover,
.admin-open-site:hover {
  opacity: 0.9;
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.button-inner,
.calendar-reminder-btn,
.copy-link-btn,
.admin-open-site,
.admin-title,
.inline-label,
.reminder-form h3,
.success-message,
.error-message {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 2rem auto;
  animation: spin 1s ease-in-out infinite;
}

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

.error-message,
.success-message {
  width: 100%;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.error-message {
  background: rgba(229, 62, 62, 0.1);
  color: var(--accent);
}

.success-message {
  background: rgba(72, 187, 120, 0.1);
  color: #48bb78;
}

.user-heading {
  margin-bottom: 2rem;
  text-align: center;
}

.user-name {
  margin-top: 0.25rem;
  color: var(--text-main);
  font-size: 1.5rem;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.05);
}

.stat-card-wide {
  grid-column: 1 / -1;
}

.stat-label {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.stat-value {
  color: var(--text-main);
  font-size: 2.5rem;
  font-weight: 800;
}

.stat-value.danger {
  color: var(--accent);
  text-shadow: 0 0 20px var(--accent-glow);
}

.stat-note {
  margin-top: 0.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.stat-note-large {
  font-size: 1rem;
}

.reminder-form {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.reminder-form p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.calendar-reminder-btn {
  width: fit-content;
  background: linear-gradient(135deg, #fff, #dfe5ec);
  color: #0d0f12;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.25);
}

.admin-panel {
  max-width: 1100px;
}

.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-title,
.admin-subtitle {
  text-align: left;
}

.admin-subtitle {
  margin-bottom: 0;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
}

.admin-open-site,
.admin-user-link {
  color: var(--text-main);
  text-decoration: none;
}

.admin-open-site {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  padding: 0.8rem 1rem;
}

.admin-login-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
}

.admin-search-box {
  max-width: none;
  margin-bottom: 1rem;
}

.admin-count {
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.admin-attention-block {
  margin-bottom: 1.2rem;
}

.admin-section-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  color: #ff6b4a;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.attention-reset-btn {
  border: 1px solid rgba(255, 171, 135, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #ffc7b4;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: none;
  cursor: pointer;
}

.admin-attention-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.admin-row,
.admin-attention-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
}

.admin-attention-row {
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 67, 40, 0.1), transparent 36%),
    rgba(255, 255, 255, 0.025);
}

.admin-user-name {
  margin-bottom: 0.35rem;
  font-size: 1.1rem;
  font-weight: 700;
}

.admin-user-id,
.admin-user-link {
  color: var(--text-muted);
  font-size: 0.9rem;
  word-break: break-all;
}

.admin-user-id {
  margin-bottom: 0.35rem;
}

.admin-user-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.5rem 0;
}

.admin-user-details span {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  padding: 0.3rem 0.55rem;
  font-size: 0.78rem;
}

.admin-user-details .user-enabled {
  border-color: rgba(72, 187, 120, 0.25);
  color: #81e6a1;
}

.admin-user-details .user-disabled {
  border-color: rgba(229, 62, 62, 0.28);
  color: #ff8f8f;
}

.admin-user-details .user-warning {
  border-color: rgba(255, 200, 87, 0.3);
  color: #ffd37a;
}

.admin-row-prepaid {
  border-color: rgba(255, 168, 62, 0.34);
  box-shadow: 0 0 0 1px rgba(255, 168, 62, 0.08), 0 16px 40px rgba(255, 122, 24, 0.08);
}

.admin-prepaid-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.55rem;
  margin: 0.55rem 0 0.35rem;
  border: 1px solid rgba(255, 168, 62, 0.34);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 168, 62, 0.14), rgba(255, 92, 0, 0.08));
  color: #ffd29a;
  padding: 0.48rem 0.65rem;
  font-size: 0.82rem;
}

.admin-prepaid-badge strong {
  color: #ffb45f;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
}

.admin-prepaid-badge.is-failed {
  border-color: rgba(255, 96, 96, 0.42);
  background: rgba(255, 96, 96, 0.1);
  color: #ffc0c0;
}

.admin-prepaid-error {
  width: 100%;
  color: #ffb3b3;
  font-size: 0.76rem;
}

.admin-row-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 150px;
}

.admin-row-actions.compact {
  min-width: 130px;
}

.copy-link-btn {
  min-width: 140px;
}

.admin-error {
  margin-top: 1rem;
}

.admin-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.renewal-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.renewal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem;
}

.renewal-row-collapsed {
  align-items: center;
  padding: 0.72rem 0.85rem;
}

.renewal-compact-main {
  min-width: 0;
}

.renewal-row-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.renewal-collapse-btn {
  width: auto;
  min-width: 88px;
  padding-inline: 0.8rem;
}

.renewal-code {
  margin-bottom: 0.35rem;
  color: #ff6b4a;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.renewal-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.65rem 0;
}

.renewal-row-meta span,
.renewal-row-note,
.renewal-row-error,
.admin-empty {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  padding: 0.35rem 0.6rem;
  font-size: 0.82rem;
}

.renewal-row-note {
  display: inline-flex;
  border-color: rgba(72, 187, 120, 0.22);
  background: rgba(72, 187, 120, 0.08);
  color: #81e6a1;
  margin-top: 0.45rem;
}

.renewal-row-error {
  display: inline-flex;
  border-color: rgba(229, 62, 62, 0.28);
  background: rgba(229, 62, 62, 0.1);
  color: #ff8f8f;
  margin-top: 0.45rem;
}

.renewal-row-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 160px;
}

.whatsapp-action {
  border-color: rgba(72, 187, 120, 0.28);
  background: rgba(6, 15, 10, 0.94);
  color: #9af5b8;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 18px rgba(72, 187, 120, 0.08);
}

.whatsapp-action:disabled {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(10, 10, 10, 0.72);
  color: rgba(245, 237, 226, 0.72);
  box-shadow: none;
}

.admin-dismiss-btn {
  border-color: rgba(255, 171, 135, 0.25);
  background: rgba(255, 255, 255, 0.02);
  color: #ffc7b4;
}

.admin-notice-message {
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.9rem 0;
}

.inline-notice-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.inline-notice-btn.secondary {
  color: rgba(255, 255, 255, 0.72);
}

.danger-action {
  border-color: rgba(229, 62, 62, 0.35);
  color: #ff8f8f;
}

.admin-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #000;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  min-width: 140px;
}

.admin-btn-primary:hover {
  opacity: 0.88;
}

.admin-btn-primary:active {
  transform: scale(0.98);
}

.admin-btn-primary:disabled {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.35);
  cursor: not-allowed;
  opacity: 1;
}

.admin-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.admin-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
}

.admin-btn-ghost:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.admin-empty {
  border-radius: 14px;
  padding: 1rem;
  text-align: center;
}

@media (max-width: 640px) {
  .container {
    padding: 1rem;
  }

  .glass-panel {
    padding: 1.25rem;
  }

  .search-box,
  .admin-header,
  .admin-row,
  .admin-attention-row,
  .admin-section-header,
  .admin-login-form {
    flex-direction: column;
    align-items: stretch;
  }

  .renewal-row {
    grid-template-columns: 1fr;
  }

  .renewal-row-title {
    align-items: center;
  }

  .renewal-collapse-btn {
    width: auto;
    min-width: 92px;
  }

  .admin-login-form {
    display: flex;
  }

  .stat-value {
    font-size: 2rem;
  }

  .copy-link-btn {
    width: 100%;
  }

  .admin-row-actions {
    min-width: 0;
  }

  .renewal-row-actions {
    min-width: 0;
  }
}

/* Modern customer dashboard */
body.usage-page {
  min-height: 100vh;
  background: #070101;
}

body.usage-page::before,
body.usage-page::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body.usage-page::before {
  background:
    radial-gradient(ellipse 90% 55% at 10% 0%, rgba(200, 22, 8, 0.38) 0%, transparent 62%),
    radial-gradient(ellipse 60% 42% at 90% 8%, rgba(140, 10, 4, 0.2) 0%, transparent 58%),
    radial-gradient(ellipse 100% 45% at 50% 108%, rgba(90, 5, 2, 0.18) 0%, transparent 55%);
}

body.usage-page::after {
  background:
    radial-gradient(ellipse 55% 35% at 50% 0%, rgba(229, 62, 62, 0.07) 0%, transparent 68%);
}

.usage-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px 18px;
}

.usage-dashboard {
  position: relative;
  width: min(1120px, 100%);
  overflow: hidden;
  border: 1px solid rgba(148, 220, 255, 0.16);
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(19, 25, 36, 0.92), rgba(8, 11, 17, 0.94) 62%, rgba(10, 20, 30, 0.9)),
    rgba(9, 12, 18, 0.92);
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 34px;
}

.usage-dashboard::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 0% 0%, rgba(229, 62, 62, 0.12), transparent 55%),
    radial-gradient(ellipse at 100% 0%, rgba(180, 30, 10, 0.08), transparent 50%);
  opacity: 1;
  pointer-events: none;
}

.usage-dashboard::after {
  display: none;
}

.usage-dashboard > * {
  position: relative;
  z-index: 1;
}

.usage-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow,
.lookup-label,
.strip-label,
.summary-kicker,
.metric-topline {
  color: rgba(196, 217, 232, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.usage-title {
  max-width: 760px;
  margin: 8px 0 10px;
  color: rgba(247, 250, 255, 0.94);
  font-size: 3.8rem;
  line-height: 0.95;
  font-weight: 800;
}

.usage-subtitle {
  max-width: 560px;
  color: rgba(191, 207, 222, 0.72);
  font-size: 1rem;
  line-height: 1.6;
}

.hero-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(103, 232, 249, 0.22);
  border-radius: 999px;
  background: rgba(5, 13, 20, 0.56);
  color: rgba(220, 242, 249, 0.86);
  padding: 10px 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  font-size: 0.88rem;
}

.signal-dot,
.metric-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #67e8f9;
  box-shadow: 0 0 18px rgba(103, 232, 249, 0.9);
}

.lookup-panel {
  border: 1px solid rgba(148, 220, 255, 0.13);
  border-radius: 18px;
  background: rgba(4, 9, 15, 0.52);
  padding: 16px;
  margin-bottom: 20px;
}

.lookup-label {
  display: block;
  margin-bottom: 10px;
}

.lookup-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

.lookup-row input {
  min-height: 52px;
  border-color: rgba(137, 206, 255, 0.18);
  border-radius: 14px;
  background: rgba(2, 7, 12, 0.76);
  color: rgba(245, 249, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.lookup-row input::placeholder {
  color: rgba(165, 186, 202, 0.52);
}

.lookup-row input:focus {
  border-color: rgba(103, 232, 249, 0.72);
  box-shadow: 0 0 0 4px rgba(12, 211, 255, 0.1);
}

.primary-action,
.usage-shell .calendar-reminder-btn {
  min-height: 52px;
  border: 1px solid rgba(118, 238, 255, 0.52);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(103, 232, 249, 0.98), rgba(24, 167, 255, 0.95) 58%, rgba(124, 92, 255, 0.9));
  color: #041017;
  box-shadow: 0 18px 42px rgba(14, 166, 255, 0.22);
}

.usage-results {
  display: grid;
  gap: 18px;
}

.customer-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid rgba(148, 220, 255, 0.13);
  border-radius: 20px;
  background:
    linear-gradient(135deg, rgba(12, 211, 255, 0.1), transparent 38%),
    rgba(255, 255, 255, 0.035);
  padding: 18px 20px;
}

.strip-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.strip-name {
  color: rgba(246, 250, 255, 0.95);
  font-size: 1.75rem;
  font-weight: 800;
}

.strip-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.strip-meta span {
  border: 1px solid rgba(148, 220, 255, 0.15);
  border-radius: 999px;
  background: rgba(3, 10, 16, 0.58);
  color: rgba(205, 224, 237, 0.82);
  padding: 8px 12px;
  font-size: 0.86rem;
}

.usage-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: stretch;
}

.gauge-card,
.metric-card,
.reminder-card,
.empty-state {
  border: 1px solid rgba(148, 220, 255, 0.14);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    rgba(8, 14, 22, 0.78);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 18px 50px rgba(0, 0, 0, 0.24);
}

.gauge-card {
  display: grid;
  place-items: center;
  gap: 18px;
  border-radius: 24px;
  padding: 28px;
  text-align: center;
}

.gauge-wrap {
  position: relative;
  width: min(280px, 100%);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.usage-gauge {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  filter: drop-shadow(0 0 18px rgba(24, 167, 255, 0.25));
}

.gauge-track,
.gauge-progress {
  fill: none;
  stroke-width: 10;
}

.gauge-track {
  stroke: rgba(255, 255, 255, 0.08);
}

.gauge-progress {
  stroke: url(#gaugeGradient);
  stroke-linecap: round;
  stroke-dasharray: 339.292;
  stroke-dashoffset: var(--dash-offset);
  transition: stroke-dashoffset 0.8s ease;
}

.gauge-core {
  position: absolute;
  display: grid;
  place-items: center;
}

.gauge-number {
  color: rgba(248, 252, 255, 0.96);
  font-size: 4.25rem;
  line-height: 1;
  font-weight: 800;
}

.gauge-number span {
  color: rgba(103, 232, 249, 0.88);
  font-size: 1.35rem;
  vertical-align: top;
}

.gauge-caption {
  margin-top: 6px;
  color: rgba(190, 211, 225, 0.66);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.summary-value {
  margin: 4px 0 8px;
  color: rgba(245, 249, 255, 0.94);
  font-size: 2.2rem;
  font-weight: 800;
}

.gauge-summary p,
.reminder-card p,
.empty-state p {
  color: rgba(190, 211, 225, 0.68);
  line-height: 1.55;
}

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

.metric-card {
  position: relative;
  overflow: hidden;
  min-height: 164px;
  border-radius: 22px;
  padding: 20px;
}

.metric-card::after {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tone), transparent);
  opacity: 0.72;
}

.metric-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

.metric-pulse {
  background: var(--tone);
  box-shadow: 0 0 18px rgba(103, 232, 249, 0.4);
}

.metric-value {
  color: rgba(247, 250, 255, 0.94);
  font-size: 2rem;
  line-height: 1.05;
  font-weight: 800;
}

.metric-note {
  margin-top: 10px;
  color: rgba(185, 206, 221, 0.66);
  line-height: 1.45;
  font-size: 0.9rem;
}

.tone-cyan {
  --tone: #67e8f9;
}

.tone-blue {
  --tone: #18a7ff;
}

.tone-violet {
  --tone: #8f7cff;
}

.tone-good {
  --tone: #43f4b5;
}

.tone-warning {
  --tone: #ffc857;
}

.tone-critical {
  --tone: #ff5b64;
}

.reminder-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-radius: 22px;
  padding: 20px;
}

.reminder-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: rgba(246, 250, 255, 0.92);
  font-size: 1.05rem;
  font-weight: 800;
}

.empty-state {
  display: flex;
  align-items: center;
  gap: 18px;
  border-radius: 22px;
  padding: 22px;
}

.empty-orbit {
  flex: 0 0 auto;
  width: 58px;
  aspect-ratio: 1;
  border: 1px solid rgba(103, 232, 249, 0.28);
  border-radius: 50%;
  background:
    conic-gradient(from 35deg, rgba(103, 232, 249, 0.05), rgba(103, 232, 249, 0.75), rgba(124, 92, 255, 0.08), rgba(103, 232, 249, 0.05));
  box-shadow: inset 0 0 22px rgba(24, 167, 255, 0.22);
}

.empty-title {
  margin-bottom: 4px;
  color: rgba(246, 250, 255, 0.92);
  font-weight: 800;
}

.usage-shell .error-message,
.usage-shell .success-message {
  justify-content: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 91, 100, 0.1);
  text-align: left;
}

.usage-shell .success-message {
  background: rgba(67, 244, 181, 0.1);
}

@media (max-width: 900px) {
  .usage-dashboard {
    padding: 24px;
  }

  .usage-hero,
  .customer-strip,
  .reminder-card {
    flex-direction: column;
    align-items: stretch;
  }

  .usage-title {
    font-size: 3rem;
  }

  .hero-status,
  .strip-meta {
    width: fit-content;
  }

  .usage-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .usage-shell {
    padding: 14px;
    place-items: start center;
  }

  .usage-dashboard {
    border-radius: 22px;
    padding: 18px;
  }

  .usage-title {
    font-size: 2.35rem;
  }

  .lookup-row,
  .metric-grid {
    grid-template-columns: 1fr;
  }

  .lookup-row .primary-action,
  .usage-shell .calendar-reminder-btn {
    width: 100%;
  }

  .strip-name {
    font-size: 1.4rem;
  }

  .gauge-card {
    padding: 20px;
  }

  .gauge-number {
    font-size: 3.35rem;
  }

  .summary-value,
  .metric-value {
    font-size: 1.8rem;
  }

  .metric-card {
    min-height: 136px;
  }

  .empty-state {
    align-items: flex-start;
  }
}

/* Minimal liquid-glass refresh */
body.usage-page {
  --glass: rgba(16, 14, 12, 0.42);
  --glass-strong: rgba(22, 19, 16, 0.58);
  --glass-edge: rgba(255, 244, 229, 0.16);
  --soft-text: rgba(245, 239, 229, 0.92);
  --muted-text: rgba(229, 217, 201, 0.62);
  --warm-line: rgba(255, 210, 155, 0.22);
  --warm-control: rgba(238, 218, 186, 0.9);
  --warm-control-dark: #16100d;
}

body.usage-page::before {
  background:
    radial-gradient(ellipse 90% 55% at 10% 0%, rgba(200, 22, 8, 0.38) 0%, transparent 62%),
    radial-gradient(ellipse 60% 42% at 90% 8%, rgba(140, 10, 4, 0.2) 0%, transparent 58%),
    radial-gradient(ellipse 100% 45% at 50% 108%, rgba(90, 5, 2, 0.18) 0%, transparent 55%);
  background-size: auto;
  mask-image: none;
}

body.usage-page::after {
  background:
    radial-gradient(ellipse 55% 35% at 50% 0%, rgba(229, 62, 62, 0.07) 0%, transparent 68%);
  opacity: 1;
}

.usage-shell {
  padding: 30px 18px;
}

.usage-dashboard {
  width: min(1040px, 100%);
  border-color: var(--glass-edge);
  border-radius: 34px;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    var(--glass);
  box-shadow:
    0 34px 100px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(28px) saturate(1.12);
  -webkit-backdrop-filter: blur(28px) saturate(1.12);
}

.usage-dashboard::before {
  background:
    radial-gradient(circle at 16% 5%, rgba(255, 255, 255, 0.16), transparent 32%),
    linear-gradient(120deg, rgba(255, 184, 98, 0.08), transparent 40%, rgba(255, 255, 255, 0.06));
  opacity: 1;
}

.usage-dashboard::after {
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 28%, rgba(255, 255, 255, 0.03)),
    repeating-radial-gradient(circle at 20% 10%, rgba(255, 255, 255, 0.14) 0 1px, transparent 1px 5px);
  background-size: auto, 9px 9px;
  mask-image: none;
  opacity: 0.42;
}

.usage-hero {
  align-items: center;
  margin-bottom: 22px;
}

.eyebrow,
.lookup-label,
.strip-label,
.summary-kicker,
.metric-topline {
  color: var(--muted-text);
  font-size: 0.76rem;
}

.usage-title {
  max-width: 760px;
  color: var(--soft-text);
  font-size: clamp(3rem, 7vw, 6.3rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.usage-subtitle {
  color: var(--muted-text);
  font-size: 1.04rem;
}

.hero-status,
.strip-meta span,
.lookup-toggle {
  border-color: var(--glass-edge);
  background: rgba(10, 9, 8, 0.42);
  color: rgba(245, 237, 226, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.signal-dot,
.metric-pulse {
  background: rgba(255, 219, 170, 0.95);
  box-shadow: none;
}

.customer-strip {
  border-color: var(--glass-edge);
  background: rgba(12, 11, 10, 0.34);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 14px;
}

.lookup-dock {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.lookup-toggle {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  padding: 0 18px;
  color: rgba(247, 239, 226, 0.86);
  transition: transform 0.22s ease, background 0.22s ease, border-color 0.22s ease;
}

.lookup-toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 237, 205, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.lookup-dock .lookup-panel {
  display: none;
}

.lookup-dock.is-open .lookup-panel {
  display: block;
}

.lookup-panel {
  border-color: var(--glass-edge);
  background: rgba(9, 8, 7, 0.46);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  margin-bottom: 0;
}

.lookup-row input {
  border-color: rgba(255, 236, 204, 0.16);
  background: rgba(5, 5, 4, 0.48);
  color: var(--soft-text);
}

.lookup-row input:focus {
  border-color: rgba(255, 231, 192, 0.38);
  box-shadow: 0 0 0 4px rgba(255, 214, 165, 0.08);
}

.primary-action,
.usage-shell .calendar-reminder-btn {
  border: 1px solid rgba(255, 240, 211, 0.3);
  background:
    linear-gradient(180deg, rgba(255, 248, 237, 0.96), rgba(216, 198, 170, 0.88));
  color: var(--warm-control-dark);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.2);
  transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

.primary-action:hover,
.usage-shell .calendar-reminder-btn:hover {
  opacity: 1;
  transform: translateY(-2px) scale(1.01);
  filter: brightness(1.05);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
}

.usage-layout {
  grid-template-columns: minmax(310px, 0.88fr) minmax(0, 1.12fr);
}

.gauge-card,
.metric-card,
.reminder-card,
.empty-state {
  border-color: var(--glass-edge);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
    rgba(11, 10, 9, 0.44);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 0 rgba(255, 255, 255, 0.04),
    0 18px 50px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
}

.metric-card,
.reminder-card,
.gauge-card {
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.metric-card:hover,
.reminder-card:hover,
.gauge-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 238, 210, 0.26);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.035)),
    rgba(18, 15, 12, 0.52);
}

.gauge-wrap {
  width: min(260px, 100%);
}

.usage-gauge {
  filter: none;
}

.gauge-track {
  stroke: rgba(255, 255, 255, 0.13);
}

.gauge-progress {
  stroke: rgba(255, 235, 203, 0.78);
}

.gauge-core {
  z-index: 2;
}

.gauge-number,
.summary-value,
.metric-value {
  color: var(--soft-text);
}

.gauge-number span {
  color: rgba(255, 230, 190, 0.88);
}

.gauge-caption,
.gauge-summary p,
.reminder-card p,
.empty-state p,
.metric-note {
  color: var(--muted-text);
}

.metric-card::after {
  background: linear-gradient(90deg, transparent, rgba(255, 235, 203, 0.62), transparent);
  opacity: 0.4;
}

.tone-cyan,
.tone-blue,
.tone-violet,
.tone-good,
.tone-warning,
.tone-critical {
  --tone: rgba(255, 220, 174, 0.82);
}

.tone-warning,
.tone-critical {
  --tone: rgba(255, 154, 91, 0.88);
}

.reminder-card {
  align-items: center;
}

.usage-shell .error-message {
  background: rgba(81, 35, 25, 0.42);
  color: rgba(255, 184, 154, 0.96);
}

.usage-shell .success-message {
  background: rgba(54, 45, 30, 0.42);
  color: rgba(255, 235, 203, 0.96);
}

@media (max-width: 900px) {
  .usage-title {
    font-size: clamp(2.75rem, 13vw, 4.8rem);
  }

  .usage-layout {
    grid-template-columns: 1fr;
  }

  .lookup-toggle {
    justify-self: stretch;
  }
}

@media (max-width: 640px) {
  body.usage-page {
    background-position: center top;
    background-attachment: scroll;
  }

  .usage-dashboard {
    border-radius: 28px;
    padding: 18px;
  }

  .usage-hero {
    gap: 14px;
  }

  .usage-title {
    margin-top: 6px;
    font-size: clamp(2.45rem, 15vw, 4rem);
  }

  .usage-subtitle {
    font-size: 0.98rem;
  }

  .strip-meta {
    width: 100%;
  }

  .strip-meta span {
    flex: 1 1 auto;
    text-align: center;
  }

  .gauge-wrap {
    width: min(240px, 100%);
  }

  .metric-card {
    min-height: 122px;
  }
}

/* Dark minimal correction */
body.usage-page {
  --glass: rgba(5, 5, 5, 0.82);
  --glass-strong: rgba(7, 7, 7, 0.9);
  --glass-edge: rgba(255, 255, 255, 0.1);
  --soft-text: rgba(242, 240, 236, 0.94);
  --muted-text: rgba(218, 211, 201, 0.58);
  --warm-line: rgba(255, 255, 255, 0.12);
  --warm-control-dark: #0b0b0b;
}

body.usage-page::after {
  background:
    radial-gradient(ellipse 55% 35% at 50% 0%, rgba(229, 62, 62, 0.07) 0%, transparent 68%);
  opacity: 1;
}

.usage-dashboard {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(7, 7, 7, 0.84);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.usage-dashboard::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 32%);
  opacity: 1;
}

.usage-dashboard::after {
  opacity: 0;
}

.hero-status,
.strip-meta span,
.lookup-toggle,
.customer-strip,
.lookup-panel,
.gauge-card,
.metric-card,
.reminder-card,
.empty-state {
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(16, 16, 16, 0.86);
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.metric-card:hover,
.reminder-card:hover,
.gauge-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(22, 22, 22, 0.9);
}

.primary-action,
.usage-shell .calendar-reminder-btn {
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, rgba(242, 240, 236, 0.96), rgba(190, 181, 168, 0.94));
  color: #0a0a0a;
  box-shadow: none;
}

.primary-action:hover,
.usage-shell .calendar-reminder-btn:hover,
.lookup-toggle:hover {
  transform: translateY(-2px);
  box-shadow: none;
}

.lookup-row input {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.76);
}

.signal-dot,
.metric-pulse {
  background: rgba(238, 226, 209, 0.88);
}

.usage-gauge {
  filter: none;
}

.gauge-track {
  stroke: rgba(255, 255, 255, 0.09);
}

.gauge-progress {
  stroke: url(#gaugeGradient);
  filter: none;
}

.gauge-number span {
  color: rgba(232, 226, 216, 0.84);
}

.metric-card::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0.45;
}

.tone-cyan,
.tone-blue,
.tone-violet,
.tone-good,
.tone-warning,
.tone-critical {
  --tone: rgba(236, 228, 215, 0.85);
}

.signal-dot,
.metric-pulse {
  background: rgba(255, 108, 52, 0.9);
  box-shadow: 0 0 14px rgba(255, 72, 31, 0.28);
}

.gauge-card {
  background:
    radial-gradient(circle at 50% 44%, rgba(255, 67, 27, 0.16), transparent 31%),
    radial-gradient(circle at 62% 30%, rgba(255, 158, 77, 0.08), transparent 22%),
    repeating-radial-gradient(circle at 50% 48%, rgba(255, 96, 43, 0.14) 0 1px, transparent 1px 5px),
    rgba(12, 10, 9, 0.9);
}

.gauge-wrap::before {
  content: "";
  position: absolute;
  inset: 11%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 82, 34, 0.13), transparent 52%),
    repeating-radial-gradient(circle at 44% 38%, rgba(255, 129, 57, 0.18) 0 1px, transparent 1px 4px);
  opacity: 0.78;
}

.gauge-track {
  stroke: rgba(255, 77, 34, 0.12);
}

.gauge-progress {
  stroke: url(#gaugeGradient);
  filter: drop-shadow(0 0 9px rgba(255, 75, 31, 0.36));
}

.gauge-number span {
  color: rgba(255, 132, 70, 0.9);
}

.metric-card::after {
  background: linear-gradient(90deg, transparent, rgba(255, 91, 39, 0.48), transparent);
  opacity: 0.5;
}

.tone-cyan,
.tone-blue,
.tone-violet,
.tone-good,
.tone-warning,
.tone-critical {
  --tone: rgba(255, 112, 54, 0.86);
}

@media (max-width: 640px) {
  body.usage-page {
    background:
      linear-gradient(180deg, rgba(0, 0, 0, 0.74), rgba(0, 0, 0, 0.9)),
      url("/assets/liquid-bg.jpg") center top / cover scroll,
      #030303;
  }
}

/* Reference-style black/red refinement */
body.usage-page {
  background:
    radial-gradient(circle at 72% 16%, rgba(125, 27, 14, 0.2), transparent 26%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.82), rgba(0, 0, 0, 0.94)),
    url("/assets/liquid-bg.jpg") center / cover fixed,
    #020304;
}

body.usage-page::before {
  background:
    radial-gradient(circle at 76% 12%, rgba(255, 54, 24, 0.13), transparent 24%),
    radial-gradient(circle at 48% 45%, rgba(255, 58, 23, 0.055), transparent 34%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.72));
}

body.usage-page::after {
  opacity: 0.1;
  background-image:
    repeating-radial-gradient(circle at 74% 12%, rgba(255, 80, 40, 0.42) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(105deg, rgba(255, 255, 255, 0.03) 0 1px, transparent 1px 10px);
}

.usage-shell {
  padding: 0;
}

.usage-dashboard {
  width: min(1240px, 100%);
  min-height: 100vh;
  border-color: rgba(255, 255, 255, 0.055);
  border-radius: 42px;
  background:
    radial-gradient(circle at 76% 10%, rgba(120, 31, 18, 0.18), transparent 28%),
    linear-gradient(180deg, rgba(8, 10, 12, 0.97), rgba(2, 3, 4, 0.98));
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.76),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  padding: clamp(34px, 5vw, 64px);
}

.usage-dashboard::before {
  background:
    radial-gradient(circle at 76% 12%, rgba(255, 77, 35, 0.095), transparent 22%),
    repeating-radial-gradient(circle at 77% 14%, rgba(255, 76, 35, 0.11) 0 1px, transparent 1px 5px);
  opacity: 0.55;
}

.usage-hero {
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.eyebrow {
  position: relative;
  padding-left: 14px;
  color: rgba(240, 236, 230, 0.72);
  font-size: 0.82rem;
  font-weight: 600;
}

.eyebrow::before {
  content: "";
  position: absolute;
  left: 0;
  top: -4px;
  width: 2px;
  height: 24px;
  border-radius: 999px;
  background: #ff3c25;
  box-shadow: 0 0 18px rgba(255, 60, 37, 0.65);
}

.usage-title {
  margin-top: 26px;
  margin-bottom: 0;
  font-size: clamp(4.2rem, 8vw, 7.2rem);
  font-weight: 500;
  line-height: 0.9;
  text-shadow: 0 18px 46px rgba(255, 255, 255, 0.05);
}

.usage-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.nickname-edit-btn,
.origin-details-toggle,
.nickname-quiet-btn,
.nickname-save-btn {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(8, 8, 9, 0.68);
  color: rgba(244, 239, 232, 0.8);
  padding: 9px 14px;
  font-size: 0.82rem;
  font-weight: 750;
}

.nickname-edit-btn {
}

.origin-details-toggle {
  min-height: 34px;
  padding: 10px 16px;
  border-color: rgba(255, 88, 55, 0.42);
  color: rgba(255, 238, 230, 0.95);
  font-size: 0.9rem;
}

.nickname-edit-btn:hover,
.origin-details-toggle:hover,
.nickname-quiet-btn:hover,
.nickname-save-btn:hover {
  border-color: rgba(255, 89, 55, 0.45);
  color: #fff4ed;
  opacity: 1;
}

.nickname-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  margin-top: 8px;
  margin-bottom: 8px;
}

.nickname-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: min(100%, 680px);
}

.nickname-form input {
  flex: 1 1 220px;
  min-height: 42px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.36);
}

.nickname-save-btn {
  border-color: rgba(255, 75, 44, 0.55);
  background: linear-gradient(135deg, rgba(196, 39, 21, 0.88), rgba(64, 10, 7, 0.84));
  color: #fff3ed;
}

.origin-details {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  color: rgba(232, 226, 219, 0.54);
  font-size: 0.82rem;
}

.origin-details span,
.nickname-message {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  padding: 8px 11px;
}

.nickname-message.success {
  border-color: rgba(97, 240, 154, 0.24);
  color: #68e799;
}

.nickname-message.error {
  border-color: rgba(255, 80, 55, 0.3);
  color: #ff8b78;
}

.usage-subtitle {
  color: rgba(232, 226, 219, 0.7);
  font-size: 1.18rem;
  margin-top: 0;
}

.hero-status-stack {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.hero-status {
  align-self: center;
  padding: 14px 20px;
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(12, 12, 13, 0.72);
  color: rgba(250, 245, 238, 0.92);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.04),
    0 0 32px rgba(255, 59, 31, 0.08);
}

.signal-dot,
.metric-pulse {
  background: #ff4328;
  box-shadow: 0 0 16px rgba(255, 67, 40, 0.65);
}

.payment-state-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(12, 12, 13, 0.76);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 0 26px rgba(255, 255, 255, 0.04);
}

.payment-paid {
  color: #61f09a;
  text-shadow: 0 0 18px rgba(97, 240, 154, 0.32);
}

.payment-unpaid {
  color: #ff4f37;
  text-shadow: 0 0 20px rgba(255, 79, 55, 0.42);
}

.payment-refresh-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 260px;
}

.payment-refresh-btn {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(12, 12, 13, 0.76);
  color: rgba(250, 245, 238, 0.9);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 850;
  padding: 7px 12px;
}

.payment-refresh-btn:hover {
  border-color: rgba(255, 111, 66, 0.42);
  color: #fff8f1;
}

.payment-refresh-btn:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.payment-refresh-note {
  flex-basis: 100%;
  color: rgba(232, 226, 219, 0.66);
  font-size: 0.76rem;
  text-align: center;
}

body.usage-page .hero-status .signal-dot {
  animation: liveSignalPulse 1.65s ease-in-out infinite;
}

@keyframes liveSignalPulse {
  0%,
  100% {
    opacity: 0.42;
    transform: scale(0.86);
    box-shadow: 0 0 8px rgba(255, 67, 40, 0.28);
  }

  45% {
    opacity: 1;
    transform: scale(1.08);
    box-shadow: 0 0 18px rgba(255, 67, 40, 0.72);
  }
}

.customer-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    radial-gradient(circle at 92% 20%, rgba(255, 65, 36, 0.08), transparent 28%),
    rgba(7, 8, 9, 0.58);
  padding: 14px 16px;
}

.strip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.strip-meta-primary span:not(:last-child) {
  position: relative;
}

.strip-meta-primary span:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  width: 1px;
  height: 32px;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.22);
}

.strip-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(8, 8, 9, 0.56);
  color: rgba(250, 246, 240, 0.9);
  padding: 7px 10px;
  font-size: 0.88rem;
  font-weight: 700;
}

.strip-meta span .icon {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ff4328;
  padding: 0;
  box-shadow: none;
}

.usage-results {
  gap: 24px;
}

.usage-layout {
  grid-template-columns: minmax(420px, 0.92fr) minmax(0, 1.25fr);
  gap: 28px;
}

.metrics-column {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.metric-grid {
  gap: 24px;
}

.gauge-card,
.metric-card,
.reminder-card,
.empty-state {
  border-color: rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 94% 14%, rgba(255, 65, 36, 0.08), transparent 22%),
    rgba(7, 8, 9, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 18px 44px rgba(0, 0, 0, 0.24);
}

.gauge-card {
  min-height: 460px;
  background:
    radial-gradient(circle at 64% 31%, rgba(255, 58, 31, 0.16), transparent 24%),
    repeating-radial-gradient(circle at 64% 32%, rgba(255, 64, 31, 0.12) 0 1px, transparent 1px 5px),
    rgba(7, 8, 9, 0.76);
}

.gauge-wrap {
  width: min(300px, 100%);
}

.gauge-wrap::before {
  inset: 18%;
  background:
    radial-gradient(circle at 62% 34%, rgba(255, 64, 32, 0.12), transparent 44%),
    repeating-radial-gradient(circle at 61% 34%, rgba(255, 67, 33, 0.2) 0 1px, transparent 1px 5px);
  opacity: 0.66;
}

.gauge-track {
  stroke: rgba(255, 255, 255, 0.065);
}

.gauge-progress {
  filter: drop-shadow(0 0 13px rgba(255, 63, 35, 0.46));
}

.metric-card {
  min-height: 220px;
  padding: 28px;
}

.metric-value {
  font-size: 2.45rem;
  font-weight: 500;
}

.metric-note,
.gauge-summary p,
.reminder-card p {
  color: rgba(232, 226, 219, 0.62);
}

.metric-card::after {
  opacity: 0;
}

.reminder-card {
  padding: 22px 28px;
}

.reminder-title {
  font-weight: 700;
}

.reminder-title .icon {
  color: #ff4328;
}

.lookup-toggle {
  min-height: 56px;
  padding: 0 24px;
  border-color: rgba(255, 255, 255, 0.09);
  background: rgba(8, 9, 10, 0.76);
}

.lookup-toggle .icon {
  color: #ff4328;
}

.primary-action,
.usage-shell .calendar-reminder-btn {
  border-color: rgba(255, 255, 255, 0.11);
  background: rgba(9, 10, 11, 0.86);
  color: rgba(248, 244, 238, 0.92);
}

.primary-action .icon,
.usage-shell .calendar-reminder-btn .icon {
  color: rgba(248, 244, 238, 0.9);
}

.usage-shell .calendar-reminder-btn:hover,
.primary-action:hover,
.lookup-toggle:hover {
  border-color: rgba(255, 67, 40, 0.42);
  background: rgba(17, 15, 15, 0.92);
}

@media (max-width: 900px) {
  .usage-dashboard {
    min-height: 0;
  }

  .usage-title {
    font-size: clamp(3.4rem, 14vw, 5rem);
  }

  .usage-layout {
    grid-template-columns: 1fr;
  }

  .customer-strip {
    gap: 18px;
  }
}

@media (max-width: 640px) {
  .usage-shell {
    padding: 16px;
  }

  .usage-dashboard {
    border-radius: 28px;
    padding: 28px 18px;
  }

  .usage-hero {
    align-items: flex-start;
    padding-bottom: 20px;
  }

  .usage-title {
    font-size: clamp(3.4rem, 18vw, 4.6rem);
  }

  .strip-meta {
    gap: 10px;
  }

  .strip-meta span {
    justify-content: center;
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    background: rgba(8, 8, 9, 0.68);
  }

  .strip-meta span .icon,
  .strip-meta-primary span:not(:last-child)::after {
    display: none;
  }

  .gauge-card {
    min-height: 390px;
  }

  .metric-card {
    min-height: 142px;
    padding: 22px;
  }
}

/* Transparent chart correction */
.gauge-card {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.gauge-card:hover {
  transform: none;
  border-color: transparent;
  background: transparent;
}

.gauge-wrap::before {
  display: none;
}

.usage-gauge,
.gauge-track,
.gauge-progress {
  background: transparent;
  box-shadow: none;
  filter: none !important;
}

.usage-gauge {
  position: relative;
  z-index: 2;
}

.gauge-wrap::after {
  content: "";
  position: absolute;
  inset: 20%;
  z-index: 1;
  border-radius: 50%;
  background: rgba(2, 3, 4, 0.94);
  pointer-events: none;
}

.gauge-core {
  z-index: 3;
}

.usage-dashboard::after {
  background-image: none;
  opacity: 0;
}

.renewal-card {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 65, 36, 0.08), transparent 24%),
    rgba(7, 8, 9, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 18px 44px rgba(0, 0, 0, 0.24);
  padding: 18px 28px;
}

.prepaid-reset-notice {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 94, 52, 0.22);
  border-radius: 18px;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 65, 36, 0.09), transparent 26%),
    rgba(7, 8, 9, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 16px 36px rgba(0, 0, 0, 0.22);
  padding: 16px 22px;
}

.prepaid-reset-notice.is-failed {
  border-color: rgba(255, 71, 49, 0.38);
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 65, 36, 0.16), transparent 28%),
    rgba(34, 9, 8, 0.72);
}

.prepaid-reset-notice p {
  margin: 0;
  color: rgba(232, 226, 219, 0.7);
  font-size: 0.92rem;
  line-height: 1.45;
}

.prepaid-reset-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.prepaid-reset-meta span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  background: rgba(2, 3, 4, 0.44);
  color: rgba(255, 244, 235, 0.88);
  font-size: 0.76rem;
  font-weight: 800;
  padding: 7px 10px;
}

.email-reminder-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 440px);
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 92% 18%, rgba(255, 65, 36, 0.06), transparent 24%),
    rgba(7, 8, 9, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 18px 44px rgba(0, 0, 0, 0.24);
  padding: 22px 28px;
}

.bank-payment-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  align-items: center;
  gap: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background:
    radial-gradient(circle at 88% 20%, rgba(255, 65, 36, 0.08), transparent 24%),
    rgba(7, 8, 9, 0.76);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.025),
    0 18px 44px rgba(0, 0, 0, 0.24);
  padding: 22px 28px;
}

.bank-payment-card p {
  color: rgba(232, 226, 219, 0.62);
}

.bank-payment-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.bank-payment-details div {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(2, 3, 4, 0.48);
  padding: 12px 14px;
}

.bank-payment-details dt {
  color: rgba(232, 226, 219, 0.52);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.04em;
  margin: 0 0 5px;
  text-transform: uppercase;
}

.bank-payment-details dd {
  color: rgba(250, 245, 238, 0.94);
  font-size: 0.96rem;
  font-weight: 850;
  margin: 0;
  overflow-wrap: anywhere;
}

.email-reminder-card p {
  color: rgba(232, 226, 219, 0.62);
}

.email-reminder-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.email-reminder-form input {
  min-width: 0;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(2, 3, 4, 0.74);
  color: rgba(250, 245, 238, 0.94);
  font: inherit;
  padding: 0 14px;
}

.email-reminder-form input:focus {
  border-color: rgba(255, 87, 52, 0.54);
  box-shadow: 0 0 0 3px rgba(255, 67, 40, 0.12);
  outline: none;
}

.email-reminder-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.email-reminder-actions .calendar-reminder-btn {
  min-height: 48px;
}

.usage-state-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.usage-state-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.state-live {
  color: #61f09a;
  background: rgba(28, 111, 58, 0.16);
}

.state-expired,
.state-exceeded {
  color: #ff4f37;
  background: rgba(146, 34, 24, 0.2);
}

.state-inactive {
  color: #ffb45f;
  background: rgba(159, 91, 23, 0.18);
}

.renewal-card p {
  color: rgba(232, 226, 219, 0.62);
}

.subtitle-whatsapp-link {
  color: rgba(255, 108, 52, 0.96);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 108, 52, 0.46);
}

.subtitle-whatsapp-link:hover {
  color: #fff4eb;
  border-bottom-color: rgba(255, 108, 52, 0.86);
}

.renewal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.renewal-package-label {
  display: none;
}

.renewal-package-control {
  flex: 1 1 360px;
  min-width: 0;
}

.renewal-package-radios {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
}

.renewal-package-pill {
  position: relative;
  display: inline-flex;
}

.renewal-package-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.renewal-package-pill span {
  display: inline-flex;
  min-height: 46px;
  min-width: 82px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01)),
    rgba(2, 3, 4, 0.72);
  color: rgba(250, 245, 238, 0.78);
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 850;
  line-height: 1;
  padding: 0 12px;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    transform 160ms ease,
    background 160ms ease;
  white-space: nowrap;
}

.renewal-package-pill:hover span {
  border-color: rgba(255, 111, 66, 0.36);
  color: rgba(255, 248, 241, 0.94);
  transform: translateY(-1px);
}

.renewal-package-pill input:checked + span {
  border-color: rgba(255, 87, 52, 0.72);
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 103, 56, 0.26), transparent 65%),
    rgba(255, 67, 40, 0.14);
  color: #fff8f1;
  box-shadow:
    0 0 0 1px rgba(255, 149, 94, 0.16),
    0 0 22px rgba(255, 67, 40, 0.26);
}

.renewal-package-pill input:focus-visible + span {
  outline: 2px solid rgba(255, 129, 80, 0.9);
  outline-offset: 3px;
}

.renewal-request-highlight {
  flex: 1 1 190px;
  min-height: 54px;
  border-color: rgba(255, 87, 52, 0.52) !important;
  background:
    linear-gradient(135deg, rgba(255, 79, 46, 0.98), rgba(136, 20, 13, 0.96)) !important;
  color: #fff8f1 !important;
  box-shadow:
    0 0 0 1px rgba(255, 149, 94, 0.18),
    0 0 28px rgba(255, 67, 40, 0.34),
    0 18px 38px rgba(0, 0, 0, 0.34) !important;
  font-size: 1rem;
  font-weight: 900;
}

.renewal-request-highlight:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 179, 124, 0.26),
    0 0 36px rgba(255, 67, 40, 0.46),
    0 22px 44px rgba(0, 0, 0, 0.42) !important;
}

.renewal-request-highlight:disabled {
  opacity: 0.72;
  transform: none;
}

.renewal-months-btn {
  flex: 0 0 52px;
  min-width: 52px;
  min-height: 52px;
  border: 1px solid rgba(255, 87, 52, 0.52);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 103, 56, 0.2), transparent 68%),
    rgba(2, 3, 4, 0.72);
  color: #fff8f1;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 950;
  padding: 0 12px;
  box-shadow: 0 0 20px rgba(255, 67, 40, 0.18);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.renewal-months-btn:hover {
  border-color: rgba(255, 129, 80, 0.82);
  box-shadow: 0 0 28px rgba(255, 67, 40, 0.32);
  transform: translateY(-1px);
}

.renewal-card .success-message,
.renewal-card .error-message,
.email-reminder-card .success-message,
.email-reminder-card .error-message {
  grid-column: 1 / -1;
  margin: 0;
}

.renewal-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.58);
  padding: 18px;
}

.renewal-modal {
  width: min(460px, 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  background:
    radial-gradient(circle at 90% 12%, rgba(255, 67, 40, 0.12), transparent 30%),
    rgba(13, 14, 16, 0.96);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.58);
  padding: 24px;
}

.renewal-modal-kicker {
  color: rgba(255, 91, 56, 0.95);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.renewal-modal h2 {
  margin: 8px 0;
  color: rgba(250, 245, 238, 0.96);
  font-size: 1.8rem;
  letter-spacing: 0;
}

.renewal-modal p {
  color: rgba(232, 226, 219, 0.68);
  line-height: 1.55;
}

.renewal-ticket-code {
  margin: 18px 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.42);
  color: #fff4eb;
  padding: 18px;
  text-align: center;
  font-size: 2rem;
  font-weight: 800;
}

.renewal-dialog-meta {
  margin: 12px 0 18px;
}

.renewal-dialog-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (max-width: 760px) {
  .renewal-card,
  .prepaid-reset-notice,
  .bank-payment-card,
  .email-reminder-card,
  .renewal-actions {
    grid-template-columns: 1fr;
  }

  .renewal-actions {
    align-items: stretch;
  }

  .renewal-package-label {
    display: none;
  }

  .renewal-package-radios {
    display: flex;
    flex-wrap: nowrap;
  }

  .renewal-package-pill span {
    min-width: 0;
    width: auto;
    padding: 0 10px;
    font-size: 0.76rem;
  }

  .email-reminder-form {
    grid-template-columns: 1fr;
  }

  .bank-payment-details {
    grid-template-columns: 1fr;
  }

  .email-reminder-actions {
    justify-content: stretch;
  }

  .email-reminder-actions > * {
    flex: 1 1 100%;
  }
}

@media (max-width: 640px) {
  html,
  body.usage-page {
    width: 100%;
    max-width: 100%;
    /* clip (not hidden) prevents sideways scroll WITHOUT creating a scroll
       container — keeps the sticky header pinned on mobile. */
    overflow-x: clip;
  }

  body.usage-page {
    background-attachment: scroll;
  }

  .usage-shell {
    width: 100%;
    min-width: 0;
    padding: 10px;
    place-items: start stretch;
    overflow-x: clip;
  }

  .usage-dashboard {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 22px;
    padding: 18px 12px;
    overflow: hidden;
  }

  .usage-hero {
    gap: 14px;
    padding-bottom: 16px;
  }

  .usage-title-row {
    align-items: flex-end;
    gap: 8px;
  }

  .usage-title {
    margin-top: 14px;
    font-size: clamp(3rem, 14vw, 3.85rem);
    line-height: 0.94;
    overflow-wrap: anywhere;
  }

  .usage-subtitle {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.55;
  }

  .nickname-edit-btn,
  .origin-details-toggle,
  .nickname-quiet-btn,
  .nickname-save-btn {
    min-height: 34px;
    padding: 8px 12px;
    font-size: 0.78rem;
  }

  .nickname-edit-btn {
    margin-top: 8px;
  }

  .nickname-panel {
    gap: 8px;
    margin-top: 8px;
  }

  .origin-details {
    font-size: 0.68rem;
  }

  .origin-details span,
  .nickname-message {
    padding: 7px 9px;
  }

  .hero-status-stack {
    width: 100%;
    align-items: center;
  }

  .hero-status {
    width: auto;
    max-width: 100%;
    padding: 10px 12px;
    gap: 8px;
    font-size: 0.82rem;
  }

  .usage-state-badge {
    padding: 4px 7px;
    font-size: 0.62rem;
  }

  .payment-refresh-wrap {
    max-width: 100%;
    justify-content: center;
  }

  .payment-state-badge,
  .payment-refresh-btn {
    min-height: 32px;
    min-width: 0;
    padding: 6px 10px;
    font-size: 0.68rem;
  }

  .payment-refresh-note {
    text-align: center;
  }

  .usage-results {
    gap: 18px;
  }

  .customer-strip {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    border-radius: 16px;
    padding: 10px;
  }

  .strip-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    gap: 8px;
  }

  .strip-meta-primary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .strip-meta span {
    width: auto;
    min-height: 34px;
    justify-content: center;
    font-size: 0.68rem;
    line-height: 1.2;
    padding: 7px 5px;
    text-align: center;
  }

  .strip-meta span .icon,
  .strip-meta-primary span:not(:last-child)::after {
    display: none;
  }

  .usage-layout {
    gap: 18px;
  }

  .gauge-card {
    min-height: 0;
    padding: 4px 0 0;
  }

  .gauge-wrap {
    width: min(220px, 76vw);
  }

  .usage-gauge {
    display: block;
  }

  .gauge-wrap::before {
    display: none;
  }

  .gauge-number {
    font-size: clamp(2.6rem, 12vw, 3.4rem);
  }

  .gauge-caption {
    font-size: 0.68rem;
  }

  .summary-kicker {
    margin-top: 12px;
    font-size: 0.68rem;
  }

  .summary-value {
    font-size: clamp(1.6rem, 8vw, 2.2rem);
  }

  .gauge-summary p {
    font-size: 0.88rem;
  }

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

  .metric-card {
    min-height: 118px;
    border-radius: 16px;
    padding: 16px 12px;
  }

  .metric-topline {
    font-size: 0.66rem;
  }

  .metric-value {
    font-size: clamp(1.45rem, 8vw, 2rem);
    line-height: 1.04;
  }

  .metric-note {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .metric-pulse {
    width: 7px;
    height: 7px;
  }

  .renewal-card,
  .prepaid-reset-notice,
  .bank-payment-card,
  .email-reminder-card {
    border-radius: 18px;
    padding: 14px;
  }

  .prepaid-reset-notice p {
    font-size: 0.82rem;
  }

  .prepaid-reset-meta {
    gap: 6px;
  }

  .prepaid-reset-meta span {
    font-size: 0.68rem;
    padding: 6px 8px;
  }

  .renewal-actions {
    display: grid;
    grid-template-columns: 1fr 52px;
    gap: 10px;
    align-items: center;
  }

  .renewal-package-control {
    grid-column: 1 / -1;
    flex: none;
    width: 100%;
  }

  .renewal-package-radios {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }

  .renewal-package-pill,
  .renewal-package-pill span {
    width: 100%;
  }

  .renewal-package-pill span {
    min-height: 38px;
    min-width: 0;
    padding: 0 5px;
    font-size: 0.68rem;
  }

  .renewal-request-highlight {
    grid-column: 1;
    width: 100%;
    min-height: 48px;
    font-size: 0.82rem;
  }

  .renewal-months-btn {
    grid-column: 2;
    width: 52px;
    min-height: 48px;
  }

  .bank-payment-card,
  .email-reminder-card {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .bank-payment-card p,
  .email-reminder-card p {
    font-size: 0.82rem;
    line-height: 1.45;
  }

  .bank-payment-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .bank-payment-details div {
    border-radius: 12px;
    padding: 10px;
  }

  .bank-payment-details dt {
    font-size: 0.62rem;
  }

  .bank-payment-details dd {
    font-size: 0.78rem;
  }

  .email-reminder-form {
    grid-template-columns: 1fr;
  }
}

/* Final public usage layout overrides: keep the hero balanced and move compact stats into it. */
body.usage-page .usage-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 430px);
  align-items: start;
  gap: clamp(22px, 4.4vw, 64px);
}

body.usage-page .hero-copy {
  min-width: 0;
}

body.usage-page .hero-status-stack {
  width: 100%;
  align-self: center;
  justify-self: end;
  align-items: stretch;
}

body.usage-page .hero-status {
  align-self: flex-end;
}

body.usage-page .payment-refresh-wrap {
  align-self: flex-end;
  justify-content: flex-end;
}

body.usage-page .payment-refresh-note {
  text-align: right;
}

body.usage-page .hero-summary-strip {
  width: 100%;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: 4px;
  padding: 12px;
}

body.usage-page .hero-summary-strip .strip-meta-primary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

body.usage-page .hero-summary-strip .strip-meta-primary span::after {
  display: none;
}

body.usage-page .hero-summary-strip .strip-meta span {
  width: 100%;
  min-height: 38px;
  justify-content: center;
  overflow: hidden;
  text-align: center;
  white-space: nowrap;
}

body.usage-page .usage-layout {
  align-items: center;
}

body.usage-page .metrics-column {
  align-self: center;
}

@media (max-width: 900px) {
  body.usage-page .usage-hero {
    grid-template-columns: 1fr;
  }

  body.usage-page .hero-status-stack {
    justify-self: stretch;
    align-self: stretch;
  }

  body.usage-page .hero-status,
  body.usage-page .payment-refresh-wrap {
    align-self: center;
  }

  body.usage-page .payment-refresh-wrap {
    justify-content: center;
  }

  body.usage-page .payment-refresh-note {
    text-align: center;
  }
}

@media (max-width: 640px) {
  body.usage-page .usage-shell {
    padding-inline: 8px;
  }

  body.usage-page .usage-dashboard {
    padding-inline: 12px;
  }

  body.usage-page .usage-hero {
    gap: 12px;
  }

  body.usage-page .hero-status-stack {
    gap: 8px;
  }

  body.usage-page .hero-status {
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
  }

  body.usage-page .hero-summary-strip {
    margin-top: 0;
    border-radius: 16px;
    padding: 9px;
  }

  body.usage-page .hero-summary-strip .strip-meta-primary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  body.usage-page .hero-summary-strip .strip-meta span {
    min-height: 32px;
    padding: 6px 5px;
    font-size: 0.67rem;
  }

  body.usage-page .hero-summary-strip .strip-meta span .icon {
    display: none;
  }
}

/* ── All-time usage stat ── */
.lifetime-stat-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 14px;
}

.lifetime-stat {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lifetime-label {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  white-space: nowrap;
}

.lifetime-arrow {
  color: var(--accent);
  font-size: 0.82rem;
  opacity: 0.75;
}

.lifetime-count {
  color: var(--text-main);
  font-size: 1.35rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  text-shadow: 0 0 18px rgba(229, 62, 62, 0.5);
}

/* ---- Liquid gauge ---- */
.liquid-gauge {
  position: relative;
  width: min(260px, 100%);
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 30%, rgba(34, 12, 8, 0.9), rgba(8, 4, 3, 0.96));
  border: 2px solid rgba(255, 88, 55, 0.30);
  box-shadow: inset 0 0 34px rgba(0, 0, 0, 0.65), 0 0 42px rgba(255, 67, 40, 0.16);
}

.liquid-wave {
  position: absolute;
  width: 210%;
  aspect-ratio: 1;
  left: -55%;
  border-radius: 42%;
  transition: top 1.4s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.wave-back {
  background: linear-gradient(180deg, rgba(255, 100, 47, 0.34), rgba(141, 22, 15, 0.42));
  border-radius: 46%;
  animation: liquidSpin 13s linear infinite reverse;
}

.wave-front {
  background: linear-gradient(180deg, rgba(255, 130, 60, 0.92), rgba(141, 22, 15, 0.95) 70%);
  animation: liquidSpin 9s linear infinite;
}

@keyframes liquidSpin {
  to { transform: rotate(360deg); }
}

.liquid-gauge .gauge-core {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  z-index: 2;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.75);
}

.liquid-gauge .gauge-number span {
  color: #ffcf8a;
}

/* ---- Payment options accordion ---- */
.payment-methods-card {
  border-radius: 24px;
  padding: 22px 24px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(12, 8, 7, 0.55);
}

.payment-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.pay-option-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.32);
  color: rgba(244, 239, 232, 0.88);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.2s ease;
}

.pay-option-head:hover {
  border-color: rgba(255, 88, 55, 0.45);
  transform: translateY(-1px);
}

.pay-option-head.is-open {
  border-color: rgba(255, 88, 55, 0.55);
  background: rgba(64, 14, 8, 0.35);
}

.pay-option-chevron {
  color: var(--accent, #ff5837);
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
}

.pay-option-panel {
  padding: 14px 18px 6px;
  animation: panelIn 0.35s ease both;
}

.pay-option-panel p {
  color: rgba(190, 180, 172, 0.78);
  line-height: 1.55;
  margin-bottom: 12px;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.soon-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 178, 80, 0.4);
  color: #ffcf8a;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- Entrance animations ---- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.usage-hero { animation: fadeUp 0.55s ease both; }
.gauge-card { animation: fadeUp 0.55s ease 0.08s both; }
.metrics-column { animation: fadeUp 0.55s ease 0.16s both; }
.renewal-card { animation: fadeUp 0.55s ease 0.24s both; }
.prepaid-reset-notice,
.lifetime-stat-card { animation: fadeUp 0.55s ease 0.3s both; }
.payment-methods-card { animation: fadeUp 0.55s ease 0.36s both; }
.email-reminder-card { animation: fadeUp 0.55s ease 0.44s both; }

/* ---- Renew button breathing glow ---- */
@keyframes renewPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 67, 40, 0.35); }
  50% { box-shadow: 0 0 22px 4px rgba(255, 67, 40, 0.22); }
}

.renewal-request-highlight {
  animation: renewPulse 2.8s ease-in-out infinite;
}

/* ---- Ambient background glow drift ---- */
@keyframes ambientGlow {
  0%, 100% { opacity: 0.35; transform: translate3d(-4%, -2%, 0) scale(1); }
  50% { opacity: 0.65; transform: translate3d(4%, 3%, 0) scale(1.08); }
}

body::after {
  content: "";
  position: fixed;
  inset: -20%;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(40% 34% at 78% 18%, rgba(255, 67, 40, 0.13), transparent 70%),
    radial-gradient(34% 30% at 14% 82%, rgba(255, 100, 47, 0.08), transparent 70%);
  animation: ambientGlow 11s ease-in-out infinite;
  will-change: transform, opacity;
}

@media (prefers-reduced-motion: reduce) {
  .liquid-wave,
  .renewal-request-highlight,
  body::after {
    animation: none;
  }
}

/* ---- Clean gradient background (replaces liquid-bg.jpg) ---- */
body,
body.usage-page {
  background:
    radial-gradient(110% 80% at 80% -10%, rgba(126, 30, 14, 0.5), transparent 55%),
    radial-gradient(90% 70% at 6% 105%, rgba(92, 22, 10, 0.38), transparent 60%),
    radial-gradient(60% 50% at 50% 50%, rgba(34, 10, 6, 0.5), transparent 75%),
    linear-gradient(165deg, #0b0504 0%, #130806 42%, #060302 100%) !important;
}

body.usage-page::before {
  background:
    radial-gradient(ellipse 90% 55% at 10% 0%, rgba(200, 22, 8, 0.32) 0%, transparent 62%),
    radial-gradient(ellipse 60% 42% at 90% 8%, rgba(140, 10, 4, 0.16) 0%, transparent 58%) !important;
  background-size: auto !important;
  mask-image: none !important;
  opacity: 1 !important;
}

body.usage-page::after {
  background:
    radial-gradient(ellipse 55% 35% at 50% 0%, rgba(229, 62, 62, 0.06) 0%, transparent 68%) !important;
  background-image: none !important;
  opacity: 1 !important;
}

/* ---- Smaller title so long names fit one line on mobile ---- */
.usage-title {
  font-size: clamp(1.9rem, 7.5vw, 3.6rem) !important;
  line-height: 1.06;
  overflow-wrap: anywhere;
}

/* ---- Animated renewal price ---- */
.renewal-price {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 178, 80, 0.35);
  background: rgba(40, 14, 6, 0.45);
  color: #ffcf8a;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.renewal-price #renewal-price-value {
  font-variant-numeric: tabular-nums;
  color: #ffe5c2;
  margin-left: 2px;
}

/* ── Google Sign-In / VLESS link section ────────────────────────────────── */
.vless-auth-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  padding: 20px;
  margin-top: 16px;
}

.google-signin-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.google-signin-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
}

.vless-auth-error {
  color: #fc8181;
  font-size: 0.82rem;
  margin-top: 10px;
}

.vless-auth-signed-in {}

.vless-auth-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.vless-auth-user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
}

.vless-user-avatar {
  border-radius: 50%;
  object-fit: cover;
}

.vless-user-name {
  font-weight: 500;
}

.vless-signout-btn {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.75rem;
  padding: 4px 10px;
  cursor: pointer;
}
.vless-signout-btn:hover { color: rgba(255, 255, 255, 0.7); border-color: rgba(255, 255, 255, 0.3); }

.vless-loading {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.45);
  font-style: italic;
}

.vless-link-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vless-link-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

.vless-link-code {
  display: block;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: "SF Mono", "Fira Code", monospace;
  font-size: 0.7rem;
  color: #86efac;
  word-break: break-all;
  line-height: 1.5;
}

.copy-vless-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(134, 239, 172, 0.1);
  border: 1px solid rgba(134, 239, 172, 0.25);
  border-radius: 8px;
  color: #86efac;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 8px 14px;
  cursor: pointer;
  align-self: flex-start;
  transition: background 0.15s;
}
.copy-vless-btn:hover { background: rgba(134, 239, 172, 0.18); }
.copy-vless-btn svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Portal top header + animated Google sign-in ────────────────────────── */
.portal-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  background: linear-gradient(180deg, rgba(12, 5, 4, 0.82) 0%, rgba(12, 5, 4, 0.35) 100%);
  border-bottom: 1px solid rgba(229, 62, 62, 0.14);
}

.portal-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.portal-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.portal-brand-mark {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 0 18px rgba(229, 62, 62, 0.45);
}
.portal-brand-sub {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255, 180, 170, 0.55);
}

.portal-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Animated sign-in button */
.header-signin-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(229, 62, 62, 0.45);
  background: linear-gradient(135deg, rgba(40, 12, 8, 0.9), rgba(20, 6, 4, 0.9));
  color: #fff;
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.0);
  animation: signinPulse 2.6s ease-in-out infinite;
}
.header-signin-btn svg { position: relative; z-index: 2; background: #fff; border-radius: 50%; padding: 2px; box-sizing: content-box; width: 16px; height: 16px; }
.header-signin-btn span:not(.header-signin-glow) { position: relative; z-index: 2; }

.header-signin-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(229, 62, 62, 0.8);
  box-shadow: 0 8px 26px -8px rgba(229, 62, 62, 0.65);
  animation-play-state: paused;
}
.header-signin-btn:active { transform: translateY(0); }

/* Sheen sweep */
.header-signin-glow {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 120, 100, 0.28) 48%, transparent 76%);
  transform: translateX(-120%);
  animation: signinSheen 2.8s ease-in-out infinite;
}

@keyframes signinPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.0); }
  50% { box-shadow: 0 0 22px -2px rgba(229, 62, 62, 0.5); }
}
@keyframes signinSheen {
  0% { transform: translateX(-120%); }
  55%, 100% { transform: translateX(120%); }
}
@media (prefers-reduced-motion: reduce) {
  .header-signin-btn { animation: none; }
  .header-signin-glow { animation: none; display: none; }
}

/* Signed-in account chip */
.header-account {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 6px 5px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}
.header-avatar {
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-avatar-fallback {
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #e53e3e, #7e1e0e);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
}
.header-account-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-signout-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 11px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.header-signout-btn:hover { color: #fff; border-color: rgba(229, 62, 62, 0.5); background: rgba(229, 62, 62, 0.12); }

/* Body locked hint (logged out) */
.vless-locked-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: rgba(229, 62, 62, 0.06);
  border: 1px dashed rgba(229, 62, 62, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.vless-locked-hint:hover { background: rgba(229, 62, 62, 0.12); border-color: rgba(229, 62, 62, 0.55); }
.vless-locked-hint svg { margin-left: auto; background: #fff; border-radius: 50%; padding: 2px; box-sizing: content-box; width: 15px; height: 15px; flex-shrink: 0; }
.vless-lock-icon { font-size: 1rem; flex-shrink: 0; }

/* ── Auth modal (Google + email magic link) ─────────────────────────────── */
.auth-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(4, 2, 2, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: authFadeIn 0.18s ease;
}
@keyframes authFadeIn { from { opacity: 0; } to { opacity: 1; } }

.auth-modal {
  position: relative;
  width: 100%;
  max-width: 380px;
  background: linear-gradient(165deg, #1a0c09 0%, #120706 100%);
  border: 1px solid rgba(229, 62, 62, 0.22);
  border-radius: 20px;
  padding: 28px 24px 22px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.8), 0 0 40px -10px rgba(229, 62, 62, 0.25);
  animation: authPop 0.2s ease;
}
@keyframes authPop { from { transform: translateY(8px) scale(0.98); opacity: 0; } to { transform: none; opacity: 1; } }

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.auth-modal-close:hover { color: #fff; }

.auth-modal-title { font-size: 1.35rem; font-weight: 800; color: #fff; margin: 0 0 6px; }
.auth-modal-sub { font-size: 0.85rem; color: rgba(255, 255, 255, 0.55); margin: 0 0 20px; line-height: 1.45; }

.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #fff;
  color: #1a1a1a;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.auth-google-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.5); }
.auth-google-btn svg { width: 18px; height: 18px; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.auth-email-form { display: flex; flex-direction: column; gap: 10px; }
.auth-email-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.92rem;
}
.auth-email-form input:focus { outline: none; border-color: rgba(229, 62, 62, 0.6); }
.auth-email-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(229, 62, 62, 0.5);
  background: linear-gradient(135deg, #e53e3e, #a11d12);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
}
.auth-email-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.auth-email-btn:disabled { opacity: 0.6; cursor: default; }

.auth-modal-error { margin-top: 12px; color: #fc8181; font-size: 0.82rem; }
.auth-modal-fineprint { margin: 16px 0 0; color: rgba(255, 255, 255, 0.35); font-size: 0.74rem; line-height: 1.45; }

.auth-modal-sent { text-align: center; padding: 8px 0; }
.auth-sent-icon { font-size: 2.6rem; margin-bottom: 10px; }

/* ── Login-gated sections ───────────────────────────────────────────────── */
.lock-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: rgba(229, 62, 62, 0.1);
  border: 1px solid rgba(229, 62, 62, 0.28);
  color: #ffd9d2;
  font-size: 0.85rem;
  font-weight: 600;
}
.lock-banner .icon { width: 16px; height: 16px; flex-shrink: 0; }
.lock-banner span { flex: 1; }
.lock-banner-btn {
  background: linear-gradient(135deg, #e53e3e, #a11d12);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  cursor: pointer;
  white-space: nowrap;
}
.lock-banner-btn:hover { filter: brightness(1.1); }

.renewal-card-locked .renewal-actions {
  opacity: 0.4;
  filter: grayscale(0.7);
  pointer-events: none;
  user-select: none;
}

.gated-hint-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(229, 62, 62, 0.28);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}
.gated-hint-card .icon { width: 18px; height: 18px; flex-shrink: 0; color: rgba(229, 62, 62, 0.8); }
.gated-hint-card span { flex: 1; }

.payment-state-badge.payment-locked {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}
.payment-state-badge.payment-locked .icon { width: 13px; height: 13px; }
.payment-state-badge.payment-locked:hover { border-color: rgba(229, 62, 62, 0.5); color: #fff; }

/* ── Animated veil background layering ──────────────────────────────────── */
#veil-bg-canvas { z-index: 0 !important; }

/* Readability scrim sits just above the veil, below content. */
#veil-scrim {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(130% 100% at 50% -5%, rgba(4,2,1,0) 0%, rgba(5,2,1,0.16) 45%, rgba(4,2,1,0.48) 100%),
    linear-gradient(180deg, rgba(4,2,1,0) 55%, rgba(4,2,1,0.42) 100%);
}

/* Keep all portal content above the veil. */
#root { position: relative; z-index: 1; }
body.usage-page #root .usage-shell { position: relative; z-index: 1; }

/* The flowing shader is now the background — switch off the old flat-gradient
   overlays / tiled line texture that used to sit over it. */
body.usage-page::before,
body.usage-page::after { display: none !important; }

/* ── Glassmorphic dashboard panel (lets the veil glow through) ───────────── */
body.usage-page .usage-dashboard {
  background:
    radial-gradient(circle at 78% 6%, rgba(170, 48, 24, 0.20), transparent 36%),
    linear-gradient(180deg, rgba(16, 11, 11, 0.58), rgba(8, 5, 5, 0.66));
  backdrop-filter: blur(26px) saturate(128%);
  -webkit-backdrop-filter: blur(26px) saturate(128%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    0 40px 120px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* Soft corner glow only — drop the old repeating-ring texture on the glass. */
body.usage-page .usage-dashboard::before {
  background:
    radial-gradient(circle at 78% 8%, rgba(255, 90, 40, 0.10), transparent 30%) !important;
  opacity: 1 !important;
}

/* ── Frozen header: solidify on scroll (Excel-style locked row) ──────────── */
.portal-header {
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
body.scrolled-down .portal-header {
  background: linear-gradient(180deg, rgba(10, 4, 3, 0.96) 0%, rgba(10, 4, 3, 0.9) 100%);
  border-bottom-color: rgba(229, 62, 62, 0.3);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}
