/* ============================================================================
   admin.css - Admin UI Shopee/Lazada style (CLEAN VERSION)
   Cho: order-admin.html, admin-order.html
   ============================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800&display=swap');

:root {
  --primary: #ffd700;
  --primary-dark: #f9a825;
  --primary-light: rgba(255, 215, 0, 0.1);
  --success: #00c853;
  --success-bg: rgba(0, 200, 83, 0.1);
  --danger: #ff3b30;
  --danger-bg: rgba(255, 59, 48, 0.1);
  --warning: #ff9800;
  --warning-bg: rgba(255, 152, 0, 0.1);
  --info: #2196f3;
  --bg: #0f0f1e;
  --surface: #1a1a2e;
  --surface-2: #232338;
  --surface-3: #2a2a45;
  --text: #ffffff;
  --text-2: #b0b0c0;
  --text-3: #808090;
  --border: #2d2d44;
  --border-2: #3a3a55;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.4);
  --font: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }

/* ============ LOGIN SCREEN ============ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: radial-gradient(circle at 30% 20%, #1a1a2e 0%, #0a0a1a 70%);
}

.login-card {
  width: 100%;
  max-width: 420px;
  padding: 44px 36px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #fff, var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.login-card p {
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
  margin-bottom: 32px;
}

.login-card input {
  width: 100%;
  padding: 14px 18px;
  margin-bottom: 14px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
}

.login-card input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

/* ============ LAYOUT ============ */
.admin-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--bg);
}

/* ============ SIDEBAR ============ */
.admin-sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar .logo {
  padding: 0 24px 20px;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  margin: 2px 12px;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.admin-nav-item:hover {
  background: var(--surface-2);
  color: var(--text);
}

.admin-nav-item.active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
}

.admin-nav-item span:first-child {
  font-size: 20px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

.admin-nav-item:last-of-type { margin-top: auto; }

/* ============ MAIN ============ */
.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 10;
  gap: 16px;
  flex-wrap: wrap;
}

.admin-header h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
}

.view {
  padding: 24px 32px 60px;
  flex: 1;
  animation: viewEnter 0.25s ease-out;
}

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

/* ============ CARD ============ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.card h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin: 20px 0 12px;
  padding: 8px 12px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card h4:first-child { margin-top: 0; }

/* ============ STATS GRID ============ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 215, 0, 0.12);
}

.stat-card .label {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 8px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stat-card .value {
  font-size: 30px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
}

/* ============ TABLE ============ */
.data-table,
.sa-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}

.data-table thead,
.sa-table thead {
  background: var(--surface-2);
}

.data-table th,
.sa-table th {
  text-align: left;
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td,
.sa-table td {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 13px;
  color: var(--text);
}

.data-table tr:last-child td,
.sa-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover,
.sa-table tr:hover {
  background: var(--surface-2);
}

.data-table td img,
.sa-table td img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

/* ============ BADGES ============ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.paid,
.badge.pro {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(255, 215, 0, 0.3);
}

.badge.free {
  background: rgba(176, 176, 192, 0.1);
  color: var(--text-2);
  border: 1px solid rgba(176, 176, 192, 0.2);
}

.badge.active,
.badge.ready {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(0, 200, 83, 0.3);
}

.badge.pending {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.badge.cancelled,
.badge.suspended {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(255, 59, 48, 0.3);
}

/* ============ BUTTONS ============ */
.btn-primary,
.sa-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #1a1a2e;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
  white-space: nowrap;
  font-family: inherit;
}

.btn-primary:hover,
.sa-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.35);
}

.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius);
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius);
  border: none;
  background: linear-gradient(135deg, #ff4757, #e02a20);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-danger:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 71, 87, 0.35);
}

/* ============ INPUTS ============ */
input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
input[type="url"],
select,
textarea {
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: all 0.2s;
  font-family: inherit;
  width: 100%;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-light);
}

/* ============ MODAL ============ */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 1000;
}

.modal.show { display: flex; }

.modal-content {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8);
  animation: modalIn 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.95) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-content h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 24px;
}

.modal-content label {
  display: block;
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 6px;
  margin-top: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.modal-content label:first-of-type { margin-top: 0; }

.modal-content .btn-primary,
.modal-content .btn-secondary {
  width: 100%;
  margin-top: 12px;
}

/* ============ TOAST ============ */
#toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  padding: 14px 24px;
  border-radius: 100px;
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  z-index: 9999;
  border: 1px solid var(--primary);
  box-shadow: 0 0 30px rgba(255, 215, 0, 0.4);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  max-width: 90%;
  text-align: center;
}

#toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ============ ERROR BOX ============ */
.error {
  color: var(--danger);
  font-size: 13px;
  margin-top: 12px;
  padding: 10px 14px;
  background: var(--danger-bg);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 59, 48, 0.3);
  text-align: center;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb {
  background: var(--border-2);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* =========================================================
   RESPONSIVE - TABLET (<= 900px)
   ========================================================= */
@media (max-width: 900px) {
  .admin-layout {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
  }
  
  .admin-sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    width: 100%;
    height: auto;
    flex-direction: row;
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    background: rgba(15, 15, 30, 0.98);
    backdrop-filter: blur(20px);
    border-right: none;
    border-top: 1px solid var(--border);
    z-index: 100;
    overflow-x: auto;
    overflow-y: hidden;
    gap: 2px;
  }
  
  .admin-sidebar .logo { display: none; }
  
  .admin-nav-item {
    flex: 1;
    flex-direction: column;
    gap: 2px;
    padding: 8px 4px;
    margin: 0 2px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 600;
    text-align: center;
    justify-content: center;
    min-width: 70px;
  }
  
  .admin-nav-item span:first-child {
    font-size: 20px;
    width: auto;
    margin: 0;
  }
  
  .admin-nav-item span:last-child {
    font-size: 10px;
    line-height: 1.2;
  }
  
  .admin-nav-item:last-of-type { margin-top: 0; }
  
  .admin-main {
    padding-bottom: 90px;
    min-height: 100vh;
  }
  
  .admin-header {
    padding: 12px 14px;
    gap: 8px;
  }
  
  .admin-header h1 {
    font-size: 18px;
    flex: 1;
    min-width: 0;
  }
  
  .view {
    padding: 14px 14px 40px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
  }
  
  .stat-card {
    padding: 14px 16px;
    border-radius: 12px;
  }
  
  .stat-card .label {
    font-size: 10px;
    margin-bottom: 6px;
  }
  
  .stat-card .value { font-size: 22px; }
  
  .card {
    padding: 14px;
    border-radius: 12px;
    margin-bottom: 14px;
  }
  
  .card h3 {
    font-size: 15px;
    padding-bottom: 12px;
    margin-bottom: 14px;
  }
  
  .card h4 {
    font-size: 13px;
    padding: 8px 10px;
    margin: 14px 0 10px;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 10px;
    min-height: 40px;
  }
  
  input[type="text"],
  input[type="password"],
  input[type="number"],
  input[type="email"],
  input[type="url"],
  select,
  textarea {
    padding: 12px 14px;
    font-size: 15px;
    border-radius: 10px;
    min-height: 44px;
  }
  
  .modal {
    padding: 0;
    align-items: flex-end;
  }
  
  .modal-content {
    max-width: 100%;
    width: 100%;
    border-radius: 20px 20px 0 0;
    padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
    max-height: 90vh;
    animation: modalSlideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  }
  
  @keyframes modalSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }
  
  .data-table,
  .sa-table {
    display: table;
    overflow-x: auto;
    white-space: nowrap;
  }
  
  .data-table th,
  .sa-table th { padding: 10px 12px; font-size: 10px; }
  
  .data-table td,
  .sa-table td { padding: 12px; font-size: 12px; }
  
  .data-table td img,
  .sa-table td img { width: 44px; height: 44px; }
}

/* =========================================================
   RESPONSIVE - MOBILE (<= 640px)
   TABLE → CARD LAYOUT
   ========================================================= */
@media (max-width: 640px) {
  .data-table thead,
  .sa-table thead {
    display: none !important;
  }
  
  .data-table,
  .sa-table {
    display: block !important;
    border: none !important;
    background: transparent !important;
    overflow: visible !important;
    white-space: normal !important;
    border-radius: 0 !important;
  }
  
  .data-table tbody,
  .sa-table tbody {
    display: block !important;
  }
  
  .data-table tr,
  .sa-table tr {
    display: block !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  
  .data-table td,
  .sa-table td {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 8px 0 !important;
    border: none !important;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05) !important;
    width: 100% !important;
    font-size: 13px !important;
    white-space: normal !important;
    word-break: break-word !important;
    text-align: right !important;
  }
  
  .data-table td:last-child,
  .sa-table td:last-child {
    border-bottom: none !important;
    padding-top: 12px !important;
    margin-top: 4px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
    justify-content: center !important;
  }
  
  .data-table td::before,
  .sa-table td::before {
    content: attr(data-label);
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--text-3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    flex-shrink: 0 !important;
    text-align: left !important;
    min-width: 70px !important;
  }
  
  .data-table td:first-child,
  .sa-table td:first-child {
    padding: 0 0 12px 0 !important;
    margin-bottom: 8px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    justify-content: flex-start !important;
    gap: 14px !important;
    text-align: left !important;
  }
  
  .data-table td:first-child::before,
  .sa-table td:first-child::before {
    display: none !important;
  }
  
  .data-table td img,
  .sa-table td img {
    width: 60px !important;
    height: 60px !important;
    border-radius: 10px !important;
    flex-shrink: 0 !important;
  }
  
  .data-table td:first-child img,
  .sa-table td:first-child img {
    width: 70px !important;
    height: 70px !important;
    border-radius: 12px !important;
  }
  
  .data-table td button,
  .sa-table td button,
  .data-table td .btn-secondary,
  .sa-table td .btn-secondary,
  .data-table td .btn-danger,
  .sa-table td .btn-danger {
    width: 100% !important;
    padding: 12px 16px !important;
    font-size: 13px !important;
    border-radius: 10px !important;
    justify-content: center !important;
    min-height: 42px !important;
  }
  
  .data-table td b,
  .sa-table td b {
    font-size: 14px !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
  }
  
  .data-table td .badge,
  .sa-table td .badge {
    font-size: 11px !important;
    padding: 5px 12px !important;
  }
  
  .view {
    padding: 12px 12px 100px !important;
  }

  /* ✅ FIX MOBILE: Bảng Bàn & QR hiển thị dạng CARD */
  .tables-management {
    min-width: 0 !important;
    display: block !important;
    border: none !important;
    background: transparent !important;
  }
  
  .tables-management thead {
    display: none !important;
  }
  
  .tables-management tbody {
    display: block !important;
  }
  
  .tables-management tr {
    display: block !important;
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }
  
  .tables-management td {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 10px 0 !important;
    border: none !important;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.05) !important;
    width: 100% !important;
    font-size: 13px !important;
    text-align: right !important;
  }
  
  .tables-management td:last-child {
    border-bottom: none !important;
  }
  
  .tables-management td::before {
    content: attr(data-label);
    font-size: 11px !important;
    font-weight: 700 !important;
    color: var(--text-3) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    flex-shrink: 0 !important;
    text-align: left !important;
  }
  
  /* Cột Session: hiển thị toggle bên dưới label */
  .tables-management td[data-label="SESSION"] {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 8px !important;
    text-align: left !important;
  }
  
  .tables-management td[data-label="SESSION"]::before {
    width: 100% !important;
  }
  
  /* Nút QR/Reset: to hơn, dễ bấm */
  .tables-management .btn-qr-icon,
  .tables-management .btn-reset-icon {
    width: 100% !important;
    height: 48px !important;
    font-size: 22px !important;
    max-width: 100% !important;
  }
  
  /* Toggle switch mobile: full width */
  .session-switch {
    width: 100% !important;
    max-width: 140px !important;
    height: 44px !important;
  }
  
  .switch-thumb {
    width: 36px !important;
    height: 36px !important;
    font-size: 18px !important;
  }
  
  .session-switch.on .switch-thumb {
    transform: translateX(calc(140px - 44px)) !important;
  }
  
  .switch-text {
    font-size: 13px !important;
  }
   
   
}

