/* WeDrink POS Terminal Shift System Stylesheet */
:root {
  --wd-primary: #ea580c;
  --wd-primary-hover: #c2410c;
  --wd-primary-light: #fff7ed;
  --wd-accent: #0f766e;
  --wd-accent-hover: #115e59;
  --wd-bg: #f1f5f9;
  --wd-card: #ffffff;
  --wd-surface: #ffffff;
  --wd-text: #0f172a;
  --wd-text-muted: #64748b;
  --wd-border: #cbd5e1;
  --wd-border-light: #e2e8f0;
  --wd-success: #16a34a;
  --wd-success-bg: #dcfce7;
  --wd-danger: #dc2626;
  --wd-danger-bg: #fee2e2;
  --wd-warning: #d97706;
  --wd-warning-bg: #fef3c7;
  --wd-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
  --wd-shadow-lg: 0 20px 35px -8px rgba(15, 23, 42, 0.2);
  --wd-radius: 14px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--wd-bg);
  color: var(--wd-text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* App Container */
.pos-app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
}

/* Header */
.pos-header {
  height: 64px;
  background: #0f172a;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 20;
}

.pos-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pos-logo {
  width: 40px;
  height: 40px;
  background: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.pos-brand-text h1 {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
}

.pos-brand-text span {
  font-size: 12px;
  color: #94a3b8;
}

.pos-shift-status-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 9999px;
  background: #1e293b;
  border: 1px solid #334155;
  font-size: 13px;
  font-weight: 600;
}

.pos-shift-status-pill.open {
  background: rgba(22, 163, 74, 0.15);
  border-color: rgba(22, 163, 74, 0.4);
  color: #4ade80;
}

.pos-shift-status-pill.closed {
  background: rgba(220, 38, 38, 0.15);
  border-color: rgba(220, 38, 38, 0.4);
  color: #f87171;
}

.pos-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.pos-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-header {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid #334155;
  background: #1e293b;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s;
}

.btn-header:hover {
  background: #334155;
}

.btn-header:active {
  transform: scale(0.97);
}

.btn-header-danger {
  background: rgba(220, 38, 38, 0.2);
  border-color: rgba(220, 38, 38, 0.4);
  color: #fca5a5;
}

.btn-header-danger:hover {
  background: rgba(220, 38, 38, 0.35);
}

/* POS Main Area */
.pos-body {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
  background: #f8fafc;
}

/* Screen: PIN Login */
.screen-pin {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at center, #ffffff 0%, #f1f5f9 100%);
}

.pin-login-card {
  width: 780px;
  max-width: 95vw;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: var(--wd-shadow);
  border: 1px solid var(--wd-border-light);
  display: flex;
  overflow: hidden;
  min-height: 520px;
}

.pin-staff-list-side {
  flex: 1.1;
  background: #f8fafc;
  border-right: 1px solid var(--wd-border-light);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.pin-staff-list-side h2 {
  font-size: 16px;
  font-weight: 800;
  color: #1e293b;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pin-staff-subtitle {
  font-size: 12px;
  color: var(--wd-text-muted);
  margin-bottom: 16px;
}

.staff-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  max-height: 380px;
  padding-right: 4px;
}

.staff-item-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid var(--wd-border-light);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.staff-item-btn:hover {
  border-color: var(--wd-primary);
  background: var(--wd-primary-light);
}

.staff-item-btn.selected {
  border-color: var(--wd-primary);
  background: #fff7ed;
  box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
}

.staff-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: #e2e8f0;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.staff-item-btn.selected .staff-avatar {
  background: var(--wd-primary);
  color: #fff;
}

.staff-info {
  flex: 1;
}

.staff-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.staff-role {
  font-size: 11px;
  color: var(--wd-text-muted);
}

.badge-shift-status {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-present {
  background: #dcfce7;
  color: #15803d;
}

.badge-scheduled {
  background: #e0f2fe;
  color: #0369a1;
}

.badge-absent {
  background: #fee2e2;
  color: #b91c1c;
}

.pin-keypad-side {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.pin-display-wrapper {
  text-align: center;
  margin-bottom: 20px;
}

.pin-target-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--wd-primary);
  margin-bottom: 8px;
  min-height: 20px;
}

.pin-dots {
  display: flex;
  gap: 14px;
  justify-content: center;
}

.pin-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: transparent;
  transition: all 0.15s;
}

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

/* Standalone & Embeddable Numpad */
.numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 280px;
}

.numpad-btn {
  height: 56px;
  border-radius: 12px;
  border: 1px solid var(--wd-border-light);
  background: #f8fafc;
  color: #0f172a;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s;
}

