@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Khmer:wght@400;500;600;700&display=swap');

/* =====================================================
   POS TERMINAL SYSTEM — MULTI-STAFF ARCHITECTURE
   Master Production Stylesheet — Clean White & Indigo Theme
   Typography: 100% Normal 'Noto Sans Khmer' Across All Elements & Numbers
===================================================== */

:root {
  /* Surfaces & Backgrounds */
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-input: #ffffff;
  --border: #e2e8f0;
  --border-focus: #4f46e5;
  --border-light: #f1f5f9;

  /* Primary Palette: Royal Indigo & Electric Blue */
  --primary-navy: #1e1b4b;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;

  /* Money & Success: Emerald Green */
  --green: #059669;
  --green-hover: #047857;
  --green-win: #10b981;
  --green-light: #ecfdf5;
  --green-border: #a7f3d0;

  /* Trophy & Prizes: Warm Amber Gold */
  --gold: #d97706;
  --gold-hover: #b45309;
  --gold-light: #fffbeb;
  --gold-border: #fde68a;

  /* Danger & Loss: Crimson Red */
  --red: #dc2626;
  --red-hover: #b91c1c;
  --red-light: #fef2f2;
  --red-border: #fecaca;

  /* Typography */
  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --text-dim: #94a3b8;

  /* Fonts - 100% Noto Sans Khmer Normal */
  --font-khmer: 'Noto Sans Khmer', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'Noto Sans Khmer', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Radii & Shadows */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.08);
  --shadow-xl: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
}

/* -----------------------------------------------------
   CSS RESET & BASE STYLES — STRICT NORMAL NOTO SANS KHMER
----------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Noto Sans Khmer', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-style: normal !important;
  font-variant: normal !important;
  font-variant-numeric: normal !important;
}

body.admin-body {
  background-color: var(--bg-main);
  color: var(--text-body);
  font-family: 'Noto Sans Khmer', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-style: normal !important;
  font-size: 14px;
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

input, select, textarea, button, table, th, td, code, pre {
  font-family: 'Noto Sans Khmer', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-style: normal !important;
  font-size: inherit;
}

/* =====================================================
   UNIVERSAL SHAPE CENTERING & TEXT ELLIPSIS TRUNCATION
   - Text stays strictly in the middle/center of shapes
   - If text is longer than the shape, displays '...' cleanly
===================================================== */
.btn, 
.btn-post-chip, 
.btn-amt-chip, 
.adm-tab, 
.badge, 
.role-badge, 
.shift-status-tag, 
.shift-badge-pill, 
.next-draw-badge, 
.clock-badge, 
.status-indicator, 
.blocked-chip, 
.bank-total-pill, 
.receipt-market-time-badge, 
.receipt-win-badge,
.receipt-void-badge,
.stat-badge, 
.scan-badge,
.tab-btn,
.btn-header-tool,
.btn-logout-tool,
.action-btn-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
}

/* Children inside flex shapes must also truncate with ... when needed */
.btn > span,
.btn-post-chip > span,
.adm-tab > span,
.shift-badge-pill > span,
.next-draw-badge > span,
.status-indicator > span,
.clock-badge > span,
.blocked-chip > span,
.bank-total-pill > span,
.bank-total-pill > strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  text-align: center;
}

/* Ensure form inputs & selects truncate long text with ... */
.adm-input, 
.adm-select, 
.adm-input-sm, 
.adm-select-sm, 
input[type="text"], 
input[type="number"], 
input[type="date"], 
select {
  text-overflow: ellipsis;
}

/* =====================================================
   STRICT SINGLE-LINE TRUNCATION (NO 2-LINE TEXT WRAP)
   - When text exceeds 1 line (e.g. 'system jinfa ov kla'), 
     it NEVER breaks onto line 2; it cleanly shows 'system jinfa o...'
===================================================== */
h1, h2, h3, h4, h5, h6,
.brand-heading,
.brand-caption,
.panel-head h3,
.adm-card-head h2,
.adm-card-head h3,
.table-info h3,
.sub,
.user-name-row strong,
#headerStaffName,
.user-branch-text,
.pos-grid-table td,
.adm-table td,
.pos-grid-table th,
.adm-table th,
.role-badge,
.shift-status-tag,
.shift-badge-pill,
.next-draw-badge,
.status-indicator,
.clock-badge,
.stat-badge,
.scan-badge,
.blocked-chip,
.bank-total-pill,
.calc-row span,
.checkout-summary .lbl,
.checkout-summary .val,
.s-stat-box .lbl,
.stat-box .title,
.bank-card-title,
.receipt-market-time-badge,
.btn-post-chip,
.btn-amt-chip,
.adm-tab {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* =====================================================
   OUTLINE ANIMATION KEYFRAMES FOR SHAPES
===================================================== */
@keyframes pulse-outline-green {
  0% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

@keyframes pulse-outline-indigo {
  0% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0.45); }
  70% { box-shadow: 0 0 0 6px rgba(79, 70, 229, 0); }
  100% { box-shadow: 0 0 0 0 rgba(79, 70, 229, 0); }
}

@keyframes pulse-outline-gold {
  0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(217, 119, 6, 0); }
  100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

@keyframes pulse-outline-subtle {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.35); }
  70% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* =====================================================
   INTERACTIVE MOUSE ANIMATIONS & HOVER DYNAMICS
   - Smooth tactile lift & depression for all interactive elements
===================================================== */
button,
.btn,
.adm-tab,
.channel-chip,
.btn-amt-chip,
.btn-tender-chip,
.btn-num-tool,
.animal-num-chip,
.animal-card,
.btn-view-ticket,
.btn-rebet-ticket,
.btn-open-void {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.18s ease, 
              background-color 0.18s ease, 
              border-color 0.18s ease, 
              color 0.18s ease,
              outline-color 0.18s ease !important;
}

button:hover:not(:disabled),
.btn:hover:not(:disabled),
.adm-tab:hover:not(:disabled),
.channel-chip:hover,
.btn-amt-chip:hover,
.btn-tender-chip:hover,
.btn-num-tool:hover,
.animal-num-chip:hover,
.btn-view-ticket:hover,
.btn-rebet-ticket:hover,
.btn-open-void:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12) !important;
}

button:active:not(:disabled),
.btn:active:not(:disabled),
.adm-tab:active:not(:disabled),
.channel-chip:active,
.btn-amt-chip:active,
.btn-tender-chip:active,
.btn-num-tool:active,
.animal-num-chip:active,
.btn-view-ticket:active,
.btn-rebet-ticket:active,
.btn-open-void:active {
  transform: translateY(1px) scale(0.97) !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1) !important;
}

/* Tactile Click Wave Ripple Effect */
.click-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  transform: scale(0);
  animation: click-ripple-anim 0.45s ease-out;
  pointer-events: none;
  z-index: 100;
}

@keyframes click-ripple-anim {
  to {
    transform: scale(3.5);
    opacity: 0;
  }
}

/* -----------------------------------------------------
   LOGIN OVERLAY (CLEAN PRODUCTION SCREEN)
----------------------------------------------------- */
.login-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.login-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 100%;
  padding: 38px 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: modal-pop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.login-header {
  text-align: center;
  margin-bottom: 26px;
}

.login-icon {
  font-size: 52px;
  display: inline-block;
  margin-bottom: 10px;
  filter: drop-shadow(0 4px 10px rgba(217, 119, 6, 0.3));
}

.login-header h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary-navy);
  letter-spacing: -0.5px;
}

.login-header p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-form .form-group {
  margin-bottom: 18px;
}

.login-form label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.login-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  background: #ffffff;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: 2px solid transparent;
  outline-offset: 1px;
}

.login-input:focus {
  outline-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.18);
}

.login-error-msg {
  background: var(--red-light);
  border: 1px solid var(--red-border);
  color: var(--red);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-top: 14px;
  text-align: center;
  font-weight: 600;
}

/* -----------------------------------------------------
   TOP HEADER BAR
----------------------------------------------------- */
.admin-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 360px;
}

.admin-brand > div {
  min-width: 0;
  overflow: hidden;
}

.brand-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.brand-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-navy);
  letter-spacing: -0.3px;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block;
  max-width: 100%;
}

.brand-heading span {
  color: var(--primary);
}

.brand-caption {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  display: block;
  max-width: 100%;
}

.header-center-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.clock-badge {
  text-align: center;
  background: var(--bg-card-subtle);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
}

.clock-time {
  font-size: 13px;
  font-weight: 700;
  font-family: inherit;
  color: var(--text-main);
  line-height: 1.1;
}

.clock-date {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
}

.next-draw-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  border: 1.5px solid #fde68a;
  color: #92400e;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.25s ease;
  animation: pulse-outline-gold 2.5s infinite ease-in-out;
}

.shift-badge-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f1f5f9;
  border: 1.5px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  transition: all 0.25s ease;
}

.shift-badge-pill.active {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
  animation: pulse-outline-green 2.5s infinite ease-in-out;
}

.shift-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.shift-badge-pill.active .shift-dot {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-body);
  background: #ffffff;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: 999px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.header-right-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  padding: 4px 10px 4px 6px;
  border-radius: 999px;
  max-width: 220px;
  min-width: 0;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: 2px solid transparent;
  outline-offset: 1px;
}

.user-profile-badge:hover {
  border-color: var(--primary-border);
  outline-color: rgba(79, 70, 229, 0.2);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}

.user-avatar-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.user-meta {
  line-height: 1.2;
  min-width: 0;
  overflow: hidden;
  max-width: 130px;
}

.user-name-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.user-name-row strong,
#headerStaffName {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 85px;
  display: inline-block;
  vertical-align: middle;
}

.role-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.role-badge.superadmin { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.role-badge.admin { background: #ede9fe; color: #6d28d9; border: 1px solid #ddd6fe; }
.role-badge.staff { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

.user-branch-text {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: 100%;
  display: block;
}

.bank-total-pill {
  background: var(--gold-light);
  border: 1px solid var(--gold-border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.bank-total-pill .lbl { color: var(--gold); font-weight: 700; }
.bank-total-pill .val { color: #92400e; font-weight: 700; font-family: inherit; }

/* =====================================================
   MODERN LEFT SIDEBAR NAVIGATION & MAIN APP LAYOUT
===================================================== */
.admin-app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  background: var(--bg-main);
  position: relative;
}

.admin-sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  background: #0f172a;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 950;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  overflow-x: hidden;
  transition: all 0.25s ease;
}

.admin-sidebar::-webkit-scrollbar {
  width: 5px;
}
.admin-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar-brand-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 42, 0.95);
}

.sidebar-brand-icon {
  font-size: 28px;
  filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.5));
}

.sidebar-brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #ffffff;
  margin: 0;
  line-height: 1.2;
}

.sidebar-brand-caption {
  font-size: 10.5px;
  font-weight: 700;
  color: #10b981;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.sidebar-user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 12px 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.sidebar-avatar {
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  flex-shrink: 0;
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

.sidebar-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
}

