/* ===== Root / Tokens ===================================================== */
:root {
  --bg-image: url('../../../img/demo-map.jpg'); /* reuse your map background */
  --color-bg: rgba(17, 16, 17, 0.88);
  --color-bg-soft: rgba(255, 255, 255, 0.04);
  --color-border: rgba(255, 255, 255, 0.08);
  --color-border-soft: rgba(255, 255, 255, 0.06);
  --color-text: #fff;
  --color-text-dim: #bdbdbd;
  --color-accent: #2783c4;    /* matches your blue focus ring */
  --color-success: #27c46a;   /* matches your green */
  --color-error: #e53935;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-strong: 0 10px 30px rgba(0, 0, 0, 0.6);
  --transition: 180ms;
  --font: 'Poppins', Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--color-text);
  font-family: var(--font);
  background: #000;
}

/* ===== Background ======================================================== */
.app-bg {
  position: fixed;
  inset: 0;
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  filter: grayscale(0.3) brightness(0.35);
  z-index: -2;
}

.app-overlay {
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.7) 100%);
  z-index: -1;
}

/* ===== Layout ============================================================ */
.app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}

.login {
  width: 100%;
  max-width: 420px;
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 28px 26px 22px;
  animation: fadeIn var(--transition) ease-out both;
}

/* ===== Header / Brand ==================================================== */
.login__brand {
  text-align: center;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login__logo {
  width: 120px;
  margin-bottom: 16px;
}

.login__brand-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.08);
  margin-bottom: 10px;
}
.login__brand-icon i {
  font-size: 20px;
  color: #fff;
}

.login__title {
  margin: 0;
  font-weight: 600;
  font-size: 20px;
}

.login__subtitle {
  color: var(--color-text-dim);
  font-size: 14px;
}

/* ===== Secure Chip ======================================================= */
.login__secure-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.8px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 153, 221, 0.14); /* mid-level blue background */
  color: #00aaff; /* vivid but not extreme */
  border: 1px solid rgba(0, 153, 221, 0.28); /* balanced border */
  margin: 0 auto 18px;
  justify-content: center;
  font-weight: 500;
}

/* ===== Form ============================================================== */
.login__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.form-field {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--color-border-soft);
  border-radius: var(--radius-sm);
  height: 44px;
  padding: 0;
}

.form-field:focus-within {
  border-color: var(--color-accent);
  background: rgba(39, 131, 196, 0.07);
}

.form-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  flex-shrink: 0;
  color: #ffffffc6;
  font-size: 16px;
}

.form-input {
  flex: 1;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  padding: 0 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--color-text);
}

.form-input::placeholder {
  color: var(--color-text-dim);
}

/* Password toggle stays visually consistent */
.password-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--color-text-dim);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}
.password-toggle:hover {
  background: rgba(255,255,255,0.06);
  color: #fff;
}

.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.form-row--between {
  justify-content: space-between;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-dim);
  cursor: pointer;
}
.checkbox input {
  width: 16px;
  height: 16px;
  accent-color: var(--color-accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  margin-top: 20px;
}
.btn--primary {
  background: #00aaff; /* vivid blue */
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 153, 221, 0.2); /* soft blue glow */
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 153, 221, 0.3); /* slightly stronger on hover */
}
.btn--full {
  width: 100%;
}

.link {
  text-decoration: none;
  color: var(--color-accent);
  font-size: 13px;
}
.link--muted {
  color: var(--color-text-dim);
}
.link--muted:hover {
  color: #fff;
}

.form-error {
  min-height: 16px;
  display: block;
  color: var(--color-error);
  font-size: 12px;
}

.form-status {
  margin-top: 8px;
  min-height: 18px;
  font-size: 13px;
}

.form-status--ok {
  color: var(--color-success);
}
.form-status--err {
  color: var(--color-error);
}

/* ===== Meta ============================================================== */
.login__meta {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  color: var(--color-text-dim);
  font-size: 12.5px;
}

.meta-list i {
  background: rgba(255, 255, 255, 0.06); /* soft grey background */
  padding: 4px 6px;
  border-radius: 6px;
  margin-right: 8px;
  font-size: 12px;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ccc; /* dimmed icon color to match text-dim */
}

.meta-list {
  list-style: none;
  margin: 0 0 8px 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.meta-list a {
  color: inherit;
  text-decoration: none;
}
.meta-list a:hover {
  text-decoration: underline;
}

/* ===== Animations / Reduce motion ======================================= */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .login {
    animation: none;
  }
}

/* ===== Small screens tweaks ============================================ */
@media (max-width: 380px) {
  .login {
    padding: 22px 18px 18px;
  }
}