/* =========================================================
   RESPONSIVE - SMALL MOBILE (<= 400px)
   ========================================================= */
@media (max-width: 400px) {
  .stat-card .value { font-size: 20px; }
  .admin-header h1 { font-size: 16px; }
  .view { padding: 10px 10px 100px !important; }
  .card { padding: 12px; }
  
  .data-table tr,
  .sa-table tr {
    padding: 12px !important;
    margin-bottom: 10px !important;
  }
  
  .data-table td,
  .sa-table td {
    font-size: 12px !important;
    padding: 6px 0 !important;
  }
  
  .data-table td::before,
  .sa-table td::before {
    font-size: 10px !important;
    min-width: 60px !important;
  }
  
  .data-table td img,
  .sa-table td img {
    width: 50px !important;
    height: 50px !important;
  }
  
  .data-table td:first-child img,
  .sa-table td:first-child img {
    width: 60px !important;
    height: 60px !important;
  }
  
  .admin-nav-item {
    font-size: 9px;
    min-width: 60px;
  }
  
  .admin-nav-item span:first-child {
    font-size: 18px;
  }
  
  .btn-primary,
  .btn-secondary,
  .btn-danger {
    padding: 9px 14px;
    font-size: 12px;
    min-height: 36px;
  }
}

/* ============ SAFE AREA (iPhone notch) ============ */
@supports (padding: env(safe-area-inset-bottom)) {
  @media (max-width: 900px) {
    .admin-sidebar {
      padding-bottom: calc(8px + env(safe-area-inset-bottom));
    }
    
    .admin-main {
      padding-bottom: calc(90px + env(safe-area-inset-bottom));
    }
  }
}



/* =========================================================
   MENU GRID - Shopee/Lazada Style
   Desktop: Grid card vuông
   Mobile: Ảnh trái + Info phải
   ========================================================= */

/* ============ MENU CATEGORY ============ */
.menu-category {
  margin-bottom: 32px;
}

.menu-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 215, 0, 0.02));
  border-left: 4px solid var(--primary);
  border-radius: 10px;
}

.menu-category-header h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-category-header .cat-count {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 600;
}

.btn-sm {
  padding: 6px 14px !important;
  font-size: 12px !important;
  min-height: 32px !important;
}

.menu-empty {
  text-align: center;
  color: var(--text-3);
  padding: 30px 20px;
  font-size: 14px;
}

/* ============ MENU GRID ============ */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

/* ============ MENU CARD ============ */
.menu-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.menu-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: 0 12px 32px rgba(255, 215, 0, 0.15);
}

.menu-card.unavailable {
  opacity: 0.55;
  filter: grayscale(0.6);
}

/* ============ ẢNH MÓN ============ */
.menu-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--surface-2);
  overflow: hidden;
}

.menu-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block;
}

.menu-card:hover .menu-card-img img {
  transform: scale(1.08);
}

.menu-card-img .img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: var(--text-3);
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}

/* Badge "Hết" overlay */
.menu-card.unavailable::before {
  content: 'HẾT HÀNG';
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 6px;
  letter-spacing: 0.5px;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(255, 59, 48, 0.5);
}

/* ============ INFO ============ */
.menu-card-body {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.menu-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 40px;
}

.menu-card-desc {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.menu-card-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.3px;
  margin-top: auto;
  padding-top: 4px;
}

/* ============ ACTIONS ============ */
.menu-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  margin-top: 4px;
  border-top: 1px solid var(--border);
}

.toggle-avail {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  user-select: none;
  transition: all 0.2s;
}

.toggle-avail:hover {
  background: var(--surface-3);
}

.toggle-avail input {
  width: 16px;
  height: 16px;
  accent-color: var(--success);
  cursor: pointer;
  margin: 0;
}

