/* ===========================
   MisterV2 — App-specific CSS
   Telegram Mini App Style
   =========================== */

/* ========== Auth Page ========== */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--tg-bg);
}

.auth-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 16px 24px;
}

.auth-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(145deg, #bc9356, #8e6d3d);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 24px rgba(188, 147, 86, 0.25);
  animation: tg-fade-up 0.4s ease both;
}

.auth-avatar svg {
  width: 38px;
  height: 38px;
  fill: #fff;
}

.auth-app-name {
  font-size: 24px;
  font-weight: 700;
  color: #bc9356;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  animation: tg-fade-up 0.4s ease 0.05s both;
}

.auth-tagline {
  font-size: 14px;
  color: var(--tg-hint);
  text-align: center;
  animation: tg-fade-up 0.4s ease 0.1s both;
}

/* Auth form bottom sheet style */
.auth-sheet {
  background: var(--tg-secondary-bg);
  border-radius: 20px 20px 0 0;
  padding: 24px 16px 32px;
  border-top: 1px solid var(--tg-divider);
  animation: tg-fade-up 0.35s ease 0.1s both;
}

.auth-sheet__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
  letter-spacing: -0.02em;
}

.auth-sheet__subtitle {
  font-size: 14px;
  color: var(--tg-hint);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Email pill display */
.auth-email-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  background: var(--tg-elevated);
  border: 1px solid var(--tg-border);
  border-radius: var(--tg-radius-md);
  margin-bottom: 16px;
}

.auth-email-pill__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tg-blue-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-email-pill__icon svg {
  width: 16px;
  height: 16px;
  color: var(--tg-blue);
}

.auth-email-pill__text {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: var(--tg-text);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  color: var(--tg-link);
  text-decoration: none;
  margin-top: 10px;
  padding: 4px 0;
}

.auth-back svg {
  width: 14px;
  height: 14px;
}

/* Hide Happ button in Telegram Mini App if requested */
body.is-tg-miniapp .vpn-btn-happ {
  display: none !important;
}

/* Password eye toggle */
.pwd-wrap {
  position: relative;
  margin-bottom: 10px;
}

.pwd-wrap .tg-input {
  padding-right: 48px;
}

.pwd-eye {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--tg-hint);
  transition: color var(--tg-transition);
  padding: 0;
  border-radius: 0 var(--tg-radius-md) var(--tg-radius-md) 0;
}

.tg-header__action {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--tg-hint);
  text-decoration: none;
  transition: all 0.2s ease;
}

.tg-header__action:active {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(0.95);
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: #ff3b30;
  color: white;
  font-size: 9px;
  font-weight: 700;
  min-width: 14px;
  height: 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  border: 1.5px solid #000;
  box-sizing: border-box;
  z-index: 10;
  line-height: 1;
  pointer-events: none;
}

.pwd-eye:hover {
  color: var(--tg-text);
}

.pwd-eye.active {
  color: var(--tg-blue);
}

.pwd-eye svg {
  width: 18px;
  height: 18px;
  pointer-events: none;
}

/* Password strength */
.pwd-strength {
  display: flex;
  gap: 4px;
  margin-top: 8px;
}

.pwd-strength__bar {
  flex: 1;
  height: 3px;
  border-radius: 2px;
  background: var(--tg-elevated);
  transition: background var(--tg-transition);
}

.pwd-strength__bar.weak {
  background: var(--tg-destructive);
}

.pwd-strength__bar.fair {
  background: #f59e0b;
}

.pwd-strength__bar.strong {
  background: var(--tg-green);
}


/* Choice Step */
.choice-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.choice-btn {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--tg-elevated);
  border: 1px solid var(--tg-border);
  border-radius: var(--tg-radius-lg);
  text-decoration: none;
  color: var(--tg-text);
  transition: all 0.2s ease;
  text-align: left;
}

