@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Sora:wght@300;400;500;600;700&display=swap');

:root {
  --as-ink: #152238;
  --as-navy: #243b6b;
  --as-sky: #4a6fa5;
  --as-mist: #e8eef8;
  --as-paper: #f5f7fb;
  --as-copper: #c87a3a;
  --as-copper-deep: #9e5c24;
  --as-white: #ffffff;
  --as-muted: #5c6b82;
  --as-line: rgba(21, 34, 56, 0.12);
  --as-shadow: 0 28px 64px rgba(21, 34, 56, 0.28);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body.as-login-body {
  font-family: 'Sora', sans-serif;
  color: var(--as-ink);
  background: var(--as-ink);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Full-bleed scene — NOT admin split layout */
.as-login-scene {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(ellipse 70% 55% at 15% 20%, rgba(200, 122, 58, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 50% at 90% 80%, rgba(74, 111, 165, 0.45), transparent 50%),
    linear-gradient(160deg, #0f1a2e 0%, #1c335c 42%, #243b6b 70%, #152238 100%);
}

.as-login-scene::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 46px,
      rgba(255, 255, 255, 0.025) 46px,
      rgba(255, 255, 255, 0.025) 47px
    );
  pointer-events: none;
  animation: as-drift 22s linear infinite;
}

.as-login-scene::after {
  content: '';
  position: absolute;
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  border: 1px solid rgba(200, 122, 58, 0.28);
  border-radius: 42% 58% 48% 52%;
  top: 8%;
  right: 6%;
  animation: as-float 16s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes as-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-48px); }
}

@keyframes as-float {
  from { transform: rotate(-8deg) scale(1); }
  to { transform: rotate(6deg) scale(1.06); }
}

@keyframes as-rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.as-login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  padding: 2.25rem 2rem 2rem;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  box-shadow: var(--as-shadow);
  border: 1px solid rgba(255, 255, 255, 0.65);
  animation: as-rise 0.7s ease both;
}

.as-login-brand {
  text-align: center;
  margin-bottom: 1.75rem;
}

.as-login-brand .as-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 0.85rem;
  border-radius: 16px;
  background: linear-gradient(145deg, var(--as-copper), var(--as-copper-deep));
  color: #fff;
  font-family: 'Instrument Serif', serif;
  font-size: 1.55rem;
  font-weight: 400;
  box-shadow: 0 10px 24px rgba(200, 122, 58, 0.4);
}

.as-login-brand h1 {
  margin: 0 0 0.35rem;
  font-family: 'Instrument Serif', serif;
  font-size: clamp(1.85rem, 4vw, 2.35rem);
  /* font-weight: 400; */
  letter-spacing: 0.05em;
  color: var(--as-ink);
  line-height: 1.1;
}

.as-login-brand h1 em {
  font-style: italic;
  color: var(--as-copper);
}

.as-login-brand p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--as-muted);
  font-weight: 400;
  line-height: 1.5;
}

.as-login-pill {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--as-navy);
  background: var(--as-mist);
}

.as-field {
  margin-bottom: 1.1rem;
}

.as-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--as-navy);
}

.as-field .form-control,
.as-field input[type="text"],
.as-field input[type="password"] {
  width: 100%;
  height: 50px;
  border: 1px solid var(--as-line);
  border-radius: 12px;
  background: var(--as-paper);
  padding: 0 1rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.98rem;
  color: var(--as-ink);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.as-field .form-control:focus,
.as-field input:focus {
  border-color: var(--as-sky);
  background: var(--as-white);
  box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.18);
}

.as-pass-wrap {
  position: relative;
}

.as-pass-wrap .form-control {
  padding-right: 2.75rem !important;
}

.as-pass-toggle {
  position: absolute;
  top: 50%;
  right: 0.4rem;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--as-muted);
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
}

.as-pass-toggle:hover {
  color: var(--as-navy);
  background: rgba(36, 59, 107, 0.08);
}