.btn-edit {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-edit:hover {
  background: var(--primary);
  color: #1a1a2e;
  border-color: var(--primary);
}

/* =========================================================
   MOBILE - ẢNH TRÁI + INFO PHẢI
   ========================================================= */
@media (max-width: 640px) {
  .menu-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .menu-card {
    flex-direction: row;
    align-items: stretch;
    min-height: 130px;
    border-radius: 12px;
  }
  
  .menu-card:hover {
    transform: none;
  }
  
  /* Ảnh bên TRÁI - VUÔNG, TO */
  .menu-card-img {
    width: 130px;
    min-width: 130px;
    height: 130px;
    aspect-ratio: auto;
    border-radius: 12px 0 0 12px;
    flex-shrink: 0;
  }
  
  .menu-card-img .img-placeholder {
    font-size: 48px;
  }
  
  /* Badge Hết gọn hơn */
  .menu-card.unavailable::before {
    top: 8px;
    left: 8px;
    right: auto;
    font-size: 9px;
    padding: 3px 8px;
  }
  
  /* Info bên PHẢI */
  .menu-card-body {
    padding: 12px;
    flex: 1;
    min-width: 0;
    justify-content: space-between;
  }
  
  .menu-card-name {
    font-size: 14px;
    min-height: auto;
    -webkit-line-clamp: 2;
  }
  
  .menu-card-desc {
    display: none;
  }
  
  .menu-card-price {
    font-size: 16px;
    padding-top: 0;
    margin-top: 4px;
  }
  
  .menu-card-actions {
    padding-top: 8px;
    margin-top: 6px;
    border-top: 1px dashed var(--border);
  }
  
  .toggle-avail {
    padding: 5px 8px;
    font-size: 11px;
    gap: 4px;
  }
  
  .toggle-avail input {
    width: 14px;
    height: 14px;
  }
  
  .btn-edit {
    padding: 6px 12px;
    font-size: 12px;
  }
  
  /* Category header gọn */
  .menu-category {
    margin-bottom: 20px;
  }
  
  .menu-category-header {
    padding: 10px 12px;
    margin-bottom: 10px;
  }
  
  .menu-category-header h4 {
    font-size: 14px;
  }
  
  .btn-sm {
    padding: 5px 10px !important;
    font-size: 11px !important;
    min-height: 28px !important;
  }
}

/* =========================================================
   TABLET - ẢNH TRÊN, INFO DƯỚI, GRID 2 CỘT
   ========================================================= */
@media (min-width: 641px) and (max-width: 900px) {
  .menu-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

/* =========================================================
   DESKTOP - GRID 3-4 CỘT
   ========================================================= */
@media (min-width: 1200px) {
  .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}



/* =========================================================
   SESSION BUTTONS - Trạng thái mở/đóng
   ========================================================= */

/* Nút MỞ session - Vàng */
.btn-session-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #ffd700, #f9a825);
  color: #1a1a2e;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  min-height: 40px;
  box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.btn-session-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
}

.btn-session-open:active {
  transform: translateY(0);
}

/* Nút ĐÓNG session - Xanh lá */
.btn-session-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 14px;
  border-radius: 10px;
  border: 2px solid rgba(0, 255, 136, 0.5);
  background: rgba(0, 255, 136, 0.12);
  color: #00ff88;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
  min-height: 36px;
}

.btn-session-close:hover {
  background: rgba(0, 255, 136, 0.2);
  border-color: #00ff88;
  transform: translateY(-1px);
}

/* Mobile */
@media (max-width: 640px) {
  .btn-session-open,
  .btn-session-close {
    padding: 12px 16px;
    font-size: 13px;
    min-height: 44px;
  }
}


/* =========================================================
   SESSION TOGGLE - ON/OFF Switch with Glow Effect
   ========================================================= */

.session-toggle-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

/* ============ TOGGLE BUTTON ============ */
.session-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: 90px;
  height: 40px;
  padding: 3px;
  border-radius: 100px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: inherit;
  overflow: hidden;
}

/* ============ TRẠNG THÁI OFF (Xám/Đỏ) ============ */
.session-toggle.off {
  background: linear-gradient(135deg, #4a4a5a, #2a2a3a);
  border-color: rgba(255, 59, 48, 0.4);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 0 rgba(255, 59, 48, 0);
}

.session-toggle.off:hover {
  border-color: rgba(255, 59, 48, 0.8);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 59, 48, 0.6),
    0 0 40px rgba(255, 59, 48, 0.3);
}

