/* admin-pages.css: page-specific layout for admin sub-pages (agent S2) */
.text-alert { color: #b42318; }
.s2-note { color: #6b7280; font-size: 12px; }

/* header: title right, actions left */
.s2-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.s2-head .admin-actions { margin: 0; }

/* right-aligned form grid, label above input */
.s2-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 16px; direction: rtl; text-align: right; margin-top: 8px; }
.s2-form label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; text-align: right; margin: 0; }
.s2-form input, .s2-form select { width: 100%; text-align: right; }
.s2-form input.ltr { direction: ltr; text-align: right; }
.s2-form small { font-size: 12px; }
.s2-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-start; }
@media (max-width: 900px) { .s2-form { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .s2-form { grid-template-columns: 1fr; } }

/* inline edit rows */
.row-editing input { width: 100%; text-align: right; }
.row-editing input.ltr { direction: ltr; text-align: right; }
.inventory-table td, .inventory-table th { text-align: right; vertical-align: middle; }
.actions-cell { white-space: nowrap; text-align: right; }
.actions-cell form.inline { display: inline-block; margin: 0; }

/* bookings actions: one tidy row */
.bk-actions-col { width: 300px; }
.bk-actions { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; justify-content: flex-start; }
.bk-actions form { display: flex; align-items: center; gap: 6px; margin: 0; }
.bk-actions select { width: 150px; }
.btn-textdanger { background: none; border: 0; padding: 0 4px; height: var(--ctl-h-sm); color: #b42318; font: inherit; font-size: 13px; cursor: pointer; }
.btn-textdanger:hover { text-decoration: underline; }

/* power: url field + save in one row */
.s2-url-form { display: flex; align-items: center; gap: 6px; margin: 0; flex-wrap: nowrap; }
.s2-url-form input { width: 320px; text-align: left; }

/* KPI tiles equal size */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); grid-auto-rows: 1fr; gap: 12px; }
.kpi-grid .kpi { height: 100%; box-sizing: border-box; }

/* primary button fallback (navy) used on these pages */
.btn.btn-primary { background: #1f3343; color: #fff; border: 1px solid #1f3343; }
.btn.btn-primary:hover { background: #2a4558; }

/* users table */
.users-table td { vertical-align: middle; }
.users-table .user-name { font-weight: 500; }
.users-table .user-email, .users-table .user-sub { font-size: 13px; }
.users-actions-col { width: 1%; white-space: nowrap; }
.users-table .block-form { display: flex; align-items: center; gap: 6px; margin: 0; flex-direction: row; flex-wrap: nowrap; }
.users-table .hours-input { width: 64px; padding: 0 6px; text-align: center; }
.users-table .final-toggle { width: 150px; }
.users-table td form { margin: 0; }

/* analytics: neutral charts, inline period filter */
.bar-row .bar-fill { background: #1f3343; border-radius: 2px; }
.bar-track { border-radius: 2px; }
.window-label { display: flex; flex-direction: row; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.window-label select { width: 140px; }
.chart-row { align-items: stretch; }
.chart-row > .chart-card { height: 100%; box-sizing: border-box; }
/* bookings: machine cell on one line */
.bk-machine { white-space: nowrap; }
.s2-span-2 { grid-column: span 2; }
.chart-row { margin-block: 16px; }
.chart-row > .card { margin: 0; }
.bar-row { grid-template-columns: 150px 1fr 40px; }
/* heatmap: compact fixed-height cells, empty slots visible */
.heatmap { gap: 3px; }
.heatmap .heat-cell { aspect-ratio: auto; height: 22px; border-radius: 2px; background-color: #f1f3f5; }
.heatmap .heat-hour, .heatmap .heat-day { font-size: 12px; line-height: 22px; }