.sidebar-name-row strong {
  font-size: 13px;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-branch-text {
  font-size: 11px;
  color: #94a3b8;
}

.sidebar-menu-heading {
  padding: 12px 16px 6px;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.sidebar-nav-tabs {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 10px;
  flex: 1;
}

.sidebar-nav-tabs .adm-tab {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  width: 100% !important;
  padding: 10px 14px !important;
  background: transparent !important;
  color: #cbd5e1 !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-align: left !important;
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: none !important;
  min-height: 42px !important;
}

.sidebar-nav-tabs .adm-tab .icon {
  font-size: 18px !important;
  width: 24px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
}

.sidebar-nav-tabs .adm-tab .tab-label {
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  max-width: none !important;
  text-align: left !important;
}

.sidebar-nav-tabs .adm-tab:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  color: #ffffff !important;
  transform: translateX(3px) !important;
  box-shadow: none !important;
}

.sidebar-nav-tabs .adm-tab.active {
  background: linear-gradient(90deg, #4f46e5 0%, #6366f1 100%) !important;
  color: #ffffff !important;
  border: 1px solid rgba(129, 140, 248, 0.4) !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.4) !important;
  transform: none !important;
}

.sidebar-footer {
  padding: 12px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer .adm-tab-logout {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #fca5a5 !important;
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.sidebar-footer .adm-tab-logout:hover {
  background: #ef4444 !important;
  color: #ffffff !important;
}

.admin-main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-main);
}

/* Fallback for horizontal admin-nav (if present) */
.admin-nav {
  background: #ffffff;
  border-bottom: 1.5px solid var(--border);
  padding: 12px 20px;
  position: sticky;
  top: 57px;
  z-index: 90;
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden !important;
}

.admin-nav-tabs {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden !important;
  margin: 0 auto;
}

/* Individual Standalone Shape for each function button */
.adm-tab {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  padding: 10px 8px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap !important;
  overflow: hidden !important;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 5px;
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.18s ease, border-color 0.18s ease;
  outline: 2px solid transparent;
  outline-offset: 1px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  user-select: none;
  width: 100%;
  min-width: 0 !important;
  min-height: 46px;
  box-sizing: border-box;
  position: relative;
}

[style*="display: none"], [style*="display:none"], [hidden] {
  display: none !important;
}

.adm-tab .icon {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.adm-tab .tab-label {
  display: block !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  text-align: center !important;
  max-width: calc(100% - 24px) !important;
  min-width: 0 !important;
}

.adm-tab:hover {
  background: #f8fafc;
  color: var(--primary);
  border-color: var(--primary);
  outline-color: rgba(79, 70, 229, 0.25);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.15), 0 0 0 3px rgba(79, 70, 229, 0.1);
  transform: translateY(-2px) scale(1.02);
}

.adm-tab:hover .icon {
  transform: scale(1.15);
}

.adm-tab:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Selected/Active Shape Button */
.adm-tab.active {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: #ffffff !important;
  border-color: #3730a3;
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  animation: pulse-outline-indigo 2.5s infinite ease-in-out;
  transform: translateY(-1px);
}
.adm-tab.active .icon {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

/* Standalone Shape for Logout Button in Grid */
.adm-tab.adm-tab-logout {
  background: #ffffff;
  border: 1.5px solid #fecaca;
  color: #dc2626;
  box-shadow: 0 1px 3px rgba(220, 38, 38, 0.08);
}

.adm-tab.adm-tab-logout:hover {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff !important;
  border-color: #dc2626;
  outline-color: rgba(220, 38, 38, 0.3);
  box-shadow: 0 6px 14px rgba(220, 38, 38, 0.25), 0 0 0 3px rgba(220, 38, 38, 0.15);
  transform: translateY(-2px);
}

.adm-tab.adm-tab-logout:active {
  transform: translateY(0);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* -----------------------------------------------------
   MAIN WORKSPACE & LAYOUTS
----------------------------------------------------- */
.admin-main {
  max-width: 100% !important;
  width: 100% !important;
  box-sizing: border-box !important;
  margin: 0 auto;
  padding: 14px 20px;
}

.adm-pane {
  display: none;
  animation: fadeIn 0.2s ease-in;
}
.adm-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card base */
.adm-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.adm-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.adm-card-head h2, .adm-card-head h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.2px;
}

.adm-card-head .sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.head-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* -----------------------------------------------------
   TAB 1: POS TERMINAL LAYOUT
----------------------------------------------------- */
.pos-layout {
  display: grid;
  grid-template-columns: 460px 1fr;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
}

.pos-panel-input {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.panel-head h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-main);
}

/* Channel Chips (Buttons) */
.channel-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 8px;
}

.channel-label-row label {
  margin-bottom: 0 !important;
}

.channel-quick-tools {
  display: flex;
  gap: 5px;
}

.btn-channel-tool {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-channel-tool:hover {
  background: #e2e8f0;
  color: var(--primary);
  border-color: var(--primary-border);
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.btn-channel-tool:active {
  transform: translateY(0);
}

/* Channel Quick Multi-Select Combos (AIF, BD, AF, BCD, ABC, ABCDF) */
.channel-combos-wrap {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 10px;
}

.channel-combos-title {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.channel-combos-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.btn-combo-chip {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #1e293b;
  padding: 7px 4px;
  border-radius: 6px;
  font-family: inherit;
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-combo-chip:hover {
  background: #e0e7ff;
  border-color: #4f46e5;
  color: #4338ca;
  transform: translateY(-1.5px);
  box-shadow: 0 2px 5px rgba(79, 70, 229, 0.2);
}

.btn-combo-chip:active {
  transform: translateY(0);
}

.btn-combo-chip.active {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: #ffffff;
  border-color: #312e81;
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: scale(1.02);
}

.badge-combo-matched {
  background: #e0e7ff !important;
  color: #3730a3 !important;
  font-weight: 800 !important;
  font-size: 11px !important;
  padding: 2px 7px !important;
  border-radius: 999px !important;
  margin-left: 6px !important;
  border: 1px solid #c7d2fe !important;
}

.channel-chips-container {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  margin-bottom: 6px;
}

.btn-post-chip {
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: var(--text-main);
  padding: 9px 4px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: 2px solid transparent;
  outline-offset: 1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-post-chip:hover {
  background: #ffffff;
  border-color: var(--green);
  outline-color: rgba(5, 150, 105, 0.35);
  color: var(--green);
  transform: translateY(-1.5px);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.15), 0 3px 6px rgba(5, 150, 105, 0.12);
}

.btn-post-chip:active {
  transform: translateY(0);
}

.btn-post-chip.active {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border-color: #047857;
  outline: 2px solid #059669;
  outline-offset: 1px;
  box-shadow: 0 3px 8px rgba(5, 150, 105, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  animation: pulse-outline-green 2s infinite ease-in-out;
}

.selected-channels-preview {
  font-size: 12px;
  color: var(--text-muted);
  background: #f8fafc;
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
}

.selected-channels-preview strong {
  color: var(--green);
  font-family: inherit;
}

/* Number inputs row */
.num-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.customer-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.quick-amounts-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.btn-amt-chip {
  background: #ffffff;
  border: 1.5px solid var(--border);
  color: var(--text-body);
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: 2px solid transparent;
  outline-offset: 1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.btn-amt-chip:hover {
  border-color: var(--primary);
  outline-color: rgba(79, 70, 229, 0.35);
  background: #ffffff;
  color: var(--primary);
  transform: translateY(-1.5px);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15), 0 3px 6px rgba(79, 70, 229, 0.1);
}

.btn-amt-chip:active {
  transform: translateY(0);
}

.btn-amt-chip.active {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  color: #ffffff;
  border-color: #3730a3;
  outline: 2px solid var(--primary);
  outline-offset: 1px;
  box-shadow: 0 3px 8px rgba(79, 70, 229, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  animation: pulse-outline-indigo 2s infinite ease-in-out;
}

/* Calculation Preview Card */
.calc-preview-card {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #166534;
  margin-bottom: 4px;
}

.calc-hr {
  border: none;
  border-top: 1px dashed #bbf7d0;
  margin: 8px 0;
}

.calc-row.total-highlight {
  font-size: 16px;
  font-weight: 700;
  color: #14532d;
}

.calc-row.total-highlight strong {
  font-size: 20px;
  font-family: inherit;
  color: var(--green);
}

/* POS Cart & Table Panel (Right) */
.pos-panel-table {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

.pos-cart-table-wrap {
  min-height: 400px;
  max-height: 520px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.pos-grid-table {
  width: 100%;
  border-collapse: collapse;
}

.pos-grid-table th {
  background: #f8fafc;
  color: var(--text-main);
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  position: sticky;
  top: 0;
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.pos-grid-table td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.pos-grid-table tr:hover {
  background: #f8fafc;
}

/* Sticky Checkout Bar */
.pos-checkout-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border-top: 1.5px solid var(--border);
  padding-top: 14px;
  gap: 16px;
  flex-wrap: wrap;
}

.checkout-bank-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}
.checkout-bank-selector label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
}

/* Cash Tendered & Change Return Wrap */
.checkout-cash-tender-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
}

.tender-input-box {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tender-input-box label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
}

.tender-input-box input {
  width: 95px;
}

.tender-quick-chips {
  display: flex;
  gap: 4px;
}

.btn-tender-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-tender-chip:hover {
  background: #eef2ff;
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.tender-change-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  border: 1.5px solid #a7f3d0;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 13px;
  animation: pulse-outline-green 2.5s infinite ease-in-out;
}

.tender-change-preview .lbl {
  font-weight: 700;
  color: #065f46;
}

.tender-change-preview .val {
  font-size: 15px;
  font-weight: 800;
}

.checkout-summary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkout-summary .lbl {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.checkout-summary .val {
  font-size: 22px;
  font-weight: 700;
  font-family: inherit;
  color: var(--green);
}

/* Number Quick Tools (Reverse & Animal Lookup) */
.num-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  gap: 6px;
}

.num-col-header label {
  margin-bottom: 0 !important;
}

.num-quick-tools {
  display: flex;
  gap: 5px;
}

.btn-num-tool {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.btn-num-tool:hover {
  background: #e0e7ff;
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.btn-num-tool:active {
  transform: translateY(0);
}

/* Animal Dreams Modal Styles */
.animal-search-bar {
  margin-bottom: 14px;
}

.animal-grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-height: 440px;
  overflow-y: auto;
  padding: 4px;
}

@media (max-width: 600px) {
  .animal-grid-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.animal-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.animal-card:hover {
  border-color: var(--primary);
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.15);
}

.animal-card .animal-icon {
  font-size: 24px;
  margin-bottom: 3px;
}

.animal-card .animal-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.animal-card .animal-nums {
  display: flex;
  gap: 4px;
  margin-top: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.animal-num-chip {
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: var(--primary);
  font-weight: 800;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.animal-num-chip:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Re-Bet Button in Ledger */
.btn-rebet-ticket {
  background: #f0fdf4;
  border-color: #a7f3d0;
  color: #047857;
}
.btn-rebet-ticket:hover {
  background: #059669;
  color: #ffffff;
  border-color: #047857;
}

/* -----------------------------------------------------
   FORM CONTROLS & INPUTS
----------------------------------------------------- */
.adm-form-group {
  margin-bottom: 14px;
}

.adm-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.adm-input, .adm-select {
  width: 100%;
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #ffffff;
  color: var(--text-main);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: 2px solid transparent;
  outline-offset: 1px;
}

.adm-input:focus, .adm-select:focus {
  outline-color: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 0 3.5px rgba(79, 70, 229, 0.16);
}

.adm-input-sm, .adm-select-sm {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  background: #ffffff;
}

.input-with-addon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-addon input {
  padding-right: 70px;
}

.input-with-addon .addon {
  position: absolute;
  right: 12px;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 12px;
}

.hint {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* -----------------------------------------------------
   BUTTONS (MODERN TACTILE REDESIGN & OUTLINE ANIMATIONS)
----------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  line-height: 1.4;
  outline: 2px solid transparent;
  outline-offset: 1px;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn:hover {
  transform: translateY(-1.5px);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Primary Button (Indigo Gradient) */
.btn-primary {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  border-color: #4338ca;
  box-shadow: 0 2px 5px rgba(79, 70, 229, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: #4f46e5;
  outline-color: rgba(79, 70, 229, 0.35);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2), 0 6px 14px rgba(79, 70, 229, 0.3);
}

/* Success Button (Emerald Gradient) */
.btn-success {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border-color: #047857;
  box-shadow: 0 2px 5px rgba(5, 150, 105, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-success:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #059669;
  outline-color: rgba(5, 150, 105, 0.35);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.2), 0 6px 14px rgba(5, 150, 105, 0.3);
}

/* Danger Button (Crimson Gradient) */
.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #ffffff;
  border-color: #b91c1c;
  box-shadow: 0 2px 5px rgba(220, 38, 38, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-danger:hover {
  background: linear-gradient(135deg, #f87171 0%, #dc2626 100%);
  border-color: #dc2626;
  outline-color: rgba(220, 38, 38, 0.35);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2), 0 6px 14px rgba(220, 38, 38, 0.3);
}

/* Gold Button (Warm Amber Gradient) */
.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  border-color: #b45309;
  box-shadow: 0 2px 5px rgba(217, 119, 6, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
.btn-gold:hover {
  background: linear-gradient(135deg, #fbbf24 0%, #d97706 100%);
  border-color: #d97706;
  outline-color: rgba(217, 119, 6, 0.35);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2), 0 6px 14px rgba(217, 119, 6, 0.3);
}

/* Secondary Button (Clean White Card) */
.btn-secondary {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text-body);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.btn-secondary:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: var(--text-main);
  outline-color: rgba(79, 70, 229, 0.2);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08), 0 3px 6px rgba(0, 0, 0, 0.06);
}

/* Outline Buttons */
.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-body);
}
.btn-outline:hover {
  background: #ffffff;
  border-color: var(--primary);
  outline-color: rgba(79, 70, 229, 0.2);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1), 0 2px 4px rgba(0, 0, 0, 0.04);
}

.btn-outline-danger {
  background: transparent;
  border-color: var(--red-border);
  color: var(--red);
}
.btn-outline-danger:hover {
  background: var(--red-light);
  border-color: var(--red);
  outline-color: rgba(220, 38, 38, 0.2);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1), 0 2px 4px rgba(220, 38, 38, 0.1);
}

/* Specialized Standout POS Action Buttons */
.btn-accept-row {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  border: 1.5px solid #047857;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(5, 150, 105, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-accept-row:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.35), 0 0 0 3px rgba(5, 150, 105, 0.2);
  transform: translateY(-2px);
}
.btn-accept-row:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(5, 150, 105, 0.2);
}

.btn-save-checkout {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  border: 1.5px solid #3730a3;
  color: #ffffff;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  animation: pulse-outline-indigo 2.5s infinite ease-in-out;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-save-checkout:hover {
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4), 0 0 0 4px rgba(79, 70, 229, 0.25);
  transform: translateY(-2px);
}
.btn-save-checkout:active {
  transform: translateY(1px);
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.2);
}

/* Keyboard Shortcut Pill inside buttons */
.shortcut-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  margin-left: 6px;
  line-height: 1.1;
  letter-spacing: 0.2px;
}

/* Keyboard hints footer bar */
.pos-keyboard-hints {
  font-size: 11px;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px dashed var(--border);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  margin-top: 8px;
  text-align: center;
  display: block;
}
.pos-keyboard-hints strong {
  color: var(--primary);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  gap: 5px;
}

.btn-lg {
  padding: 12px 22px;
  font-size: 15px;
  gap: 8px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* -----------------------------------------------------
   TABLES (DATA SHEET, SCANNER, STAFF)
----------------------------------------------------- */
.adm-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  background: #ffffff;
}

.adm-table {
  width: 100%;
  border-collapse: collapse;
}

.adm-table th {
  background: #f8fafc;
  color: var(--text-main);
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  border-bottom: 1.5px solid var(--border);
  white-space: nowrap;
}

.adm-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-body);
}

