/* ============================================================================
   2. RESET & BASE STYLES
   ============================================================================ */

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--gray-900);
  background-color: white;
  overflow-x: hidden;
  transition:
    background-color var(--transition-base),
    color var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  /*
  body {
    background-color: var(--gray-10);
    color: var(--gray-800);
  }
  */
}

.nightMode body {
  background-color: var(--gray-100);
  color: var(--gray-800);
}

.dayMode body {
  background-color: #dcd9d2;
  color: var(--gray-900);
}

/* 🌀 QUANTUM SPINNER */
.quantum-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(176, 116, 39, 0.3);
  border-top-width: 2px;
  border-top-style: solid;
  border-top-color: rgba(176, 116, 39, 0.3);
  border-top: 2px solid #b08127;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 10px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(3600deg);
  }
}

header.header nav {
  border-bottom: 2px solid #63424b;
  transition: border-color var(--transition-base);
}
#nh-terms-banner {
  /* display: none; */
  padding: 0.75rem 1rem;
  text-align: center;
  font-size: 0.875rem;
  margin-top: 1rem;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--font-size-3xl);
}

h2 {
  font-size: var(--font-size-2xl);
}

h3 {
  font-size: var(--font-size-xl);
}

h4 {
  font-size: var(--font-size-lg);
}

p {
  margin-bottom: var(--space-4);
}

a {
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-dark);
}
.dayMode .btn,
.dayMode .btn-large,
.dayMode .btn-small {
  color: #fff;
}
.dayMode label {
  color: #333;
}
.nightMode label {
  color: #adadad;
}
/* ============================================================================
   3. LAYOUT CONTAINERS
   ============================================================================ */

.nh-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.nh-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.nh-main {
  flex: 1;
  padding: var(--space-8);
}

.nh-content {
  background: white;
  border-radius: var(--border-radius-base);
  box-shadow: var(--shadow-sm);
  transition: background-color var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .nh-content {
    background: var(--gray-100);
  }
}

.nightMode body .nh-content {
  background: var(--gray-100);
}

.dayMode body .nh-content {
  background: white;
}

/* Dynamic individual-lane fullscreen layouts */
.nh-content:fullscreen {
  background: #121212 !important;
  color: #ffffff !important;
  padding: 24px !important;
  overflow-y: auto !important;
  width: 100% !important;
  height: 100% !important;
}

.nh-content:fullscreen [data-orders-list] {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)) !important;
  gap: 1.5rem !important;
}

.nh-content:fullscreen h3 {
  color: #ffb300 !important;
  font-size: 2rem !important;
  margin-top: 0 !important;
}
/* High-Visibility KDS Focus Indicator */
.kds-focused,
.toggle-kds-lane:focus-visible/* ,
.kds-store-status-btn:focus-visible */ {
  outline: 4px solid #e65100 !important;
  border-color: #ffb300 !important; /* Bright Amber/Orange */
  box-shadow:
    0 0 0 4px rgba(255, 179, 0, 0.6),
    0 8px 24px rgba(0, 0, 0, 0.4) !important;
  transform: translateY(-2px) scale(1.01) !important;
  transition: all 0.15s ease-in-out !important;
}
.nh-order-card:focus-visible {
  outline: none !important;
}

/* Ensure focus overrides standard card borders in fullscreen */
body.kds-fullscreen-mode .nh-card.kds-focused {
  border-color: #ffb300 !important;
}

/* ============================================================================
   4. ROLE SWITCHER & NAVIGATION
   ============================================================================ */
body {
  padding-top: 66px;
}
@media only screen and (min-width: 992px) {
  .header nav ul li a,
  .header nav ul li a i,
  .facet_container nav ul li a,
  .facet_container nav ul li a i,
  body .tts_player_menu_container {
    height: 60px;
    line-height: 60px;
  }
}
/*
*/
body {
  padding-top: 59px;
}
header.header nav {
  /* height: 60px; */
}
header.header nav ul li a {
  margin-top: 6px;
  display: block;
}
header.header nav ul.left ul li a {
  margin-left: 0;
}
header.header nav ul.right ul li a {
  margin-right: 0;
}
.dayMode header.header nav button {
  box-shadow: none;
}
@media (min-width: 768px) {
  header.header nav ul li a {
    margin: 0;
  }
}
nav,
nav .nav-wrapper i,
nav a.sidenav-trigger,
nav a.sidenav-trigger i {
  height: 50px;
  line-height: 50px;
  margin: 0 auto;
}

