/* ==========================================================================
   FEAST.ART STUDIO EATERY — STAFF KIOSK STYLESHEET
   Page 1: Dedicated Front-of-House Attendance & Biometric Verification
   ========================================================================== */

:root {
  --primary: #d97706;
  --primary-hover: #b45309;
  --primary-light: #fffbeb;
  --primary-border: #fde68a;
  
  --bg-main: #f8fafc;
  --card-bg: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  
  --success-bg: #dcfce7;
  --success-border: #86efac;
  --success-text: #15803d;
  
  --info-bg: #e0f2fe;
  --info-border: #bae6fd;
  --info-text: #0369a1;
  
  --danger-bg: #fee2e2;
  --danger-border: #fca5a5;
  --danger-text: #b91c1c;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 35px rgba(0,0,0,0.16);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* -------------------------------------------------------------
   THEME PALETTE: DARK MODE (MANUAL & SYSTEM DEVICE ADAPTIVE)
   ------------------------------------------------------------- */
[data-theme="dark"],
:root[data-theme="dark"] {
  --bg-main: #12100e;
  --card-bg: #1c1917;
  --text-main: #f5f0ea;
  --text-muted: #a8a29e;
  --border-subtle: #2d2825;
  --border-strong: #38332e;
  --primary-light: #2d2416;
  --primary-border: #78350f;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-main: #12100e;
    --card-bg: #1c1917;
    --text-main: #f5f0ea;
    --text-muted: #a8a29e;
    --border-subtle: #2d2825;
    --border-strong: #38332e;
    --primary-light: #2d2416;
    --primary-border: #78350f;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* -------------------------------------------------------------
   GLOBAL HEADER
   ------------------------------------------------------------- */
.kiosk-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow-sm);
}

.brand-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  cursor: pointer;
}

.brand-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.header-live-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #f1f5f9;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
}

.live-pulse-dot {
  width: 9px;
  height: 9px;
  background-color: var(--success-text);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.stat-pill {
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 700;
}

.stat-on { background: var(--success-bg); color: var(--success-text); border: 1px solid var(--success-border); }
.stat-out { background: var(--info-bg); color: var(--info-text); border: 1px solid var(--info-border); }
.stat-off { background: #e2e8f0; color: #475569; }

.header-clock-box {
  display: flex;
  flex-direction: column;
  text-align: right;
  line-height: 1.2;
}

.live-time {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

.live-date {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-admin-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: #334155;
  border: 1.5px solid var(--border-strong);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-admin-nav:hover {
  background: #f1f5f9;
  color: var(--text-main);
  border-color: #94a3b8;
}

/* -------------------------------------------------------------
   KIOSK MAIN CONTAINER
   ------------------------------------------------------------- */
.kiosk-main {
  flex: 1;
  max-width: 1040px;
  width: 100%;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

/* Welcome Card */
.kiosk-welcome-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  padding: 2rem;
  margin-bottom: 2rem;
}

.kiosk-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.hero-text h1 {
  font-size: 1.65rem;
  font-weight: 850;
  letter-spacing: -0.03em;
  color: #0f172a;
}

.hero-text p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.hero-location-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 600;
}

.culinary-motto-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  background: #fdfaf6;
  border: 1px dashed #e2dcd4;
  border-radius: var(--radius-md);
  padding: 0.6rem 1rem;
  color: #78716c;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 500;
  margin-bottom: 1.75rem;
}

/* Staff Quick Grid Header */
.staff-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.staff-section-title {
  font-size: 1.1rem;
  font-weight: 750;
  color: #1e293b;
}

.staff-search-input {
  background: #f8fafc;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.45rem 0.85rem;
  font-size: 0.86rem;
  color: var(--text-main);
  outline: none;
  min-width: 220px;
  transition: border-color 0.15s ease;
}

.staff-search-input:focus {
  border-color: var(--primary);
  background: #ffffff;
}

/* Staff Grid */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.staff-card {
  background: linear-gradient(145deg, #ffffff 0%, #faf8f5 100%);
  border: 2px solid #e7dfd5;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(28, 25, 23, 0.06);
}

.staff-card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: #f59e0b;
  box-shadow: 0 10px 24px rgba(217, 119, 6, 0.2);
}

.staff-card:active {
  transform: scale(0.98);
}

.staff-card.status-on_shift {
  border: 2.5px solid #22c55e;
  background: linear-gradient(145deg, #f0fdf4 0%, #dcfce7 100%);
  box-shadow: 0 8px 22px rgba(34, 197, 94, 0.25);
  animation: activeShiftGlow 3s infinite ease-in-out;
}

.staff-card.status-on_shift::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #22c55e, #10b981);
}

.staff-card.status-completed {
  border: 2.5px solid #38bdf8;
  background: linear-gradient(145deg, #f0f9ff 0%, #e0f2fe 100%);
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.2);
}

.staff-card.status-completed::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #38bdf8, #0284c7);
}

@keyframes activeShiftGlow {
  0% { box-shadow: 0 8px 22px rgba(34, 197, 94, 0.22); }
  50% { box-shadow: 0 10px 28px rgba(34, 197, 94, 0.45); }
  100% { box-shadow: 0 8px 22px rgba(34, 197, 94, 0.22); }
}

.staff-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  border: 2.5px solid #ffffff;
  color: #ffffff;
  font-weight: 850;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  position: relative;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s ease;
}