.adm-table tr:hover {
  background: #f8fafc;
}

.empty-row td {
  text-align: center;
  color: var(--text-muted);
  padding: 30px !important;
  font-style: normal;
}

/* Filter bar */
.adm-filter-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-bottom: 16px;
}

.f-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.f-col label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.search-grow {
  flex: 1;
  min-width: 200px;
}

/* -----------------------------------------------------
   TAB 3: SCANNER & PRIZE PAYOUT
----------------------------------------------------- */
.ticket-lookup-card {
  margin-bottom: 20px;
  background: #ffffff;
  border: 1px solid var(--border);
}

.lookup-search-bar {
  display: flex;
  gap: 10px;
}

.lookup-search-bar input {
  flex: 1;
}

.scanner-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
}

@media (max-width: 1024px) {
  .scanner-layout { grid-template-columns: 1fr; }
}

.scan-box {
  background: #ffffff;
  border: 1px solid var(--border);
}

.scan-inputs {
  margin-bottom: 16px;
}

.scan-inputs .box-gold {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 10px;
}

.scan-btns {
  display: flex;
  gap: 10px;
}

.scan-badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
}
.scan-badge.active {
  background: #ecfdf5;
  color: #059669;
}

.scan-footer-apply {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  margin-top: 14px;
}

/* -----------------------------------------------------
   TAB 5: SHIFT & CASH DRAWER
----------------------------------------------------- */
.shift-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .shift-layout { grid-template-columns: 1fr; }
}

.shift-info-banner {
  display: flex;
  justify-content: space-between;
  background: #f8fafc;
  border: 1px solid var(--border);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.shift-info-banner .s-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 700;
}
.shift-info-banner .s-val {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 800;
}

.shift-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.s-stat-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
}

.s-stat-box .lbl {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  margin-bottom: 4px;
  font-weight: 700;
}

.s-stat-box .val {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  font-family: inherit;
}

.s-stat-box.green .val { color: var(--green); }
.s-stat-box.red .val { color: var(--red); }
.s-stat-box.gold .val { color: var(--gold); }

.shift-status-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--text-muted);
}
.shift-status-tag.open { background: #ecfdf5; color: #059669; }
.shift-status-tag.closed { background: #fef2f2; color: #dc2626; }

/* -----------------------------------------------------
   TAB 6: RISK LIMITS
----------------------------------------------------- */
.limits-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 900px) {
  .limits-layout { grid-template-columns: 1fr; }
}

.blocked-input-row, .custom-limit-add-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.blocked-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 48px;
  padding: 10px;
  background: #f8fafc;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-sm);
}

.blocked-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
}

.remove-chip-btn {
  background: transparent;
  border: none;
  color: #991b1b;
  cursor: pointer;
  font-weight: bold;
  font-size: 16px;
}

/* -----------------------------------------------------
   TAB 7: STAFF CONTROL & PERMISSIONS
----------------------------------------------------- */
.staff-layout {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 20px;
}

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

.permissions-box {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 16px;
}

.perm-title {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
  display: block;
}

.perm-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-body);
  cursor: pointer;
  padding: 6px 10px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: all 0.15s ease;
}

.perm-item:hover {
  border-color: var(--primary);
  background: #f0f7ff;
}

/* -----------------------------------------------------
   TAB 8: KPI METRIC CARDS
----------------------------------------------------- */
.adm-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 1024px) {
  .adm-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-box {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: 2px solid transparent;
  outline-offset: 1px;
}

.stat-box:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  outline-color: rgba(79, 70, 229, 0.15);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08), 0 8px 16px -4px rgba(15, 23, 42, 0.08);
}

.stat-box .icon { font-size: 24px; margin-bottom: 6px; display: inline-block; }
.stat-box .title { font-size: 12px; font-weight: 700; color: var(--text-muted); }
.stat-box .num { font-size: 22px; font-weight: 700; font-family: inherit; margin-top: 4px; color: var(--text-main); }

.stat-box.blue .num { color: var(--primary); }
.stat-box.green .num { color: var(--green); }
.stat-box.red .num { color: var(--red); }
.stat-box.gold .num { color: var(--gold); }

/* Bank cards grid */
.banks-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

@media (max-width: 1024px) {
  .banks-grid { grid-template-columns: repeat(2, 1fr); }
}

.bank-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: 2px solid transparent;
  outline-offset: 1px;
}

.bank-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  outline-color: rgba(79, 70, 229, 0.15);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08), 0 8px 16px -4px rgba(15, 23, 42, 0.08);
}

.bank-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary-navy);
}

.bank-balance {
  font-size: 20px;
  font-weight: 700;
  font-family: inherit;
  color: var(--green);
  margin: 6px 0;
}

.bank-meta {
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

/* -----------------------------------------------------
   THERMAL RECEIPTS & VOUCHERS
----------------------------------------------------- */
/* =====================================================
   RECEIPT DESIGN (Matches Code.gs printReceipt Exactly)
===================================================== */
#receipt {
  width: 380px;
  background: #fff !important;
  padding: 16px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transform-origin: top center;
  margin: 0 auto;
  font-family: "Khmer OS Battambang", "Noto Sans Khmer", Arial, sans-serif;
  color: #111;
  font-size: 16px;
  text-align: left;
}

