/* ===== Staff order board — light theme, consistent with the rest of the admin UI ===== */
.staff-body { background: var(--cream); color: var(--green-900); min-height: 100vh; }

.staff-header {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 16px; justify-content: space-between;
  padding: 14px 20px; background: var(--green-900); color: #fff;
}
.staff-brand { font-weight: 700; font-size: 1.1rem; }
.staff-status { font-size: 0.85rem; color: #bfe6cf; }
.staff-status.on { color: #8fe0a8; }
.sound-toggle { font-size: 0.9rem; color: #dfeada; cursor: pointer; }

.board {
  display: grid; gap: 16px; padding: 20px;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  align-content: start;
}
.empty { color: var(--muted); grid-column: 1 / -1; text-align: center; padding: 60px 20px; }

.card {
  background: #fff; border: 1px solid rgba(31,61,43,0.12); border-radius: 14px;
  padding: 16px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: 0 4px 14px rgba(31,61,43,0.07);
  animation: pop 0.3s ease;
}
@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.card.new { border-color: #2f9d5a; box-shadow: 0 0 0 2px rgba(47,157,90,0.28); }
.card.confirmed { opacity: 0.9; }
.card.ready { border-color: #c9a53a; }
.card.done, .card.rejected, .card.soldout { opacity: 0.55; }

.card-top { display: flex; justify-content: space-between; align-items: baseline; }
.badge {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.badge.pickup { background: #dbe9f7; color: #24557f; }
.badge.delivery { background: #efdcf7; color: #6a3a7a; }
.badge.instore { background: #e2f0d9; color: #3a6a1f; }
.badge.paid { background: #d8ffe4; color: #1f6b3a; }
.badge.unpaid { background: #ffeec2; color: #7a5f14; }
.card.paid { outline: 2px solid #2f9d5a; }
.card.cancelled { opacity: 0.7; }
.card.new:not(.paid) { outline: 1px dashed #c9a53a; }
.refund { background: #fdecea; border: 1px solid #f0c0b8; border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; color: #b8341f; font-weight: 700; }
.refund small { font-weight: 400; opacity: 0.8; }
.warn { background: #fdf4e0; border: 1px solid #e8d3a0; border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; color: #8a6d1f; font-weight: 700; }
.warn small { font-weight: 400; opacity: 0.8; }
.badge.pickedup { background: #d3ede0; color: #1f6b47; }
.badge.buzzer { background: #ffe4bd; color: #7a4a12; font-size: 0.8rem; }
.cl-buzzer { flex: none; background: #ffe4bd; color: #7a4a12; font-weight: 800; font-size: 0.82rem; padding: 2px 8px; border-radius: 999px; }

/* Archive-all bar + collapsed (picked-up / cancelled) order lines */
.archive-bar { display: flex; justify-content: flex-end; margin: 2px 2px 8px; }
.archive-all { border: 1px solid rgba(31,61,43,0.25); background: transparent; color: var(--green-700); font-weight: 600; padding: 6px 12px; border-radius: 999px; cursor: pointer; font-size: 0.85rem; }
.archive-all:hover { background: rgba(31,61,43,0.06); }
.card.collapsed { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; opacity: 0.95; }
.card.collapsed .cl-row { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; cursor: pointer; }
.card.collapsed .cl-tag { font-size: 1.15rem; flex: none; }
.card.collapsed .cl-name { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.collapsed .cl-meta { color: var(--muted); font-size: 0.88rem; white-space: nowrap; margin-left: auto; flex: none; }
.card.collapsed .cl-actions { flex: none; }
.card.collapsed .cl-actions button { padding: 6px 10px; }
.card-top.tap-collapse { cursor: pointer; }
button:disabled { opacity: 0.5; }
.contact-row { margin-top: 8px; }
.act-line { width: 100%; border: none; border-radius: 10px; background: #06c755; color: #fff; font-weight: 700; padding: 10px; cursor: pointer; font-size: 0.92rem; }
.act-line:hover { filter: brightness(1.06); }

/* Login gate */
.staff-login { max-width: 320px; margin: 70px auto; text-align: center; background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.staff-login h2 { margin: 0 0 16px; color: var(--green-900); }
.staff-login input { width: 100%; padding: 12px; border: 1px solid rgba(31,61,43,0.2); border-radius: 10px; font-size: 1rem; margin-bottom: 12px; }
.staff-login button { width: 100%; border: none; background: var(--green-700); color: #fff; padding: 12px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.staff-login .login-err { color: #c0392b; margin: 10px 0 0; }
.card-time { font-size: 0.8rem; color: var(--muted); }

.cust { font-weight: 600; }
.cust small { color: var(--muted); font-weight: 400; }

/* Real LINE identity (so staff can match the account in OA even if the
   customer typed a different name on the order form). */
.line-id { display: flex; align-items: center; gap: 7px; margin: 3px 0 2px; }
.line-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; background: #d7e6da; }
.line-av.ph { display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; }
.line-av.sm { width: 20px; height: 20px; margin: 0 6px 0 2px; }
.line-tag { font-size: 0.62rem; font-weight: 800; letter-spacing: 0.4px; color: #fff; background: #06c755; border-radius: 5px; padding: 1px 5px; }
.line-nm { font-size: 0.88rem; color: var(--green-700); }
.cl-row .line-av.sm { vertical-align: middle; }
.when { font-size: 0.9rem; color: var(--muted); }

.items { list-style: none; margin: 4px 0; padding: 0; }
.items li { display: flex; justify-content: space-between; padding: 3px 0; font-size: 0.95rem; }
.items .q { color: var(--green-700); font-weight: 700; margin-right: 6px; }
.it-detail { color: var(--muted); font-size: 0.82rem; margin: 2px 0 4px 22px; }
.total { display: flex; justify-content: space-between; font-weight: 700; border-top: 1px solid rgba(31,61,43,0.14); padding-top: 8px; }
.note { background: #eef6e6; border-radius: 8px; padding: 8px 10px; font-size: 0.9rem; color: #46531f; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.actions button {
  border: none; border-radius: 10px; padding: 10px 12px; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; flex: 1 1 auto;
}
.act-confirm { background: #2f7d4a; color: #fff; }
.act-eta { background: #cfe9d5; color: #1f4d33; }
.act-ready { background: #b8901f; color: #fff; }
.act-done { background: #e2ece5; color: #26402d; }
.act-reject { background: #f3d9d9; color: #8a2222; }
.act-cash { background: #1f5c4a; color: #d6fff0; }
.act-charge { background: #2a5ca8; color: #fff; }
.act-paid { background: #1f6b3a; color: #fff; }
.actions button.btn-done { background: #dfe5db; color: #8a968a; cursor: default; }
.actions button:hover { filter: brightness(1.06); }
.actions button:active { transform: scale(0.96); }

.status-line { font-size: 0.82rem; color: var(--muted); }