.staff-card:hover .staff-avatar {
  transform: scale(1.08);
}

.staff-card-number {
  position: absolute;
  top: 10px;
  left: 10px;
  font-size: 0.72rem;
  font-weight: 850;
  color: #78350f;
  background: #fef3c7;
  border: 1px solid #fde68a;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.staff-name {
  font-size: 1.02rem;
  font-weight: 800;
  color: #1c1917;
  margin-bottom: 0.2rem;
}

.staff-role {
  font-size: 0.8rem;
  color: #78716c;
  font-weight: 650;
  margin-bottom: 0.75rem;
  background: #f5f5f4;
  padding: 2px 8px;
  border-radius: 6px;
}

.staff-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-full);
  margin-top: auto;
}

.badge-on {
  background: linear-gradient(135deg, #16a34a, #15803d);
  color: #ffffff;
  border: 1px solid #14532d;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.35);
}

.badge-out {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  border: 1px solid #075985;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
}

.badge-off {
  background: #f5f5f4;
  color: #78716c;
  border: 1px solid #e7e5e4;
}

/* -------------------------------------------------------------
   MODAL OVERLAY & POPUPS
   ------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 580px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 10;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close-btn {
  background: #f1f5f9;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  color: #64748b;
  transition: all 0.15s ease;
}

.modal-close-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.modal-body {
  padding: 1.5rem;
  flex: 1;
}

/* -------------------------------------------------------------
   PIN KEYPAD MODAL
   ------------------------------------------------------------- */
.pin-dialog {
  max-width: 380px;
  text-align: center;
}

.pin-staff-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
}

.pin-staff-avatar {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #fef3c7;
  color: #b45309;
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.5rem;
  border: 2px solid #fde68a;
}

.pin-dots-display {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 1.25rem 0;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  background: transparent;
  transition: all 0.15s ease;
}

.pin-dot.filled {
  background: var(--primary);
  border-color: var(--primary);
  transform: scale(1.15);
}

.pin-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 1rem;
}