.numpad-btn:hover {
  background: #e2e8f0;
}

.numpad-btn:active {
  transform: scale(0.94);
  background: #cbd5e1;
}

.numpad-btn.btn-action {
  font-size: 14px;
  font-weight: 800;
  color: var(--wd-text-muted);
}

.numpad-btn.btn-confirm {
  background: var(--wd-primary);
  color: #ffffff;
  border-color: var(--wd-primary);
}

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

/* Screen: POS Dashboard / Workspace */
.screen-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.workspace-statusbar {
  background: #fff;
  border-bottom: 1px solid var(--wd-border-light);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.shift-info-box {
  display: flex;
  align-items: center;
  gap: 20px;
}

.shift-meta-item {
  display: flex;
  flex-direction: column;
}

.shift-meta-label {
  font-size: 11px;
  color: var(--wd-text-muted);
  font-weight: 600;
}

.shift-meta-value {
  font-size: 14px;
  color: var(--wd-text);
  font-weight: 700;
}

.workspace-main {
  flex: 1;
  padding: 24px;
  display: flex;
  gap: 24px;
  overflow: hidden;
}

.team-presence-card {
  width: 380px;
  background: #fff;
  border-radius: var(--wd-radius);
  border: 1px solid var(--wd-border-light);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--wd-border-light);
  background: #fafafa;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 15px;
  font-weight: 800;
  color: #1e293b;
}

.card-body {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.member-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid var(--wd-border-light);
}

.member-row.is-active {
  border-color: #86efac;
  background: #f0fdf4;
}

.member-row.is-absent {
  border-color: #fca5a5;
  background: #fff1f2;
}

.pos-kiosk-view {
  flex: 1;
  background: #fff;
  border-radius: var(--wd-radius);
  border: 1px solid var(--wd-border-light);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.pos-kiosk-icon {
  font-size: 54px;
  margin-bottom: 16px;
  color: var(--wd-primary);
}

/* Modals & Dialogs (Modern HTML <dialog>) */
dialog.pos-modal {
  border: none;
  border-radius: 20px;
  box-shadow: var(--wd-shadow-lg);
  padding: 0;
  max-width: 90vw;
  width: 640px;
  background: #ffffff;
  overflow: hidden;
  margin: auto;
}

dialog.pos-modal::backdrop {
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}

.modal-header {
  padding: 20px 24px;
  background: #fafafa;
  border-bottom: 1px solid var(--wd-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  color: #94a3b8;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
}

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

.modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid var(--wd-border-light);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.15s;
  min-height: 48px;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--wd-primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.25);
}

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