.as-login-btn,
.as-login-btn.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 0.35rem;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--as-navy) 0%, var(--as-sky) 100%);
  color: #fff !important;
  font-family: 'Sora', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(36, 59, 107, 0.32);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.as-login-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.as-login-foot {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.86rem;
  color: var(--as-muted);
}

.as-login-foot a {
  color: var(--as-copper-deep);
  font-weight: 600;
  text-decoration: none;
}

.as-login-foot a:hover {
  text-decoration: underline;
}

.as-forgot-modal .modal-dialog {
  max-width: 420px;
  margin: 1.25rem auto;
}

.as-forgot-modal .modal-content {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--as-shadow);
  background: #fff;
}

.as-forgot-modal .modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  background: linear-gradient(135deg, var(--as-navy) 0%, #345890 100%);
  color: #fff;
  border: 0;
}

.as-forgot-modal .as-modal-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  min-width: 0;
}

.as-forgot-modal .as-modal-ico {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, var(--as-copper), var(--as-copper-deep));
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 8px 18px rgba(200, 122, 58, 0.35);
}

.as-forgot-modal .modal-title {
  margin: 0;
  font-family: 'Instrument Serif', serif;
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1.2;
  color: #fff;
}

.as-forgot-modal .as-modal-sub {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 400;
  line-height: 1.4;
}

.as-forgot-modal .as-modal-close {
  margin: 0;
  padding: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff;
  opacity: 0.85;
  text-shadow: none;
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  background: rgba(255, 255, 255, 0.1);
}

.as-forgot-modal .as-modal-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.as-forgot-modal .modal-body {
  padding: 1.35rem 1.25rem 0.5rem;
}

.as-forgot-modal .as-field {
  margin-bottom: 0.85rem;
}

.as-forgot-modal .as-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--as-navy);
}

.as-forgot-modal .as-field .form-control {
  width: 100%;
  height: 48px;
  border: 1px solid var(--as-line);
  border-radius: 12px;
  background: var(--as-paper);
  padding: 0 1rem;
  font-family: 'Sora', sans-serif;
  font-size: 0.95rem;
  color: var(--as-ink);
  outline: none;
  box-shadow: none;
}

.as-forgot-modal .as-field .form-control:focus {
  border-color: var(--as-sky);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(74, 111, 165, 0.16);
}

.as-forgot-modal .as-success-box {
  margin-top: 0.35rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: #e8f6ef;
  border: 1px solid rgba(46, 140, 98, 0.25);
  color: #1d6b45;
  font-size: 0.88rem;
  line-height: 1.45;
}

.as-forgot-modal .as-success-box strong {
  display: block;
  margin-bottom: 0.15rem;
  font-weight: 700;
}

.as-forgot-modal .modal-footer.as-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: flex-end;
  padding: 0.85rem 1.25rem 1.25rem;
  border: 0;
  background: transparent;
}

.as-forgot-modal .as-btn-submit,
.as-forgot-modal .as-btn-submit.btn {
  min-width: 110px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--as-navy) 0%, var(--as-sky) 100%);
  color: #fff !important;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 8px 18px rgba(36, 59, 107, 0.25);
}

.as-forgot-modal .as-btn-submit:hover {
  filter: brightness(1.05);
  color: #fff !important;
}

.as-forgot-modal .as-btn-close,
.as-forgot-modal .as-btn-close.btn {
  min-width: 96px;
  height: 42px;
  border: 1px solid var(--as-line);
  border-radius: 10px;
  background: #fff;
  color: var(--as-muted) !important;
  font-family: 'Sora', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: none;
}

.as-forgot-modal .as-btn-close:hover {
  background: var(--as-mist);
  color: var(--as-navy) !important;
}

@media (max-width: 480px) {
  .as-login-card {
    padding: 1.75rem 1.25rem;
  }

  .as-forgot-modal .modal-dialog {
    margin: 0.85rem;
  }

  .as-forgot-modal .modal-footer.as-modal-actions {
    flex-direction: column-reverse;
  }

  .as-forgot-modal .as-btn-submit,
  .as-forgot-modal .as-btn-close {
    width: 100%;
  }
}
