/* =============================================================
   login-shared.css — Unified login page styles for all sections
   ============================================================= */

/* ---------- Reset / Base ---------- */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui, -apple-system, Arial, sans-serif;
  background: #000000;
  color: #e9eef3;
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

/* ---------- Container ---------- */
.login-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  background: #caad68;
  border: 1px solid #183145;
  border-radius: 16px;
  padding: 32px 28px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  gap: 28px;
  width: 100%;
  max-width: 540px;
}

/* ---------- Form ---------- */
.login-form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.login-form h1 {
  margin: 0 0 20px 0;
  font-size: 1.35rem;
  text-align: center;
  color: #fff;
  line-height: 1.3;
}

/* ---------- Inputs ---------- */
input[type="text"],
input[type="password"] {
  padding: 12px 14px;
  margin: 6px 0;
  border-radius: 8px;
  border: 1px solid #2e4a5f;
  background: #ffffff;
  color: #000000;
  font-size: max(16px, 1rem);
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.2s;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
  color: #8eafc2;
  opacity: 1;
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: #878787;
  box-shadow: 0 0 0 2px rgba(91, 141, 106, 0.35);
}

/* ---------- Buttons ---------- */
button[type="submit"] {
  margin-top: 12px;
  padding: 13px 10px;
  border: none;
  border-radius: 8px;
  background: #878787;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  touch-action: manipulation;
  transition: background 0.2s;
}
.btn-login {
  margin-top: 12px;
  padding: 13px 10px;
  border: none;
  border-radius: 8px;
  background: #1f6f50;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  touch-action: manipulation;
  transition: background 0.2s;
}
button[type="submit"]:hover { background: #ababab; }
.btn-login:hover { background: #26845e; }
button[type="submit"]:active { background: #878787; }
.btn-login:active { background: #195c41; }

.home-btn {
  display: block;
  text-align: center;
  margin-top: 10px;
  padding: 12px 10px;
  border-radius: 8px;
  background: #878787;
  color: #fff;
  font-size: 1rem;
  font-weight: bold;
  text-decoration: none;
  touch-action: manipulation;
  transition: background 0.2s;
}

.home-btn:hover {
  background: #ababab;
}

.home-btn:active {
  background: #878787;
}

/* ---------- Error ---------- */
.error {
  color: #000000;
  text-align: center;
  margin-top: 10px;
  font-size: 0.92rem;
  line-height: 1.4;
  padding: 8px 10px;
  background: rgba(255, 80, 80, 0.08);
  border-radius: 6px;
}

/* ---------- Logo / Image ---------- */
.login-image {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.login-image img {
  max-width: 140px;
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* ---------- Mobile ---------- */
@media (max-width: 520px) {
  body {
    align-items: flex-start;
    padding: 20px 12px;
  }

  .login-container {
    flex-direction: column-reverse;   /* logo on top on mobile */
    text-align: center;
    padding: 24px 20px;
    gap: 18px;
    border-radius: 12px;
  }

  .login-form h1 {
    font-size: 1.2rem;
  }

  .login-image img {
    max-width: 100px;
  }

  input[type="text"],
  input[type="password"] {
    padding: 14px;                    /* bigger touch target */
  }

  button[type="submit"],
  .btn-login,
  .home-btn {
    padding: 15px 10px;               /* bigger touch target */
  }
}

@media (max-width: 360px) {
  .login-container {
    padding: 20px 14px;
  }
}
