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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0d1117;
  color: #e6edf3;
  min-height: 100vh;
}

.screen { display: none; }
.screen.active { display: block; }

/* --- Auth --- */
#screen-auth.active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.card {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 32px 28px;
  width: 360px;
  text-align: center;
}

.card h1 { color: #58a6ff; font-size: 26px; margin-bottom: 4px; }
.subtitle { color: #8b949e; font-size: 13px; margin-bottom: 24px; }

#form-auth { display: flex; flex-direction: column; gap: 12px; }

#form-auth input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #30363d;
  background: #0d1117;
  color: #e6edf3;
  font-size: 14px;
  outline: none;
}

#form-auth input:focus { border-color: #58a6ff; }

#form-auth button {
  background: #238636;
  color: white;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.switch-mode { margin-top: 14px; font-size: 12px; color: #8b949e; }
.switch-mode a { color: #58a6ff; text-decoration: none; font-weight: 600; }
.error-text { color: #f85149; font-size: 12px; margin-top: 10px; min-height: 16px; }
.message-text { text-align: center; font-size: 13px; margin-top: 10px; color: #8b949e; }

/* --- Topbar --- */
.topbar {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 14px 24px;
  border-bottom: 1px solid #30363d;
  background: #161b22;
}

.logo { color: #58a6ff; font-size: 18px; }

.nav-tabs { display: flex; gap: 4px; flex: 1; }

.nav-tab {
  background: none;
  border: none;
  color: #8b949e;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
}

.nav-tab.active { background: #21262d; color: #e6edf3; }

.pass-status {
  font-size: 12px;
  color: #8b949e;
  background: #21262d;
  padding: 6px 12px;
  border-radius: 20px;
}

.btn-upgrade {
  background: #238636;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* --- Tab content --- */
.tab-content { padding: 20px 24px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }

th {
  text-align: left;
  padding: 10px 12px;
  color: #8b949e;
  font-weight: 600;
  border-bottom: 1px solid #30363d;
  font-size: 11px;
  text-transform: uppercase;
}

td { padding: 10px 12px; border-bottom: 1px solid #21262d; }

.positive { color: #3fb950; }
.negative { color: #f85149; }

.locked-panel {
  text-align: center;
  padding: 60px 20px;
  color: #8b949e;
}

.locked-panel .lock-icon { font-size: 40px; margin-bottom: 12px; }

/* --- Modal --- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  align-items: center;
  justify-content: center;
  z-index: 100;
}
.modal.active { display: flex; }

.modal-content {
  background: #161b22;
  border: 1px solid #30363d;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 420px;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none; border: none;
  font-size: 20px; color: #8b949e; cursor: pointer;
}

.tiers-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.tier-item {
  padding: 16px;
  border: 1px solid #30363d;
  border-radius: 12px;
  cursor: pointer;
}

.tier-item:hover { border-color: #58a6ff; }
.tier-item .tier-name { font-weight: 700; font-size: 15px; }
.tier-item .tier-price { color: #3fb950; font-weight: 700; margin-top: 4px; }
.tier-item .tier-features { font-size: 11px; color: #8b949e; margin-top: 6px; }

#payment-details { margin-top: 16px; text-align: center; font-size: 14px; }
#payment-details .qr-string { background: #0d1117; padding: 12px; border-radius: 10px; font-size: 11px; margin-top: 12px; word-break: break-all; }