@media only screen and (min-width: 992px) {
  .header nav ul li a,
  .header nav ul li a i,
  .facet_container nav ul li a,
  .facet_container nav ul li a i,
  body .tts_player_menu_container {
    height: 50px;
    line-height: 50px;
  }
}
.nh-role-header {
  background: white;
  border-bottom: 2px solid var(--border-color);
  padding: var(--space-6) 0;
  position: sticky;
  top: 0;
  height: 6rem;
  z-index: var(--z-sticky);
  box-shadow: var(--shadow-sm);
  transition:
    background-color var(--transition-base),
    border-color var(--transition-base);
}
.sidenav {
  top: 1px;
}
@media (prefers-color-scheme: dark) {
  .nh-role-header {
    background: var(--gray-100);
  }
}

header .checkout-button {
  display: none;
}
.nightMode body .nh-role-header {
  background: var(--gray-100);
}

.dayMode body .nh-role-header {
  background: white;
}

.nh-role-header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nh-role-badge {
  display: inline-block;
  padding: var(--space-2) var(--space-4);
  background: var(--primary-light);
  color: white;
  border-radius: var(--border-radius-base);
  font-size: var(--font-size-sm);
  font-weight: 600;
  text-transform: capitalize;
}

.nh-role-nav {
  display: flex;
  gap: var(--space-2);
  list-style: none;
}

.nh-role-nav-item {
  margin: 0;
  padding: 0;
}

.nh-role-nav-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-base);
  font-size: var(--font-size-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

@media (prefers-color-scheme: dark) {
  .nh-role-nav-link {
    background: var(--gray-200);
    color: var(--gray-700);
  }
}

.nightMode body .nh-role-nav-link {
  background: var(--gray-200);
  color: var(--gray-700);
}

.dayMode body .nh-role-nav-link {
  background: var(--gray-100);
  color: var(--gray-700);
}

.nh-role-nav-link:hover {
  background: var(--gray-200);
  border-color: var(--gray-300);
}

@media (prefers-color-scheme: dark) {
  .nh-role-nav-link:hover {
    background: var(--gray-300);
    border-color: var(--gray-400);
  }
}

.nightMode body .nh-role-nav-link:hover {
  background: var(--gray-300);
  border-color: var(--gray-400);
}

.nh-role-nav-link.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-dark);
}

.nh-role-nav-link.active:hover {
  background: var(--primary-dark);
}
header.header #user-dropdown {
  top: 60px !important;
  width: 100% !important;
}
#user-dropdown li a {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
@media (min-width: 768px) {
  header.header #user-dropdown {
    top: 60px !important;
    width: auto !important;
  }
}
/* ============================================================================
   5. CARD COMPONENTS
   ============================================================================ */

.card-content p.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
}
.nh-card {
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-base);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}
.nightMode .card {
  background-color: #1e1e1e6e !important;
  color: #e0e0e0 !important;
  border: 1px solid #333;
  border-top: 2px solid #63424b;
}
.dayMode .card {
  background-color: #fff !important;
  color: #302f2f !important;
  border: 1px solid #333;
  border-top: 2px solid #63424b;
}
@media (prefers-color-scheme: dark) {
  .nh-card {
    background: var(--gray-100);
  }
}

.nightMode body .nh-card {
  background: var(--gray-75);
}

.dayMode body .nh-card {
  background: white;
}

.nh-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.nh-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-direction: column;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
}

.nh-card-title {
  margin: 0;
  font-size: var(--font-size-lg);
  font-weight: 600;
  color: var(--gray-900);
}

@media (prefers-color-scheme: dark) {
  .nh-card-title {
    color: var(--gray-800);
  }
}

.nightMode body .nh-card-title {
  color: var(--gray-800);
}

.dayMode body .nh-card-title {
  color: var(--gray-900);
}

.nh-card-subtitle {
  margin: 0;
  font-size: var(--font-size-sm);
  color: var(--gray-500);
}

.nh-card-body {
  margin-bottom: var(--space-4);
}

.nh-card-footer {
  display: flex;
  gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
}

.nh-card-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
}

/* Merchant Cards */
.nh-merchant-card {
  cursor: pointer;
}

.nh-merchant-card-image {
  width: 100%;
  height: 150px;
  /* background: linear-gradient(135deg, #384459, #0b1e47); */
  background: none;
  border-radius: var(--border-radius-base) var(--border-radius-base) 0 0;
  margin: -6px -6px 1rem -6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: var(--font-size-2xl);
}

.nh-merchant-info {
  margin-top: var(--space-4);
}

.nh-merchant-name {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.nh-merchant-address {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  margin-bottom: var(--space-2);
}

.nh-merchant-phone {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
}

/* Product Cards */
.nh-product-card {
  display: flex;
  flex-direction: column;
}

.nh-product-image {
  width: 100%;
  height: 120px;
  background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
  border-radius: var(--border-radius-base);
  margin-bottom: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-500);
  font-size: var(--font-size-2xl);
  overflow: hidden;
  transition: background-color var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .nh-product-image {
    background: linear-gradient(135deg, var(--gray-300), var(--gray-400));
  }
}

