@charset "utf-8";
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ========================================
   HIVE HR — Glassmorphic Login
   ======================================== */

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

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- SCENE ---------- */
.scene {
  position: fixed;
  inset: 0;
  background: #0a0a12;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mesh gradient blobs */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  will-change: transform;
  pointer-events: none;
}

.blob--1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(99,102,241,.55), transparent 70%);
  top: -15%; left: -10%;
  animation: drift1 18s ease-in-out infinite alternate;
}
.blob--2 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(236,72,153,.45), transparent 70%);
  bottom: -10%; right: -8%;
  animation: drift2 22s ease-in-out infinite alternate;
}
.blob--3 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(34,211,238,.3), transparent 70%);
  top: 50%; left: 55%;
  transform: translate(-50%,-50%);
  animation: drift3 15s ease-in-out infinite alternate;
}

@keyframes drift1 { to { transform: translate(80px, 120px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-90px, -60px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(60px, -80px) scale(1.2); } }

/* Noise texture overlay */
.scene::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

/* ---------- CARD ---------- */
.card {
  position: relative;
  z-index: 2;
  width: 400px;
  max-width: 90vw;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 28px;
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  box-shadow:
    0 24px 48px rgba(0,0,0,.35),
    0 0 0 1px rgba(255,255,255,.05) inset,
    0 1px 0 rgba(255,255,255,.08) inset;
  padding: 44px 36px 36px;
  animation: entrance .7s cubic-bezier(.22,1,.36,1) both;
}

@keyframes entrance {
  from { opacity: 0; transform: translateY(40px) scale(.97); }
  to   { opacity: 1; transform: none; }
}

/* subtle shimmer on top edge */
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.25), transparent);
  border-radius: 1px;
}

/* ---------- BRAND HEADER ---------- */
.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 32px;
}

.brand__logo {
  max-width: 220px;
}

.brand__logo img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 2px 8px rgba(99,102,241,.3));
}

.brand__text h1 {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -.3px;
  line-height: 1.2;
}
.brand__text span {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255,255,255,.45);
}

/* ---------- ERROR ---------- */
.alert-error {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(248,113,113,.1);
  border: 1px solid rgba(248,113,113,.2);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 22px;
  color: #fca5a5;
  font-size: 13px;
  line-height: 1.4;
  animation: shake .45s ease;
}
.alert-error i { font-size: 16px; flex-shrink: 0; }

/* Success alert */
.alert-success {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(74, 222, 128, .1);
  border: 1px solid rgba(74, 222, 128, .2);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 22px;
  color: #86efac;
  font-size: 13px;
  line-height: 1.4;
}
.alert-success i { font-size: 16px; flex-shrink: 0; }

/* Spinner button states */
.btn__spinner { pointer-events: none; }
.btn:disabled { opacity: 0.7; cursor: not-allowed; }

@keyframes shake {
  0%,100% { transform: translateX(0); }
  20%     { transform: translateX(-6px); }
  40%     { transform: translateX(6px); }
  60%     { transform: translateX(-4px); }
  80%     { transform: translateX(4px); }
}

/* ---------- FORM ---------- */
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}

.field {
  position: relative;
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255,255,255,.5);
  margin-bottom: 6px;
  letter-spacing: .3px;
  text-transform: uppercase;
}

.field__input-wrap {
  position: relative;
}

.field__input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 15px;
  color: rgba(255,255,255,.3);
  transition: color .25s;
  pointer-events: none;
}

.field input[type="text"],
.field input[type="password"],
.field input[type="email"] {
  display: block;
  width: 100%;
  height: 48px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 0 16px 0 44px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #fff;
  outline: none;
  transition: all .25s ease;
  -webkit-appearance: none;
}

.field input::placeholder {
  color: rgba(255,255,255,.25);
}

.field input:focus {
  background: rgba(255,255,255,.1);
  border-color: rgba(99,102,241,.5);
  box-shadow: 0 0 0 3px rgba(99,102,241,.12);
}

.field input:focus ~ i,
.field__input-wrap:focus-within i {
  color: rgba(255,255,255,.65);
}

/* ---------- LINKS ---------- */
.meta-row {
  display: flex;
  justify-content: flex-end;
  margin: 4px 0 24px;
}

.meta-row a,
.back-link {
  font-size: 13px;
  color: rgba(255,255,255,.45);
  text-decoration: none;
  transition: color .2s;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
  padding: 0;
}

.meta-row a:hover,
.back-link:hover {
  color: #fff;
}

/* ---------- BUTTON ---------- */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .25s ease;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 4px 20px rgba(99,102,241,.3);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px rgba(99,102,241,.45);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 12px rgba(99,102,241,.25);
}

/* ripple on press */
.btn--primary::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.12), transparent);
  opacity: 0;
  transition: opacity .2s;
}
.btn--primary:hover::after { opacity: 1; }

/* ---------- STEP TRANSITIONS ---------- */
.step--out {
  animation: stepOut .2s ease both;
}
.step--in {
  animation: stepIn .35s cubic-bezier(.22,1,.36,1) both;
}
@keyframes stepOut { to { opacity: 0; transform: translateY(-10px); } }
@keyframes stepIn  { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- IDENTITY ROW ---------- */
.step-identity {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
}
.step-identity__email {
  color: rgba(255,255,255,.8);
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.step-identity__change {
  color: rgba(99,102,241,.8);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  margin-left: 12px;
  transition: color .2s;
}
.step-identity__change:hover {
  color: #818cf8;
}

/* ---------- SSO HINT ---------- */
.sso-hint {
  color: rgba(255,255,255,.45);
  font-size: 13px;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.5;
}

/* ---------- MICROSOFT SSO BUTTON ---------- */
.btn--microsoft {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255,255,255,.85);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all .2s ease;
  position: relative;
  overflow: hidden;
}
.btn--microsoft:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.25);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  color: #fff;
}
.btn--microsoft:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.btn--microsoft svg {
  flex-shrink: 0;
}

/* ---------- FOOTER ---------- */
.card__footer {
  margin-top: 28px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,.06);
  padding-top: 20px;
  color: rgba(255,255,255,.2);
  font-size: 11px;
  letter-spacing: .3px;
}
.card__footer-credit {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255,255,255,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.card__footer-credit a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.card__footer-credit img {
  height: 56px;
  opacity: .6;
  transition: opacity .2s;
  vertical-align: middle;
}
.card__footer-credit img:hover {
  opacity: 1;
}

/* ---------- PANEL TRANSITIONS ---------- */
.panel {
  animation: panelIn .4s cubic-bezier(.22,1,.36,1) both;
}
.panel--out {
  animation: panelOut .25s ease both;
}

@keyframes panelIn  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes panelOut { to { opacity: 0; transform: translateY(-8px); } }

.panel[hidden] { display: none; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 440px) {
  .card { padding: 32px 24px 28px; border-radius: 22px; }
  .brand { margin-bottom: 26px; }
  .brand__logo { max-width: 180px; }
  .brand__text h1 { font-size: 18px; }
}
