/* --- Admin -------------------------------------------------------------- */

.admin-bar {
  background: var(--charcoal);
  color: var(--white);
}
.admin-bar .shell {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
  align-items: center;
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}
.admin-bar a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
}
.admin-bar a[aria-current="page"] {
  border-bottom: 2px solid var(--teal);
}

/* The review screen: document left, form right, both visible without scrolling.
 * Below the breakpoint they stack with the image pinned and collapsible, never
 * hidden (docs/architecture/bookkeeping-queue.md §7). */
.review {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .review {
    grid-template-columns: 1fr 1fr;
  }
}
.review-document {
  background: var(--off-white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  position: sticky;
  top: var(--space-4);
}
.review-document img,
.review-document embed {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--white);
  transition: transform 0.15s ease;
}
.review-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-3);
}
.review-toolbar button {
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  font: inherit;
  cursor: pointer;
}
.review-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}

.keyboard-hint {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin-top: var(--space-4);
}
kbd {
  font: inherit;
  font-size: 0.8125rem;
  padding: 1px var(--space-2);
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--off-white);
}

.queue-empty {
  text-align: center;
  padding: var(--space-16) var(--space-4);
  color: var(--ink-soft);
}

/* Respect a reduced-motion preference. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Dashboard tiles (docs/architecture/admin-layout.md) ------------------ */

.dashboard-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.dashboard-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* The overdue alert. Deliberately NOT a tile — hiding a tile hides a panel,
   never a notification. */
.alert-overdue {
  background: #FDECEF;
  border-left: 4px solid #C2185B;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.badge-overdue {
  background: #C2185B;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.1rem 0.4rem;
  border-radius: 3px;
  margin-left: 0.4rem;
}

.tile {
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  padding: 0.9rem 1rem;
  overflow: auto;
  height: 100%;
}

.tile-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.tile-head h2 {
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  color: #00767A;
}

.tile-list { list-style: none; margin: 0; padding: 0; }
.tile-list li { padding: 0.2rem 0; }
.tile-number { font-size: 2rem; font-weight: 700; margin: 0.2rem 0; }
.tile-number-bad { color: #C2185B; }
.tile-number-good { color: #00767A; }
.tile-hint, .tile-more, .tile-empty { color: #5A5A5A; font-size: 0.85rem; }

/* Only while unlocked, so a locked dashboard does not invite a drag that will
   not happen. */
.grid-stack.is-unlocked .grid-stack-item-content {
  cursor: move;
  outline: 1px dashed #00767A;
}

.hidden-tiles { margin-top: 2rem; color: #5A5A5A; }
.hidden-tiles ul { list-style: none; padding: 0; }

.linklike {
  background: none;
  border: none;
  padding: 0;
  color: #00767A;
  text-decoration: underline;
  cursor: pointer;
  font: inherit;
}

/* --- The booking queue's review pop-up ------------------------------------
   One <dialog> per open request, opened by bookings.js. The element brings its
   own modal behaviour; these rules only dress it. */
.request-dialog {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lifted);
  padding: var(--space-6);
  max-width: 34rem;
  width: calc(100% - var(--space-6));
}
.request-dialog::backdrop {
  background: rgba(51, 51, 51, 0.45);
}
.request-dialog h2 {
  margin-top: 0;
}
.request-dialog-close {
  margin-top: var(--space-4);
  text-align: right;
}

/* The request laid out as label/value rows, shared by pop-up and page. */
.request-detail {
  margin: 0;
  display: grid;
  gap: var(--space-2);
}
.request-detail > div {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: var(--space-3);
  align-items: baseline;
}
.request-detail dt {
  color: var(--ink-soft);
  font-size: 0.875rem;
}
.request-detail dd {
  margin: 0;
}

/* --- The price book's location tabs and add/remove chrome (0013) ---------- */

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  border-bottom: 3px solid var(--teal);
  margin-bottom: var(--space-6);
}
.admin-tab {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--mint);
  color: var(--teal-text);
  font-weight: 700;
  text-decoration: none;
}
.admin-tab[aria-current="page"] {
  background: var(--teal);
  color: var(--white);
}

.add-row {
  margin: var(--space-4) 0 var(--space-8);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: var(--space-3) var(--space-4);
}
.add-row summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--teal-text);
}
.add-row form { margin-top: var(--space-4); }

/* The accept / deposit / decline blocks on a booking request. */
.request-actions {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}
.request-actions h3 { margin-bottom: var(--space-2); }
