:root {
  --bg: #050b14;
  --bg-soft: #0b1a2e;
  --accent: #8b5e34;
  --accent-light: #a67345;
  --teal: #4ecdc4;
  --glass-border: rgba(255, 255, 255, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: #fff;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

.font-heading {
  font-family: 'Manrope', sans-serif;
}

/* noise texture overlay */
.bg-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.2;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
}

.glass {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.01) 100%);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15), inset 0 -1px 1px rgba(255, 255, 255, 0.02),
    0 8px 32px rgba(0, 0, 0, 0.3);
  border-radius: 22px;
}

.glass-pill {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* App shell */
.app {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 96px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(5, 11, 20, 0.75);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--glass-border);
}

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

.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-name {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
}

.brand-name span {
  color: var(--accent);
}

.balance-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-light);
}

/* Screens */
.screen {
  display: none;
  padding: 18px 16px 12px;
  animation: fade-in 0.25s ease;
}

.screen.active {
  display: block;
}

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

h1.page-title {
  font-family: 'Manrope', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 4px 0 16px;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.page-title-row .page-title {
  margin: 4px 0;
}

.btn-compact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  border: 1px solid rgba(166, 115, 69, 0.5);
  box-shadow: 0 0 16px rgba(139, 94, 52, 0.2);
  cursor: pointer;
  transition: transform 0.15s ease;
  flex-shrink: 0;
}

.btn-compact:active {
  transform: scale(0.96);
}

.btn-compact svg {
  width: 14px;
  height: 14px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin: 24px 0 12px;
}

.section-title svg {
  color: var(--accent);
  width: 18px;
  height: 18px;
}

/* Cards */
.card {
  padding: 18px;
  margin-bottom: 14px;
}

.sub-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.flag-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.sub-card-title {
  font-weight: 700;
  font-size: 16px;
}

.sub-card-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.expiry-pill {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  padding: 6px 10px;
  border-radius: 10px;
  white-space: nowrap;
}

.expiry-pill svg {
  width: 14px;
  height: 14px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pill-row .expiry-pill {
  margin: 0;
}

.expiry-pill.devices {
  color: var(--teal);
  background: rgba(78, 205, 196, 0.1);
}

.progress-track {
  height: 6px;
  width: 100%;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #d29b5f);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.97);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.btn-primary {
  background: linear-gradient(90deg, var(--accent), var(--accent-light));
  color: #fff;
  border: 1px solid rgba(166, 115, 69, 0.5);
  box-shadow: 0 0 20px rgba(139, 94, 52, 0.25);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-ghost {
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-row {
  display: flex;
  gap: 10px;
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.sub-card-actions {
  display: flex;
  gap: 10px;
}

.sub-card-actions .btn {
  flex: 1;
}

/* Plans */
.plan-card {
  padding: 20px;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.plan-card.featured {
  border-color: rgba(139, 94, 52, 0.35);
  box-shadow: 0 0 30px rgba(139, 94, 52, 0.12), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.plan-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: linear-gradient(90deg, var(--accent), #b5773f);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 14px;
  border-bottom-left-radius: 12px;
}

.plan-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 2px;
}

.plan-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 14px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 14px;
}

.plan-price .amount {
  font-size: 28px;
  font-weight: 700;
}

.plan-price .period {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.chip-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.chip-row::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.chip.active {
  background: rgba(139, 94, 52, 0.2);
  border-color: rgba(139, 94, 52, 0.5);
  color: #fff;
}

/* Payment method cards (top-up sheet) */
.method-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.method-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fff;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.method-card.active {
  background: rgba(139, 94, 52, 0.16);
  border-color: var(--accent-light);
  box-shadow: 0 0 0 1px var(--accent-light) inset;
}

.method-card.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.method-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.06);
  color: var(--accent-light);
}

.method-icon svg {
  width: 18px;
  height: 18px;
}

.method-body {
  flex: 1;
  min-width: 0;
}

.method-name {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.method-bonus {
  font-size: 10px;
  font-weight: 700;
  color: var(--teal);
  background: rgba(78, 205, 196, 0.14);
  padding: 2px 6px;
  border-radius: 999px;
}

.method-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.method-check {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 0.15s ease;
}

.method-check svg {
  width: 12px;
  height: 12px;
}

.method-card.active .method-check {
  background: var(--accent);
  border-color: var(--accent-light);
  color: #fff;
}

.duration-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.duration-btn {
  position: relative;
  padding: 9px 4px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all 0.15s ease;
}

.duration-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent-light);
}

.discount-badge {
  position: absolute;
  top: -8px;
  right: -6px;
  font-size: 9px;
  font-weight: 700;
  background: #f59e0b;
  color: #fff;
  padding: 2px 5px;
  border-radius: 999px;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.8);
}

.feature-list svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 1px;
}

