:root {
  --bg: #f6f7fb;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --primary: #0b2a56;
  --primary2: #123c78;
  --border: #e2e8f0;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  background: radial-gradient(1200px 800px at 20% 10%, #ffffff 0%, var(--bg) 55%, #eef2ff 100%);
  color: var(--text);
}

.page {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.card {
  width: min(560px, 100%);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 10px 40px rgba(2, 6, 23, 0.08);
}

.brand {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}

.brandMark {
  font-weight: 800;
  letter-spacing: 0.04em;
  font-size: 28px;
  color: var(--primary);
}

.brandSub {
  color: var(--muted);
  font-size: 14px;
}

.hint {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.6;
}

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--primary2), var(--primary));
  color: white;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(15, 23, 42, 0.08);
  cursor: pointer;
  width: 100%;
}

.button:hover {
  filter: brightness(1.03);
}

.button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.title {
  margin: 0 0 12px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  transition: border-color 0.2s;
}

.input:focus {
  outline: none;
  border-color: var(--primary);
}

.error {
  color: #dc2626;
  font-size: 14px;
  min-height: 20px;
}

.brandTop {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav {
  display: flex;
  gap: 12px;
}

.navLink {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.navLink:hover {
  color: var(--primary);
}

.brandLine {
  height: 1px;
  background: var(--border);
  margin-top: 8px;
}

.footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footerLink {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footerLink:hover {
  color: var(--primary);
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: var(--card);
  border-radius: 20px;
  padding: 40px 32px;
  width: min(480px, 90vw);
  max-width: 100%;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.3);
  text-align: center;
  animation: slideUp 0.3s ease-out;
  border: 1px solid var(--border);
}

.modal-icon {
  font-size: 64px;
  margin-bottom: 20px;
  animation: pulse 2s ease-in-out infinite;
}

.modal-title {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.modal-message {
  margin: 0 0 24px;
  color: var(--muted);
  line-height: 1.6;
  font-size: 16px;
}

.modal-hint {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  opacity: 0.8;
}

.modal-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 24px 0;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.modal-steps {
  display: grid;
  gap: 16px;
  margin: 24px 0;
  text-align: right;
}

.step {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--primary2), var(--primary));
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.step-text {
  flex: 1;
  color: var(--text);
  font-size: 15px;
  text-align: right;
}

.modal-button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 12px 24px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--primary2), var(--primary));
  color: white;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(15, 23, 42, 0.08);
  cursor: pointer;
  font-size: 16px;
  margin-top: 8px;
  transition: filter 0.2s;
}

.modal-button:hover {
  filter: brightness(1.05);
}

.modal-button:active {
  filter: brightness(0.95);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}