.btn-secondary {
  background: #e2e8f0;
  color: #334155;
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-danger {
  background: var(--wd-danger);
  color: #fff;
}

.btn-danger:hover {
  background: #b91c1c;
}

/* Form Controls */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.touch-input-field {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 18px;
  font-weight: 600;
  border: 2px solid var(--wd-border);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  outline: none;
  cursor: pointer;
  transition: all 0.15s;
}

.touch-input-field:focus {
  border-color: var(--wd-primary);
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

.touch-input-field.active-touch {
  border-color: var(--wd-primary);
  background: #fffaf0;
}

.touch-textarea-field {
  width: 100%;
  min-height: 80px;
  padding: 12px 16px;
  font-size: 15px;
  font-family: inherit;
  font-weight: 500;
  border: 2px solid var(--wd-border);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  outline: none;
  cursor: pointer;
  resize: none;
  transition: all 0.15s;
}

.touch-textarea-field:focus,
.touch-textarea-field.active-touch {
  border-color: var(--wd-primary);
  background: #fffaf0;
  box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

/* Virtual Keyboard Overlay / Bottom Sheet */
.virtual-keyboard-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1e293b;
  border-top: 2px solid #334155;
  padding: 12px 16px 20px;
  box-shadow: 0 -10px 30px rgba(0,0,0,0.3);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translateY(100%);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.virtual-keyboard-drawer.active {
  transform: translateY(0);
}

.keyboard-top-bar {
  width: 100%;
  max-width: 960px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}

.keyboard-target-preview {
  color: #f8fafc;
  font-weight: 700;
}

.keyboard-rows {
  width: 100%;
  max-width: 960px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.keyboard-row {
  display: flex;
  justify-content: center;
  gap: 6px;
  width: 100%;
}

.key-btn {
  flex: 1;
  height: 52px;
  max-width: 72px;
  background: #334155;
  border: 1px solid #475569;
  border-radius: 8px;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.1s, transform 0.05s;
}

.key-btn:hover {
  background: #475569;
}

.key-btn:active {
  background: var(--wd-primary);
  transform: scale(0.94);
}

.key-btn.key-wide {
  flex: 1.5;
  max-width: 110px;
  font-size: 14px;
  font-weight: 700;
  background: #475569;
}

.key-btn.key-space {
  flex: 5;
  max-width: 440px;
}

.key-btn.key-action-ok {
  background: var(--wd-primary);
  border-color: var(--wd-primary);
}

.key-btn.key-action-ok:hover {
  background: var(--wd-primary-hover);
}

/* Floating Numpad Modal for Touch Input */
.virtual-numpad-popover {
  position: fixed;
  z-index: 1050;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: var(--wd-shadow-lg);
  border: 1px solid var(--wd-border);
  padding: 16px;
  width: 310px;
  display: none;
}

.virtual-numpad-popover.active {
  display: block;
}

.numpad-popover-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.numpad-popover-title {
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
}

/* Roster / Attendance Table in Modal */
.attendance-summary-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 14px;
}

.attendance-summary-table th {
  background: #f1f5f9;
  padding: 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #475569;
  border-bottom: 2px solid var(--wd-border-light);
}

.attendance-summary-table td {
  padding: 12px;
  font-size: 13px;
  border-bottom: 1px solid var(--wd-border-light);
}

.attendance-summary-table tr:hover td {
  background: #fafafa;
}

/* Toasts */
.pos-toast {
  position: fixed;
  top: 80px;
  right: 24px;
  background: #0f172a;
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--wd-shadow-lg);
  border-left: 5px solid var(--wd-primary);
  z-index: 2000;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.25s ease;
  pointer-events: none;
}

.pos-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Withdrawal & Cash Management UI Components
   ========================================================================== */

/* Category Selection Grid */
.withdrawal-category-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.category-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid var(--wd-border-light);
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.2s ease;
  min-height: 68px;
}

.category-card:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.category-card.selected {
  border-color: var(--wd-primary);
  background: var(--wd-primary-light);
  box-shadow: 0 0 0 1px var(--wd-primary);
}

.category-card .cat-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.category-card .cat-title {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
}

.category-card .cat-desc {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* Quick Amount Chips */
.quick-amounts-bar {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.quick-amount-btn {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--wd-border);
  background: #f8fafc;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.quick-amount-btn:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
}

.quick-amount-btn.btn-all-cash {
  background: #fff7ed;
  border-color: #fdba74;
  color: #c2410c;
}

/* Cash Drawer Animation Banner */
.drawer-active-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, #15803d, #16a34a);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  margin-bottom: 16px;
  animation: pulseDrawer 1.5s infinite;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
}

@keyframes pulseDrawer {
  0% { transform: scale(1); }
  50% { transform: scale(1.015); }
  100% { transform: scale(1); }
}

.drawer-active-banner .drawer-icon {
  font-size: 30px;
}

.drawer-active-banner .drawer-text h4 {
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.5px;
}

.drawer-active-banner .drawer-text p {
  font-size: 12px;
  opacity: 0.9;
}

/* Telegram Preview Box */
.telegram-alert-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
  color: #14532d;
  margin-top: 14px;
  white-space: pre-wrap;
}

/* Thermal POS Receipt */
.pos-receipt-paper {
  background: #fff;
  border: 1px dashed #94a3b8;
  padding: 20px;
  max-width: 340px;
  margin: 0 auto;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px;
  line-height: 1.4;
  color: #0f172a;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
}

.pos-receipt-paper .receipt-header {
  text-align: center;
  border-bottom: 1px dashed #334155;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.pos-receipt-paper .receipt-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.pos-receipt-paper .receipt-total {
  border-top: 1px solid #0f172a;
  border-bottom: 1px solid #0f172a;
  padding: 6px 0;
  margin: 8px 0;
  font-weight: 900;
  font-size: 14px;
}

.pos-receipt-paper .receipt-signatures {
  margin-top: 20px;
  border-top: 1px dashed #cbd5e1;
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 11px;
}

/* Table of Withdrawals in Workspace */
.withdrawals-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.withdrawals-history-table th {
  background: #f8fafc;
  padding: 8px 10px;
  text-align: left;
  color: #64748b;
  font-weight: 700;
  border-bottom: 1px solid var(--wd-border-light);
}

.withdrawals-history-table td {
  padding: 10px 10px;
  border-bottom: 1px solid var(--wd-border-light);
}