.title { font-weight: bold; font-size: 18px; color: #111; text-align: center; }
.title-center { text-align: center !important; }
.divider { border: none; border-top: 2px dashed #333; margin: 12px 0; }
.half-divider { border: none; border-top: 2px dashed #333; margin: 12px 0; width: 50%; }
.row { font-weight: bold; margin: 6px 0; font-size: 18px; color: #111; }
.ticket-row, #admReceiptTicketFooter { font-weight: bold; font-size: 18px; margin: 6px 0; color: #111; text-align: center !important; }
.line { font-weight: bold; margin: 6px 0; font-size: 18px; padding-left: 20px; color: #111; }
.total { font-weight: bold; font-size: 18px; margin: 8px 0; color: #111; }
.footer { font-size: 16px; margin-top: 6px; color: #111; text-align: center; background: transparent; border: none; padding: 0; }
.footer-center { text-align: center !important; }
.market-row { font-weight: bold; font-size: 16px; margin: 4px 0; color: #111; }
.date-row { font-weight: bold; font-size: 16px; margin: 4px 0; color: #111; }
.category-row { font-size: 22px; font-weight: bold; margin: 8px 0; color: #111; }
.bet-line { font-size: 22px; font-weight: bold; margin: 6px 0; color: #111; }
.line-top { font-weight: bold; font-size: 22px; margin: 2px 0; padding-left: 36px; color: #111; }
.line-bottom { font-weight: bold; font-size: 22px; margin: 2px 0; padding-left: 36px; color: #111; }
.mid-line { font-weight: bold; font-size: 22px; margin: 2px 0; padding-left: 20px; color: #111; }
.arrow { color: #e63946; font-weight: bold; font-size: 22px; }
.ous-label { color: #1D3557; font-size: 14px; font-weight: bold; }
.blank-line { height: 14px; line-height: 14px; }

.receipt-win-badge {
  margin: 8px 0;
  padding: 8px 12px;
  background: #ecfdf5;
  color: #047857;
  border: 1.5px solid #a7f3d0;
  border-radius: 6px;
  text-align: center;
  font-weight: 900;
  font-size: 15px;
}

.receipt-void-badge {
  margin: 8px 0;
  padding: 8px 12px;
  background: #fef2f2;
  color: #b91c1c;
  border: 1.5px solid #fecaca;
  border-radius: 6px;
  text-align: center;
  font-weight: 900;
  font-size: 15px;
}

.receipt-cash-details {
  margin: 6px 0;
  padding: 6px 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 700;
}

.btn-bar {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  width: 380px;
  max-width: 100%;
  justify-content: space-between;
}
.btn-bar .btn {
  flex: 1;
  padding: 10px 8px;
  border: none;
  border-radius: 6px;
  font-weight: bold;
  font-size: 14px;
  cursor: pointer;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}
.btn-print { background: #1D3557 !important; }
.btn-copy { background: #2A9D8F !important; }
.btn-download { background: #E76F51 !important; }
.btn-telegram { background: #0284c7 !important; }

@media print {
  @page { size: auto; margin: 4mm; }
  html, body {
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body { display: block !important; }
  body > * {
    visibility: hidden !important;
  }
  #adminReceiptModal,
  #adminReceiptModal * {
    visibility: visible !important;
  }
  #adminReceiptModal {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    display: block !important;
  }
  #adminReceiptModal .modal-dialog {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }
  #adminReceiptModal .modal-header,
  #adminReceiptModal .modal-footer,
  .modal-close-btn,
  .btn-bar, .noprint {
    display: none !important;
  }
  #receipt {
    width: 100% !important;
    max-width: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    transform: none !important;
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
  }
  * {
    page-break-inside: avoid !important;
    page-break-after: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* -----------------------------------------------------
   MODAL DIALOGS
----------------------------------------------------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 16px;
  overflow-y: auto;
}

/* Tall dialogs (e.g. long bet receipts) must stay fully scrollable */
.modal-dialog {
  margin: auto;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: var(--radius-md);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  animation: modal-pop 0.25s ease-out;
}

/* The receipt dialog: the WHOLE modal is a vertical scroll container,
   so a very long bet receipt can always be scrolled to see everything. */
#adminReceiptModal {
  align-items: flex-start;
  overflow-y: auto;
}

#adminReceiptModal .modal-dialog {
  margin: 20px auto;
  max-height: none;
  overflow: visible;
}

#adminReceiptModal .modal-body {
  max-height: none;
  overflow: visible;
  padding: 16px;
}

/* Keep the action bar (Print / Copy / Download / Telegram) visible
   while scrolling a long receipt */
#adminReceiptModal .modal-footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  padding: 12px 16px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.10);
}

.modal-header {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  background: transparent;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
}

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

.modal-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.receipt-btn-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.receipt-btn-bar .btn {
  flex: 1;
  min-width: 100px;
}

.btn-print {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.25);
}
.btn-print:hover {
  background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
  border-color: #334155;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.35);
}

.btn-copy {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  border-color: #4338ca;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.25);
}
.btn-copy:hover {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  border-color: #4f46e5;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.btn-download {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  border-color: #047857;
  box-shadow: 0 2px 6px rgba(5, 150, 105, 0.25);
}
.btn-download:hover {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #059669;
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.35);
}

.btn-telegram {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.25);
}
.btn-telegram:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

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

.toast {
  background: #1e293b;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  box-shadow: var(--shadow-lg);
  animation: slide-up 0.2s ease-out;
}

.toast.success { background: var(--green); }
.toast.error { background: var(--red); }
.toast.info { background: #0284c7; }
.toast.warning { background: var(--gold); }

/* Utility classes */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.text-success { color: var(--green); }
.text-danger { color: var(--red); }
.text-muted { color: var(--text-muted); }
.font-mono { font-family: var(--font-khmer) !important; font-style: normal !important; }
.font-bold { font-weight: 700; }
.font-lg { font-size: 16px; }
.font-xl { font-size: 20px; }
.text-2xl { font-size: 22px; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: var(--bg-card-subtle);
  color: var(--text-body);
}

.badge.active { background: #ecfdf5; color: #059669; }
.badge.inactive { background: #fef2f2; color: #dc2626; }
.badge-info { background: #eff6ff; color: #1d4ed8; }



/* -----------------------------------------------------
   LAYOUT & COMPONENT REFINEMENTS (AUDIT FIXES)
----------------------------------------------------- */
.timer-icon {
  font-size: 13px;
  line-height: 1;
}

.pos-form {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.num-col {
  display: flex;
  flex-direction: column;
}

.table-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.scan-results-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.scan-alert-msg {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-weight: 700;
  font-size: 13px;
}

.num-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 14px;
}

.num-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 12px;
}

.extra-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.shift-control-card, .shift-voucher-preview-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.adm-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 18px 0;
}

.staff-form-card, .staff-list-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.receipt-date-row, .receipt-customer-row, .receipt-cashier-row {
  font-size: 11px;
  color: #334155;
  margin-bottom: 3px;
}

.receipt-win-row {
  font-size: 14px;
  font-weight: 700;
  color: #059669;
  text-align: right;
  margin-top: 6px;
}

.void-ticket-meta {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14px;
  line-height: 1.6;
}

.text-primary {
  color: var(--primary) !important;
}

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin: 10px 0;
  font-weight: 600;
  font-size: 13px;
}

.alert-danger {
  background: var(--red-light);
  border: 1px solid var(--red-border);
  color: var(--red);
}

.ticket-status-card {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 14px;
}

/* =====================================================
   MOBILE 3-DOT MENU & DRAWER (Base Styles)
===================================================== */
.mobile-header-actions {
  display: none;
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 9998;
  animation: fadeIn 0.2s ease-out;
}

.mobile-drawer-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 330px;
  max-width: 86vw;
  height: 100%;
  height: 100dvh;
  background: #0f172a;
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
  font-family: var(--font-khmer);
}

.mobile-drawer-menu.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  padding: 16px 18px;
  background: #1e293b;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mobile-drawer-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.mobile-drawer-avatar {
  font-size: 26px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-drawer-user-info {
  min-width: 0;
}

.mobile-drawer-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mobile-drawer-user-name {
  color: #f8fafc;
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.mobile-branch-text {
  color: #94a3b8;
  font-size: 11.5px;
  display: block;
  margin-top: 2px;
}

.mobile-drawer-close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.mobile-drawer-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

.mobile-drawer-status-strip {
  padding: 10px 14px;
  background: rgba(15, 23, 42, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.m-status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  font-size: 12px;
  color: #cbd5e1;
  font-weight: 600;
}

.mobile-drawer-heading {
  padding: 12px 18px 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: #64748b;
  text-transform: uppercase;
}

.mobile-functions-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  -webkit-overflow-scrolling: touch;
}

.mobile-fn-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  color: #f1f5f9;
  text-align: left;
  cursor: pointer;
  transition: all 0.15s ease;
  font-family: var(--font-khmer);
}

.mobile-fn-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateX(2px);
}

.mobile-fn-item:active {
  transform: scale(0.98);
}

.mobile-fn-item.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.22), rgba(14, 165, 233, 0.15));
  border-color: #3b82f6;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.25);
}

.mobile-fn-item .fn-icon {
  font-size: 22px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.mobile-fn-item.active .fn-icon {
  background: rgba(37, 99, 235, 0.3);
}

.mobile-fn-item .fn-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.mobile-fn-item .fn-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #f8fafc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-fn-item.active .fn-title {
  color: #60a5fa;
}

.mobile-fn-item .fn-desc {
  font-size: 11px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.mobile-fn-item .fn-arrow {
  color: #64748b;
  font-size: 16px;
  font-weight: 800;
  padding-right: 2px;
}

.mobile-fn-item.active .fn-arrow {
  color: #60a5fa;
}

.mobile-drawer-footer {
  padding: 14px 16px;
  background: #1e293b;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.mobile-footer-actions .btn {
  justify-content: center;
}

.btn-mobile-3dot {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #1e293b;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.btn-mobile-3dot:hover {
  background: #334155;
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.04);
}

.btn-mobile-3dot:active {
  transform: scale(0.95);
}

.three-dots-v {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.5px;
}

.dot-dot {
  width: 4.5px;
  height: 4.5px;
  background: #ffffff;
  border-radius: 50%;
  display: block;
}

.mobile-active-tab-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  color: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-khmer);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.mobile-active-tab-pill:active {
  transform: scale(0.96);
}

.active-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 6px #10b981;
}

/* =====================================================
   PROFESSIONAL MULTI-SCREEN RESPONSIVE ARCHITECTURE
   - Computer View (> 1024px)
   - Tablet View (768px - 1024px)
   - Mobile View (< 768px & < 480px)
===================================================== */

/* --- TABLET VIEW (768px - 1024px) --- */
@media (max-width: 1024px) {
  .admin-header {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .header-center-info {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    gap: 10px;
  }

  .pos-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .pos-panel-input, .pos-panel-table {
    width: 100%;
  }

  .adm-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .banks-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .limits-layout {
    grid-template-columns: 1fr;
  }

  .staff-layout {
    grid-template-columns: 1fr;
  }

  .scanner-layout {
    grid-template-columns: 1fr;
  }

  .modal-box {
    width: 90vw;
    max-width: 600px;
  }
}

/* --- MOBILE VIEW (< 768px) --- */
@media (max-width: 768px) {
  html, body {
    width: 100% !important;
    max-width: 100vw !important;
    height: 100% !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: manipulation !important;
    box-sizing: border-box !important;
  }

  body.admin-body {
    font-size: 13px;
    padding: 0;
    margin: 0;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  /* Prevent mobile Safari & Chrome from zooming in when focusing inputs */
  input, select, textarea, button {
    font-size: 16px !important;
  }

  /* Full Screen Layout */
  #mainAppWrapper {
    width: 100% !important;
    max-width: 100vw !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    display: flex !important;
    flex-direction: column !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    zoom: var(--app-zoom, 1);
  }

  /* Adaptive Sticky Header on Small / Zoomed Screens */
  .admin-header {
    padding: 6px 10px !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: center !important;
    top: 0 !important;
    position: sticky !important;
    z-index: 1000 !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 48px !important;
    overflow: visible !important;
    gap: 6px 10px !important;
  }

  .admin-brand {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    min-width: 0 !important;
    flex: 1 1 auto !important;
    overflow: hidden !important;
  }

  .brand-icon {
    font-size: 24px !important;
    flex-shrink: 0 !important;
  }

  .brand-heading {
    font-size: 13.5px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    margin: 0 !important;
    font-weight: 800 !important;
  }

  .brand-heading span, .brand-caption {
    display: none !important;
  }

  .header-center-info {
    display: flex !important;
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    gap: 8px;
  }

  .header-right-tools {
    display: flex !important;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }

  /* Show Mobile Header Actions (Active Tab Pill + 3-Dot Button) */
  .mobile-header-actions {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex-shrink: 0 !important;
  }

  .mobile-active-tab-pill {
    padding: 4px 8px !important;
    font-size: 12px !important;
    max-width: 120px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* FULL SCREEN HORIZONTAL SCROLLABLE NAVIGATION BAR SHOWING ALL FUNCTIONS */
  .admin-nav {
    display: block !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border-bottom: 1.5px solid var(--border) !important;
    padding: 6px 8px !important;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04) !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
    position: sticky !important;
    top: 48px !important;
    z-index: 999 !important;
  }

  .admin-nav::-webkit-scrollbar {
    display: none !important;
  }

  .admin-nav-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    width: max-content !important;
    min-width: 100% !important;
    margin: 0 !important;
    padding: 1px 2px !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
  }

  .adm-tab {
    flex: 0 0 auto !important;
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 7px 12px !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    min-height: 38px !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 8px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
  }

  .adm-tab .icon {
    font-size: 15px !important;
  }

  .adm-tab .tab-label {
    display: inline-block !important;
    white-space: nowrap !important;
    max-width: none !important;
    overflow: visible !important;
    font-size: 12.5px !important;
  }

  /* Main Container — Full screen, zero unwanted padding */
  .admin-main {
    padding: 8px 6px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  /* Cards & Panels — Full screen fit, no overflow */
  .adm-card, .pos-panel-input, .pos-panel-table {
    padding: 12px 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
    border-radius: 10px !important;
    overflow-x: hidden !important;
  }

  .adm-card-head {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .adm-card-head > div:first-child {
    width: 100% !important;
  }

  .head-btn-group {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)) !important;
    width: 100% !important;
    gap: 6px !important;
    box-sizing: border-box !important;
  }

  .head-btn-group .btn {
    width: 100% !important;
    min-width: 0 !important;
    padding: 8px 4px !important;
    font-size: 12px !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* POS Betting Form */
  .pos-layout {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 12px !important;
    box-sizing: border-box !important;
  }

  .panel-head {
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-bottom: 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .panel-head h3 {
    font-size: 14px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  /* Channel Labels & Tools */
  .channel-label-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .channel-quick-tools {
    display: flex !important;
    gap: 4px !important;
  }

  .btn-channel-tool {
    padding: 3px 6px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  /* Channel Combos (AIF, BD, AF, BCD, ABC, ABCDF) */
  .channel-combos-wrap {
    padding: 8px 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .channel-combos-container {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-combo-chip {
    padding: 8px 2px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  /* Individual Channel Chips (A, B, C, D, I, F...) */
  .channel-chips-container {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-post-chip {
    padding: 8px 1px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  /* Number Inputs & Tools */
  .num-inputs-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .num-col-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .num-quick-tools {
    display: flex !important;
    gap: 4px !important;
  }

  .btn-num-tool {
    padding: 4px 8px !important;
    font-size: 11px !important;
    white-space: nowrap !important;
  }

  /* Numpad Keypad */
  .pos-numpad-wrap {
    padding: 10px 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 10px !important;
  }

  .pos-numpad-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-numpad-key {
    padding: 10px 2px !important;
    font-size: 15px !important;
    min-height: 42px !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Quick Amount Chips */
  .quick-amounts-bar {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin-top: 6px !important;
  }

  .btn-amt-chip {
    padding: 7px 2px !important;
    font-size: 12px !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }

  /* Customer inputs */
  .customer-inputs-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Add Row Button */
  #btnAdminAcceptH19 {
    width: 100% !important;
    max-width: 100% !important;
    padding: 12px 10px !important;
    font-size: 14.5px !important;
    font-weight: 800 !important;
    white-space: normal !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
    margin-top: 10px !important;
  }

  /* POS Cart Table — Clean Horizontal Scrolling with NO Width Blowout */
  .pos-cart-table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    min-height: 200px !important;
    max-height: 320px !important;
    box-sizing: border-box !important;
  }

  .pos-grid-table {
    min-width: 480px !important;
    width: 100% !important;
  }

  /* Checkout Bar & Cash Tender Chips (NEVER OVERFLOW) */
  .pos-checkout-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .checkout-bank-selector {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .checkout-bank-selector select {
    flex: 1 !important;
    max-width: 180px !important;
  }

  .checkout-cash-tender-wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 8px 10px !important;
    box-sizing: border-box !important;
  }

  .tender-input-box {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .tender-input-box input {
    width: 120px !important;
  }

  .tender-quick-chips {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 4px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .btn-tender-chip {
    padding: 6px 2px !important;
    font-size: 11px !important;
    text-align: center !important;
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .tender-change-preview {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .checkout-summary {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #btnAdminSaveTableS22 {
    width: 100% !important;
    max-width: 100% !important;
    padding: 13px 10px !important;
    font-size: 14.5px !important;
    font-weight: 800 !important;
    white-space: normal !important;
    word-break: break-word !important;
    box-sizing: border-box !important;
  }

  .shortcut-pill,
  .pos-keyboard-hints {
    display: none !important;
  }

  /* Horizontal Scrollable Tables on Mobile */
  .adm-table-wrap, .table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 10px !important;
    box-sizing: border-box !important;
  }

  .adm-table {
    min-width: 650px !important;
  }

  /* Ledger Filter Bar */
  .adm-filter-bar {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .adm-filter-bar .f-col {
    width: 100% !important;
  }

  .adm-filter-bar input, .adm-filter-bar select {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Scanner & Payout */
  .lookup-search-bar {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .lookup-search-bar button {
    width: 100% !important;
  }

  .scan-btns {
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .scan-btns button {
    width: 100% !important;
  }

  .scan-footer-apply {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    width: 100% !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }

  .scan-footer-apply button {
    width: 100% !important;
  }

  /* Stats and Banks */
  .adm-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .stat-box {
    padding: 8px 10px !important;
    box-sizing: border-box !important;
  }

  .stat-box .num {
    font-size: 16px !important;
  }

  .banks-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Shift Cards */
  .shift-control-card, .shift-voucher-preview-card {
    padding: 12px 10px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Modals */
  .modal-box {
    width: 95vw !important;
    max-width: 95vw !important;
    margin: 10px auto !important;
    padding: 14px 10px !important;
    max-height: 90vh !important;
    box-sizing: border-box !important;
  }

  .receipt-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .receipt-actions button {
    width: 100% !important;
  }

  .thermal-receipt {
    max-width: 100% !important;
    padding: 16px 8px !important;
    box-sizing: border-box !important;
  }
}

/* --- SMALL MOBILE VIEW (< 480px) --- */
@media (max-width: 480px) {
  .admin-header {
    padding: 6px 8px !important;
  }

  .header-center-info {
    justify-content: flex-start !important;
  }

  .clock-badge {
    display: none !important;
  }

  .adm-stats-grid {
    grid-template-columns: 1fr !important;
  }

  .btn-amt-chip {
    font-size: 11px !important;
    padding: 6px 2px !important;
  }

  .channel-combos-container {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  .btn-combo-chip {
    font-size: 12px !important;
    padding: 7px 1px !important;
  }
}

/* =====================================================
   ON-SCREEN TOUCH POS NUMPAD STYLING
   ===================================================== */
.pos-numpad-wrap {
  margin-top: 14px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.pos-numpad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
}

.numpad-title {
  color: #334155;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.numpad-target {
  color: var(--primary);
  font-size: 11px;
}

.pos-numpad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.btn-numpad-key {
  background: #ffffff;
  color: #1e293b;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px 6px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all 0.12s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 44px;
}

.btn-numpad-key:hover {
  background: #f1f5f9;
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
}

.btn-numpad-key:active {
  transform: translateY(1px) scale(0.97);
  background: #e2e8f0;
}

.btn-numpad-key.key-action {
  background: #fef3c7;
  color: #92400e;
  border-color: #fde68a;
}

.btn-numpad-key.key-action:hover {
  background: #fde68a;
  border-color: #f59e0b;
}

.btn-numpad-key.key-clear {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.btn-numpad-key.key-clear:hover {
  background: #fecaca;
  border-color: #ef4444;
}

.btn-numpad-key.key-space {
  background: #e0e7ff;
  color: #3730a3;
  border-color: #c7d2fe;
}

.btn-numpad-key.key-space:hover {
  background: #c7d2fe;
  border-color: var(--primary);
}

.btn-numpad-key.key-enter {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.25);
}

.btn-numpad-key.key-enter:hover {
  background: #059669;
  border-color: #047857;
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.35);
}

/* =====================================================
   COMPREHENSIVE ANIMATED ICON SUITE
   - Every single icon has alive continuous animation
   - Interactive hover, focus, and active reactive physics
   - Keyframe motions tailored to each function & symbol
   ===================================================== */

/* Base Universal Icon Rules */
.icon, 
.brand-icon, 
.login-icon, 
.timer-icon, 
.user-avatar-icon, 
.stat-icon, 
.chip-icon, 
.role-badge .icon,
.modal-header .icon,
.btn-action .icon,
.adm-tab .icon,
.badge-icon,
.icon-alive {
  display: inline-block !important;
  vertical-align: middle;
  transform-origin: center center;
  will-change: transform, filter;
  animation: icon-float-alive 3s ease-in-out infinite;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
}

/* Universal Alive Floating Breathing Keyframe */
@keyframes icon-float-alive {
  0%, 100% {
    transform: translateY(0px) scale(1);
    filter: drop-shadow(0 0 0 rgba(0,0,0,0));
  }
  50% {
    transform: translateY(-2px) scale(1.06);
    filter: drop-shadow(0 2px 4px rgba(245, 158, 11, 0.25));
  }
}

/* Interactive Pop & Wiggle on Hover */
button:hover .icon,
.adm-tab:hover .icon,
.btn:hover .icon,
.channel-chip:hover .icon,
.btn-amt-chip:hover .icon,
.animal-card:hover .icon,
.btn-numpad-key:hover .icon,
.receipt-action-btn:hover .icon,
.icon:hover {
  animation: icon-pop-wiggle 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both !important;
  filter: drop-shadow(0 3px 8px rgba(245, 158, 11, 0.45)) !important;
}

@keyframes icon-pop-wiggle {
  0% { transform: scale(1); }
  30% { transform: scale(1.22) rotate(-8deg); }
  60% { transform: scale(1.15) rotate(6deg); }
  100% { transform: scale(1.18) rotate(0deg); }
}

/* 1. Brand Icon 🎰 - Radiant pulse glow */
.brand-icon {
  animation: icon-brand-glow 3s ease-in-out infinite !important;
}
@keyframes icon-brand-glow {
  0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 2px rgba(16, 185, 129, 0.4)); }
  50% { transform: translateY(-2px) scale(1.08); filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.8)); }
}

/* 2. POS Slot Machine 🎰 - Lively jackpot bounce */
.adm-tab[data-tab="tab-pos"] .icon {
  animation: icon-slot-spin 2.8s ease-in-out infinite !important;
}
@keyframes icon-slot-spin {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  45% { transform: translateY(-3px) scale(1.08); }
  55% { transform: translateY(-3px) rotate(8deg) scale(1.12); }
  65% { transform: translateY(-1px) rotate(-6deg) scale(1.08); }
}

/* 3. Bets Ledger 📊 - Rhythmic analytical surge */
.adm-tab[data-tab="tab-data"] .icon {
  animation: icon-bar-pulse 2.6s ease-in-out infinite !important;
}
@keyframes icon-bar-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12) translateY(-2px); }
}

/* 4. Scanner & Payout 🔍 - Radar sweep wobble */
.adm-tab[data-tab="tab-scanner"] .icon {
  animation: icon-scan-swivel 3.5s ease-in-out infinite !important;
}
@keyframes icon-scan-swivel {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-14deg) scale(1.08); }
  75% { transform: rotate(14deg) scale(1.08); }
}

/* 5. Draw Results 📢 - Megaphone broadcast waves */
.adm-tab[data-tab="tab-results"] .icon {
  animation: icon-broadcast 2.4s ease-in-out infinite !important;
}
@keyframes icon-broadcast {
  0%, 100% { transform: scale(1) rotate(0deg); }
  30% { transform: scale(1.15) rotate(-6deg); }
  40% { transform: scale(1.2) rotate(4deg); }
  50% { transform: scale(1.12) rotate(-2deg); }
}

/* 6. Shift & Drawer 💵 / 💰 - Cash float & gleam */
.adm-tab[data-tab="tab-shifts"] .icon {
  animation: icon-gold-float 2.7s ease-in-out infinite !important;
}
@keyframes icon-gold-float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.1) rotate(3deg); }
}

/* 7. Risk Limits 🛡️ - Shield protective pulse */
.adm-tab[data-tab="tab-limits"] .icon {
  animation: icon-shield-pulse 3s ease-in-out infinite !important;
}
@keyframes icon-shield-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12) translateY(-1px); }
}

/* 8. Staff Control 👥 - Team sync bob */
.adm-tab[data-tab="tab-staff"] .icon {
  animation: icon-team-bob 2.9s ease-in-out infinite !important;
}
@keyframes icon-team-bob {
  0%, 100% { transform: translateY(0) scale(1); }
  40% { transform: translateY(-2px) scale(1.06); }
  60% { transform: translateY(-1px) scale(1.06); }
}

/* 9. Staff Reports 📈 - Continuous growth upward */
.adm-tab[data-tab="tab-staff-reports"] .icon {
  animation: icon-chart-surge 2.6s ease-in-out infinite !important;
}
@keyframes icon-chart-surge {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-3px) scale(1.12); }
}

/* 10. Financials 💰 / 🏦 - Golden shimmer */
.adm-tab[data-tab="tab-finance"] .icon {
  animation: icon-coin-gleam 2.8s ease-in-out infinite !important;
}
@keyframes icon-coin-gleam {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50% { transform: scale(1.12) rotate(-4deg); }
}



/* 12. Logout 🚪 - Door ajar animation */
.adm-tab-logout .icon {
  animation: icon-door-swing 3.4s ease-in-out infinite !important;
}
@keyframes icon-door-swing {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-8deg) scale(1.06); }
}

/* 13. Clock & Countdown Timer ⏰ ⏳ */
.timer-icon, .clock-icon {
  animation: icon-timer-tick 2s ease-in-out infinite !important;
}
@keyframes icon-timer-tick {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  75% { transform: rotate(-10deg); }
}

/* 14. Login Emblem Icon 🎰 / 🔑 */
.login-icon {
  animation: icon-login-glow 2.8s ease-in-out infinite !important;
}
@keyframes icon-login-glow {
  0%, 100% { transform: translateY(0) scale(1); filter: drop-shadow(0 0 0 rgba(79, 70, 229, 0)); }
  50% { transform: translateY(-4px) scale(1.08); filter: drop-shadow(0 6px 16px rgba(79, 70, 229, 0.4)); }
}

/* 15. Action Icons (Save, Clear, Refresh, Print, Download, Telegram) */
.btn-save .icon, #btnAdminSaveTableS22 .icon {
  animation: icon-save-pulse 2.2s ease-in-out infinite !important;
}
@keyframes icon-save-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}

.receipt-action-btn.print .icon, #btnAdmPrint .icon {
  animation: icon-print-slide 2.5s ease-in-out infinite !important;
}
@keyframes icon-print-slide {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.receipt-action-btn.telegram .icon, #btnAdmSendTelegram .icon {
  animation: icon-plane-soar 2.8s ease-in-out infinite !important;
}
@keyframes icon-plane-soar {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(-8deg) scale(1.1); }
}

