body { font-family: Arial, sans-serif; margin:0; padding:0; display:flex; flex-direction:column; height:100vh; }
header { padding:5px 10px; background:#eee; font-weight:bold; }

#main { flex:1; display:flex; overflow:hidden; }

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 15px;
  background: transparent;
  color: white;
}

/* LEFT SIDE LOGO */
.header-left img {
  height: 40px;
  width: auto;
}

/* RIGHT SIDE (empty for now) */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px; /* space between buttons */
}

.column { border:2px solid #ccc; margin:5px; padding:5px; flex-shrink:0; display:flex; flex-direction:column; }
.column h2 { margin:0 0 5px 0; font-size:16px; text-align:center; }
.search { margin-bottom:5px; }
.order-card { background:#f9f9f9; border:1px solid #aaa; margin:2px 0; padding:5px; display:flex; justify-content:space-between; cursor:pointer; }
.order-card button {
  margin-left: 2px;
  color: black;
  font-weight: bold;
}

#ticket-viewer { flex:1; border:2px solid #ccc; margin:5px; padding:5px; display:flex; flex-direction:column; overflow-y:auto; }
#ticket-viewer h2 { text-align:center; margin:0 0 5px 0; }
#ticket-viewer .ticket { border-bottom:1px solid #000; margin:5px 0; padding-bottom:5px; }

#week-product { flex:1; border:2px solid #ccc; margin:5px; padding:5px; display:flex; flex-direction:column; overflow-y:auto; }
#week-product h2 { text-align:center; margin:0 0 5px 0;}

button { cursor:pointer; }

/* Print Styles */
@media print {
  body * { visibility:hidden; }
  #print-area, #print-area * { visibility:visible; }
  #print-area { position:absolute; left:0; top:0; width:100%; }
  .ticket-row { display:flex; flex-wrap:wrap; page-break-inside:avoid; }
  .ticket { flex:1 1 45%; margin:5px; page-break-inside:avoid; border-bottom:1px solid #000; }
}

#login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#login-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 250px;
  text-align: center;
}

#login-box input {
  padding: 10px;
  font-size: 14px;
}

#login-box button {
  padding: 10px;
  cursor: pointer;
}
#new-list,
#notready-list,
#completed-list,
#plan-list {
  max-height: auto;
  overflow-y: auto;  /* vertical scroll */
}

.plan-section {
  flex: 1;
  overflow-y: auto;
  border-top: 1px solid #ccc;
  margin-bottom: 5px;
}

#plan-uploads {
  display: flex;
  flex-direction: column;
}

.button-link {
  display: inline-block;
  padding: 10px 20px;
  background-color: black; /* Blue button */
  color: white;
  text-decoration: none; 
  border-radius: 5px; 
  font-size: 16px;
  font-weight: bold;
  text-align: center;
  transition: background-color 0.3s;
}

.button-link:hover {
  background-color: #0056b3; 
}

.section {
  margin-top: 14px;
  margin-bottom: 6px;
}

.section-title {
  font-weight: bold;
  margin-bottom: 6px;
}

.order-block {
  margin-top: 16px;
}

.order-block + .combo-block {
  margin-top: 6px;
}

.combo-block {
  margin-left: 8px;
  margin-bottom: 4px;
}

.combo-block:last-child {
  margin-bottom: 14px;
}

/* Delivery disabled = red */
.button-link.disabled-delivery {
  background-color: red;
}

/* Keep hover nice */
.button-link.disabled-delivery:hover {
  background-color: darkred;
}

.shutdown-btn {
  background: red;
  color: white;
}

.shutdown-btn.active {
  background: lightgreen;
  color: black;
}

/* ========================= */
/* MOBILE FIX — DO NOT BREAK PC */
/* ========================= */

/* ========================= */
/* MOBILE PROFESSIONAL LAYOUT */
/* ========================= */

@media only screen and (max-width: 768px) {
/* Prevent layout zoom shifts */

html {

  -webkit-text-size-adjust: 100%;

}

body {

  touch-action: manipulation;

}

/* Body scroll fix */
body {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Main layout stacks */
#main {
  display: flex;
  flex-direction: column;
  height: auto;
  overflow: visible;
}

/* Header clean layout */
.top-bar {
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px;
  background: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

/* Logo */
.header-left img {
  height: 34px;
}

/* Buttons row */
.header-right {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Professional buttons */
.button-link {
  flex: 1 1 auto;
  padding: 10px;
  font-size: 14px;
  border-radius: 6px;
}

/* Columns become cards */
.column {
  width: 100%;
  margin: 6px 0;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: white;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Section titles */
.column h2 {

  font-size: 18px;
  margin-bottom: 8px;

  border-bottom: 1px solid #eee;
  padding-bottom: 4px;

}

/* Ticket viewer full width */
#ticket-viewer {

  width: 100%;
  margin: 6px 0;

  border-radius: 10px;
  border: 1px solid #ddd;

  background: white;

}

/* Lists scroll correctly */
#new-list,
#notready-list,
#completed-list,
.plan-section {

  flex: 1;

  overflow-y: auto;

  max-height: 260px;

}

/* Search bars */
.search {

  padding: 10px;
  font-size: 16px;

  border-radius: 6px;
  border: 1px solid #ccc;

}

/* Order cards professional */
.order-card {

  background: #fafafa;

  border-radius: 8px;
  border: 1px solid #ddd;

  padding: 10px;

  margin-bottom: 6px;

  display: flex;
  flex-direction: column;

  gap: 6px;

  width: 100%;
box-sizing: border-box;
}

/* Order name bold */
.order-card span {

  font-weight: bold;
  font-size: 15px;

  word-break: break-word;
}

/* Buttons inside cards */
.order-card button {
  width: 100%;
  padding: 8px;
  border-radius: 6px;
  border: none;
  background: #e9e9e9;
  color: black;
  font-weight: bold;
  white-space: normal;
}

/* Ticket layout */
.ticket {
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  line-height: 1.2;
}

.order-block {
  margin-top: 16px;
}

.combo-block {
  margin-left: 8px;
  margin-bottom: 4px;
}

.combo-block:last-child {
  margin-bottom: 14px;
}

.order-block + .combo-block {
  margin-top: 6px;
}

/* Print buttons bigger */
#print-notready-btn,
#print-ticket-btn {

  padding: 10px;
  margin-bottom: 6px;

  border-radius: 6px;

}

/* Login box mobile fix */
#login-box {

  width: 90%;
  max-width: 320px;

}

/* Hide ticket viewer column on mobile */
#ticket-viewer {
  display: none;
}