.category-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.cat-tag-consumables { background: #e0f2fe; color: #0369a1; }
.cat-tag-raw_materials, .cat-tag-lemons { background: #fef9c3; color: #a16207; }
.cat-tag-collection { background: #fee2e2; color: #b91c1c; }
.cat-tag-other { background: #f1f5f9; color: #475569; }

/* Owner Authorization Alert Box */
.owner-auth-container {
  margin-top: 14px;
  padding: 14px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 12px;
}

.owner-auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  color: #991b1b;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 6px;
}

.owner-auth-success {
  background: #f0fdf4 !important;
  border-color: #bbf7d0 !important;
  color: #166534 !important;
}

/* Photo Attachment in Modal */
.photo-upload-section {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
}

.photo-preview-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.photo-thumb {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

/* Test Shortcut & Test Hub Modal */
.btn-header-test {
  background: linear-gradient(135deg, #4f46e5, #7c3aed) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.4);
}
.btn-header-test:hover {
  background: linear-gradient(135deg, #4338ca, #6d28d9) !important;
}

/* Test Contour Badge (Isolated Sandbox Indicator) */
.test-sandbox-env-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(234, 88, 12, 0.16);
  border: 1px solid #ea580c;
  color: #ea580c;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
}

.test-sandbox-env-pill .sandbox-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ea580c;
  box-shadow: 0 0 6px #ea580c;
}

/* Test Hub Dialog & Grid */
.test-hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.test-hub-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.test-hub-section-title {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 2px;
}

.test-action-btn {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.3;
}

.test-action-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: translateX(2px);
}

.test-action-btn.primary {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.test-action-btn.primary:hover {
  background: #dbeafe;
}

.test-action-btn.success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}
.test-action-btn.success:hover {
  background: #dcfce7;
}

.test-action-btn.warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}
.test-action-btn.warning:hover {
  background: #fef3c7;
}

.test-action-btn.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}
.test-action-btn.danger:hover {
  background: #fee2e2;
}

.test-action-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.test-action-desc {
  font-size: 11px;
  color: #64748b;
  font-weight: normal;
}

/* Floating Dev Feedback & Screenshot Shortcut (Test Contour Only) */
.pos-dev-feedback-shortcut {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9998;
  display: flex;
  align-items: center;
}

.btn-dev-feedback-shortcut {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
  color: #ffffff;
  border: 2px solid #818cf8;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(30, 27, 75, 0.45);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-dev-feedback-shortcut:hover {
  transform: translateY(-2px) scale(1.03);
  background: linear-gradient(135deg, #2e2870 0%, #4338ca 100%);
  box-shadow: 0 12px 28px rgba(30, 27, 75, 0.55);
  border-color: #a5b4fc;
}

.btn-dev-feedback-shortcut:active {
  transform: translateY(1px) scale(0.98);
}

.feedback-icon {
  font-size: 18px;
}

.feedback-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 6px #ef4444;
  animation: pulse-red 1.6s infinite;
}

@keyframes pulse-red {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 7px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Feedback Modal Styles */
.feedback-meta-banner {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #475569;
  margin-bottom: 12px;
}

.feedback-screenshot-box {
  width: 100%;
  max-height: 180px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  position: relative;
}

.feedback-screenshot-box img {
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  display: block;
}

.feedback-tag-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.feedback-tag-chip {
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.feedback-tag-chip:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.feedback-tag-chip.active {
  background: #1e1b4b;
  color: #ffffff;
  border-color: #818cf8;
}

.feedback-comment-textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
  margin-bottom: 8px;
  outline: none;
}

.feedback-comment-textarea:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.feedback-tools-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

/* ==============================================================================
   QA Release Testing Checklist & Deploy Gate Styles
   ============================================================================== */
.qa-tabs-header {
  display: flex;
  gap: 8px;
  background: #f1f5f9;
  padding: 6px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.qa-tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: #475569;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.qa-tab-btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: #0f172a;
}

.qa-tab-btn.active {
  background: #ffffff;
  color: #1e1b4b;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.qa-tab-count {
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
}

.qa-tab-btn.active .qa-tab-count {
  background: #312e81;
  color: #ffffff;
}

.qa-progress-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.qa-progress-bar-bg {
  width: 100%;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
  margin: 10px 0 8px 0;
}

.qa-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
  width: 0%;
  transition: width 0.3s ease;
}

.qa-task-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #cbd5e1;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}

.qa-task-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 3px 10px rgba(0,0,0,0.04);
}

.qa-task-card.status-passed {
  border-left-color: #16a34a;
  background: #fcfdfd;
}

.qa-task-card.status-failed {
  border-left-color: #dc2626;
  background: #fffafa;
}

.qa-task-card.status-pending {
  border-left-color: #f59e0b;
}

.qa-task-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 6px;
}

