body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #eef1f7;
}

/* HEADER */
.header {
  background: linear-gradient(to right, #1e3c72, #2a5298);
  color: white;
  padding: 15px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 20px;
  font-weight: bold;
}

.logoutBtn {
  background: white;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
}

/* NAV */
.navBar {
  background: #dce2f2;
  padding: 10px 25px;
}

.navBar button {
  margin-right: 10px;
  padding: 6px 14px;
  cursor: pointer;
}

/* CONTENT BOX */
.contentBox {
  background: white;
  margin: 25px;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

/* FORM GRID */
.formGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* 2 equal columns */
  gap: 20px;                        /* equal spacing */
}

/* EACH FIELD BLOCK */
.formGrid div {
  display: flex;
  flex-direction: column;
}

/* LABEL */
label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* INPUT STYLE */
input,
select {
  padding: 8px;
  border: 1px solid #cfd5e3;
  border-radius: 4px;
  background: #f9fbff;
}

/* + BUTTON ROW */
.row {
  display: flex;
  gap: 6px;
}

.row select {
  flex: 1;
}

.row button {
  width: 40px;
  border: 1px solid #cfd5e3;
  background: #e6ecf8;
  cursor: pointer;
}

/* SAVE BUTTON */
.saveBtn {
  margin-top: 25px;
  padding: 8px 18px;
  background: #2a5298;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .formGrid {
    grid-template-columns: 1fr;
  }
}

.reportFilters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ================= MOBILE OPTIMIZATION ================= */

/* Make content padding smaller on mobile */
@media (max-width: 768px) {

  .contentBox {
    margin: 12px;
    padding: 15px;
  }

  /* Stack header vertically */
  .header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* Nav buttons wrap */
  .navBar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .navBar button {
    flex: 1 1 auto;
    min-width: 100px;
  }

  /* Report filters single column */
  .reportFilters {
    grid-template-columns: 1fr;
  }

  /* Buttons full width */
  .saveBtn {
    width: 100%;
  }

  /* Make table scrollable */
  #reportTable {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }

  /* Signature canvas full width */
  #signaturePad {
    width: 100% !important;
    height: 120px !important;
  }
}

/* ================= TABLE IMPROVEMENT ================= */

#reportTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

#reportTable th,
#reportTable td {
  padding: 6px;
  text-align: left;
  border: 1px solid #ddd;
}

#reportTable th {
  background: #f0f4fb;
}

button {
  transition: 0.2s ease;
}

button:hover {
  opacity: 0.85;
}

input:focus,
select:focus {
  outline: none;
  border-color: #2a5298;
}

/* ===== LOGIN PAGE ===== */

.loginPage {
  margin: 0;
  height: 100vh;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #5f6dfc, #a55eea);
  display: flex;
  justify-content: center;
  align-items: center;
}

.loginBox {
  background: white;
  padding: 40px;
  border-radius: 15px;
  width: 350px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.loginBox h2 {
  margin-bottom: 5px;
  color: #ff6b6b;
  letter-spacing: 1px;
}

.subTitle {
  margin-bottom: 25px;
  color: #666;
  font-size: 14px;
}

.loginBox input {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border-radius: 25px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
}

.loginBox button {
  width: 100%;
  padding: 12px;
  border-radius: 25px;
  border: none;
  background: linear-gradient(to right, #ff6b6b, #ff9f43);
  color: white;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s;
}

.loginBox button:hover {
  opacity: 0.9;
}

/* Mobile Friendly */
@media (max-width: 480px) {
  .loginBox {
    width: 90%;
    padding: 30px;
  }
}