/* 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 {
  --blue-900: #1f5fc6;
  --blue-800: #2f6fdb;
  --blue-700: #4285f4;
  --blue-500: #3aa0ff;
  --ink: #0f172a;
  --glass: rgba(255, 255, 255, 0.18);
  --stroke: rgba(255, 255, 255, 0.28);
}

body {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  margin: 0;
  color: #0f172a;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(180deg, #66a3ff 0%, #4285f4 42%, #2f6fdb 100%);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
}

* { box-sizing: border-box; }
button, input { font: inherit; max-width: 100%; }

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

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.86), rgba(196,221,255,0.52), rgba(66,133,244,0.2));
  box-shadow: 0 30px 120px rgba(66, 133, 244, 0.32);
  animation: float 12s ease-in-out infinite;
}

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

.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;
  background:
    linear-gradient(transparent 0, rgba(255,255,255,0.1) 1px, transparent 2px),
    linear-gradient(90deg, transparent 0, rgba(255,255,255,0.08) 1px, transparent 2px);
  background-size: 80px 80px;
  opacity: 0.35;
  transform: perspective(800px) rotateX(55deg);
  transform-origin: top;
}

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

.login-card {
  width: min(440px, 92vw);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(10px);
  animation: lift 0.9s ease;
}

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

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

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

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

.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-height: 92px;
  margin: 0 auto 16px;
  padding: 18px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #4285f4 0%, #2f6fdb 100%);
  border: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.32),
    0 14px 26px rgba(47, 111, 219, 0.22);
  overflow: hidden;
}

.brand-logo-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  max-width: 150px;
  height: 54px;
}

.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;
  align-self: stretch;
  min-height: 42px;
  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: 0 0 6px;
  color: #1b4be0;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.7px;
  text-align: center;
  text-transform: uppercase;
}

.login-card h1 {
  margin: 0 0 6px;
  font-size: 28px;
  letter-spacing: 0;
  text-align: center;
  color: #0b1b5b;
}

.login-card p {
  margin: 0 0 18px;
  color: #475569;
  text-align: center;
}

form {
  display: grid;
  gap: 12px;
}

.mfa-login-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 16px;
  border: 1px solid rgba(66, 133, 244, 0.2);
  border-radius: 18px;
  background:
    radial-gradient(circle at top left, rgba(66, 133, 244, 0.14), transparent 46%),
    linear-gradient(180deg, #ffffff 0%, #f6f9ff 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 14px 32px rgba(15, 23, 42, 0.07);
}

.mfa-login-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, #4285f4, #2f6fdb);
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  font-family: "JetBrains Mono", "Consolas", monospace;
  border: 1px solid rgba(255,255,255,0.36);
  box-shadow: 0 12px 22px rgba(66, 133, 244, 0.25);
}

.mfa-login-card h2 {
  margin: 0 0 4px;
  color: #0b1b5b;
  font-size: 18px;
  letter-spacing: 0;
}

.mfa-login-card p {
  margin: 0;
  color: #475569;
  text-align: left;
  font-size: 13px;
  line-height: 1.35;
}

.otp-field {
  display: grid;
  gap: 9px;
  padding: 2px 0 4px;
}

.otp-label {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

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

.otp-inputs input {
  width: 100%;
  aspect-ratio: 1;
  min-height: 50px;
  padding: 0;
  border-radius: 14px;
  border: 1px solid #cbdaf3;
  background:
    linear-gradient(180deg, #ffffff 0%, #f7faff 100%);
  color: #0b1b5b;
  font-family: "JetBrains Mono", "Consolas", monospace;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.82), 0 8px 18px rgba(15, 23, 42, 0.06);
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease, background 140ms ease;
}

.otp-inputs input:focus {
  border-color: #4285f4;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(66, 133, 244, 0.16), 0 10px 22px rgba(66, 133, 244, 0.12);
  transform: translateY(-1px);
}

.otp-inputs input.is-filled {
  border-color: #8ab8ff;
}

.mfa-submit-button {
  margin-top: 2px;
  min-height: 46px;
  font-weight: 800;
}

[hidden] {
  display: none !important;
}

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: #475569;
}

input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #d7deea;
  font-size: 14px;
  background: #ffffff;
}

input:focus {
  outline: none;
  border-color: #1b4be0;
  box-shadow: 0 0 0 3px rgba(27, 75, 224, 0.15);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 52px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 30px;
  height: 30px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234285f4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  color: #4285f4;
  box-shadow: none;
  transform: translateY(-50%);
}

.password-toggle[aria-pressed="true"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232f6fdb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M4 4l16 16' stroke='%23ef4444'/%3E%3C/svg%3E");
}

.password-toggle:hover {
  background: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232f6fdb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 20px 20px;
  color: #2f6fdb;
  box-shadow: none;
  transform: translateY(-50%);
}

.password-toggle[aria-pressed="true"]:hover {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%232f6fdb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7-10-7-10-7Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M4 4l16 16' stroke='%23ef4444'/%3E%3C/svg%3E");
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(66, 133, 244, 0.35);
  outline-offset: 2px;
}

button {
  padding: 12px;
  border-radius: 12px;
  border: none;
  background: #4285f4;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(66, 133, 244, 0.25);
  transition: transform 160ms ease, box-shadow 160ms ease;
  position: relative;
}

button:hover {
  background: #2f6fdb;
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(66, 133, 244, 0.32);
}

button.is-loading {
  cursor: wait;
  opacity: 0.9;
  padding-right: 44px;
}

button.is-loading::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 16px;
  height: 16px;
  margin-top: -8px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}

.error {
  color: #b91c1c;
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

.secondary-login-action {
  background: #ffffff;
  color: #0b1b5b;
  border: 1px solid #d7deea;
  box-shadow: none;
  min-height: 44px;
}

.secondary-login-action:hover {
  background: #f8fbff;
  color: #0b1b5b;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
}

.password-policy-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 5px;
  margin: -4px 0 8px;
  padding: 0;
  list-style: none;
  text-align: left;
}

.password-policy-list li {
  position: relative;
  min-height: 18px;
  padding: 0;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  transition: color 160ms ease;
}

.password-policy-list li.is-valid {
  color: #00c853;
}

.trust-note {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #d7deea;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
}

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

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

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

@media (max-width: 600px) {
  .login {
    align-items: start;
    justify-content: flex-start;
    padding: 18px;
  }

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

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

  .login-card {
    width: 100%;
    padding: 22px;
    border-radius: 14px;
  }

  .login-card h1 {
    font-size: 24px;
  }

  .password-policy-list {
    grid-template-columns: 1fr;
  }

  .otp-inputs {
    gap: 6px;
  }

  .otp-inputs input {
    min-height: 44px;
    border-radius: 12px;
    font-size: 20px;
  }

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

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

@media (max-width: 380px) {
  .login {
    padding: 12px;
  }

  .login-card {
    padding: 18px;
  }

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

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

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