/* Slider OFF - bên trái */
.session-toggle.off .toggle-slider {
  transform: translateX(0);
  background: linear-gradient(135deg, #808090, #5a5a6a);
}

/* ============ TRẠNG THÁI ON (Xanh lá) ============ */
.session-toggle.on {
  background: linear-gradient(135deg, #00ff88, #00c853);
  border-color: rgba(0, 255, 136, 0.6);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 0 20px rgba(0, 255, 136, 0.5),
    0 0 40px rgba(0, 255, 136, 0.2);
  animation: onGlow 2s ease-in-out infinite;
}

@keyframes onGlow {
  0%, 100% {
    box-shadow: 
      inset 0 2px 4px rgba(0, 0, 0, 0.2),
      0 0 20px rgba(0, 255, 136, 0.5),
      0 0 40px rgba(0, 255, 136, 0.2);
  }
  50% {
    box-shadow: 
      inset 0 2px 4px rgba(0, 0, 0, 0.2),
      0 0 30px rgba(0, 255, 136, 0.8),
      0 0 60px rgba(0, 255, 136, 0.4);
  }
}

.session-toggle.on:hover {
  transform: scale(1.05);
  box-shadow: 
    inset 0 2px 4px rgba(0, 0, 0, 0.2),
    0 0 40px rgba(0, 255, 136, 1),
    0 0 80px rgba(0, 255, 136, 0.6);
}

/* Slider ON - bên phải */
.session-toggle.on .toggle-slider {
  transform: translateX(50px);
  background: linear-gradient(135deg, #ffffff, #e0ffe8);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* ============ SLIDER (Cục tròn) ============ */
.toggle-slider {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 -2px 4px rgba(0, 0, 0, 0.1);
  z-index: 2;
}

.toggle-icon {
  font-size: 18px;
  line-height: 1;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s;
}

.session-toggle:hover .toggle-icon {
  transform: scale(1.2) rotate(10deg);
}

/* ============ LABEL ON/OFF ============ */
.toggle-label {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  transition: all 0.4s;
  z-index: 1;
}

.session-toggle.off .toggle-label {
  right: 12px;
}

.session-toggle.on .toggle-label {
  left: 12px;
}

/* ============ TIMER ============ */
.session-timer {
  font-size: 10px;
  color: #00ff88;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}

/* ============ NÚT QR & RESET DẠNG ICON ============ */
.btn-qr-icon,
.btn-reset-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.btn-qr-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #1a1a2e;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.btn-reset-icon {
  background: rgba(0, 168, 255, 0.1);
  border-color: rgba(0, 168, 255, 0.4);
  color: #00a8ff;
}

.btn-reset-icon:hover:not(.disabled) {
  background: #00a8ff;
  border-color: #00a8ff;
  color: #fff;
  transform: scale(1.1) rotate(180deg);
  box-shadow: 0 0 20px rgba(0, 168, 255, 0.6);
}

.btn-reset-icon.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  background: transparent;
  border-color: var(--border);
  color: var(--text-3);
}

/* ============ HOVER EFFECT TOÀN BẢNG ============ */
.tables-management tr {
  transition: all 0.3s;
}

.tables-management tr:hover {
  background: rgba(0, 240, 255, 0.04) !important;
  transform: scale(1.005);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ============ MOBILE ============ */
@media (max-width: 900px) {
  .session-toggle {
    width: 80px;
    height: 36px;
  }
  
  .toggle-slider {
    width: 30px;
    height: 30px;
  }
  
  .session-toggle.on .toggle-slider {
    transform: translateX(44px);
  }
  
  .toggle-icon {
    font-size: 16px;
  }
  
  .toggle-label {
    font-size: 11px;
  }
}

@media (max-width: 640px) {
  /* Mobile: Toggle to full width */
  .session-toggle-wrap {
    width: 100%;
  }
  
  .session-toggle {
    width: 100%;
    max-width: 140px;
    height: 44px;
  }
  
  .toggle-slider {
    width: 36px;
    height: 36px;
  }
  
  .session-toggle.on .toggle-slider {
    transform: translateX(calc(140px - 42px));
  }
  
  .toggle-icon {
    font-size: 20px;
  }
  
  .btn-qr-icon,
  .btn-reset-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
}

/* =========================================================
   SESSION SWITCH - ON/OFF Toggle (2 màu: xanh/đỏ)
   ========================================================= */

.tables-management {
  width: 100%;
}
.tables-management td {
  padding: 16px 18px;
}

/* ============ SWITCH CONTAINER ============ */
.session-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 120px;
  height: 44px;
  padding: 0;
  border: none;
  border-radius: 100px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: inherit;
  background: transparent;
}

/* ============ TRACK (Nền) ============ */
.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 100px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  padding: 4px;
}

/* ============ THUMB (Cục tròn) ============ */
.switch-thumb {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  z-index: 2;
}

/* ============ TEXT (ON/OFF) ============ */
.switch-text {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 1.5px;
  z-index: 1;
  transition: all 0.4s;
  pointer-events: none;
}

/* =========================================================
   TRẠNG THÁI OFF (ĐỎ)
   ========================================================= */
.session-switch.off .switch-track {
  background: linear-gradient(135deg, #ff3b30, #c62828);
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.3),
    0 0 0 rgba(255, 59, 48, 0);
}

.session-switch.off .switch-thumb {
  transform: translateX(0);
  background: linear-gradient(135deg, #ffffff, #f0f0f0);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05);
  color: #ff3b30;
}

.session-switch.off .switch-text {
  right: 12px;
  left: auto;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.session-switch.off:hover .switch-track {
  background: linear-gradient(135deg, #ff5a52, #d32f2f);
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 59, 48, 0.6),
    0 0 40px rgba(255, 59, 48, 0.3);
}

/* =========================================================
   TRẠNG THÁI ON (XANH LÁ)
   ========================================================= */
.session-switch.on .switch-track {
  background: linear-gradient(135deg, #00c853, #008c3a);
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(0, 255, 136, 0.4),
    0 0 40px rgba(0, 255, 136, 0.2);
  animation: switchGlow 2s ease-in-out infinite;
}

@keyframes switchGlow {
  0%, 100% {
    box-shadow: 
      inset 0 2px 6px rgba(0, 0, 0, 0.3),
      0 0 20px rgba(0, 255, 136, 0.4),
      0 0 40px rgba(0, 255, 136, 0.2);
  }
  50% {
    box-shadow: 
      inset 0 2px 6px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(0, 255, 136, 0.8),
      0 0 60px rgba(0, 255, 136, 0.4);
  }
}

.session-switch.on .switch-thumb {
  transform: translateX(76px);
  background: linear-gradient(135deg, #ffffff, #e0ffe8);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(255, 255, 255, 0.6),
    inset 0 -2px 4px rgba(0, 0, 0, 0.05);
  color: #00c853;
}

.session-switch.on .switch-text {
  left: 14px;
  right: auto;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.session-switch.on:hover .switch-track {
  background: linear-gradient(135deg, #00e676, #00a844);
  box-shadow: 
    inset 0 2px 6px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(0, 255, 136, 1),
    0 0 80px rgba(0, 255, 136, 0.6);
}

/* Hover zoom */
.session-switch:hover {
  transform: scale(1.05);
}

.session-switch:active {
  transform: scale(0.98);
}

/* ============ QR BUTTON ============ */
.btn-qr-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-qr-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #1a1a2e;
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

/* ============ RESET DEVICE BUTTON ============ */
.btn-reset-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid var(--border-2);
  background: var(--surface-2);
  color: var(--text-3);
  font-size: 20px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-reset-icon.active {
  background: rgba(0, 168, 255, 0.12);
  border-color: rgba(0, 168, 255, 0.5);
  color: #00a8ff;
}

.btn-reset-icon.active:hover {
  background: #00a8ff;
  border-color: #00a8ff;
  color: #ffffff;
  transform: scale(1.15) rotate(180deg);
  box-shadow: 0 0 24px rgba(0, 168, 255, 0.7);
}

.btn-reset-icon.disabled {
  opacity: 0.25;
  cursor: not-allowed;
  background: transparent;
}

.btn-reset-icon.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* ============ TABLE HOVER EFFECT ============ */
.tables-management tbody tr {
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tables-management tbody tr:hover {
  background: rgba(0, 240, 255, 0.05) !important;
  box-shadow: 
    inset 3px 0 0 0 #00f0ff,
    0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ============ CỘT RESET WIDTH ============ */
.tables-management th:nth-child(6),
.tables-management td:nth-child(6) {
  width: 130px;
  text-align: center;
}

.tables-management th:nth-child(5),
.tables-management td:nth-child(5) {
  width: 80px;
  text-align: center;
}

/* ============ MOBILE ============ */
@media (max-width: 900px) {
  .session-switch {
    width: 100px;
    height: 40px;
  }
  
  .switch-thumb {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }
  
  .session-switch.on .switch-thumb {
    transform: translateX(60px);
  }
  
  .switch-text {
    font-size: 12px;
  }
}

@media (max-width: 640px) {
  .session-switch {
    width: 90px;
    height: 36px;
  }
  
  .switch-thumb {
    width: 28px;
    height: 28px;
    font-size: 14px;
  }
  
  .session-switch.on .switch-thumb {
    transform: translateX(54px);
  }
  
  .switch-text {
    font-size: 11px;
    letter-spacing: 1px;
  }
  
  .btn-qr-icon,
  .btn-reset-icon {
    width: 48px;
    height: 48px;
    font-size: 22px;
  }
}
/* ✅ Bản đồ vị trí quán */
#restaurantMap {
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  z-index: 1;
}

#restaurantMap .leaflet-control-attribution {
  background: rgba(0, 0, 0, 0.6) !important;
  color: #aaa !important;
  font-size: 10px;
}

#restaurantMap .leaflet-popup-content-wrapper {
  background: #1a1a2e;
  color: #fff;
  border-radius: 8px;
}

#restaurantMap .leaflet-popup-tip {
  background: #1a1a2e;
}

#mapInfo {
  transition: all 0.3s ease;
}
/* ============================================
   LIVE MAP VIEW — Bản đồ trực tiếp
   ============================================ */

.live-map-container {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  height: calc(100vh - 140px);
  min-height: 600px;
}

.live-map-main {
  position: relative;
  background: #1a1a2e;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

#liveMap {
  width: 100%;
  height: 100%;
  background: #1a1a2e;
  z-index: 1;
}

/* Overlay stats */
.live-map-overlay {
  position: absolute;
  top: 16px;
  left: 70px;   /* ✅ Đẩy sang phải để không che zoom buttons */
  z-index: 1000;
  display: flex;
  gap: 10px;
}

.live-map-stat {
  background: rgba(30, 30, 45, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.2s;
}

.live-map-stat:hover {
  background: rgba(40, 40, 60, 0.7);
  border-color: rgba(0, 255, 110, 0.3);
}

.live-map-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: #00ff6e;
  line-height: 1;
  text-shadow: 0 0 20px rgba(0, 255, 110, 0.6);
}

.live-map-stat-label {
  font-size: 10px;
  color: #9ca3af;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Radius slider */
.live-map-radius {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 1000;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(0, 255, 110, 0.25);
  border-radius: 12px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.live-map-radius label {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: #fff;
}

.live-map-radius input[type="range"] {
  flex: 1;
  accent-color: #00ff6e;
  cursor: pointer;
  height: 6px;
}

.live-map-radius span {
  font-size: 18px;
  font-weight: 800;
  color: #00ff6e;
  min-width: 70px;
  text-align: right;
  text-shadow: 0 0 12px rgba(0, 255, 110, 0.5);
}

/* Sidebar */
.live-map-sidebar {
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100%;
}

.live-sidebar-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(180deg, rgba(0, 255, 110, 0.08), transparent);
}

.live-sidebar-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.btn-refresh {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 12px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: all 0.2s;
}

.btn-refresh:hover {
  background: #00ff6e;
  color: #000;
  border-color: #00ff6e;
}

.live-sessions-list {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

/* Empty state */
.live-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-3);
}

.live-empty-icon {
  font-size: 72px;
  margin-bottom: 20px;
  opacity: 0.4;
  animation: pulse-empty 2s infinite;
}

@keyframes pulse-empty {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.05); }
}

.live-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
}

.live-empty-desc {
  font-size: 13px;
  color: var(--text-3);
  line-height: 1.6;
}

/* Session card */
.live-session-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.live-session-card:hover {
  border-color: #00ff6e;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 110, 0.15);
}

.live-session-card.in-range {
  border-left: 4px solid #00ff6e;
}

.live-session-card.out-range {
  border-left: 4px solid #ff9500;
}

.live-session-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.live-session-table {
  font-size: 17px;
  font-weight: 800;
  color: #00ff6e;
}

.live-session-time {
  font-size: 11px;
  color: var(--text-3);
  background: var(--surface);
  padding: 3px 10px;
  border-radius: 6px;
  font-weight: 600;
}

.live-session-info {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 12px;
  line-height: 1.8;
}

.live-session-info b {
  color: var(--text);
  font-weight: 700;
}

/* Item stats */
.live-item-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.live-item-stat {
  text-align: center;
  padding: 8px 4px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 700;
  transition: transform 0.2s;
}

.live-item-stat:hover {
  transform: scale(1.05);
}

.live-item-stat.pending {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
}

.live-item-stat.preparing {
  background: rgba(255, 107, 53, 0.15);
  color: #ff6b35;
}

.live-item-stat.ready {
  background: rgba(0, 255, 110, 0.15);
  color: #00ff6e;
}

.live-item-stat.served {
  background: rgba(100, 100, 100, 0.15);
  color: #888;
}

/* ✅ Trạng thái active — Highlight mạnh */
.live-item-stat.active {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 2px solid currentColor;
  font-weight: 900;
}

.live-item-stat.active.pending {
  background: rgba(255, 193, 7, 0.3);
  color: #ffc107;
  animation: pulse-pending 2s infinite;
}

.live-item-stat.active.preparing {
  background: rgba(255, 107, 53, 0.3);
  color: #ff6b35;
  animation: pulse-preparing 2s infinite;
}

.live-item-stat.active.ready {
  background: rgba(0, 255, 110, 0.3);
  color: #00ff6e;
  animation: pulse-ready 2s infinite;
}

.live-item-stat.active.served {
  background: rgba(136, 136, 136, 0.3);
  color: #ccc;
}

/* ✅ Trạng thái inactive — Mờ xám */
.live-item-stat.inactive {
  opacity: 0.35;
  filter: grayscale(100%);
  background: rgba(100, 100, 100, 0.1);
  color: #666;
}

/* ✅ Animations */
@keyframes pulse-pending {
  0%, 100% { box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3); }
  50% { box-shadow: 0 4px 20px rgba(255, 193, 7, 0.6); }
}

@keyframes pulse-preparing {
  0%, 100% { box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3); }
  50% { box-shadow: 0 4px 20px rgba(255, 107, 53, 0.6); }
}

