:root {
  --blue-900: #29134F;
  --blue-700: #5327A1;
  --blue-500: #7C3AED;
  --cyan-300: #d8b4fe;
  --ink: #1e1030;
  --muted: #6b5f8b;
  --line: rgba(124, 58, 237, 0.18);
  --glass: rgba(255, 255, 255, 0.72);
  --shadow: 0 28px 80px rgba(90, 30, 180, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}
svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.fa-solid,
.fa-brands {
  display: inline-block;
  font-style: normal;
  line-height: 1;
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.auth-shell {
  position: relative;
  overflow-x: hidden;
  isolation: isolate;
}


.brand-header {
  position: fixed;
  top: 28px;
  left: 32px;
  z-index: 10;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--blue-900);
}

.brand-lockup.inverse {
  color: #fdf8ff;
}

.brand-mark,
.portal-icon,
.auth-card-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 16px;
  color: white;
  background: #fff;
  box-shadow: 0 16px 44px rgba(124, 58, 237, 0.28);
}

.portal-main,
.login-main {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 108px 24px 80px;
}

.portal-hero {
  width: min(1040px, 100%);
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
  color: var(--blue-900);
}

.hero-copy,
.auth-copy {
  margin: 20px auto 0;
  max-width: 650px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.7;
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 46px;
}

.portal-card,
.auth-card {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: linear-gradient(
    145deg,
    rgba(255, 255, 255, 0.84),
    rgba(255, 255, 255, 0.58)
  );
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.portal-card {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 184px;
  padding: 30px;
  border-radius: 30px;
  text-align: left;
  overflow: hidden;
  transition:
    transform 0.28s ease,
    box-shadow 0.28s ease,
    border-color 0.28s ease;
}

.portal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.62),
    rgba(255, 255, 255, 0),
    rgba(59, 26, 122, 0.42)
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.portal-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 34px 90px rgba(90, 30, 180, 0.26);
  border-color: rgba(192, 132, 252, 0.54);
}

