/* ============================================================
   Task Payment Tracker - Responsive, Mobile-first Design
   Brand: #032CA6 (navy), #fe6241 (orange-red)
   ============================================================ */

.tpt-dashboard-wrap {
  max-width: 1200px;
  margin: 20px auto;
  padding: 20px;
  background: #f9f9fb;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ============================================================
   STATS GRID
   ============================================================ */
.tpt-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}
.tp-stat-box {
  /* background: linear-gradient(145deg, #032ca6, #021f70); */
  background-color: #000;
  color: #fff;
  text-align: center;
  padding: 30px 20px;
  border-radius: 12px;
  font-size: 1.05rem;
  font-weight: 500;
  box-shadow: 0 4px 8px rgb(255 255 255 / 12%);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid #eee;
}
.tp-stat-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}
.tp-stat-box h4 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
}
.tp-stat-box p {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
}

/* ============================================================
   FORMS + BUTTONS
   ============================================================ */

.tpt-wrapper_inner {
  display: flex;
  flex-direction: row;
  gap: 20px;
}
.tpt-wrapper_inner .tpt-section {
  width: 50%;
}
.tpt-section h3 {
  color: #fff !important;
}
#tpt-add-task-form {
  border: 1px solid #ddd;
  padding: 20px;
  border-radius: 10px;
  background: #1d1d1d;
  margin: 10px 0px;
}
.tpt-form input,
.tpt-form select,
.tpt-btn {
  padding: 10px;
  margin-right: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 15px;
  display: inline-block;
  box-sizing: border-box;
  background: #1d1d1d !important;
  color: #fff !important;
}
.tpt-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-top: 5px;
  margin-bottom: 15px;
  box-sizing: border-box;
  height: 120px;
  background: #1d1d1d !important;
  color: #fff !important;
}
.tpt-form input::placeholder,
.tpt-form textarea::placeholder,
#tpt-payment-form input::placeholder,
.tpt-form input::placeholder {
  color: #fff !important; /* Light gray color */
}
.tpt-form input:focus,
.tpt-form select:focus {
  outline: none;
  border-color: #032ca6;
  box-shadow: 0 0 0 2px rgba(3, 44, 166, 0.15);
}

/* Unified Button Theme */
.tpt-btn {
  cursor: pointer;
  border: none;
  text-align: center;
  font-weight: 600;
  transition: all 0.25s ease;
  border-radius: 6px;
  color: #fff !important;
  background-color: #fe6241;
}
.tpt-btn:hover {
  background-color: #fe6241;
}

.tpt-btn-primary,
.tpt-btn-success,
.tpt-btn-info {
  background-color: #fe6241;
  color: #fff;
}
.tpt-btn-info {
  background-color: #fe6241;
  color: #fff;
  border: none;
}
.tpt-btn-danger {
  background-color: #dc3545;
  color: #fff;
  border: none;
}
.tpt-btn-info:hover,
.tpt-btn-success:hover,
.tpt-btn-primary:hover {
  background-color: #fe6241;
}
.tpt-btn-danger:hover {
  background-color: #c82333;
}
.tpt-btn-warning {
  background-color: #ffc107;
  color: #000;
  border: none;
}
.tpt-btn-warning:hover {
  background-color: #e0a800;
}
.tpt-btn-secondary {
  background-color: #6c757d;
  color: #fff;
  border: none;
}
.tpt-btn-secondary:hover {
  background-color: #5a6268;
}

/* ============================================================
   TABLES
   ============================================================ */
.tpt-table {
  width: 100%;
  border-collapse: collapse;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tpt-table th,
.tpt-table td {
  padding: 12px;
  border: 1px solid #eee;
  text-align: left;
  font-size: 15px;
  color: #fff;
}
.tpt-table th {
  background-color: #000;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 13px;
  letter-spacing: 0.3px;
  color: #fff;
}

/* ============================================================
   RESPONSIVE TABLE (mobile-first stack layout)
   ============================================================ */
@media (max-width: 768px) {
  .tpt-table,
  .tpt-table thead,
  .tpt-table tbody,
  .tpt-table th,
  .tpt-table td,
  .tpt-table tr {
    display: block;
  }
  .tpt-table thead {
    display: none !important;
  }
  .tpt-table.tpt-history-table thead {
    display: block !important;
  }

  .tpt-table thead tr {
    position: absolute;
    top: 31px;
    left: 40px;
    border: navajowhite;
  }
  .tpt-table thead tr th {
    border: none;
    padding: 15px 0px;
    background: #1d1d1d;
  }

  .tpt-table tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
  }

  .tpt-table td {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 50%;
    text-align: left;
    min-height: 35px;
  }

  .tpt-table td:before {
    position: absolute;
    top: 10px;
    left: 15px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: 600;
    color: #032ca6;
    content: attr(data-label);
  }

  .tpt-table td:last-child {
    border-bottom: 0;
  }
}

/* ============================================================
   FILTERS
   ============================================================ */

#tpt-filter-form {
  background: #1d1d1d;
  padding: 15px;
  border: 1px solid #fed4b7;
  border-radius: 6px;
  margin-top: 15px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
}

/* ============================================================
   USER TOTALS
   ============================================================ */
.tpt-user-totals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

