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

html {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  width: 100%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-size: cover;
  background-position: center;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #000;
  line-height: 1.6;
}

header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0;
  background: none;
  width: 100%;
  max-width: 100%;
  margin-bottom: 1rem;
}

.logo {
  height: 200px;
  max-width: 100%;
}

.title {
  margin-top: 2rem;
  font-size: 2rem;
  color: white;
  text-shadow: 1px 1px 2px black;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  background-color: rgba(0, 0, 0, 0.4);
  max-width: 90%;
  text-align: center;
}

main {
  width: 100%;
  max-width: 1000px;
  margin-top: 2rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  box-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
  padding: 2rem;
  backdrop-filter: blur(5px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.menu-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
  margin-bottom: 10px;
}

.menu-buttons a {
  flex: 0 1 180px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 15px 20px;
  background-color: #e53935;
  color: white;
  text-decoration: none;
  border-radius: 0.75rem;
  font-size: 1.1em;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.50);
  transition: background-color 0.2s ease, transform 0.2s ease;
  min-height: 80px;
}

.menu-buttons a:hover {
  background-color: #b71c1c;
  transform: scale(1.03);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.logout-button {
  margin-top: 40px;
}

.logout-button a {
  color: #000;
  text-decoration: none;
  font-weight: bold;
  font-size: 1em;
  transition: color 0.3s ease;
}

.logout-button a:hover {
  color: #f0f0f0;
  text-decoration: underline;
}

.container,
.login-container {
  padding: 30px;
  border-radius: 8px;
  width: 100%;
  max-width: 450px;
  text-align: center;
  box-sizing: border-box;
}

body > .login-container {
  max-width: 450px;
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  color: #000;
}

.container h2,
.login-container h2 {
  color: #2c3e50;
  margin-bottom: 25px;
  font-size: 2em;
  font-weight: 600;
}

.welcome-message {
  font-size: 1.1em;
  color: #555;
  margin-bottom: 30px;
}

.error {
  color: #d9534f;
  background-color: #f2dede;
  border: 1px solid #ebccd1;
  padding: 10px 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  font-weight: bold;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

label {
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: bold;
}

input[type="text"],
input[type="password"] {
  width: calc(100% - 20px);
  padding: 12px 10px;
  border: 1px solid #cccccc;
  border-radius: 5px;
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

button[type="submit"] {
  background-color: #007bff;
  color: white;
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  width: 100%;
  font-size: 1.1em;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

button[type="submit"]:hover {
  background-color: #0056b3;
  transform: translateY(-2px);
}

@media screen and (max-width: 768px) {
  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    justify-items: center;
  }

  .menu-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
  }

  .menu-buttons a {
    flex: 1 1 100%;
  }

  .container,
  .login-container {
    padding: 20px;
    margin: 20px;
  }

  h2 {
    font-size: 1.8em;
  }

  main {
    padding: 1rem;
    margin: 1rem;
    width: 95%;
  }
}

body.login-page {
  background-image: url('/assets/background-login.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

body.dashboard-bg {
  background-image: url('/assets/background.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  position: relative;
  z-index: 0;
}

body.dashboard-bg .overlay {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(2px);
  z-index: -1;
}