.pin-key {
  height: 58px;
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 1.35rem;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.pin-key:hover {
  background: #f1f5f9;
  border-color: var(--border-strong);
}

.pin-key:active {
  background: #e2e8f0;
  transform: scale(0.96);
}

.pin-key-fn {
  font-size: 0.95rem;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
}

.pin-error-text {
  color: var(--danger-text);
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 20px;
  margin-top: 0.5rem;
}

/* -------------------------------------------------------------
   VERIFICATION FLOW MODAL
   ------------------------------------------------------------- */
.verification-step {
  margin-bottom: 1.75rem;
}

.step-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 750;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

/* Camera Box */
.camera-container {
  position: relative;
  width: 100%;
  height: 260px;
  background: #000000;
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-video, .camera-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-video {
  /* Front-facing selfie camera mirror orientation */
  transform: scaleX(-1);
  -webkit-transform: scaleX(-1);
}

.camera-preview-img {
  transform: none;
  -webkit-transform: none;
}

.camera-face-guide {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 210px;
  border: 2px dashed rgba(255,255,255,0.7);
  border-radius: 50%;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.35);
}

.camera-guide-text {
  position: absolute;
  bottom: 12px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.camera-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.65rem;
}

/* Signature Box */
.signature-container {
  position: relative;
  width: 100%;
  height: 160px;
  background: #ffffff;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  touch-action: none;
}

.signature-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

.signature-baseline {
  position: absolute;
  bottom: 35px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: #cbd5e1;
  pointer-events: none;
}

.signature-placeholder, .signature-placeholder-text {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  text-align: center;
  font-size: 0.88rem;
  color: #94a3b8;
  font-weight: 600;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Location Card */
.location-card {
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.location-status-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.radar-ping-indicator {
  position: relative;
  width: 16px;
  height: 16px;
}

.radar-ping-circle {
  width: 100%;
  height: 100%;
  background: var(--primary);
  border-radius: 50%;
  position: absolute;
  animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
  75%, 100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.radar-ping-core {
  width: 10px;
  height: 10px;
  background: var(--primary-hover);
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
}

.location-headline {
  font-size: 0.88rem;
  font-weight: 750;
  color: #0f172a;
}

.location-subtext {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.location-map-wrapper,
.kiosk-map-box {
  position: relative;
  height: 220px;
  min-height: 220px;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1.5px solid var(--border-color);
  margin: 0.65rem 0;
  background: #f1f5f9;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.08);
}

.kiosk-leaflet-map,
#kioskMap {
  width: 100% !important;
  height: 100% !important;
  min-height: 220px !important;
  display: block;
}

.location-details-box {
  background: #fffdf8;
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  color: #78350f;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.map-mini-controls {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1000;
  display: flex;
  gap: 4px;
}

.btn-map-mini {
  background: #ffffff;
  border: 1.5px solid #d97706;
  border-radius: var(--radius-sm);
  padding: 3px 8px;
  font-size: 0.74rem;
  font-weight: 750;
  color: #92400e;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
  transition: all 0.15s ease;
}

.btn-map-mini:hover {
  background: #fffbeb;
  transform: translateY(-1px);
}

/* Submit Action Button */
.btn-submit-shift {
  width: 100%;
  padding: 0.9rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.3);
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-submit-shift:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-submit-shift:active {
  transform: scale(0.98);
}

.btn-submit-shift:disabled,
.btn:disabled,
.btn.btn-disabled {
  background: #cbd5e1 !important;
  color: #64748b !important;
  border-color: #cbd5e1 !important;
  box-shadow: none !important;
  cursor: not-allowed !important;
  opacity: 0.75;
}

.btn-blocked,
.btn.btn-blocked,
.btn-submit-shift.btn-blocked {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  color: #ffffff !important;
  border-color: #b91c1c !important;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3) !important;
  cursor: not-allowed !important;
  opacity: 0.95 !important;
}

/* -------------------------------------------------------------
   SUCCESS CONFIRMATION RECEIPT MODAL
   ------------------------------------------------------------- */
.receipt-dialog {
  max-width: 460px;
  text-align: center;
  padding: 2rem 1.5rem;
}

.receipt-icon-bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--success-bg);
  border: 2px solid var(--success-border);
  color: var(--success-text);
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.receipt-title {
  font-size: 1.35rem;
  font-weight: 850;
  color: #0f172a;
}

.receipt-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.receipt-details-card {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: left;
  margin-bottom: 1.25rem;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  border-bottom: 1px dashed var(--border-subtle);
}

.receipt-row:last-child {
  border-bottom: none;
}

.receipt-row-label {
  color: var(--text-muted);
  font-weight: 500;
}

.receipt-row-value {
  color: #0f172a;
  font-weight: 750;
}

.receipt-countdown-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  margin-top: 1rem;
}

.countdown-badge {
  background: var(--primary-light);
  color: var(--primary-hover);
  border: 1px solid var(--primary-border);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 800;
}

/* -------------------------------------------------------------
   BUTTON UTILITIES
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
  border: 1.5px solid transparent;
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
}

.btn-md {
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border-strong);
  color: #334155;
}

.btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

/* -------------------------------------------------------------
   TOAST NOTIFICATIONS
   ------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast-msg {
  background: #1e293b;
  color: #ffffff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toast-slide 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast-success { background: #15803d; }
.toast-error { background: #b91c1c; }

@keyframes toast-slide {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* -------------------------------------------------------------
   ADMIN LOGIN MODAL (FULL QWERTY ALPHABET KEYBOARD SUPPORT)
   ------------------------------------------------------------- */
.admin-login-dialog {
  max-width: 420px;
}

.form-group {
  margin-bottom: 1.15rem;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 0.35rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 0.95rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-main);
  background: #f8fafc;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.15s ease;
  -webkit-appearance: none;
}

.form-control:focus {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.form-hint {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 0.35rem;
}

.btn-text-toggle {
  background: none;
  border: none;
  color: #b45309;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
}

.btn-text-toggle:hover {
  background: #fef3c7;
}

.admin-error-text {
  color: var(--danger-text);
  font-size: 0.84rem;
  font-weight: 600;
  min-height: 20px;
  margin-top: 0.25rem;
  text-align: center;
}

/* -------------------------------------------------------------
   RESPONSIVE DESIGN
   ------------------------------------------------------------- */
@media (max-width: 640px) {
  .kiosk-main {
    margin: 0.75rem auto;
    padding: 0 0.5rem;
  }

  .kiosk-welcome-card {
    padding: 1rem 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
  }

  .kiosk-hospitality-banner {
    padding: 0.75rem 0.85rem !important;
    gap: 8px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  #kioskGreetingTitle {
    font-size: 1.1rem !important;
  }

  #kioskGreetingSub {
    font-size: 0.78rem !important;
  }

  .staff-search-input {
    width: 100% !important;
    font-size: 16px !important; /* Prevents iOS auto-zoom */
    min-height: 44px !important;
    margin-top: 6px;
  }

  .staff-section-header {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
  }

  .staff-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .staff-card {
    padding: 0.75rem 0.45rem !important;
    min-height: 165px;
    border-radius: var(--radius-md) !important;
  }

  .staff-avatar {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.05rem !important;
    margin-bottom: 0.5rem !important;
  }

  .staff-name {
    font-size: 0.88rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.15rem !important;
  }

  .staff-role {
    font-size: 0.7rem !important;
    padding: 1px 6px !important;
    margin-bottom: 0.5rem !important;
  }

  .staff-status-badge {
    font-size: 0.68rem !important;
    padding: 2.5px 6px !important;
  }

  /* Modals on Phone: Ergonomic Touch Targets */
  .modal-card {
    width: 95vw !important;
    max-width: 95vw !important;
    padding: 1.15rem 0.85rem !important;
  }

  .pin-dialog {
    max-width: 340px !important;
  }

  .pin-key {
    height: 54px !important;
    font-size: 1.3rem !important;
    border-radius: 10px !important;
  }

  .pin-keypad-grid {
    gap: 8px !important;
  }

  .camera-container {
    height: 240px !important;
    max-height: 45vh !important;
  }

  #kioskSignatureCanvas {
    touch-action: none !important;
    width: 100% !important;
    height: 180px !important;
  }

  .btn {
    min-height: 44px !important;
  }
}

