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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.signin-container {
  background: #ffffff;
  padding: 2rem;
  border-radius: 8px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
  position: relative;
}

.signin-container h1 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.subtitle {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1.5rem;
}

.oauth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid #ddd;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  background-color: #fff;
}

.oauth-btn:hover {
  background-color: #f0f0f0;
}

.no-underline {
  text-decoration: none;
}

.oauth-btn img {
  width: 20px;
  height: 20px;
}

.google-btn {
  border-color: #ccc;
}

.apple-btn {
  border-color: #ccc;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  position: relative;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #ddd;
  margin: 0 0.5rem;
}

.divider span {
  font-size: 0.8rem;
  color: #666;
}

.email-section input {
  width: 100%;
  padding: 0.7rem;
  margin-bottom: 0rem;
  font-size: 0.9rem;
  border: 1px solid #ddd;
  border-radius: 4px;
}

.email-btn {
  width: 100%;
  padding: 0.8rem;
  font-size: 0.95rem;
  font-weight: 500;
  background-color: #EE7202;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.email-btn:hover {
  background-color: #c95f02;
}


.note {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: #666;
  line-height: 1.4;
}

@media (max-width: 480px) {
  .signin-container {
    padding: 1.5rem 1rem;
  }

  .oauth-btn {
    font-size: 0.9rem;
    padding: 0.7rem;
  }
}

.mechanicum-logo img {
  width: 92px;
  height: 92px;
  object-fit: cover;
}

.email-section input:focus {
  outline: 2px solid #EE7202;
}

.email-btn:focus {
  outline: 2px solid #EE7202;
}

.lang-switcher {
  position: absolute;
  top: 32px;
  right: 32px;
  background-color: #f7f7f7;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.85rem;
  color: #333;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.lang-switcher select {
  border: none;
  background: transparent;
  outline: none;
  font-size: inherit;
  color: inherit;
  cursor: pointer;
  padding: 2px 0;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.lang-switcher:hover {
  background-color: #eaeaea;
}

.forgot-password {
  padding: 10px;
  font-size: 13px;
}

.menu {
  margin: 1.5rem 0;
  text-align: center;
}

.menu ul {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;            
  max-width: 400px; 
  align-items: stretch;
}

.menu ul li {
  display: flex; 
  margin: 0; 
}

.menu ul li a {
  display: flex;               
  flex: 1;                     
  align-items: center;        
  justify-content: center;     
  background-color: #EE7202;  
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 1rem;
  border-radius: 4px;
  transition: background-color 0.3s ease, transform 0.3s ease;
  text-align: center;
}

.menu ul li a:hover {
  background-color: #d85e00;
  transform: translateY(-2px);
}

label[for="id_email"] {
  display: block;
  text-align: left;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

#validationMessages p {
  background-color: #ffe6e6;
  border: 1px solid #cc0000;
  color: #cc0000;
  padding: 8px;
  margin-bottom: 6px;
  margin-top: 6px;
  border-radius: 4px;
  font-size: 0.9rem;
}

#qrcode {
  width: 256px;
  height: 256px;
  margin: 0 auto;
}

.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 20px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #ccc;
}
.divider:not(:empty)::before {
  margin-right: 0.5em;
}
.divider:not(:empty)::after {
  margin-left: 0.5em;
}
.divider span {
  font-size: 14px;
  color: #666;
}

.manual-link-container {
  margin: 20px auto;
  max-width: 500px;
}
.manual-link-wrapper {
  display: flex;
  align-items: center;
  border: 1px solid #ccc;
  border-radius: 25px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.manual-link-input {
  flex-grow: 1;
  border: none;
  padding: 12px 15px;
  font-size: 16px;
  outline: none;
  font-family: inherit;
  color: #333;
}
.copy-button {
  background: #f0f0f0;
  border: none;
  padding: 12px 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.copy-button img {
  width: 16px !important;
  height: 16px !important;
}

.problem-login {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
}

.password-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.password-section input {
  width: 100%;
  padding: 0.7rem;
  margin-bottom: 0.8rem;
  font-size: 0.9rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.2s;
}

.password-section input:focus {
  border-color: #EE7202;
  outline: none;
}

.oauth-buttons {
  display: flex;
  flex-direction: column;
  /* gap: 0.5rem; */
  margin-top: 0.5rem;
}

.authorize-btn {
  background-color: #EE7202;
  color: white;
}

.authorize-btn:hover {
  background-color: #c95f02;
}

.cancel-btn {
  background-color: #ddd;
  color: #333;
}

.cancel-btn:hover {
  background-color: #bbb;
}

input[type="submit"]:not([class]),
input[type="button"]:not([class]),
button[type="submit"]:not([class]),
button:not([class]) {
  background-color: #EE7202;
  color: white;
  font-weight: 500;
  padding: 0.8rem 1.2rem;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.2s;
  margin: 6px 6px 12px 0;
  display: inline-block;
  width: auto;
}

input[type="submit"]:not([class]):hover,
input[type="button"]:not([class]):hover,
button[type="submit"]:not([class]):hover,
button:not([class]):hover {
  background-color: #c95f02;
}

input[type="submit"]:not([class]):focus,
input[type="button"]:not([class]):focus,
button[type="submit"]:not([class]):focus,
button:not([class]):focus {
  outline: 2px solid #EE7202;
}

input:not([class]),
textarea:not([class]),
select:not([class]) {
  width: 100%;
  max-width: 100%;
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
  transition: border-color 0.2s, box-shadow 0.2s;
  margin-bottom: 0.4rem;
  box-shadow: none;
}

input:not([class]):focus,
textarea:not([class]):focus,
select:not([class]):focus {
  border-color: #EE7202;
  box-shadow: 0 0 0 2px rgba(238, 114, 2, 0.2);
  outline: none;
}

.signin-container h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #333;
}

.action-btn {
  display: block;
  width: 100%;
  padding: 0.8rem;
  font-size: 0.95rem;
  font-weight: 500;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
  margin-bottom: 1rem;
  text-align: center;
  text-decoration: none;
}

.delete-btn {
  background-color: #dc3545;
  color: white;
}

.delete-btn:hover {
  background-color: #b02a37;
}