@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;700&family=Sora:wght@600;700;800&display=swap');

:root {
  --ios-blue: #0a84ff;
  --ios-indigo: #5e5ce6;
  --ios-cyan: #64d2ff;
  --ios-green: #30d158;
  --ios-red: #e85d5d;
  --ios-orange: #a7c4ff;
  --ios-surface: rgba(255, 255, 255, 0.8);
  --ios-shadow: 0 24px 48px rgba(27, 49, 112, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

body {
  font-family: 'DM Sans', "SF Pro Text", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  color: #1b1f2a;
  background:
    radial-gradient(circle at 8% -5%, rgba(10, 132, 255, 0.18) 0%, transparent 38%),
    radial-gradient(circle at 94% 6%, rgba(100, 210, 255, 0.16) 0%, transparent 35%),
    linear-gradient(180deg, #eef3ff 0%, #f7fbff 48%, #f7fcff 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
}

h1,
h2,
.form-label {
  font-family: 'Sora', 'DM Sans', sans-serif;
}

.bg-orb {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(5px);
  opacity: 0.52;
}

.orb-one {
  width: 320px;
  height: 320px;
  top: -80px;
  right: -100px;
  background: radial-gradient(circle at 30% 30%, #9bc8ff, #0a84ff);
  animation: floatOrbX 16s ease-in-out infinite;
}

.orb-two {
  width: 280px;
  height: 280px;
  bottom: -60px;
  left: -90px;
  background: radial-gradient(circle at 35% 35%, #c9ecff, #64d2ff);
  animation: floatOrbY 18s ease-in-out infinite;
}

.orb-three {
  width: 240px;
  height: 240px;
  bottom: 120px;
  right: -70px;
  background: radial-gradient(circle at 40% 40%, #dbe7ff, #0f1f4a);
  animation: floatOrbZ 20s ease-in-out infinite;
  opacity: 0.38;
}

@keyframes floatOrbX {
  0%,
  100% {
    transform: translateY(0px) translateX(0px);
  }
  50% {
    transform: translateY(-20px) translateX(12px);
  }
}

@keyframes floatOrbY {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(16px);
  }
}

@keyframes floatOrbZ {
  0%,
  100% {
    transform: rotate(0deg);
  }
  50% {
    transform: rotate(8deg);
  }
}

.login-shell {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-panel {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 32px;
  padding: 40px;
  box-shadow: var(--ios-shadow);
  backdrop-filter: blur(12px);
  animation: slideUp 0.6s ease-out;
}

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

.logo-section {
  text-align: center;
  margin-bottom: 32px;
}

.logo-badge {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--ios-indigo), var(--ios-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: white;
  box-shadow: 0 16px 32px rgba(27, 49, 112, 0.28);
  animation: bounce 0.8s ease-out;
}

@keyframes bounce {
  0% {
    transform: scale(0.8);
  }
  60% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

.logo-section h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1b1f2a;
}

.tagline {
  margin: 6px 0 0;
  font-size: 14px;
  color: #465a83;
  font-weight: 500;
}

.form-section {
  margin-bottom: 24px;
}

.form-section h2 {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #1b1f2a;
}

.form-subtitle {
  margin: 0 0 20px;
  font-size: 14px;
  color: #4c628d;
  line-height: 1.5;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 700;
  color: #243c65;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper i {
  position: absolute;
  left: 12px;
  color: #5e6d8d;
  pointer-events: none;
  font-size: 16px;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 12px 12px 40px;
  background: rgba(255, 255, 255, 0.72);
  border: 1.5px solid rgba(206, 221, 244, 0.9);
  border-radius: 12px;
  font-size: 15px;
  color: #1b1f2a;
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

.input-wrapper input::placeholder {
  color: #a5b5cc;
}

.input-wrapper input:focus {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(10, 132, 255, 0.62);
  box-shadow: 0 0 0 8px rgba(10, 132, 255, 0.14);
}

.input-wrapper input:valid {
  border-color: rgba(48, 209, 88, 0.6);
}

.login-btn {
  width: 100%;
  padding: 14px;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--ios-indigo), var(--ios-blue));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  transition: all 0.3s ease;
  box-shadow: 0 16px 32px rgba(27, 49, 112, 0.28);
  font-family: inherit;
}

.login-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 44px rgba(27, 49, 112, 0.36);
}

.login-btn:active {
  transform: translateY(0px);
}

.login-btn:focus-visible {
  outline: 3px solid rgba(10, 132, 255, 0.32);
  outline-offset: 2px;
}

.login-btn i {
  font-size: 14px;
  transition: transform 0.2s ease;
}

.login-btn:hover i {
  transform: translateX(2px);
}

.error-msg {
  margin: 12px 0 0;
  padding: 10px;
  text-align: center;
  font-size: 14px;
  color: #c5192d;
  background: rgba(255, 67, 58, 0.1);
  border: 1px solid rgba(255, 67, 58, 0.3);
  border-radius: 10px;
  display: none;
}

.error-msg.active {
  display: block;
  animation: shake 0.4s ease-in-out;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}

@media (max-width: 480px) {
  body {
    align-items: flex-start;
    padding: 16px 0;
  }

  .login-shell {
    padding: 14px;
  }

  .login-panel {
    padding: 32px 20px;
    border-radius: 28px;
  }

  .logo-section {
    margin-bottom: 24px;
  }

  .logo-badge {
    width: 70px;
    height: 70px;
    font-size: 32px;
  }

  .logo-section h1 {
    font-size: 24px;
  }

  .form-section h2 {
    font-size: 18px;
  }

  .input-wrapper input {
    font-size: 16px;
    padding: 12px 12px 12px 38px;
  }

  .login-btn {
    padding: 12px;
  }
}

@media (max-width: 425px) {
  .login-panel {
    border-radius: 22px;
  }

  .tagline,
  .form-subtitle {
    font-size: 13px;
  }
}

@media (max-width: 375px) {
  .login-shell {
    padding: 10px;
  }

  .logo-badge {
    width: 64px;
    height: 64px;
    font-size: 28px;
  }

  .form-label {
    font-size: 12px;
  }
}

@media (max-width: 320px) {
  .login-panel {
    padding: 24px 14px;
  }

  .logo-section h1 {
    font-size: 22px;
  }

  .form-section h2 {
    font-size: 17px;
  }
}