.fc-modal-table-wrap {
  --fc-primary: #159957;
  --fc-primary-dark: #0f7a45;
  --fc-accent: #e8f7ef;
  --fc-text: #1e2a23;
  --fc-border: #d8e2dc;
}

.fc-modal-table__trigger {
  appearance: none;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--fc-primary), #1eb86c);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  padding: 14px 20px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 8px 20px rgba(21, 153, 87, 0.23);
}

.fc-modal-table__trigger:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(21, 153, 87, 0.3);
}

.fc-modal-table {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
}

.fc-modal-table.is-open {
  display: block;
}

.fc-modal-table__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 18, 0.55);
  backdrop-filter: blur(3px);
}

.fc-modal-table__dialog {
  position: relative;
  width: min(1100px, 94vw);
  max-height: 88vh;
  margin: 6vh auto;
  background: #fff;
  color: var(--fc-text);
  border-radius: 16px;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.24);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr;
}

.fc-modal-table__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #d7e2db;
  border-radius: 999px;
  background: #ffffff;
  color: #3e5246;
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.fc-modal-table__close:hover {
  background: #f0f8f3;
  border-color: #b7cabf;
  color: #1e2a23;
}

.fc-modal-table__header {
  padding: 24px 54px 14px 24px;
  border-bottom: 1px solid var(--fc-border);
  background: linear-gradient(180deg, #fff, #f9fcfa);
}

.fc-modal-table__header h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  color: #132a1f;
}

.fc-modal-table__header p {
  margin: 8px 0 0;
  font-size: 15px;
  color: #4c5f55;
}

.fc-modal-table__tools {
  padding: 14px 24px;
  background: var(--fc-accent);
  border-bottom: 1px solid var(--fc-border);
}

.fc-modal-table__search {
  width: 100%;
  border: 1px solid #b7cabf;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
}

.fc-modal-table__search:focus {
  outline: 2px solid rgba(21, 153, 87, 0.25);
  border-color: var(--fc-primary);
}

.fc-modal-table__body {
  overflow: auto;
}

.fc-modal-table__body table {
  width: 100%;
  border-collapse: collapse;
}

.fc-modal-table__body thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  background: #f0f8f3;
  color: #173021;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--fc-border);
  padding: 14px 16px;
}

.fc-modal-table__body tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf2ee;
  font-size: 15px;
}

.fc-modal-table__body tbody tr:nth-child(even) {
  background: #fcfefc;
}

.fc-modal-table__body tbody tr:hover {
  background: #f6fbf8;
}

.fc-modal-table__body tbody tr.fc-hidden-row {
  display: none;
}

body.fc-modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .fc-modal-table__dialog {
    width: 95vw;
    max-height: 92vh;
    margin: 4vh auto;
    border-radius: 12px;
  }

  .fc-modal-table__header {
    padding: 18px 56px 12px 16px;
  }

  .fc-modal-table__close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 24px;
  }

  .fc-modal-table__header h3 {
    font-size: 20px;
  }

  .fc-modal-table__tools {
    padding: 10px 16px;
  }

  .fc-modal-table__body thead th,
  .fc-modal-table__body tbody td {
    padding: 12px;
    font-size: 14px;
    white-space: nowrap;
  }
}