.choice-btn:hover, .choice-btn:active {
  transform: translateY(-2px);
  background: var(--tg-secondary-bg);
  border-color: var(--tg-blue-border);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.choice-btn__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.choice-btn--telegram .choice-btn__icon {
  background: linear-gradient(135deg, #24A1DE, #1C88BD);
  color: #fff;
}

.choice-btn--email .choice-btn__icon {
  background: linear-gradient(135deg, #bc9356, #8e6d3d);
  color: #fff;
}

.choice-btn__content {
  flex: 1;
}

.choice-btn__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 2px;
}

.choice-btn__desc {
  font-size: 13px;
  color: var(--tg-hint);
}

.auth-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--tg-divider);
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-feature__icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--tg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-feature__icon svg {
  width: 16px;
  height: 16px;
  color: var(--tg-blue);
}

.auth-feature__text {
  font-size: 14px;
  color: var(--tg-hint);
}

/* Policy links */
.auth-policy {
  text-align: center;
  font-size: 12px;
  color: var(--tg-hint);
  line-height: 1.6;
  padding: 12px 16px 0;
  animation: tg-fade-in 0.4s ease 0.3s both;
}

.auth-policy a {
  color: var(--tg-link);
  text-decoration: none;
}

/* ========== Profile Page ========== */
.profile-page {
  background: var(--tg-bg);
  min-height: 100vh;
}

.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px 24px;
  text-align: center;
  animation: tg-fade-up 0.3s ease both;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(145deg, #bc9356, #8e6d3d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 14px;
  box-shadow: 0 4px 20px rgba(188, 147, 86, 0.2);
  letter-spacing: -0.02em;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}

.profile-since {
  font-size: 13px;
  color: var(--tg-hint);
  margin-bottom: 12px;
}

/* Profile stats row */
.profile-stats {
  display: flex;
  gap: 1px;
  background: var(--tg-divider);
  overflow: hidden;
  animation: tg-fade-up 0.3s ease 0.05s both;
}

.profile-stat {
  flex: 1;
  background: var(--tg-secondary-bg);
  padding: 8px 8px;
  text-align: center;
}

.profile-stat__val {
  font-size: 22px;
  font-weight: 700;
  color: #bc9356;
  letter-spacing: -0.02em;
}

.profile-stat__lbl {
  font-size: 12px;
  color: var(--tg-hint);
  margin-top: 2px;
}

/* ========== VPN Page ========== */
.vpn-page {
  background: var(--tg-bg);
  min-height: 100vh;
  padding-bottom: 60px;
}



/* App download grid */
.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--tg-divider);
  border-radius: var(--tg-radius-lg);
  overflow: hidden;
  margin: 0 16px;
}

.app-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  background: var(--tg-secondary-bg);
  text-decoration: none;
  color: var(--tg-text);
  transition: background var(--tg-transition);
}

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

.app-item__icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--tg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.app-item__icon svg {
  width: 25px;
  height: 25px;
  color: var(--tg-blue);
}

.app-item__os {
  font-size: 14px;
  font-weight: 500;
}

.app-item__name {
  font-size: 12px;
  color: var(--tg-hint);
}

/* Steps guide */
.guide-steps {
  padding: 0 16px;
}

.guide-step {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  position: relative;
}

.guide-step:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 15px;
  top: 42px;
  bottom: 0;
  width: 1px;
  background: var(--tg-divider);
}

.guide-step__num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--tg-blue-dim);
  border: 1px solid var(--tg-blue-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--tg-blue);
  flex-shrink: 0;
}

.guide-step__title {
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 2px;
}

.guide-step__desc {
  font-size: 13px;
  color: var(--tg-hint);
  line-height: 1.5;
}

/* Server info rows */
.info-rows {
  background: var(--tg-secondary-bg);
}

.info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--tg-divider);
}

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

.info-row__key {
  font-size: 14px;
  color: var(--tg-hint);
}

.info-row__val {
  font-size: 14px;
  color: var(--tg-text);
  font-weight: 500;
}

/* ========== Delete Account ========== */
.delete-page {
  min-height: 100vh;
  background: var(--tg-bg);
  padding-bottom: 40px;
}

.delete-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 16px 24px;
  animation: tg-fade-up 0.3s ease both;
}

.delete-icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--tg-destructive-dim);
  border: 1px solid var(--tg-destructive-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.delete-icon-wrap svg {
  width: 32px;
  height: 32px;
  color: var(--tg-destructive);
}

.delete-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--tg-destructive);
  margin-bottom: 6px;
}

.delete-subtitle {
  font-size: 15px;
  color: var(--tg-hint);
}

.delete-form-wrap {
  padding: 0 16px;
  animation: tg-fade-up 0.3s ease 0.1s both;
}

.delete-footer {
  text-align: center;
  margin-top: 16px;
}

/* ========== 404 ========== */
.page-404 {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
  gap: 12px;
}

.page-404__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--tg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

.page-404__icon svg {
  width: 36px;
  height: 36px;
  color: var(--tg-hint);
}

.page-404__code {
  font-size: 48px;
  font-weight: 800;
  color: var(--tg-blue);
  letter-spacing: -0.04em;
}

.page-404__text {
  font-size: 16px;
  color: var(--tg-hint);
}

/* ========== VPN UI Components ========== */
.vpn-status-icon--active {
  background: linear-gradient(135deg, rgba(49, 181, 69, 0.2), rgba(49, 181, 69, 0.05));
  color: var(--tg-green);
  box-shadow: 0 0 20px rgba(49, 181, 69, 0.15);
  border: 1px solid rgba(49, 181, 69, 0.1);
}

.vpn-status-icon--inactive {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.2);
}

.vpn-status-icon svg {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.vpn-status-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 14px;
  border-radius: 16px;
  margin: 4px 16px 0 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: stretch;
}

.vpn-status-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.vpn-tariff-label {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.2px;
}

.vpn-expiry-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 1px;
}