@keyframes pulse-ready {
  0%, 100% { box-shadow: 0 4px 12px rgba(0, 255, 110, 0.3); }
  50% { box-shadow: 0 4px 20px rgba(0, 255, 110, 0.6); }
}



.live-item-stat-value {
  display: block;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
}

.live-item-stat-label {
  display: block;
  font-size: 9px;
  text-transform: uppercase;
  margin-top: 4px;
  opacity: 0.85;
  letter-spacing: 0.3px;
}

/* Orders list */
.live-orders-list {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.live-order-header {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 6px;
  font-weight: 600;
}

.live-order-item {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 4px 0;
  color: var(--text-2);
  align-items: center;
}

.live-order-item-status {
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 9px;
  white-space: nowrap;
}

/* Leaflet popup dark theme */
.leaflet-popup-content-wrapper {
  background: #1a1a2e !important;
  color: #fff !important;
  border-radius: 10px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6) !important;
}

.leaflet-popup-tip {
  background: #1a1a2e !important;
}

.leaflet-popup-content {
  margin: 12px 16px !important;
  color: #fff !important;
}

/* Responsive */
@media (max-width: 1024px) {
  .live-map-container {
    grid-template-columns: 1fr;
    grid-template-rows: 400px 1fr;
    height: auto;
  }
  
  .live-map-main {
    height: 400px;
  }
  
  .live-map-sidebar {
    max-height: 500px;
  }
  
  .live-map-overlay {
    flex-direction: column;
    top: 12px;
    left: 12px;
  }
  
  .live-map-stat {
    min-width: 80px;
    padding: 10px 12px;
  }
  
  .live-map-stat-value {
    font-size: 20px;
  }
}
#mapInfo b {
  color: #00ff6e;
}