.nightMode body .nh-product-image {
  background: linear-gradient(135deg, var(--gray-300), var(--gray-400));
}

.dayMode body .nh-product-image {
  background: linear-gradient(135deg, var(--gray-200), var(--gray-300));
}

.nh-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nh-product-name {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.nh-product-description {
  font-size: var(--font-size-sm);
  color: var(--gray-500);
  margin-bottom: var(--space-3);
  line-height: 1.4;
}

.nh-product-category {
  font-size: var(--font-size-xs);
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}

.nh-product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-color);
}

.nh-product-price {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--primary-color);
}

.nh-product-availability {
  font-size: var(--font-size-xs);
  color: var(--success-color);
  font-weight: 600;
}

.nh-product-availability.unavailable {
  color: var(--error-color);
}

/* Order Queue Cards */
.nh-order-card {
  border-left: 4px solid var(--primary-color);
}

.nh-order-number {
  font-family: var(--font-family-mono);
  /* font-size: var(--font-size-sm); */
  font-weight: 600;
  font-size: 25px;
  color: var(--gray-500);
  margin-bottom: var(--space-2);
}

.nh-order-amount {
  font-size: var(--font-size-lg);
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: var(--space-4);
}

@media (prefers-color-scheme: dark) {
  .nh-order-amount {
    color: var(--gray-800);
  }
}

.nightMode body .nh-order-amount {
  color: var(--gray-800);
}

.dayMode body .nh-order-amount {
  color: var(--gray-900);
}

.nh-order-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  font-size: var(--font-size-sm);
}

.nh-order-detail-item {
  display: flex;
  flex-direction: column;
}

.nh-order-detail-label {
  color: var(--gray-500);
  margin-bottom: var(--space-1);
  font-weight: 500;
}

.nh-order-detail-value {
  color: var(--gray-900);
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .nh-order-detail-value {
    color: var(--gray-800);
  }
}

.nightMode #new-order-alert-modal {
  --gray-800: #1f2937;
  --gray-900: #111827;
}

.nightMode body .nh-order-detail-value {
  color: var(--gray-800);
}

.dayMode body .nh-order-detail-value {
  color: var(--gray-900);
}

.nh-order-items {
  background: var(--gray-50);
  border-radius: var(--border-radius-base);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
  transition: background-color var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .nh-order-items {
    background: var(--gray-200);
  }
}

.nightMode body .nh-order-items {
  background: var(--gray-200);
}

.dayMode body .nh-order-items {
  background: var(--gray-50);
}
/* High-visibility focus state for cards and headers */
.nh-order-card.kds-focused {
  outline: 4px solid #e65100 !important; /* Industrial orange */
  box-shadow: 0 0 15px rgba(230, 81, 0, 0.6) !important;
  transform: scale(1.02);
  z-index: 5;
}

/* Header focus state (Store Status toggle or buttons) */
.kds-store-status-btn.kds-focused,
.kds-header-btn.kds-focused {
  outline: 3px solid #e65100 !important;
  box-shadow: 0 0 8px rgba(230, 81, 0, 0.5);
}
.nh-order-items-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  margin-bottom: var(--space-3);
  color: var(--gray-700);
}

@media (prefers-color-scheme: dark) {
  .nh-order-items-title {
    color: var(--gray-600);
  }
}

.nightMode body .nh-order-items-title {
  color: var(--gray-600);
}

.dayMode body .nh-order-items-title {
  color: var(--gray-700);
}

.nh-order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-2) 0;
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--border-color);
}

.nh-order-item-meta {
  padding: var(--space-2) 0;
  padding-left: 3px;
  font-size: var(--font-size-sm);
  border-bottom: 1px solid var(--border-color);
}

.nh-order-item:last-child {
  border-bottom: none;
}

.nh-order-item-name {
  flex: 1;
  color: var(--gray-900);
}
.nh-order-item-quantity {
  flex: 1;
  color: var(--gray-900);
}

@media (prefers-color-scheme: dark) {
  .nh-order-item-name {
    color: var(--gray-800);
  }
}

.nightMode body .nh-order-item-name {
  color: var(--gray-800);
}

.dayMode body .nh-order-item-name {
  color: var(--gray-900);
}

.nh-order-item-qty {
  color: var(--gray-500);
  margin: 0 var(--space-3);
}

.nh-order-item-price {
  color: var(--gray-900);
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .nh-order-item-price {
    color: var(--gray-800);
  }
}

.nightMode body .nh-order-item-price {
  color: var(--gray-800);
}

.dayMode body .nh-order-item-price {
  color: var(--gray-900);
}

/* ============================================================================
   6. STATUS BADGES & STATE MACHINE COLORS
   ============================================================================ */

.nh-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-xs);
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

