/* Limits table styles (cleaned & responsive) */
.limits-section {
  width: 70%;
  max-width: 1100px;
  margin: 40px auto;
  padding: 28px;
  background: linear-gradient(180deg, #ffffff, #fbfbff);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(23, 32, 64, 0.08);
  font-family: "Open Sans", sans-serif;
}
.limits-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.limits-title {
  font-size: 20px;
  font-weight: 700;
  color: #14213d;
}
.controls {
  display: flex;
  gap: 10px;
  align-items: center;
}
.select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e6e9ef;
  background: #fff;
}

/* Table wrapper provides horizontal scrolling on small screens */
#tableWrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.limits-table {
  min-width: 720px;
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  table-layout: auto;
}
.limits-table th {
  background: #f1f5ff;
  color: #1a237e;
  padding: 14px 16px;
  text-align: left;
  font-weight: 700;
  border-bottom: 1px solid #e6e9ef;
}
.limits-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f4f6fb;
  color: #293444;
  vertical-align: middle;
  font-size: 13px;
}

/* column sizing */
.limits-table th:nth-child(1),
.limits-table td:nth-child(1) {
  width: 60%;
}
.limits-table th:nth-child(2),
.limits-table td:nth-child(2),
.limits-table th:nth-child(3),
.limits-table td:nth-child(3) {
  width: 20%;
  text-align: center;
}

.badge {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #2b4bd7;
  font-weight: 600;
  font-size: 13px;
}
.muted {
  color: #6b7280;
  font-size: 13px;
}
.time-flag {
  display: inline-block;
  padding: 6px 8px;
  border-radius: 6px;
  background: #fff4e6;
  color: #b45309;
  border: 1px solid #ffe8c2;
  font-size: 12px;
}

/* Tabs */
.tabs {
  display: flex;
  margin-bottom: 18px;
  border-bottom: 1px solid #e6e9ef;
}
.tab-button {
  padding: 6px 10px;
  border: none;
  background: none;
  color: #293444;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.3s;
  max-width: 150px;
}
.tab-button.active {
  color: #14213d;
  border-bottom-color: #14213d;
}
.tab-button:hover {
  color: #14213d;
}
.tab-content {
  display: none;
  padding: 20px 0;
}
.tab-content.active {
  display: block;
}

/* Category rows (use CSS instead of inline styles) */
.category-row {
  background: #f0f4fa;
}
.category-row td {
  background: #f0f4fa;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1a237e;
  text-align: left;
  padding: 12px 16px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .limits-section {
    margin-top: 70px;
    padding: 20px;
  }
  .limits-table th,
  .limits-table td {
    padding: 12px 10px;
  }
}

@media (max-width: 600px) {
  /* keep table readable by allowing horizontal scroll; reduce min-width */
  .limits-table {
    min-width: 620px;
  }
  .limits-table th:nth-child(2),
  .limits-table td:nth-child(2),
  .limits-table th:nth-child(3),
  .limits-table td:nth-child(3) {
    text-align: right;
  }
  .limits-table th:nth-child(1),
  .limits-table td:nth-child(1) {
    width: 90%;
  }
  .limits-table th:nth-child(2), .limits-table td:nth-child(2), .limits-table th:nth-child(3), .limits-table td:nth-child(3){
    width: 90%;
  }
  .limits-title {
    font-size: 18px;
  }
}

/* Modal & gallery styles (kept minimal and valid) */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal.show {
  display: flex;
}
.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 500px;
  width: 90%;
  max-height: 80%;
  overflow: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  cursor: pointer;
  font-size: 24px;
  color: #666;
}
.modal-close:hover {
  color: #000;
}
.modal-details {
  margin-top: 10px;
}
.modal-details div {
  margin: 5px 0;
}

.gallery-section {
  max-width: 1100px;
  margin: 40px auto;
  padding: 28px;
  background: linear-gradient(180deg, #ffffff, #fbfbff);
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(23, 32, 64, 0.08);
  font-family: "Open Sans", sans-serif;
  text-align: center;
}
.gallery-title {
  font-size: 20px;
  font-weight: 700;
  color: #14213d;
  margin-bottom: 18px;
}
.gallery {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}
.gallery img {
  max-width: 300px;
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
}
.gallery img:hover {
  transform: scale(1.05);
}

/* Modern table styling for tab2 */
.modern-table-wrap {
  margin-top: 8px;
}
.modern-table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(20, 33, 61, 0.06);
}
.modern-table thead {
  background: linear-gradient(90deg, #f7f9ff, #eef4ff);
}
.modern-table thead th {
  padding: 14px 18px;
  text-align: left;
  font-weight: 700;
  color: #1a237e;
  border-bottom: 1px solid rgba(15, 42, 86, 0.06);
}
.modern-table tbody tr {
  transition:
    background-color 0.15s ease,
    transform 0.08s ease;
}
.modern-table tbody tr:nth-child(odd) {
  background: #ffffff;
}
.modern-table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.modern-table td {
  padding: 14px 18px;
  border-bottom: 1px solid rgba(15, 42, 86, 0.04);
  color: #22303f;
  font-size: 13px;
}
.modern-table td:nth-child(3) {
  text-align: right;
}
.modern-table td[data-label="Ücret"],
.modern-table th:nth-child(2) {
  text-align: center;
}
.modern-table td[data-label="Not"],
.modern-table th:nth-child(3) {
  text-align: right;
}

/* Responsive: convert rows to cards */
@media (max-width: 620px) {
  .modern-table {
    min-width: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .modern-table thead {
    display: none;
  }
  .modern-table tbody tr {
    display: block;
    margin: 10px 0;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(20, 33, 61, 0.04);
  }
  .modern-table tbody td {
    display: flex;
    padding: 10px;
  }
  .modern-table tbody td:nth-child(1) {
    font-weight: 600;
    color: #14213d;
  }
  .modern-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #14213d;
    margin-right: 8px;
  }
  .modern-table tbody td[data-label="Not"] {
    color: #6b7280;
  }
  .limits-table {
    min-width: 100%;
  }
  .limits-table thead {
    display: none;
  }
  .limits-table tbody tr {
    display: flex;
    flex-direction: column;
  }
  .limits-table tbody tr td {
    text-align: left !important;
  }
  .limits-table tbody tr td:nth-child(1) {
    font-weight: 600;
    color: #14213d;
  }
}

/* Inner tabs (Günlük / Aylık) */
.inner-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 8px;
}
.inner-tab-button {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: #fff;
  color: #213044;
  cursor: pointer;
  font-weight: 600;
}
.inner-tab-button.active {
  background: linear-gradient(90deg, #eef4ff, #f7f9ff);
  border-color: #dbe9ff;
}
.inner-tab-content {
  display: none;
}
.inner-tab-content.active {
  display: block;
}
.modern-table#dailyTable td,
.modern-table#monthlyTable td {
  padding: 12px 14px;
}
.modern-table .section td {
  font-weight: 700;
  background: transparent;
  background: #f0f4fa;
  font-weight: bold;
  font-size: 0.9em;
  color: #1a237e;
  text-align: center;
  padding: 12px 8px;
  letter-spacing: 0.5px;
}

@media (max-width: 480px) {
  .inner-tabs {
    gap: 6px;
  }
  .inner-tab-button {
    padding: 8px 10px;
    font-size: 14px;
  }
}
