/* Reset / Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Arial, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: linear-gradient(135deg, #e6f4ea, #c8e6c9);
  color: #333;
}

/* Card container */
main {
  background: #fff;
  padding: 2rem 2.5rem;
  border-radius: 1.25rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  width: 100%;
  max-width: 400px;
}

/* Title */
h1 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.6rem;
  font-weight: 600;
  color: #2e7d32; /* dark green */
}

/* Feedback messages */
div[th\\:if] {
  margin-bottom: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

div[th\\:if='${param.error}'] {
  background: #ffebee;
  color: #c62828;
}

div[th\\:if='${param.logout}'] {
  background: #e8f5e9;
  color: #2e7d32;
}

/* Form */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Labels */
label {
  font-size: 0.9rem;
  font-weight: 500;
  color: #2e7d32;
  display: flex;
  flex-direction: column;
}

/* Inputs */
input[type="text"],
input[type="password"],
input[type="hidden"] {
  padding: 0.65rem 0.8rem;
  border: 1px solid #a5d6a7;
  border-radius: 0.6rem;
  font-size: 1rem;
  transition: border 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border: 1px solid #388e3c;
  box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.25);
  outline: none;
}

/* Button */
button {
  background: #43a047;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem;
  border: none;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

button:hover {
  background: #388e3c;
}

button:active {
  transform: scale(0.97);
}