/* Popup background */
#mobile-ticket-popup {

  display: none;

  position: fixed;

  top: 0;
  left: 0;

  width: 100%;
  height: 100%;

  background: rgba(0,0,0,0.6);

  z-index: 9999;

  justify-content: center;
  align-items: center;

}

/* Popup box */
.mobile-ticket-box {

  background: white;

  width: 100%;
  max-width: 100%;
  max-width: 500px;

  height: 90%;

  border-radius: 12px;

  padding: 15px;

  overflow-y: auto;

  position: relative;

}

/* Close button */
#close-ticket-popup {

  position: absolute;

  top: 10px;
  right: 10px;

  font-size: 20px;

  border: none;

  background: #eee;

  border-radius: 6px;

  padding: 5px 10px;

  cursor: pointer;

}

/* Ticket content styling */
#mobile-ticket-content {

  margin-top: 40px;

  font-size: 15px;

  line-height: 1.5;

}

.mobile-ticket-buttons {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-ticket-buttons button {
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  background: #e9e9e9;
  font-weight: bold;
  color: black;
  font-weight: bold;
}

/* Special colors */

.mobile-ticket-buttons button:hover {

  opacity: 0.9;

}

#print-notready-btn {
  display: none;
}

input,
select,
textarea {

  font-size: 16px !important;

}


}

/* ========================= */
/* PROFESSIONAL UI POLISH */
/* ========================= */

/* Page background */
body {
  background: #f2f4f7;
}

/* Header styling */
.top-bar {

  background: white;

  border-bottom: 1px solid #ddd;

  box-shadow: 0 2px 4px rgba(0,0,0,0.05);

}

/* Column shadows */
.column,
#ticket-viewer {

  box-shadow: 0 2px 6px rgba(0,0,0,0.05);

}

/* Buttons cleaner */
button {

  transition: 0.2s ease;

}

button:hover {

  opacity: 0.85;

}

/* Scrollbars nicer (mobile + PC) */
#new-list,
#notready-list,
#completed-list,
.plan-section {

  scrollbar-width: thin;

}

/* Ticket styling */
.section-title {

  font-weight: bold;

  border-bottom: 1px solid #ddd;

  margin-bottom: 6px;

  padding-bottom: 3px;

}

/* ========================= */
/* PRODUCT POPUP */
/* ========================= */

#product-popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}

.product-box {
  background: white;
  width: 95%;
  max-width: 600px;
  height: 85%;
  border-radius: 12px;
  padding: 20px;
  overflow-y: auto;
  position: relative;
}

#close-product-popup {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 20px;
  border: none;
  background: #eee;
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
}

#product-content {
  margin-top: 20px;
  font-size: 15px;
}

.product-section {
  margin-bottom: 20px;
}

.product-section h3 {
  border-bottom: 1px solid #ddd;
  margin-bottom: 6px;
}

.product-item {
  display: flex;
  justify-content: space-between;
  padding: 8px;
  border-radius: 6px;
  background: #f7f7f7;
  margin-bottom: 4px;
  cursor: pointer;
}

.product-item.done {
  text-decoration: line-through;
  opacity: 0.5;
}

/* PASS ORDERS POPUP */
#pass-orders-popup {
  display: none;
  position: fixed;
  top:0;
  left:0;
  width:100%;
  height:100%;
  background: rgba(0,0,0,0.6);
  z-index: 10000;
  justify-content:center;
  align-items:center;
}

#pass-orders-popup .product-box {
  background:white;
  width:95%;
  max-width:600px;
  height:85%;
  border-radius:12px;
  padding:20px;
  overflow-y:auto;
  position:relative;
}

.pass-item {
  display:flex;
  justify-content:center;
  align-items:center;

  padding:12px;
  margin-bottom:6px;

  background:#f5f5f5;
  border-radius:8px;

  cursor:pointer;

  text-align:center;
  font-weight:500;
}

.pass-item.selected {
  background:#222;
  color:white;
}

#pass-orders-list {
  overflow-y: auto;
  max-height: 400px;

  /* SHOW SCROLLBAR */
  scrollbar-width: thin;
}

#pass-orders-list::-webkit-scrollbar {
  width: 8px;
}

#pass-orders-list::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 10px;
}

#pass-orders-list::-webkit-scrollbar-thumb:hover {
  background: #999;
}

#pass-search {
  width: 100%;
  padding: 12px 14px;

  border-radius: 10px;
  border: 1px solid #ddd;

  font-size: 14px;

  background: #fafafa;

  outline: none;

  transition: all 0.2s ease;

  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

#pass-search:focus {
  background: #fff;
  border-color: #000;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-10px); }
  40%       { transform: translateX(10px); }
  60%       { transform: translateX(-8px); }
  80%       { transform: translateX(8px); }
}

.shake {
  animation: shake 0.4s ease;
}