@font-face {
  font-family: "AMSTRAD";
  src: url("./assets/AMSTRAD.woff") format("woff");
}

/* General Styles */
body {
  font-family: "AMSTRAD";
  font-size: 18px;
  letter-spacing: 1px;
  margin: 0;
  padding: 0;
  text-decoration: none;
  overflow-x: hidden;
}

.index {
  background-image: repeating-conic-gradient(#E7FF97 0% 25%, #FFBAF9 0% 50%);
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
}

.manageclients {
  background-image: repeating-conic-gradient(#dc8fd1 0% 25%, #f6c28a 0% 50%);
  background-position: 0 0, 10px 10px;
  background-size: 20px 20px;
}

/* Menu */
.top-menu {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 10px;
  background: #00cf91;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
}

.top-menu a:not(.top-menu-logout) {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  color: #515151;
  background: white;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  padding: 8px 15px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  position: relative;
  display: inline-block;
}

.top-menu a:not(.top-menu-logout):hover {
  color: #000000;
  text-decoration: none;
  background: #f0f0f0;
  transition: 0.2s;
}

.top-menu a:not(.top-menu-logout):active {
  box-shadow: 0px 0px 0px 0px;
  top: 5px;
  left: 5px;
}

.top-menu-logout {
  color: #e74c3c;
  font-weight: bold;
  font-size: 20px;
  padding: 10px 0px;
  background: none;
  border: none;
  text-decoration: none;
  box-shadow: none;
}

.top-menu-logout:hover {
  color: #C0722B;
}

.menu-left {
  flex: 1;
}

.menu-right {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.menu-separator {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #000000;
  margin: 0 5px;
  font-weight: bold;
  display: flex;
  align-items: center;
}

.menu-clear {
  clear: both;
  margin-bottom: 20px;
}

/* Main Layout */
.main-container {
  display: flex;
  height: calc(100vh - 50px);
}
.left-column {
  flex: 3;
  padding: 20px;
  overflow-y: auto;
  border-right: 1px solid #ccc;
}
.right-column {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

/* Edit order */
.edit-order {
  background: #F3FCAD;
}

/* Edit order */
.create-order {
  background: #FFBF80;
}

/* Calendar */
.calendar {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 
              4px 4px 0px 0px, 5px 5px 0px 0px;
  width: 100%;
  border-collapse: collapse;
  background: #f9f9f9;
}
.calendar th {
  font-family: "AMSTRAD";
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px;
  background: #f2f2f2;
  padding: 5px;
}
.calendar td {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px;
  background: #fff;
  padding: 0;
  text-align: center;
  vertical-align: middle;
  height: 40px;
  width: 40px;
}
.cal-nav {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px;
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  align-items: center;
  background: #f2f2f2;
  padding: 10px;
}
.cal-nav a {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px;
  text-decoration: none;
  padding: 5px 10px;
  margin: 0 2px;
}
.cal-nav a:hover {
  background: #ddd;
}
.cal-nav span {
  font-family: "AMSTRAD";
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
}
.day-orange {
  font-family: "AMSTRAD";
  font-size: 20px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  box-shadow: none;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  display: inline-block;
  width: 100%;
  height: 100%;
  line-height: 40px;
  background-color: #EA7100;
  color: white;
  text-shadow: 1px 1px 0px #515151;
}
.day-green {
  font-family: "AMSTRAD";
  font-size: 20px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  box-shadow: none;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  display: inline-block;
  width: 100%;
  height: 100%;
  line-height: 40px;
  background-color: #00A444;
  color: white;
  text-shadow: 1px 1px 0px #515151;
}

.calendar-day-cell {
  padding: 0;
  position: relative;
}

.calendar-day-link {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 40px;
  position: relative;
  text-decoration: none;
  color: inherit;
}

.calendar-day-number {
  display: inline-block;
  width: 100%;
  line-height: 40px;
  font-family: "AMSTRAD";
  font-size: 20px;
  color: #515151;
}

.calendar-day-badge {
  position: absolute;
  top: 2px;
  font-family: "AMSTRAD";
  font-size: 10px;
  letter-spacing: 0;
  line-height: 1;
  padding: 2px 4px;
  border: 1px solid #515151;
  background: rgba(255, 255, 255, 0.9);
  color: #515151;
  z-index: 2;
}

.calendar-day-due {
  background: #f7ffb0;
  left: 2px;
  top: 2px;
}

.calendar-day-opened {
  background: #bcffff;
  left: 2px;
  top: 16px;
}

.calendar-day-pending {
  right: 2px;
  top: 2px;
  background: #ffd7a8;
}

.day-has-activity-cell {
  background: #ffe8c9 !important;
}

.day-orange-cell {
  background: #EA7100 !important;
}

.day-orange-cell .calendar-day-number {
  color: white;
  text-shadow: 1px 1px 0px #515151;
}

.day-green-cell {
  background: #00A444 !important;
}

.day-green-cell .calendar-day-number {
  color: white;
  text-shadow: 1px 1px 0px #515151;
}

.day-selected-cell {
  outline: 2px solid #007bff;
  outline-offset: -2px;
}

/* Order Hierarchy */
.order-container {
  margin-bottom: 15px;
}

.qr-wrapper {
  margin-right: 10px;
  display: flex;
  align-items: center;
}

.order-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  font-size: 0.9em;
  position: relative;
}

.order-status-select {
  width: auto;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 3px;
  position: absolute;
  right: 1px;
  top: 10px;
}

.delete-form {
  display: none;
}

.pagination-info {
  text-align: center;
  color: #666;
  font-size: 0.9em;
}

#printframe {
  display: none;
}
.order-header {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  cursor: pointer;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  display: flex;
  align-items: stretch;
  padding: 5px;
}

.add-suborder-btn {
  font-family: "AMSTRAD";
  text-decoration: none;
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  color: #515151;
  cursor: pointer;
  border: 3px solid #515151;
  width: 20px;
  height: 20px;
  line-height: 20px;
  box-shadow: none;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  position: absolute;
  left: -10px;
  top: 50px;
  background: #28a745;
  color: white;
  text-align: center;
  z-index: 10;
}

.add-suborder-btn:hover {
  background: #ff6b00;
}

.add-suborder-btn:active {
  top: 50px;
  left: -10px;
  transform: none;
}

.toggle-btn {
  font-family: "AMSTRAD";
  font-size: 18px;
  font-weight: bold;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border: 2px solid #515151;
  background: #f0f0f0;
  color: #515151;
  cursor: pointer;
  margin-right: 8px;
  padding: 0;
  border-radius: 3px;
  user-select: none;
  -webkit-user-select: none;
  flex-shrink: 0;
}

.toggle-btn:hover {
  background: #e0e0e0;
  border-color: #333;
}

.toggle-btn:active {
  background: #d0d0d0;
  transform: translateY(1px);
}

.order-children {
  margin-top: 10px;
  margin-right: 20px;
  border-left: 2px dashed #ccc;
  padding-left: 10px;
  transition: display 0.2s ease-in-out;
}

/* Manage Clients - Three Row Layout */
.manage-clients-container {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  position: relative;
}

.manage-clients-sidebar {
  position: fixed;
  top: 110px;
  left: 30px;
  z-index: 100;
  max-width: 400px;
  background: white;
  padding: 20px;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
}

.manage-clients-sidebar .form-section {
  max-width: 100%;
  margin: 0;
}

.manage-clients-main {
  width: 80%;
  margin-left: 320px;
  padding-top: 20px;
}

.manage-clients-columns {
  display: flex;
  gap: 20px;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.manage-clients-column {
  min-width: 700px;
  background: #ccc;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;

}

@media (max-width: 1100px) {
  .manage-clients-sidebar {
    position: relative;
    top: 0;
    left: 0;
    max-width: 100%;
    margin-bottom: 30px;
  }

  .manage-clients-main {
    margin-left: 0;
  }

  .manage-clients-columns {
    flex-wrap: wrap;
  }

  .manage-clients-column {
    min-width: 100%;
  }
}

.delete-order-btn {
  font-family: "AMSTRAD";
  font-size: 14px;
  padding: 0;
  letter-spacing: 0px;
  text-transform: uppercase;
  color: #515151;
  cursor: pointer;
  border: 3px solid #515151;
  box-shadow: none;
  width: 20px;
  height: 20px;
  line-height: 15px;	
  position: absolute;
  user-select: none;
  right: -10px;
  top: -25px;
  background: #e74c3c;
  color: white;
  text-align: center;
  z-index: 10;
}

.duplicate-order-btn {
  font-family: "AMSTRAD";
  font-size: 14px;
  padding: 0;
  letter-spacing: 0px;
  text-transform: uppercase;
  color: #515151;
  cursor: pointer;
  border: 3px solid #515151;
  box-shadow: none;
  width: 20px;
  height: 20px;
  line-height: 15px;	
  position: absolute;
  user-select: none;
  right: 15px;
  top: -25px;
  background: #20ffc4;
  color: rgb(0, 0, 0);
  text-align: center;
  z-index: 10;
}

.delete-order-btn:hover {
  background: #c0392b;
}

/* Status Colors with Checkered Patterns */
.status-Open {
  background-color: #DFC7FF;
}
.status-Confirmed {
  background-color: #AED5FF;
}
.status-Pretreating {
  background-color: #E3E3E3;
}

/* Production (Transitioning to Green) */
.status-Received {
  background-color: #FFDB64;
}
.status-Printing {
  background-color: #FFFF99;
}
.status-Printed {
  background-color: #98FFC9;
}

/* Final Stages (Deepening the Green) */
.status-Collected {
  background-color: #FFBAF9;
 }
.status-Delivered {
  background-color: #FFBAF9;
}

/* Alert */
.status-Canceled {
  background-color: #FF3811;
}

/* Due-date status badge — alert-box style: a colour-coded square with an icon
   at the START of the order header, with an arrow notch pointing into the row.
   Every pending order gets one (set on .order-header by renderOrder): on-time
   (green), late 1-9 days (yellow), very late 10+ days (pink). --alert-c drives
   the badge, notch and balloon heading. */
.alert-ontime   { --alert-c: #5bbf8a; }
.alert-late     { --alert-c: #ffcc00; }
.alert-verylate { --alert-c: #ff5599; }

.order-alert {
  flex: 0 0 auto;
  align-self: stretch;
  width: 46px;
  /* Negative margins cancel the header's 5px padding so the badge fills the
     full height and sits flush against the left edge. */
  margin: -5px 14px -5px -5px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--alert-c, #f5b301);
}

/* Hover balloon: opened / due dates. Pops ABOVE the badge so it never overlaps
   the row below. Heading tinted by severity via the inherited --alert-c. */
.order-alert-tip {
  position: absolute;
  /* Top-left corner pinned to the badge, opening down-and-right over the current
     order (never up over the previous one, never left behind the sidebar). */
  left: 60px;
  top: 30px;
  display: none;
  z-index: 30;
  padding: 10px 12px;
  background: #2b2b2b;
  color: #fff;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 0 rgba(0, 0, 0, .4);
  font-family: "AMSTRAD";
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
  text-align: left;
  white-space: nowrap;
  cursor: default;
  /* Balloon never captures the cursor, so only the badge square drives :hover —
     leave the badge and it always disappears (no lingering when the offset
     balloon sits under the pointer). */
  pointer-events: none;
}
.order-alert:hover .order-alert-tip { display: block; }
.oat-head {
  display: block;
  margin-bottom: 6px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(255, 255, 255, .25);
  color: var(--alert-c, #fff);
  font-weight: bold;
}
.oat-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}
.oat-row > span { opacity: .65; }
.oat-row > strong { color: #fff; font-weight: bold; }
.order-alert-ico {
  width: 26px;
  height: 26px;
  fill: #fff;
  display: block;
}
/* Arrow notch pointing right into the message, attached to the badge's right
   edge (left:100% puts the coloured left-border triangle just outside it). */
.order-alert::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 9px solid transparent;
  border-left-color: var(--alert-c, #f5b301);
}

/* PREVIEW */
.order-preview {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  position: relative;
  margin-top: 30px;
  padding: 25px;
  background: rgb(255,255,255,0.4);
}

.preview-order-info{
  margin-top: -30px;
 font-family: "AMSTRAD";
 font-size: 14px;
 color: #434343;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.preview-header h3 {
  font-family: "AMSTRAD";
  font-size: 1.5em;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0;
  color: #333;
}

.preview-header .order-id {
  margin: 0;
  color: #666;
  font-size: 0.85em;
}

.preview-info-grid-wrapper {
  margin-bottom: 20px;
}

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

.order-preview-info {
  margin: 0;
}

.order-qr {
  margin-right: 10px;
  cursor: pointer;
}
.order-title {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.order-details {
  border-left: 2px solid #ccc;
  margin-left: 25px;
  padding: 10px;
  background: #fff;
  border-bottom: 1px solid #ddd;
  border-right: 1px solid #ddd;
}

.preview-info-grid {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
  padding: 20px;
  background: #f8f9fa;
}

.info-item {
  display: flex;
 -o-user-select: text;
 -moz-user-select: text;
 -webkit-user-select: text;
  user-select: text;
  flex-direction: column;
}

.info-label {
  font-family: "AMSTRAD";
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: 5px;
  font-weight: 600;
}

.info-value {
  font-family: "AMSTRAD";
  font-size: 16px;
  letter-spacing: 0px;
  text-transform: uppercase;
  color: #212529;
  font-weight: 500;
}

.mockup-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
  margin-bottom: 30px;
  padding: 30px;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .mockup-container {
    flex-direction: column;
  }
}

.tshirt-wrapper {
  position: relative;
  width: 250px;
  height: 250px;
}

.tshirt-wrapper-clickable {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
}

.tshirt-label {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-align: center;
  font-weight: 600;
  color: #666;
  margin-bottom: 15px;
}

.tshirt-info {
  font-family: "AMSTRAD";
  font-size: 13px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  margin-top: 15px;
  color: #666;
  background: #e7f3ff;
  border-left: 3px solid #007bff;
  padding: 10px;
}

.other-images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  padding-top: 20px;
  border-top: 2px solid #f0f0f0;
}

.other-image-item {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: #f8f9fa;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.other-image-item img {
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-top: 10px;
  cursor: pointer;
  max-width: 100%;
}

/* Buttons */
.btn-edit {
  font-family: "AMSTRAD";
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #000;
  cursor: pointer;
  border: 3px solid #515151;
  padding: 0.25em 0.5em;
  box-shadow: 1px 1px 0px 0px #515151, 2px 2px 0px 0px #515151, 3px 3px 0px 0px #515151, 4px 4px 0px 0px #515151, 5px 5px 0px 0px #515151;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #007bff;
  color: white;
  font-size: 1.2em;
  font-weight: bold;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-edit:hover {
  background: #0056b3;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(0,123,255,0.3);
}

.btn-delete {
  color: red;
  border: none;
  background: none;
  cursor: pointer;
  font-weight: bold;
}

.btn {
  font-family: "AMSTRAD";
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #000;
  cursor: pointer;
  border: 3px solid #515151;
  padding: 0.25em 0.5em;
  box-shadow: 1px 1px 0px 0px #515151, 2px 2px 0px 0px #515151, 3px 3px 0px 0px #515151, 4px 4px 0px 0px #515151, 5px 5px 0px 0px #515151;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  padding: 8px 16px;
  text-decoration: none;
  font-size: 0.9em;
  display: inline-block;
  margin-right: 5px;
}

.btn-primary {
  font-family: "AMSTRAD";
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #000;
  cursor: pointer;
  border: 3px solid #515151;
  padding: 0.25em 0.5em;
  box-shadow: 1px 1px 0px 0px #515151, 2px 2px 0px 0px #515151, 3px 3px 0px 0px #515151, 4px 4px 0px 0px #515151, 5px 5px 0px 0px #515151;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: #007bff;
  color: white;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.btn-primary:active {
  box-shadow: 0px 0px 0px 0px;
  top: 5px;
  left: 5px;
}

.btn-secondary {
  font-family: "AMSTRAD";
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #000;
  cursor: pointer;
  border: 3px solid #515151;
  padding: 0.25em 0.5em;
  box-shadow: 1px 1px 0px 0px #515151, 2px 2px 0px 0px #515151, 3px 3px 0px 0px #515151, 4px 4px 0px 0px #515151, 5px 5px 0px 0px #515151;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: #e0e0e0;
  color: #333;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

.btn-secondary:active {
  box-shadow: 0px 0px 0px 0px;
  top: 5px;
  left: 5px;
}

.btn-success {
  font-family: "AMSTRAD";
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #000;
  cursor: pointer;
  border: 3px solid #515151;
  padding: 0.25em 0.5em;
  box-shadow: 1px 1px 0px 0px #515151, 2px 2px 0px 0px #515151, 3px 3px 0px 0px #515151, 4px 4px 0px 0px #515151, 5px 5px 0px 0px #515151;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: #28a745;
  color: white;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-success:hover {
  background: #218838;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

.btn-success:active {
  box-shadow: 0px 0px 0px 0px;
  top: 5px;
  left: 5px;
}

.btn-close {
  font-family: "AMSTRAD";
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #000;
  cursor: pointer;
  border: 3px solid #515151;
  padding: 0.25em 0.5em;
  box-shadow: 1px 1px 0px 0px #515151, 2px 2px 0px 0px #515151, 3px 3px 0px 0px #515151, 4px 4px 0px 0px #515151, 5px 5px 0px 0px #515151;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: #6c757d;
  color: white;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
  font-size: 1.5em;
  transition: all 0.3s ease;
}

.btn-close:hover {
  background: #dc3545;
  transform: scale(1.1);
  box-shadow: 0 2px 8px rgba(220,53,69,0.3);
}

.btn-sm {
  font-family: "AMSTRAD";
  font-size: 11px;
  letter-spacing: 0px;
  text-transform: uppercase;
  color: #515151;
  cursor: pointer;
  border: 1px solid #515151;
  padding: 0.25em 0.5em;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  padding: 5px 10px;
  font-size: 0.85em;
}

.btn-sm:active {
  box-shadow: 0px 0px 0px 0px;
  top: 5px;
  left: 5px;
}

/* Filter Buttons */
.filter-buttons {
  margin-bottom: 15px;
}

.filter-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 15px;
}

.filter-toolbar .filter-buttons {
  order: 1;
  margin-bottom: 0;
}

.order-search-form {
  order: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.order-search-input {
  font-family: "AMSTRAD";
  font-size: 16px;
  letter-spacing: 1px;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px #515151, 2px 2px 0px 0px #515151;
  padding: 11px 12px;
  min-width: 260px;
  box-sizing: border-box;
}

.order-search-btn {
  margin-right: 0;
}

/* Filter Banner */
.filter-banner {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: #e0f7fa;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #b2ebf2;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Pagination */
.pagination {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: none;
  box-shadow: none;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 20px 0;
  gap: 10px;
}

.pagination a, .pagination span {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  background-color: #e6e887;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  padding: 8px 12px;
  text-decoration: none;
}

.pagination a:hover {
  background: #f2ff5e;
}

.pagination .current {
  background: #007bff;
  color: white;
  border-color: #007bff;
}

.pagination .disabled {
  color: #ccc;
  background: #eee;
  pointer-events: none;
}

/* Forms */
.form-group {
  margin-bottom: 15px;
}

label {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
}

input, select, textarea {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #000;
  padding: 5px;
  width: 300px;
  box-sizing: border-box;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px;
}

input[type="file"]::file-selector-button {
  border: 0.15em solid #000;
  padding: 0.2em 0.2em;
  background-color: #fff;
}

button {
  font-family: "AMSTRAD";
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #000;
  cursor: pointer;
  border: 3px solid #515151;
  padding: 0.25em 0.5em;
  box-shadow: 1px 1px 0px 0px #515151, 2px 2px 0px 0px #515151, 3px 3px 0px 0px #515151, 4px 4px 0px 0px #515151, 5px 5px 0px 0px #515151;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  padding: 10px 20px;
  background: #007bff;
  color: white;
  border: none;
  cursor: pointer;
}

button:hover {
  background: #0056b3;
}

button:active {
  box-shadow: 0px 0px 0px 0px;

}

/* Inline style helpers */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.ml-10 { margin-left: 10px; }
.mr-10 { margin-right: 10px; }
.p-10 { padding: 10px; }
.p-15 { padding: 15px; }
.bg-danger { background: #f8d7da; color: #721c24; }
.bg-info { background: #d1ecf1; color: #0c5460; }
.inline-block { display: inline-block; }
.cursor-pointer { cursor: pointer; }
.no-border { border: none; }
.w-100 { width: 100%; }

/* Modern Form Styling */
.form-container {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  max-width: 700px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.form-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

.form-section:last-child {
  border-bottom: none;
}

.form-section h2 {
  font-family: "AMSTRAD";
  font-size: 1.5em;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #333;
  margin-bottom: 20px;
}

.form-section h3 {
  font-family: "AMSTRAD";
  font-size: 1.2em;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 15px;
}

.form-group label {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  display: block;
  margin-bottom: 8px;
  color: #555;
  font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px;
  width: 100%;
  max-width: 280px;
  padding: 12px 15px;
  font-size: 14px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.form-group input[type="color"] {
  width: 60px;
  height: 45px;
  padding: 2px;
  border: 2px solid #e0e0e0;
  cursor: pointer;
}

.form-group input[type="file"] {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px;
  padding: 8px;
  border: 2px dashed #ccc;
  background: #fafafa;
  cursor: pointer;
}

.form-group input[type="file"]:hover {
  border-color: #007bff;
  background: #f0f7ff;
}

.canvas-options {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 20px;
  margin-top: 15px;
}

.canvas-options .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 15px;
}

.canvas-options .form-row label {
  display: block;
  margin-bottom: 5px;
  font-size: 13px;
  color: #666;
}

.canvas-options select {
  width: 100%;
  padding: 10px;
  border: 2px solid #e0e0e0;
  font-size: 14px;
}

.canvas-info {
  background: #e7f3ff;
  border-left: 3px solid #007bff;
  padding: 10px 15px;
  margin-top: 10px;
  font-size: 13px;
  color: #0056b3;
}

.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 0 auto;
  width: fit-content;
}

.color-picker-wrapper input[type="text"] {
  flex: 1;
  align-items: center;
  max-width: 120px;
}

.client-search-wrapper {
  position: relative;
}

.client-search-wrapper #client_results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 5px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.client-search-wrapper #client_results div {
  padding: 10px 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.client-search-wrapper #client_results div:hover {
  background: #f0f7ff;
}

#new_client_div { display: none; background: #f9f9f9;margin: 0 auto; padding: 10px; border: 1px solid #ddd; margin-top: 10px; width: 300px; }

.new-client-form {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: #fff3cd;
  border: 1px solid #ffc107;
  padding: 15px;
  margin-top: 100px;
}

.new-client-form p {
  margin: 0 0 10px 0;
  color: #856404;
  font-weight: 600;
}

.new-client-form input {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px;
  display: block;
  width: 100%;
  max-width: 300px;
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ffc107;
}

.new-client-form button {
  font-family: "AMSTRAD";
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #000;
  cursor: pointer;
  border: 3px solid #515151;
  padding: 0.25em 0.5em;
  box-shadow: 1px 1px 0px 0px #515151, 2px 2px 0px 0px #515151, 3px 3px 0px 0px #515151, 4px 4px 0px 0px #515151, 5px 5px 0px 0px #515151;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: #ffc107;
  color: #333;
  padding: 8px 20px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.new-client-form button:hover {
  background: #e0a800;
}

.alert-error {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
  padding: 15px 20px;
  margin-bottom: 20px;
}

.alert-success {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
  padding: 15px 20px;
  margin-bottom: 20px;
}

.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

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

.front-back-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.front-back-grid .form-group {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: #f8f9fa;
  padding: 20px;
  border-right: 1px solid #ccc;
}
.right-panel { flex: 1; }

/* Lists */
ul { list-style: none; padding: 0; }
li { margin: 5px 0; }
.active { font-weight: bold; }

/* Tables */
table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 20px;
}
th,
td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}
th {
  background-color: #f2f2f2;
}

/* Login */
.login-box {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: white;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  width: 300px;
}
.error { color: red; text-align: center; }

/* Search Box */
.search-box {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  margin-bottom: 20px;
  padding: 10px;
  background: #eee;
  border: 1px solid #ccc;
}

/* Print Page */
/* Oswald — self-hosted (no external CSS/CDN). */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("./assets/oswald-700.ttf") format("truetype");
}

.print-body {
  font-family: 'Oswald', sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

.page {
  max-height: 200mm;
  padding: 10mm;
  margin: auto;
  position: relative;
  box-sizing: border-box;
}

.grid-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
}

.print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5px;
}

.logo {
  size: 100px;
}

.qr-box {
  background: black;
  color: white;
  padding: 10px;
  text-align: center;
  display: inline-block;
  position: absolute;
  right: 10px;
}
.qr-box img { display: block; border: 2px solid white; }
.qr-label { margin-bottom: 5px; font-size: 0.9em; letter-spacing: 1px; }

.top-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  margin: 20px 0 30px 0;
  flex-wrap: wrap;
  gap: 20px;
}

.info-section { flex: 1; min-width: 200px; }
.info-label { font-size: 1em; color: #666; margin-bottom: 5px; }
.info-value { font-size: 1.3em; font-weight: bold; text-transform: uppercase; }

.comments-section { width: 100%; margin-top: 20px; padding: 15px; border: 2px solid #333; background: #f9f9f9; }
.comments-label { font-size: 1.2em; font-weight: bold; text-transform: uppercase; margin-bottom: 10px; }
.comments-text { font-size: 1.1em; white-space: pre-wrap; }

.order-id { text-align: center; font-size: 2em; text-transform: uppercase; margin: 0px 0 30px 0; line-height: 1; }

.print-page .mockup-container { display: flex; flex-direction: column; align-items: center; gap: 30px; margin-bottom: 30px; }
.standalone-images { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-bottom: 30px; }
.standalone-image { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.standalone-image img { max-width: 300px; max-height: 300px; object-fit: contain; border: 2px solid #333; background: white; }
.standalone-label { font-size: 1.2em; text-transform: uppercase; font-weight: bold; }

.tshirt-wrapper { position: relative; width: 300px; height: 300px; margin: 0 auto;}
.tshirt-svg { width: 100%; height: 100%; display: block; }
.print-area-f{
    position: absolute;
    top: 51%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.print-area-f img {
    max-width: 100%;
    height: auto;
    display: block;
}

.print-area-b {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.print-area-b img {
    max-width: 100%;
    height: auto;
    display: block;
}
.print-area img { max-width: 100%; display: block; }

.print-area {
    position: absolute;
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.print-area img {
    max-width: 100%;
    height: auto;
    display: block;
}

@media print {
    .print-body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .page { margin: 0; width: 100%; padding: 0; }
}

/* Print Order Page Styles */
.printorder-body {
  font-family: 'Oswald', sans-serif;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

.printorder-page {
  padding: 2mm;
  max-height: 3200mm;
  margin: auto;
  position: relative;
  box-sizing: border-box;
}

.printorder-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 5px;
  page-break-after: avoid;
  break-after: avoid;
}

.printorder-logo {
  width: 100px;
}

.printorder-qr-box {
	position: absolute;
	right: 10px;
  padding: 10px;
  text-align: center;
  display: inline-block;
}
.printorder-qr-box img { display: block; border: 2px solid white; }
.printorder-qr-label { margin-bottom: 5px; font-size: 0.9em; letter-spacing: 1px; }

.printorder-top-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  margin: 20px 0 30px 0;
  flex-wrap: wrap;
  gap: 20px;
  page-break-after: avoid;
  break-after: avoid;
}

.printorder-info-section { flex: 1; min-width: 200px; page-break-inside: avoid; break-inside: avoid; }
.printorder-info-label { font-size: 1em; color: #666; margin-bottom: 5px; }
.printorder-info-value { font-size: 1.3em; font-weight: bold; text-transform: uppercase; }

.printorder-comments-section { width: 100%; margin-top: 20px; padding: 15px; page-break-inside: avoid; break-inside: avoid; }
.printorder-comments-label { font-size: 1.2em; font-weight: bold; text-transform: uppercase; margin-bottom: 10px; }
.printorder-comments-text { font-size: 1.1em; white-space: pre-wrap; }

.printorder-custom-fields { width: 100%; margin-top: 20px; padding: 15px; page-break-inside: avoid; break-inside: avoid; display: flex; flex-wrap: wrap; gap: 20px; }
.printorder-custom-field { flex: 1; min-width: 200px; }
.printorder-custom-label { font-size: 1em; color: #666; margin-bottom: 5px; }
.printorder-custom-value { font-size: 1.3em; font-weight: bold; text-transform: uppercase; }

.printorder-mockup-container { display: flex; flex-direction: column; align-items: center; gap: 30px; margin-bottom: 30px; page-break-inside: avoid; break-inside: avoid; }
.printorder-standalone-images { display: flex; flex-direction: column; align-items: center; gap: 20px; margin-bottom: 30px; page-break-inside: avoid; break-inside: avoid; }
.printorder-standalone-image { display: flex; flex-direction: column; align-items: center; gap: 10px; page-break-inside: avoid; break-inside: avoid; }
.printorder-standalone-image img { max-width: 300px; max-height: 300px; object-fit: contain; }
.printorder-standalone-label { font-size: 1.2em; text-transform: uppercase; font-weight: bold; }

.printorder-tshirt-wrapper { position: relative; width: 300px; height: 300px; margin: 0 auto; page-break-inside: avoid; break-inside: avoid; }
.printorder-tshirt-svg { width: 100%; height: 100%; display: block; }
.printorder-print-area-f{
    position: absolute;
    top: 51%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.printorder-print-area-f img {
    max-width: 100%;
    height: auto;
    display: block;
}

.printorder-print-area-b {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.printorder-print-area-b img {
    max-width: 100%;
    height: auto;
    display: block;
}
.printorder-print-area img { max-width: 100%; display: block; }

.printorder-print-area {
    position: absolute;
    height: auto;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}
.printorder-print-area img {
    max-width: 100%;
    height: auto;
    display: block;
}

.printorder-settings-info {
    width: 100%;
    text-align: center;
    font-size: 1.1em;
}

/* Client 80mm receipt print */
.printclient-body {
  font-family: "AMSTRAD";
  margin: 0 auto;
  padding: 0;
  width: 70mm;
  max-width: 70mm;
  color: #111;
  background: #fff;
}

.printclient-page {
  width: 70mm;
  max-width: 70mm;
  padding: 2mm;
  margin: 0 auto;
  box-sizing: border-box;
}

.printclient-header {
  font-family: "AMSTRAD";
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2mm;
  margin-bottom: 2mm;
}

.printclient-logo img {
  margin-top: 20px;
  width: 100%;
  max-width: 17mm;
  height: auto;
  display: block;
}

.printclient-qr-box img {
  margin-top: 20px;
  width: 25mm;
  height: 25mm;
  display: block;
}

.printclient-title {
  font-family: "AMSTRAD";
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  padding: 1.5mm 1mm;
   margin-bottom: 2mm;
}

.printclient-info-grid {
  font-family: "AMSTRAD";
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5mm;
  margin-bottom: 2.5mm;
}

.printclient-info-date {
  font-family: "AMSTRAD";
  margin-left: 50px;
  font-size: 16px;
  font-weight: 700
}

.printclient-info-item {
  font-family: "AMSTRAD";
  margin-left: 10px;
  padding: 1mm;
  page-break-inside: avoid;
  break-inside: avoid;
}

.printclient-info-item-full {
  grid-column: 1 / -1;
}

.printclient-info-label {
  font-family: "AMSTRAD";
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 0.5mm;
}

.printclient-info-value {
  font-family: "AMSTRAD";
  font-size: 14px;
  margin-left: 10px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
  text-transform: none;
}

.printclient-images-title {
  font-family: "AMSTRAD";
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 2mm 0 1.5mm;
  padding-bottom: 1mm;
}

.printclient-suborders-title {
  font-family: "AMSTRAD";
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 3mm 0 1.5mm;
  border-top: 1px solid #111;
  border-bottom: 1px solid #111;
  padding: 1mm 0;
  text-align: center;
}

.printclient-suborder-section {
  margin-bottom: 2.5mm;
  padding-bottom: 2mm;
  border-bottom: 1px dashed #bbb;
}

.printclient-suborder-id {
  font-family: "AMSTRAD";
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5mm;
}

.printclient-images-column {
  display: flex;
  flex-direction: column;
  gap: 2mm;
}

.printclient-image-card {
  padding: 1mm;
  text-align: center;
  page-break-inside: avoid;
  break-inside: avoid;
}

.printclient-image-label {
  font-family: "AMSTRAD";
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 1mm;
  color: #444;
}

.printclient-image-card img {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 48mm;
  object-fit: contain;
  display: block;
}

.printclient-page .printorder-tshirt-wrapper {
  width: 100%;
  max-width: 62mm;
  aspect-ratio: 1 / 1;
  height: auto;
}

.printclient-page .printorder-settings-info {
  font-family: "AMSTRAD";
  margin-top: 1mm;
  font-size: 10px;
  line-height: 1.3;
  text-align: center;
}

.printclient-page .printorder-print-area img {
  max-width: 95%;
}

@media print {
    .printorder-body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .printorder-page { margin: 0; width: 100%; padding: 0; page-break-inside: avoid; break-inside: avoid; }
    .printorder-tshirt-wrapper, .printorder-mockup-container, .printorder-standalone-image, .printorder-comments-section, .printorder-custom-field { page-break-inside: avoid !important; break-inside: avoid !important; }
    .printclient-body {
      width: 70mm !important;
      max-width: 70mm !important;
      margin: 0 auto !important;
      -webkit-print-color-adjust: exact;
      print-color-adjust: exact;
    }
    .printclient-page {
      width: 70mm !important;
      max-width: 70mm !important;
      padding: 2mm !important;
      margin: 0 auto !important;
    }
    @page {
      size: 70mm auto;
      margin: 0;
    }
}

/* Modal */
.modal-overlay {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}
.modal-overlay.active {
  display: flex;
}
.modal-box {
  font-family: "AMSTRAD";
  font-size: 14px;
  letter-spacing: 0px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #515151;
  border: 3px solid #515151;
  box-shadow: 1px 1px 0px 0px, 2px 2px 0px 0px, 3px 3px 0px 0px, 4px 4px 0px 0px, 5px 5px 0px 0px;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  background: white;
  padding: 20px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.modal-title {
  font-family: "AMSTRAD";
  font-size: 1.2em;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
}
.modal-message {
  margin-bottom: 20px;
  color: #555;
}
.modal-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.modal-btn {
  font-family: "AMSTRAD";
  font-size: 16px;
  letter-spacing: 2px;
  text-transform: uppercase;
  text-align: center;
  vertical-align: middle;
  color: #000;
  cursor: pointer;
  border: 3px solid #515151;
  padding: 0.25em 0.5em;
  box-shadow: 1px 1px 0px 0px #515151, 2px 2px 0px 0px #515151, 3px 3px 0px 0px #515151, 4px 4px 0px 0px #515151, 5px 5px 0px 0px #515151;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  padding: 8px 16px;
  border: none;
  cursor: pointer;
  font-size: 0.9em;
}
.modal-btn-primary {
  background: #007bff;
  color: white;
}
.modal-btn-primary:hover {
  background: #0056b3;
}
.modal-btn-primary:active {
  box-shadow: 0px 0px 0px 0px;
  top: 5px;
  left: 5px;
}
.modal-btn-danger {
  background: #dc3545;
  color: white;
}
.modal-btn-danger:hover {
  background: #a71d2a;
}
.modal-btn-danger:active {
  box-shadow: 0px 0px 0px 0px;
  top: 5px;
  left: 5px;
}
.modal-btn-secondary {
  background: #e0e0e0;
  color: #333;
}
.modal-btn-secondary:hover {
  background: #d0d0d0;
}
.modal-btn-secondary:active {
  box-shadow: 0px 0px 0px 0px;
  top: 5px;
  left: 5px;
}

/* Ensure the grid itself is centered */
.square-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  width: 40px;
  height: 40px;
  margin: 0;
}

/* Individual square bits */
.square-bit {
  width: 18px;
  height: 18px;
  background-color: #a2ff00;
  opacity: 0;
  animation: square-fill 1.2s infinite ease-in-out;
}

/* Staggering the animation for each bit */
.square-bit:nth-child(1) { animation-delay: 0s; }
.square-bit:nth-child(2) { animation-delay: 0.3s; }
.square-bit:nth-child(3) { animation-delay: 0.9s; }
.square-bit:nth-child(4) { animation-delay: 0.6s; }

@keyframes square-fill {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Loader Overlay Adjustments */
#save_loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#save_loader.visible {
    display: flex;
}

#save_loader p {
    font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
    font-size: 2em;
    color: deeppink;
}

/* Image Position Center Buttons */
.canvas-wrapper-container {
  position: relative;
  display: inline-block;
}

.center-btn {
  position: absolute;
  width: 15px;
  height: 15px;
  padding: 0;
  background: #ff0077;
  border: none;
  border-radius: 50%;
  box-shadow: none;
  cursor: pointer;
  z-index: 10;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.center-btn:hover {
  opacity: 1;
}

.center-btn-x {
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.center-btn-y {
  right: -10px;
  top: 50%;
  transform: translateY(-50%);
}

/* Pantone Color Bridge Page Styles */
:root {
  --pantone-primary: #2d3436;
  --pantone-accent: #0984e3;
}

.pantone-wrapper {
  max-width: 900px;
  margin: 0 auto;
}

.pantone-header {
  text-align: center;
  margin-bottom: 40px;
}

.pantone-wrapper .pantone-search-box {
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  text-align: center;
}

.pantone-wrapper .pantone-search-box input[type="text"] {
  width: 70%;
  padding: 12px 20px;
  border: 2px solid #dfe6e9;
  border-radius: 8px;
  font-size: 1.1rem;
  outline: none;
}

.pantone-wrapper .pantone-search-box input[type="text"]:focus {
  border-color: var(--pantone-accent);
}

.pantone-wrapper .pantone-search-box button {
  padding: 12px 25px;
  background: var(--pantone-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  font-size: 1rem;
}

.pantone-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px,1fr));
  gap: 20px;
  margin-top: 40px;
}

.pantone-color-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  border: 1px solid #ddd;
}

.pantone-swatch {
  height: 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  letter-spacing: 1px;
}

.pantone-swatch span {
  font-size: 0.8rem;
  font-weight: 400;
  opacity: 0.8;
}

.pantone-info {
  padding: 15px;
  font-family: monospace;
  font-size: 0.9rem;
}

.pantone-info-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  border-bottom: 1px solid #f9f9f9;
}

.pantone-info .pantone-label {
  color: #636e72;
  font-weight: bold;
}

.pantone-error {
  color: #d63031;
  background: #fab1a0;
  padding: 15px;
  border-radius: 8px;
  margin-top: 20px;
}

/* "Send to GTX" corner button on raster design previews (.tshirt-wrapper / .other-image-item
   are already position:relative). Only rendered for users with the gtx permission. */
.gtx-send-btn {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 5;
  font: 600 12px/1 system-ui, sans-serif;
  color: #fff;
  background: #5865f2;
  border: 0;
  border-radius: 6px;
  padding: 5px 9px;
  cursor: pointer;
  box-shadow: 0 1px 4px #0005;
  opacity: 0.85;
  transition: opacity 0.15s, transform 0.15s;
}
.gtx-send-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* AI Studio badge — same pill as .gtx-send-btn, teal instead of indigo, stacked directly
   above the GTX badge in the bottom-right corner (GTX stays at bottom:6px). */
.ai-edit-btn {
  position: absolute;
  right: 6px;
  bottom: 34px;
  z-index: 5;
  font: 600 12px/1 system-ui, sans-serif;
  color: #fff;
  background: #0d9488;
  border: 0;
  border-radius: 6px;
  padding: 5px 9px;
  cursor: pointer;
  box-shadow: 0 1px 4px #0005;
  opacity: 0.85;
  transition: opacity 0.15s, transform 0.15s;
}
.ai-edit-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

/* Backlog month bar: separates still-pending orders from earlier months, shown
   above the current month's list on the default view. */
.backlog-month-bar {
  display: inline-block;
  margin: 14px 0 6px;
  padding: 6px 12px;
  background: #EA7100;
  color: #fff;
  font-weight: 700;
  font-size: 0.95em;
  letter-spacing: 0.02em;
}
.backlog-month-bar:first-child {
  margin-top: 0;
}
/* Current month, only shown to separate it from the backlog above. */
.current-month-bar {
  background: #00A444;
}
