@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&display=swap");

*,
*::before,
*::after {
  box-sizing: border-box;
}

.auth-page {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Outfit", system-ui, sans-serif;
  color: #e8f5ee;
  background:
    radial-gradient(ellipse 120% 80% at 50% -20%, rgba(0, 255, 136, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 50% at 100% 50%, rgba(0, 177, 79, 0.12), transparent),
    linear-gradient(165deg, #0b6b3a 0%, #0d2818 42%, #060a09 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.auth-shell {
  width: 100%;
  max-width: 420px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 20px;
}

.auth-brand h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.03em;
}

.auth-brand h1 span {
  color: #00ff88;
}

.auth-brand p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
}

.auth-card {
  background: rgba(10, 18, 14, 0.78);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 255, 136, 0.22);
  border-radius: 24px;
  padding: 28px 24px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.auth-card h2 {
  margin: 0 0 6px;
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.auth-card .auth-sub {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0 0 22px;
}

.auth-error {
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid rgba(244, 67, 54, 0.4);
  color: #ff8a80;
  font-size: 0.85rem;
  text-align: center;
}

.auth-success {
  padding: 12px 14px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(0, 255, 136, 0.12);
  border: 1px solid rgba(0, 255, 136, 0.35);
  color: #00ff88;
  font-size: 0.85rem;
  text-align: center;
}

.auth-field {
  margin-bottom: 14px;
}

.auth-field label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(0, 255, 136, 0.8);
  margin-bottom: 6px;
}

.auth-field input,
.auth-field select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-field input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.auth-field input:focus,
.auth-field select:focus {
  border-color: rgba(0, 255, 136, 0.55);
  box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.12);
}

.auth-field input[readonly] {
  opacity: 0.7;
  cursor: default;
}

.auth-field select {
  cursor: pointer;
}

.auth-field select option {
  background: #0d2818;
  color: #fff;
}

.auth-field small {
  display: block;
  margin-top: 5px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.4);
}

.auth-field small.auth-msg-error {
  color: #ff8a80;
}

.auth-btn {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.auth-btn-primary {
  background: linear-gradient(135deg, #00b14f, #008f42);
  color: #fff;
  box-shadow: 0 6px 22px rgba(0, 177, 79, 0.4);
}

.auth-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(0, 177, 79, 0.5);
}

.auth-btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.auth-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.auth-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.auth-row-btns {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.auth-row-btns .auth-btn {
  flex: 1;
}

.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
}

.auth-footer a {
  color: #00ff88;
  font-weight: 600;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* Stepper */
.auth-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 0 0 24px;
}

.auth-step-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.45);
  border: 2px solid transparent;
  transition: all 0.25s;
}

.auth-step-dot.active {
  background: rgba(0, 255, 136, 0.2);
  color: #00ff88;
  border-color: #00ff88;
  box-shadow: 0 0 16px rgba(0, 255, 136, 0.35);
}

.auth-step-dot.done {
  background: #00b14f;
  color: #fff;
}

.auth-step-line {
  width: 40px;
  height: 3px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  transition: background 0.25s;
}

.auth-step-line.active {
  background: linear-gradient(90deg, #00b14f, #00ff88);
}

.auth-step {
  display: none;
}

.auth-step.active {
  display: block;
}

.auth-step-title {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 16px;
  text-align: center;
}

/* Profile photo on register */
.auth-photo-block {
  text-align: center;
  margin-bottom: 18px;
}

.auth-photo-wrap {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 12px;
}

.auth-photo-preview {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #00ff88;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
  background: rgba(0, 0, 0, 0.35);
}

.auth-photo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #00ff88;
}

.auth-photo-edit {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #00b14f;
  border: 2px solid #0a1210;
  cursor: pointer;
  font-size: 0.95rem;
}

.auth-photo-hint {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 8px;
}

.auth-photo-name {
  font-size: 0.75rem;
  color: rgba(0, 255, 136, 0.7);
  margin-bottom: 8px;
  min-height: 1.1em;
}

.auth-file-input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.auth-role-pills {
  display: flex;
  gap: 10px;
  margin-bottom: 4px;
}

.auth-role-pill {
  flex: 1;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.25);
  color: rgba(255, 255, 255, 0.6);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.auth-role-pill.selected {
  border-color: #00ff88;
  background: rgba(0, 255, 136, 0.15);
  color: #00ff88;
}

.auth-register-scroll {
  max-height: min(72vh, 520px);
  overflow-y: auto;
  padding-right: 4px;
  margin-right: -4px;
}

.auth-register-scroll::-webkit-scrollbar {
  width: 5px;
}

.auth-register-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 255, 136, 0.35);
  border-radius: 4px;
}

@media (max-width: 380px) {
  .auth-card {
    padding: 22px 18px;
  }
}
