@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #181818;
  --bg-card: #1a1a1a;
  --bg-input: #121212;
  --accent: #a3e635;
  --accent-soft: rgba(163, 230, 53, 0.12);
  --text-primary: #ffffff;
  --text-secondary: #9a9a9a;
  --text-muted: #666666;
  --border: #2a2a2a;
  --border-light: #3a3a3a;
}

body {
  min-height: 100vh;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background:
    linear-gradient(180deg, rgba(163, 230, 53, 0.04), transparent 36%),
    var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  line-height: 1.6;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
  pointer-events: none;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(rgba(10, 10, 10, 0.5), rgba(10, 10, 10, 0.8)), url("/assets/bgadmin.png") center/cover no-repeat;
  opacity: 0.78;
  pointer-events: none;
}

.back-home {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(24, 24, 24, 0.78);
  backdrop-filter: blur(18px);
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}

.back-home:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
  transform: translateY(-1px);
}

.login-container {
  position: relative;
  z-index: 1;
  width: min(1120px, 100%);
  min-height: 680px;
  padding: 96px 24px 48px;
  display: grid;
  grid-template-columns: minmax(560px, 1.28fr) minmax(390px, .9fr);
  align-items: center;
  gap: 72px;
  animation: fadeInUp 0.55s ease;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 25px;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 28px;
}

.badge-dot,
.logo-dot,
.auto-save-dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 12px var(--accent);
}

.login-copy h1 {
  max-width: 650px;
  font-size: 56px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: 22px;
}

.login-copy h1 span {
  color: var(--accent);
}

.login-copy p {
  max-width: 560px;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.7;
}

.login-card {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.045) 42%, rgba(163, 230, 53, 0.08)),
    rgba(12, 12, 12, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  padding: 36px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    inset 0 -1px 0 rgba(255, 255, 255, 0.08),
    0 28px 90px rgba(0, 0, 0, 0.45),
    0 0 55px rgba(163, 230, 53, 0.08);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

.login-card::before {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: 17px;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(110deg, rgba(255, 255, 255, 0.13), transparent 38%);
  pointer-events: none;
}

.login-card::after {
  content: '';
  position: absolute;
  width: 180px;
  height: 180px;
  right: -80px;
  bottom: -80px;
  border-radius: 50%;
  background: rgba(163, 230, 53, 0.12);
  filter: blur(18px);
  pointer-events: none;
}

.login-card > * {
  position: relative;
  z-index: 1;
}

.logo-box {
  display: inline-flex;
  align-items: center;
  margin-bottom: 30px;
  width: 150px;
}

.login-logo {
  display: block;
  width: 100%;
  height: auto;
}

.login-title {
  font-size: 30px;
  line-height: 1.2;
  font-weight: 700;
  margin-bottom: 10px;
}

.admin-text {
  color: var(--accent);
}

.login-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 2px;
  margin-bottom: 26px;
}

.messages {
  margin-bottom: 18px;
}

.message {
  padding: 12px 14px;
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.13);
  color: #fecaca;
  font-size: 13px;
  backdrop-filter: blur(14px);
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 1.4px;
  font-weight: 600;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  transition: transform 0.2s;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  pointer-events: none;
}

.form-input {
  width: 100%;
  min-height: 52px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 15px 48px;
  color: var(--text-primary);
  outline: none;
  font-size: 14px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 24px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  background: rgba(255, 255, 255, 0.11);
  border-color: rgba(163, 230, 53, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 0 0 3px var(--accent-soft),
    0 14px 30px rgba(0, 0, 0, 0.18);
}

.toggle-password {
  position: absolute;
  right: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s;
}

.toggle-password:hover {
  color: var(--text-primary);
}

.btn-submit {
  width: auto;
  min-width: 220px;
  min-height: 54px;
  margin-top: 8px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #d7ff73, var(--accent) 58%, #77c91f);
  color: #000;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.58),
    0 14px 34px rgba(163, 230, 53, 0.22);
  transition: box-shadow 0.2s, transform 0.2s, filter 0.2s;
}

.btn-submit:hover {
  filter: brightness(1.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.68),
    0 18px 42px rgba(163, 230, 53, 0.3);
  transform: translateY(-2px);
}

.btn-submit span {
  transition: transform 0.2s;
}

.btn-submit:hover span {
  transform: translateX(3px);
}

.transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.transition-overlay.active {
  opacity: 1;
  visibility: visible;
}

.loader {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@media (max-width: 900px) {
  body {
    align-items: flex-start;
  }

  .login-container {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: 0;
    padding-top: 92px;
  }

  .login-copy {
    text-align: center;
  }

  .login-copy h1,
  .login-copy p,
  .login-highlights {
    margin-left: auto;
    margin-right: auto;
  }

  .login-card {
    max-width: 460px;
    width: 100%;
    margin: 0 auto;
    min-height: unset;
  }

}

@media (max-width: 560px) {
  .back-home {
    top: 14px;
    left: 14px;
    padding: 8px 12px;
    font-size: 13px;
  }

  .login-container {
    padding: 78px 16px 32px;
  }

  .login-copy h1 {
    font-size: 38px;
  }

  .login-copy p {
    font-size: 15px;
  }

  .login-highlights {
    grid-template-columns: 1fr;
    margin-top: 28px;
  }

  .login-highlights div {
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 18px;
  }

  .login-highlights div:last-child {
    border-bottom: 0;
  }

  .login-card {
    padding: 28px 20px;
  }

  .login-title {
    font-size: 25px;
  }

}
