@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

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

:root {
  --primary: #6938EF;
  --input-bg: #755CFF;
  --input-border: rgba(255, 255, 255, 0.10);
  --text-primary: #FFFFFF;
  --text-secondary: rgba(255, 255, 255, 0.70);
  --hint: #D9D6FE;
  --error: #D92D20;
  --success: #16B364;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--primary);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 24px 32px;
}

.screen {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo {
  width: 138px;
  height: auto;
  margin-bottom: 32px;
}

.title {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 8px;
}

.subtitle {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 24px;
}

/* States */
.state { display: none; width: 100%; }
.state.active { display: flex; flex-direction: column; align-items: center; }

/* Loading */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

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

/* Inputs */
.input-group {
  width: 100%;
  margin-bottom: 16px;
}

.input-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.5;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.input-wrap {
  position: relative;
}

input[type="password"],
input[type="text"] {
  width: 100%;
  min-height: 46px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 24px;
  padding: 10px 48px 10px 16px;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: var(--text-primary);
  outline: none;
  -webkit-appearance: none;
}

input::placeholder {
  color: var(--hint);
}

input:focus {
  border-color: rgba(255, 255, 255, 0.35);
}

.toggle-pw {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  color: var(--hint);
}

.toggle-pw svg {
  width: 22px;
  height: 22px;
}

/* Buttons */
.btn {
  width: 100%;
  min-height: 46px;
  border-radius: 40px;
  font-family: 'Poppins', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  border: none;
  outline: none;
  transition: opacity 0.15s;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.btn-primary {
  background: #FFFFFF;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-primary:hover:not(:disabled) {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: #FFFFFF;
  border: 2px solid #FFFFFF;
}

.btn-outline:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

.btn-danger {
  background: var(--error);
  color: #FFFFFF;
  border: 2px solid var(--error);
}

.btn-danger:hover:not(:disabled) {
  opacity: 0.9;
}

.btn + .btn {
  margin-top: 12px;
}

/* Status message */
.status-msg {
  width: 100%;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
  margin-bottom: 20px;
}

.status-msg.error {
  background: rgba(217, 45, 32, 0.15);
  color: #FFAAAA;
  border: 1px solid rgba(217, 45, 32, 0.4);
}

.status-msg.success {
  background: rgba(22, 179, 100, 0.15);
  color: #88F0BE;
  border: 1px solid rgba(22, 179, 100, 0.4);
}

/* Icon circle for success/error states */
.icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.icon-circle.success { background: rgba(22, 179, 100, 0.2); }
.icon-circle.error   { background: rgba(217, 45, 32, 0.2); }

.icon-circle svg { width: 36px; height: 36px; }
