* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
}

body {
  background: #6f7071;
  color: #333;
  padding: 2rem;
}

.container {
  max-width: 900px;
  margin: auto;
  background: rgb(242, 245, 247);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

h1, h2 {
  text-align: center;
  color: #04a4fb;
  margin-bottom: 1rem;
}

input[type="file"] {
  display: block;
  margin: 1rem auto;
}

button {
  background: #2b7cff;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  margin: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.3s ease;
}

button:hover {
  background: #1a5ddc;
}

.actions {
  text-align: center;
  margin: 1rem 0;
}

label {
  margin-left: 1rem;
  font-size: 0.95rem;
  color: #5a06f6;
}

.filters {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.filters input {
  flex: 1;
  padding: 0.5rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.dropzone {
  border: 2px dashed #2b7cff;
  padding: 2rem;
  text-align: center;
  margin: 1rem 0;
  color: #2b7cff;
  background: #f0f6ff;
  border-radius: 8px;
}

.dropzone.dragover {
  background: #e0ecff;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

thead {
  background: #adcff3;
  border: 2px solid #090909;
  border-radius: 8px;
}

th, td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid #000000;
}

tbody tr:hover {
  background: #fbfbfb;
}

.muted {
  color: #999;
  font-style: italic;
}

.log-container {
  margin-top: 1rem;
}

#log {
  width: 100%;
  height: 120px;
  border: 1px solid #000000;
  padding: 0.5rem;
  font-family: monospace;
  font-size: 0.9rem;
  resize: none;
  background: #dbdada;
  border-radius: 6px;
  overflow-y: scroll;
  color: #000000;
}

@media (max-width: 600px) {
  .filters {
    flex-direction: column;
  }

@media (max-width: 600px) {
  td {
    text-align: center;
    padding: 1rem 1rem 1rem 45%;
    font-size: 0.95rem;
    border-bottom: 1px solid #000000;
    background: #fff;
  }

  tr {
    margin-bottom: 1rem;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fdfdfd;
    box-shadow: 4 4px 6px rgba(0,0,0,0.04);
  }

  td::before {
    font-size: 0.85rem;
    color: #555;
    font-weight: 600;
  }

  table {
    background: transparent;
  }

  /* Fallback if you dynamically generate table IDs/classes */
  td:first-child::before {
    content: "Vendor";
  }
  td:nth-child(2)::before {
    content: "Amount";
  }
  td:nth-child(3)::before {
    content: "Occurrences";
  }
  td:nth-child(4)::before {
    content: "Months";
  }
}
/* Fix for Recurring Summary Table */
@media (max-width: 600px) {
  #summaryTable td:nth-child(1)::before {
    content: "Vendor";
  }
  #summaryTable td:nth-child(2)::before {
    content: "Occurrences";
  }
  #summaryTable td:nth-child(3)::before {
    content: "Total Paid";
  }

  /* Fix for All Transactions Table if needed */
  #allTransactionsTable td:nth-child(1)::before {
    content: "Date";
  }
  #allTransactionsTable td:nth-child(2)::before {
    content: "Vendor";
  }
  #allTransactionsTable td:nth-child(3)::before {
    content: "Amount";
  }
}


  .container {
    padding: 1rem;
  }

  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead {
    display: none;
  }

  td {
    position: relative;
    padding-left: 50%;
  }

  td::before {
    position: absolute;
    left: 1rem;
    top: 0.75rem;
    white-space: nowrap;
    font-weight: bold;
    color: #444;
  }

  #resultsTable td:nth-child(1)::before { content: "Vendor"; }
  #resultsTable td:nth-child(2)::before { content: "Amount"; }
  #resultsTable td:nth-child(3)::before { content: "Occurrences"; }
  #resultsTable td:nth-child(4)::before { content: "Months"; }

  #allTransactionsTable td:nth-child(1)::before { content: "Date"; }
  #allTransactionsTable td:nth-child(2)::before { content: "Vendor"; }
  #allTransactionsTable td:nth-child(3)::before { content: "Amount"; }
}

.progress-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 32px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  overflow: hidden;
  z-index: 1000;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  display: none;
  align-items: center;
  justify-content: center;
}
.progress-bar {
  position: absolute;
  height: 100%;
  background: linear-gradient(to right, #4e54c8, #8f94fb);
  width: 0%;
  transition: width 0.3s ease;
  z-index: 0;
}
.progress-spinner {
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.2);
  border-top: 3px solid #222;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: auto;
  margin-right: 12px;
  z-index: 2;
}
.progress-label {
  color: #222;
  font-size: 14px;
  font-weight: 500;
  margin-left: auto;
  margin-right: 12px;
  z-index: 2;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.floating-help-btn {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #2b7cff;
  color: white;
  padding: 0.6rem 1.1rem;
  font-size: 1rem;
  font-weight: bold;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  z-index: 9999;
  transition: background 0.3s ease;
}
.floating-help-btn:hover {
  background: #1a5ddc;
}
@media (max-width: 400px) {
  .floating-help-btn {
    font-size: 0.85rem;
    padding: 0.5rem 0.8rem;
  }
}

.floating-btn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #2b7cff;
  color: white;
  border: none;
  padding: 0.8rem 1.2rem;
  border-radius: 50px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  font-size: 1rem;
  cursor: pointer;
  z-index: 1000;
}

.modal {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: white;
  padding: 2rem;
  max-width: 400px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.modal-content h3 {
  margin-bottom: 1rem;
  color: #2b3a42;
}

.modal-content p.note {
  font-size: 0.9rem;
  color: #777;
  margin-top: 1rem;
}

.modal-actions {
  margin-top: 1rem;
}

.modal-actions button {
  margin: 0.5rem;
}

.hidden {
  display: none;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  text-align: center;
}
.sticky-button-bottom {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  background-color: #ff9900;
  color: white;
  border: none;
  padding: 0.65rem 1.3rem;
  border-radius: 50px;
  font-size: 0.95rem;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: background 0.3s ease;
}

.sticky-button-bottom:hover {
  background-color: #e08700;
}


