/* ts:1765530526085 */
/* === جدول اصلی === */
.table-wrapper {
  background: var(--card-bg);
  padding: 16px;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  margin: 16px;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.table-header h2 {
  font-size: 1.2em;
  color: var(--secondary-color);
  font-weight: 600;
  margin: 0;
}

/* === جست‌وجو === */
.search-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.date-search {
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background-color: var(--card-bg);
  color: var(--text-color);
  font-size: 0.8rem;
}

.search-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background-color 0.3s, transform 0.2s;
}

.search-btn:hover {
  background-color: var(--secondary-color-light);
  transform: scale(1.05);
}

/* === جدول === */
.responsive-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--text-color);
  font-size: 0.85em;
}

.responsive-table th,
.responsive-table td {
  padding: 10px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.2s ease;
}

.responsive-table th {
  background: var(--primary-color);
  font-weight: 600;
  color: var(--text-color);
}

.responsive-table tr:hover td {
  background: var(--card-hover-bg);
}

/* === ستون‌ها === */
th:nth-child(1),
td:nth-child(1) {
  width: 5%;
}
th:nth-child(2),
td:nth-child(2) {
  width: 20%;
}
th:nth-child(3),
td:nth-child(3) {
  width: 15%;
}
th:nth-child(4),
td:nth-child(4) {
  width: 15%;
}
th:nth-child(5),
td:nth-child(5) {
  width: 10%;
}
th:nth-child(6),
td:nth-child(6) {
  width: 25%;
}
/* === دراپ‌داون === */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-btn {
  background-color: var(--secondary-color);
  color: white;
  padding: 6px 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: var(--transition);
  font-size: 0.8rem;
}

.dropdown-btn:hover {
  background-color: var(--secondary-color-light);
}

.dropdown-btn::after {
  font-family: "Material Symbols Outlined";
  content: "expand_more";
  margin-right: 4px;
}

.dropdown.open .dropdown-btn::after {
  content: "expand_less";
}

.dropdown-content {
    display: none;
    position: absolute !important;
    background-color: var(--card-bg);
    box-shadow: var(--card-shadow);
    border-radius: 8px;
    margin-top: 0.3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    width: 120px;
    z-index: 2000 !important;
}

.dropdown.open .dropdown-content {
  display: block;
}

.dropdown-content label {
  display: flex;
  align-items: center;
  padding: 4px 12px;
  cursor: pointer;
  transition: var(--transition);
}

.dropdown-content label:hover {
  background-color: var(--card-hover-bg);
}

.dropdown-content input[type="checkbox"] {
  margin-left: 0.5rem;
  accent-color: var(--accent-color);
  transform: scale(1.05);
}

/* === دکمه ارسال جدول === */
.table-submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.table-submit .submit {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background-color 0.3s, transform 0.2s;
}

.table-submit .submit:hover {
  transform: scale(1.05);
}

/* === دکمه دراپ‌داون و ثبت کنار هم === */
.dropdown-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.dropdown-container .submit {
  background-color: var(--secondary-color);
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: 0.2s;
}

.dropdown-container .submit:hover {
  transform: scale(1.05);
  background-color: var(--secondary-color-light);
}

/* ✅ ریسپانسیو حرفه‌ای */
@media (max-width: 992px) {
  .table-wrapper {
    margin: 10px;
    padding: 14px;
  }

  .table-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .table-header h2 {
    /* text-align: center; */
    font-size: 1.1em;
  }

  .responsive-table th,
  .responsive-table td {
    padding: 8px 6px;
  }
}

/* ✅ حالت کارت در موبایل */
@media (max-width: 820px) {
  .table-header h2 {
    text-align: center;
  }
  .responsive-table,
  .responsive-table thead,
  .responsive-table tbody,
  .responsive-table th,
  .responsive-table td,
  .responsive-table tr {
    display: block;
    width: 100%;
  }

  .responsive-table thead {
    display: none;
  }

  .responsive-table tr {
    background: var(--card-bg);
    border: 1px solid #334155;
    border-radius: 10px;
    margin-bottom: 12px;
    padding: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
  }

  .responsive-table td {
    padding: 6px 8px;
    position: relative;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    direction: rtl;
  }

  .responsive-table td:last-child {
    border-bottom: none;
  }

  .responsive-table td::before {
    content: attr(data-label);
    position: absolute;
    left: 8px;
    top: 6px;
    font-weight: 600;
    color: var(--secondary-color-light);
    font-size: 0.75rem;
  }
}

/* ✅ موبایل خیلی کوچک */
@media (max-width: 480px) {
  .table-header {
    flex-direction: column;
  }
  .btn-text {
    display: none;
  }
  .dropdown-btn {
    width: 100%;
    padding: 6px;
  }
  .dropdown-btn::after {
    margin-right: 0;
  }
  .table-wrapper {
    padding: 12px;
  }
}
@media (max-width: 420px) {
  .table-header h2 {
    text-align: center;
    font-size: 1em;
  }
}
