.tg-app {
  min-height: 100vh;
  background: var(--tg-bg, #0f0a0a);
  color: var(--tg-text, #f5f0f0);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding: 16px 16px 32px;
  box-sizing: border-box;
}

.tg-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tg-hint {
  color: var(--tg-hint, #9b8787);
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
}

.tg-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid var(--tg-hint, #9b8787);
  border-top-color: var(--tg-button, #c0392b);
  animation: tg-spin 0.8s linear infinite;
}

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

.tg-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.tg-logo {
  font-size: 24px;
}

.tg-header h1 {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
}

.tg-card {
  background: var(--tg-secondary-bg, #1a1212);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.tg-status--active {
  box-shadow: inset 0 0 0 1.5px rgba(192, 57, 43, 0.5);
}

.tg-status-badge {
  display: inline-block;
  font-weight: 700;
  font-size: 15px;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.tg-status--active .tg-status-badge {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.tg-status--inactive .tg-status-badge {
  background: rgba(192, 57, 43, 0.15);
  color: #e74c3c;
}

.tg-status-detail {
  color: var(--tg-hint, #9b8787);
  font-size: 14px;
  margin: 0 0 12px;
}

.tg-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tg-btn {
  display: block;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  transition: opacity 0.15s ease, transform 0.1s ease;
}

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

.tg-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.tg-btn--primary {
  background: var(--tg-button, #c0392b);
  color: var(--tg-button-text, #ffffff);
}

.tg-btn--secondary {
  background: var(--tg-secondary-bg, #1a1212);
  color: var(--tg-text, #f5f0f0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.tg-btn--outline {
  background: transparent;
  color: var(--tg-link, #ff6b6b);
  box-shadow: inset 0 0 0 1.5px var(--tg-link, #ff6b6b);
}

.tg-btn--ghost {
  background: transparent;
  color: var(--tg-hint, #9b8787);
  font-weight: 500;
}

.tg-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-end;
  z-index: 50;
  animation: tg-fade-in 0.15s ease;
}

@keyframes tg-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.tg-sheet {
  background: var(--tg-bg, #0f0a0a);
  width: 100%;
  border-radius: 20px 20px 0 0;
  padding: 10px 16px 24px;
  box-sizing: border-box;
  max-height: 80vh;
  overflow-y: auto;
  animation: tg-slide-up 0.2s ease;
}

@keyframes tg-slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.tg-sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--tg-hint, #9b8787);
  opacity: 0.4;
  margin: 4px auto 16px;
}

.tg-sheet h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.tg-plan-list,
.tg-method-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.tg-plan-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--tg-secondary-bg, #1a1212);
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--tg-text, #f5f0f0);
  font-size: 15px;
  cursor: pointer;
  box-sizing: border-box;
}

.tg-plan-title {
  font-weight: 600;
  flex: 1;
  text-align: left;
}

.tg-plan-days {
  color: var(--tg-hint, #9b8787);
  font-size: 13px;
}

.tg-plan-price {
  font-weight: 700;
  color: var(--tg-link, #ff6b6b);
}

.tg-toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 24px;
  background: var(--tg-secondary-bg, #1a1212);
  color: var(--tg-text, #f5f0f0);
  padding: 12px 16px;
  border-radius: 12px;
  text-align: center;
  font-size: 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  z-index: 100;
  animation: tg-fade-in 0.2s ease;
}
