.rec-gate {
  text-align: center;
  padding: 12px 0 4px;
}

.rec-gate p {
  margin: 0 0 16px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.rec-note {
  margin: 0 0 20px;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.rec-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.rec-toolbar .tb-btn {
  flex: 0 0 auto;
}

.rec-toolbar .tb-btn[hidden],
.tb-btn[hidden] {
  display: none !important;
}

.rec-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: 14px;
  color: #374151;
  cursor: pointer;
}

.rec-check input {
  width: 16px;
  height: 16px;
}

.rec-field {
  margin-bottom: 14px;
}

.rec-field .field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.rec-input,
.rec-select,
.rec-textarea {
  width: 100%;
  max-width: 420px;
  padding: 10px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  color: #111827;
  background: #fff;
  box-sizing: border-box;
}

.rec-textarea {
  min-height: 88px;
  resize: vertical;
}

.rec-input:focus,
.rec-select:focus,
.rec-textarea:focus {
  outline: 2px solid #2563eb;
  outline-offset: 0;
  border-color: #2563eb;
}

.rec-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rec-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  background: #fff;
}

.rec-item-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.rec-item-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
  word-break: break-word;
}

.rec-item-meta {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.45;
}

.rec-item-value {
  margin: 6px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: #1e3a8a;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.rec-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.rec-progress {
  margin-top: 10px;
  height: 8px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.rec-progress > span {
  display: block;
  height: 100%;
  background: #2563eb;
  border-radius: inherit;
}

.rec-progress.is-done > span {
  background: #16a34a;
}

.rec-empty {
  margin: 8px 0 0;
  font-size: 14px;
  color: #94a3b8;
  text-align: center;
  padding: 24px 8px;
}

.rec-section-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}

.rec-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.rec-filters .rec-input,
.rec-filters .rec-select {
  max-width: 200px;
  flex: 1 1 140px;
}

.rec-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.rec-chip {
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.rec-chip.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.rec-txn-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.rec-txn {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #f1f5f9;
  border-radius: 8px;
  background: #f8fafc;
  font-size: 13px;
}

.rec-txn-type-deposit {
  color: #16a34a;
  font-weight: 700;
}

.rec-txn-type-withdraw {
  color: #dc2626;
  font-weight: 700;
}

.rec-rent-status {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  line-height: 1.4;
}

.rec-rent-status.is-paid {
  color: #15803d;
  background: #dcfce7;
}

.rec-rent-status.is-due {
  color: #a16207;
  background: #fef9c3;
}

.rec-rent-status.is-overdue {
  color: #b91c1c;
  background: #fee2e2;
}

.rec-rent-status.is-partial {
  color: #c2410c;
  background: #ffedd5;
}

.rec-rent-status.is-full {
  color: #15803d;
  background: #dcfce7;
}

.rec-status-line {
  margin: 8px 0 0;
  font-size: 14px;
}

/* Rent list cards — roomier layout */
.rec-list.rec-rent-list {
  gap: 14px;
}

.rec-item.rec-rent-item {
  padding: 16px 18px 14px;
}

.rec-rent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.rec-rent-head .rec-item-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 17px;
  line-height: 1.35;
}

.rec-rent-head .rec-rent-status {
  flex-shrink: 0;
  font-size: 13px;
  padding: 4px 10px;
  margin-top: 1px;
}

.rec-rent-item .rec-item-meta {
  margin: 0 0 10px;
  font-size: 14px;
  color: #475569;
  line-height: 1.5;
}

.rec-rent-amt {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  color: #1e3a8a;
}

.rec-rent-amt.is-full {
  color: #15803d;
}

.rec-rent-amt.is-partial {
  color: #c2410c;
}

.rec-rent-owed {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 600;
  color: #b45309;
  line-height: 1.4;
}

.rec-rent-item .rec-item-actions {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

#detail-view .rec-progress {
  margin: 8px 0 16px;
  max-width: 420px;
}

#detail-view .rec-section-title {
  margin-top: 8px;
}

.rec-days-today .rec-item-value {
  color: #16a34a;
}

.rec-days-past .rec-item-value {
  color: #1e3a8a;
}

.rec-rating {
  color: #d97706;
  font-weight: 600;
}

.rec-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.rec-dialog[hidden] {
  display: none !important;
}

.rec-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.rec-dialog-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 400px;
  padding: 20px 18px 16px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.rec-dialog-hint {
  margin: -4px 0 14px;
  color: #64748b;
  font-size: 13px;
  line-height: 1.4;
}

.rec-dialog-panel .rec-input {
  max-width: none;
}

@media (max-width: 768px) {
  .rec-input,
  .rec-select,
  .rec-textarea,
  .rec-filters .rec-input,
  .rec-filters .rec-select {
    max-width: none;
  }

  .rec-item-main {
    flex-direction: column;
  }
}