/* =====================================================
   UNIVERSAL TEXT TRUNCATION & CENTERING (ELLIPSIS)
   - Text stays middle / center
   - If longer than shape, displays ... (ellipsis)
   - Never wraps onto multiple awkward lines
   ===================================================== */
.btn, 
.btn-action, 
.btn-sm, 
.btn-lg, 
.btn-channel-tool, 
.btn-num-tool, 
.btn-amt-chip, 
.btn-tender-chip,
.tab-label,
.brand-heading,
.brand-caption,
.shift-badge-pill,
.next-draw-badge,
.clock-badge {
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  max-width: 100% !important;
  text-align: center;
}

/* Tablet Navigation Optimization (Zero Horizontal Scrolling) */
@media (max-width: 1024px) and (min-width: 769px) {
  .admin-nav-tabs {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }
}


/* ================================================================
   SYSTEM SETTINGS TAB (SUPER ADMIN) — Company, Logo, Formula Editor
   ================================================================ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-grid .adm-form-group {
  margin-bottom: 0;
}

.settings-logo-preview img {
  max-height: 90px;
  border: 1px solid #ccc;
  border-radius: 8px;
  background: #fff;
  padding: 4px;
}

/* Formula editor cards */
.formula-editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.formula-btn-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 14px 16px;
}

