:root {
  color-scheme: light dark;
  font-family: system-ui, sans-serif;
}

body {
  margin: 0;
  background: #0b1020;
  color: #e8eefc;
}

header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #24304d;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.portal-account {
  font-size: 0.9rem;
  opacity: 0.85;
}

header a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem;
}

.btn, button {
  display: inline-block;
  background: #3b82f6;
  color: #fff;
  border: 0;
  padding: 0.6rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  cursor: pointer;
}

.btn.secondary {
  background: #334155;
}

.error { color: #fca5a5; }
.success { color: #86efac; }

form label {
  display: block;
  margin-bottom: 0.75rem;
}

input {
  display: block;
  width: 100%;
  max-width: 400px;
  margin-top: 0.25rem;
  padding: 0.5rem;
}

textarea {
  display: block;
  width: 100%;
  max-width: 400px;
  margin-top: 0.25rem;
  padding: 0.5rem;
  min-height: 8rem;
  resize: vertical;
}

.subnav {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.password-field {
  position: relative;
  display: block;
  width: 100%;
  max-width: 420px;
  margin-top: 0.25rem;
}

.password-field input {
  width: 100%;
  max-width: none;
  margin-top: 0;
  padding-right: 2.75rem;
  box-sizing: border-box;
}

.password-toggle {
  position: absolute;
  top: 0;
  right: 0.35rem;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: auto;
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: 0;
  color: #94a3b8;
  cursor: pointer;
}

.password-toggle:hover {
  color: #e8eefc;
}

.password-toggle-icon {
  display: block;
}

.field-hint {
  display: block;
  margin-top: 0.25rem;
  margin-bottom: 0.75rem;
  max-width: 420px;
  font-size: 0.85rem;
  opacity: 0.75;
}

.plan-card {
  border: 1px solid #24304d;
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  border-bottom: 1px solid #24304d;
  padding: 0.5rem;
  text-align: left;
}

pre {
  overflow-x: auto;
  background: #111827;
  padding: 1rem;
  border-radius: 8px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-bottom: 1.25rem;
  font-size: 0.95rem;
}

.site-nav a {
  color: #e8eefc;
  text-decoration: underline;
}

.site-nav a[aria-current="page"] {
  font-weight: 600;
  text-decoration: none;
}

.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.lang-switcher .lang-label {
  opacity: 0.85;
}

.lang-switcher a {
  color: #e8eefc;
  text-decoration: none;
  text-transform: uppercase;
}

.lang-switcher a.is-active {
  font-weight: 600;
  text-decoration: underline;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid #24304d;
  font-size: 0.9rem;
}

.site-footer a {
  color: #94a3b8;
}

.panel {
  border: 1px solid #24304d;
  border-radius: 10px;
  padding: 1rem;
}

.meta {
  opacity: 0.8;
  margin-bottom: 1rem;
}

.plan-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 640px) {
  .plan-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

.plan-card .plan-cta {
  margin-top: 2rem;
}

.plan-description {
  margin: 0;
  opacity: 0.9;
}

.plan-price {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.plans-section {
  margin-top: 2.5rem;
}

.plans-section > h2 {
  margin: 0 0 1rem;
  font-size: 1.25rem;
  font-weight: 600;
}

.app-download-qr {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

@media (min-width: 480px) {
  .app-download-qr {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 420px;
  }
}

.app-download-qr-item {
  text-align: center;
}

.app-download-qr-item img {
  display: block;
  margin: 0 auto 0.5rem;
  border-radius: 8px;
  background: #fff;
  padding: 0.5rem;
}

.app-download-qr-item p {
  margin: 0;
  font-size: 0.95rem;
}

.pay-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pay-container {
  max-width: 420px;
  padding: 2rem;
  text-align: center;
}

.terms-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  max-width: 420px;
}

.terms-row input[type="checkbox"] {
  width: auto;
  margin-top: 0.35rem;
}

button:disabled,
button:disabled:hover {
  opacity: 0.5;
  cursor: not-allowed;
}

.muted {
  opacity: 0.75;
}
