@charset "UTF-8";
/* ============================================================
   Login Page — CardOpz Design System
   Clean, minimal, enterprise-grade
   WCAG 2.1 AA compliant
   ============================================================ */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");
html,
body {
  height: 100%;
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0 !important;
  padding: clamp(1rem, 3vw, 1.5rem);
  min-height: 100vh;
  height: auto;
  overflow-x: hidden;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cg fill='white' opacity='0.03' transform='rotate(-8 80 80)'%3E%3Ccircle cx='80' cy='80' r='72' fill='none' stroke='white' stroke-width='6'/%3E%3Ccircle cx='80' cy='80' r='52' fill='none' stroke='white' stroke-width='3'/%3E%3Crect x='74' y='2' width='12' height='18' rx='4'/%3E%3Crect x='74' y='140' width='12' height='18' rx='4'/%3E%3Crect x='2' y='74' width='18' height='12' rx='4'/%3E%3Crect x='140' y='74' width='18' height='12' rx='4'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 80 96'%3E%3Cg fill='white' opacity='0.03' transform='rotate(-10 40 48)'%3E%3Cpath d='M40 4C40 4 4 36 4 52C4 66 16 72 28 64C30 63 34 59 36 56L32 88H48L44 56C46 59 50 63 52 64C64 72 76 66 76 52C76 36 40 4 40 4Z'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 110 110'%3E%3Cg opacity='0.03' fill='none' stroke='white' transform='rotate(12 55 55)'%3E%3Ccircle cx='55' cy='55' r='50' stroke-width='5'/%3E%3Ccircle cx='55' cy='55' r='38' stroke-width='2'/%3E%3Crect x='40' y='40' width='30' height='30' stroke-width='3'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 72'%3E%3Cg fill='white' opacity='0.03' transform='rotate(15 24 36)'%3E%3Cpath d='M24 3L45 36L24 69L3 36Z'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 76 76'%3E%3Cg fill='white' opacity='0.03' transform='rotate(8 38 38)'%3E%3Cpath d='M38 68C38 68 6 45 6 27C6 14 17 6 27 6C33 6 37 10 38 14C39 10 43 6 49 6C59 6 70 14 70 27C70 45 38 68 38 68Z'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 80'%3E%3Cg fill='white' opacity='0.03' transform='rotate(-10 36 40)'%3E%3Ccircle cx='36' cy='24' r='16'/%3E%3Ccircle cx='20' cy='45' r='16'/%3E%3Ccircle cx='52' cy='45' r='16'/%3E%3Crect x='32' y='50' width='8' height='22' rx='2'/%3E%3Crect x='24' y='68' width='24' height='6' rx='3'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 160 160'%3E%3Cg fill='white' opacity='0.03' transform='rotate(6 80 80)'%3E%3Ccircle cx='80' cy='80' r='72' fill='none' stroke='white' stroke-width='6'/%3E%3Ccircle cx='80' cy='80' r='52' fill='none' stroke='white' stroke-width='3'/%3E%3Crect x='74' y='2' width='12' height='18' rx='4'/%3E%3Crect x='74' y='140' width='12' height='18' rx='4'/%3E%3Crect x='2' y='74' width='18' height='12' rx='4'/%3E%3Crect x='140' y='74' width='18' height='12' rx='4'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 56 68'%3E%3Cg fill='white' opacity='0.03' transform='rotate(18 28 34)'%3E%3Cpath d='M28 3C28 3 3 25 3 36C3 46 11 50 19 44C21 43 24 41 25 39L22 61H34L31 39C32 41 35 43 37 44C45 50 53 46 53 36C53 25 28 3 28 3Z'/%3E%3C/g%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 72'%3E%3Cg fill='white' opacity='0.03' transform='rotate(-14 24 36)'%3E%3Cpath d='M24 3L45 36L24 69L3 36Z'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-attachment: fixed;
  background-position: 6% 25%, 84% 12%, 10% 68%, 80% 78%, 25% 85%, 16% 8%, 90% 48%, 50% 5%, 62% 92%;
  background-size: 10vw, 12vw, 10vw, 9vw, 11vw, 9vw, 8vw, 7vw, 6vw;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.02;
  pointer-events: none;
  z-index: 0;
}

#main {
  width: 100%;
  position: relative;
  z-index: 1;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: clamp(1.25rem, 2.5vw, 1.5rem);
}
.login-brand-icon {
  width: clamp(2.75rem, 5vw, 3.5rem);
  height: clamp(2.75rem, 5vw, 3.5rem);
  object-fit: contain;
  margin-bottom: 0.75rem;
}
.login-brand-name {
  font-weight: 700;
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.LoginArea {
  background-color: transparent;
}
.LoginArea form {
  padding: clamp(1rem, 2vw, 1.25rem);
}

.form-signin {
  width: 100%;
  max-width: 25rem;
  padding: clamp(2rem, 4vw, 2.5rem) clamp(1.5rem, 3vw, 2rem) clamp(1.5rem, 3vw, 2rem);
  margin: auto;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-top: none;
  border-radius: 0.75rem;
  background-color: var(--surface);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.2);
  animation: card-appear 0.5s ease-out both;
}
.form-signin::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  height: 3px;
  width: 0;
  background: var(--accent);
  transform: translateX(-50%);
  animation: stripe-reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}
.form-signin::after {
  content: "";
  position: absolute;
  top: 0;
  left: -30%;
  height: 3px;
  width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: stripe-sheen 0.6s ease-out 0.95s both;
}
.form-signin .text-danger {
  color: var(--red) !important;
  font-size: clamp(0.75rem, 1vw, 0.8125rem);
}
.form-signin .btn {
  background-color: var(--accent) !important;
  border: 1px solid var(--accent) !important;
  color: #fff !important;
  border-radius: 0.5rem !important;
  font-size: clamp(0.875rem, 1.1vw, 0.9375rem) !important;
  font-weight: 600 !important;
  height: 3rem;
  margin-top: 0.25rem;
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s !important;
}
.form-signin .btn:hover {
  filter: brightness(1.12);
}
.form-signin .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.form-signin .btn:active {
  transform: scale(0.98);
}