.vpn-device-badge {
  padding: 4px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.vpn-device-badge:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.vpn-device-badge:active {
  background: rgba(255, 255, 255, 0.03);
  transform: translateY(0);
}

.vpn-device-badge svg:first-child {
  color: #bc9356;
  opacity: 0.8;
}

.vpn-device-badge__chevron {
  color: rgba(255, 255, 255, 0.2);
  margin-left: -2px;
}

.vpn-device-badge span {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
}

.vpn-traffic-section {
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 8px;
  margin-top: 2px;
}

.vpn-traffic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 2px;
}

.vpn-traffic-reset {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

.vpn-traffic-stats {
  font-size: 11px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.5);
}

.vpn-traffic-refresh {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.vpn-traffic-refresh:hover {
  color: #fff;
}

.vpn-traffic-refresh span {
  font-size: 9px;
  font-weight: 800;
  margin-left: 3px;
}

.vpn-progress-wrap {
  height: 2px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 1px;
  overflow: hidden;
  margin-top: 4px;
}

.vpn-progress-fill {
  height: 100%;
  background: #bc9356;
  border-radius: 1px;
}

.vpn-key-section {
  margin-bottom: 12px;
}

.vpn-key-box {
  padding: 10px 4px 10px 10px;
  min-height: auto;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  margin: 0px 15px 10px 15px;
}

.vpn-key-text {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-family: monospace;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  margin-right: 12px;
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
}

.vpn-key-copy-btn {
  background: rgba(188, 147, 86, 0.05);
  border: 1px solid rgba(188, 147, 86, 0.1);
  border-radius: 8px;
  padding: 6px;
  color: #bc9356;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.vpn-connect-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 16px;
}

.vpn-btn-happ {
  background: var(--tg-green-dim);
  border: 1px solid var(--tg-green-border);
  color: var(--tg-green);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}

.vpn-empty-state {
  padding: 24px;
  flex-direction: column;
  text-align: center;
  gap: 16px;
  display: flex;
}

.vpn-empty-icon {
  width: 64px;
  height: 64px;
  background: rgba(var(--color-accent-400), 0.1);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: rgb(var(--color-accent-400));
}

.vpn-empty-title {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.vpn-empty-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
  max-width: 240px;
  margin: 0 auto;
}

.vpn-return-btn {
  width: 100%;
  margin-top: 8px;
  text-decoration: none;
  justify-content: center;
}

.vpn-links-modal .vpn-links-list {
  padding: 8px 10px 18px;
  background: transparent;
}

.vpn-links-modal .vpn-links-list .tg-cell {
  min-height: 54px;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 14px;
  background: rgba(255,255,255,0.03) !important;
  color: var(--tg-text) !important;
}

.vpn-links-modal .vpn-links-list .tg-cell:last-child {
  margin-bottom: 0;
}

.vpn-links-modal .vpn-links-list .tg-cell:hover {
  background: rgba(255,255,255,0.05) !important;
}

.vpn-links-modal .vpn-links-list .tg-cell__title {
  color: #fff !important;
  font-weight: 700;
}

.vpn-links-modal .vpn-links-list .tg-cell__chevron {
  color: var(--tg-hint) !important;
}

/* ========== Settings Page ========== */
.settings-row {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  color: var(--tg-text);
}

.settings-template-row--border {
  border-top: 1px solid var(--tg-divider);
}

.settings-modal-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.settings-modal {
  max-height: 84vh;
  margin: 0;
}

.settings-modal .tg-modal__header {
  padding: 18px 16px 8px;
}

.settings-modal__body {
  max-height: calc(84vh - 64px);
  overflow-y: auto;
  padding: 8px 10px 18px;
}

.settings-modal__body .tg-cell {
  min-height: 60px;
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,0.06) !important;
  border-radius: 14px;
  background: rgba(255,255,255,0.03) !important;
  color: var(--tg-text) !important;
}

.settings-modal__body .tg-cell:last-child {
  margin-bottom: 0;
}

.settings-modal__body .tg-cell:hover {
  background: rgba(255,255,255,0.05) !important;
}

.settings-modal__body .tg-cell__icon {
  background: rgba(188,147,86,0.12) !important;
  color: #bc9356 !important;
}

.settings-modal__body .tg-cell__title {
  color: #fff !important;
  font-weight: 700;
}

.settings-modal__body .tg-cell__subtitle {
  color: var(--tg-hint) !important;
}

.settings-modal__body .tg-btn--primary {
  background: #bc9356 !important;
  color: #fff !important;
  border-radius: 12px;
  font-weight: 700;
}

.settings-modal__body .tg-btn--ghost {
  background: rgba(255,68,68,0.08) !important;
  border: 1px solid rgba(255,68,68,0.18);
  border-radius: 12px;
}

/* ========== Info / FAQ Pages ========== */
.info-page {
  padding-bottom: 28px;
}

.info-hero {
  padding: 24px 20px 18px;
  text-align: center;
}

.info-hero__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 14px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tg-blue-dim);
  color: var(--tg-blue);
  border: 1px solid var(--tg-blue-border);
}

.info-hero__icon svg {
  width: 32px;
  height: 32px;
}