@media (max-width: 380px) {
  .staff-card {
    padding: 0.65rem 0.35rem !important;
    min-height: 155px;
  }

  .staff-avatar {
    width: 42px !important;
    height: 42px !important;
  }

  .staff-name {
    font-size: 0.82rem !important;
  }
}

/* -------------------------------------------------------------
   KIOSK DARK THEME COMPONENT OVERRIDES
   ------------------------------------------------------------- */
[data-theme="dark"] .kiosk-welcome-card {
  background: #1c1917;
  border-color: #38332e;
}

[data-theme="dark"] .hero-text h1,
[data-theme="dark"] .staff-section-title {
  color: #f5f0ea;
}

[data-theme="dark"] .kiosk-hospitality-banner {
  background: linear-gradient(135deg, #2d2416 0%, #1c1917 100%) !important;
  border-color: #78350f !important;
}

[data-theme="dark"] #kioskGreetingTitle {
  color: #fcd34d !important;
}

[data-theme="dark"] #kioskGreetingSub {
  color: #d6d3d1 !important;
}

[data-theme="dark"] .staff-search-input {
  background: #292524;
  border-color: #38332e;
  color: #f5f0ea;
}

[data-theme="dark"] .staff-search-input:focus {
  border-color: #f59e0b;
  background: #24201d;
}