.formula-btn-card .fbc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.formula-btn-card .fbc-head .fbc-btn-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 34px;
  padding: 0 10px;
  border-radius: 8px;
  background: #0a1f44;
  color: #ffd76a;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .5px;
}

.formula-btn-card .fbc-head .fbc-legend {
  font-size: 12px;
  color: #64748b;
}

.formula-btn-card .fbc-defaults {
  display: flex;
  gap: 16px;
  align-items: flex-end;
  margin-bottom: 12px;
}

.formula-btn-card .fbc-defaults label {
  display: block;
  font-size: 11px;
  color: #475569;
  margin-bottom: 4px;
  font-weight: 600;
}

.formula-btn-card .fbc-defaults input,
.formula-btn-card .fbc-row input,
.formula-btn-card .fbc-row select {
  width: 90px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
}

.formula-btn-card .fbc-section {
  border-top: 1px dashed #e2e8f0;
  padding-top: 10px;
  margin-top: 10px;
}

.formula-btn-card .fbc-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 8px;
}

.formula-btn-card .fbc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.formula-btn-card .fbc-row .fbc-row-hint {
  font-size: 11px;
  color: #94a3b8;
  min-width: 60px;
}

.formula-btn-card .fbc-row select.fbc-market-sel {
  width: 220px;
}

.formula-btn-card .fbc-row select.fbc-time-sel {
  width: 150px;
}

.formula-btn-card .fbc-row .fbc-del {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 12px;
}

.formula-btn-card .fbc-row .fbc-del:hover {
  background: #dc2626;
  color: #fff;
}

.formula-btn-card .fbc-add {
  margin-top: 6px;
  font-size: 12px;
  padding: 5px 12px;
}

@media (max-width: 680px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ===================================================== */
/* WINNER LOTTERY ROW HIGHLIGHT (GREEN) */
/* ===================================================== */
.winner-highlight-row {
  background-color: #ecfdf5 !important;
  border-left: 5px solid #10b981 !important;
}

.winner-highlight-row td {
  background-color: #ecfdf5 !important;
  color: #064e3b !important;
}

.winner-highlight-row td.font-bold {
  color: #065f46 !important;
}

.badge-winner-glow {
  background: #10b981 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  padding: 4px 8px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.4) !important;
  animation: pulse-green 2s infinite !important;
}

@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ===================================================== */
/* MERGED CUSTOMER & BANK COLUMNS (VERTICAL CENTER) */
/* ===================================================== */
.customer-col-merged,
.bank-col-merged {
  vertical-align: middle !important;
  text-align: center !important;
  background: #f8fafc !important;
  border-left: 1px solid #e2e8f0 !important;
  border-right: 1px solid #e2e8f0 !important;
  padding: 8px 6px !important;
}

.customer-col-merged .cust-name {
  font-size: 13.5px;
  font-weight: 800;
  color: #0f172a;
  display: block;
}

.customer-col-merged .cust-phone {
  font-size: 11px;
  color: #64748b;
  display: block;
  margin-top: 2px;
}

.customer-col-merged .cust-count-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
  background: #e2e8f0;
  color: #334155;
}

.bank-select-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.bank-ticket-hint {
  font-size: 10px;
  color: #64748b;
  font-weight: 600;
  display: block;
}

.bet-bank-select {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  background-color: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 95px;
  text-align: center;
}

.bet-bank-select:hover {
  border-color: #94a3b8;
}

.bet-bank-select:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.bet-bank-select[data-bank="Cash"] {
  color: #15803d;
  background-color: #f0fdf4;
  border-color: #86efac;
}

.bet-bank-select[data-bank="ABA"] {
  color: #0284c7;
  background-color: #f0f9ff;
  border-color: #7dd3fc;
}