/* Profile */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 18px;
}

.avatar {
  width: 84px;
  height: 84px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 3px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.avatar svg {
  width: 40px;
  height: 40px;
  color: rgba(255, 255, 255, 0.5);
}

.profile-name {
  font-size: 19px;
  font-weight: 700;
  margin-bottom: 2px;
}

.profile-username {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 14px;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 13px;
  font-weight: 500;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #4ade80;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 6px;
}

.stat-box {
  padding: 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
}

.menu-list {
  padding: 6px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.15s ease;
}

.menu-item:last-child {
  border-bottom: none;
}

.menu-item:active {
  background: rgba(255, 255, 255, 0.04);
}

.menu-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.menu-icon svg {
  width: 18px;
  height: 18px;
  color: var(--accent);
}

.menu-text {
  flex: 1;
}

.menu-title {
  font-size: 14px;
  font-weight: 600;
}

.menu-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 1px;
}

.menu-item svg.chevron {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.3);
}

/* Support */
.support-hero {
  text-align: center;
  padding: 32px 20px;
}

.support-icon {
  width: 68px;
  height: 68px;
  border-radius: 999px;
  background: rgba(0, 136, 204, 0.1);
  border: 1px solid rgba(0, 136, 204, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}

.support-icon svg {
  width: 32px;
  height: 32px;
  color: #0088cc;
}

.support-hero h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 8px;
}

.support-hero p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto 22px;
}

.support-hero .btn-row {
  flex-direction: column;
  margin-bottom: 20px;
}

.response-time {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.4);
}

.faq-entry-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}

.faq-entry-card svg.chevron {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.faq-item {
  padding: 0 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 14px 0;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  text-align: left;
  cursor: pointer;
}

.faq-chevron {
  width: 16px;
  height: 16px;
  color: rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.faq-item.expanded .faq-chevron {
  transform: rotate(180deg);
}

.faq-a-wrap {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.22s ease;
}

.faq-item.expanded .faq-a-wrap {
  grid-template-rows: 1fr;
}

.faq-a {
  overflow: hidden;
  min-height: 0;
}

.faq-a p {
  margin: 0;
  padding-bottom: 14px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.55;
}

/* Bottom nav */
.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
}

.bottom-nav-inner {
  width: 100%;
  max-width: 520px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  background: rgba(11, 26, 46, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--glass-border);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 18px;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s ease;
  background: none;
  border: none;
  font-family: inherit;
}

.nav-item svg {
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}

.nav-item span {
  font-size: 10px;
  font-weight: 500;
}

.nav-item.active {
  color: var(--accent);
}

.nav-item.active svg {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(139, 94, 52, 0.5));
}

/* Toast */
.toast {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-140%);
  z-index: 100;
  background: rgba(20, 24, 33, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
  white-space: nowrap;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
}

.empty-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  padding: 2px 4px 4px;
}

body.modal-open {
  overflow: hidden;
}

/* Subscription card header + kebab menu */
.sub-card-info {
  flex: 1;
  min-width: 0;
}

.expiry-pill.full {
  margin-left: 0;
  margin-bottom: 14px;
  width: fit-content;
}