[data-theme="dark"] .staff-card {
  background: linear-gradient(145deg, #24201d 0%, #1c1917 100%);
  border-color: #38332e;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .staff-card:hover {
  border-color: #f59e0b;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .staff-card.status-on_shift {
  border-color: #22c55e;
  background: linear-gradient(145deg, #14301d 0%, #1c2b20 100%);
}

[data-theme="dark"] .staff-card.status-completed {
  border-color: #38bdf8;
  background: linear-gradient(145deg, #122838 0%, #17242e 100%);
}

[data-theme="dark"] .staff-name {
  color: #f5f0ea;
}

[data-theme="dark"] .staff-role {
  background: #292524;
  color: #a8a29e;
}

[data-theme="dark"] .pin-dialog,
[data-theme="dark"] .action-dialog,
[data-theme="dark"] .camera-dialog,
[data-theme="dark"] .admin-dialog {
  background: #1c1917;
  color: #f5f0ea;
  border-color: #38332e;
}

[data-theme="dark"] .pin-pad-btn {
  background: #292524;
  color: #f5f0ea;
  border-color: #38332e;
}

[data-theme="dark"] .pin-pad-btn:hover {
  background: #38332e;
  border-color: #f59e0b;
}

[data-theme="dark"] .pin-staff-banner {
  background: #292524;
  border-color: #38332e;
}

[data-theme="dark"] #pinStaffName {
  color: #f5f0ea !important;
}

[data-theme="dark"] .culinary-motto-banner {
  background: #12100e;
  border-color: #38332e;
  color: #fbbf24;
}

/* Universal Dark Theme Legibility Guard for Inline Styled Elements */
[data-theme="dark"] [style*="color: #1c1917"],
[data-theme="dark"] [style*="color:#1c1917"],
[data-theme="dark"] [style*="color: #0f172a"],
[data-theme="dark"] [style*="color:#0f172a"],
[data-theme="dark"] [style*="color: #1e293b"],
[data-theme="dark"] [style*="color:#1e293b"] {
  color: #f5f0ea !important;
}

[data-theme="dark"] [style*="color: #334155"],
[data-theme="dark"] [style*="color:#334155"],
[data-theme="dark"] [style*="color: #475569"],
[data-theme="dark"] [style*="color:#475569"],
[data-theme="dark"] [style*="color: #64748b"],
[data-theme="dark"] [style*="color:#64748b"] {
  color: #d6d3d1 !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) [style*="color: #1c1917"],
  :root:not([data-theme="light"]) [style*="color:#1c1917"],
  :root:not([data-theme="light"]) [style*="color: #0f172a"],
  :root:not([data-theme="light"]) [style*="color:#0f172a"],
  :root:not([data-theme="light"]) [style*="color: #1e293b"],
  :root:not([data-theme="light"]) [style*="color:#1e293b"] {
    color: #f5f0ea !important;
  }

  :root:not([data-theme="light"]) [style*="color: #334155"],
  :root:not([data-theme="light"]) [style*="color:#334155"],
  :root:not([data-theme="light"]) [style*="color: #475569"],
  :root:not([data-theme="light"]) [style*="color:#475569"],
  :root:not([data-theme="light"]) [style*="color: #64748b"],
  :root:not([data-theme="light"]) [style*="color:#64748b"] {
    color: #d6d3d1 !important;
  }
}