.info-hero h1 {
  font-size: 26px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.info-hero p {
  max-width: 420px;
  margin: 0 auto;
  color: var(--tg-hint);
  font-size: 14px;
  line-height: 1.45;
}

.info-cell {
  height: auto;
  min-height: 68px;
  padding: 14px 16px;
  text-decoration: none;
  width: 100%;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--tg-text);
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
}

.info-cell--border {
  border-top: 1px solid var(--tg-divider);
}

.info-faq-mark {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(188,147,86,.12);
  border: 1px solid rgba(188,147,86,.18);
  color: var(--tg-blue);
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}

.info-cell .tg-cell__subtitle {
  margin-top: 3px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.info-modal {
  max-height: 86vh;
}

.info-modal__body {
  padding: 12px 18px 24px;
  max-height: calc(86vh - 54px);
  overflow-y: auto;
}

.info-modal__body h2,
.info-article h1 {
  font-size: 22px;
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 6px 0 14px;
}

.info-modal__content,
.info-article__content {
  color: rgba(255,255,255,.82);
  font-size: 15px;
  line-height: 1.55;
}

.info-modal__content p,
.info-article__content p {
  margin: 0 0 10px;
}

.info-modal__content ul,
.info-modal__content ol,
.info-article__content ul,
.info-article__content ol {
  margin: 8px 0 12px;
  padding-left: 22px;
}

.info-modal__content li,
.info-article__content li {
  margin: 6px 0;
}

.info-modal__content b,
.info-modal__content strong,
.info-article__content b,
.info-article__content strong {
  color: #fff;
  font-weight: 800;
}

.info-modal__content code,
.info-article__content code {
  padding: 2px 6px;
  border-radius: 7px;
  background: rgba(255,255,255,.07);
  color: var(--tg-blue);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
}

.info-detail-page {
  padding: 18px 16px 28px;
}

.info-article {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 20px;
  padding: 20px 18px;
}

.info-article__label {
  color: var(--tg-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.info-article__content a {
  color: var(--tg-link);
}

.info-article__content h2,
.info-article__content h3 {
  color: #fff;
  margin: 18px 0 10px;
  line-height: 1.2;
}

.info-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

/* ========== Migrated EJS Styles Continued ========== */

/* Migrated from views/gift/history.ejs */
  .gift-history-page {
    padding: 12px 16px 28px;
  }

  .gift-history-page .gift-section {
    margin-bottom: 16px;
  }

  .gift-section__header {
    color: var(--tg-hint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin: 6px 2px 10px;
  }

  .gift-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
  }

  .gift-tab {
    height: 42px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.07);
    background: rgba(255,255,255,.03);
    color: rgba(255,255,255,.58);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }

  .gift-tab--active {
    color: var(--tg-green);
    border-color: var(--tg-green-border);
    background: var(--tg-green-dim);
  }

  .gift-tab-panel--hidden {
    display: none;
  }

  .gift-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .gift-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border-radius: 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    color: var(--tg-text);
    text-decoration: none;
  }

  .gift-row--highlight {
    background: var(--tg-green-dim);
    border-color: var(--tg-green-border);
  }

  .gift-row__icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(188,147,86,.1);
    color: var(--tg-green);
  }

  .gift-row__icon svg {
    width: 21px;
    height: 21px;
  }

  .gift-row__body {
    flex: 1;
    min-width: 0;
  }

  .gift-row__title {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .gift-row__sub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--tg-hint);
    line-height: 1.35;
  }

  .gift-row__right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
  }

  .gift-row__right small {
    color: var(--tg-hint);
    font-size: 11px;
  }

  .gift-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 9px;
    border-radius: 999px;
    background: rgba(188,147,86,.12);
    border: 1px solid rgba(188,147,86,.22);
    color: var(--tg-green);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
  }

  .gift-history-page .gift-empty {
    padding: 34px 18px;
    text-align: center;
    color: var(--tg-hint);
    font-size: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
  }

/* Migrated from views/gift/success.ejs */
  .gift-result-page,
  .gift-activate-page {
    padding: 22px 16px 28px;
  }

  .gift-state {
    text-align: center;
    padding: 16px 0 20px;
  }

  .gift-state__icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .gift-state__icon--success {
    background: var(--tg-green-dim);
    color: var(--tg-green);
    border: 1px solid var(--tg-green-border);
  }

  .gift-activate-page .gift-state__icon {
    background: var(--tg-green-dim);
    color: var(--tg-green);
    border: 1px solid var(--tg-green-border);
  }

  .gift-state__icon svg {
    width: 36px;
    height: 36px;
  }

  .gift-state h1 {
    font-size: 25px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
  }

  .gift-state p {
    color: var(--tg-hint);
    font-size: 14px;
    line-height: 1.45;
    max-width: 390px;
    margin: 0 auto;
  }

  .gift-card {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 18px;
    padding: 16px;
    margin-bottom: 12px;
  }

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

  .gift-detail {
    display: flex;
    flex-direction: column;
    gap: 3px;
  }

  .gift-detail--wide {
    grid-column: 1 / -1;
  }

  .gift-detail span,
  .gift-section-title {
    color: var(--tg-hint);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  .gift-detail strong {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
  }

  .gift-message {
    color: rgba(255, 255, 255, 0.86) !important;
    font-weight: 500 !important;
    line-height: 1.45;
  }

  .gift-copy-row {
    display: flex;
    gap: 8px;
    margin-top: 10px;
  }

  .gift-copy-row .tg-input {
    flex: 1;
    min-width: 0;
    font-size: 13px;
  }

  .gift-copy-btn {
    width: auto;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
  }

  .gift-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
  }

