header {
  background-color: #e0f7e9;
  padding: 2rem;
  text-align: center;
}
header h1 {
  margin: 0;
  font-size: 2.5rem;
}
header p {
  font-size: 1.2rem;
  color: #555;
}

/*categorySummaryTable*/
#categorySummaryTable {
  width: 100%;
  margin-top: 2rem;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: white;
}

#categorySummaryTable th, #categorySummaryTable td {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #eee;
}

#categorySummaryTable th {
  background-color: #80cbc4;
  color: #333;
  font-weight: bold;
}

#categorySummaryTable tr:hover {
  background-color: #f5f5f5;
}

#categorySummaryTable tfoot tr {
  font-weight: bold;
  background-color: #d9f0d9; /* גוון ירוק בהיר לרקע */
  border-top: 2px solid #5cbf7b; /* קו עליון עבה וירוק */
}

#categorySummaryTable tfoot td {
  padding: 0.6rem;
  text-align: center;
  font-size: 1.1rem;
  color: #2e7d32; /* ירוק כהה לטקסט */
}

#resultsTable {
  width: 100%;
  margin-top: 2rem;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  background-color: white;
}

#resultsTable th, #resultsTable td {
  padding: 1rem;
  text-align: center;
  border-bottom: 1px solid #eee;
}

#resultsTable th {
  background-color: #e0f7e9;
  color: #333;
  font-weight: bold;
}

#resultsTable tr:hover {
  background-color: #f5f5f5;
}

#resultsTable tfoot tr {
  font-weight: bold;
  background-color: #d9f0d9; /* גוון ירוק בהיר לרקע */
  border-top: 2px solid #5cbf7b; /* קו עליון עבה וירוק */
}

#resultsTable tfoot td {
  padding: 0.6rem;
  text-align: center;
  font-size: 1.1rem;
  color: #2e7d32; /* ירוק כהה לטקסט */
}

.container {
  max-width: 800px;
  margin: 2rem auto;
  padding: 1rem;
}
.features {
  display: grid;
  gap: 1rem;
}
.features div {
  background-color: #fff;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.cta {
  text-align: center;
  margin: 1.5rem 0;
}
.cta button {
  background-color: #5cbf7b;
  color: white;
  font-size: 1.2rem;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}
.cta button:hover {
  background-color: #4aa667;
}
footer {
  text-align: center;
  padding: 1rem;
  color: #777;
}

.site-footer {
  background-color: #7851A9;
  color: white;
  text-align: center;
  padding: 1rem 0;
  direction: rtl;
  font-family: 'Assistant', sans-serif;
}

/* עיצוב אזור העלאת הקובץ */
#uploadSection {
  text-align: center;
  margin-top: 20px;
  background-color: #e6f3ea;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#uploadSection input[type="file"] {
  font-size: 1rem;
  padding: 0.4rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  cursor: pointer;
}

#uploadSection button {
  background-color: #5cbf7b;
  color: white;
  font-size: 1.2rem;
  padding: 0.6rem 2rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 1rem;
  transition: background-color 0.3s ease;
}

#uploadSection button:hover {
  background-color: #4aa667;
}

#uploadStatus {
  margin-top: 1rem;
  font-weight: 600;
}
.file-label {
  background-color: #5cbf7b;
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 8px;
  cursor: pointer;
  display: inline-block;
  margin-bottom: 1rem;
}
.file-label:hover {
  background-color: #4aa667;
}

