.cfp-wrap {
  --cfp-bg: #071711;
  --cfp-card: #0b241a;
  --cfp-soft: #163a2b;
  --cfp-accent: #3ca96b;
  --cfp-accent-dark: #2f8c58;
  --cfp-gold: #f1ca66;
  --cfp-text: #e6f0ea;
  --cfp-muted: #9eb6aa;
  --cfp-line: #1d4b37;
  background: linear-gradient(160deg, #071711 0%, #0d2a1f 100%);
  border: 1px solid rgba(92, 191, 128, .28);
  color: var(--cfp-text);
  border-radius: 18px;
  padding: 18px;
  margin-top: 12px;
  box-shadow: 0 20px 35px rgba(0, 0, 0, .28);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.cfp-card {
  background: var(--cfp-card);
  border: 1px solid rgba(92, 191, 128, .24);
  border-radius: 16px;
  padding: 16px;
}

.cfp-header-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.cfp-header-row h3,
.cfp-upload-box h4 {
  color: var(--cfp-text);
  margin: 0;
}

.cfp-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  width: 100%;
}

.cfp-filters input,
.cfp-filters select,
.cfp-field-grid input,
.cfp-upload-box textarea {
  width: 100%;
  margin: 0;
  border: 1px solid #2c6a4f;
  border-radius: 12px;
  padding: 10px 12px;
  background: #123325;
  color: #f4fbf7;
}

.cfp-wrap input::placeholder,
.cfp-wrap textarea::placeholder {
  color: #d7efe0;
  opacity: 1;
}


.cfp-filters input:focus,
.cfp-filters select:focus,
.cfp-field-grid input:focus,
.cfp-upload-box textarea:focus,
.cfp-dropzone:focus-within {
  outline: none;
  border-color: #5bbd80;
  box-shadow: 0 0 0 2px rgba(91, 189, 128, .22);
}

.cfp-filters button,
.cfp-upload-submit,
.cfp-btn,
.cfp-delete-own {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  padding: 10px 14px;
  transition: all .2s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
  border: 1px solid transparent;
  cursor: pointer;
}

.cfp-filters button,
.cfp-upload-submit {
  background: var(--cfp-gold);
  color: #052015;
  font-weight: 700;
}

.cfp-file-card {
  padding: 0;
  background: transparent;
  border-color: transparent;
}

.cfp-table-wrap {
  padding: 16px;
  background: transparent;
  border: 1px solid rgba(92, 191, 128, .24);
  border-radius: 16px;
  overflow-x: auto;
}

.cfp-table-wrap::-webkit-scrollbar {
  height: 10px;
}

.cfp-table-wrap::-webkit-scrollbar-track {
  background: #153325;
  border-radius: 999px;
}

.cfp-table-wrap::-webkit-scrollbar-thumb {
  background: var(--cfp-accent);
  border-radius: 999px;
}

.cfp-table {
  width: 100%;
  min-width: 860px;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.cfp-table th {
  color: #c9e3d6;
  font-weight: 600;
  border-bottom: 1px solid rgba(92, 191, 128, .28);
  padding: 8px;
  text-align: left;
}

.cfp-table td {
  background: var(--cfp-soft);
  padding: 12px 10px;
  border-top: 1px solid rgba(92, 191, 128, .24);
  border-bottom: 1px solid rgba(92, 191, 128, .24);
  vertical-align: top;
}

.cfp-table td:first-child {
  border-left: 1px solid rgba(92, 191, 128, .24);
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}

.cfp-table td:last-child {
  border-right: 1px solid rgba(92, 191, 128, .24);
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

.cfp-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.cfp-download-btn {
  background: #2fa55f !important;
  color: #fff !important;
  font-weight: 800;
  box-shadow: 0 10px 20px rgba(0, 0, 0, .22);
  text-align: center;
}

.cfp-download-btn:hover {
  background: #278b50 !important;
}

.cfp-delete-own {
  background: var(--cfp-gold);
  color: #052015;
}

.cfp-msg-btn {
  background: transparent;
  color: var(--cfp-text);
  border-color: rgba(92, 191, 128, .55);
  box-shadow: none;
  min-width: 92px;
}

.cfp-msg-btn:hover,
.cfp-msg-btn:focus {
  border-color: #5bbd80;
  box-shadow: 0 0 0 2px rgba(91, 189, 128, .18);
}

.cfp-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  max-width: 180px;
  min-height: 38px;
  padding: 8px 12px;
  border-radius: 14px;
  background: #2e6a4e;
  color: var(--cfp-gold);
  border: 1px solid #3e7f5d;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.cfp-status-approved {
  background: rgba(76, 175, 80, .18);
  border-color: rgba(76, 175, 80, .32);
  color: #ffffff;
}

.cfp-status-rejected {
  background: rgba(198, 64, 64, .18);
  border-color: rgba(198, 64, 64, .32);
  color: #ffffff;
}

.cfp-status-pending-review {
  background: rgba(191, 149, 31, .18);
  border-color: rgba(191, 149, 31, .34);
  color: #ffffff;
}

.cfp-status-uploaded-by-admin {
  background: rgba(76, 175, 80, .12);
  border-color: rgba(76, 175, 80, .24);
  color: #dfeee4;
}

.cfp-empty-message {
  color: var(--cfp-muted);
  font-style: italic;
}

.cfp-pagination {
  display: flex;
  justify-content: flex-end;
  margin: 8px 0 0;
}

.cfp-pagination .page-numbers {
  display: inline-flex;
  min-width: 48px;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #2b7051;
  border-radius: 12px;
  margin-left: 10px;
  padding: 0 12px;
  text-decoration: none;
  color: var(--cfp-gold);
  background: transparent;
  font-weight: 700;
}

.cfp-pagination .page-numbers.current {
  background: var(--cfp-accent);
  color: #052015;
}

.cfp-upload-box {
  margin-top: 0;
}

.cfp-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.cfp-upload-box textarea {
  width: 100%;
  min-height: 90px;
  margin-bottom: 12px;
}

.cfp-dropzone {
  border: 2px dashed rgba(92, 191, 128, .6);
  background: #102d20;
  color: #d2e8dc;
  padding: 18px;
  text-align: center;
  border-radius: 12px;
  margin: 10px 0;
  position: relative;
}

.cfp-dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.cfp-file-ready {
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(241, 202, 102, .35);
  background: rgba(241, 202, 102, .06);
  color: var(--cfp-gold);
  font-size: 13px;
}

.cfp-progress {
  height: 8px;
  background: #153325;
  border-radius: 999px;
  overflow: hidden;
}

.cfp-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--cfp-gold);
}

