/* ==========================================================================
   ZYNTARA BOX CRICKET - GROUND STAFF OPERATIONS DECK
   High-performance athletic operational cockpit (Responsive 2-Column Grid)
   ========================================================================== */

.staff-container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 20px 100px 20px;
}

/* Operations Top Command Bar */
.staff-topbar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 22px 28px;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.staff-topbar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-pitch);
}

.staff-role-badge {
  background: rgba(16, 185, 129, 0.12);
  color: var(--zyn-pitch);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.staff-pitch-status-dot {
  font-size: 11px;
  font-weight: 700;
  color: var(--zyn-pitch);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Ground Crew Live KPI Stats Ribbon */
.staff-stats-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.staff-stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.staff-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.staff-stat-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-bottom: 6px;
}

.staff-stat-val {
  font-size: 24px;
  font-weight: 900;
  font-family: var(--font-heading);
  color: var(--text-primary);
  line-height: 1.1;
}

/* Operational Filter Tabs */
.staff-filter-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.staff-filter-tab {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-fast);
}

.staff-filter-tab:hover {
  border-color: var(--zyn-pitch);
  color: var(--zyn-pitch);
}

.staff-filter-tab.active {
  background: var(--grad-pitch);
  color: #ffffff;
  border-color: transparent;
  box-shadow: var(--shadow-glow-pitch);
}

/* Roster Grid (Balanced 2-Column Desktop Grid) */
.staff-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

@media (max-width: 600px) {
  .staff-roster-grid {
    grid-template-columns: 1fr;
  }
}

/* Match Card */
.staff-match-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 22px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.staff-match-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(16, 185, 129, 0.4);
}

.staff-match-card.live-active {
  border-color: #10b981;
  background: linear-gradient(150deg, rgba(16, 185, 129, 0.06) 0%, var(--bg-card) 60%);
  box-shadow: 0 4px 25px rgba(16, 185, 129, 0.18);
}

.staff-match-card.alert-active {
  border-color: #ef4444;
  background: linear-gradient(150deg, rgba(239, 68, 68, 0.08) 0%, var(--bg-card) 60%);
  animation: staffPulse 1.4s infinite ease-in-out;
}

.staff-match-card.completed-card {
  opacity: 0.9;
  border-color: var(--border-color);
  background: var(--bg-card);
}

.staff-match-card.upcoming-card {
  border-color: rgba(37, 99, 235, 0.2);
}