.kebab-wrap {
  position: relative;
  margin-left: auto;
  flex-shrink: 0;
}

.kebab-btn {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
}

.kebab-btn svg {
  width: 18px;
  height: 18px;
}

.kebab-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

.kebab-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 216px;
  background: rgba(17, 22, 33, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  padding: 6px;
  z-index: 20;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.kebab-wrap.open .kebab-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.kebab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.kebab-item:active {
  background: rgba(255, 255, 255, 0.06);
}

.kebab-item svg {
  width: 16px;
  height: 16px;
  color: var(--accent);
  flex-shrink: 0;
}

.kebab-item.danger {
  color: #f87171;
}

.kebab-item.danger svg {
  color: #f87171;
}

/* Site-link status card (Profile) */
.site-link-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
}

.linked-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
  padding: 6px 10px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Bottom sheet (purchase flow) */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
}

.sheet-overlay.open {
  opacity: 1;
  visibility: visible;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  border-radius: 24px 24px 0 0;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  background: linear-gradient(180deg, rgba(15, 22, 35, 0.98), rgba(8, 13, 22, 0.98));
  border: 1px solid var(--glass-border);
  border-bottom: none;
}

.sheet-overlay.open .sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  margin: 12px auto 4px;
  flex-shrink: 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 12px;
  flex-shrink: 0;
}

.sheet-header h2 {
  font-family: 'Manrope', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin: 0;
}

.sheet-close {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  flex-shrink: 0;
}

.sheet-close svg {
  width: 16px;
  height: 16px;
}

.sheet-body {
  overflow-y: auto;
  padding: 4px 16px calc(20px + env(safe-area-inset-bottom));
}

/* Fullscreen sheets (top-up balance, connection setup wizard) */
#topup-overlay .sheet,
#setup-overlay .sheet {
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100vh;
  max-height: 100dvh;
  border-radius: 0;
  border-left: none;
  border-right: none;
}

#topup-overlay .sheet-body,
#setup-overlay .sheet-body {
  flex: 1;
}

/* Confirm dialog (revoke / cancel) */
.dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s;
}

.dialog-overlay.open {
  opacity: 1;
  visibility: visible;
}

.dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.dialog {
  position: relative;
  width: 100%;
  max-width: 340px;
  padding: 26px 22px 22px;
  text-align: center;
  transform: scale(0.92);
  transition: transform 0.2s ease;
  background: linear-gradient(180deg, rgba(15, 22, 35, 0.98), rgba(8, 13, 22, 0.98));
}

.dialog-overlay.open .dialog {
  transform: scale(1);
}

.dialog-icon {
  width: 52px;
  height: 52px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.dialog-icon svg {
  width: 24px;
  height: 24px;
  color: #f87171;
}

.dialog h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
}

.dialog p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.55;
  margin: 0 0 20px;
}

.dialog .btn-row .btn {
  flex: 1;
}

.dialog-icon.danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}

.dialog-icon.danger svg {
  color: #f87171;
}

.dialog-icon.accent {
  background: rgba(139, 94, 52, 0.15);
  border-color: rgba(139, 94, 52, 0.35);
}

.dialog-icon.accent svg {
  color: var(--accent-light);
}

.qr-wrap {
  box-sizing: border-box;
  width: 200px;
  height: 200px;
  margin: 4px auto 16px;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-wrap img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
}

/* Field hint text (above dropdowns / inputs) */
.field-hint {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin: 0 2px 8px;
}

.promo-status {
  min-height: 14px;
  margin-top: 6px;
}

.promo-status.promo-success {
  color: var(--teal);
}

.promo-status.promo-error {
  color: #f87171;
}

/* Info rows (renewal sheet summary) */
.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}

