/* Party hire (upkeep): the staff app's styles for public/js/views/hire-upkeep.js. */

/* Badges on an item's card (Items tab) */
.hu-badges { display: flex; flex-wrap: wrap; gap: 4px; }
.hu-badges:empty { display: none; }

/* An item's dialog: its upkeep */
.hu-section { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.hu-head { gap: 8px; }
.hu-status { gap: 6px; }
.hu-status:empty { display: none; }
.hu-log { display: grid; gap: 0; }

/* The Upkeep tab */
.hu-actions { gap: 8px; margin-bottom: 8px; }
.hu-title { margin: 0; }
.hu-card { padding: 12px 14px; margin-bottom: 10px; display: grid; gap: 6px; }
.hu-card label.row span { font-weight: 600; }
.hu-date { width: auto; max-width: 170px; }
.hu-list { padding: 0 14px; margin-bottom: 12px; }
.hu-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.hu-line:last-child { border-bottom: 0; }
.hu-line > div:first-child { flex: 1 1 180px; min-width: 0; }
a.hu-item { color: inherit; text-decoration: none; justify-content: space-between; }
a.hu-item:hover b { text-decoration: underline; }
.hu-past { margin: 4px 0 16px; }
.hu-past summary { cursor: pointer; color: var(--muted); padding: 6px 0; }

/* A log entry */
.hu-entry { display: grid; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.hu-list .hu-entry:last-child, .hu-log .hu-entry:last-child { border-bottom: 0; }
.hu-entry-head { gap: 6px; }
.hu-note { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.hu-kind.cleaning { background: var(--info-soft); color: var(--info); }
.hu-kind.repair { background: var(--warn-soft); color: var(--warn); }
.hu-kind.inspection { background: var(--ok-soft); color: var(--ok); }
.hu-photo img { display: block; width: 120px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }

/* Bookings that need something in for repair */
.hu-warning { background: var(--warn-soft); color: var(--warn); border-radius: 8px; padding: 8px 10px; font-weight: 500; }
.hu-clashes { margin: 6px 0 0; padding-left: 18px; font-weight: 400; color: var(--text); }
.hu-clashes li { margin: 2px 0; }

/* The Earnings tab */
.he-controls { align-items: flex-end; gap: 10px; margin-bottom: 12px; }
.he-controls .field { min-width: 150px; }
.he-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 12px; }
.he-totals .card { padding: 10px 12px; }
.he-totals b { font-size: 18px; }
.he-table th, .he-table td { padding: 8px 10px; }
.he-row { cursor: pointer; }
.he-row:hover { background: var(--surface-2); }
.he-row[aria-expanded="true"] td { border-bottom-color: transparent; }
.he-name { min-width: 120px; }
.he-bar { height: 8px; border-radius: 4px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.he-bar span { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.he-detail > td { background: var(--surface-2); padding: 6px 10px 10px; }
.he-months { width: 100%; }
.he-months td { padding: 3px 6px; border: 0; font-size: 13px; }
.he-month-bar { width: 50%; }
.he-month-bar .he-bar { margin: 0; background: var(--surface); }

@media (max-width: 600px) {
  .he-table th, .he-table td { padding: 8px 6px; font-size: 13px; }
  .he-totals b { font-size: 16px; }
  .he-month-bar { width: 35%; }
  .hu-actions .btn { flex: 1 1 auto; }
}
