/* ===== Base (Light) Theme ===== */
body {
  font-family: Arial, sans-serif;
  background: #f4f6f9;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

h2,
h1 {
  text-align: center;
  color: #3391d1;
}

.payroll-form {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
  color: #333;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 5px;
}

input,
select {
  width: 100%;
  padding: 12px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  box-sizing: border-box;
  transition: border-color 0.3s;
}

input:focus,
select:focus {
  border-color: #3498db;
  outline: none;
}

.button-group {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.button-group button {
  padding: 12px;
  width: 100%;
  background: #3498db;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

table button {
  width: fit-content;
  padding: 6px 12px;;
  font-size: 13px;
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

button:hover {
  background: #2980b9;
}

/* ABOUT US */
.info-section {
    padding: 40px 20px;
    font-family: Arial, Helvetica, sans-serif;

}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1100px;
    margin: auto;

}

.info-box {
    margin-top: 3rem;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform .3s ease, box-shadow .3s ease;
}

.info-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);

}

.info-box h3 {
    font-size: 1.2rem;
    color: #4f46e5;
    margin-bottom: 10px;
}

.info-box p {
    font-size: .95rem;
    color: #4b5563;
    line-height: 1.5;
    text-align: center;
}

@media (max-width: 900px) {
    .info-grid {
        grid-template-columns: 1fr;
    }
}

/* Timeline about section */
.timeline-section {
    /* background: #f9fafb; */
    padding: 40px 20px;
    /* max-width: 700px; */
    margin: auto;

}

.title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 10px;
}

.intro {
    color: #4b5563;
    font-size: 2rem;
    margin-bottom: 30px;
    line-height: 1.6;
}

.timeline {
    border-left: 3px solid #4f6fe5;
    padding-left: 20px;
}

.item {
    margin-bottom: 20px;
    position: relative;

}

.item::before {
    content: "";
    position: absolute;
    left: -27px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: #4f46e5;
    border-radius: 50%;
}

.year {
    font-size: .9rem;
    font-weight: bold;
    color: #4f6fe5;
}

.text {
    margin-top: 5px;
    color: #374151;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    font-style: normal;
    line-height: 1.5;

}

/* Table styling */
table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  margin-bottom: 50px;
  text-align: center;
}

table th {
  background: #3498db;
  color: #fff;
  padding: 10px;
}

table td {
  padding: 10px;
  border-bottom: 1px solid #ddd;
}

/* Smooth transition for rows */
table tbody tr {
  transition: all 0.3s ease;
  opacity: 1;
  transform: translateY(0);
}

table tbody tr.hide {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}

/* Zebra stripes */
table tr:nth-child(even) {
  background-color: #f9f9f9;
}

table tr:nth-child(odd) {
  background-color: #ffffff;
}

/* Buttons inside table */
button.edit {
  background: #f39c12;
}

button.edit:hover {
  background: #d78c0c;
}

button.delete {
  background: #e74c3c;
}

button.delete:hover {
  background: #c0392b;
}

button.print {
  background: #16a085;
}

button.print_all {
  background: #16a085;
}

button.print_all:hover {
  background: #09856c;
}

button.print:hover {
  background: #09856c;
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: inline-block;
  height: fit-content;
  padding: 10px 20px;
  color: white;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  font-weight: bold;
  line-height: 1.4;
  z-index: 9999;
  opacity: 1;
  transition: opacity 0.5s ease, transform 0.5s ease;
  word-wrap: break-word;
}

.search-wrapper {
    display: inline-flex;
    align-items: center;
    position: relative;
    width: 40px; /* initial size */
    transition: width 0.4s ease;
}

.search-wrapper input {
    width: 0;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #555;
    border-radius: 20px;
    outline: none;
    opacity: 0;
    transition: width 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
}

.search-wrapper.active {
    width: 300px; /* expanded width */
}

.search-wrapper.active input {
    width: 100%;
    opacity: 1;
    padding: 10px 40px 10px 10px;
}

.search-wrapper button {
    position: absolute;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    background: #3498db;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    z-index: 2;
}

/* remember me */
.remember-group {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.remember-label {
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    user-select: none;
}

.remember-label input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 0;
    height: 18px;
    width: 18px;
    background-color: #f1f1f1;
    border: 2px solid #3498db;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remember-label:hover .checkmark {
    background-color: #e3f2fd;
}

