/* ==========================================================================
   DEVIL'S CAFE - ADMIN & ORDER MANAGEMENT STYLESHEET
   Sleek Dark Glassmorphism, Gold Accents, Touch-Friendly Controls & Print Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. AUTHENTICATION & LOGIN PAGE
   -------------------------------------------------------------------------- */
.login-page-body {
  min-height: 100vh;
  background: radial-gradient(circle at 50% 20%, #20130d 0%, #0d0705 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 30px 16px;
  position: relative;
  overflow-x: hidden;
}

.login-page-body::before {
  content: '';
  position: absolute;
  top: -10%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: rgba(26, 15, 10, 0.88);
  border: 1.5px solid var(--border-gold, rgba(212, 175, 55, 0.3));
  border-radius: 20px;
  padding: 40px 32px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.7), 0 0 30px rgba(212, 175, 55, 0.12);
  backdrop-filter: blur(16px);
}

.login-crest {
  text-align: center;
  margin-bottom: 24px;
}

.login-crest img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--gold-primary, #d4af37);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
  margin-bottom: 12px;
}

.login-title {
  font-family: 'Cinzel', serif;
  font-size: 1.8rem;
  color: #ffffff;
  margin: 0 0 4px 0;
  text-align: center;
}

.login-subtitle {
  font-family: 'Caveat', cursive;
  font-size: 1.25rem;
  color: var(--gold-light, #f5c26b);
  text-align: center;
  margin: 0 0 24px 0;
}

.login-badge {
  display: inline-block;
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-primary, #d4af37);
  color: var(--gold-light, #f5c26b);
  padding: 4px 14px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.form-group-login {
  margin-bottom: 20px;
  text-align: left;
}

.form-group-login label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #e6dacd;
  margin-bottom: 8px;
}

.input-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-password-wrapper input {
  padding-right: 48px;
}

.btn-toggle-password {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--gold-light, #f5c26b);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: opacity 0.2s ease;
}

.btn-toggle-password:hover {
  opacity: 0.8;
}

.btn-login-submit {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
  color: #120905;
  border: none;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.25s ease;
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
  margin-top: 10px;
}

.btn-login-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(212, 175, 55, 0.5);
}

.btn-login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.login-alert {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 20px;
  display: none;
  line-height: 1.4;
}

.login-alert.error {
  background: rgba(198, 40, 40, 0.2);
  border: 1px solid #c62828;
  color: #ff8a80;
}

.login-alert.success {
  background: rgba(46, 125, 50, 0.2);
  border: 1px solid #2e7d32;
  color: #81c784;
}

.login-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #bdaea0;
  text-decoration: none;
  font-size: 0.9rem;
  margin-top: 24px;
  transition: color 0.2s ease;
}

.login-back-link:hover {
  color: var(--gold-light, #f5c26b);
}

/* --------------------------------------------------------------------------
   2. ADMIN DASHBOARD LAYOUT & NAVBAR
   -------------------------------------------------------------------------- */
.admin-layout {
  min-height: 100vh;
  background: #0f0805;
  color: #ffffff;
  display: flex;
  flex-direction: column;
}

.admin-header {
  background: rgba(22, 13, 8, 0.95);
  border-bottom: 1.5px solid rgba(212, 175, 55, 0.25);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
}

.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  max-width: 1400px;
  margin: 0 auto;
  gap: 16px;
  flex-wrap: nowrap;
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #ffffff;
  flex-shrink: 0;
}

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

.admin-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--gold-primary, #d4af37);
}

.admin-brand-info h1 {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  margin: 0;
  line-height: 1.1;
  color: #fff;
}

.admin-brand-info span {
  font-size: 0.78rem;
  color: var(--gold-light, #f5c26b);
  letter-spacing: 0.5px;
}

.admin-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.85rem;
}

.admin-nav-bar {
  background: #180d08;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-nav-tabs {
  display: flex;
  gap: 4px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
  overflow-x: auto;
  scrollbar-width: none;
}

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