/* Migrated from views/gift/index.ejs */
  .gift-page {
    padding-bottom: 28px;
  }

  .gift-hero {
    padding: 22px 18px 16px;
    text-align: center;
  }

  .gift-hero__icon {
    width: 62px;
    height: 62px;
    margin: 0 auto 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tg-green-dim);
    color: var(--tg-green);
    border: 1px solid var(--tg-green-border);
  }

  .gift-hero h1 {
    font-size: 26px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
  }

  .gift-hero p {
    max-width: 420px;
    margin: 0 auto;
    color: var(--tg-hint);
    font-size: 14px;
    line-height: 1.45;
  }

  .gift-form {
    padding: 0 16px;
  }

  .gift-form .gift-section {
    margin-top: 16px;
  }

  .gift-section__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: rgba(255,255,255,.38);
    margin: 0 2px 10px;
  }

  .gift-tariffs,
  .gift-payments,
  .gift-methods {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .gift-tariff,
  .gift-payment,
  .gift-method {
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
  }

  .gift-tariff {
    padding: 14px;
    cursor: pointer;
    transition: all .18s ease;
  }

  .gift-tariff--active {
    border-color: var(--tg-green-border);
    background: var(--tg-green-dim);
  }

  .gift-tariff__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
  }

  .gift-tariff__name {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
  }

  .gift-tariff__desc {
    margin-top: 2px;
    color: var(--tg-hint);
    font-size: 12px;
  }

  .gift-tariff input,
  .gift-period input,
  .gift-chip input,
  .gift-payment input,
  .gift-method input {
    accent-color: var(--tg-green);
  }

  .gift-periods {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
  }

  .gift-periods--hidden {
    display: none;
  }

  .gift-period {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 12px;
    background: rgba(0,0,0,.2);
    border: 1px solid rgba(255,255,255,.06);
    cursor: pointer;
  }

  .gift-period__label {
    flex: 1;
    color: rgba(255,255,255,.82);
    font-size: 14px;
    font-weight: 600;
  }

  .gift-period__price {
    color: var(--tg-green);
    font-size: 15px;
    font-weight: 800;
    white-space: nowrap;
  }

  .gift-period__old {
    margin-right: 6px;
    color: var(--tg-hint);
    text-decoration: line-through;
    font-size: 12px;
    font-weight: 500;
  }

  .gift-choice-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
  }

  .gift-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 8px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px;
    color: rgba(255,255,255,.72);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }

  .gift-chip:has(input:checked),
  .gift-payment:has(input:checked),
  .gift-method:has(input:checked),
  .gift-period:has(input:checked) {
    border-color: var(--tg-green-border);
    background: var(--tg-green-dim);
  }

  .gift-textarea {
    min-height: 86px;
    resize: vertical;
  }

  .gift-payment {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    cursor: pointer;
  }

  .gift-payment span {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .gift-payment strong {
    color: #fff;
    font-size: 15px;
  }

  .gift-payment small {
    color: var(--tg-hint);
    font-size: 12px;
  }

  .gift-methods {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .gift-methods--hidden {
    display: none;
  }

  .gift-method {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255,255,255,.78);
    cursor: pointer;
  }

  .gift-submit {
    position: sticky;
    bottom: 0;
    padding: 16px 0 18px;
    background: linear-gradient(to top, var(--tg-bg) 70%, rgba(0,0,0,0));
  }

  .gift-page .gift-empty {
    padding: 18px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 16px;
    color: var(--tg-hint);
    text-align: center;
    font-size: 14px;
  }

  .gift-empty--compact {
    grid-column: 1 / -1;
    padding: 14px;
  }

/* Migrated from views/result.ejs */
  .result-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
  }
  .result-card {
    background: var(--tg-card);
    border: 1px solid var(--tg-border);
    border-radius: 24px;
    padding: 40px 24px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    margin-top: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  }
  .result-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .result-icon svg {
    width: 40px;
    height: 40px;
    color: white;
  }
  .result-icon--success {
    background: linear-gradient(135deg, #31b545, #1e8a2d);
    box-shadow: 0 8px 24px rgba(49, 181, 69, 0.3);
  }
  .result-icon--error {
    background: linear-gradient(135deg, #ff4444, #cc0000);
    box-shadow: 0 8px 24px rgba(255, 68, 68, 0.3);
  }
  .result-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--tg-text);
  }
  .result-text {
    font-size: 15px;
    color: var(--tg-hint);
    line-height: 1.5;
    margin-bottom: 32px;
  }
  .result-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