/* PENDING_CONFIRMATION - Amber/Orange */
.badge-pending_confirmation {
  background-color: var(--status-pending-bg);
  /* color: var(--status-pending-text); */
  border: 1px solid #fcd34d;
}

/* CONFIRMED - Blue */
.badge-confirmed {
  background-color: var(--status-confirmed-bg);
  /* color: var(--status-confirmed-text); */
  border: 1px solid #93c5fd;
}

/* READY_FOR_PICKUP - Indigo */
.badge-ready_for_pickup {
  background-color: var(--status-ready-bg);
  /* color: var(--status-ready-text); */
  border: 1px solid #a5b4fc;
}

/* IN_TRANSIT - Purple */
.badge-in_transit {
  background-color: var(--status-transit-bg);
  /* color: var(--status-transit-text); */
  border: 1px solid #d8b4fe;
}

/* DELIVERED - Green */
.badge-delivered {
  background-color: var(--status-delivered-bg);
  color: var(--status-delivered-text);
  border: 1px solid #6ee7b7;
}

/* CANCELLED - Red */
.badge-cancelled {
  background-color: var(--status-cancelled-bg);
  color: var(--status-cancelled-text);
  border: 1px solid #f87171;
}

/* FAILED - Red (alias) */
.badge-failed {
  background-color: var(--status-cancelled-bg);
  color: var(--status-cancelled-text);
  border: 1px solid #f87171;
}

/* Status Pulse Animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

.badge-in_transit {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================================================
   7. GRID LAYOUTS
   ============================================================================ */

.nh-grid {
  display: grid;
  gap: var(--space-6);
}

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

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

.nh-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

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

/* ============================================================================
   8. BUTTONS & CONTROLS
   ============================================================================ */
.nightMode .btn,
.nightMode .btn-large,
.nightMode .btn-small {
  background-color: #495159;
  color: #cac9c9;
}
.nightMode .btn.white-text,
.nightMode .btn-large.white-text,
.nightMode .btn-small.white-text {
  color: #fff !important;
}
.dayMode .btn.white-text,
.dayMode .btn-large.white-text,
.dayMode .btn-small.white-text {
  color: #fff !important;
}
.dayMode .btn.green,
.dayMode .btn-large.green,
.dayMode .btn-small.green {
  background-color: #1ca733 !important;
}
.dayMode .btn,
.dayMode .btn-large,
.dayMode .btn-small {
  background-color: #dcdcdc;
  color: #333;
}
.dayMode .btn-small i,
.dayMode .btn-large i,
.dayMode .btn i {
  color: inherit !important;
}
.nh-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--border-radius-base);
  font-size: var(--font-size-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-decoration: none;
}

.nh-btn:hover {
  background: var(--primary-dark);
  color: white;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

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

.nh-btn:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
}

@media (prefers-color-scheme: dark) {
  .nh-btn:disabled {
    background: var(--gray-400);
  }
}

.nightMode body .nh-btn:disabled {
  background: var(--gray-400);
}

.dayMode body .nh-btn:disabled {
  background: var(--gray-300);
}

.nh-btn-secondary {
  background: var(--gray-100);
  color: var(--gray-900);
  border: 1px solid var(--border-color);
}

@media (prefers-color-scheme: dark) {
  .nh-btn-secondary {
    background: var(--gray-200);
    color: var(--gray-800);
  }
}

.nightMode body .nh-btn-secondary {
  background: var(--gray-200);
  color: var(--gray-800);
}

.dayMode body .nh-btn-secondary {
  background: var(--gray-100);
  color: var(--gray-900);
}

.nh-btn-secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-400);
}

@media (prefers-color-scheme: dark) {
  .nh-btn-secondary:hover {
    background: var(--gray-300);
    border-color: var(--gray-500);
  }
}

.nightMode body .nh-btn-secondary:hover {
  background: var(--gray-300);
  border-color: var(--gray-500);
}

.dayMode body .nh-btn-secondary:hover {
  background: var(--gray-200);
  border-color: var(--gray-400);
}

.nh-btn-danger {
  background: var(--error-color);
}

.nh-btn-danger:hover {
  background: #dc2626;
}

.nh-btn-success {
  background: var(--success-color);
}

.nh-btn-success:hover {
  background: #059669;
}

.nh-btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-xs);
}

.nh-btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-base);
}

.nh-btn-block {
  display: flex;
  width: 100%;
  justify-content: center;
}

/* ============================================================================
   9. FORMS & INPUTS
   ============================================================================ */

.nh-form-group {
  margin-bottom: var(--space-6);
}

.nh-form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 600;
  color: var(--gray-700);
  font-size: var(--font-size-sm);
}

@media (prefers-color-scheme: dark) {
  .nh-form-label {
    color: var(--gray-600);
  }
}

