/* assets/css/login.css */
:root {
  --bg: #0f1115;
  --bg-deep: #0b0d10;
  --panel: rgba(23, 26, 33, 0.88);
  --card: rgba(18, 21, 27, 0.94);
  --card-soft: rgba(28, 32, 40, 0.92);
  --text: #f5f7fa;
  --muted: #9aa4b2;
  --muted-strong: #c7d0dc;
  --accent: #b6ff00;
  --accent-dark: #7fc900;
  --accent-soft: rgba(182, 255, 0, 0.14);
  --accent-border: rgba(182, 255, 0, 0.28);
  --border: rgba(245, 247, 250, 0.10);
  --field: #171a21;
  --field-border: rgba(154, 164, 178, 0.18);
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.44);
  --shadow-card: 0 22px 70px rgba(0, 0, 0, 0.38);
  --font-main: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif;
}

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

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: var(--font-main);
  background:
    radial-gradient(circle at 27% 24%, rgba(182, 255, 0, 0.34), transparent 25%),
    radial-gradient(circle at 72% 76%, rgba(127, 201, 0, 0.12), transparent 28%),
    linear-gradient(135deg, #151a15 0%, var(--bg) 48%, #090a0d 100%);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.035), transparent 12%, transparent 88%, rgba(255, 255, 255, 0.025)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 42px);
  opacity: 0.26;
}

.login-page {
  position: relative;
  width: min(1380px, calc(100vw - 64px));
  min-height: 660px;
  border: 1px solid var(--border);
  border-radius: 30px;
  background:
    linear-gradient(145deg, rgba(23, 26, 33, 0.92), rgba(11, 13, 16, 0.96)),
    var(--panel);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 470px 1fr;
  align-items: center;
  gap: 40px;
  padding: 88px 94px;
  overflow: hidden;
}

.login-page::before {
  content: "";
  position: absolute;
  width: 740px;
  height: 740px;
  left: -380px;
  bottom: -240px;
  background: radial-gradient(circle, rgba(182, 255, 0, 0.23), rgba(127, 201, 0, 0.06) 48%, transparent 70%);
  border-radius: 50%;
  filter: blur(2px);
}

.login-page::after {
  content: "";
  position: absolute;
  width: 680px;
  height: 680px;
  right: -260px;
  top: -260px;
  background: radial-gradient(circle, rgba(182, 255, 0, 0.16), transparent 68%);
  border-radius: 50%;
  filter: blur(10px);
}

.login-card {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 460px;
  min-height: 500px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(28, 32, 40, 0.96), var(--card));
  box-shadow: var(--shadow-card);
  padding: 52px 58px;
  backdrop-filter: blur(18px);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(182, 255, 0, 0.12), transparent 36%);
}

.brand {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

h1 {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 44px;
  line-height: 1;
  letter-spacing: -1.5px;
  margin-bottom: 40px;
}

form {
  position: relative;
  z-index: 1;
}

.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.input-wrap {
  position: relative;
}

input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--field-border);
  border-radius: 12px;
  background: var(--field);
  padding: 0 16px;
  color: var(--text);
  outline: none;
  font-size: 14px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.input-wrap input {
  padding-right: 70px;
}

input::placeholder {
  color: #697383;
}

input:hover {
  border-color: rgba(182, 255, 0, 0.20);
}

input:focus {
  border-color: var(--accent);
  box-shadow:
    0 0 0 3px rgba(182, 255, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  min-width: 42px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-50%);
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  padding: 0 8px;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.password-toggle__text {
  display: block;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-border);
  outline: none;
}

.submit-button {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: var(--bg-deep);
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  margin-top: 48px;
  box-shadow: 0 16px 34px rgba(182, 255, 0, 0.18);
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
}

.submit-button:hover,
.submit-button:focus-visible {
  filter: brightness(1.04);
  box-shadow: 0 18px 42px rgba(182, 255, 0, 0.25);
  outline: none;
}

.submit-button:active {
  transform: translateY(1px);
}

.illustration {
  position: relative;
  z-index: 2;
  height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-scene {
  position: relative;
  width: min(720px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-scene::before {
  content: "";
  position: absolute;
  width: 82%;
  height: 58%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(182, 255, 0, 0.38), rgba(182, 255, 0, 0.09) 48%, transparent 72%);
  filter: blur(18px);
}

.login-logo {
  position: relative;
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  filter: drop-shadow(0 26px 46px rgba(0, 0, 0, 0.48));
}

@media (max-width: 1024px) {
  body {
    overflow: auto;
  }

  .login-page {
    grid-template-columns: 1fr;
    width: min(720px, calc(100vw - 32px));
    min-height: auto;
    gap: 28px;
    padding: 48px 24px;
    margin: 32px 0;
  }

  .login-card {
    margin: 0 auto;
  }

  .illustration {
    min-height: 320px;
    height: auto;
    margin-top: 10px;
  }

  .logo-scene {
    width: min(560px, 100%);
  }
}

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

  .login-page {
    width: min(100% - 24px, 520px);
    padding: 22px 12px 28px;
    margin: 12px 0;
    border-radius: 22px;
  }

  .login-card {
    min-height: auto;
    padding: 40px 28px;
    border-radius: 22px;
  }

  h1 {
    font-size: 36px;
  }

  .illustration {
    min-height: 220px;
  }

  .logo-scene {
    width: 100%;
  }
}

.helper-text {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  margin-top: 8px;
}

.two-factor-card {
  min-height: 560px;
}

.two-factor-instructions {
  position: relative;
  z-index: 1;
  color: var(--muted-strong);
  font-size: 14px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.two-factor-instructions p + p {
  margin-top: 10px;
}

.secret-box {
  position: relative;
  z-index: 1;
  border: 1px solid var(--accent-border);
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.45;
  overflow-wrap: anywhere;
  padding: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.otpauth-details {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  margin-bottom: 18px;
}

.otpauth-details summary {
  color: var(--muted-strong);
  cursor: pointer;
  font-weight: 700;
  margin-bottom: 8px;
}

.otpauth-details p {
  border: 1px solid var(--field-border);
  border-radius: 12px;
  background: var(--field);
  padding: 12px;
  overflow-wrap: anywhere;
}