/* Migrated from views/connect-happ.ejs */
    :root {
      --bg: #050508;
      --card-bg: #111114;
      --accent: #bc9356;
      --text: #ffffff;
      --text-dim: rgba(255, 255, 255, 0.5);
      --border: rgba(255, 255, 255, 0.08);
    }
    
    body {
      background: var(--bg);
      color: var(--text);
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 100vh;
    }
    
    .card {
      background: var(--card-bg);
      border: 1px solid var(--border);
      border-radius: 24px;
      padding: 40px 24px;
      width: 100%;
      max-width: 400px;
      text-align: center;
      box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
      animation: fadeUp 0.5s ease-out;
    }
    
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    .icon-wrap {
      width: 80px;
      height: 80px;
      background: linear-gradient(135deg, #bc9356, #8e6d3d);
      border-radius: 22px;
      margin: 0 auto 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 8px 24px rgba(188, 147, 86, 0.3);
    }
    
    .icon-wrap svg {
      width: 40px;
      height: 40px;
      color: white;
    }
    
    h1 {
      font-size: 24px;
      font-weight: 700;
      margin-bottom: 12px;
      letter-spacing: -0.02em;
    }
    
    p {
      font-size: 15px;
      color: var(--text-dim);
      line-height: 1.5;
      margin-bottom: 32px;
    }
    
    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      background: var(--accent);
      color: white;
      text-decoration: none;
      font-size: 16px;
      font-weight: 700;
      padding: 16px 32px;
      border-radius: 16px;
      width: 100%;
      transition: transform 0.2s, background 0.2s;
      box-shadow: 0 4px 12px rgba(188, 147, 86, 0.2);
    }
    
    .btn:active {
      transform: scale(0.98);
      background: #a6814b;
    }
    
    .footer {
      margin-top: 24px;
      font-size: 13px;
      color: var(--text-dim);
    }
    
    .footer a {
      color: var(--accent);
      text-decoration: none;
    }