.nightMode body .nh-form-label {
  color: var(--gray-600);
}

.nightMode input[type="text"]::placeholder,
.nightMode input[type="search"]::placeholder,
.nightMode textarea[type="text"]::placeholder,
.nightMode textarea[type="search"]::placeholder {
  color: #84848f;
}

.dayMode body .nh-form-label {
  color: var(--gray-700);
}

.nh-form-input,
.nh-form-select,
.nh-form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-base);
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  color: var(--gray-900);
  background: white;
  transition: all var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .nh-form-input,
  .nh-form-select,
  .nh-form-textarea {
    background: var(--gray-200);
    color: var(--gray-800);
  }
}

.nightMode body .nh-form-input,
.nightMode body .nh-form-select,
.nightMode body .nh-form-textarea {
  background: var(--gray-200);
  color: var(--gray-800);
}

.dayMode body .nh-form-input,
.dayMode body .nh-form-select,
.dayMode body .nh-form-textarea {
  background: white;
  color: var(--gray-900);
}

.nh-form-input:focus,
.nh-form-select:focus,
.nh-form-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.nh-form-input:disabled,
.nh-form-select:disabled,
.nh-form-textarea:disabled {
  background: var(--gray-100);
  color: var(--gray-500);
  cursor: not-allowed;
}

@media (prefers-color-scheme: dark) {
  .nh-form-input:disabled,
  .nh-form-select:disabled,
  .nh-form-textarea:disabled {
    background: var(--gray-300);
    color: var(--gray-600);
  }
}

.nightMode body .nh-form-input:disabled,
.nightMode body .nh-form-select:disabled,
.nightMode body .nh-form-textarea:disabled {
  background: var(--gray-300);
  color: var(--gray-600);
}

.dayMode body .nh-form-input:disabled,
.dayMode body .nh-form-select:disabled,
.dayMode body .nh-form-textarea:disabled {
  background: var(--gray-100);
  color: var(--gray-500);
}

.nh-form-textarea {
  resize: vertical;
  min-height: 100px;
}

.nh-form-help {
  display: block;
  margin-top: var(--space-2);
  font-size: var(--font-size-xs);
  color: var(--gray-500);
}

/* ============================================================================
   10. ALERTS & NOTIFICATIONS
   ============================================================================ */

.nh-alert {
  padding: var(--space-4) var(--space-6);
  border: 1px solid;
  border-radius: var(--border-radius-base);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  transition: all var(--transition-base);
}

.nh-alert-icon {
  flex-shrink: 0;
  font-size: var(--font-size-lg);
}

.nh-alert-content {
  flex: 1;
}

.nh-alert-title {
  font-weight: 600;
  margin-bottom: var(--space-1);
}

.nh-alert-message {
  font-size: var(--font-size-sm);
  margin: 0;
}

.nh-alert-success {
  background: #ecfdf5;
  border-color: #d1fae5;
  color: var(--success-color);
}

@media (prefers-color-scheme: dark) {
  .nh-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
  }
}

.nightMode body .nh-alert-success {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
}

.dayMode body .nh-alert-success {
  background: #ecfdf5;
  border-color: #d1fae5;
}

.nh-alert-success .nh-alert-title {
  color: #047857;
}

@media (prefers-color-scheme: dark) {
  .nh-alert-success .nh-alert-title {
    color: #6ee7b7;
  }
}

.nightMode body .nh-alert-success .nh-alert-title {
  color: #6ee7b7;
}

.dayMode body .nh-alert-success .nh-alert-title {
  color: #047857;
}

.nh-alert-success .nh-alert-message {
  color: #065f46;
}

@media (prefers-color-scheme: dark) {
  .nh-alert-success .nh-alert-message {
    color: #a7f3d0;
  }
}

.nightMode body .nh-alert-success .nh-alert-message {
  color: #a7f3d0;
}

.dayMode body .nh-alert-success .nh-alert-message {
  color: #065f46;
}

.nh-alert-error {
  background: #fef2f2;
  border-color: #fee2e2;
  color: var(--error-color);
}

@media (prefers-color-scheme: dark) {
  .nh-alert-error {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
  }
}

.nightMode body .nh-alert-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
}

.dayMode body .nh-alert-error {
  background: #fef2f2;
  border-color: #fee2e2;
}

.nh-alert-error .nh-alert-title {
  color: #991b1b;
}

@media (prefers-color-scheme: dark) {
  .nh-alert-error .nh-alert-title {
    color: #fca5a5;
  }
}

.nightMode body .nh-alert-error .nh-alert-title {
  color: #fca5a5;
}

.dayMode body .nh-alert-error .nh-alert-title {
  color: #991b1b;
}

.nh-alert-error .nh-alert-message {
  color: #7f1d1d;
}