.login-env-badge {
  text-align: center;
  margin: 0 auto 0.5rem;
  color: var(--orange);
  font-size: clamp(0.625rem, 0.9vw, 0.6875rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(251, 146, 60, 0.08);
  padding: 0.25rem 0.875rem;
  border-radius: 6.25rem;
  border: 1px solid rgba(251, 146, 60, 0.18);
  width: fit-content;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: clamp(0.8125rem, 1.1vw, 0.875rem);
  font-weight: 400;
  margin-top: 0;
  margin-bottom: clamp(1rem, 2vw, 1.25rem);
}

.login-errors {
  text-align: center;
  display: flex;
  flex-direction: column;
  margin-bottom: 0.25rem;
}
.login-errors:empty {
  display: none;
}

.LoginFormField {
  padding-bottom: 1rem;
}
.LoginFormField label {
  margin-left: 2px;
  margin-bottom: 0.375rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: clamp(0.75rem, 1vw, 0.8125rem);
  text-align: start;
  display: block;
}
.LoginFormField input {
  color: var(--text) !important;
  height: 2.875rem;
  background-color: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 0.5rem;
  padding: 0 2.75rem;
  font-size: clamp(0.8125rem, 1.1vw, 0.875rem);
  transition: border-color 0.15s;
}
.LoginFormField input:focus {
  border-color: var(--accent) !important;
  box-shadow: none !important;
  outline: none;
  background-color: var(--surface-2) !important;
}
.LoginFormField input::placeholder {
  color: var(--text-dim) !important;
  opacity: 1;
}

.input-icon-wrap {
  position: relative;
}
.input-icon-wrap > i:first-child {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
  transition: color 0.15s;
}
.input-icon-wrap #togglePassword {
  position: absolute;
  right: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-dim);
  z-index: 2;
  cursor: pointer;
  transition: color 0.15s;
  font-size: 0.9375rem;
}
.input-icon-wrap #togglePassword:hover {
  color: var(--text-muted);
}
.input-icon-wrap #togglePassword:focus {
  color: var(--text-muted);
  outline: none;
}
.input-icon-wrap #togglePassword svg {
  width: 1em;
  height: 1em;
}
.input-icon-wrap #togglePassword .eye-closed {
  display: none;
}
.input-icon-wrap #togglePassword.showing .eye-open {
  display: none;
}
.input-icon-wrap #togglePassword.showing .eye-closed {
  display: block;
}
.input-icon-wrap:focus-within > i:first-child {
  color: var(--accent);
}

::-ms-reveal {
  display: none;
}

.login-password-note {
  text-align: center;
  font-size: clamp(0.6875rem, 0.9vw, 0.75rem);
  color: var(--text-dim);
  margin-top: 1rem;
  margin-bottom: 0;
}

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-dim);
  font-size: clamp(0.6875rem, 0.9vw, 0.75rem);
  letter-spacing: 0.04em;
  animation: content-enter 0.3s ease-out 0.5s both;
}
.login-footer svg {
  width: 0.8em;
  height: 0.8em;
  vertical-align: -0.05em;
  margin-right: 0.25em;
}
.login-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}
.login-footer a:hover {
  color: var(--text);
}
.login-footer-links {
  display: block;
  margin-top: 0.375rem;
}
.login-footer-dot {
  margin: 0 0.25em;
  opacity: 0.4;
}

@keyframes card-appear {
  from {
    opacity: 0;
    transform: translateY(0.75rem);
  }
}
@keyframes stripe-reveal {
  to {
    width: 100%;
  }
}
@keyframes stripe-sheen {
  from {
    left: -30%;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  to {
    left: 100%;
    opacity: 0;
  }
}
@keyframes brand-enter {
  from {
    opacity: 0;
    transform: translateY(0.5rem) scale(0.96);
  }
}
@keyframes content-enter {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.login-spinner {
  display: inline-block;
  width: 1em;
  height: 1em;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  vertical-align: middle;
  margin-right: 0.5em;
}

.login-brand {
  animation: brand-enter 0.5s ease-out 0.15s both;
}

.login-env-badge {
  animation: content-enter 0.35s ease-out 0.2s both;
}

.login-subtitle {
  animation: content-enter 0.35s ease-out 0.25s both;
}

.LoginFormField:first-of-type {
  animation: content-enter 0.35s ease-out 0.3s both;
}

.LoginFormField:last-of-type {
  animation: content-enter 0.35s ease-out 0.35s both;
}

.form-signin .btn {
  animation: content-enter 0.35s ease-out 0.4s both;
}

.login-password-note {
  animation: content-enter 0.3s ease-out 0.45s both;
}

@media (max-width: 768px) {
  .form-signin {
    padding: clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 3vw, 1.5rem);
  }
}
@media (max-width: 480px) {
  body {
    padding: 0;
    align-items: flex-start;
    padding-top: 2.5rem;
    background-image: none;
  }
  .form-signin {
    padding: 1.75rem 1.25rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 0.625rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
  }
  .LoginArea form {
    padding: 0.75rem;
  }
  .LoginFormField {
    padding-bottom: 0.75rem;
  }
  .LoginFormField input {
    height: 2.75rem;
    font-size: 1rem;
  }
  .form-signin .btn {
    height: 2.75rem;
  }
  .login-env-badge {
    font-size: clamp(0.5625rem, 0.8vw, 0.625rem);
    padding: 0.1875rem 0.75rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