.bet-bank-select[data-bank="WING"] {
  color: #a16207;
  background-color: #fefce8;
  border-color: #fde047;
}

.bet-bank-select[data-bank="AC"] {
  color: #1d4ed8;
  background-color: #eff6ff;
  border-color: #93c5fd;
}

.bet-bank-select[data-bank="True"] {
  color: #c2410c;
  background-color: #fff7ed;
  border-color: #fdba74;
}

.btn-edit-customer {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  padding: 1px 5px;
  font-size: 10px;
  border-radius: 4px;
  cursor: pointer;
  color: #475569;
  transition: all 0.15s ease;
}

.btn-edit-customer:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Modal Edit Amounts */
#modalEditAmounts .adm-form-group {
  margin-bottom: 12px;
}

/* ===================================================== */
/* LEDGER ANALYTICS DASHBOARD & ANIMATIONS */
/* ===================================================== */
.ledger-analytics-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* Row 1: Today vs Yesterday vs Filtered Profit */
.ledger-profit-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.ledger-stat-card {
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  position: relative;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ledger-stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.stat-card-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.stat-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
}

.badge-today {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.badge-yesterday {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.badge-filtered {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.stat-main-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.stat-main-value {
  font-size: 22px;
  font-weight: 900;
  color: #0f172a;
  margin: 4px 0;
  font-family: inherit;
  letter-spacing: -0.5px;
}

.stat-sub-meta {
  font-size: 12px;
  color: #475569;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.meta-sep {
  color: #cbd5e1;
}

/* Row 2: Banks & Overall Totals Grid */
.ledger-banks-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.ledger-bank-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.ledger-bank-card:hover {
  transform: translateY(-2px);
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.bank-card-icon {
  font-size: 22px;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  flex-shrink: 0;
}

.bank-card-content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bank-card-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bank-card-amount {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.3px;
}

/* Specific Bank Card Accents */
.bank-cash { border-left: 3px solid #16a34a; }
.bank-cash .bank-card-icon { background: #f0fdf4; color: #16a34a; }

.bank-aba { border-left: 3px solid #0284c7; }
.bank-aba .bank-card-icon { background: #f0f9ff; color: #0284c7; }

.bank-acleda { border-left: 3px solid #2563eb; }
.bank-acleda .bank-card-icon { background: #eff6ff; color: #2563eb; }

.bank-true { border-left: 3px solid #ea580c; }
.bank-true .bank-card-icon { background: #fff7ed; color: #ea580c; }

.bank-wing { border-left: 3px solid #eab308; }
.bank-wing .bank-card-icon { background: #fefce8; color: #ca8a04; }

.stat-total-bets { border-left: 3px solid #6366f1; }
.stat-total-bets .bank-card-icon { background: #eef2ff; color: #6366f1; }

.stat-total-winner { border-left: 3px solid #f59e0b; }
.stat-total-winner .bank-card-icon { background: #fffbeb; color: #d97706; }

.stat-net-profit { border-left: 3px solid #10b981; }
.stat-net-profit .bank-card-icon { background: #ecfdf5; color: #059669; }

/* Quick Date Filters Toolbar */
.ledger-quick-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}

.quick-filter-label {
  font-size: 12px;
  font-weight: 700;
  color: #475569;
}

.btn-quick-filter {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #334155;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-quick-filter:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.btn-quick-filter.active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* ===================================================== */
/* LIVELY ANIMATIONS FOR ALL LOGOS & WINNERS */
/* ===================================================== */
@keyframes icon-float-anim {
  0% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(4deg); }
  100% { transform: translateY(0px) rotate(0deg); }
}

@keyframes icon-pulse-anim {
  0% { transform: scale(1); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.4)); }
  100% { transform: scale(1); }
}

@keyframes icon-bounce-anim {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes icon-spin-slow-anim {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.icon-float {
  display: inline-block;
  animation: icon-float-anim 3.5s ease-in-out infinite;
}

.icon-pulse {
  display: inline-block;
  animation: icon-pulse-anim 2.5s ease-in-out infinite;
}

.icon-bounce {
  display: inline-block;
  animation: icon-bounce-anim 2s ease-in-out infinite;
}

.icon-spin-slow {
  display: inline-block;
  animation: icon-spin-slow-anim 12s linear infinite;
}

/* Winner Table Row Full Green Highlight Animation */
@keyframes full-green-winner-pulse {
  0% {
    background-color: #dcfce7 !important;
    box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.4), 0 0 10px rgba(16, 185, 129, 0.3) !important;
  }
  50% {
    background-color: #bbf7d0 !important;
    box-shadow: inset 0 0 22px rgba(16, 185, 129, 0.7), 0 0 18px rgba(16, 185, 129, 0.5) !important;
  }
  100% {
    background-color: #dcfce7 !important;
    box-shadow: inset 0 0 10px rgba(16, 185, 129, 0.4), 0 0 10px rgba(16, 185, 129, 0.3) !important;
  }
}

.winner-highlight-row {
  animation: full-green-winner-pulse 1.8s ease-in-out infinite !important;
  border-left: 6px solid #10b981 !important;
  background-color: #dcfce7 !important;
}

.winner-highlight-row td {
  background-color: transparent !important;
  color: #064e3b !important;
  font-weight: 700 !important;
}

.winner-pulse-badge {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
  color: #ffffff !important;
  padding: 5px 12px !important;
  border-radius: 999px !important;
  font-weight: 900 !important;
  font-size: 13.5px !important;
  letter-spacing: 0.5px !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.7) !important;
  animation: pulse-badge-glow 1.5s infinite ease-in-out !important;
}

@keyframes pulse-badge-glow {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  50% { transform: scale(1.06); box-shadow: 0 0 16px 4px rgba(16, 185, 129, 0.5); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
}

.winner-cust-highlight {
  display: inline-block;
  font-weight: 900 !important;
  color: #065f46 !important;
  background: linear-gradient(135deg, #dcfce7 0%, #fef3c7 100%);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid #86efac;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.25);
  animation: cust-win-pulse 2s infinite ease-in-out;
}

@keyframes cust-win-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); box-shadow: 0 0 12px rgba(16, 185, 129, 0.5); }
  100% { transform: scale(1); }
}

.winner-sparkle-icon {
  display: inline-block;
  animation: icon-spin-slow-anim 4s linear infinite;
  color: #f59e0b;
}

/* Channel Quick Chips in Draw Results */
.channel-quick-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.btn-channel-chip {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  transition: all 0.18s ease;
}

.btn-channel-chip:hover {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #4338ca;
  transform: translateY(-1px);
}

.btn-channel-chip.active {
  background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
  border-color: #4338ca;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.badge-channel-win {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  padding: 4px 10px !important;
  border-radius: 999px !important;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3) !important;
}

/* ===================================================== */
/* RESPONSIVE & ZOOM-ADAPTIVE SIDEBAR NAVIGATION */
/* ===================================================== */
.btn-sidebar-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  flex-shrink: 0;
}

.btn-sidebar-toggle:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
  transform: scale(1.05);
}

.btn-sidebar-close {
  display: none;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  margin-left: auto;
}

.btn-sidebar-close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* Collapsed Mini-Rail on Desktop */
.admin-sidebar.sidebar-collapsed {
  width: 68px !important;
  min-width: 68px !important;
  max-width: 68px !important;
}

.admin-sidebar.sidebar-collapsed .sidebar-brand-text,
.admin-sidebar.sidebar-collapsed .sidebar-user-info,
.admin-sidebar.sidebar-collapsed .sidebar-menu-heading,
.admin-sidebar.sidebar-collapsed .tab-label,
.admin-sidebar.sidebar-collapsed .btn-sidebar-close {
  display: none !important;
}

.admin-sidebar.sidebar-collapsed .sidebar-brand-box {
  justify-content: center;
  padding: 14px 4px;
}

.admin-sidebar.sidebar-collapsed .sidebar-user-card {
  justify-content: center;
  padding: 6px;
  margin: 6px 4px;
}

.admin-sidebar.sidebar-collapsed .sidebar-nav-tabs .adm-tab {
  justify-content: center !important;
  padding: 10px 0 !important;
}

.admin-sidebar.sidebar-collapsed .sidebar-nav-tabs .adm-tab .icon {
  margin: 0 !important;
  font-size: 20px !important;
  width: auto !important;
}

.admin-sidebar.sidebar-collapsed .sidebar-footer {
  padding: 8px 4px !important;
  display: flex !important;
  justify-content: center !important;
}

.admin-sidebar.sidebar-collapsed .sidebar-footer .adm-tab-logout {
  justify-content: center !important;
  padding: 10px 0 !important;
}

.admin-sidebar.sidebar-collapsed .sidebar-footer .adm-tab-logout .tab-label {
  display: none !important;
}

/* When zoomed or narrow screen (< 992px): Slide-over Drawer */
@media (max-width: 991px) {
  .btn-sidebar-close {
    display: inline-block;
  }
  .admin-app-layout {
    display: block !important;
  }
  .admin-main-wrap {
    width: 100% !important;
    max-width: 100% !important;
  }
  .admin-sidebar {
    position: fixed !important;
    top: 0;
    bottom: 0;
    left: -290px;
    width: 270px !important;
    max-width: 85vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 2100 !important;
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.4);
    transition: left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    background: #0f172a !important;
  }
  .admin-sidebar.sidebar-open {
    left: 0 !important;
  }
  .admin-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    z-index: 2050;
  }
  .admin-sidebar-backdrop.active {
    display: block;
  }
}

/* In-App Screen Zoom Controls Widget */
.header-zoom-widget {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.btn-zoom-act {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 3px 7px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-zoom-act:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.btn-zoom-reset {
  background: transparent;
  border: none;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  cursor: pointer;
  border-radius: 4px;
}

.btn-zoom-reset:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #0f172a;
}

/* ===================================================== */
/* REAL BANK LOGOS & STYLING */
/* ===================================================== */
.bank-card-logo-img {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  object-fit: contain;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease;
  vertical-align: middle;
}

.ledger-bank-card:hover .bank-card-logo-img {
  transform: scale(1.15) rotate(2deg);
}

.bet-bank-logo {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: contain;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  flex-shrink: 0;
  vertical-align: middle;
}

.bank-select-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-direction: column;
}

.bank-pill-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  padding: 3px 7px;
  border-radius: 6px;
}

/* ===================================================== */
/* STAFF PROFIT RANKING LEADERBOARD CHIPS */
/* ===================================================== */
.staff-profit-ranking-bar {
  animation: slide-in-down 0.3s ease-out;
}

.staff-profit-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.staff-profit-chip:hover {
  transform: translateY(-2px);
  border-color: #3b82f6;
  box-shadow: 0 4px 10px rgba(59, 130, 246, 0.18);
}

.staff-profit-chip.active {
  background: #eff6ff;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.staff-profit-chip .sp-medal {
  font-size: 14px;
}

.staff-profit-chip .sp-name {
  font-weight: 700;
  color: #1e293b;
}

.staff-profit-chip .sp-profit {
  font-weight: 800;
  border-radius: 4px;
  padding: 1px 5px;
}

.staff-profit-chip .sp-pos {
  color: #15803d;
  background: #dcfce7;
}

.staff-profit-chip .sp-neg {
  color: #b91c1c;
  background: #fee2e2;
}

.staff-profit-chip .sp-badge {
  color: #64748b;
  font-size: 11px;
}

.btn-edit-win {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 28px !important;
  height: 24px !important;
  padding: 2px 7px !important;
  font-size: 13px !important;
  line-height: 1 !important;
  border-radius: 6px !important;
  border: 1px solid #f59e0b !important;
  color: #b45309 !important;
  background: #fffbeb !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  position: relative !important;
  z-index: 10 !important;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-edit-win:hover {
  background: #f59e0b !important;
  color: #ffffff !important;
  transform: scale(1.15);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.btn-edit-win * {
  pointer-events: none !important;
}

#modalEditWin {
  z-index: 10001 !important;
}




/* ===================================================== */
/* LOTTERY MARKET COLOR THEMES & POS TERMINAL BANNER */
/* ===================================================== */
.pos-market-theme-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.pos-market-theme-banner::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  pointer-events: none;
}

.banner-market-icon {
  font-size: 32px;
  line-height: 1;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25));
}

.banner-market-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.banner-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.banner-subtitle {
  font-size: 11.5px;
  opacity: 0.92;
}

/* Market Theme Colors */
/* 1. Khmer Lottery - Deep Blue & Royal Gold */
.theme-market-khmer {
  background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 60%, #3b82f6 100%);
  border-left: 5px solid #fbbf24;
}

/* 2. Thai Lottery - Royal Thai Purple & Gold */
.theme-market-thai {
  background: linear-gradient(135deg, #4c1d95 0%, #6d28d9 60%, #8b5cf6 100%);
  border-left: 5px solid #fde047;
}

/* 3. Vietnam Lottery - Crimson Red & Star Yellow */
.theme-market-vietnam {
  background: linear-gradient(135deg, #7f1d1d 0%, #b91c1c 60%, #ef4444 100%);
  border-left: 5px solid #fef08a;
}

/* 4. Thinhnam New - Modern Emerald Green & Mint */
.theme-market-thinhnam-new {
  background: linear-gradient(135deg, #064e3b 0%, #047857 60%, #10b981 100%);
  border-left: 5px solid #a7f3d0;
}

/* 5. Thinhnam Old - Classic Amber & Bronze */
.theme-market-thinhnam-old {
  background: linear-gradient(135deg, #78350f 0%, #b45309 60%, #d97706 100%);
  border-left: 5px solid #fde68a;
}

/* 6. Lao Lottery - Teal & Cyan */
.theme-market-lao {
  background: linear-gradient(135deg, #0f766e 0%, #0d9488 60%, #14b8a6 100%);
  border-left: 5px solid #99f6e4;
}

/* 7. Custom / Other */
.theme-market-custom {
  background: linear-gradient(135deg, #1e293b 0%, #334155 60%, #475569 100%);
  border-left: 5px solid #94a3b8;
}

/* POS Market Chips Selector */
.pos-market-group {
  margin-bottom: 14px;
}

.pos-market-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.pos-market-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.pos-market-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pos-market-chip .chip-icon {
  font-size: 15px;
  line-height: 1;
}

.pos-market-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Active Chip States matching lottery themes */
.pos-market-chip.theme-market-khmer.active {
  background: #1e40af;
  color: #ffffff;
  border-color: #fbbf24;
  box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.25), 0 4px 10px rgba(30, 64, 175, 0.35);
}

.pos-market-chip.theme-market-thai.active {
  background: #6d28d9;
  color: #ffffff;
  border-color: #fde047;
  box-shadow: 0 0 0 2px rgba(109, 40, 217, 0.25), 0 4px 10px rgba(109, 40, 217, 0.35);
}

.pos-market-chip.theme-market-vietnam.active {
  background: #b91c1c;
  color: #ffffff;
  border-color: #fef08a;
  box-shadow: 0 0 0 2px rgba(185, 28, 28, 0.25), 0 4px 10px rgba(185, 28, 28, 0.35);
}

.pos-market-chip.theme-market-thinhnam-new.active {
  background: #047857;
  color: #ffffff;
  border-color: #a7f3d0;
  box-shadow: 0 0 0 2px rgba(4, 120, 87, 0.25), 0 4px 10px rgba(4, 120, 87, 0.35);
}

.pos-market-chip.theme-market-thinhnam-old.active {
  background: #b45309;
  color: #ffffff;
  border-color: #fde68a;
  box-shadow: 0 0 0 2px rgba(180, 83, 9, 0.25), 0 4px 10px rgba(180, 83, 9, 0.35);
}

.pos-market-chip.theme-market-lao.active {
  background: #0d9488;
  color: #ffffff;
  border-color: #99f6e4;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.25), 0 4px 10px rgba(13, 148, 136, 0.35);
}

.pos-market-chip.theme-market-custom.active {
  background: #1e293b;
  color: #ffffff;
  border-color: #94a3b8;
  box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.25), 0 4px 10px rgba(30, 41, 59, 0.35);
}

/* ===================================================== */
/* BETS LEDGER TOTAL BETS BALANCE BADGE */
/* ===================================================== */
.cust-total-balance-badge {
  display: inline-block;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 6px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid #bae6fd;
  text-align: center;
  box-shadow: 0 1px 2px rgba(3, 105, 161, 0.08);
}

.winner-highlight-row .cust-total-balance-badge {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

/* ===================================================== */
/* FULL SCREEN RESPONSIVE OPTIMIZATIONS (PC, TABLET, MOBILE) */
/* ===================================================== */
/* Computer Full-screen Layout: prevent oversize & overflow */
html, body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.admin-app-layout {
  min-height: 100vh;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.admin-main-wrap {
  flex: 1;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.adm-pane {
  max-width: 100%;
  box-sizing: border-box;
}

/* POS Terminal Full Screen Layout */
.pos-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.1fr) minmax(340px, 0.9fr);
  gap: 16px;
  align-items: start;
  width: 100%;
}

.pos-cart-card {
  position: sticky;
  top: 16px;
  display: flex;
  flex-direction: column;
}

/* Tablet Layout (iPad, Galaxy Tab, 769px - 1024px) */
@media (max-width: 1024px) {
  .pos-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pos-cart-card {
    position: static;
  }
  .pos-market-chips-container {
    gap: 6px;
  }
  .pos-market-chip {
    padding: 5px 10px;
    font-size: 12px;
  }
  .num-row {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  .adm-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Mobile Screen Layout (<= 768px): 100% full screen & visible buttons */
@media (max-width: 768px) {
  body {
    padding: 0;
    margin: 0;
  }
  .admin-app-layout {
    padding: 0;
  }
  .admin-main-wrap {
    padding: 10px 8px 70px 8px;
  }
  .pos-layout {
    grid-template-columns: 100%;
    gap: 12px;
  }
  .adm-card {
    padding: 12px !important;
    border-radius: 10px !important;
    margin-bottom: 12px !important;
  }
  .pos-market-theme-banner {
    padding: 10px 12px;
    gap: 8px;
  }
  .banner-market-icon {
    font-size: 24px;
  }
  .banner-title {
    font-size: 14px;
  }
  .banner-subtitle {
    font-size: 11px;
  }
  .pos-market-chips-container {
    gap: 5px;
  }
  .pos-market-chip {
    padding: 4px 8px;
    font-size: 11.5px;
    border-radius: 6px;
  }
  .num-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }
  .num-row input {
    font-size: 18px !important;
    height: 42px !important;
  }
  .modal-dialog {
    width: 95% !important;
    max-width: 95% !important;
    margin: 10px auto !important;
    max-height: 92vh !important;
    overflow-y: auto !important;
  }
  .btn-lg {
    padding: 10px 14px !important;
    font-size: 14px !important;
  }
  .pos-cart-bottom-bar {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding: 10px 0;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.08);
    z-index: 10;
  }
}

/* ===================================================== */
/* BET TYPE BUTTONS / CHIPS (SAME AS MARKET SELECTION) */
/* ===================================================== */
.pos-bettype-chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.pos-bettype-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  color: #1e293b;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  user-select: none;
}

.pos-bettype-chip .chip-icon {
  font-size: 14px;
  line-height: 1;
}

.pos-bettype-chip .chip-badge {
  font-size: 11px;
  padding: 1px 5px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
}

.pos-bettype-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  border-color: #cbd5e1;
}

.pos-bettype-chip.active {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.25), 0 4px 10px rgba(2, 132, 199, 0.35);
}

.pos-bettype-chip.active .chip-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* ===================================================== */
/* SCANNER WINNING CUSTOMERS STYLES */
/* ===================================================== */
.winning-customer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.winning-customer-card:hover {
  box-shadow: 0 4px 10px rgba(34, 197, 94, 0.15);
  border-color: #86efac;
}

.winning-customer-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.winning-customer-name {
  font-weight: 700;
  font-size: 14px;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.winning-customer-sub {
  font-size: 12px;
  color: #64748b;
}

.winning-customer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.winning-amount-badge {
  font-size: 15px;
  font-weight: 800;
  color: #15803d;
  background: #dcfce7;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid #86efac;
}

/* ===================================================== */
/* 3-DOTS HEADER MENU & USER DROPDOWN */
/* ===================================================== */
.header-3dots-wrapper {
  position: relative;
  display: inline-block;
}

.btn-header-3dots {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: #f1f5f9;
  border: 1.5px solid #cbd5e1;
  color: #334155;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-header-3dots:hover,
.btn-header-3dots.active {
  background: #e2e8f0;
  color: #0f172a;
  border-color: #94a3b8;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.btn-header-3dots .three-dots-v {
  display: flex;
  flex-direction: column;
  gap: 3.5px;
  align-items: center;
  justify-content: center;
}

.btn-header-3dots .dot-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

/* 3-Dots Dropdown */
.header-3dots-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 270px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 8px;
  z-index: 1100;
  animation: fadeInDown 0.18s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.dropdown-user-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #f1f5f9;
}

.dropdown-user-avatar {
  font-size: 22px;
  line-height: 1;
}

.dropdown-user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  overflow: hidden;
}

.dropdown-user-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.dropdown-branch-text {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
}

.dropdown-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 6px 0;
}

.dropdown-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.dropdown-menu-item:hover {
  background: #f1f5f9;
  color: #0f172a;
  transform: translateX(3px);
}

.dropdown-menu-item.text-danger {
  color: #ef4444;
}

.dropdown-menu-item.text-danger:hover {
  background: #fef2f2;
  color: #dc2626;
}

.dropdown-item-icon {
  font-size: 16px;
  line-height: 1;
  width: 20px;
  text-align: center;
}