@media (prefers-color-scheme: dark) {
  .nh-alert-error .nh-alert-message {
    color: #fecaca;
  }
}

.nightMode body .nh-alert-error .nh-alert-message {
  color: #fecaca;
}

.dayMode body .nh-alert-error .nh-alert-message {
  color: #7f1d1d;
}

.nh-alert-warning {
  background: #fffbeb;
  border-color: #fef3c7;
  color: var(--warning-color);
}

@media (prefers-color-scheme: dark) {
  .nh-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
  }
}

.nightMode body .nh-alert-warning {
  background: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.3);
}

.dayMode body .nh-alert-warning {
  background: #fffbeb;
  border-color: #fef3c7;
}

.nh-alert-warning .nh-alert-title {
  color: #92400e;
}

@media (prefers-color-scheme: dark) {
  .nh-alert-warning .nh-alert-title {
    color: #fcd34d;
  }
}

.nightMode body .nh-alert-warning .nh-alert-title {
  color: #fcd34d;
}

.dayMode body .nh-alert-warning .nh-alert-title {
  color: #92400e;
}

.nh-alert-warning .nh-alert-message {
  color: #78350f;
}

@media (prefers-color-scheme: dark) {
  .nh-alert-warning .nh-alert-message {
    color: #fde68a;
  }
}

.nightMode body .nh-alert-warning .nh-alert-message {
  color: #fde68a;
}

.dayMode body .nh-alert-warning .nh-alert-message {
  color: #78350f;
}

.nh-alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--info-color);
}

@media (prefers-color-scheme: dark) {
  .nh-alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.3);
  }
}

.nightMode body .nh-alert-info {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
}

.dayMode body .nh-alert-info {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.nh-alert-info .nh-alert-title {
  color: #1e40af;
}

@media (prefers-color-scheme: dark) {
  .nh-alert-info .nh-alert-title {
    color: #93c5fd;
  }
}

.nightMode body .nh-alert-info .nh-alert-title {
  color: #93c5fd;
}

.dayMode body .nh-alert-info .nh-alert-title {
  color: #1e40af;
}

.nh-alert-info .nh-alert-message {
  color: #1e3a8a;
}

@media (prefers-color-scheme: dark) {
  .nh-alert-info .nh-alert-message {
    color: #bfdbfe;
  }
}

.nightMode body .nh-alert-info .nh-alert-message {
  color: #bfdbfe;
}

.dayMode body .nh-alert-info .nh-alert-message {
  color: #1e3a8a;
}

/* ============================================================================
   11. TABLES
   ============================================================================ */

.nh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-sm);
}

.nh-table th {
  background: var(--gray-50);
  border-bottom: 2px solid var(--border-color);
  padding: var(--space-4) var(--space-6);
  text-align: left;
  font-weight: 600;
  color: var(--gray-700);
  transition: background-color var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .nh-table th {
    background: var(--gray-200);
    color: var(--gray-600);
  }
}

.nightMode body .nh-table th {
  background: var(--gray-200);
  color: var(--gray-600);
}

.dayMode body .nh-table th {
  background: var(--gray-50);
  color: var(--gray-700);
}

.nh-table td {
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-color);
  color: var(--gray-900);
  transition: background-color var(--transition-base);
}

@media (prefers-color-scheme: dark) {
  .nh-table td {
    color: var(--gray-800);
  }
}

.nightMode body .nh-table td {
  color: var(--gray-800);
}

.dayMode body .nh-table td {
  color: var(--gray-900);
}

.nh-table tbody tr:hover {
  background: var(--gray-50);
}

@media (prefers-color-scheme: dark) {
  .nh-table tbody tr:hover {
    background: var(--gray-200);
  }
}

.nightMode body .nh-table tbody tr:hover {
  background: #1f2834;
}
.nightMode body .nh-table tbody tr a:hover {
  color: #fff;
}

.dayMode body .nh-table tbody tr:hover {
  background: var(--gray-200);
}

.nh-table tbody tr:last-child td {
  border-bottom: none;
}
/* 1. Sets the scrolling frame and max-height boundary */
.nh-orders-scroll-container {
  position: relative;
  max-height: 40vh;
  overflow-y: auto;  /* Vertical scrollbar if table has many orders */
  overflow-x: auto;  /* Horizontal scrollbar if viewed on mobile screens */
  border: 1px solid rgba(0, 0, 0, 0.12); /* Optional: provides a clean framed border */
}

/* 2. Forces table columns to space out cleanly and fixes layout alignment */
.nh-orders-scroll-container table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

/* 3. The magic sticky behavior for the headers */
.nh-orders-scroll-container th {
  position: sticky;
  top: 0;
  
  /* Must have an opaque background so items don't bleed visually underneath when scrolling */
  background-color: #ffffff; 
  
  /* Higher stacking index guarantees header stays on top of status badges and text */
  z-index: 2; 
  
  /* Crisp bottom border that follows the header as it sticks */
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12);
}