@keyframes staffPulse {
  0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
  100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Card Header */
.staff-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-time-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.staff-time-badge {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  background: var(--bg-input);
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.staff-lighting-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--zyn-amber);
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.staff-lighting-badge.daylight {
  color: var(--text-secondary);
  background: var(--bg-input);
  border-color: var(--border-color);
}

/* Status Pills */
.staff-status-pill {
  font-size: 11.5px;
  font-weight: 800;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.staff-status-pill.live {
  background: rgba(16, 185, 129, 0.15);
  color: var(--zyn-pitch);
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.staff-status-pill.alert {
  background: #ef4444;
  color: #ffffff;
  animation: blinker 1s linear infinite;
  box-shadow: 0 2px 10px rgba(239, 68, 68, 0.4);
}

.staff-status-pill.upcoming {
  background: var(--brand-green-soft);
  color: var(--brand-green);
  border: 1px solid var(--brand-green-border);
}

.staff-status-pill.completed {
  background: var(--bg-input);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

/* Code sub-bar */
.staff-code-bar {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 14px;
  display: flex;
  gap: 6px;
  font-family: var(--font-mono);
}

/* Player Identity Block */
.staff-player-block {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 16px;
  flex: 1;
}

.staff-player-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.staff-player-identity {
  display: flex;
  align-items: center;
  gap: 8px;
}

.staff-player-icon {
  font-size: 17px;
}

.staff-player-name {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  font-family: var(--font-heading);
}

.staff-wa-link {
  font-size: 12px;
  font-weight: 700;
  color: #059669;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition-fast);
}

.staff-wa-link:hover {
  background: #059669;
  color: #ffffff;
  transform: translateY(-1px);
}

.staff-badges-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.staff-checkin-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.staff-checkin-badge.checked {
  background: rgba(16, 185, 129, 0.15);
  color: var(--zyn-pitch);
}

.staff-checkin-badge.awaiting {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
}

.staff-pay-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.staff-pay-badge.paid {
  background: rgba(16, 185, 129, 0.12);
  color: var(--zyn-pitch);
}

.staff-pay-badge.partial {
  background: rgba(249, 115, 22, 0.12);
  color: var(--zyn-orange);
}

.staff-pay-badge.due {
  background: rgba(239, 68, 68, 0.12);
  color: var(--zyn-red);
}

.staff-pay-badge.pos {
  background: var(--brand-green-soft);
  color: var(--brand-green);
}

/* Action Controls (Clean, balanced buttons positioned at bottom) */
.staff-action-container {
  margin-top: auto;
}

.staff-action-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.staff-action-btn {
  padding: 10px 16px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-subtle);
  transition: all var(--transition-fast);
}

.staff-action-btn.btn-checkin {
  flex: 1.4;
  background: var(--grad-pitch);
  color: #ffffff;
  box-shadow: var(--shadow-glow-pitch);
}

.staff-action-btn.btn-checkin:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.staff-action-btn.btn-collect-bal {
  flex: 1.4;
  background: var(--grad-orange);
  color: #ffffff;
  box-shadow: var(--shadow-glow-orange);
}
.staff-action-btn.btn-collect-bal:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.staff-action-btn.btn-whistle {
  flex: 1.2;
  background: var(--grad-orange);
  color: #ffffff;
  box-shadow: var(--shadow-glow-orange);
}

.staff-action-btn.btn-whistle.urgent-pulse {
  animation: whistleFlash 0.8s infinite alternate;
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.7);
  background: #ef4444;
}

.staff-action-btn.btn-view-pass {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 10px 14px;
}
.staff-action-btn.btn-view-pass:hover {
  background: var(--border-color);
  border-color: var(--zyn-pitch);
  color: var(--zyn-pitch);
}

.staff-concluded-badge {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 14px;
  border-radius: var(--radius-full);
  text-align: center;
}

@keyframes whistleFlash {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(1.03); filter: brightness(1.2); }
}

/* Midnight Sync Card */
.midnight-sync-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-card);
}

/* POS Modal Dialog */
.staff-pos-dialog {
  border: none;
  border-radius: var(--radius-xl);
  padding: 26px;
  background: var(--bg-card);
  color: var(--text-primary);
  box-shadow: var(--shadow-card-hover);
  max-width: 580px;
  width: 90%;
  margin: auto;
}

.staff-pos-dialog::backdrop {
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
}

.pos-tiles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.pos-tile {
  background: var(--bg-input);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pos-tile:hover {
  border-color: var(--zyn-pitch);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow-pitch);
}

.pos-tile-icon {
  font-size: 26px;
  margin-bottom: 6px;
}

.pos-tile-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

.pos-tile-price {
  font-size: 13px;
  font-weight: 800;
  color: var(--zyn-pitch);
  margin-top: 3px;
}

.pos-summary-card {
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.pos-summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.pos-summary-line.total-line {
  font-size: 16px;
  font-weight: 900;
  color: var(--text-primary);
  border-top: 1px solid var(--border-color);
  padding-top: 8px;
  margin-top: 8px;
}

.pos-cart-items-wrapper {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
  max-height: 160px;
  overflow-y: auto;
}

.pos-cart-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 12px;
  transition: all var(--transition-fast);
}

.pos-cart-item-row:hover {
  border-color: rgba(239, 68, 68, 0.4);
}

.pos-cart-item-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-primary);
}

.pos-cart-item-amount {
  font-size: 12px;
  font-weight: 800;
  color: var(--zyn-pitch);
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.pos-deduct-btn {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.pos-deduct-btn:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  transform: scale(1.03);
}