.info-row:not(:last-child) {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.info-label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.info-value {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

/* Custom dropdown (location picker) */
.dropdown {
  position: relative;
  margin-bottom: 16px;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.dropdown-flag {
  font-size: 17px;
  line-height: 1;
}

.dropdown-value {
  flex: 1;
}

.dropdown-toggle svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.dropdown.open .dropdown-toggle svg {
  transform: rotate(180deg);
}

.dropdown-list {
  position: fixed;
  max-height: 240px;
  overflow-y: auto;
  background: rgba(17, 22, 33, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  padding: 6px;
  z-index: 75;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.dropdown-list.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.dropdown-option:active {
  background: rgba(255, 255, 255, 0.06);
}

.dropdown-option.active {
  background: rgba(139, 94, 52, 0.2);
  color: #fff;
}

.dropdown-option-flag {
  font-size: 17px;
  line-height: 1.3;
  flex-shrink: 0;
}

.dropdown-option-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 2px 0;
}

.dropdown-option-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dropdown-option-name {
  font-size: 13.5px;
  font-weight: 500;
}

.dropdown-option-tag {
  display: inline-block;
  width: fit-content;
  font-size: 11px;
  font-weight: 500;
  color: var(--teal);
  background: rgba(78, 205, 196, 0.1);
  padding: 2px 8px;
  border-radius: 999px;
}

.dropdown-option-desc {
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 400;
  white-space: normal;
}

/* Text inputs */
.text-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 16px;
}

.text-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.text-input:focus {
  outline: none;
  border-color: rgba(139, 94, 52, 0.5);
}

.input-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.input-row .text-input {
  margin-bottom: 0;
}

.icon-btn {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.icon-btn:active {
  background: rgba(255, 255, 255, 0.1);
}

.icon-btn svg {
  width: 17px;
  height: 17px;
}

/* Payment history rows */
.history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.history-row:last-child {
  border-bottom: none;
}

.history-title {
  font-size: 13.5px;
  font-weight: 600;
}

.history-date {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
}

.history-amount {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.history-amount.positive {
  color: #4ade80;
}

.history-amount.negative {
  color: rgba(255, 255, 255, 0.7);
}

/* Unlinked state for site-link chip */
.linked-chip.unlinked {
  color: var(--accent-light);
  background: rgba(139, 94, 52, 0.15);
}

/* Connect & setup wizard */
.setup-link-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  padding: 0;
  margin: 0 0 18px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
}

.setup-link-trigger svg {
  width: 13px;
  height: 13px;
}

.setup-link-trigger:active {
  opacity: 0.6;
}

.setup-platform-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.chip-best-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent-light);
}

.setup-app-note {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-bottom: 18px;
  margin-top: -6px;
}


.step-content {
  transition: opacity 0.16s ease, transform 0.16s ease;
  opacity: 1;
  transform: translateY(0);
}

.step-content.transitioning {
  opacity: 0;
  transform: translateY(6px);
}

.step-image-placeholder .step-image-index {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-light);
}

.step-indicator {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
}

.step-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  transition: width 0.2s ease, background 0.2s ease;
}

.step-dot.active {
  width: 18px;
  background: var(--accent-light);
}

.step-image-placeholder {
  width: 100%;
  aspect-ratio: 9 / 14;
  max-height: 260px;
  border-radius: 18px;
  border: 1px dashed rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 18px;
}

.step-image-placeholder svg {
  width: 32px;
  height: 32px;
}

.step-image-placeholder span {
  font-size: 12px;
}

.step-title {
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-text {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Session expired takeover */
.session-expired {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 28px;
  background: var(--bg);
}

body.session-expired-active .session-expired {
  display: flex;
}

body.session-expired-active .app,
body.session-expired-active .bottom-nav {
  display: none;
}

.session-expired-icon {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}

.session-expired-icon svg {
  width: 30px;
  height: 30px;
  color: #f87171;
}

.session-expired h1 {
  font-family: 'Manrope', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 10px;
}

.session-expired p {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
  max-width: 300px;
  margin: 0 0 26px;
}

.session-expired .btn {
  width: auto;
  min-width: 190px;
}
