/* One Piece Cursor */
html,
body,
* {
    cursor: url('./cursor/strawhat-cursor.png') 8 8, auto;
}

a,
button,
.btn,
label,
[role="button"],
input[type="submit"],
input[type="button"] {
    cursor: url('./cursor/strawhat-pointer.png') 8 8, pointer !important;
}

/* Keep normal text cursor for typing */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="number"],
textarea {
    cursor: text !important;
}

:root {
  --brand-blue: #4285f4;
  --brand-blue-dark: #2f6fdb;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #d7e1ef;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: #2f6fdb;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 50% -10%, rgba(255, 255, 255, 0.24), transparent 36%),
    linear-gradient(180deg, #66a3ff 0%, #4285f4 44%, #2f6fdb 100%);
}

button,
input {
  max-width: 100%;
  font: inherit;
}

.scene {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.88),
    rgba(196, 221, 255, 0.55),
    rgba(66, 133, 244, 0.18)
  );
  box-shadow: 0 30px 120px rgba(66, 133, 244, 0.3);
  animation: float 12s ease-in-out infinite;
}

.orb-1 {
  width: 360px;
  height: 360px;
  top: -120px;
  right: 8%;
}

.orb-2 {
  width: 260px;
  height: 260px;
  bottom: -80px;
  left: 10%;
  animation-delay: 2s;
}

.orb-3 {
  width: 180px;
  height: 180px;
  top: 20%;
  left: -60px;
  animation-delay: 4s;
}

.grid {
  position: absolute;
  inset: 0;
  opacity: 0.3;
  background:
    linear-gradient(transparent 0, rgba(255, 255, 255, 0.09) 1px, transparent 2px),
    linear-gradient(90deg, transparent 0, rgba(255, 255, 255, 0.07) 1px, transparent 2px);
  background-size: 80px 80px;
  transform: perspective(800px) rotateX(55deg);
  transform-origin: top;
}

.auth-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
}

.login-bot-animation {
  position: relative;
  z-index: 2;
  width: min(320px, 68vw);
  height: min(276px, 60vw);
  margin: -116px auto -30px;
  filter: drop-shadow(0 18px 34px rgba(2, 6, 23, 0.22));
}

.login-welcome-animation {
  position: relative;
  z-index: 2;
  width: min(260px, 64vw);
  height: min(86px, 22vw);
  margin: -18px auto 12px;
  filter: drop-shadow(0 12px 24px rgba(2, 6, 23, 0.18));
}

.login-bot-animation svg,
.login-welcome-animation svg {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.auth-panel {
  width: min(440px, 100%);
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.34);
  backdrop-filter: blur(12px);
  animation: panel-enter 0.55s ease both;
}

.brand-row {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 18px 24px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-dark));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.3),
    0 14px 26px rgba(47, 111, 219, 0.22);
}

.brand-logo-badge {
  width: 118px;
  height: 54px;
  display: grid;
  place-items: center;
}

.brand-cp-logo {
  display: block;
  max-width: 100%;
  max-height: 52px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(8, 38, 85, 0.16));
}

.brand-divider {
  width: 1px;
  min-height: 44px;
  align-self: stretch;
  background: rgba(255, 255, 255, 0.42);
}

.brand-vms-text {
  color: #ffffff;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 2px 8px rgba(8, 38, 85, 0.18);
}

.service-label {
  margin: 16px 0 0;
  color: #42526a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-align: center;
  text-transform: uppercase;
}

.form-panel {
  margin-top: 22px;
}

h1 {
  margin: 0;
  color: #0b1b5b;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  text-align: center;
}

.subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.stack {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  color: var(--ink);
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.14);
}

.password-policy {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

button {
  min-height: 46px;
  width: 100%;
  padding: 11px 18px;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--brand-blue);
  box-shadow: 0 12px 24px rgba(66, 133, 244, 0.24);
  font-weight: 800;
  cursor: pointer;
  transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

button:hover {
  background: var(--brand-blue-dark);
  box-shadow: 0 15px 28px rgba(47, 111, 219, 0.3);
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
}

.secondary-action {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  box-shadow: none;
}

.secondary-action:hover {
  color: #1741a2;
  background: #dbeafe;
  box-shadow: none;
}

.otp-inputs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.otp-inputs input {
  min-height: 52px;
  padding: 8px;
  text-align: center;
  font-family: "Consolas", monospace;
  font-size: 22px;
  font-weight: 900;
}

.otp-inputs input.is-filled {
  border-color: #60a5fa;
  background: #eff6ff;
}

.message {
  margin-top: 16px;
  padding: 12px 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.message.error {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fee2e2;
}

.message.success {
  border-color: #bbf7d0;
  color: #15803d;
  background: #dcfce7;
}

.trust-note {
  margin: 22px 0 0;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: #52627a;
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.hidden {
  display: none !important;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 520px) {
  .auth-shell {
    align-items: start;
    justify-content: flex-start;
    padding: 18px 12px;
  }

  .login-bot-animation {
    align-self: center;
    width: min(250px, 70vw);
    height: min(216px, 62vw);
    margin: -42px auto -20px;
  }

  .login-welcome-animation {
    align-self: center;
    width: min(230px, 68vw);
    height: min(76px, 24vw);
    margin: -16px auto 10px;
  }

  .auth-panel {
    padding: 20px;
  }

  .brand-row {
    min-height: 78px;
    gap: 13px;
    padding: 14px 16px;
  }

  .brand-logo-badge {
    width: 96px;
    height: 46px;
  }

  .brand-vms-text {
    font-size: 32px;
  }

  h1 {
    font-size: 24px;
  }

  .orb-1 {
    width: 260px;
    height: 260px;
    right: -80px;
  }

  .orb-2 {
    width: 200px;
    height: 200px;
  }
}