.portal-icon {
  width: 70px;
  height: 70px;
  border-radius: 24px;
  color: #fff;
  font-size: 31px;
  background: linear-gradient(135deg, #7c3aed, #c084fc);
}

.admin-card .portal-icon,
.lock-icon {
  background: linear-gradient(135deg, #7c3aed, #c084fc);
}

.portal-card-content {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.portal-card strong {
  font-size: 24px;
}
.portal-card small {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.portal-arrow {
  margin-left: auto;
  color: var(--blue-700);
  font-size: 28px;
}

.auth-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  justify-content: center;
  gap: 18px;
  color: #7a6f96;
  font-size: 13px;
}

.login-shell::before {
  background:
    radial-gradient(
      circle at 14% 20%,
      rgba(196, 148, 255, 0.42),
      transparent 24rem
    ),
    radial-gradient(
      circle at 85% 78%,
      rgba(124, 58, 237, 0.24),
      transparent 24rem
    ),
    linear-gradient(135deg, #fdf8ff 0%, #f3e8ff 100%);
}

.admin-login::before {
  background:
    radial-gradient(
      circle at 18% 22%,
      rgba(91, 33, 182, 0.34),
      transparent 25rem
    ),
    radial-gradient(
      circle at 78% 72%,
      rgba(192, 132, 252, 0.16),
      transparent 24rem
    ),
    linear-gradient(135deg, #0e0520 0%, #1e0a3c 52%, #2e1065 100%);
}

.auth-card {
  width: min(470px, 100%);
  padding: 35px;
  border-radius: 32px;
}

.admin-auth-card {
  color: #fdf8ff;
  border-color: rgba(216, 180, 254, 0.22);
  background:#fff;
  box-shadow: 0 36px 100px rgba(0, 0, 0, 0.38);
}
.auth-card-icon {
  width: 62px;
  height: 62px;
  margin: 0 auto 15px;
  border-radius: 22px;
  color: white;
  font-size: 28px;
  background: linear-gradient(135deg, #7c3aed, #c084fc);
  box-shadow: 0 18px 44px rgba(124, 58, 237, 0.28);

  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card h1 {
  font-size: 34px;
  line-height: 1.08;
  margin-bottom: 34px;  
  text-align: center;
}
.auth-card .auth-copy {
  margin: 12px 0 26px;
  font-size: 15px;
}
.admin-auth-card .auth-copy,
.admin-auth-card .field-group span,
.admin-auth-card .check-wrap,
.admin-auth-card .text-link {
  color: #7c3aed;
}

.auth-form {
  display: grid;
  gap: 18px;
}
.field-group {
  display: grid;
  gap: 9px;
  font-size: 14px;
  font-weight: 700;
  color: #3b1a7a;
}

.field-group input {
  width: 100%;
  height: 56px;
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 18px;
  padding: 0 18px;
  color: var(--ink);
  border: 1px solid rgba(124, 58, 237, 0.14);
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  transition:
    border-color 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
}

.field-group input:focus {
  border-color: rgba(168, 85, 247, 0.74);
  box-shadow:
    0 0 0 5px rgba(124, 58, 237, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  background: #fff;
}

.required-mark {
  color: #ef4444;
  margin-left: 4px;
  font-weight: 900;
}

.auth-input-icon {
  position: relative;
  display: block;
}

.auth-input-icon > i {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(124, 58, 237, 0.62);
  z-index: 2;
  pointer-events: none;
}

.auth-input-icon input {
  padding-left: 48px;
}

.auth-input-icon .password-wrap input {
  padding-left: 48px;
  padding-right: 82px;
}

.password-wrap {
  position: relative;
  display: block;
}
.password-wrap input {
  padding-right: 82px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 0;
  border-radius: 13px;
  padding: 9px 12px;
  color: var(--blue-700);
  background: rgba(124, 58, 237, 0.1);
  font-weight: 800;
  cursor: pointer;
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 14px;
}

.check-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #5a4b7a;
}
.check-wrap input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue-700);
}
.text-link {
  color: var(--blue-700);
  font-weight: 600;
}

.auth-button {
  height: 58px;
  border: 0;
  border-radius: 18px;
  color: #fff;
  background:#7c3aed;
  box-shadow: 0 18px 38px rgba(124, 58, 237, 0.28);
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.auth-button:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 22px 46px rgba(124, 58, 237, 0.34);
}
.auth-button.is-loading {
  filter: saturate(0.7);
  pointer-events: none;
}
.admin-button {
  background:  #7c3aed;
}

.message-stack {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}
.message {
  margin: 0;
  padding: 13px 15px;
  border-radius: 16px;
  color: #3b1a7a;
  background: rgba(245, 235, 255, 0.78);
  border: 1px solid rgba(168, 85, 247, 0.18);
  font-size: 14px;
}
.message-error,
.message-danger {
  color: #7f1d1d;
  background: rgba(254, 226, 226, 0.86);
  border-color: rgba(248, 113, 113, 0.28);
}
.field-error {
  color: #b42318;
  font-weight: 700;
}

.floating-shape {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.62;
  animation: floatBlob 9s ease-in-out infinite;
}
.shape-one {
  width: 170px;
  height: 170px;
  top: 18%;
  left: 13%;
  background: rgba(192, 132, 252, 0.32);
}
.shape-two {
  width: 230px;
  height: 230px;
  right: 10%;
  bottom: 18%;
  background: rgba(124, 58, 237, 0.18);
  animation-delay: -3s;
}
.shape-three {
  width: 96px;
  height: 96px;
  left: 68%;
  top: 16%;
  background: rgba(255, 255, 255, 0.48);
  animation-delay: -5s;
}

.auth-fade-in {
  animation: fadeUp 0.62s ease both;
}

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

@keyframes floatBlob {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(18px, -22px, 0) scale(1.06);
  }
}

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

@media (max-width: 760px) {
  .brand-header {
    top: 20px;
    left: 20px;
  }
  .portal-main,
  .login-main {
    padding: 96px 16px 64px;
  }
  .portal-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 32px;
  }
  .portal-card {
    min-height: 154px;
    padding: 22px;
    border-radius: 24px;
  }
  .portal-icon {
    width: 58px;
    height: 58px;
    border-radius: 20px;
  }
  .portal-card strong {
    font-size: 21px;
  }
  .auth-card {
    padding: 28px;
    border-radius: 28px;
  }
  .auth-footer {
    position: static;
    flex-direction: column;
    align-items: center;
    padding: 0 16px 24px;
  }
  .form-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

.brand-mark img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.brand-name {
  display: block;
  color: #7c3aed;
  font-weight: 700;
  font-size: 25px;
  line-height: 1.2;
   letter-spacing: 2px;
}

.brand-sub {
  display: block;
  color: #7c3aed;
  font-size: 10.5px;
  margin-top: 2px;
  font-weight: 500;
}

.auth-footer a {
  color: #7c3aed;
    font-weight: 700;
    text-decoration: none;
    transition: 0.25s ease;
}

.footer-year {
  color: #7c3aed;
  font-size: 13px;
  font-weight: 1000;
  letter-spacing: 0.5px;
  opacity: 0.9;
}

.footer a:hover {
  text-decoration: none;
}

.text-link {
  text-decoration: none !important;
  color: #7c3aed !important;
  font-weight: 700 !important;
}

.text-link:hover {
  color: #6d28d9 !important;
  text-decoration: underline !important;
}