/* Animation cho marker khách */
@keyframes pulse-live {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 59, 48, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(255, 59, 48, 0);
    transform: scale(1.05);
  }
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.live-session-card.no-gps {
  border-left: 4px solid #a855f7;
}

.live-session-card.no-gps:hover {
  border-color: #a855f7;
  box-shadow: 0 8px 24px rgba(168, 85, 247, 0.2);
}

/* ============ ORDER STATUS (trạng thái bàn) ============ */
.live-order-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 10px;
  margin-top: 12px;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.live-order-status::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: currentColor;
  opacity: 0.8;
}

.live-order-status-icon {
  font-size: 22px;
  line-height: 1;
  animation: status-pulse 2s infinite;
}

.live-order-status-label {
  font-size: 14px;
  font-weight: 700;
  flex: 1;
}

.live-order-status-code {
  font-size: 10px;
  opacity: 0.6;
  font-weight: 600;
  padding: 2px 8px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  letter-spacing: 0.5px;
}

@keyframes status-pulse {
  0%, 100% { 
    transform: scale(1); 
    filter: brightness(1);
  }
  50% { 
    transform: scale(1.15); 
    filter: brightness(1.3);
  }
}

/* Card border theo trạng thái */
.live-session-card.status-pending { border-left-color: #ffc107; }
.live-session-card.status-confirmed { border-left-color: #00b4ff; }
.live-session-card.status-preparing { border-left-color: #ff6b35; }
.live-session-card.status-ready { border-left-color: #00ff6e; }
.live-session-card.status-served { border-left-color: #888; }

/* ✅ Overlay stats — NỀN XÁM MỜ ĐẸP HƠN */
.live-map-stat {
  background: rgba(30, 30, 45, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.2s;
}

.live-map-stat:hover {
  background: rgba(40, 40, 60, 0.7);
  border-color: rgba(0, 255, 110, 0.3);
}

/* ============ NÚT ĐÃ THANH TOÁN ============ */
.live-paid-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 10px;
  margin-top: 10px;
  background: rgba(100, 100, 100, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}

.live-paid-toggle:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(0, 255, 110, 0.3);
}

.live-paid-toggle.paid {
  background: rgba(0, 255, 110, 0.12);
  border-color: rgba(0, 255, 110, 0.4);
  box-shadow: 0 0 0 1px rgba(0, 255, 110, 0.2);
}

.live-paid-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  transition: color 0.2s;
}

.live-paid-toggle.paid .live-paid-toggle-label {
  color: #00ff6e;
}

.live-paid-icon {
  font-size: 18px;
  line-height: 1;
  transition: transform 0.3s;
}

.live-paid-toggle.paid .live-paid-icon {
  transform: scale(1.15);
  filter: drop-shadow(0 0 8px rgba(0, 255, 110, 0.6));
}

.live-paid-text {
  letter-spacing: 0.2px;
}

/* Toggle switch */
.live-paid-switch {
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(100, 100, 100, 0.4);
  border-radius: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.live-paid-switch.on {
  background: #00ff6e;
  border-color: #00ff6e;
  box-shadow: 0 0 12px rgba(0, 255, 110, 0.5);
}

.live-paid-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: white;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.live-paid-switch.on .live-paid-switch-thumb {
  left: 22px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* Animation khi toggle */
@keyframes paid-pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}
/* ✅ Toggle Disabled - Chưa thể thanh toán */
.live-paid-toggle.disabled {
  background: rgba(100, 100, 100, 0.08);
  border-color: rgba(255, 255, 255, 0.05);
  cursor: not-allowed;
  opacity: 0.7;
}

.live-paid-toggle.disabled:hover {
  background: rgba(100, 100, 100, 0.08);
  border-color: rgba(255, 255, 255, 0.05);
}

.live-paid-toggle.disabled .live-paid-icon {
  filter: grayscale(100%);
}

/* ✅ Toggle Paid - Đã thanh toán */
.live-paid-toggle.paid {
  cursor: default;
}

.live-paid-toggle.paid:hover {
  background: rgba(0, 255, 110, 0.15);
  border-color: rgba(0, 255, 110, 0.5);
}
.live-paid-toggle.paid {
  animation: paid-pulse 0.4s ease;
}

/* ============ ORDER HISTORY FILTERS ============ */
.order-filters input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.order-filters select,
.order-filters input {
  transition: all 0.2s;
}

.order-filters select:focus,
.order-filters input:focus {
  outline: none;
  border-color: #00ff6e !important;
  box-shadow: 0 0 0 3px rgba(0, 255, 110, 0.1);
}

/* Responsive table */
@media (max-width: 768px) {
  .order-filters {
    grid-template-columns: 1fr !important;
  }
}

/* ============ DASHBOARD ANALYTICS ============ */
.dashboard-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

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

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 8px;
}

.card-header-flex h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.card-subtitle {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
}

.chart-container {
  position: relative;
  width: 100%;
  padding: 8px;
}

/* Stat change indicator */
.stat-change {
  font-size: 11px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Stat card improvements */
.stat-card {
  padding: 18px;
  background: var(--surface-2);
  border-radius: 12px;
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.stat-card:hover {
  border-color: rgba(0, 255, 110, 0.3);
  transform: translateY(-2px);
}

.stat-card .label {
  font-size: 11px;
  color: var(--text-3);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

/* Heatmap */
#heatmapContainer {
  overflow-x: auto;
}

/* Chart canvas dark theme */
.chart-container canvas {
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}


/* ============================================
   MODIFIER, COMBO, VOUCHER, TAX (C, D, E, F)
   ============================================ */

/* Modifier option chips */
.modifier-option-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  transition: all 0.2s;
}

.modifier-option-chip:hover {
  border-color: #00ff6e;
}

.modifier-option-chip .price {
  color: #00ff6e;
  font-weight: 700;
}

.modifier-option-chip .btn-remove {
  background: none;
  border: none;
  color: #ff3b30;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;
}

.modifier-option-chip .btn-remove:hover {
  background: rgba(255, 59, 48, 0.2);
}

/* Modifier group card */
.modifier-group-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  transition: all 0.2s;
}

.modifier-group-card:hover {
  border-color: rgba(0, 255, 110, 0.3);
}

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

/* Badge for single/multiple */
.badge-type {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-type.single {
  background: rgba(0, 180, 255, 0.15);
  color: #00b4ff;
}

.badge-type.multiple {
  background: rgba(255, 193, 7, 0.15);
  color: #ffc107;
}

.badge-required {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 59, 48, 0.15);
  color: #ff3b30;
  font-weight: 700;
  margin-left: 4px;
}

/* Combo card */
.combo-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.combo-card:hover {
  border-color: rgba(0, 255, 110, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 110, 0.1);
}

.combo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00ff6e, #00b4ff);
}

.combo-price {
  font-size: 20px;
  font-weight: 800;
  color: #00ff6e;
}

.combo-original-price {
  text-decoration: line-through;
  color: var(--text-3);
  font-size: 13px;
  margin-left: 8px;
}

/* Voucher card */
.voucher-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  position: relative;
  overflow: hidden;
  transition: all 0.2s;
}

.voucher-card::after {
  content: '';
  position: absolute;
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
}

.voucher-card.active {
  background: rgba(0, 255, 110, 0.05);
  border-color: #00ff6e;
}

.voucher-code {
  font-family: 'Courier New', monospace;
  font-size: 16px;
  font-weight: 800;
  color: #00ff6e;
  letter-spacing: 2px;
}

.voucher-value {
  font-size: 24px;
  font-weight: 800;
  color: #00ff6e;
}

.voucher-expired {
  position: absolute;
  top: 8px;
  right: 46px;
  background: #ff3b30;
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Tax config card */
.tax-config-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}

.tax-input-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tax-input-group label {
  font-size: 12px;
  color: var(--text-2);
  font-weight: 600;
}

.tax-input-group input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  transition: all 0.2s;
}

.tax-input-group input:focus {
  outline: none;
  border-color: #00ff6e;
  box-shadow: 0 0 0 3px rgba(0, 255, 110, 0.1);
}

.tax-hint {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 4px;
}

.tax-example {
  background: rgba(0, 255, 110, 0.05);
  border-left: 3px solid #00ff6e;
  border-radius: 8px;
  padding: 12px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 16px 0;
}

.tax-example b {
  color: #00ff6e;
}

/* Toggle switch for checkbox */
.toggle-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}

.toggle-checkbox input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

/* Modal specific tweaks */
.modal-content input[type="date"] {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  width: 100%;
  font-size: 14px;
}

.modal-content input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

.modal-content textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  resize: vertical;
}

.modal-content select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* Grid cho modifier/combo/voucher cards */
.modifiers-grid,
.combos-grid,
.vouchers-grid {
  display: grid;
  gap: 12px;
}

.modifiers-grid {
  grid-template-columns: 1fr;
}

.combos-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.vouchers-grid {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* Empty state chung */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-3);
}

.empty-state-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 8px;
}

.empty-state-desc {
  font-size: 13px;
  margin-bottom: 16px;
}

/* Button trong empty state */
.btn-create {
  padding: 10px 20px;
  background: linear-gradient(135deg, #00ff6e, #00b4ff);
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-create:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 255, 110, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .combos-grid,
  .vouchers-grid {
    grid-template-columns: 1fr;
  }
}
