/* === Login (clean, fixed position below header) === */

.login-panel {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5rem; /* space below menu */
  padding-bottom: 4rem;
  background: var(--bg);
  color: var(--fg);
  min-height: 80vh;
}

/* === Login box === */
.login-card {
  background: var(--card-bg);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  padding: 2rem;
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.login-card h1 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.6rem;
  color: var(--fg);
}

/* === Form fields === */
.form-field {
  position: relative;
  margin-bottom: 1.1rem;
  text-align: left;
}

.form-field label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--fg);
}

.form-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem 0.55rem 2.4rem; /* space for icon */
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--data-bg);
  color: var(--fg);
  font-size: 0.95rem;
  transition: border var(--transition), background var(--transition);
  line-height: 1.4;
}

.form-field input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card-bg);
}

/* === Icons inside input === */
.form-field .icon {
  position: absolute;
  margin-top: 0.75rem;
  right: 0.75rem;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
}

.form-field input {
  padding-right: 2.4rem;
  padding-left: 0.75rem;
}

.form-field .icon svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
  display: block;
}

/* === Honeypot === */
.honeypot {
  display: none !important;
  visibility: hidden;
  position: absolute;
  left: -9999px;
}

/* === Login Error Message === */
.alert-error {
  background: #fee;
  border: 1px solid #fcc;
  border-left: 4px solid #e33;
  color: #c33;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

@media (prefers-color-scheme: dark) {
  .alert-error {
    background: #2d1a1a;
    border-color: #5a2222;
    border-left-color: #cc4444;
    color: #ff6b6b;
  }
}

/* === Submit button === */
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.6rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
  margin-top: 0.6rem;
}

button[type="submit"]:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

button[type="submit"]:active {
  transform: translateY(0);
}

button svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

/* === Error message === */
.alert-error {
  background: #fdecea;
  color: #b71c1c;
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1.25rem;
  border: 1px solid #f5c6cb;
}

/* === Dark mode === */
@media (prefers-color-scheme: dark) {
  .login-card {
    border-color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  }

  .form-field input {
    background: var(--data-bg);
    border-color: #444;
  }

  .alert-error {
    background: #3c1a1a;
    border-color: #552020;
    color: #ffbaba;
  }
}