/* 4. Padding adjustments for standard table cells inside a dense matrix wrapper */
.nh-orders-scroll-container th,
.nh-orders-scroll-container td {
  padding: 12px 16px;
  vertical-align: middle;
}

/* ============================================================================
   12. UTILITY CLASSES
   ============================================================================ */

.nh-text-center {
  text-align: center;
}

.nh-text-right {
  text-align: right;
}

.nh-text-muted {
  color: var(--gray-500);
}

.nh-text-subtle {
  color: var(--gray-400);
}

.nh-text-bold {
  font-weight: 700;
}

.nh-text-uppercase {
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nh-mt-0 {
  margin-top: 0;
}
.nh-mt-2 {
  margin-top: var(--space-2);
}
.nh-mt-4 {
  margin-top: var(--space-4);
}
.nh-mt-6 {
  margin-top: var(--space-6);
}
.nh-mt-8 {
  margin-top: var(--space-8);
}

.nh-mb-0 {
  margin-bottom: 0;
}
.nh-mb-2 {
  margin-bottom: var(--space-2);
}
.nh-mb-4 {
  margin-bottom: var(--space-4);
}
.nh-mb-6 {
  margin-bottom: var(--space-6);
}
.nh-mb-8 {
  margin-bottom: var(--space-8);
}

.nh-p-4 {
  padding: var(--space-4);
}
.nh-p-6 {
  padding: var(--space-6);
}
.nh-p-8 {
  padding: var(--space-8);
}

.nh-hidden {
  display: none !important;
}

.nh-visible {
  display: block !important;
}

/* ============================================================================
   Shopping Cart & POS Styles
   ============================================================================ */

.nh-cart-header {
  border-bottom: 2px solid #eee;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
  padding: 10px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--gray-100);
  border-bottom: 1px solid #e0e0e0;
}

.nightMode .nh-cart-header {
  border-color: #424242;
}

