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

:root {
  --bg-dark: #0a0b10;
  --card-bg: rgba(7, 10, 16, 0.82);
  --accent: #e10600;
  --accent-glow: rgba(225, 6, 0, 0.35);
  --text: #f4f4f6;
  --muted: #a2a6b3;
  --border: rgba(255, 255, 255, 0.16);
  --login-bg: none;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 20px 56px;
  background-color: var(--bg-dark);
  background-image: var(--login-bg);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: var(--text);
  font-family: 'Exo 2', 'Segoe UI', Tahoma, sans-serif;
  position: relative;
  isolation: isolate;
}

body::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(225, 6, 0, 0.25), transparent 55%),
              linear-gradient(120deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.2));
  z-index: -1;
}

.login-shell {
  width: min(92vw, 420px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 32px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(6px);
}

.brand {
  font-family: 'Rajdhani', 'Segoe UI', Tahoma, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

h1 {
  font-size: 28px;
  margin: 0 0 20px 0;
  font-weight: 700;
}

.flash {
  margin-bottom: 16px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.flash.error {
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
}

.flash.success {
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.login-form {
  display: grid;
  gap: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.03em;
}

.field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
}

.field input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  padding-right: 44px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.toggle-password svg {
  width: 18px;
  height: 18px;
}

.toggle-password[data-state='hidden'] .icon-eye-off {
  display: none;
}

.toggle-password[data-state='shown'] .icon-eye {
  display: none;
}

.btn-primary {
  margin-top: 4px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 0;
  background: linear-gradient(135deg, var(--accent), #7f0000);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 12px 30px var(--accent-glow);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.login-footer {
  position: absolute;
  bottom: 18px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  body {
    padding: 24px 16px 48px;
  }

  .login-card {
    padding: 28px 22px 24px;
  }

  h1 {
    font-size: 24px;
  }
}