.qa-task-title {
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
  line-height: 1.3;
}

.qa-task-desc {
  font-size: 12px;
  color: #475569;
  line-height: 1.45;
  margin-bottom: 10px;
}

.qa-task-meta {
  font-size: 11px;
  color: #64748b;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.qa-task-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
}

.qa-task-badge.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.qa-task-badge.badge-passed {
  background: #dcfce7;
  color: #15803d;
}

.qa-task-badge.badge-failed {
  background: #fee2e2;
  color: #991b1b;
}

.qa-task-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  border-top: 1px solid #f1f5f9;
  padding-top: 10px;
}

.qa-action-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.15s ease;
}

.qa-action-btn.btn-pass {
  background: #16a34a;
  color: #ffffff;
}

.qa-action-btn.btn-pass:hover {
  background: #15803d;
}

.qa-action-btn.btn-fail {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.qa-action-btn.btn-fail:hover {
  background: #fee2e2;
}

.qa-action-btn.btn-try {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
}

.qa-action-btn.btn-try:hover {
  background: #e2e8f0;
}

.qa-deploy-gate-card {
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
  text-align: left;
}

.qa-deploy-gate-card.gate-approved {
  background: #f0fdf4;
  border: 2px solid #86efac;
}

.qa-deploy-gate-card.gate-blocked {
  background: #fef2f2;
  border: 2px solid #fca5a5;
}

.qa-feedback-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.qa-feedback-card.resolved {
  background: #f8fafc;
  opacity: 0.75;
}

/* ==============================================================================
   Responsive Styles for Mobile Devices (Smartphones & Tablets in Portrait)
   ============================================================================== */
@media (max-width: 768px) {
  .pos-header {
    flex-wrap: wrap;
    padding: 8px 12px;
    gap: 8px;
    height: auto;
    min-height: 52px;
  }

  .pos-brand-text h1 {
    font-size: 13px;
  }

  .pos-brand-text span {
    font-size: 10px;
  }

  .test-sandbox-env-pill {
    padding: 2px 6px;
    font-size: 9px;
  }

  .screen-pin {
    padding: 10px 8px;
    align-items: flex-start;
  }

  .pin-login-card {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-height: auto;
    border-radius: 16px;
  }

  .pin-staff-list-side {
    border-right: none;
    border-bottom: 1px solid var(--wd-border-light);
    padding: 14px 16px;
  }

  .staff-grid {
    max-height: 200px;
  }

  .pin-keypad-side {
    padding: 16px 12px;
    width: 100%;
  }

  .pin-display-wrapper {
    margin-bottom: 12px;
  }

  .pin-target-name {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .numpad-grid {
    max-width: 100%;
    width: 100%;
    gap: 8px;
  }

  .numpad-btn {
    height: 48px;
    font-size: 18px;
    border-radius: 10px;
  }

  .pos-dev-feedback-shortcut {
    bottom: 12px;
    right: 12px;
  }

  .btn-dev-feedback-shortcut {
    padding: 8px 12px;
    font-size: 11px;
    gap: 6px;
  }

  dialog.pos-modal {
    width: 96vw !important;
    max-width: 96vw !important;
    max-height: 92vh !important;
    border-radius: 16px !important;
  }

  .modal-body {
    padding: 14px;
    max-height: calc(88vh - 110px);
  }

  .modal-header {
    padding: 14px 16px;
  }

  .modal-footer {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .workspace-statusbar {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .pos-kiosk-view {
    padding: 14px 10px;
  }
}

/* Print Stylesheet for 80mm/58mm Thermal Printers */
@media print {
  @page {
    margin: 0;
    size: auto;
  }
  
  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    height: auto !important;
    overflow: visible !important;
  }

  .pos-app, .pos-header, .pos-body, .modal-header, .modal-footer, .modal-close-btn, 
  .btn, .drawer-active-banner, .telegram-alert-box, .pos-toast, .workspace-statusbar,
  .quick-amounts-bar, .withdrawal-category-grid, #owner-auth-container, .photo-upload-section,
  .pos-dev-feedback-shortcut, .btn-header-test {
    display: none !important;
  }

  dialog.pos-modal {
    position: static !important;
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .modal-body {
    padding: 0 !important;
  }

  .pos-receipt-paper {
    display: block !important;
    border: none !important;
    box-shadow: none !important;
    width: 78mm !important;
    max-width: 78mm !important;
    margin: 0 auto !important;
    padding: 2mm !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    color: #000 !important;
  }

  .receipt-header, .receipt-row, .receipt-total, .receipt-signatures {
    color: #000 !important;
  }
}


