@font-face {
    font-family: 'MyCustomFont';
    src: url('fonts/MulatAddis-Regular.ttf') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
  font-family: MyCustomFont, sans-serif;
  background: linear-gradient(135deg, #fdfbfb, #ebedee);
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

header {
  background: linear-gradient(180deg, #b36805, #ed960c);
  min-height: 5cm;
  padding: 16px 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  color: #fff;
  font-size: 2em;
  font-weight: bold;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  gap: 16px 50px;
}

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

/* Contenedor principal */
.container {
    display: flex;
    gap: 20px;
    padding: 20px;
    margin: 20px;
}

/* Botones a la izquierda */
.button-container {
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.button-container button {
    padding: 12px;
    border: none;
    border-radius: 4px;
    background: #2ecc71;
    color: #fff;
    font-size: 1em;
    cursor: pointer;
}

.button-container button:hover {
    background: #27ae60;
}

.content-container {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.form-content h1,
.form-content h2 {
    text-align: center;
    margin-bottom: 15px;
}

.form-content form {
    padding: 20px;
    align-items: center;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    width: 100%;
    column-gap: 15px;
    align-items: center;
    justify-content: space-between;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 50%;
    padding: 10px;
    border: 2px solid #cb582e;
    border-radius: 10px;
    font-size: 1em;
    height: 40px;
}

.form-group select {
    width: 50%;
    padding: 10px;
    border: 2px solid #cb582e;
    border-radius: 10px;
    font-size: 0.9em;
    height: 40px;
}

#button,
.form-content button {
    background: #FF7F50;
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 1em;
    border-radius: 10px;
    cursor: pointer;
    display: block;
    margin: 20px auto;
}

.form-content button:hover {
    background: #e67e22;
}

.link {
    color: black;
    border: none;
    border-radius: 20px;
    padding: 10px;
}

.current {
    border: black 2px solid;
}

.link:hover {
    background-color: #ed960c;
    color: white;
}

.search-content {
    align-content: center;
    justify-content: center;
    display: flex;
    margin: 50px;
}

footer {
    background: #ecf0f1;
    text-align: center;
    padding: 15px;
    margin-top: 30px;
    font-size: 0.9em;
    color: #555;
}

.buscar {
    padding: 10px;
    border-radius: 10px;
    background-color: #FF7F50;
    color: white;
    border: none;
    cursor: pointer;
}

.buscar:hover {
    background: #e67e22;
}

.buscador {
    width: 300px;
    height: 30px;
    border-radius: 5px;
    padding: 10px;
    border: 2px solid #cb582e;
}

.forma {
    display: flex;
    justify-content: center;
    column-gap: 20px;
    align-items: center;
    margin: 20px;
}

.image {
    width: 60%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 20px;
}

.formulario-content {
    display: flex;
    width: 100%;
    justify-content: space-evenly;
}

.form-elements {
    width: 100%;
}

/* Login page */
.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 5cm - 80px);
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.login-card h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

.login-field {
  margin-bottom: 16px;
}

.login-field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #555;
}

.login-field input {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #cb582e;
  border-radius: 10px;
  font-size: 1em;
  height: 42px;
}

.login-card button {
  width: 100%;
  background: #FF7F50;
  color: #fff;
  border: none;
  padding: 12px;
  font-size: 1em;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 8px;
}

.login-card button:hover {
  background: #e67e22;
}

.login-card button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.login-error {
  background: #fdecea;
  color: #b71c1c;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 16px;
  text-align: center;
  font-size: 0.95em;
}

.logout-btn {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 2px solid #fff;
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

#qrcode {
  width: 300px;
  height: 300px;
  max-width: 100%;
  object-fit: contain;
}

footer {
  margin-top: auto;
}

/* Tablet & mobile responsiveness */
@media (max-width: 900px) {
  .formulario-content {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .image {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 640px) {
  header {
    min-height: auto;
    padding: 16px;
    font-size: 1.15em;
    gap: 10px 16px;
    text-align: center;
    flex-direction: column;
  }

  header h1 {
    font-size: 1.4em;
    line-height: 1.2;
  }

  .header-logo {
    width: 120px;
  }

  .container {
    margin: 10px;
    padding: 0;
    gap: 12px;
  }

  .content-container {
    padding: 16px;
    width: 100%;
  }

  .search-content {
    margin: 8px 0 24px;
  }

  .content2 {
    width: 100%;
  }

  .forma {
    margin: 10px 0;
    gap: 10px;
    flex-direction: column;
    align-items: stretch;
  }

  .subTitle {
    text-align: center;
  }

  .buscador {
    width: 100%;
    height: 44px;
    font-size: 16px;
  }

  .buscar {
    width: 100%;
    height: 44px;
    font-size: 16px;
  }

  .form-content h1 {
    font-size: 1.45em;
  }

  .form-content form {
    padding: 8px 0;
  }

  .form-group {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-bottom: 14px;
  }

  .form-group label {
    margin-bottom: 0;
    font-size: 0.95em;
  }

  .form-group input,
  .form-group select {
    width: 100%;
    height: 44px;
    font-size: 16px;
  }

  #qrcode {
    width: min(260px, 100%);
    height: auto;
    aspect-ratio: 1 / 1;
  }

  #button,
  .form-content button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
  }

  .login-wrapper {
    min-height: auto;
    padding: 24px 14px;
  }

  .login-card {
    padding: 24px 18px;
  }

  .login-field input {
    height: 44px;
    font-size: 16px;
  }

  .login-card button {
    padding: 14px;
    font-size: 16px;
  }
}