/* Demo "phòng trọ" (step 701): screen-specific layout on top of /demo/_kit/kit.css. */
.muted { color: var(--c-muted); font-size: 15px; }
.row-sub { display: block; font-size: 13px; font-weight: 400; color: var(--c-muted); }
.block-title { font-size: 18px; font-weight: 650; margin: 24px 0 12px; }
.form-title { font-size: 16px; font-weight: 650; margin: 20px 0 12px; padding-top: 16px; border-top: 1px solid var(--c-border); }
.overview-grid, .invoice-grid, .report-grid { margin-top: 16px; }
.grid-stats-3 { margin-bottom: 0; }
@media (min-width: 760px) { .grid-stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.report-grid { margin-top: 16px; }
@media (min-width: 1024px) {
  .invoice-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .report-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
}

/* rooms */
.floor + .floor { margin-top: 20px; }
.floor-title { font-size: 15px; font-weight: 650; color: var(--c-muted); margin-bottom: 10px; text-transform: none; }
.room-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .room-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.room-tile {
  display: flex; flex-direction: column; gap: 2px; height: 100%;
  min-height: 120px; padding: 14px;
  background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--r-md);
  color: inherit; text-decoration: none;
  transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease), transform 150ms var(--ease);
}
.room-tile:hover { border-color: var(--c-primary); box-shadow: 0 6px 18px var(--c-shadow); transform: translateY(-2px); }
.room-tile.is-empty { border-style: dashed; background: var(--c-canvas); }
.room-no { font-size: 17px; font-weight: 700; }
.room-who { font-weight: 550; }
.room-rent { font-size: 14px; color: var(--c-muted); font-variant-numeric: tabular-nums; }
.room-tile .chips { margin-top: auto; padding-top: 8px; }

/* room detail */
.big-total { font-size: 28px; font-weight: 700; font-variant-numeric: tabular-nums; margin-bottom: 8px; }
.pay-state { margin-top: 8px; }
.card .note { margin: 8px 0; }

/* meter table: one row per room; on phones each row becomes a small card */
.meter-table .in { width: 132px; }
.meter-table .num-input { text-align: right; font-variant-numeric: tabular-nums; max-width: 132px; }
.meter-table .field-error { text-align: right; }
.meter-totals { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; margin-top: 16px; font-size: 15px; }
.save-state { font-size: 14px; color: var(--c-accent-text); margin-top: 8px; min-height: 21px; }
@media (max-width: 759px) {
  .meter-table thead { display: none; }
  .meter-table, .meter-table tbody { display: block; }
  .meter-table tr {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px;
    padding: 14px 0; border-bottom: 1px solid var(--c-border);
  }
  .meter-table tr:first-child { padding-top: 0; }
  .meter-table th, .meter-table td { display: block; padding: 0; border: 0; text-align: left; }
  .meter-table tbody th { grid-column: 1 / -1; font-size: 16px; }
  .meter-table td::before { content: attr(data-label); display: block; font-size: 12.5px; color: var(--c-muted); font-weight: 500; }
  .meter-table td.num { text-align: left; }
  .meter-table .num-input { max-width: none; text-align: left; }
  .meter-table .field-error { text-align: left; }
  /* order: điện cũ | điện mới, điện dùng | (blank), nước cũ | nước mới, nước dùng */
  .meter-table td:nth-child(2) { grid-column: 1; grid-row: 2; }
  .meter-table td:nth-child(3) { grid-column: 2; grid-row: 2 / span 2; }
  .meter-table td:nth-child(4) { grid-column: 1; grid-row: 3; }
  .meter-table td:nth-child(5) { grid-column: 1; grid-row: 4; }
  .meter-table td:nth-child(6) { grid-column: 2; grid-row: 4 / span 2; }
  .meter-table td:nth-child(7) { grid-column: 1; grid-row: 5; }
}

/* invoice */
.invoice-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.invoice-total { font-size: 24px; font-weight: 700; color: var(--c-primary-strong); font-variant-numeric: tabular-nums; white-space: nowrap; }
.invoice-table tr.is-pending td { color: var(--c-muted); }
.invoice-table tr.is-debt th, .invoice-table tr.is-debt td { color: var(--c-danger); }
.invoice-table tbody th { font-weight: 550; }
.invoice-table tfoot th, .invoice-table tfoot td { font-size: 17px; }
.list-compact .list-row { min-height: 52px; }

/* reminders */
.msg-grid { display: grid; gap: 16px; }
.msg-grid > .card + .card { margin-top: 0; }
@media (min-width: 1024px) { .msg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.msg-card .card-head { align-items: flex-start; flex-wrap: wrap; }
.msg-card .chips { margin-top: 0; }