#pieChartContainer {
  margin-top: 20px;
  text-align: center;
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.loading {
  display: inline-block;
  margin-right: 10px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.tool-explanation {
  padding: 1.5rem;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  direction: rtl;
}

.tool-explanation h2 {
  text-align: center;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  color: #333;
}

.tool-explanation p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.tool-explanation ul {
  list-style: none;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1.6;
}

.tool-explanation li::before {
  margin-left: 0.5rem;
}

.button-link {
  display: inline-block;
  padding: 12px 20px;
  background-color: #4caf50;
  color: white;
  text-decoration: none;
  font-size: 16px;
  border-radius: 8px;
  transition: background-color 0.3s ease;
  font-weight: bold;
}

.button-link:hover {
  background-color: #388e3c;
}

table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
/* body { font-family: Arial, sans-serif; padding: 2rem; background: #f9f9f9; } */
table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; }
th, td { padding: 0.75rem; border: 1px solid #ccc; text-align: right; }
th { background-color: #e6f3ea; }
tr.category-row { background-color: #e6f3ea; cursor: pointer; font-weight: bold; }
tr.category-row:hover { background-color: #e6f3ea; }
.transaction-row { display: none; background-color: #fff; }
.add-button-row { display: none; background-color: #cb5a5a; }
.arrow { display: inline-block; font-weight: bold; }
.arrow.open::after { content: "−"; } /* minus */
.arrow::after { content: "+"; } /* plus */

.category-control {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  justify-self: center;
}

.category-control select,
.category-control input[type="text"] {
  padding: 4px 6px;
  font-size: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  min-width: 120px;
}

.category-control input[type="text"] {
  display: none;
}

.category-control button {
  padding: 5px 10px;
  font-size: 0.85rem;
  border: none;
  border-radius: 6px;
  background-color: #419d9a;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.category-control button:hover {
  background-color: #005bb5;
}


/* .insights-section {
  background-color: #f7f6ff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  font-family: 'Segoe UI', sans-serif;
} */

.insights-box-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  /* padding: 2rem; */
  justify-items: center;
  margin: 10px;
}

.insight-box {
  width: -webkit-fill-available;
  background-color: #fff;
  border: 1px solid #ddd;
  /* border-radius: 12px; */
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform 0.2s ease;
}

.insight-box:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 14px rgba(0,0,0,0.1);
}

.insight-box .icon {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.insight-box .title {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0.25rem;

}

.insight-box .value {
  font-size: 1rem;
  font-weight: bold;
  color: #222;
}

.insight-box table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.insight-box th,
.insight-box td {
  border-bottom: 1px solid #ddd;
  padding: 5px;
  text-align: right;
}

.insight-box th {
  background-color: #f4f4f4;
  font-weight: bold;
}



  .progress-bar {
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 1rem;
  }

  .progress-fill {
    height: 100%;
    width: 0%;
    background-color: #007BFF;
    transition: width 0.3s ease;
  }

  .stage {
    display: none;
  }

  .stage.active {
    display: block;
  }

  .stage h2 {
    color: #007BFF;
    margin-bottom: 0.5rem;
  }

  .step {
    margin: 0.5rem 0;
    padding-right: 1rem;
    position: relative;
    font-size: large;
  }

  .step::before {
    content: "\2714";
    position: relative;
    right: -1rem;
    color: green;
  }

  .nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    flex-direction: row-reverse;
  }

  .nav-buttons button {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    background-color: #007BFF;
    color: white;
    cursor: pointer;
  }

  .nav-buttons button:disabled {
    background-color: #ccc;
    cursor: default;
  }


  .downloads {
    margin-top: 0.5rem;
    padding-right: 1rem;
    padding-top: 0.3rem;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .downloads a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #2f8e95; /* new green color */
    color: white;
    padding: 0.1rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    font-size: 1rem;
    min-width: 100px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
    font-weight: bold;
  }

  .downloads a:hover {
    background-color: #4c9499; /* darker green on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  }

  .downloads a span {
    margin-left: 0.5rem;
    font-size: 1.2rem;
  }

  input[type="file"] {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 1rem;
    background-color: #f9f9f9;
    cursor: pointer;
  }

  input[type="file"]::file-selector-button {
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
  }

  input[type="file"]::file-selector-button:hover {
    background-color: #388e3c;
  }

  input[type="file"] {
    display: none;
  }

  .custom-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin: 0.5rem 0;
    padding:0.5rem 1rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  }

  .custom-upload:hover {
    background-color: #388e3c;
  }

  .file-list {
    margin: 0px;
    padding: 0;
    list-style: none;
    direction: rtl;
  }

  .file-list li {
    background: #f1f1f1;
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 10px;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }

  .file-actions {
    display: flex;
    gap: 10px;
  }

  .file-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 5px;
  }

  .file-actions button:hover {
    color: #007BFF;
  }

  .upload-controls {
    background: #fafafa;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  }

  .upload-controls label {
    display: block;
    font-weight: bold;
    margin-bottom: 0.5rem;
  }

  .upload-controls button.upload-all {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
  }

  .upload-controls button.upload-all:hover {
    background-color: #0056b3;
  }

    #submitBtn {
    display: block;
    margin: 2rem auto; /* מרכז את הכפתור */
    background-color: #9c27b0; /* סגול */
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.3s ease;
  }

  #submitBtn:hover {
    background-color: #7b1fa2; /* גוון כהה יותר */
  }

  .screenshots-section {
  padding: 2rem;
  background-color: #fafafa;
  text-align: right;
}

.screenshot-gallery {
  display: flex;
  flex-direction: row;
  overflow-x: auto; /* גלילה אופקית */
  gap: 20px;
  padding-bottom: 10px;
}

.screenshot-card {
  flex: 1 1 250px; /* רספונסיבי – מינימום 250px */
  max-width: 300px;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
}

.screenshot-card img {
  width: 100%;
  height: 200px; /* גובה אחיד */
  object-fit: cover; /* מתיחה עם חיתוך – לא עיוות */
  display: block;
}
.caption {
  padding: 10px;
  font-size: 0.95rem;
  background-color: #f0f0f0;
  text-align: center;
  color: #333;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.transaction-input-row {
  animation: fadeIn 0.3s ease-in;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 300px; /* גובה נדרש לרינדור תקין */
}

canvas {
  width: 100% !important;
  height: 100% !important;
}

/* Responsive layout for mobile */
@media (max-width: 768px) {
  .insights-box-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  .screenshot-gallery {
    display: flex;
    flex-direction: column; /* שינוי לכיוון עמודה */
    gap: 20px;
  }

  .page-container {
    flex-direction: column;
  }

  #categorySummaryTable th,
  #categorySummaryTable td {
    font-size: 0.8rem; /* Smaller font size for mobile */
    padding: 0.2rem; /* Reduced padding for mobile */
  
  }

  .category-control {
    gap: 4px;
    padding: 2px 0;
  }

  td .category-control select,
  td .category-control input[type="text"] {
    padding: 4px 4px;
    font-size: 0.7rem;
    width: 100%;
  }

  td .category-control button {
    font-size: 0.7rem;
  }

  #categorySummaryTable tfoot td {
    padding: 0.2rem;
    font-size: 0.8rem;
  }

  #pieChartContainer {
    padding-top: 0rem;
    padding-bottom: 0rem;
  }
}