.pos-ticket-header {
  padding: 1rem 1.25rem 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

.nightMode .pos-ticket-header {
  border-color: #424242;
}

.cart-item-row {
  border-bottom: 1px solid #dcdcdc;
}
.nightMode .cart-item-row {
  border-color: #424242;
}

/* Core button styling */
body.scrolled .my-cloudeats-link {
  display: none;
}
.header-announcement .my-cloudeats-link a.btn {
  top: 10rem;
}
.my-cloudeats-link a.btn {
  position: fixed;
  top: 5rem;
  right: 1rem;
  display: inline-block;
  height: auto;
  padding: 12px 24px;
  background-color: #f6f9ffbd;
  color: #3f8ff6;
  text-decoration: none;
  border-radius: 50px;
  font-family: sans-serif;
  text-transform: initial;
  font-weight: 600;
  font-size: 1.1rem;

  /* Page load inflation using zoom to avoid transform conflicts */
  animation: balloonInflate 1s cubic-bezier(0.25, 1, 0.5, 1) both;

  /* Smooth transition for the hover state */
  transition:
    all  0.2s ease,
    transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nightMode .my-cloudeats-link .btn {
  background-color: #43608166;
  color: #ffffff;
  transition: all 0.2s ease;
}
/* Hover effect scales the ENTIRE button */
.my-cloudeats-link .btn:hover {
  background-color: #3469a6ad;
  transform: scale(1.1); /* Scales the entire button to 1.10 smoothly */
  margin-right: 1rem;
}
.nightMode .my-cloudeats-link .btn:hover {
  color: #ffffff;
}
.dayMode .my-cloudeats-link .btn:hover {
  span.brand-eats {
    /* color: #ffffff; */
  }
  background-color: #f6f9ff;
  /* color: #ffffff; */
  transform: scale(1.1);
}
/* Balloon inflate using zoom keyframes */
@keyframes balloonInflate {
  0% {
    opacity: 0;
    zoom: 0;
  }
  60% {
    opacity: 1;
    zoom: 1.18; /* Over-inflates */
  }
  80% {
    zoom: 0.97; /* Sinks back slightly */
  }
  100% {
    zoom: 1; /* Settles at normal size */
  }
}

/* ============================================================================
   13. RESPONSIVE DESIGN
   ============================================================================ */
@media only screen and (max-width: 992px) {
  nav .brand-logo {
    left: initial;
    -webkit-transform: initial;
    transform: initial;
  }
}
@media (max-width: 768px) {
  :root {
    --font-size-base: 0.9375rem;
  }

  .nh-container {
    padding: 0 var(--space-4);
  }

  .nh-main {
    padding: var(--space-4);
  }

  .nh-role-header-content {
    flex-direction: column;
    gap: var(--space-4);
  }

  .nh-role-nav {
    width: 100%;
    flex-wrap: wrap;
  }

  .nh-grid-2 {
    grid-template-columns: 1fr;
  }

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

  .nh-grid-4 {
    grid-template-columns: repeat(1, 1fr);
  }

  .nh-order-details {
    grid-template-columns: 1fr;
  }

  .nh-btn {
    width: 100%;
    justify-content: center;
  }

  .nh-table {
    font-size: var(--font-size-xs);
  }

  .nh-table th,
  .nh-table td {
    padding: var(--space-3) var(--space-4);
  }
}

@media (max-width: 480px) {
  :root {
    --space-4: 0.75rem;
    --space-6: 1rem;
    --space-8: 1.5rem;
  }

  h1 {
    font-size: var(--font-size-2xl);
  }

  h2 {
    font-size: var(--font-size-xl);
  }

  .nh-card {
    padding: var(--space-4);
  }

  .nh-grid-auto {
    grid-template-columns: 1fr;
  }

  .nh-btn-sm {
    padding: var(--space-2) var(--space-3);
  }

  .nh-alert {
    flex-direction: column;
  }

  .nh-table {
    font-size: var(--font-size-xs);
  }
}

/* ============================================================================
   14. PRINT STYLES
   ============================================================================ */

@media print {
  body {
    background: white;
  }

  .nh-role-header,
  .nh-btn,
  .nh-form-input,
  .nh-form-select {
    display: none;
  }

  .nh-card {
    page-break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--gray-300);
  }
}
.modal {
  background: #efefef;
}
.nightMode .modal {
  background: rgb(6, 6, 6);
}

.modal-overlay {
  opacity: 1 !important;
  background: #000000b0;
  backdrop-filter: blur(8px);
}
.mb-modal-fixed {
  flex-direction: column;
  top: 0 !important;
  height: 100% !important; /* Fixed height */
  overflow: hidden !important; /* Disable modal's native scroll */
  background: #efefef;
}
.nightMode .mb-modal-fixed {
  background: rgba(0, 0, 0, 0.95);
}
.dayMode .mb-modal-fixed {
  background: rgba(238, 238, 238, 0.95);
}
.mb-modal-fixed .open {
  display: flex !important;
  top: 0 !important;
  height: 100% !important;
  transform: translateY(0);
  bottom: 0;
  width: 100%;
}
.mb-modal-fixed .modal-inner-overlay {
  position: fixed;
  top: -25%;
  left: 0;
  bottom: 0;
  right: 0;
  height: 125%;
  width: 100%;
  will-change: opacity;
}
.mb-modal-fixed .modal-header {
  width: 100%;
  flex: 0 0 auto; /* Don't grow, don't shrink */
  padding: 20px;
}
.mb-modal-fixed .modal-header h5 {
  margin: 0;
}

.mb-modal-fixed .modal-content {
  flex: 1 1 auto; /* Take up all remaining space */
  overflow-y: auto !important; /* Only this part scrolls */
  padding: 20px !important;
  width: 80%;
}

.mb-modal-fixed .modal-footer {
  flex: 0 0 auto; /* Don't grow, don't shrink */
  position: relative !important; /* Override Materialize absolute positioning */
  border-top: inherit;
  background: #fff;
  padding: 10px 20px;
  height: auto !important;
  width: 100%;
}
.mb-modal-fixed button {
  padding: 0 16px;
}
.modal button {
}
.modal-header .modal-close {
  background-color: #5d5d5d;
}

.modal-close:hover {
  background: #b63939;
  color: #eee;
}

/* ============================================================================
   15. Page 
   ============================================================================ */

#location-tracking-indicator {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: #211627f0;
  border: 1px solid #895f8a;
  border-radius: var(--border-radius-base);
  box-shadow: var(--shadow-lg);
  padding: 1rem 1.5rem;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nh-content .content-inner {
  padding: 2rem;
}
.nh-pending-queue .btn-floating.btn-large {
  margin-left: 1rem;
}

@media only screen and (max-width: 601px) {
  .merchant-logo-container img {
    max-width: 100px;
  }
  h1 {
    font-size: var(--font-size-2xl);
  }

  h2 {
    font-size: var(--font-size-xl);
  }

  h3 {
    font-size: var(--font-size-lg);
  }

  h4 {
    font-size: var(--font-size-base);
  }
  .nh-content .content-inner {
    padding: 1rem;
  }
  .nh-pending-queue .btn-large i {
    font-size: 1.1rem;
  }
  .nh-pending-queue .btn-floating.btn-large {
    width: 35px;
    height: 35px;
    padding: 0;
    margin-left: 0.5rem;
  }
  #store-status-toggle .kds-status-label {
    display: none;
  }
}
