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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f0f23;
  color: #e2e8f0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 440px;
  width: 100%;
  padding: 20px;
}

h1 { font-size: 1.75rem; margin-bottom: 8px; color: #fff; }

.subtitle {
  color: #94a3b8;
  margin-bottom: 32px;
}

/* Card */
.card {
  background: #1e1e3a;
  border-radius: 12px;
  padding: 32px;
  border: 1px solid #2d2d52;
}

/* Tabs */
.tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 2px solid #2d2d52;
}

.tab {
  flex: 1;
  padding: 10px 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #94a3b8;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover { color: #e2e8f0; }
.tab.active { color: #635bff; border-bottom-color: #635bff; }

/* Forms */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #94a3b8;
}

input[type="email"] {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #2d2d52;
  border-radius: 8px;
  font-size: 1rem;
  background: #0f0f23;
  color: #e2e8f0;
  transition: border-color 0.15s;
}

input[type="email"]:focus {
  outline: none;
  border-color: #635bff;
  box-shadow: 0 0 0 3px rgba(99,91,255,0.2);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-passkey {
  background: #635bff;
  color: #fff;
}
.btn-passkey:hover:not(:disabled) { background: #5046e5; }

.btn-outline {
  background: transparent;
  color: #94a3b8;
  border: 1px solid #374151;
  padding: 8px 16px;
  font-size: 0.9rem;
  width: auto;
}
.btn-outline:hover:not(:disabled) { border-color: #635bff; color: #fff; }

/* Alert */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  margin-bottom: 16px;
  display: none;
}
.alert.error { background: #3b1818; color: #fca5a5; border: 1px solid #5b2020; display: block; }
.alert.info { background: #1e2a4a; color: #93c5fd; border: 1px solid #2d3f6a; display: block; }

/* Profile */
.profile-card {
  text-align: center;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #2d2d52;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #635bff;
  overflow: hidden;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.profile-email {
  color: #94a3b8;
  margin-bottom: 24px;
}

.profile-details {
  text-align: left;
  border-top: 1px solid #2d2d52;
  padding-top: 20px;
  margin-top: 8px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 0.9rem;
}

.profile-row .label { color: #94a3b8; }
.profile-row .value { color: #e2e8f0; font-weight: 500; }

/* Loading spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Header */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

@media (max-width: 600px) {
  .container { padding: 16px; }
  .card { padding: 24px 20px; }
}