.tpt-total-box {
  background: #1d1d1d;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.tpt-total-box h4 {
  font-size: 19px !important;
  color: #fff !important;
}
.tpt-total-box p {
  margin: 0 !important;
  font-size: 16px !important;
  color: #fff !important;
}
#tpt-user-totals h3 {
  margin-top: 0;
}

.tpt-total-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.tpt-total-box h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #495057;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tpt-total-box p {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  color: #032ca6;
}

#tpt-user-totals {
  background: #1d1d1d;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
}

/* ============================================================
   MODAL
   ============================================================ */
.tpt-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
}
#tpt-payment-form {
  color: #fff;
}
.tpt-modal-content {
  background-color: #1d1d1d;
  margin: 8% auto;
  padding: 25px;
  border-radius: 10px;
  width: 90%;
  max-width: 480px;
  position: relative;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}
.tpt-modal-content h4 {
  margin: 0 0 15px;
  border-bottom: 2px solid #032ca6;
  padding-bottom: 8px;
  color: #032ca6;
}
.tpt-close-btn {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  transition: 0.2s;
}
.tpt-close-btn:hover {
  color: #000;
}

/* ============================================================
   PAYMENT HISTORY
   ============================================================ */
.tpt-payment-history-row td {
  background: #fafafa;
  border-top: none;
}
.tpt-payment-history-content {
  padding: 10px;
}
.tpt-history-table {
  margin: 0;
  background: #fff;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.tpt-status-unpaid {
  color: #fe6241;
  font-weight: 700;
}
.tpt-status-partial {
  color: #fbbf24;
  font-weight: 700;
}
.tpt-status-paid {
  color: #229954;
  font-weight: 700;
}

/* ============================================================
   FORM RESPONSIVENESS
   ============================================================ */
@media (max-width: 768px) {
  .tpt-form input,
  .tpt-form select,
  .tpt-btn {
    width: 100%;
    margin-right: 0;
  }
}

/* ============================================================
   ADMIN PAGE COMPATIBILITY (for Payment Methods shortcode)
   ============================================================ */

.tpt-form label {
  font-weight: 600;
  margin-top: 10px;
  display: block;
  color: #fff;
}

.tpt-form input[type="text"],
.tpt-form input[type="number"],
.tpt-form select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc !important;
  border-radius: 6px;
  margin-top: 5px;
  margin-bottom: 15px;
  box-sizing: border-box;
  background: #1d1d1d !important;
  color: #fff;
}

.tpt-form button,
.button-primary,
.tpt-btn {
  background-color: #fe6241 !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 6px;
  padding: 10px 16px;
  cursor: pointer;
  transition: 0.25s ease;
}

.tpt-form button:hover,
.button-primary:hover,
.tpt-btn:hover {
  background-color: #b32303 !important;
}

/* Tables inside admin shortcode */
.widefat,
.tpt-wrapper table {
  border: 1px solid #e1e1e1;
  border-collapse: collapse;
  /* background: #fff; */
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
}
.tpt-wrapper table {
  background: #1d1d1d !important;
  color: #000 !important;
  border: 1px solid #eee;
  overflow: visible;
}
.tpt-wrapper table td {
  color: #fff;
}

.widefat th,
.widefat td,
.tpt-wrapper table th,
.tpt-wrapper table td {
  border: 1px solid #ddd;
  padding: 10px;
  font-size: 14px;
}

.widefat thead th {
  background: #1d1d1d;
  color: #fff !important;
  font-weight: 600;
  text-transform: uppercase;
}

/* ===== Payment History Modal Tweaks ===== */
.tpt-history-table-wrap {
  max-height: 60vh;
  overflow: auto;
}
.tpt-history-table th,
.tpt-history-table td {
  font-size: 14px;
}
.tpt-modal-content h3 {
  margin-top: 0;
}
.tpt-modal-close {
  position: absolute;
  right: -43px;
  background: #000;
  color: #fff;
  width: 32px;
  height: 32px;
  text-align: center;
  border-radius: 100%;
  font-size: 21px;
  line-height: 25px;
  cursor: pointer;
  top: 0px;
}
#tpt-edit-task-form {
  height: 450px;
  overflow-y: scroll;
}
.tpt-modal-content h3 {
  display: none !important;
}
.page-id-19 #main,
.page-id-112 #main,
.page-id-22 #main {
  background-color: #1d1d1d !important;
}

@media (max-width: 768px) {
  .tpt-wrapper_inner {
    flex-direction: column;
  }
  .tpt-wrapper_inner .tpt-section {
    width: 100%;
  }
  .tpt-table tr {
    background-color: #1d1d1d;
  }
  .tpt-wrapper table {
    border: none !important;
  }
}

.newformclass td {
  background-color: #1d1d1d;
  color: #fff;
}
.tpt-history-table {
  background-color: #1d1d1d;
}
.tpt-history-table td {
  color: #fff;
}
.uspaid {
  color: #229954 !important;
}
#tpt-payment-form {
  height: 500px;
  overflow-y: scroll;
}
#tpt-set-amount-form,
#tpt-history-modal {
  color: #fff;
}
#tpt-description-modal {
  background-color: #1d1d1d;
  color: #fff;
}
#tpt-description-modal p {
  color: #fff;
}
#tpt-description-modal em {
  color: #fff;
}
#tpt-description-modal h3 {
  color: #fff;
}
#tpt-description-modal h4 {
  color: #fff;
}
#tpt-description-modal h5 {
  color: #fff;
}
#tpt-description-modal h6 {
  color: #fff;
}