.cfp-progress-label,
#cfp-upload-message {
  margin-top: 8px;
  color: var(--cfp-muted);
}

.cfp-upload-submit[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  background: #2a634a;
  color: #9eb6aa;
  border-color: rgba(92, 191, 128, .35);
}

.cfp-modal[hidden] {
  display: none;
}

.cfp-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
}

.cfp-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 10, 7, 0.65);
}

.cfp-modal-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100vw - 32px));
  background: #102e21;
  border: 1px solid #2f7153;
  border-radius: 16px;
  padding: 22px;
  color: #e7f4ec;
  z-index: 2;
  box-shadow: 0 20px 50px rgba(0,0,0,.35);
}

.cfp-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.cfp-modal-header h4 {
  margin: 0;
  padding-right: 0;
  line-height: 1.25;
  font-size: 28px;
  color: #e7f4ec;
  flex: 1 1 auto;
}

.cfp-modal-close {
  position: static;
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(92, 191, 128, .55);
  background: var(--cfp-gold);
  color: #052015;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.cfp-modal-content {
  white-space: pre-wrap;
  color: #e7f4ec;
  line-height: 1.6;
  word-break: break-word;
}

.cfp-modal-open {
  overflow: hidden;
}

@media (max-width:768px) {
  .cfp-wrap {
    padding: 12px;
    border-radius: 14px;
  }

  .cfp-card.cfp-files-card {
    padding: 0;
    background: transparent;
    border: none;
  }

  .cfp-table-wrap {
    padding: 12px;
  }

  .cfp-table,
  .cfp-table thead,
  .cfp-table tbody {
    display: block;
    min-width: 0;
    width: 100%;
  }

  .cfp-table {
    border-spacing: 0;
    min-width: 0;
  }

  .cfp-table thead {
    display: none;
  }

  .cfp-table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    column-gap: 22px;
    row-gap: 14px;
    padding: 16px 0 18px;
    margin-bottom: 18px;
    position: relative;
  }

  .cfp-table tr::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(92, 191, 128, 0), rgba(92, 191, 128, .55), rgba(92, 191, 128, 0));
  }

  .cfp-table td {
    display: block;
    width: auto;
    min-width: 0;
    padding: 0;
    border: none;
    background: transparent;
  }

  .cfp-table td:first-child,
  .cfp-table td:last-child {
    border: none;
    border-radius: 0;
  }

  .cfp-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 700;
    margin-bottom: 6px;
    color: #c9e3d6;
  }

  .cfp-table td:nth-child(5),
  .cfp-table td:nth-child(6),
  .cfp-table td:nth-child(7) {
    grid-column: span 1;
  }

  .cfp-table td:nth-child(7) {
    grid-column: 1 / -1;
  }

  .cfp-action-row {
    display: flex;
    flex-wrap: nowrap;
  }

  .cfp-field-grid {
    grid-template-columns: 1fr;
  }

  .cfp-modal-dialog {
    width: min(92vw, 520px);
    padding: 18px;
  }

  .cfp-modal-header {
    align-items: center;
  }

  .cfp-modal-header h4 {
    font-size: 20px;
  }

  .cfp-modal-close {
    width: 44px;
    height: 44px;
    font-size: 24px;
    border-radius: 14px;
  }
}

.cfp-wrap input,
.cfp-wrap select,
.cfp-wrap textarea,
.cfp-wrap .cfp-card,
.cfp-wrap .cfp-table-wrap,
.cfp-wrap .cfp-dropzone,
.cfp-wrap .cfp-modal-dialog {
  border-color: rgba(92, 191, 128, .28);
}

.cfp-wrap input:focus,
.cfp-wrap select:focus,
.cfp-wrap textarea:focus {
  outline: none !important;
  border-color: #5bbd80 !important;
  box-shadow: 0 0 0 2px rgba(91, 189, 128, .22) !important;
}