.admin-tab-btn {
  background: transparent;
  border: none;
  color: #bdaea0;
  font-family: 'Outfit', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.admin-tab-btn:hover {
  color: #ffffff;
}

.admin-tab-btn.active {
  color: var(--gold-light, #f5c26b);
  border-bottom-color: var(--gold-primary, #d4af37);
  background: rgba(212, 175, 55, 0.06);
}

.admin-tab-badge {
  background: var(--devil-red, #c62828);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
}

/* Header Logout Button */
.btn-header-logout {
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  border-radius: 8px;
  background: linear-gradient(135deg, #c0392b, #8b0000);
  border: 1px solid rgba(255, 100, 100, 0.4);
  color: #fff;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 4px 12px rgba(192, 57, 43, 0.3);
  min-height: 38px;
}

.btn-header-logout:hover {
  background: linear-gradient(135deg, #d32f2f, #9b0000);
  border-color: #ff8a80;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(211, 47, 47, 0.5);
  color: #fff;
}

/* Tab Bar Logout Button */
.logout-tab-btn {
  margin-left: auto;
  color: #ff8a80;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-weight: 700;
  transition: all 0.2s ease;
}

.logout-tab-btn:hover {
  color: #ff5252;
  background: rgba(255, 82, 82, 0.1);
}

/* User pill inline logout link */
.admin-user-pill a {
  color: #ff8a80;
  font-size: 0.78rem;
  margin-left: 8px;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s;
}

.admin-user-pill a:hover {
  color: #ff5252;
}

/* Dashboard Session Status Footer Strip */
.admin-session-footer-bar {
  margin-top: 36px;
  padding: 18px 24px;
  background: rgba(24, 13, 8, 0.9);
  border: 1.5px solid var(--border-gold, rgba(212, 175, 55, 0.25));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.admin-session-footer-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.session-badge-icon {
  font-size: 1.5rem;
}

.session-title {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.98rem;
}

.session-subtitle {
  color: var(--text-muted, #a89f91);
  font-size: 0.82rem;
  margin-top: 2px;
}

.btn-footer-logout {
  padding: 9px 20px;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

/* Container */
.admin-main-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 28px 20px 80px;
  width: 100%;
  flex: 1;
}

/* --------------------------------------------------------------------------
   3. STATS METRIC CARDS GRID
   -------------------------------------------------------------------------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.metric-card {
  background: rgba(26, 16, 11, 0.8);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: rgba(212, 175, 55, 0.45);
}

.metric-card.gold-highlight {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(26, 16, 11, 0.9) 100%);
  border: 1.5px solid var(--gold-primary, #d4af37);
}

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

.metric-title {
  font-size: 0.85rem;
  color: #bdaea0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.metric-icon {
  font-size: 1.3rem;
}

.metric-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--gold-light, #f5c26b);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   4. ORDERS MANAGEMENT STATION (Filters, Table, Cards)
   -------------------------------------------------------------------------- */
.orders-toolbar {
  background: rgba(24, 14, 9, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
}

.orders-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  flex: 1;
}

.admin-search-input {
  background: #150b07;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.9rem;
  min-width: 240px;
  flex: 1;
  outline: none;
}

.admin-search-input:focus {
  border-color: var(--gold-primary, #d4af37);
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.admin-select {
  background: #150b07;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  outline: none;
}

.admin-select option {
  background: #1e120c;
  color: #fff;
}

.orders-actions-group {
  display: flex;
  gap: 10px;
  align-items: center;
}

.btn-excel-export {
  background: #1b5e20;
  color: #ffffff;
  border: 1px solid #2e7d32;
  border-radius: 10px;
  padding: 10px 16px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-excel-export:hover {
  background: #2e7d32;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

/* Orders Table */
.orders-table-wrapper {
  background: rgba(24, 14, 9, 0.85);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.admin-table th {
  background: #1e120c;
  color: var(--gold-light, #f5c26b);
  padding: 14px 16px;
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1.5px solid rgba(212, 175, 55, 0.3);
}

.admin-table td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Status Badges */
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-status.new {
  background: rgba(33, 150, 243, 0.15);
  border: 1px solid #2196f3;
  color: #64b5f6;
}

.badge-status.confirmed {
  background: rgba(212, 175, 55, 0.15);
  border: 1px solid var(--gold-primary, #d4af37);
  color: var(--gold-light, #f5c26b);
}

.badge-status.preparing {
  background: rgba(255, 152, 0, 0.15);
  border: 1px solid #ff9800;
  color: #ffb74d;
}

.badge-status.ready {
  background: rgba(156, 39, 176, 0.15);
  border: 1px solid #ab47bc;
  color: #ce93d8;
}

.badge-status.completed {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid #4caf50;
  color: #81c784;
}

.badge-status.cancelled {
  background: rgba(244, 67, 54, 0.15);
  border: 1px solid #f44336;
  color: #e57373;
}

/* Payment Mode Badges */
.badge-pay {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
}

.badge-pay.upi {
  background: rgba(0, 150, 136, 0.15);
  border: 1px solid #009688;
  color: #4db6ac;
}

.badge-pay.cash {
  background: rgba(139, 195, 74, 0.15);
  border: 1px solid #8bc34a;
  color: #aed581;
}

.badge-pay.pending {
  background: rgba(255, 152, 0, 0.12);
  border: 1px solid rgba(255, 152, 0, 0.5);
  color: #ffb74d;
}

.badge-pay.paid {
  background: rgba(76, 175, 80, 0.15);
  border: 1px solid #4caf50;
  color: #81c784;
}

/* Table Number Badge */
.badge-table {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.4);
  color: var(--gold-light, #f5c26b);
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.85rem;
}

/* Action Button Dropdowns & Icons */
.order-btn-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.btn-icon-action {
  background: #1f130d;
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-icon-action:hover {
  background: var(--gold-primary, #d4af37);
  color: #120905;
  border-color: var(--gold-primary, #d4af37);
}

.btn-icon-action.danger:hover {
  background: #c62828;
  color: #fff;
  border-color: #c62828;
}

/* Mobile Orders Card View */
.orders-cards-container {
  display: none;
  flex-direction: column;
  gap: 14px;
}

.order-mobile-card {
  background: rgba(24, 14, 9, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.order-mobile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.order-mobile-card-body {
  font-size: 0.88rem;
  color: #e6dacd;
  line-height: 1.5;
  margin-bottom: 14px;
}

.order-mobile-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   5. BOOK ORDER (POS / MENU ORDERING)
   -------------------------------------------------------------------------- */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
  align-items: flex-start;
}

.pos-menu-panel {
  background: rgba(24, 14, 9, 0.7);
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 16px;
  padding: 20px;
}

.pos-cart-panel {
  background: rgba(24, 14, 9, 0.95);
  border: 1.5px solid var(--border-gold, rgba(212, 175, 55, 0.3));
  border-radius: 16px;
  padding: 22px;
  position: sticky;
  top: 90px;
  max-height: calc(100vh - 105px);
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.pos-cart-panel::-webkit-scrollbar {
  width: 5px;
}

.pos-cart-panel::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.3);
  border-radius: 4px;
}

.pos-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 6px;
}

.pos-item-card {
  background: #1a0f0a;
  border: 1px solid rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.pos-item-card:hover {
  transform: translateY(-2px);
  border-color: var(--gold-primary, #d4af37);
}

.pos-item-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.pos-item-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pos-item-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pos-item-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold-light, #f5c26b);
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Custom Item Box */
.custom-item-box {
  background: rgba(212, 175, 55, 0.08);
  border: 1px dashed var(--gold-primary, #d4af37);
  border-radius: 12px;
  padding: 14px;
  margin-top: 16px;
}

.custom-item-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold-light, #f5c26b);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.custom-item-inputs {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
}

.custom-item-row2 {
  display: grid !important;
  grid-template-columns: 80px 1fr auto !important;
  gap: 8px !important;
  align-items: center !important;
}

.custom-input {
  background: #140a06;
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.85rem;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.custom-input:focus {
  outline: none;
  border-color: var(--gold-primary, #d4af37);
  box-shadow: 0 0 8px rgba(212, 175, 55, 0.25);
}

/* --------------------------------------------------------------------------
   6. ITEMS MASTER MODULE
   -------------------------------------------------------------------------- */
.items-master-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-add-dish {
  background: linear-gradient(135deg, var(--gold-primary, #d4af37) 0%, #b8860b 100%);
  color: #120905;
  border: none;
  border-radius: 10px;
  padding: 11px 20px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.25s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-add-dish:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.45);
}

.item-thumb-sm {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(212, 175, 55, 0.3);
}

/* --------------------------------------------------------------------------
   7. MODAL DIALOGS (Details, Edit, QR Payment, Bill)
   -------------------------------------------------------------------------- */
.admin-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}

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

.admin-modal-box {
  background: #180d08;
  border: 1.5px solid var(--border-gold, rgba(212, 175, 55, 0.3));
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  position: relative;
  display: flex;
  flex-direction: column;
}

.admin-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  background: #180d08;
  z-index: 2;
}

.admin-modal-header h3 {
  font-family: 'Cinzel', serif;
  font-size: 1.35rem;
  margin: 0;
  color: #fff;
}

.admin-modal-close {
  background: transparent;
  border: none;
  color: #bdaea0;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 6px;
  transition: color 0.2s ease;
}

.admin-modal-close:hover {
  color: #fff;
}

.admin-modal-body {
  padding: 24px;
  flex: 1;
}

.admin-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #140a06;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   8. DYNAMIC HERITAGE PAPER MENU CARD STYLES
   -------------------------------------------------------------------------- */
.heritage-rendered-board {
  background: #fbf7ee url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%23b89047' fill-opacity='0.04' fill-rule='evenodd'/%3E%3C/svg%3E");
  color: #2b1810;
  border: 12px solid #3c1e13;
  outline: 3px solid #d4af37;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), inset 0 0 50px rgba(184, 134, 11, 0.12);
  padding: 40px 30px;
  margin: 30px auto;
  max-width: 1060px;
  position: relative;
}

.heritage-rendered-header {
  text-align: center;
  border-bottom: 2px solid #8d6e63;
  padding-bottom: 20px;
  margin-bottom: 30px;
  position: relative;
}

.heritage-ornament-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #8d6e63;
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.heritage-cafe-title-te {
  font-family: 'Cinzel', serif;
  font-size: 2.4rem;
  color: #7f0000;
  margin: 0;
  font-weight: 900;
  letter-spacing: 1px;
}

.heritage-cafe-subtitle-te {
  font-family: 'Caveat', cursive;
  font-size: 1.6rem;
  color: #8d4f1c;
  margin: 4px 0 10px 0;
}

.heritage-cafe-address-tag {
  font-size: 0.95rem;
  color: #4a2e2b;
  font-weight: 600;
}

.heritage-sections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.heritage-cat-block {
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid #d7ccc8;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.heritage-cat-title {
  font-family: 'Cinzel', serif;
  font-size: 1.25rem;
  color: #7f0000;
  border-bottom: 1.5px solid #a1887f;
  padding-bottom: 8px;
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.heritage-dish-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px dashed #d7ccc8;
}

.heritage-dish-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: #2b1810;
  display: flex;
  align-items: center;
  gap: 6px;
}

.heritage-dish-price {
  font-weight: 800;
  font-size: 1.1rem;
  color: #8e24aa;
  white-space: nowrap;
  font-family: 'Outfit', sans-serif;
}

/* --------------------------------------------------------------------------
   9. THERMAL RECEIPT & PRINT BILL OPTIMIZATIONS
   -------------------------------------------------------------------------- */
.printable-bill-wrapper {
  background: #ffffff;
  color: #000000;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  padding: 24px 20px;
  font-family: 'Courier New', Courier, monospace;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.bill-header-center {
  text-align: center;
  margin-bottom: 14px;
  border-bottom: 1px dashed #000;
  padding-bottom: 12px;
}

.bill-logo-text {
  font-family: 'Cinzel', serif;
  font-size: 1.4rem;
  font-weight: 900;
  margin: 0;
  color: #000;
}

.bill-sub-text {
  font-size: 0.8rem;
  line-height: 1.3;
  margin-top: 4px;
}

.bill-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.bill-items-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.85rem;
}

.bill-items-table th {
  border-bottom: 1px solid #000;
  border-top: 1px solid #000;
  padding: 6px 2px;
  text-align: left;
}

.bill-items-table td {
  padding: 5px 2px;
  vertical-align: top;
}

.bill-total-strip {
  border-top: 1px dashed #000;
  border-bottom: 1.5px solid #000;
  padding: 8px 0;
  margin-top: 6px;
  font-size: 1.05rem;
  font-weight: 900;
  display: flex;
  justify-content: space-between;
}

.bill-footer-msg {
  text-align: center;
  font-size: 0.78rem;
  margin-top: 16px;
  line-height: 1.4;
}

/* Print Media Query */
@media print {
  body * {
    visibility: hidden;
  }
  
  .printable-bill-wrapper,
  .printable-bill-wrapper * {
    visibility: visible;
  }
  
  .printable-bill-wrapper {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    max-width: 100%;
    box-shadow: none;
    padding: 0;
    margin: 0;
  }
  
  .admin-header,
  .admin-nav-bar,
  .admin-modal-header,
  .admin-modal-footer,
  .btn,
  button,
  .no-print {
    display: none !important;
  }
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE MEDIA QUERIES (Desktop, Tablet, Mobile)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
  .pos-cart-panel {
    position: static;
  }
}

@media (max-width: 768px) {
  .admin-header-inner {
    padding: 10px 14px;
    gap: 8px;
  }
  .admin-brand img {
    width: 36px;
    height: 36px;
  }
  .admin-brand-info h1 {
    font-size: 1.05rem;
  }
  .admin-brand-info span {
    font-size: 0.68rem;
  }
  #adminCafeStatus {
    display: none;
  }
  .admin-main-container {
    padding: 16px 12px 60px;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .metric-card {
    padding: 14px;
  }
  .metric-value {
    font-size: 1.4rem;
  }
  
  /* Make tables horizontally scrollable without breaking page width */
  .orders-table-wrapper {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 16px;
    border-radius: 10px;
  }
  
  /* In Order Management tab, use mobile touch cards */
  #tabOrders .orders-table-wrapper {
    display: none;
  }
  #tabOrders .orders-cards-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .order-mobile-card {
    background: #180d08;
    border: 1px solid var(--border-gold, rgba(212, 175, 55, 0.3));
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  }

  .orders-toolbar {
    flex-direction: column;
    gap: 10px;
  }

  .orders-filter-group {
    flex-direction: column;
    width: 100%;
  }

  .admin-search-input,
  .admin-select {
    width: 100%;
    font-size: 0.92rem;
  }
  
  .custom-item-inputs {
    display: flex !important;
    flex-direction: column !important;
  }
  .custom-item-row2 {
    display: grid !important;
    grid-template-columns: 75px 1fr auto !important;
    gap: 8px !important;
  }
  
  .heritage-rendered-board {
    padding: 20px 10px;
    border-width: 4px;
  }
  .heritage-cafe-title-te {
    font-size: 1.6rem;
  }
  
  .login-card {
    padding: 28px 18px;
    margin: 16px;
    border-radius: 16px;
  }

  .admin-modal-box {
    margin: 10px;
    width: calc(100% - 20px);
    max-height: 92vh;
    border-radius: 16px;
  }

  .admin-modal-header,
  .admin-modal-body,
  .admin-modal-footer {
    padding: 14px 16px;
  }
}

@media (max-width: 480px) {
  .admin-nav-tabs {
    padding: 0 10px;
    gap: 2px;
  }

  .admin-tab-btn {
    padding: 10px 12px;
    font-size: 0.82rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .metrics-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .pos-cart-panel {
    padding: 14px 10px;
  }
}