/* Migrated from views/shop/wallet.ejs */
  .amount-chip.active { background:var(--tg-green-dim)!important; border-color:var(--tg-green-border)!important; color:var(--tg-green)!important; }
  
  .category-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 10px 4px; background: rgba(255,255,255,0.03); border: 1.5px solid rgba(255,255,255,0.05);
    border-radius: 14px; cursor: pointer; transition: all .2s; color: rgba(255,255,255,0.3);
  }
  .category-tile .tile-icon { font-size: 16px; font-weight: 800; margin-bottom: 4px; line-height:1; }
  .category-tile span { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
  .category-tile.active { background: var(--tg-blue-dim); border-color: var(--tg-blue); color: var(--tg-blue); }

  .methods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .method-card {
    position: relative; padding: 10px 12px; background: rgba(255,255,255,0.02);
    border: 1.2px solid rgba(255,255,255,0.04); border-radius: 14px; cursor: pointer; transition: all .2s;
    display: flex; flex-direction: column; justify-content: center; min-height: 44px;
  }
  .card-title { font-size: 12px; font-weight: 700; color: #fff; line-height: 1.1; }
  .card-vendor { font-size: 9px; font-weight: 600; color: rgba(255,255,255,0.25); text-transform: uppercase; margin-top: 2px; }
  .card-badge { position: absolute; top: 6px; right: 6px; width: 14px; height: 14px; background: var(--tg-green); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(0.5); transition: all .15s; }
  
  .method-card:has(input:checked) { background: var(--tg-green-dim)!important; border-color: var(--tg-green-border)!important; }
  .method-card:has(input:checked) .card-badge { opacity: 1; transform: scale(1); }

  .deposit-btn { width:100%; padding:14px; background:var(--tg-green); border:none; border-radius:16px; font-size:15px; font-weight:800; color:#fff; cursor:pointer; box-shadow:0 4px 12px rgba(49, 181, 69, 0.2); transition:all .2s; }

/* Migrated from views/shop/index.ejs #1 */
            .tariff-tab--active {
              background: var(--tg-green-dim) !important;
              border-color: var(--tg-green-border) !important;
              color: var(--tg-green) !important;
            }

            .tariff-tab--inactive {
              background: rgba(255, 255, 255, 0.05);
              border: 1px solid rgba(255, 255, 255, 0.08);
              color: rgba(255, 255, 255, 0.5);
            }

            .tariff-panel {
              display: none;
              padding: 12px 16px 0;
            }

            .tariff-panel--active {
              display: block;
            }

/* Migrated from views/shop/index.ejs #2 */
    .tariff-tab.active {
      background: var(--tg-green-dim) !important;
      border-color: var(--tg-green-border) !important;
      color: var(--tg-green) !important;
    }

    .period-btn:active {
      background: rgba(255, 255, 255, 0.08) !important;
      transform: scale(.99);
    }

    #tariffTabs::-webkit-scrollbar {
      display: none;
    }

/* Migrated from views/referral.ejs */
    .ref-stat-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 12px;
      margin-bottom: 16px;
    }

    @media (min-width: 480px) {
      .ref-stat-grid {
        grid-template-columns: repeat(3, 1fr);
      }
    }

    .ref-stat-card {
      background: var(--tg-secondary-bg);
      border: 1px solid var(--tg-divider);
      border-radius: 16px;
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 4px;
    }

    .ref-stat-label {
      font-size: 12px;
      color: var(--tg-hint);
    }

    .ref-stat-value {
      font-size: 18px;
      font-weight: 800;
      color: #fff;
    }

    .ref-stat-value--success {
      color: var(--tg-green);
    }

    .ref-stat-value--accent {
      color: #bc9356;
    }

    .ref-link-card {
      background: var(--tg-secondary-bg);
      border: 1px solid var(--tg-divider);
      border-radius: 16px;
      padding: 16px;
      margin-bottom: 16px;
    }

    .ref-link-title {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 12px;
    }

    .ref-link-input-wrap {
      display: flex;
      gap: 8px;
      margin-bottom: 12px;
    }

    .ref-link-input {
      flex: 1;
      background: var(--tg-elevated);
      border: 1px solid var(--tg-border);
      border-radius: 10px;
      padding: 10px 12px;
      font-size: 14px;
      color: var(--tg-text);
      outline: none;
    }

    .ref-copy-btn {
      background: #bc9356;
      color: #fff;
      border: none;
      border-radius: 10px;
      padding: 0 16px;
      font-weight: 600;
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }

    .ref-copy-btn:active {
      transform: scale(0.95);
    }

    .ref-copy-btn--success {
      background: var(--tg-green);
    }

    .ref-share-btn {
      background: var(--tg-elevated);
      color: var(--tg-text);
      border: 1px solid var(--tg-border);
      border-radius: 10px;
      padding: 0 12px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .ref-hint {
      font-size: 12px;
      color: var(--tg-hint);
      line-height: 1.4;
    }

    .ref-terms-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
      margin-top: 12px;
    }

    .ref-term-item {
      background: rgba(255, 255, 255, 0.03);
      border-radius: 12px;
      padding: 10px;
    }

    .ref-term-label {
      font-size: 11px;
      color: var(--tg-hint);
    }

    .ref-term-value {
      font-size: 14px;
      font-weight: 700;
      margin-top: 2px;
    }

    .ref-list-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 12px 16px;
      border-bottom: 1px solid var(--tg-divider);
    }

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

    .ref-user-name {
      font-size: 14px;
      font-weight: 600;
    }

    .ref-user-date {
      font-size: 12px;
      color: var(--tg-hint);
      margin-top: 2px;
    }

    .ref-badge {
      font-size: 11px;
      font-weight: 700;
      padding: 4px 8px;
      border-radius: 6px;
    }

    .ref-badge--pending {
      background: rgba(255, 255, 255, 0.05);
      color: var(--tg-hint);
    }

    .ref-badge--paid {
      background: rgba(49, 181, 69, 0.1);
      color: var(--tg-green);
    }

    .ref-earning-amount {
      font-size: 14px;
      font-weight: 700;
      color: var(--tg-green);
    }

    .ref-partner-card {
      background: var(--tg-secondary-bg);
      border: 1px solid var(--tg-divider);
      border-radius: 16px;
      padding: 16px;
      margin-bottom: 16px;
      display: flex;
      gap: 16px;
    }

    .ref-partner-icon {
      width: 48px;
      height: 48px;
      border-radius: 12px;
      background: rgba(188, 147, 86, 0.1);
      color: #bc9356;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }

    .ref-partner-body {
      flex: 1;
    }

    .ref-partner-title {
      font-size: 16px;
      font-weight: 700;
      margin-bottom: 4px;
    }

    .ref-partner-desc {
      font-size: 13px;
      color: var(--tg-hint);
      line-height: 1.4;
    }

    .ref-withdraw-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
      margin: 12px 0;
    }

    .ref-withdraw-item {
      background: rgba(255, 255, 255, 0.03);
      border-radius: 12px;
      padding: 12px;
    }

    .ref-withdraw-label {
      font-size: 11px;
      color: var(--tg-hint);
    }

    .ref-withdraw-value {
      font-size: 16px;
      font-weight: 700;
    }

    .ref-withdraw-value--success {
      color: var(--tg-green);
    }

    .ref-form-group {
      margin-bottom: 16px;
    }

    .ref-form-label {
      display: block;
      font-size: 13px;
      font-weight: 600;
      margin-bottom: 8px;
      color: var(--tg-hint);
    }

    .ref-form-input {
      width: 100%;
      background: var(--tg-elevated);
      border: 1px solid var(--tg-border);
      border-radius: 10px;
      padding: 12px;
      font-size: 14px;
      color: var(--tg-text);
      outline: none;
      box-sizing: border-box;
    }

    .ref-form-textarea {
      height: 80px;
      resize: none;
    }

    .badge-status {
      font-size: 10px;
      font-weight: 700;
      padding: 2px 6px;
      border-radius: 4px;
      text-transform: uppercase;
    }

    .status-completed { background: var(--tg-green); color: #fff; }
    .status-pending { background: #bc9356; color: #fff; }
    .status-rejected { background: var(--tg-destructive); color: #fff; }
    .status-approved { background: var(--tg-blue); color: #fff; }

    .btn-block {
      display: block;
      width: 100%;
      box-sizing: border-box;
    }

/* Migrated from views/tickets-detail.ejs */
    .message-list { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
    .msg { max-width: 85%; padding: 12px 16px; border-radius: 18px; line-height: 1.5; font-size: 15px; position: relative; }
    .msg--user { align-self: flex-end; background: var(--tg-blue); color: #fff; border-bottom-right-radius: 4px; }
    .msg--admin { align-self: flex-start; background: var(--tg-elevated); color: var(--tg-text); border-bottom-left-radius: 4px; }
    .msg__date { font-size: 11px; opacity: 0.6; margin-top: 4px; display: block; text-align: right; }
    
    .msg__image { margin-top: 8px; }
    .msg__image img { 
      max-width: 160px; 
      max-height: 160px; 
      border-radius: 12px; 
      display: block; 
      border: 1px solid rgba(255,255,255,0.1);
      cursor: pointer;
      object-fit: cover;
      transition: opacity 0.2s;
    }
    .msg__image img:hover { opacity: 0.8; }

    /* Lightbox Modal */
    .lightbox {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.95);
      z-index: 10000;
      display: none;
      align-items: center;
      justify-content: center;
      padding: 20px;
      backdrop-filter: blur(5px);
    }
    .lightbox img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      border-radius: 12px;
      box-shadow: 0 0 30px rgba(0,0,0,0.5);
      animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }
    @keyframes zoomIn {
      from { opacity: 0; transform: scale(0.9); }
      to { opacity: 1; transform: scale(1); }
    }

/* Migrated from views/shop/history.ejs */
    .tx-list { display: flex; flex-direction: column; }

    .tx-item {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 14px 16px;
      border-bottom: 1px solid var(--tg-divider);
      transition: background 0.15s;
    }
    .tx-item:last-child { border-bottom: none; }
    .tx-item:active { background: rgba(255,255,255,0.03); }

    .tx-icon {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .tx-icon--deposit  { background: rgba(49,181,69,0.12); color: #31b545; }
    .tx-icon--payment  { background: rgba(188,147,86,0.12); color: #bc9356; }
    .tx-icon--referral { background: rgba(52,199,89,0.12); color: #34c759; }
    .tx-icon--withdraw { background: rgba(255,68,68,0.12); color: #ff4444; }
    .tx-icon--bonus    { background: rgba(188, 147, 86, 0.12); color: #bc9356; }
    .tx-icon--default  { background: rgba(255,255,255,0.05); color: var(--tg-hint); }

    .tx-body { flex: 1; min-width: 0; }
    .tx-type {
      font-size: 15px;
      font-weight: 600;
      color: var(--tg-text);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    .tx-date {
      font-size: 12px;
      color: var(--tg-hint);
      margin-top: 2px;
    }
    .tx-desc {
      font-size: 12px;
      color: var(--tg-hint);
      margin-top: 2px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .tx-amount {
      font-size: 16px;
      font-weight: 700;
      flex-shrink: 0;
      text-align: right;
    }
    .tx-amount--positive { color: #31b545; }
    .tx-amount--negative { color: var(--tg-destructive); }
    .tx-amount--zero     { color: var(--tg-hint); }

    .balance-hero {
      text-align: center;
      padding: 20px 16px 12px;
      background: var(--tg-secondary-bg);
      border-bottom: 1px solid var(--tg-divider);
    }
    .balance-hero__label {
      font-size: 11px;
      color: var(--tg-hint);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 4px;
    }
    .balance-hero__value {
      font-size: 32px;
      font-weight: 800;
      color: #fff;
      letter-spacing: -0.02em;
    }

    .pagination {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px;
      gap: 12px;
    }
    .pagination__info {
      font-size: 13px;
      color: var(--tg-hint);
      text-align: center;
      flex: 1;
    }
    .pagination__btn {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 10px 16px;
      background: var(--tg-secondary-bg);
      border: 1px solid var(--tg-divider);
      border-radius: 12px;
      font-size: 13px;
      font-weight: 600;
      color: var(--tg-text);
      text-decoration: none;
      transition: all 0.15s;
    }
    .pagination__btn:active { background: var(--tg-elevated); }
    .pagination__btn--disabled {
      opacity: 0.3;
      pointer-events: none;
    }

    .empty-state {
      text-align: center;
      padding: 64px 24px;
    }
    .empty-state__icon {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      background: var(--tg-elevated);
      display: flex;
      align-items: center;
      justify-content: center;
      margin: 0 auto 16px;
    }
    .empty-state__title {
      font-size: 17px;
      font-weight: 600;
      color: var(--tg-text);
      margin-bottom: 6px;
    }
    .empty-state__sub {
      font-size: 14px;
      color: var(--tg-hint);
    }