.remember-label input:checked ~ .checkmark {
    background-color: #3498db;
    border-color: #2980b9;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.remember-label input:checked ~ .checkmark:after {
    display: block;
}

.remember-label .checkmark:after {
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}



/* ===== Dark Mode ===== */
@media (prefers-color-scheme: dark) {
  body {
    background: #121212;
    color: #eee;
  }

  h2,
  h1 {
    text-align: center;
    color: #3391d1;
  }

  .payroll-form {
    background: #1e1e1e;
    color: #eee;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  }

  input,
  select {
    background: #2c2c2c;
    color: #eee;
    border: 1px solid #555;
  }

  button {
    background: #0077cc;
  }

  button:hover {
    background: #005fa3;
  }

  table {
    background: #1e1e1e;
    color: #eee;
    border: 1px solid #333;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  }

  table th {
    background: #0077cc;
  }

  table tr:nth-child(even) {
    background-color: #1c1c1c;
  }

  table tr:nth-child(odd) {
    background-color: #2c2c2c;
  }

  button.edit {
    background: #f39c12;
  }

  button.edit:hover {
    background: #d78c0c;
  }

  button.delete {
    background: #e74c3c;
  }

  button.delete:hover {
    background: #c0392b;
  }

  button.print,
  .print-all {
    background: #16a085;
  }

  button.print:hover {
    background: #09856c;
  }

  button.print-all:hover {
    background: #09856c;
  }

  button.print-all {
    background: #16a085;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
  }

  button.print-all:hover {
    background: #09856c;
  }

  .toast {
    color: #fff;
  }
}

/* ===== Print Page Styling ===== */
.print-page {
  font-family: Arial, sans-serif;
  margin: 40px auto;
  color: #333;
  max-width: 900px; /* make the page container wider */
}

.print-page .header {
  text-align: center;
  margin-bottom: 30px;
}

.print-page .header img {
  max-width: 100px;
  margin-bottom: 10px;
}

.print-page .header h1 {
  margin: 0;
  font-size: 28px;
  color: #2c3e50;
}

.print-page .header p {
  margin: 5px 0 0;
  font-size: 14px;
  color: #7f8c8d;
}

.print-page .card {
  width: 70%;
  margin: auto;
  padding: 25px 30px;
  border: 1px solid #ccc;
  border-radius: 12px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  background: #fff;
}

.print-page table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 15px;
  border: 1px solid #000;
  border-radius: 10px;
  overflow: hidden;
}

.print-page th,
.print-page td {
  padding: 12px 15px;
  border-bottom: 1px solid #ddd;
  text-align: left;
}

.print-page th {
  background-color: #3498db;
  color: white;
  font-weight: bold;
}

/* Rounded corners for header and last row */
.print-page th:first-child {
  border-top-left-radius: 10px;
}
.print-page th:last-child {
  border-top-right-radius: 10px;
}
.print-page tr:last-child td:first-child {
  border-bottom-left-radius: 10px;
}
.print-page tr:last-child td:last-child {
  border-bottom-right-radius: 10px;
}

/* Zebra stripes */
.print-page tr:nth-child(even) {
  background-color: #f2f2f2;
}
.print-page tr:nth-child(odd) {
  background-color: #ffffff;
}

/* Highlight Net Salary row */
.print-page .total-row td {
  font-weight: bold;
  font-size: 16px;
  background-color: #d1f2eb;
}

/* Print button */
.print-page .print-btn {
  display: block;
  margin: 25px auto 0;
  padding: 10px 25px;
  background: #16a085;
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
}

.print-page .print-btn:hover {
  background: #138d75;
}

@media print {
  .print-page .print-btn {
    display: none;
  }
}

/* ===== Dark Mode ===== */
@media (prefers-color-scheme: dark) {
  .print-page {
    color: #eee;
  }

  .print-page .header h1 {
    color: #ddd;
  }
  .print-page .header p {
    color: #bbb;
  }

  .print-page .card {
    background: #1e1e1e;
    border-color: #333;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
  }

  .print-page table {
    background: #1e1e1e;
    border-color: #555;
  }

  .print-page th {
    background-color: #0077cc;
    color: #fff;
  }

  .print-page tr:nth-child(even) {
    background-color: #1c1c1c;
  }
  .print-page tr:nth-child(odd) {
    background-color: #2c2c2c;
  }
  .print-page .total-row td {
    background-color: #0f3d33;
  }
}
