/* Agent daily report pages */
.content-card--report {
  padding: 0 !important;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
}

.report-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  overflow: hidden;
  max-width: 100%;
  min-width: 0;
  --report-control-h: 40px;
}

.report-panel__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-page);
}

.report-panel__head i,
.report-panel__head svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  opacity: 0.75;
}

.report-panel__head h1 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.report-panel__body {
  padding: 18px 20px 20px;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.report-filter__row {
  display: grid;
  grid-template-columns: minmax(140px, 180px) 1fr;
  gap: 10px 20px;
  align-items: center;
  margin-bottom: 14px;
}

.report-field__label {
  text-align: right;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.report-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

.report-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-dark);
  cursor: pointer;
}

.report-radio-group input[type="radio"] {
  accent-color: var(--accent-green);
}

.report-filter__row select,
.report-filter__row input[type="text"],
.report-filter__row input[type="date"] {
  height: var(--report-control-h);
  min-height: var(--report-control-h);
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
  background: #fff;
  max-width: 320px;
}

.report-filter__row select:focus,
.report-filter__row input:focus {
  outline: none;
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(61, 184, 138, 0.15);
}

.report-date-range {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.report-date-range select {
  max-width: 200px;
}

.report-date-range input {
  width: 130px;
  max-width: 130px;
}

.report-date-range__sep {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.report-filter__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 20px;
  margin: 20px 0 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.report-filter__actions-main,
.report-filter__actions-export {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.report-filter__actions .btn-primary,
.report-filter__actions .btn-secondary,
.report-filter__actions .btn-danger {
  min-width: 110px;
  justify-content: center;
  height: var(--report-control-h);
  box-sizing: border-box;
}

.report-table-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  max-width: 100%;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.report-table-wrap::-webkit-scrollbar {
  height: 8px;
}

.report-table-wrap::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.report-table th,
.report-table td {
  padding: 10px 12px;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

.report-table thead th {
  background: var(--bg-page);
  font-weight: 600;
  white-space: nowrap;
}

.report-table tbody tr:nth-child(even) {
  background: #fafbfc;
}

.report-table .col-money {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.report-table .col-center {
  text-align: center;
}

.report-empty td {
  text-align: center;
  color: var(--text-muted);
  padding: 28px 12px !important;
}

@media (max-width: 768px) {
  .report-filter__row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .report-field__label {
    text-align: left;
  }

  .report-filter__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .report-filter__actions-main,
  .report-filter__actions-export {
    justify-content: center;
  }
}

/* ── Renew page ── */
.renew-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.renew-toolbar__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.renew-toolbar__field label {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.renew-toolbar__field select,
.renew-toolbar__field input[type="date"] {
  height: var(--report-control-h);
  min-height: var(--report-control-h);
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
  box-sizing: border-box;
  background: #fff;
}

.renew-toolbar__field select {
  min-width: 180px;
}

.renew-toolbar__field--action {
  flex: 0 0 auto;
}

.renew-toolbar .btn-primary.btn-sm {
  height: var(--report-control-h);
  min-height: var(--report-control-h);
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.renew-table {
  font-size: 0.82rem;
  width: 100%;
  min-width: 1080px;
  table-layout: auto;
}

.renew-table th,
.renew-table td {
  padding: 8px 10px;
  vertical-align: top;
}

.renew-table th:nth-child(1),
.renew-table td:nth-child(1) {
  min-width: 128px;
}

.renew-table th:nth-child(3),
.renew-table td:nth-child(3) {
  white-space: normal;
  min-width: 140px;
  max-width: 200px;
}

.renew-table th:nth-child(4),
.renew-table td:nth-child(4) {
  white-space: normal;
  min-width: 150px;
  max-width: 180px;
  font-size: 0.8rem;
}

.renew-table th:nth-child(5),
.renew-table td:nth-child(5),
.renew-table th:nth-child(10),
.renew-table td:nth-child(10) {
  white-space: nowrap;
}

.renew-table .col-money {
  white-space: nowrap;
}

.renew-policy-link {
  color: var(--accent-blue);
  font-weight: 600;
  text-decoration: none;
}

.renew-policy-link:hover {
  text-decoration: underline;
}

.renew-expiry {
  color: var(--accent-red);
  font-weight: 600;
}

.report-total-row td {
  border-top: 2px solid var(--border);
  background: var(--bg-page);
  padding-top: 12px;
  padding-bottom: 12px;
}

@media (max-width: 768px) {
  .renew-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .renew-toolbar__field select {
    width: 100%;
    min-width: 0;
  }
}
