/* Import attractive Google Font */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap");

/* Apply globally */
body,
input,
select,
textarea,
button,
label {
  font-family: "Poppins", sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow-x: hidden; /* prevent horizontal scrollbar */
}

body {
  font-family: "Poppins", sans-serif;
  background: #0b1220;
  color: #f2f5f9;
  line-height: 1.4;
  display: flex;
  justify-content: center;
  align-items: center;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 16px;
}

header h1 {
  margin: 8px 0 16px;
  text-align: center;
  font-size: 40px;
  cursor: pointer;
}

.form {
  background: #121a2a;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 12px;
}

.field {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 25px;
  opacity: 0.9;
  margin-bottom: 6px;
  font-weight: bold;
}

input,
select,
textarea {
  background: #0f1625;
  border: 1px solid #24314a;
  color: #e9eef7;
  padding: 10px 12px;
  border-radius: 10px;
  outline: none;
  font-size: 14px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #4b6bff;
}

.capture-section {
  margin-top: 5px;
}
.capture-section h2 {
  font-size: 20px;
}

.slot {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
}

.open-camera {
  margin: 10px;
}

.btn {
  background: #2a3a66;
  border: none;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px; /* ensure consistent font size */
  transition: 0.3s ease;
}
.btn:hover {
  filter: brightness(1.1);
}

.SubmitBtn {
  position: relative;
  top: 10px;
}
#submitBtn {
  margin: 10px;
  position: relative;
  bottom: 11px;
}

.camera-pane {
  margin-top: 10px;
  padding: 10px;
  background: #0f1625;
  border: 1px dashed #344467;
  border-radius: 12px;
  display: none;
}

.camera-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.preview {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.preview img {
  max-height: 50px;
  border-radius: 10px;
  border: 1px solid #2c3b5f;
}

.submit-wrap {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

footer {
  text-align: center;
  margin-top: 16px;
  opacity: 0.6;
}

/* ---------------- Organisation Login Page ---------------- */

.login-container {
  width: 800px;
  height: 600px;
  margin: 80px auto;
  padding: 24px;
  background: #121a2a;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  text-align: center;
}

.login-container h2 {
  margin-bottom: 20px;
  font-size: 26px;
  font-weight: 600;
  color: #f2f5f9;
}

.login-container form {
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-container input {
  background: #0f1625;
  border: 1px solid #24314a;
  color: #e9eef7;
  padding: 12px;
  border-radius: 10px;
  font-size: 25px;
  outline: none;
  transition: border 0.3s;
  text-align: center;
}

.login-container input:focus {
  border-color: #4b6bff;
  text-align: center;
}

.login-container button {
  background: #2a3a66;
  border: none;
  color: #fff;
  padding: 12px;
  border-radius: 10px;
  font-weight: 600;
  margin-top: 15px;
  cursor: pointer;
  font-size: 25px;
  transition: background 0.3s ease;
  text-align: center;
}

.login-container button:hover {
  filter: brightness(1.1);
}

#errorMsg {
  margin-top: 12px;
  font-size: 14px;
}

.header-flex {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 32px;
  margin-bottom: 10px;
}

.header-flex h2 {
  margin-top: 20px;
  font-size: 30px;
  font-weight: 600;
  color: #f2f5f9;
  text-align: center;
}

.img-logo {
  height: 80px;
  width: auto;
}

.img-logo img {
  height: 175%;
  object-fit: contain;
  width: auto;
}
/* ---------------- Responsive ---------------- */

@media (max-width: 1024px) {
  .row {
    grid-template-columns: 1fr; /* stack fields on medium screens */
  }
  .capture-section h2 {
    font-size: 18px;
  }
  .btn,
  .btn.submit {
    width: 100%;
    padding: 12px;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 12px;
  }
  header h1 {
    font-size: 24px;
  }
  input,
  select,
  textarea {
    font-size: 13px;
    padding: 8px 10px;
  }
  .capture-section h2 {
    font-size: 16px;
  }
  .preview img {
    max-height: 100px;
  }
}

@media (max-width: 600px) {
  body {
    overflow-x: hidden; /* ensure no horizontal scrollbar */
  }
  .form {
    padding: 12px;
    border-radius: 12px;
  }
  .btn,
  .btn.submit {
    font-size: 14px;
    padding: 10px;
  }
  .preview img {
    max-height: 80px;
  }
  header h1 {
    font-size: 22px;
  }
}
